Posts

Showing posts with the label Practice Query

MySQL Exercise

Image
 SECTION 2nd. Restricting and Sorting data            So here is the second section of the exercise  In this section, we are going to solve some little bit of difficult queries, So without further ado let's start the section. I have already given the HR database link in the previous section if you are new here then go to the previous section and download the HR demo database. solve all the queries on your own, because practice makes perfect... 1. Write a query to display the name (first_name, last_name) and salary for all employees whose salary is not in the range $10,000 through $15,000. 2. Write a query to display the name (first_name, last_name) and department ID of all employees in departments 30 or 100 in ascending order. 3. Write a query to display the name (first_name, last_name) and salary for all employees whose salary is not in the range $10,000 through $15,000 and are in department 30 or 100. 4. Write a query to display the name...

MySQL Exercise

Image
SECTION 1st. Intro :-                     Hi guys, It's Patel Asif Khan, And welcome to Study Center, So here are some of the Demo databases and some of the exercise question that will make you perfect in MySQL query In the last you can also download the .sql script of my solutions but first try your self first and then see the solution. So are you ready, I think so. First, download the DEMO HR database we are going to do all the exercises on this HR database. Structure:-       Before working on any database first we have to understand its structure and relationships, so first study the database and relationships between all the tables. There are 7 tables are in the HR database 1)regions 2)countries 3)locations 4)departments 5)job_history 6)jobs 7)employees  all are connected with a foreign keys constraint, and you can understand the relationship between these tables by the above image.   👉  Dow...