Using the om database: Write a statement that displays these fields: customer’s first name customer's last name order id order date of orders placed Use the default JOIN type, use table aliases of C for customers and O for orders, and use the ON keyword when joining. The fields should be displayed in the order listed above.   Notes: This statement requires joining tables together so I recommend you review the document provided titled 'Notes on database om'. Copy/Paste your answer from your Workbench into the textbox below Remove any "extra" spaces between each keyword

A Guide to SQL
9th Edition
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Philip J. Pratt
Chapter7: Database Administration
Section: Chapter Questions
Problem 4TD: Write, but do not execute, the commands to grant the following privileges: a. User Ashton must be...
icon
Related questions
icon
Concept explainers
Question
100%

Using the om database:

Write a statement that displays these fields:

  • customer’s first name
  • customer's last name
  • order id
  • order date of orders placed

Use the default JOIN type, use table aliases of C for customers and O for orders, and use the ON keyword when joining. The fields should be displayed in the order listed above.

 

Notes:

  • This statement requires joining tables together so I recommend you review the document provided titled 'Notes on database om'.
  • Copy/Paste your answer from your Workbench into the textbox below
  • Remove any "extra" spaces between each keyword
Navigator:
SCHEMAS
Q Filter objects
customers
Columns
DHI
◆ customer_id
customer_first_name
◆ customer_last_name
customer_address
customer_city
customer_state
Schema: ap
◆ customer_zip
customer_phone
items
order_details
→Columns
◆ customer_fax
Indexes
Foreign Keys
Triggers
◆ order_id
◆ item_id
◆ order_qty
Indexes
Foreign Keys
Administration Schemas
Information:
Object Info Session
SQL File 3* x
817
1 * * * > *
1
2.
3.
4.
5.
6
7
Output 000000
Limit to 1000 rows
USE om;
SELECT * FROM customers;
SELECT customer_first_name, customer_last_name FROM customers;
, customer_last_name) AS 'FULL NAME FROM customers;
SELECT CONCAT (customer_first_name,
SELECT customer_last_name, customer_last_name, order_date FROM customers C, orders 0 JOIN Orders 0 ON C.customer_id = 0.
ORDER BY customer_last_name, customer_last_name;
Action Output
Time
Action
12 20:12:26 SELECT CONCAT (customer_first_name, ", customer_last_name) AS 'FULL NAME FROM custom...
13 21:17:40 SELECT c.first_name, c.last_name, o.order_id, o.order_date FROM customers c JOIN orders o ON...
14 21:24:57 SELECT customer.first_name, customer.last_name, orders.order_id, orders.order_date FROM custo...
15 21:27:06 SELECT customer.customer_first_name, customer.customer_last_name, orders.order_id, orders.ord...
16 21:33:23 SELECT customer_last_name, customer_last_name, order_date FROM customers C, orders O WH...
17 21:51:05 SELECT customer_last_name, customer_last_name, order_date FROM customers C, orders O JOIN...
SQLAdditions:
◄
▶ I₂1 Jump to
Automatic context h
disabled. Use the tool
manually get help for the
caret position or to t
automatic help.
Context Help
Message
25 row(s) retumed
Error Code: 1054. Unknown column 'c.first_name' in field list'
Error Code: 1054. Unknown column 'customer.first_name' in field list'
Error Code: 1054. Unknown column 'customer.customer_first_name' in field list'
47 row(s) retumed
Error Code: 1066. Not unique table/alias: 'O'
Snippets
Duration
0.000 se
0.015 se
0.000 se
0.000 se
0.015 se
0.000 se
Transcribed Image Text:Navigator: SCHEMAS Q Filter objects customers Columns DHI ◆ customer_id customer_first_name ◆ customer_last_name customer_address customer_city customer_state Schema: ap ◆ customer_zip customer_phone items order_details →Columns ◆ customer_fax Indexes Foreign Keys Triggers ◆ order_id ◆ item_id ◆ order_qty Indexes Foreign Keys Administration Schemas Information: Object Info Session SQL File 3* x 817 1 * * * > * 1 2. 3. 4. 5. 6 7 Output 000000 Limit to 1000 rows USE om; SELECT * FROM customers; SELECT customer_first_name, customer_last_name FROM customers; , customer_last_name) AS 'FULL NAME FROM customers; SELECT CONCAT (customer_first_name, SELECT customer_last_name, customer_last_name, order_date FROM customers C, orders 0 JOIN Orders 0 ON C.customer_id = 0. ORDER BY customer_last_name, customer_last_name; Action Output Time Action 12 20:12:26 SELECT CONCAT (customer_first_name, ", customer_last_name) AS 'FULL NAME FROM custom... 13 21:17:40 SELECT c.first_name, c.last_name, o.order_id, o.order_date FROM customers c JOIN orders o ON... 14 21:24:57 SELECT customer.first_name, customer.last_name, orders.order_id, orders.order_date FROM custo... 15 21:27:06 SELECT customer.customer_first_name, customer.customer_last_name, orders.order_id, orders.ord... 16 21:33:23 SELECT customer_last_name, customer_last_name, order_date FROM customers C, orders O WH... 17 21:51:05 SELECT customer_last_name, customer_last_name, order_date FROM customers C, orders O JOIN... SQLAdditions: ◄ ▶ I₂1 Jump to Automatic context h disabled. Use the tool manually get help for the caret position or to t automatic help. Context Help Message 25 row(s) retumed Error Code: 1054. Unknown column 'c.first_name' in field list' Error Code: 1054. Unknown column 'customer.first_name' in field list' Error Code: 1054. Unknown column 'customer.customer_first_name' in field list' 47 row(s) retumed Error Code: 1066. Not unique table/alias: 'O' Snippets Duration 0.000 se 0.015 se 0.000 se 0.000 se 0.015 se 0.000 se
6
1 point
Using the om database:
Write a statement that displays these fields:
• customer's first name
• customer's last name
• order id
• order date of orders placed
Use the default JOIN type, use table aliases of C for customers and O for orders, and use the ON keyword when joining. The fields should be displayed in the order listed above.
Notes:
• This statement requires joining tables together so I recommend you review the document provided titled 'Notes on database om!.
• Copy/Paste your answer from your Workbench into the textbox below
• Remove any "extra" spaces between each keyword
--D
Enter your query: type your answer...
Transcribed Image Text:6 1 point Using the om database: Write a statement that displays these fields: • customer's first name • customer's last name • order id • order date of orders placed Use the default JOIN type, use table aliases of C for customers and O for orders, and use the ON keyword when joining. The fields should be displayed in the order listed above. Notes: • This statement requires joining tables together so I recommend you review the document provided titled 'Notes on database om!. • Copy/Paste your answer from your Workbench into the textbox below • Remove any "extra" spaces between each keyword --D Enter your query: type your answer...
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Query Syntax
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning