-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsql.sql
More file actions
43 lines (35 loc) · 1.32 KB
/
sql.sql
File metadata and controls
43 lines (35 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/* Count the number of identities(Aadhaar) generated by each Registrar and list Top 3 */
SELECT COUNT(*),Registrar FROM Test GROUP BY Registrar ORDER BY COUNT(*) DESC
/* TOP 3:
a) CSC e-Governance Services India Limited: 2,09,771
b) NSDL e-Governance Infrastructure Limited: 54,214
c) DENA BANK: 33,869
*/
/* Count the number of identities(Aadhaar) generated by each Enrollment Agency and list Top 3 */
SELECT COUNT(*),EnrolmentAgency FROM Test GROUP BY EnrolmentAgency ORDER BY COUNT(*) DESC
/* TOP 3:
a) CSC SPV: 1,00,357
b) SRM Education And Social Welfare Society: 18,101
c) SREI INFRASTRUCTURE FINANCES L: 16,972
*/
/* Count the number of Male, Female and UnDeclared Entries */
SELECT COUNT(*), Gender FROM Test GROUP BY Gender ORDER BY COUNT(*) DESC
/* Count:
a) Male: 2,92,798
b) Female: 1,48,013
c) UnDeclared: 7
*/
/* Count the number of identities(Aadhaar) generated in each state and list Top 3 */
SELECT COUNT(*),State FROM Test GROUP BY State ORDER BY COUNT(*) DESC
/* TOP 3:
a) Bihar: 81,776
b) Uttar Pradesh: 69,476
c) West Bengal: 60,485
*/
/* Top 3 districts with maximum identities generated for both Male and Female */
SELECT COUNT(*), District FROM Test GROUP BY District ORDER BY COUNT(*) DESC
/* TOP 3:
a) Barddhaman: 7,135
b) North 24 Parganas: 6,894
c) South 24 Parganas: 6,078
*/