Assignment Part2 DML
Assignment Part2 DML
-------------------------------------------------------------------------
2. The grading of students based on the marks they have obtained is done
as follows
-----------------------------------------------------------------------
3. Get a list of city names from station with even ID numbers only.
Exclude duplicates from your answer.[table: station]
4. Find the difference between the total number of city entries in the
table and the number of distinct city entries in the table. In other
words, if N is the number of city entries in station, and N1 is the
number of distinct city names in station, write a query to find the value
of N-N1 from station.[table: station]
8. 12. How much money does the company spend every month on salaries for
each department? [table: emp]
Expected Result:
+-------------+--------+
| sum(salary) | deptno |
+-------------+--------+
| 30700.00 | 10 |
| 13600.00 | 20 |
| 2600.00 | 30 |
+-------------+--------+
9. How many cities in the CITY table have a Population larger than
100000. [table: city]
-------------------------------------------------------------------
10. What is the total population of California? [table: city]
Expected Result:
+-------------+-----------------+
| countrycode | avg(population) |
+-------------+-----------------+
| JPN | 175839.2000 |
| NLD | 593321.0000 |
| USA | 120225.8750 |
+-------------+-----------------+