This document contains two SQL exercises with multiple queries using operators like SELECT, DISTINCT, ORDER BY, WHERE, AND. The first exercise queries various tables like role, skill, higher_degree, profile, experience, users, project, and event. The second exercise queries tables like department, profile, experience, post, and query.
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
93 views
SQL Operators
This document contains two SQL exercises with multiple queries using operators like SELECT, DISTINCT, ORDER BY, WHERE, AND. The first exercise queries various tables like role, skill, higher_degree, profile, experience, users, project, and event. The second exercise queries tables like department, profile, experience, post, and query.
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2
SQL Operators & Logical Operators
Additional Practice Fisrt exercise
1. select * from role order by name asc;
2. select name,description from skill order by name asc; 3. select distinct university_name from higher_degree order by university_name asc; 4. select distinct designation from profile order by designation asc; 5. select distinct designation from profile where gender = 'Male' order by designation asc; 6. select distinct company_name from experience order by company_name asc; 7. select name,emailid,phonenumber from users order by name asc; 8. select username, password from users where name = 'Ram'; 9. select name,short_description from project where number_of_members >10 order by name asc; 10. select name from event where to_char(event_date,'dd/mm/yy')='27/01/14' order by name asc;
SQL Operators & Logical Operators
Additional Practice Second exercise select name from department order by name asc;
1. select name from department order by name asc;
2. select distinct batch from profile where designation = 'Project Manager' order by batch; 3. select distinct(designation) from profile where gender='Female' and batch =2008 order by designation; 4.select distinct(company_name) from experience where current_company =1 order by company_name desc; 5.select content from post order by post_date desc; 6. select content from post where to_char(post_date,'mm/yy') = '01/14' order by post_date desc; 7. select content from query where to_char(query_date,'yy')='13' order by query_date desc;