Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Consider the following relations: customer(id, firstName, lastName, address, email) orders(id, customerID, orderDate, shipDate) Which SQL statement retrieves orders for the customer with a customer id
Consider the following relations:
customer(id, firstName, lastName, address, email) orders(id, customerID, orderDate, shipDate)
Which SQL statement retrieves orders for the customer with a customer id of 1205 where the records only contain the order id, orderDate, shipDate, customer firstName, customer lastName, and customer email and the records are ordered by orderDate ascending?
A. SELECT * FROM orders, customer WHERE customerID = customer.id AND customerID = 1205 ORDER BY orderDate ASC; |
B. SELECT id, orderDate, shipDate, firstName, lastName, email FROM orders INNER JOIN customer ON customerID = id WHERE customerID = 1205 ORDER BY orderDate ASC; |
C. SELECT orders.id, orders.orderDate, orders.shipDate, customer.firstName, customer.lastName, customer.email FROM orders INNER JOIN customer ON orders.customerID = customer.id WHERE orders.customerID = 1205 ORDER BY orders.orderDate ASC; |
D. SELECT LIMIT(orders.id, orders.orderDate, orders.shipDate, customer.firstName, customer.lastName, customer.email) FROM orders INNER JOIN customer ON orders.customerID = customer.id WHERE orders.customerID = 1205 ORDER BY orders.orderDate ASC; |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started