You are on page 1of 1

Write queries and output of the following question

1)write query toi create hospital table with nmo. As primary key

2) insert values into the table

3)write a query to display all information about cardiology dept

4) list the names of the doctors in the ascendfimg order of doj

5) list names of female doctors who are in orthopodic dept

6)display doctors name,charges of male doctors

7)count no. of doctors whose age>30

8)display the name of doctor whose name ends with a

9)display dept and total charges given to each dept

10) display count of distinct dept

11) display distinct dept in the table hospital

12) display min doj and max doj of doctors

13)display year of newly joined doctor

14)display year of old doctor in the hospital

15) display the name and dept of doctors whose dept contain nuclear medicine

16)count no. of male and female employees

17) display todays date

18) display the first 5 characters of department

19)display max charges given to each gender

20) display minimum charges given to each dept whose min charge>300

21) display total charges given to each gender whose total charge>500

22)display name and age of doctors who joined in the month September

23)display name of doctor whose name contains at least 5 elemnets

24)display average charges given to each department where avg charges>200

25)display age of female doctors whose dept is either orthopedia or ent or cardiology

26)display the charges increased by 10% for surgery dept as modified charge

27) display charges reduced by 5% for cardiac doctors

28) display the max and min age in reln

DATABASE CONNECTIVITY

You might also like