Database || Old paper solution 2016

4th semester

 
5





16.

a) insert into users(‘Ram’, ‘12345’, ‘[email protected]’, ‘2002-01-01’, ‘m’, curdate());
b)SELECT * from users
where dateOfBirth < ‘2000-01-01’;
c) select categoryName from categories where categoryID not in (select categoryID from expenses));
d)select username from users where in(select userID from expenses where amount < (select amount from expenses where userID = 405)));
8