Using the Online SQL Editor, answer the following questions with screenshots. Link: https://www.programiz.com/sql/online-compiler/ Question 1: Create a table named Premium_Orders where such table shows all columns from Orders table that pertain to the following items: keyboard & monitor. Sort rows starting from highest to lowest amount. Question 2: Add the following columns to Shippings table: -item as a variable character (limit to 40 characters) -amount as integer (limit to 20 characters) Then, rename ‘customer’ column into ‘customer_id’. Delete the ‘amount’ column from Shippings table. Question 3: Add the following data to Suppliers table: Supplier ID 1 - Naruto Uzumaki, 31, from Konoha Supplier ID 2 – Lelouch Lamperouge, 20, from Britannia Supplier ID 3 – Suzaku Kururugi, 22, from Japan Supplier ID 4 – Levi Ackerman, 25, from Paradis Supplier ID 5 – L Lawliet, 18, from Japan
SQL
SQL stands for Structured Query Language, is a form of communication that uses queries structured in a specific format to store, manage & retrieve data from a relational database.
Queries
A query is a type of computer programming language that is used to retrieve data from a database. Databases are useful in a variety of ways. They enable the retrieval of records or parts of records, as well as the performance of various calculations prior to displaying the results. A search query is one type of query that many people perform several times per day. A search query is executed every time you use a search engine to find something. When you press the Enter key, the keywords are sent to the search engine, where they are processed by an algorithm that retrieves related results from the search index. Your query's results are displayed on a search engine results page, or SER.
Using the Online SQL Editor, answer the following questions with screenshots.
Link: https://www.programiz.com/sql/online-compiler/
Question 1: Create a table named Premium_Orders where such table shows all columns from Orders table that pertain to the following items: keyboard & monitor. Sort rows starting from highest to lowest amount.
Question 2:
- Add the following columns to Shippings table:
-item as a variable character (limit to 40 characters)
-amount as integer (limit to 20 characters) - Then, rename ‘customer’ column into ‘customer_id’.
- Delete the ‘amount’ column from Shippings table.
Question 3: Add the following data to Suppliers table:
Supplier ID 1 - Naruto Uzumaki, 31, from Konoha
Supplier ID 2 – Lelouch Lamperouge, 20, from Britannia
Supplier ID 3 – Suzaku Kururugi, 22, from Japan
Supplier ID 4 – Levi Ackerman, 25, from Paradis
Supplier ID 5 – L Lawliet, 18, from Japan
Step by step
Solved in 4 steps with 3 images