-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlis.session.sql
More file actions
184 lines (163 loc) · 2.24 KB
/
lis.session.sql
File metadata and controls
184 lines (163 loc) · 2.24 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
select
title
from
book_catalogue,
book_authors
WHERE
book_catalogue.isbn_no = book_authors.isbn_no
and book_authors.author_fname = 'Joh Paul'
and book_authors.author_lname = 'Mueller';
select
*
from
book_authors;
SELECT
title
from
book_catalogue
WHERE
publisher = 'McGraw Hill Education';
SELECT
students.student_fname,
students.student_lname
from
members,
students
where
members.roll_no = students.roll_no
and member_type = 'PG';
select
author_fname,
author_lname
from
book_authors
WHERE
author_fname like '_';
SELECT
title,
publisher
from
book_catalogue
where
year != 2015
and year != 2017;
select
student_fname,
student_lname
from
students
where
dob BETWEEN '2002-05-01' and '2002-05-31'
or dob BETWEEN '2003-05-01' and '2003-05-31';
select
count(*) as total_member
from
members
where
member_type = 'UG';
SELECT
department_code,
count(*)
from
students
where
gender = 'F'
GROUP BY
department_code;
SELECT
author_fname,
author_lname
from
book_authors
where
author_fname like '_';
select
title,
publisher
from
book_catalogue
where
year != 2015
AND year != 2017;
SELECT
student_fname,
student_lname
from
students
where
dob BETWEEN '2002-05-01' and '2002-05-31'
or dob BETWEEN '2003-05-01' and '2003-05-31';
SELECT
count(*) as total_members
from
members
where
member_type = 'UG';
SELECT
department_code,
count(department_code)
from
students
WHERE
gender = 'F'
GROUP BY
department_code;
select
title
from
book_catalogue
WHERE
year = 2015;
SELECT
*
from
book_catalogue;
SELECT
*
from
students
natural join departments;
select
department_name
FROM
students
natural join departments
where
student_fname = 'Gita'
and student_lname = 'Das';
SELECT
roll_no
from
students
natural join departments
where
gender = 'M'
and department_building = 'Block_2';
SELECT
student_fname,
student_lname,
roll_no
from
students
natural join departments
where
department_building = 'Block_1';
SELECT
*
from
members
where
member_no not in (
select
member_no
FROM
book_issue
);
select
doi
from
book_issue
natural join book_copies
natural join book_catalogue
where
title = 'Learning with Python';