Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
projet_nf17_p19_tdg1_groupe2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gaetan Carabetta
projet_nf17_p19_tdg1_groupe2
Commits
be91b7c5
Commit
be91b7c5
authored
Jun 19, 2019
by
Gaetan Carabetta
Browse files
Options
Browse Files
Download
Plain Diff
update index
parents
44c3d027
6423b4bf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
application/BD/inserts.sql
application/BD/inserts.sql
+3
-3
sql/requetes.sql
sql/requetes.sql
+6
-6
No files found.
application/BD/inserts.sql
View file @
be91b7c5
...
@@ -145,11 +145,11 @@ INSERT INTO traitement (idAnimal,idVeterinaire) VALUES (11,6);
...
@@ -145,11 +145,11 @@ INSERT INTO traitement (idAnimal,idVeterinaire) VALUES (11,6);
INSERT
INTO
traitement
(
idAnimal
,
idVeterinaire
)
VALUES
(
8
,
4
);
INSERT
INTO
traitement
(
idAnimal
,
idVeterinaire
)
VALUES
(
8
,
4
);
INSERT
INTO
traitement
(
idAnimal
,
idVeterinaire
)
VALUES
(
16
,
19
);
INSERT
INTO
traitement
(
idAnimal
,
idVeterinaire
)
VALUES
(
16
,
19
);
INSERT
INTO
traitement
(
idAnimal
,
idVeterinaire
)
VALUES
(
12
,
12
);
INSERT
INTO
traitement
(
idAnimal
,
idVeterinaire
)
VALUES
(
12
,
12
);
INSERT
INTO
traitement
(
idAnimal
,
idVeterinaire
)
VALUES
(
11
,
3
);
INSERT
INTO
traitement
(
idAnimal
,
idVeterinaire
)
VALUES
(
5
,
3
);
INSERT
INTO
traitement
(
idAnimal
,
idVeterinaire
)
VALUES
(
18
,
11
);
INSERT
INTO
traitement
(
idAnimal
,
idVeterinaire
)
VALUES
(
18
,
11
);
INSERT
INTO
traitement
(
idAnimal
,
idVeterinaire
)
VALUES
(
3
,
12
);
INSERT
INTO
traitement
(
idAnimal
,
idVeterinaire
)
VALUES
(
3
,
12
);
INSERT
INTO
traitement
(
idAnimal
,
idVeterinaire
)
VALUES
(
10
,
13
);
INSERT
INTO
traitement
(
idAnimal
,
idVeterinaire
)
VALUES
(
10
,
13
);
INSERT
INTO
traitement
(
idAnimal
,
idVeterinaire
)
VALUES
(
11
,
9
);
INSERT
INTO
traitement
(
idAnimal
,
idVeterinaire
)
VALUES
(
4
,
9
);
INSERT
INTO
traitement
(
idAnimal
,
idVeterinaire
)
VALUES
(
12
,
8
);
INSERT
INTO
traitement
(
idAnimal
,
idVeterinaire
)
VALUES
(
12
,
8
);
INSERT
INTO
traitement
(
idAnimal
,
idVeterinaire
)
VALUES
(
11
,
16
);
INSERT
INTO
traitement
(
idAnimal
,
idVeterinaire
)
VALUES
(
11
,
16
);
INSERT
INTO
traitement
(
idAnimal
,
idVeterinaire
)
VALUES
(
18
,
8
);
INSERT
INTO
traitement
(
idAnimal
,
idVeterinaire
)
VALUES
(
18
,
8
);
...
@@ -161,7 +161,7 @@ INSERT INTO traitement (idAnimal,idVeterinaire) VALUES (6,17);
...
@@ -161,7 +161,7 @@ INSERT INTO traitement (idAnimal,idVeterinaire) VALUES (6,17);
INSERT
INTO
traitement
(
idAnimal
,
idVeterinaire
)
VALUES
(
12
,
20
);
INSERT
INTO
traitement
(
idAnimal
,
idVeterinaire
)
VALUES
(
12
,
20
);
INSERT
INTO
traitement
(
idAnimal
,
idVeterinaire
)
VALUES
(
19
,
20
);
INSERT
INTO
traitement
(
idAnimal
,
idVeterinaire
)
VALUES
(
19
,
20
);
INSERT
INTO
traitement
(
idAnimal
,
idVeterinaire
)
VALUES
(
2
,
17
);
INSERT
INTO
traitement
(
idAnimal
,
idVeterinaire
)
VALUES
(
2
,
17
);
INSERT
INTO
traitement
(
idAnimal
,
idVeterinaire
)
VALUES
(
1
7
,
9
);
INSERT
INTO
traitement
(
idAnimal
,
idVeterinaire
)
VALUES
(
1
3
,
9
);
INSERT
INTO
traitement
(
idAnimal
,
idVeterinaire
)
VALUES
(
1
,
19
);
INSERT
INTO
traitement
(
idAnimal
,
idVeterinaire
)
VALUES
(
1
,
19
);
INSERT
INTO
traitement
(
idAnimal
,
idVeterinaire
)
VALUES
(
17
,
10
);
INSERT
INTO
traitement
(
idAnimal
,
idVeterinaire
)
VALUES
(
17
,
10
);
INSERT
INTO
traitement
(
idAnimal
,
idVeterinaire
)
VALUES
(
17
,
9
);
INSERT
INTO
traitement
(
idAnimal
,
idVeterinaire
)
VALUES
(
17
,
9
);
...
...
sql/requetes.sql
View file @
be91b7c5
...
@@ -7,16 +7,16 @@
...
@@ -7,16 +7,16 @@
/* Requête pour la quantité de médicament prescrite
/* Requête pour la quantité de médicament prescrite
à un animal */
à un animal */
SELECT
P
.
nomMolec
as
medicament
,
COUNT
(
*
)
as
quantite_prescrite
SELECT
P
.
nomMolec
as
medicament
,
COUNT
(
*
)
as
quantite_prescrite
FROM
Posologie
P
FROM
Posologie
P
JOIN
Traitement
T
on
P
.
traitement
=
T
.
idTraitement
WHERE
idAnimal
=
$
idAnimal
WHERE
T
.
idAnimal
=
$
idAnimal
GROUP
BY
P
.
nomMolec
;
GROUP
BY
P
.
nomMolec
;
/* Requete pour le nombre de comprimé prescrit
/* Requete pour le nombre de comprimé prescrit
à un animal */
à un animal */
SELECT
P
.
nomMolec
as
medicament
,
SUM
(
P
.
duree
*
P
.
nbJourna
)
as
nombre_comprime
select
P
.
nomMolec
,
SUM
(
P
.
duree
*
P
.
nbJourna
)
FROM
Posologie
P
FROM
Posologie
P
JOIN
Traitement
T
ON
P
.
traitement
=
T
.
idTraitement
WHERE
WHERE
idAnimal
=
$
idAnimal
T
.
idAnimal
=
$
idAnimal
group
by
P
.
nomMolec
;
GROUP
BY
P
.
nomMolec
;
/***********************************/
/***********************************/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment