
Concept explainers
Using the Online SQL Editor, answer the following questions with screenshots.
Link: https://www.programiz.com/sql/online-compiler/
1. Show all columns from Order table then add a new column titled “Lowest Price”, where such column flags or labels all amounts less than or equal to 300 as “Items 300 and below”. Answer(screenshot of code & output from SQL Editor)
2. Show last name, first name, and age columns from Customers table then add a new column titled “Age Label”,
where such column flags or labels all ages 25 and above as “Tigulang na” and ages below 25 as “Bata pa ah”. Answer(screenshot of code & output from SQL Editor)
3. Provide the order id, item and sum (amount) of all items with a total (sum) amount greater than 400; rename the sum (amount) column as “Total Amount”; then group the result by order_id. Answer(screenshot of code & output from SQL Editor)
4. Show the customer id, last name, and first name of all customers who ordered items with an amount greater than 400. Answer(screenshot of code & output from SQL Editor)
5. Show the customer id, last name, and first name of all customers who did not have any orders from the order table list. Answer(screenshot of code & output from SQL Editor)

Trending nowThis is a popular solution!
Step by stepSolved in 6 steps with 5 images

- code of create table and insert table only pleasearrow_forwardWrite and SQL query using the MAX operator to show all data from the Order Items table in which the highest amount was paid for each item.arrow_forwardHow can the CAST function be combined with other functions to enhance data type compatibility in SQL queries?arrow_forward
- Use SQL Developer or Oracle Live SQL to write the appropriate SQL commands as follows: ) PROCEDURE: Use the cust_node table to create a procedure called ‘Get_node_id’ that takes the cust_idas an input parameter to show its corresponding node id to the banker. Then execute this procedure withcust_id=5.arrow_forwardPL/SQL please use oracle sql developer. I know it would be hard to slove without the data but please help Given a start and end date, print out names, phone number, status, and flight ID of people who were on the same flight with someone whose status is 1 (tested positive) and the flight date is between the start and end date.arrow_forwardWrite all the sql code (including create, insert and select)arrow_forward
- code of create table and insert table only pleasearrow_forwarduse sql please List only the movies that have a value for gross (not NULL values). Include all columns in the result set.arrow_forwardusing the link below, select which data type best fits the following needs: https://www.w3schools.com/sql/sql_datatypes.asp The Date a student enrolls with a university The students phone number The name of a degree program The students financial aid amountarrow_forward
- Please help with pl/sql block!arrow_forwardInstructions: Write the suitable SQL statement to answer the following questions based on the following tables ( image for better table) Table Name: Employee EMP_ID FNAME LNAME SALARY JOIN_DATE DEP_NO 101 John Abraham 10000 01-JAN-13 11 202 Michael Clarke 80000 01-JAN-13 22 303 Roy Thomas 70000 01-FEB-13 11 404 Tom Jose 60000 01-FEB-13 22 505 Jerry Pinto 65000 01-FEB-13 22 606 Philip Mathew 75000…arrow_forwardWhat are some common uses for the STRING_AGG function in SQL?arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education





