

The required query is: Select * from Worker order by FIRST_NAME asc Q-12. Write an SQL query to print all Worker details from the Worker table order by FIRST_NAME Ascending. The required query is: Select CONCAT(FIRST_NAME, ' ', LAST_NAME) AS 'COMPLETE_NAME' from Worker Q-11. Write an SQL query to print the FIRST_NAME and LAST_NAME from the Worker table into a single column COMPLETE_NAME. The required query is: Select REPLACE(FIRST_NAME,'a','A') from Worker Q-10. Write an SQL query to print the FIRST_NAME from the Worker table after replacing ‘a’ with ‘A’. The required query is: Select distinct length(DEPARTMENT) from Worker Q-9. Write an SQL query that fetches the unique values of DEPARTMENT from the Worker table and prints its length. The required query is: Select LTRIM(DEPARTMENT) from Worker Q-8. Write an SQL query to print the DEPARTMENT from the Worker table after removing white spaces from the left side. The required query is: Select RTRIM(FIRST_NAME) from Worker Q-7. Write an SQL query to print the FIRST_NAME from the Worker table after removing white spaces from the right side. Using the BINARY operator will make INSTR work as the case-sensitive function.The INSTR does a case-insensitive search.The required query is: Select INSTR(FIRST_NAME, BINARY'a') from Worker where FIRST_NAME = 'Amitabh' Write an SQL query to find the position of the alphabet (‘a’) in the first name column ‘Amitabh’ from the Worker table.

The required query is: Select substring(FIRST_NAME,1,3) from Worker Q-5. Write an SQL query to print the first three characters of FIRST_NAME from the Worker table. The required query is: Select distinct DEPARTMENT from Worker Q-4. Write an SQL query to fetch unique values of DEPARTMENT from the Worker table. The required query is: Select upper(FIRST_NAME) from Worker Q-3. Write an SQL query to fetch “FIRST_NAME” from the Worker table in upper case. The required query is: Select FIRST_NAME AS WORKER_NAME from Worker Q-2. Write an SQL query to fetch “FIRST_NAME” from the Worker table using the alias name. Practice with 50 challenging SQL query questions. Creating Sample Data to Practice SQL Skill. Once the above SQL would run, you’ll see a result similar to the one attached below. (WORKER_REF_ID, WORKER_TITLE, AFFECTED_FROM) VALUES (WORKER_REF_ID, BONUS_AMOUNT, BONUS_DATE) VALUES (WORKER_ID, FIRST_NAME, LAST_NAME, SALARY, JOINING_DATE, DEPARTMENT) VALUES

WORKER_ID INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
#Mysql workbench 6.3 install
You can also download these tools and install them to execute the SQL queries. We’ve tested them with MySQL Server 5.7 and MySQL Workbench 6.3.8 query browser. To prepare the sample data, you can run the following queries in your database query executor or on the SQL command line.
