Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
37 views
8 pages
C12 Cs GroupJoin Assignment
Uploaded by
azmiana786
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save C12-cs-GroupJoin-Assignment (2) For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
0 ratings
0% found this document useful (0 votes)
37 views
8 pages
C12 Cs GroupJoin Assignment
Uploaded by
azmiana786
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save C12-cs-GroupJoin-Assignment (2) For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
Download
Save C12-cs-GroupJoin-Assignment (2) For Later
You are on page 1
/ 8
Search
Fullscreen
Type B : Application Based Questions Following questions are based on these tables : Table BOOK_INFORMATION Table SALES Column Name Column Name BOOK ID BOOK TITLE PRICE SALES_AMOUNT Table EXAM_RESULTS STUID FNAME LNAME, EXAM 1D | EXAM, SCORE 10 LAURA LYNCH 1 90 10 LAURA LYNCH 2 85. 11 GRACE BROWN, 1 78 u GRACE BROWN, 2 72 2 JAY JACKSON 1 oa 12 JAY JACKSON 2 92. 13 WILLIAM _| BISHOP 1 70 13 WILLIAM _| BISHOP 2 at 14 CHARLES | PRADA 2 =4 0R0UPNG RECORDS, OMS IN SL 613 _ oy sXe X(PRICE)FROW BOOK MFoRNATION; _ ee aS alge NN eee sign or : saa os ee ere srs ean a 4. vich SQL statement lets you find the ftal ruber of stores in the SALES tbe? (@ sttecr cou(stoRe_10) Fm SALES: ( setect count(oxSTINCT STORE 10) FROM SALES; (0) SELECT DISTINCT STORE_X0 FROM SALES; (@ sexect counr(sroRe_10) FROM SALES GROUP BY STORE_1P; Recency hr wale ent ot Se 1D 5 ane ee) amount for tore ID 45? (e) setecr stone 10, Sun(SALES_AAONT) FROM SALES ‘lene sTone_3D 14 (25,45) GROUP BY STORE TOS (© SeLecr stone x0, suN(SALES_AAOUNT) FROM SALES ‘iOUP By STORE_IO HAVING STORE_X0 IN (25,48) (6) Se.ectstonE_1D, SUM(SALES_AMOUNT) FROM SALES WERE (@, SELECT sToRE_xD, sus(SALES_AMOUNT) FROM SALES. ‘Wine stone 10 = 25 do STORE_10 = 45 GRO BY STORE1D; es at OL tenet do we eo th average exam se or EXAMLIP (©) SELECT avecexan_ScORE) FROM EXAM RESULTS: 0) sett avec scone OH BUN RESIS GO? et ave(5ur Scone) Fn x RESULTS PY EA. ID WE ‘CUNT EXM_SCORE) FROM EXRESULTS ‘sTone_30 16 (25,45)3 “0 by EXAM ID MERE XML = 2 aD 3s eRe UML ID #5to find out how many students took each exam? 7. Which SQL statement do we use : (@) SELECT COUNT(OISTINCT STU_ID) FROM EXAM RESULTS GROUP BY EXAM_ID; ‘nax(TU_IO) FROM EXAM_RESULTS GROUP BY EXAM_ID; (SELECT EXAMLID, COUNT(OISTINCT STU_ID) FROM EXAH_RESULTS GROUP BY EXAM 10; (0, SELECT ExALID, (@) SELECT EXAY_TO, NIN(STU_ID) FROM EXAM_RESULTS GROUP BY EXAM_ID; 8, What SQL statement do we use to print out the record of all students whose last name starts with (@) SELECT * FROM EXAM RESULTS WHERE LNAME LIKE “LX? (@) SELECT * FROM EXAM_RESULTS WHERE LNAME LIKE ‘L?5 (9) SELECT * FROM EXAM_RESULTS WHERE LNAME = “L's (@) SELECT * FROM EXAM_RESULTS WHERE LNANE <> ‘L?s 9. What is the result of the following SQL. statement? SELECT WOX(EXAM_SCORE) FROM EXAM RESULTS GROUP BY EXAM_IO HAVING EXAY_ID = 3; @9 (0) 85 (2) 100, 95 10, Given the following table Table : CLUB concitio | concuname | ace | sports | parorape | pay | sex | xuxrsa | a5_| karate zrnsise6 | 100 | Mm 2 | ravina | a4” | KARATE aoovises | i200 | F a [karan | a4_[ savas x9en%s | 2000 | 4 | taruy [33 [oasxersaut | ovoviess [as | a 5. ZUBIN: 36__| SWIMMING 12/01/1998 730 M s | wera | x [swnoanc | omnes | ao Tar Zz | anera | 39 | squasit 2oparises | 200 |e 5] ZAREEN | 37_| karare 2202996 | n100 | F 2 an < anes rss | soo | M matt | ispnsse | a7 | Mry RECORDS, JOINS IN SQL on 615 sowing le: oo Table : STUDENT | Mane _| Sepend_| _streem 1 _angMart_|_ Grote | _ cis. 7 [xan _ato0o _| Meinl ms | 8 | Tain | 000 [comnee | wa [x | ue Tops | 2000 [commer | aes |e | ae + [a 20000 [Humannes| aa o| ee Be + Fs | oan [Nomeiat | sos [Af a [ie 0000 | Medial ma | 8 | 2 + Travee | 2000 [vimanues | aa fc | a Len | _asom | Nensason [ses | | ta + Vias [stato [Nemesis [seo a [| A Vaan | om [connee | os | _¢ | ue que opet offllowing SOL statements: My SCT MIN(Avgoas) FROM STUDENT WHERE Ava <757 (peieCt SUMCspend) FROM Stade! WHERE Grade = 2 Gpstsct AvGttipend) FROM Staent WHERE Cas = 24"; fej ECT. COUNTIDISTINCD FROM Student “eat here neo ibe gen ba: Table £108 a2} {ton | President 20000 102. | Vice Presiden 12st) “Raiinittion Assistantyy 2 5, Consider the following tables Employee and Salary. Write SQL. commands for thea wea ‘give outputs for SQL queries (v) to (ci) Diy Table : Employee Pd 1_| Deepali Gupta 101 MCA F 2_| Rajat Tyagi 101 BCA M 3_| Hari Mohan 102 BA, M | Ha 102 MA, M [_s_| Sumit Mival 103 BlTech. M 6 Jyoti 101 MTech F slelels |e |B 6 | 10000 0 (9 To dgplay the frequency of employees departent wie (i) Tolis the names of those employees ony whose name sats with ‘H Gi) To adda new cok in sary table. Te column name is Total Sl (ie) To store the corresponding values in the Total Sal column. (0) Selet maxBasic) from Salary where Bonus > 4 (©) Selet count) from Employee group by Sex (oi). Selet Distinct Depa from Employee 14. With reference to following lations PERSONAL. andJOB answer the questions tat allow: Create flowing tbls such that Enpro and Sr are not nll and unique, dat of bith a 12 Jan 1960, names never lank, Are and Nati places vali, epi not empty, is between 4000 and 10000 ble : Personal Gao Name Dobirth _Nativeplace Hob 123 | Amit 23Jani965_| Delhi a7 | Mano) i2-dec1976_| Mumbai wa Abhi ii-augts7s | Allahabad 125 obapeiv77 | Delt 10-mari974 | Mumbai 2onise1 | Punems 25,en-2006 zadec2006 | 6000 19-24g.2007 apr 2004 Pore | 3-mar-2006 | 7500 | 13:mar2028 | sales ‘rame and salary of those who have Sports as hobby. fame of the eldest employee. trumber of employee area wise snow youngest employes fom each Native place 1 ow Sa, Nene, Hoby and Salary in descending order of Sry how the hobbies of those whose name pronounces 28 “AbhAY’ tppoinomen date and naive place of hose whose rae tat with Ao ends n't expense with suitable column heading of hose who shal ete alter 2ja2008 1 adionl bade onthe ompary incase slay of employes having oth 0 sports is increased by 10%. 9 Show the hobby of which ‘ere are 2 or more employees smn how many employee sal re today anima length of trie 29 Yur. rms caployer name and cate fbi who have served more hn 17 yea on ae (o) ew panes ofthowe who ear more than all ofthe employes of Sales dep Boe aig ofthe employens by 5 cf ni preset salary wit bby 8 Masco hey Mave complete atleast 3 years of service (Wate the output of (@ Select distinct hobby from personal (Select ava(elay) from personal (Age/Deli) {i Setet count distinct Native_plae) from personal {h) Sct nace, manasa) from Persona, Job where PersonaLEmpro «Joh S00 "(9 Add new tuple in the table Personal esenialy with hobby a» Musi | “Tae neve column email in Jb table "© Crate a able with aes of chun emp ame, and hoBy- 1 Cie view of Penal and Job deta of thew who hae ered the records of employes from Jb table whose hab Isnt Sports the table Personal. fob where PersalEmpno = JobSoo and Area in Jess than 15 yearsD 618 COMPUTER SCIENCE WITH PHN - 15. With reference tothe table below, answer the questions that follow ‘Table : Employees Empl Firstname Addeess «iy [ono | Ravi | Kumar | Ra agar ca 105 | ary | Wattor | Gandhi nagar | Gz8 1 | sam Tones | 33 Bim St Pais m5 | Swab | Ackerman [40US. 110 | Upton ae | Manila | Sengupn | 24 Finds sect | New Deli Robert | Samuel __| 9 Fifth Cross_| Washington 335 | Ri Tondon _| Shastri Nagar | _GZB 400 | Rachel | tee 121 Hanson St | New York | 441 Peter: Thompson | 11 Red Road Paris 7 32000 7500 “1 23000 Wit the SQL commands or the fileing wing abo ables ( To show firstname, lasmame, address and city ofall employees living in Pairs To dpe cto El en dacocing clr ef Pomme “To display the fsiname, lastname and total ilar of all manager from the ables f she loal lary lo tAladad Soy + aa ee ‘he maximum salary among managers and clerks from the table619 & [groUrIvG RECORDS, JONS IN SAL salary forall departments with more than 3 people for a = ay te joe with maximum salary greater than or ea 6 300 i Hy ber of employes having “Manage” Job rma ot employees grouped by depino, (able EMPL) salaries grouped by department. (able EMPL) salary of employee grouped by their department number arts and Orders given in soloed problems. of customers’ orders grouped by custome (id) ae pm of al of order grouped by conc ad Se. Bah cate (Came nd he al emount ofl er orders em UPL De Slagrade The Ep ble as ley en ted carcass trade and Dept are being shown Below: auanvorede (Lowsal, Highsal, Grade) apt (Oeptno, DeptNane, Location) uetions 25 and 26 om the basi of hee tables: the department mares and the umber of heir employes ® [atte employee names and the name of their departrents
You might also like
SQL Part1 (Basics)
PDF
No ratings yet
SQL Part1 (Basics)
6 pages
SQL All Assingment Answer
PDF
No ratings yet
SQL All Assingment Answer
33 pages
SQL Assignment
PDF
No ratings yet
SQL Assignment
3 pages
Grade 12 CS - Term 1-Self Test-2-28-04-2024
PDF
No ratings yet
Grade 12 CS - Term 1-Self Test-2-28-04-2024
5 pages
SQL Solutions
PDF
No ratings yet
SQL Solutions
3 pages
50+SQL - Interview Questions and Answers
PDF
No ratings yet
50+SQL - Interview Questions and Answers
8 pages
CLASS 12 COMPUTER SCIENCE PRACTICAL FILE 2023 24 - Extracted
PDF
No ratings yet
CLASS 12 COMPUTER SCIENCE PRACTICAL FILE 2023 24 - Extracted
7 pages
Dbms Ass (12.03.25)
PDF
No ratings yet
Dbms Ass (12.03.25)
20 pages
Creating Database
PDF
No ratings yet
Creating Database
52 pages
Database Code
PDF
No ratings yet
Database Code
11 pages
SQL Interview Queries Reference
PDF
No ratings yet
SQL Interview Queries Reference
6 pages
Dbms SQL
PDF
No ratings yet
Dbms SQL
34 pages
DBMS 3b (Employee Department Location)
PDF
No ratings yet
DBMS 3b (Employee Department Location)
9 pages
Honey Choudhary Mysql CH 14
PDF
No ratings yet
Honey Choudhary Mysql CH 14
65 pages
TCS Data Analyst Interview Questions
PDF
No ratings yet
TCS Data Analyst Interview Questions
8 pages
DBMSSRGC Employee
PDF
No ratings yet
DBMSSRGC Employee
7 pages
Week 6
PDF
No ratings yet
Week 6
29 pages
Databasetechlecture 9
PDF
No ratings yet
Databasetechlecture 9
10 pages
SQL Cheat Sheet
PDF
No ratings yet
SQL Cheat Sheet
22 pages
DBMS - Reference For Placement
PDF
No ratings yet
DBMS - Reference For Placement
7 pages
Dbms Assignment
PDF
No ratings yet
Dbms Assignment
73 pages
KPMG Data Analyst Interview Questions
PDF
No ratings yet
KPMG Data Analyst Interview Questions
30 pages
Assignment 7.
PDF
No ratings yet
Assignment 7.
16 pages
Database Systems Practical 4 SQL Select Command/ Aggregate Functions
PDF
No ratings yet
Database Systems Practical 4 SQL Select Command/ Aggregate Functions
6 pages
SQLL
PDF
No ratings yet
SQLL
9 pages
SQL Practice
PDF
No ratings yet
SQL Practice
7 pages
Problem
PDF
No ratings yet
Problem
5 pages
Adobe Scan 08-Dec-2023
PDF
No ratings yet
Adobe Scan 08-Dec-2023
7 pages
Class 12 SQLSQLSQLSQLSQL
PDF
No ratings yet
Class 12 SQLSQLSQLSQLSQL
4 pages
DBMS LAB Assignment 1new
PDF
No ratings yet
DBMS LAB Assignment 1new
12 pages
Practice 3,4 v5
PDF
No ratings yet
Practice 3,4 v5
6 pages
Biomolecules Notes Updated
PDF
No ratings yet
Biomolecules Notes Updated
25 pages
DBMS Lab 8
PDF
No ratings yet
DBMS Lab 8
3 pages
S Q L - Notes
PDF
78% (9)
S Q L - Notes
25 pages
SQL Interview Questions Top 100
PDF
No ratings yet
SQL Interview Questions Top 100
18 pages
CBSE and All State Physics Final (360) With
PDF
100% (1)
CBSE and All State Physics Final (360) With
363 pages
SQL Commands: Unit 3 Database Management
PDF
No ratings yet
SQL Commands: Unit 3 Database Management
17 pages
Databse 4-5
PDF
No ratings yet
Databse 4-5
6 pages
SQL Queries For Practice PDF
PDF
No ratings yet
SQL Queries For Practice PDF
6 pages
All Assignments
PDF
No ratings yet
All Assignments
104 pages
Abir Chakraborty - 22312204
PDF
No ratings yet
Abir Chakraborty - 22312204
26 pages
GOC Sheet 2
PDF
No ratings yet
GOC Sheet 2
10 pages
I. Schemas Table 1: STUDIES
PDF
No ratings yet
I. Schemas Table 1: STUDIES
4 pages
DBMS Lab 07 04112020 012905pm
PDF
No ratings yet
DBMS Lab 07 04112020 012905pm
6 pages
SQL Questions
PDF
No ratings yet
SQL Questions
19 pages
Waveoptics
PDF
No ratings yet
Waveoptics
12 pages
Date:20/05/2020 (Wed)
PDF
No ratings yet
Date:20/05/2020 (Wed)
4 pages
C12 Cs SqlConnectPython Notes
PDF
No ratings yet
C12 Cs SqlConnectPython Notes
7 pages
6 Mark Questions
PDF
No ratings yet
6 Mark Questions
10 pages
Data Manipulation Language
PDF
No ratings yet
Data Manipulation Language
48 pages
Tutorial 2 & 3 Update
PDF
No ratings yet
Tutorial 2 & 3 Update
29 pages
SQL Queries
PDF
No ratings yet
SQL Queries
7 pages
Select First - Name "First Name", Last - Name "Last Name" From Employees Limit 20
PDF
No ratings yet
Select First - Name "First Name", Last - Name "Last Name" From Employees Limit 20
14 pages
Home Assignment - Week 11 (DB SQL) : 0. Student Grades (Warm-Up)
PDF
No ratings yet
Home Assignment - Week 11 (DB SQL) : 0. Student Grades (Warm-Up)
14 pages
60SQLQuery Answers
PDF
No ratings yet
60SQLQuery Answers
7 pages
18bit0166 Ayush Kanaujia
PDF
No ratings yet
18bit0166 Ayush Kanaujia
12 pages
SQL Queries
PDF
No ratings yet
SQL Queries
9 pages
Case-Study Solution
PDF
No ratings yet
Case-Study Solution
4 pages
3.how Can I Retrive All Records of Emp1 Those Should Not Present in Emp2?
PDF
No ratings yet
3.how Can I Retrive All Records of Emp1 Those Should Not Present in Emp2?
6 pages
Practices With Solutions
PDF
No ratings yet
Practices With Solutions
5 pages
SQL Queries: Create The Following Tables
PDF
No ratings yet
SQL Queries: Create The Following Tables
7 pages
SQL Examples
PDF
No ratings yet
SQL Examples
10 pages
SQLQUERI
PDF
No ratings yet
SQLQUERI
8 pages