-
how to list 10 sufficient employee in sql ?
How can I answer this question in SQL?
"List of 10 sufficient employees in X corporation".
car(price, manufactor.id, color, createdbyid, creationdate),
manufactor(name, id),
employee(id, name, salary)
-
What do you mean by sufficient employee?
-
the employees with lower salary than others and who have created more cars than others(createdbyid)
-
Based on tables you have listed, I don't see any relation between employee and car.
-
Hi all.
Can you pls explain detail about sql
**Links removed by Site Administrator so it doesn't look like you're spamming us. Please don't post them again.**
-
To list the top 10 employees in SQL, you can use a SELECT statement with an ORDER BY clause and a LIMIT clause. The ORDER BY clause is used to sort the results based on a specific column, and the LIMIT clause is used to limit the number of rows returned.
Here is an example of how you can list the top 10 employees based on their salary:
SELECT * FROM employees
ORDER BY salary DESC
LIMIT 10;
This will return the top 10 employees with the highest salary.
-
lower salary AND more cars? Which has priority? Sort by number of cars then by salary and limit to 10?
Build an aggregate query that counts cars by employee then join that query to employee table. Do sort and limit in that query.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|