uk
Feedback
CBSE COMPUTER SCIENCE

CBSE COMPUTER SCIENCE

Відкрити в Telegram

QUESTION BANK, REFERENCE BOOK, LAB MANUAL , WORKSHEET ETC., PYTHON TEXT BOOK AND REFERENCE BOOKS, 01. ASK QUESTIONS AT https://t.me/joinchat/FJ1noGs-64I0OWI1

Показати більше
549
Підписники
Немає даних24 години
Немає даних7 днів
Немає даних30 день
Архів дописів
photo content

Do it yourself... If you have any doubt ask Me...

What is the output for the above?

NOTE DOJ refers to Date of Joining and DOB refers to Date of Birth of employees. (i) To display ENO, NAME, GENDER from the table EMPLOYEE in ascending order of ENO. (ii) To display the NAME of all the MALE employees from the table EMPLOYEE. (iii) To display the ENO and NAME of those employees from the table EMPLOYEE who are born between ‘1987-01-01’ and ‘1991-12-01’. (iv) To count and display FEMALE employees who have joined after ‘1986-01-01’. (v) SELECT COUNT (*), DC0DE FROM EMPLOYEE GROUP BY DCODE HAVING C0UNT(*)>1; (vi) SELECT DISTINCT DEPARTMENT FROM DEPT; (vii) SELECT NAME, DEPARTMENT FROM EMPLOYEE E.DEPT D WHERE E.DCODE = D.DCODE AND ENO<1003; (viii) SELECT MAX(DOJ),MIN(DOB)FROM EMPLOYEE;

photo content

17. Consider the following DEPT and EMPLOYEE tables. Write SQL queries for (i) to (iv) and find outputs for SQL queries (v) to (viii).

What is the answer for the above?

(i) To display NO, NAME, TDATE from the table TRAVEL in descending order of NO. (ii) To display the NAME of all the travellers from the table TRAVEL who are travelling by vehicle with code 101 or 102. ‘ (iii) To display the NO and NAME of those travellers from the table TRAVEL who travelled between ’2015-12-31’ and ‘2015-04-01’. (iv) To display all the details from table TRAVEL for the travellers, who have travelled distance more than 100 KM in ascending order of NOP. (v) SELECT COUNT(*), CODE FROM TRAVEL GROUP BY CODE HAVING C0UNT(*) >1; (vi) SELECT DISTINCT CODE FROM TRAVEL; (vii) SELECT CODE,NAME,VTYPE FROM TRAVEL A, VEHICLE B WHERE A.C0DE=B.C0DE AND KM<90; (viii) SELECT NAME,KM*PERKM FROM TRAVEL A, VEHICLE B WHERE A.C0DE=B.C0DE AND A.C0DE='105' ;

photo content

photo content

As Per Revised Syllabus 2020-21 : http://python.mykvs.in/presentation.php

MORE ON SQL - IMPORTANT QUESTION BANK