AdventureWorks Database: Find number of unique titles that employees can hold
SQL Query - AdventureWorks: Exercise-90 with Solution
90. From the following table write a query in SQL to return the number of different titles that employees can hold.
Sample table: HumanResources.Employee
Sample Solution:
SELECT COUNT(DISTINCT jobTitle) as "Number of Jobtitles"
FROM HumanResources.Employee;
Sample Output:
Number of Jobtitles| -------------------+ 67|
SQL AdventureWorks Editor:
Practice Online
Contribute your code and comments through Disqus.
Previous: Compute moving average of yearly sales for all sales territories.
Next: Find the total number of employees.
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.
SQL: Tips of the Day
How to select date without time in SQL?
select convert(varchar(10), '2011-02-25 21:17:33.933', 120)
120 here tells the convert function that we pass the input date in the following format: yyyy-mm-dd hh:mi:ss.
Ref : https://bit.ly/3SSoTvQ
- Weekly Trends
- Java Basic Programming Exercises
- SQL Subqueries
- Adventureworks Database Exercises
- C# Sharp Basic Exercises
- SQL COUNT() with distinct
- JavaScript String Exercises
- JavaScript HTML Form Validation
- Java Collection Exercises
- SQL COUNT() function
- SQL Inner Join
- JavaScript functions Exercises
- Python Tutorial
- Python Array Exercises
- SQL Cross Join
- C# Sharp Array Exercises