Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
A lab report from the NUST Military College of Signals, Rawalpindi. It covers the topic of SQL joins, which are used to combine data spread across tables. the syntax of SQL join algorithms, including cross join and inner join. It also includes examples of SQL queries using these join algorithms. The lab exercises in the document include a schema diagram and a list of tables used for the exercises.
Typology: Lab Reports
1 / 9
SELECT * FROM Customer CROSS JOIN OrderTbl;
SELECT * FROM Customer INNER JOIN OrderTbl ON Customer.CustNo = OrderTbl.CustNo;
SELECT * FROM Customer, OrderTbl where Customer.CustNo = OrderTbl.CustNo;
SELECT * FROM Customer INNER JOIN OrderTbl ON Customer.CustNo = OrderTbl.CustNo and CustState='CO'
SELECT * FROM Customer INNER JOIN OrderTbl ON Customer.CustNo = OrderTbl.CustNo;
SELECT * FROM Customer INNER JOIN OrderTbl ON Customer.CustNo != OrderTbl.CustNo;
SELECT Customer.CustNo, CustFirstName, OrderTbl.OrdNo, OrdDate, Product.ProdNo, ProdName FROM Customer INNER JOIN OrderTbl ON Customer.CustNo = OrderTbl.CustNo INNER JOIN OrdLine ON OrderTbl.OrdNo = OrdLine.OrdNo INNER JOIN Product ON OrdLine.ProdNo = Product.ProdNo
select p.eventno from eventrequest p join facility f on f.facno=p.facno where year(datereq)= 2018 and f.facname='football stadium';
Schema Diagram to be used for Lab Exercises List of Tables used for Lab Exercises Customer custno custname address Internal contact phone city state zip C100 Faisal Naseer Box 352200 Yes Mary Manager 6857100 Boulder CO 80309 C101 Mubashir Nazir Box 352400 Yes Sally Supervisor 5431700 Boulder CO 80309 C103 Babar Nawaz Box 352020 Yes Bill Baseball 5431234 Boulder CO 80309 C104 Waheed Iqbal Box 351200 Yes Sue Softball 5434321 Boulder CO 80309 C105 Hashir Shahid 123 AnyStreet No Coach Bob 4441234 Louisville CO 80027 Employee
empno empname department email phone E100 Chuck Coordinator Administration [email protected] 3- E101 Mary Manager Football [email protected] 5- E102 Sally Supervisor Planning [email protected] 3- E103 Alan Administrator Administration [email protected] 3- Facility facno facname F100 Football stadium F101 Basketball arena F102 Baseball field F103 Recreation room Location locno facno locname L100 F100 Locker room L101 F100 Plaza L102 F100 Vehicle gate L103 F101 Locker room L104 F100 Ticket Booth L105 F101 Gate L106 F100 Pedestrian gate ResourceTbl resno resname rate R100 attendant $10. R101 police $15. R102 usher $10. R103 nurse $20. R104 janitor $15. R105 food service $10. EventRequest eventno dateheld datereq facno custno dateauth status estcost estaudience budno E100 25-Oct-2018 06-Jun-2018 F100 C100 08-Jun-2018 Approved $5,000.00 80000 B E101 26-Oct-2018 28-Jul-2018 F100 C100 Pending $5,000.00 80000 B E102 14-Sep-2018 28-Jul-2018 F100 C100 31-Jul-2018 Approved $5,000.00 80000 B E103 21-Sep-2018 28-Jul-2018 F100 C100 01-Aug-2018 Approved $5,000.00 80000 B E104 03-Dec-2018 28-Jul-2018 F101 C101 31-Jul-2018 Approved $2,000.00 12000 B E105 05-Dec-2018 28-Jul-2018 F101 C101 01-Aug-2018 Approved $2,000.00 10000 B E106 12-Dec-2018 28-Jul-2018 F101 C101 31-Jul-2018 Approved $2,000.00 10000 B E107 23-Nov-2018 28-Jul-2018 F100 C105 31-Jul-2018 Denied $10,000.00 5000
EventPlan