Answer to the following questions a) Write SQL statements to create tables with details given below Table: SUPPLIER Sup_

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
correctanswer
Posts: 43759
Joined: Sat Aug 07, 2021 7:38 am

Answer to the following questions a) Write SQL statements to create tables with details given below Table: SUPPLIER Sup_

Post by correctanswer »

Answer To The Following Questions A Write Sql Statements To Create Tables With Details Given Below Table Supplier Sup 1
Answer To The Following Questions A Write Sql Statements To Create Tables With Details Given Below Table Supplier Sup 1 (70.28 KiB) Viewed 76 times
Answer To The Following Questions A Write Sql Statements To Create Tables With Details Given Below Table Supplier Sup 2
Answer To The Following Questions A Write Sql Statements To Create Tables With Details Given Below Table Supplier Sup 2 (47.01 KiB) Viewed 76 times
Answer to the following questions a) Write SQL statements to create tables with details given below Table: SUPPLIER Sup_ID Sup_Name City Char(5), Varchar2(25) Varchar2(15) Primary key Table: PRODUCT Pro_ID Pro_Name Category Price Varchar2(5), Varchar2(25) Varchar2(15) Number(5,3), Default 0 Insert records into the tables SUPPLIER and PRODUCT as given. TABLE: SUPPLIER Sup_ID Sup Name City Sup_Date S1024 LULU MUSCAT 20-05-2020 $1025 NESTO SOHAR 21-05-2019 $1026 LULU BARKA 22-03-2021 S1027 BAHA MATRA 23-05-2020 $1028 SAFA MUSCAT 24-02-2019 TABLE: PRODUCT Pro_ID Category Price Sup_ID P1220 FOOTWARE 20.555 $1024 P1221 POULTRY 35.555 S1025 P1222 DAIRY 40.556 $1026 P1223 BREAD 65.895 S1027 P1224 DAIRY 70.855 $1028 Pro Name SHOES EGG CHOCOLATE WHEAT BREAD MILK Sup Date Date Sup_ID Char(5), Foreign key
b) Write an SQL Query to display Product ID, first 3 letters from the Product Name for the products with category DIARY and BREAD. c) Write an SQL Query to calculate and display PRODUCT NAME, PRICE after multiplying the price by 2 with an alias name NEW PRICE for those products where the name starts with letter S and Price more than 30. d) Write an SQL Query to display unique Categories, round the price to 2 decimal places, and display it in the ascending order of Price. e) Write an SQL query to display Category in small letters, the highest price for each category of products. f) Write an SQL query to display Product ID, Product Name, and Number of months between Sysdate and Sup Date [Hint: Use Inner Join] g) Write an SQL query to display the Product name and price of products supplied by the supplier LULU in MUSCAT city. [Hint: Use Subquery]. h) Write an SQL query to display Prod_ID, Combine the columns Prod_ID and Pro_name and display the column heading "Product Details" in the output. i) Write a SQL Query and display the Pro_ID or Pro_name ,Category in the table Product
Register for solutions, replies, and use board search function. Answer Happy Forum is an archive of questions covering all technical subjects across the Internet.
Post Reply