Skip to content

Commit 58d6fad

Browse files
authored
Pull Request For Draft Under Review (#365)
* Create direct-sub-query.sql * Create using-concat.sql * Create using-two-columns-mysql.sql * Create count-distinct-national-id.sql * Create count-distinct-position.sql
1 parent ecf149a commit 58d6fad

File tree

5 files changed

+13
-0
lines changed

5 files changed

+13
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
SELECT COUNT(DISTINCT national_id)
2+
FROM Faculty;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
SELECT COUNT(DISTINCT position)
2+
FROM Faculty;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
SELECT COUNT(*)
2+
FROM (
3+
SELECT DISTINCT national_id, position
4+
FROM Faculty
5+
) AS subQuery;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
SELECT COUNT(DISTINCT CONCAT(national_id, position))
2+
FROM Faculty;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
SELECT COUNT(DISTINCT national_id, position)
2+
FROM Faculty;

0 commit comments

Comments
 (0)