Please write a query for each Thanks Consider the following

Please write a query for each! Thanks!

Consider the following tables where keys are underlined: signup(userid. day, password, in, out), userfuserid, name, salary), day\'s domain is {\'Monday\', \'tuesday\', \'Wednesday\', \'thursday\', \'Friday, \'saturday\', \'sunday\'}, and the domain of in and out is {\'Yes\', \'No\'}. Formulate a relational algebra expression for each query in the following. Return the names of all users who signed in on Monday. Return the names of those users who signed in every day except Monday. Return the names of those users who signed in but didn\'t sign out on Friday. Return the names of all users who signed in on Monday and then signed out on Friday. Return the names of all users who worked exactly for two days in a row (signed in on one day and then signed out the next day). Based on the above tables, formulate a SQL statement for each query in the following. Delete those users who never signed in from Monday to Friday. Increase the user\'s salary by 10% if she signed in and signed out every day from Monday to Friday. Return the names of the users and the days on which the users signed in but didn\'t sign out. Increase the user\'s salary by 20% if the user is the only user who signed in on a particular day (no other people signed in on that day). Return the names of a pair of users (u1, u2) who have exactly the same pattern: a user ul signed in or signed out on a particular day if and only if the other u2 do so as well.

Solution

assume:

Userid is a primary key for signup table and foreign key for user table.

a] select (*name from user

and *userid from signup where day like \'monday\')

signup
userid day pwd in out
89514 mon **** yes yes
24632 mon **** yes no
50196 mon **** no yes
user
userid name salary
89514 siva 2500
24632 chinmay 4500
50196 pratap 1500
Please write a query for each! Thanks! Consider the following tables where keys are underlined: signup(userid. day, password, in, out), userfuserid, name, salar

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site