Write the SQL statements for the following User table. User_id Name City Order_date Purchase_amount 101 Alex Paris 2012-10-05 150.5 102 James London 2012-10-05 270.3 103 Paul Paris 2012-10-05 120.8 104 Lawson Rome 2012-10-05 230.5 105 Kate Beijing 2012-10-05 30.2 1. Write a query to create a user table containing following columns. Whereas user_id as primary key. 2. Write a query to insert multiple records into user table. 3. Write a query to add two columns, country and currency in user table. 4. Write a query to update user table, set city as shanghai for a user having user_id 105. 5. Write a query to remove all records from user table. 6. Write a query to drop a column purchase _amount from user table. 7. Write a query to display name of user in descending order whose order purchase amount is in between 200 to 270. 8. Write a query to display name of user who belong to either Paris, London or CS Beijing. 9. Write query to display name of an employee who belong to paris. 10. Write a query to display unique city name form user table

Database Systems: Design, Implementation, & Management
12th Edition
ISBN:9781305627482
Author:Carlos Coronel, Steven Morris
Publisher:Carlos Coronel, Steven Morris
Chapter7: Introduction To Structured Query Language (sql)
Section: Chapter Questions
Problem 125C: Write a query to display the movie number, movie genre, average cost of movies in that genre, cost...
icon
Related questions
Question

Write the SQL statements for the following User table. User_id Name City Order_date Purchase_amount 101 Alex Paris 2012-10-05 150.5 102 James London 2012-10-05 270.3 103 Paul Paris 2012-10-05 120.8 104 Lawson Rome 2012-10-05 230.5 105 Kate Beijing 2012-10-05 30.2 1. Write a query to create a user table containing following columns. Whereas user_id as primary key. 2. Write a query to insert multiple records into user table. 3. Write a query to add two columns, country and currency in user table. 4. Write a query to update user table, set city as shanghai for a user having user_id 105. 5. Write a query to remove all records from user table. 6. Write a query to drop a column purchase _amount from user table. 7. Write a query to display name of user in descending order whose order purchase amount is in between 200 to 270. 8. Write a query to display name of user who belong to either Paris, London or CS Beijing. 9. Write query to display name of an employee who belong to paris. 10. Write a query to display unique city name form user table

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Intermediate SQL concepts
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.
Recommended textbooks for you
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781285196145
Author:
Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:
Cengage Learning
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr