Basic Select
Last updated
Was this helpful?
Last updated
Was this helpful?
The STUDENTS table is described as follows:
The Name column only contains uppercase (A
-Z
) and lowercase (a
-z
) letters.
Query the Name of any student in STUDENTS who scored higher than Marks. Order your output by the last three characters of each name. If two or more students both have names ending in the same last three characters (i.e.: Bobby, Robby, etc.), secondary sort them by ascending ID.
Oracle์์ ์ฌ์ฉํ ์ ์๋ SUBSTR ํจ์์ ๋ํ ์ฌ์ฉ๋ฒ
SUBSTR(๋ฌธ์์ด, ์์์์น) : ์์ ๊ธฐ์ค์ผ๋ก ์์์์น๋ถํฐ ๋๊น์ง ์๋ฅด๊ธฐ
SUBSTR(๋ฌธ์์ด, ์์์์น, ๊ธธ์ด) : ์์ ๊ธฐ์ค์ผ๋ก ์์์์น๋ถํฐ ๊ธธ์ด๋งํผ ์๋ฅด๊ธฐ
SUBSTR(๋ฌธ์์ด, ์์์์น(์์)) : ๋ค๋ฅผ ๊ธฐ์ค์ผ๋ก ์์์์น๋ถํฐ ๋๊น์ง ์๋ฅด๊ธฐ
SUBSTR(๋ฌธ์์ด, ์์์์น(์์), ๊ธธ์ด) : ๋ค๋ฅผ ๊ธฐ์ค์ผ๋ก ์์์์น๋ถํฐ ๊ธธ์ด๋งํผ ์๋ฅด๊ธฐ
Write a query that prints a list of employee names (i.e.: the name attribute) from the Employee table in alphabetical order.
Input Format
The Employee table containing employee data for a company is described as follows:
where employee_id is an employee's ID number, name is their name, months is the total number of months they've been working for the company, and salary is their monthly salary.
๋ค....
Write a query that prints a list of employee names (i.e.: the name attribute) for employees in Employee having a salary greater than 2000$ per month who have been employees for less than 10 months. Sort your result by ascending employee_id.
GOOD!