SQL Syntax
SQL Syntax
DDL
Task: To construct a standard Database Table for the details of orders received in a weaving
factory: (Fabric_order_details)
Order_code char[6],
Cust_name char[10],
Fab_code char[5],
Fab_width_cm num[3],
Fab_color char[7],
Order_qty_mtr num[6],
Delivery_date date[9],
);
Table Name: fabric_order_details
VALUES ( )
------
------
------
SELECT
Qr-1: Show the customer name, order code and fabric code for the order quantity more than 3000
mtr
FROM fabric_order_details
WHERE (Order_qty_mtr>3000);
QR-2: Show all the fabric codes and delivery date for the fabric width less than 100 cm
Qr-3: Show the fabric code wise total order
SELECT SUM(Order_qty_mtr)
FROM fabric_order_details
GROUP BY fab_code
ORDER BY Order_qty_mtr(ASC)
QR-1/19th Feb 2022: show all the style code and fabric consumption for all the 100%
cotton Blended garmemnts from the table Garment_Style_Details
QR-2/19th Feb 2022: Show the style number wise total order quantities from the
garment_order_details table and show the output in the descending order of the order
quantity