Please write a query statement from emp table to display ename, sal, and sal_star for all employees. Each astetrisk is signified by a one-hundred dollars. For example, Mary's sal is 1500, the sal_star data is 3 asterisks. Sort the data in an descending order of sal_star. Label the column headingto ENAME and SAL_STAR.
SQL
SQL stands for Structured Query Language, is a form of communication that uses queries structured in a specific format to store, manage & retrieve data from a relational database.
Queries
A query is a type of computer programming language that is used to retrieve data from a database. Databases are useful in a variety of ways. They enable the retrieval of records or parts of records, as well as the performance of various calculations prior to displaying the results. A search query is one type of query that many people perform several times per day. A search query is executed every time you use a search engine to find something. When you press the Enter key, the keywords are sent to the search engine, where they are processed by an algorithm that retrieves related results from the search index. Your query's results are displayed on a search engine results page, or SER.
Q1. Please write a query statement from emp table to display ename, sal, and sal_star for all employees. Each astetrisk is signified by a one-hundred dollars. For example, Mary's sal is 1500, the sal_star data is 3 asterisks. Sort the data in an descending order of sal_star. Label the column headingto ENAME and SAL_STAR. The result should be like below:
[image below]
Material to answer the question above:
Material:
- https://drive.google.com/file/d/14OwWDIybjAIeuHCO7McupV08gJs9nB-8/view?usp=sharing
- https://drive.google.com/file/d/1npRH8JoJ6GYBzPU3iNjLXluvCyhr2tMu/view?usp=sharing
![[Execute your Query]
SQL> SELECT ename, sal, .
FROM emp
ORDER BY ...;
ENAME
SAL SAL_STAR
SMITH
800 ******
JAMES
950 **
ADAMS
1100 *****
WARD
1250 *****
MARTIN
1250 ******
MILLER
1300 ****>
TURNER
1500 ****:
ALLEN
1600
CLARK
2450 ******
BLAKE
2850 ****>
JONES
2975 ****>
FORD
3000 ****
SCOTT
3000 ******
ΚING
5000 ******](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fdc587c31-a247-493d-b2ae-563348ff8a62%2Fb5f00f57-4cd4-49ff-9ad7-aae9bf9f8549%2Fitajkrc_processed.png&w=3840&q=75)

Trending now
This is a popular solution!
Step by step
Solved in 2 steps









