-
Notifications
You must be signed in to change notification settings - Fork 0
/
GENERAL-QUERIES.sql
109 lines (97 loc) · 1.1 KB
/
GENERAL-QUERIES.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
--Q3--
ALTER TABLE
Service
MODIFY
NomServ VARCHAR2(16);
--Q4--
SELECT
NomP,
NumP
FROM
Personne
WHERE
NumServP IN (20, 30);
--Q5--
SELECT
NomServ
FROM
Service
WHERE
locServ = 'TUNIS';
--Q6--
SELECT
NumResProj
from
Projet;
--Q7--
SELECT
NomP,
SalaireP
from
Personne
WHERE
SalaireP BETWEEN 500
AND 1500;
--Q8--
SELECT
NomP
from
Personne
WHERE
NumServP = 10
and PosteP IN ('DIRECTEUR', 'SECRETAIRE');
--Q9--
SELECT
NomP
from
Personne
WHERE
NumServP NOT IN (10, 20, 60);
--Q10--
SELECT
NomP,
PosteP,
SalaireP
from
Personne
ORDER BY
PosteP,
SalaireP DESC;
--Q11--
SELECT
COUNT(DISTINCT NumREsProj)
FROM
Projet;
--Q12--
SELECT
MAX(SalaireP)
FROM
Personne
WHERE
PosteP = 'INGENIEUR';
--Q13--
SELECT
AVG(SalaireP)
from
Personne
WHERE
PosteP = 'SECRETAIRE';
--Q14--
SELECT
NomP
FROM
Personne
WHERE
DateEmbP =(
SELECT
MIN(DateEmbP)
FROM
Personne
);
--Q15--
SELECT
NomP
from
Personne
WHERE
NomP LIKE '_E%M';