FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
java-interview-coding/sql/07.sql at master · andrei-punko/java-interview-coding · GitHub
andrei-punko
/
java-interview-coding
Public
Notifications
You must be signed in to change notification settings
Fork
19
Star
70
Code
Issues
0
Pull requests
0
Discussions
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
java-interview-coding
/
sql
/
07.sql
Copy path
More file actions
More file actions
Latest commit
History
History
History
20 lines (15 loc) · 722 Bytes
Breadcrumbs
java-interview-coding
/
sql
/
07.sql
Copy path
File metadata and controls
20 lines (15 loc) · 722 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--
07. Написать (разными способами) запрос, который выведет уникальные значения данного столбца
create
table
students
(
ID
int
primary key
,
NAME
varchar
(
255
)
not null
);
insert into
students (ID, NAME)
values
(
1
,
'
Andrei
'
);
insert into
students (ID, NAME)
values
(
2
,
'
Yulia
'
);
insert into
students (ID, NAME)
values
(
3
,
'
Tatiana
'
);
insert into
students (ID, NAME)
values
(
4
,
'
Andrei
'
);
insert into
students (ID, NAME)
values
(
5
,
'
Elena
'
);
insert into
students (ID, NAME)
values
(
6
,
'
Tatiana
'
);
--
1й способ:
select distinct
name
from
students;
--
2й способ:
select
name
from
students
group by
name;
Back
|
FazBrowse Home
|
New Git URL