mirror of
https://github.com/BreizhHardware/cours-ISEN-MD.git
synced 2026-03-18 21:50:46 +01:00
Obisidian vault auto-backup: 05-09-2025 09:23:20 on macbook-air-de-felix. 62 files edited
This commit is contained in:
27
.obsidian/workspace.json
vendored
27
.obsidian/workspace.json
vendored
@@ -11,24 +11,12 @@
|
||||
"id": "14045e30aacf0836",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "markdown",
|
||||
"type": "pdf",
|
||||
"state": {
|
||||
"file": "ISEN/Réunion/CIPA 4/Rentrée 2025-2026.md",
|
||||
"mode": "source",
|
||||
"source": false,
|
||||
"backlinks": true,
|
||||
"backlinkOpts": {
|
||||
"collapseAll": false,
|
||||
"extraContext": false,
|
||||
"sortOrder": "alphabetical",
|
||||
"showSearch": false,
|
||||
"searchQuery": "",
|
||||
"backlinkCollapsed": false,
|
||||
"unlinkedCollapsed": true
|
||||
}
|
||||
"file": "ISEN/BDD/CIR2/PostgreSQLInstallCIR2.pdf"
|
||||
},
|
||||
"icon": "lucide-file",
|
||||
"title": "Rentrée 2025-2026"
|
||||
"icon": "lucide-file-text",
|
||||
"title": "PostgreSQLInstallCIR2"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -216,10 +204,11 @@
|
||||
"obsidian-git:Open Git source control": false
|
||||
}
|
||||
},
|
||||
"active": "14045e30aacf0836",
|
||||
"active": "622da1d4e0ba0f73",
|
||||
"lastOpenFiles": [
|
||||
"ISEN/Réunion/CIPA 4/Réunion FHS Rentrée 2025.md",
|
||||
"ISEN/BDD/CIR2",
|
||||
"ISEN/Réunion/CIPA 4/Rentrée 2025-2026.md",
|
||||
"ISEN/Réunion/CIPA 4/Réunion FHS Rentrée 2025.md",
|
||||
"ISEN/IA/CIPA4/Cours/CM1_KOA-IA-Generalites-CIPA4.pdf",
|
||||
"ISEN/IA/CIPA4/TP/TP1/tp1_IA.ipynb",
|
||||
"ISEN/IA/CIPA4/TP/TP1/tp1_IA.pdf",
|
||||
@@ -268,7 +257,7 @@
|
||||
"Untitled.canvas",
|
||||
"ISEN/Other/Graph Overseer.canvas",
|
||||
"ISEN/Algo C/A2/TP1 Exercice 1.canvas",
|
||||
"ISEN/BDD/TD2.canvas",
|
||||
"ISEN/BDD/CIR2/TD2.canvas",
|
||||
"ISEN/Algo C/A2/MergeSort.canvas",
|
||||
"ISEN/FHS/A1/Stage/Organigramme Go-Recup.canvas",
|
||||
"ISEN/FHS/A1/Démocratie/Mouvement Social.canvas"
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
SELECT users.username, COUNT(DISTINCT videos.video_id)
|
||||
AS nb_videos, COUNT(DISTINCT comments.comment_id)
|
||||
AS nb_comments, COUNT(DISTINCT post.post_id)
|
||||
AS nb_posts, COUNT(DISTINCT photos.photo_id)
|
||||
AS nb_photos FROM users , videos, comments, post, photos
|
||||
WHERE users.user_id = post.user_id
|
||||
AND comments.user_id = users.user_id
|
||||
AND videos.video_id = post.video_id
|
||||
AND photos.photo_id = post.photo_id
|
||||
SELECT users.username, COUNT(DISTINCT videos.video_id)
|
||||
AS nb_videos, COUNT(DISTINCT comments.comment_id)
|
||||
AS nb_comments, COUNT(DISTINCT post.post_id)
|
||||
AS nb_posts, COUNT(DISTINCT photos.photo_id)
|
||||
AS nb_photos FROM users , videos, comments, post, photos
|
||||
WHERE users.user_id = post.user_id
|
||||
AND comments.user_id = users.user_id
|
||||
AND videos.video_id = post.video_id
|
||||
AND photos.photo_id = post.photo_id
|
||||
GROUP BY users.username;
|
||||
@@ -1,2 +1,2 @@
|
||||
SELECT post_id, COUNT(*) AS nb_commentaires FROM comments
|
||||
SELECT post_id, COUNT(*) AS nb_commentaires FROM comments
|
||||
GROUP BY post_id ORDER BY nb_commentaires DESC LIMIT 5;
|
||||
@@ -1,3 +1,3 @@
|
||||
SELECT u.username, u.bio, u.email FROM users u, post p, post_likes pl
|
||||
WHERE u.user_id = pl.user_id AND p.post_id = pl.post_id
|
||||
SELECT u.username, u.bio, u.email FROM users u, post p, post_likes pl
|
||||
WHERE u.user_id = pl.user_id AND p.post_id = pl.post_id
|
||||
AND CAST(p.created_at AS TEXT) LIKE '2024-01-11%';
|
||||
@@ -1,2 +1,2 @@
|
||||
SELECT comment_text AS "commentaires" FROM comments
|
||||
SELECT comment_text AS "commentaires" FROM comments
|
||||
WHERE user_id = 37;
|
||||
@@ -1,2 +1,2 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash
|
||||
psql -U tester -d postgres -f ./question_5_1.sql
|
||||
@@ -1,7 +1,7 @@
|
||||
SELECT AVG(nmb_comment) FROM (SELECT COUNT(comment_id) AS nmb_comment FROM comments GROUP BY user_id) AS nmb_comment;
|
||||
|
||||
SELECT u.username, COUNT(nb_comment) AS nb_comments FROM users u, comments c
|
||||
WHERE u.user_id = c.user_id AND nb_comment >
|
||||
(SELECT AVG(nb_comment) FROM (SELECT COUNT(comment_id)
|
||||
AS nb_comment FROM c GROUP BY user_id) AS nb_comment)
|
||||
SELECT AVG(nmb_comment) FROM (SELECT COUNT(comment_id) AS nmb_comment FROM comments GROUP BY user_id) AS nmb_comment;
|
||||
|
||||
SELECT u.username, COUNT(nb_comment) AS nb_comments FROM users u, comments c
|
||||
WHERE u.user_id = c.user_id AND nb_comment >
|
||||
(SELECT AVG(nb_comment) FROM (SELECT COUNT(comment_id)
|
||||
AS nb_comment FROM c GROUP BY user_id) AS nb_comment)
|
||||
GROUP BY u.username;
|
||||
@@ -1,7 +1,7 @@
|
||||
SELECT u1.username AS follower, u2.username AS followee FROM users u1, users u2, follows
|
||||
WHERE u1.user_id
|
||||
IN (SELECT follower_id FROM follows)
|
||||
AND u2.user_id IN (SELECT followee_id FROM follows)
|
||||
AND u1.user_id = follows.follower_id
|
||||
AND u2.user_id = follows.followee_id
|
||||
SELECT u1.username AS follower, u2.username AS followee FROM users u1, users u2, follows
|
||||
WHERE u1.user_id
|
||||
IN (SELECT follower_id FROM follows)
|
||||
AND u2.user_id IN (SELECT followee_id FROM follows)
|
||||
AND u1.user_id = follows.follower_id
|
||||
AND u2.user_id = follows.followee_id
|
||||
ORDER BY followee ASC;
|
||||
@@ -1,3 +1,3 @@
|
||||
SELECT AVG(nb_connexions) FROM (SELECT COUNT(*) AS nb_connexions FROM login GROUP BY user_id) AS lnc;
|
||||
SELECT MAX(nb_connexions) FROM (SELECT COUNT(*) AS nb_connexions FROM login GROUP BY user_id) AS lnc;
|
||||
SELECT Min(nb_connexions) FROM (SELECT COUNT(*) AS nb_connexions FROM login GROUP BY user_id) AS lnc;
|
||||
SELECT AVG(nb_connexions) FROM (SELECT COUNT(*) AS nb_connexions FROM login GROUP BY user_id) AS lnc;
|
||||
SELECT MAX(nb_connexions) FROM (SELECT COUNT(*) AS nb_connexions FROM login GROUP BY user_id) AS lnc;
|
||||
SELECT Min(nb_connexions) FROM (SELECT COUNT(*) AS nb_connexions FROM login GROUP BY user_id) AS lnc;
|
||||
@@ -1,2 +1,2 @@
|
||||
DELETE FROM users WHERE user_id IN (SELECT user_id FROM comments WHERE comment_id IS NULL);
|
||||
DELETE FROM users WHERE user_id IN (SELECT user_id FROM comments WHERE comment_id IS NULL);
|
||||
SELECT * FROM users WHERE user_id IN (SELECT user_id FROM comments WHERE comment_id IS NULL);
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,137 +1,137 @@
|
||||
DROP database social_media;
|
||||
CREATE DATABASE social_media;
|
||||
--USE social_media;
|
||||
DROP TABLE login;
|
||||
DROP TABLE bookmarks;
|
||||
DROP TABLE post_tags;
|
||||
|
||||
DROP TABLE hashtag_follow;
|
||||
DROP TABLE hashtags;
|
||||
DROP TABLE follows;
|
||||
DROP TABLE comment_likes;
|
||||
|
||||
|
||||
DROP TABLE post_likes;
|
||||
DROP TABLE comments;
|
||||
DROP TABLE post;
|
||||
DROP TABLE videos;
|
||||
DROP TABLE photos;
|
||||
DROP TABLE users;
|
||||
|
||||
CREATE TABLE users (
|
||||
user_id SERIAL PRIMARY KEY,
|
||||
username VARCHAR(255) UNIQUE NOT NULL,
|
||||
profile_photo_url VARCHAR(255) DEFAULT 'https://picsum.photos/100',
|
||||
bio VARCHAR(255),
|
||||
created_at TIMESTAMP DEFAULT NOW()
|
||||
);
|
||||
|
||||
ALTER TABLE users
|
||||
ADD email VARCHAR(30) NOT NULL;
|
||||
|
||||
CREATE TABLE photos (
|
||||
photo_id SERIAL PRIMARY KEY,
|
||||
photo_url VARCHAR(255) NOT NULL UNIQUE,
|
||||
post_id INTEGER NOT NULL,
|
||||
created_at TIMESTAMP DEFAULT NOW(),
|
||||
size FLOAT CHECK (size<5)
|
||||
);
|
||||
|
||||
CREATE TABLE videos (
|
||||
video_id SERIAL PRIMARY KEY,
|
||||
video_url VARCHAR(255) NOT NULL UNIQUE,
|
||||
post_id INTEGER NOT NULL,
|
||||
created_at TIMESTAMP DEFAULT NOW(),
|
||||
size FLOAT CHECK (size<10)
|
||||
|
||||
);
|
||||
|
||||
CREATE TABLE post (
|
||||
post_id SERIAL PRIMARY KEY,
|
||||
photo_id INTEGER,
|
||||
video_id INTEGER,
|
||||
user_id INTEGER NOT NULL,
|
||||
caption VARCHAR(200),
|
||||
location VARCHAR(50) ,
|
||||
created_at TIMESTAMP DEFAULT NOW(),
|
||||
FOREIGN KEY(user_id) REFERENCES users(user_id),
|
||||
FOREIGN KEY(photo_id) REFERENCES photos(photo_id),
|
||||
FOREIGN KEY(video_id) REFERENCES videos(video_id)
|
||||
);
|
||||
|
||||
CREATE TABLE comments (
|
||||
comment_id SERIAL PRIMARY KEY,
|
||||
comment_text VARCHAR(255) NOT NULL,
|
||||
post_id INTEGER NOT NULL,
|
||||
user_id INTEGER NOT NULL,
|
||||
created_at TIMESTAMP DEFAULT NOW(),
|
||||
FOREIGN KEY(post_id) REFERENCES post(post_id),
|
||||
FOREIGN KEY(user_id) REFERENCES users(user_id)
|
||||
);
|
||||
|
||||
CREATE TABLE post_likes (
|
||||
user_id INTEGER NOT NULL,
|
||||
post_id INTEGER NOT NULL,
|
||||
created_at TIMESTAMP DEFAULT NOW(),
|
||||
FOREIGN KEY(user_id) REFERENCES users(user_id),
|
||||
FOREIGN KEY(post_id) REFERENCES post(post_id),
|
||||
PRIMARY KEY(user_id, post_id)
|
||||
);
|
||||
|
||||
CREATE TABLE comment_likes (
|
||||
user_id INTEGER NOT NULL,
|
||||
comment_id INTEGER NOT NULL,
|
||||
created_at TIMESTAMP DEFAULT NOW(),
|
||||
FOREIGN KEY(user_id) REFERENCES users(user_id),
|
||||
FOREIGN KEY(comment_id) REFERENCES comments(comment_id),
|
||||
PRIMARY KEY(user_id, comment_id)
|
||||
);
|
||||
|
||||
CREATE TABLE follows (
|
||||
follower_id INTEGER NOT NULL,
|
||||
followee_id INTEGER NOT NULL,
|
||||
created_at TIMESTAMP DEFAULT NOW(),
|
||||
FOREIGN KEY(follower_id) REFERENCES users(user_id),
|
||||
FOREIGN KEY(followee_id) REFERENCES users(user_id),
|
||||
PRIMARY KEY(follower_id, followee_id)
|
||||
);
|
||||
|
||||
CREATE TABLE hashtags (
|
||||
hashtag_id SERIAL PRIMARY KEY,
|
||||
hashtag_name VARCHAR(255) UNIQUE,
|
||||
created_at TIMESTAMP DEFAULT NOW()
|
||||
);
|
||||
|
||||
CREATE TABLE hashtag_follow (
|
||||
user_id INTEGER NOT NULL,
|
||||
hashtag_id INTEGER NOT NULL,
|
||||
created_at TIMESTAMP DEFAULT NOW(),
|
||||
FOREIGN KEY(user_id) REFERENCES users(user_id),
|
||||
FOREIGN KEY(hashtag_id) REFERENCES hashtags(hashtag_id),
|
||||
PRIMARY KEY(user_id, hashtag_id)
|
||||
);
|
||||
|
||||
CREATE TABLE post_tags (
|
||||
post_id INTEGER NOT NULL,
|
||||
hashtag_id INTEGER NOT NULL,
|
||||
FOREIGN KEY(post_id) REFERENCES post(post_id),
|
||||
FOREIGN KEY(hashtag_id) REFERENCES hashtags(hashtag_id),
|
||||
PRIMARY KEY(post_id, hashtag_id)
|
||||
);
|
||||
|
||||
CREATE TABLE bookmarks (
|
||||
post_id INTEGER NOT NULL,
|
||||
user_id INTEGER NOT NULL,
|
||||
created_at TIMESTAMP DEFAULT NOW(),
|
||||
FOREIGN KEY(post_id) REFERENCES post(post_id),
|
||||
FOREIGN KEY(user_id) REFERENCES users(user_id),
|
||||
PRIMARY KEY(user_id, post_id)
|
||||
);
|
||||
|
||||
CREATE TABLE login (
|
||||
login_id SERIAL NOT NULL PRIMARY KEY,
|
||||
user_id INTEGER NOT NULL,
|
||||
ip VARCHAR(50) NOT NULL,
|
||||
login_time TIMESTAMP NOT NULL DEFAULT NOW(),
|
||||
FOREIGN KEY(user_id) REFERENCES users(user_id)
|
||||
);
|
||||
DROP database social_media;
|
||||
CREATE DATABASE social_media;
|
||||
--USE social_media;
|
||||
DROP TABLE login;
|
||||
DROP TABLE bookmarks;
|
||||
DROP TABLE post_tags;
|
||||
|
||||
DROP TABLE hashtag_follow;
|
||||
DROP TABLE hashtags;
|
||||
DROP TABLE follows;
|
||||
DROP TABLE comment_likes;
|
||||
|
||||
|
||||
DROP TABLE post_likes;
|
||||
DROP TABLE comments;
|
||||
DROP TABLE post;
|
||||
DROP TABLE videos;
|
||||
DROP TABLE photos;
|
||||
DROP TABLE users;
|
||||
|
||||
CREATE TABLE users (
|
||||
user_id SERIAL PRIMARY KEY,
|
||||
username VARCHAR(255) UNIQUE NOT NULL,
|
||||
profile_photo_url VARCHAR(255) DEFAULT 'https://picsum.photos/100',
|
||||
bio VARCHAR(255),
|
||||
created_at TIMESTAMP DEFAULT NOW()
|
||||
);
|
||||
|
||||
ALTER TABLE users
|
||||
ADD email VARCHAR(30) NOT NULL;
|
||||
|
||||
CREATE TABLE photos (
|
||||
photo_id SERIAL PRIMARY KEY,
|
||||
photo_url VARCHAR(255) NOT NULL UNIQUE,
|
||||
post_id INTEGER NOT NULL,
|
||||
created_at TIMESTAMP DEFAULT NOW(),
|
||||
size FLOAT CHECK (size<5)
|
||||
);
|
||||
|
||||
CREATE TABLE videos (
|
||||
video_id SERIAL PRIMARY KEY,
|
||||
video_url VARCHAR(255) NOT NULL UNIQUE,
|
||||
post_id INTEGER NOT NULL,
|
||||
created_at TIMESTAMP DEFAULT NOW(),
|
||||
size FLOAT CHECK (size<10)
|
||||
|
||||
);
|
||||
|
||||
CREATE TABLE post (
|
||||
post_id SERIAL PRIMARY KEY,
|
||||
photo_id INTEGER,
|
||||
video_id INTEGER,
|
||||
user_id INTEGER NOT NULL,
|
||||
caption VARCHAR(200),
|
||||
location VARCHAR(50) ,
|
||||
created_at TIMESTAMP DEFAULT NOW(),
|
||||
FOREIGN KEY(user_id) REFERENCES users(user_id),
|
||||
FOREIGN KEY(photo_id) REFERENCES photos(photo_id),
|
||||
FOREIGN KEY(video_id) REFERENCES videos(video_id)
|
||||
);
|
||||
|
||||
CREATE TABLE comments (
|
||||
comment_id SERIAL PRIMARY KEY,
|
||||
comment_text VARCHAR(255) NOT NULL,
|
||||
post_id INTEGER NOT NULL,
|
||||
user_id INTEGER NOT NULL,
|
||||
created_at TIMESTAMP DEFAULT NOW(),
|
||||
FOREIGN KEY(post_id) REFERENCES post(post_id),
|
||||
FOREIGN KEY(user_id) REFERENCES users(user_id)
|
||||
);
|
||||
|
||||
CREATE TABLE post_likes (
|
||||
user_id INTEGER NOT NULL,
|
||||
post_id INTEGER NOT NULL,
|
||||
created_at TIMESTAMP DEFAULT NOW(),
|
||||
FOREIGN KEY(user_id) REFERENCES users(user_id),
|
||||
FOREIGN KEY(post_id) REFERENCES post(post_id),
|
||||
PRIMARY KEY(user_id, post_id)
|
||||
);
|
||||
|
||||
CREATE TABLE comment_likes (
|
||||
user_id INTEGER NOT NULL,
|
||||
comment_id INTEGER NOT NULL,
|
||||
created_at TIMESTAMP DEFAULT NOW(),
|
||||
FOREIGN KEY(user_id) REFERENCES users(user_id),
|
||||
FOREIGN KEY(comment_id) REFERENCES comments(comment_id),
|
||||
PRIMARY KEY(user_id, comment_id)
|
||||
);
|
||||
|
||||
CREATE TABLE follows (
|
||||
follower_id INTEGER NOT NULL,
|
||||
followee_id INTEGER NOT NULL,
|
||||
created_at TIMESTAMP DEFAULT NOW(),
|
||||
FOREIGN KEY(follower_id) REFERENCES users(user_id),
|
||||
FOREIGN KEY(followee_id) REFERENCES users(user_id),
|
||||
PRIMARY KEY(follower_id, followee_id)
|
||||
);
|
||||
|
||||
CREATE TABLE hashtags (
|
||||
hashtag_id SERIAL PRIMARY KEY,
|
||||
hashtag_name VARCHAR(255) UNIQUE,
|
||||
created_at TIMESTAMP DEFAULT NOW()
|
||||
);
|
||||
|
||||
CREATE TABLE hashtag_follow (
|
||||
user_id INTEGER NOT NULL,
|
||||
hashtag_id INTEGER NOT NULL,
|
||||
created_at TIMESTAMP DEFAULT NOW(),
|
||||
FOREIGN KEY(user_id) REFERENCES users(user_id),
|
||||
FOREIGN KEY(hashtag_id) REFERENCES hashtags(hashtag_id),
|
||||
PRIMARY KEY(user_id, hashtag_id)
|
||||
);
|
||||
|
||||
CREATE TABLE post_tags (
|
||||
post_id INTEGER NOT NULL,
|
||||
hashtag_id INTEGER NOT NULL,
|
||||
FOREIGN KEY(post_id) REFERENCES post(post_id),
|
||||
FOREIGN KEY(hashtag_id) REFERENCES hashtags(hashtag_id),
|
||||
PRIMARY KEY(post_id, hashtag_id)
|
||||
);
|
||||
|
||||
CREATE TABLE bookmarks (
|
||||
post_id INTEGER NOT NULL,
|
||||
user_id INTEGER NOT NULL,
|
||||
created_at TIMESTAMP DEFAULT NOW(),
|
||||
FOREIGN KEY(post_id) REFERENCES post(post_id),
|
||||
FOREIGN KEY(user_id) REFERENCES users(user_id),
|
||||
PRIMARY KEY(user_id, post_id)
|
||||
);
|
||||
|
||||
CREATE TABLE login (
|
||||
login_id SERIAL NOT NULL PRIMARY KEY,
|
||||
user_id INTEGER NOT NULL,
|
||||
ip VARCHAR(50) NOT NULL,
|
||||
login_time TIMESTAMP NOT NULL DEFAULT NOW(),
|
||||
FOREIGN KEY(user_id) REFERENCES users(user_id)
|
||||
);
|
||||
|
Before Width: | Height: | Size: 488 KiB After Width: | Height: | Size: 488 KiB |
@@ -1,2 +1,2 @@
|
||||
-- Select all medecin where m_postal contains 44***--
|
||||
SELECT * FROM medecin WHERE CAST(m_postal AS TEXT) LIKE '44%' AND m_specialty = 'Rhumatologue';
|
||||
-- Select all medecin where m_postal contains 44***--
|
||||
SELECT * FROM medecin WHERE CAST(m_postal AS TEXT) LIKE '44%' AND m_specialty = 'Rhumatologue';
|
||||
@@ -1,35 +1,35 @@
|
||||
{
|
||||
"nodes":[
|
||||
{"id":"7ea264b035b0efcd","type":"text","text":"Trajet","x":-380,"y":-320,"width":250,"height":60},
|
||||
{"id":"1cc2c73aead821d5","type":"text","text":"Ville","x":400,"y":-320,"width":250,"height":60},
|
||||
{"id":"c3c8f58e38efdf7f","type":"text","text":"DateDépot","x":-130,"y":-180,"width":250,"height":60},
|
||||
{"id":"45d85169fc9cfe17","type":"text","text":"IdTrajet","x":-630,"y":-140,"width":250,"height":60},
|
||||
{"id":"f3c4eae1374c4adf","type":"text","text":"TypeTrajet","x":-330,"y":100,"width":250,"height":60},
|
||||
{"id":"2d94b650f87430cc","type":"text","text":"PrénomDéposant","x":-1585,"y":-317,"width":250,"height":60},
|
||||
{"id":"418cc665fbf08738","type":"text","text":"Utilisateur","x":-1460,"y":-457,"width":250,"height":60},
|
||||
{"id":"23a8ca04dd21c41c","type":"text","text":"NomDéposant","x":-1335,"y":-317,"width":250,"height":60},
|
||||
{"id":"3af1970463a36c54","type":"text","text":"IdUtilisateur","x":-1460,"y":-170,"width":250,"height":60},
|
||||
{"id":"63da7cd3cfeefeed","type":"text","text":"Mail","x":-1740,"y":-200,"width":250,"height":60},
|
||||
{"id":"8a6c3b7cf6bc078d","type":"text","text":"DateNaissance","x":-1210,"y":-110,"width":250,"height":60},
|
||||
{"id":"efdc9d6d8cf22755","type":"text","text":"Insee","x":415,"y":-50,"width":250,"height":60},
|
||||
{"id":"f4dbbcb2c5a2235f","type":"text","text":"CodePostal","x":565,"y":-170,"width":250,"height":60},
|
||||
{"id":"bbf335ee303f44cb","type":"text","text":"NomVille","x":220,"y":-110,"width":250,"height":60},
|
||||
{"id":"2fb10a530ffba255","x":-600,"y":-20,"width":250,"height":60,"type":"text","text":"Véhicule"},
|
||||
{"id":"3ed9972ce4022231","x":-160,"y":-20,"width":250,"height":60,"type":"text","text":"Carburant"}
|
||||
],
|
||||
"edges":[
|
||||
{"id":"a4d1429cacdfc2f0","fromNode":"7ea264b035b0efcd","fromSide":"bottom","toNode":"c3c8f58e38efdf7f","toSide":"top"},
|
||||
{"id":"a5e6d7224fd47113","fromNode":"418cc665fbf08738","fromSide":"bottom","toNode":"2d94b650f87430cc","toSide":"top"},
|
||||
{"id":"2b4b8222af3baa6a","fromNode":"418cc665fbf08738","fromSide":"bottom","toNode":"23a8ca04dd21c41c","toSide":"top"},
|
||||
{"id":"a012028c4a655a16","fromNode":"418cc665fbf08738","fromSide":"bottom","toNode":"3af1970463a36c54","toSide":"top"},
|
||||
{"id":"13a3cbd5913bee38","fromNode":"7ea264b035b0efcd","fromSide":"bottom","toNode":"45d85169fc9cfe17","toSide":"top"},
|
||||
{"id":"61623a302a69ec2d","fromNode":"7ea264b035b0efcd","fromSide":"bottom","toNode":"f3c4eae1374c4adf","toSide":"top"},
|
||||
{"id":"3634bc991f69ee01","fromNode":"418cc665fbf08738","fromSide":"bottom","toNode":"8a6c3b7cf6bc078d","toSide":"top"},
|
||||
{"id":"0fa541edc0149104","fromNode":"418cc665fbf08738","fromSide":"bottom","toNode":"63da7cd3cfeefeed","toSide":"top"},
|
||||
{"id":"e8301bd260918c66","fromNode":"1cc2c73aead821d5","fromSide":"bottom","toNode":"bbf335ee303f44cb","toSide":"top"},
|
||||
{"id":"60b014dc2334b2cf","fromNode":"1cc2c73aead821d5","fromSide":"bottom","toNode":"f4dbbcb2c5a2235f","toSide":"top"},
|
||||
{"id":"2a0ded1a75d5a15c","fromNode":"1cc2c73aead821d5","fromSide":"bottom","toNode":"efdc9d6d8cf22755","toSide":"top"},
|
||||
{"id":"af9d3a00a70ed8e8","fromNode":"7ea264b035b0efcd","fromSide":"bottom","toNode":"3ed9972ce4022231","toSide":"top"},
|
||||
{"id":"350e44657d72f842","fromNode":"7ea264b035b0efcd","fromSide":"bottom","toNode":"2fb10a530ffba255","toSide":"top"}
|
||||
]
|
||||
{
|
||||
"nodes":[
|
||||
{"id":"7ea264b035b0efcd","type":"text","text":"Trajet","x":-380,"y":-320,"width":250,"height":60},
|
||||
{"id":"1cc2c73aead821d5","type":"text","text":"Ville","x":400,"y":-320,"width":250,"height":60},
|
||||
{"id":"c3c8f58e38efdf7f","type":"text","text":"DateDépot","x":-130,"y":-180,"width":250,"height":60},
|
||||
{"id":"45d85169fc9cfe17","type":"text","text":"IdTrajet","x":-630,"y":-140,"width":250,"height":60},
|
||||
{"id":"f3c4eae1374c4adf","type":"text","text":"TypeTrajet","x":-330,"y":100,"width":250,"height":60},
|
||||
{"id":"2d94b650f87430cc","type":"text","text":"PrénomDéposant","x":-1585,"y":-317,"width":250,"height":60},
|
||||
{"id":"418cc665fbf08738","type":"text","text":"Utilisateur","x":-1460,"y":-457,"width":250,"height":60},
|
||||
{"id":"23a8ca04dd21c41c","type":"text","text":"NomDéposant","x":-1335,"y":-317,"width":250,"height":60},
|
||||
{"id":"3af1970463a36c54","type":"text","text":"IdUtilisateur","x":-1460,"y":-170,"width":250,"height":60},
|
||||
{"id":"63da7cd3cfeefeed","type":"text","text":"Mail","x":-1740,"y":-200,"width":250,"height":60},
|
||||
{"id":"8a6c3b7cf6bc078d","type":"text","text":"DateNaissance","x":-1210,"y":-110,"width":250,"height":60},
|
||||
{"id":"efdc9d6d8cf22755","type":"text","text":"Insee","x":415,"y":-50,"width":250,"height":60},
|
||||
{"id":"f4dbbcb2c5a2235f","type":"text","text":"CodePostal","x":565,"y":-170,"width":250,"height":60},
|
||||
{"id":"bbf335ee303f44cb","type":"text","text":"NomVille","x":220,"y":-110,"width":250,"height":60},
|
||||
{"id":"2fb10a530ffba255","x":-600,"y":-20,"width":250,"height":60,"type":"text","text":"Véhicule"},
|
||||
{"id":"3ed9972ce4022231","x":-160,"y":-20,"width":250,"height":60,"type":"text","text":"Carburant"}
|
||||
],
|
||||
"edges":[
|
||||
{"id":"a4d1429cacdfc2f0","fromNode":"7ea264b035b0efcd","fromSide":"bottom","toNode":"c3c8f58e38efdf7f","toSide":"top"},
|
||||
{"id":"a5e6d7224fd47113","fromNode":"418cc665fbf08738","fromSide":"bottom","toNode":"2d94b650f87430cc","toSide":"top"},
|
||||
{"id":"2b4b8222af3baa6a","fromNode":"418cc665fbf08738","fromSide":"bottom","toNode":"23a8ca04dd21c41c","toSide":"top"},
|
||||
{"id":"a012028c4a655a16","fromNode":"418cc665fbf08738","fromSide":"bottom","toNode":"3af1970463a36c54","toSide":"top"},
|
||||
{"id":"13a3cbd5913bee38","fromNode":"7ea264b035b0efcd","fromSide":"bottom","toNode":"45d85169fc9cfe17","toSide":"top"},
|
||||
{"id":"61623a302a69ec2d","fromNode":"7ea264b035b0efcd","fromSide":"bottom","toNode":"f3c4eae1374c4adf","toSide":"top"},
|
||||
{"id":"3634bc991f69ee01","fromNode":"418cc665fbf08738","fromSide":"bottom","toNode":"8a6c3b7cf6bc078d","toSide":"top"},
|
||||
{"id":"0fa541edc0149104","fromNode":"418cc665fbf08738","fromSide":"bottom","toNode":"63da7cd3cfeefeed","toSide":"top"},
|
||||
{"id":"e8301bd260918c66","fromNode":"1cc2c73aead821d5","fromSide":"bottom","toNode":"bbf335ee303f44cb","toSide":"top"},
|
||||
{"id":"60b014dc2334b2cf","fromNode":"1cc2c73aead821d5","fromSide":"bottom","toNode":"f4dbbcb2c5a2235f","toSide":"top"},
|
||||
{"id":"2a0ded1a75d5a15c","fromNode":"1cc2c73aead821d5","fromSide":"bottom","toNode":"efdc9d6d8cf22755","toSide":"top"},
|
||||
{"id":"af9d3a00a70ed8e8","fromNode":"7ea264b035b0efcd","fromSide":"bottom","toNode":"3ed9972ce4022231","toSide":"top"},
|
||||
{"id":"350e44657d72f842","fromNode":"7ea264b035b0efcd","fromSide":"bottom","toNode":"2fb10a530ffba255","toSide":"top"}
|
||||
]
|
||||
}
|
||||
12
ISEN/BDD/TP1/.idea/.gitignore → ISEN/BDD/CIR2/TP1/.idea/.gitignore
generated
vendored
12
ISEN/BDD/TP1/.idea/.gitignore → ISEN/BDD/CIR2/TP1/.idea/.gitignore
generated
vendored
@@ -1,6 +1,6 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="DBE_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$/.." />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="DBE_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$/.." />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -1,20 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
|
||||
<data-source source="LOCAL" name="postgres@172.29.205.116" uuid="305d7a75-1cff-4eed-a7b5-0ab47d3d1989">
|
||||
<driver-ref>postgresql</driver-ref>
|
||||
<synchronize>true</synchronize>
|
||||
<jdbc-driver>org.postgresql.Driver</jdbc-driver>
|
||||
<jdbc-url>jdbc:postgresql://172.29.205.116:5432/postgres</jdbc-url>
|
||||
<working-dir>$ProjectFileDir$</working-dir>
|
||||
</data-source>
|
||||
<data-source source="LOCAL" name="TP6@172.29.205.116" uuid="4e251db2-c6c3-4298-aaea-359a3e69ad27">
|
||||
<driver-ref>mongo</driver-ref>
|
||||
<synchronize>true</synchronize>
|
||||
<remarks>MongoDB TP6</remarks>
|
||||
<jdbc-driver>com.dbschema.MongoJdbcDriver</jdbc-driver>
|
||||
<jdbc-url>mongodb://172.29.205.116:27017/TP6</jdbc-url>
|
||||
<working-dir>$ProjectFileDir$</working-dir>
|
||||
</data-source>
|
||||
</component>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
|
||||
<data-source source="LOCAL" name="postgres@172.29.205.116" uuid="305d7a75-1cff-4eed-a7b5-0ab47d3d1989">
|
||||
<driver-ref>postgresql</driver-ref>
|
||||
<synchronize>true</synchronize>
|
||||
<jdbc-driver>org.postgresql.Driver</jdbc-driver>
|
||||
<jdbc-url>jdbc:postgresql://172.29.205.116:5432/postgres</jdbc-url>
|
||||
<working-dir>$ProjectFileDir$</working-dir>
|
||||
</data-source>
|
||||
<data-source source="LOCAL" name="TP6@172.29.205.116" uuid="4e251db2-c6c3-4298-aaea-359a3e69ad27">
|
||||
<driver-ref>mongo</driver-ref>
|
||||
<synchronize>true</synchronize>
|
||||
<remarks>MongoDB TP6</remarks>
|
||||
<jdbc-driver>com.dbschema.MongoJdbcDriver</jdbc-driver>
|
||||
<jdbc-url>mongodb://172.29.205.116:27017/TP6</jdbc-url>
|
||||
<working-dir>$ProjectFileDir$</working-dir>
|
||||
</data-source>
|
||||
</component>
|
||||
</project>
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DiscordProjectSettings">
|
||||
<option name="show" value="PROJECT_FILES" />
|
||||
<option name="description" value="" />
|
||||
</component>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DiscordProjectSettings">
|
||||
<option name="show" value="PROJECT_FILES" />
|
||||
<option name="description" value="" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/TP1.iml" filepath="$PROJECT_DIR$/.idea/TP1.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/TP1.iml" filepath="$PROJECT_DIR$/.idea/TP1.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
@@ -1,14 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="SqlDialectMappings">
|
||||
<file url="file://$PROJECT_DIR$/ITtpisen.sql" dialect="PostgreSQL" />
|
||||
<file url="file://$PROJECT_DIR$/TP1.sql" dialect="PostgreSQL" />
|
||||
<file url="file://$PROJECT_DIR$/../TP2/TP2.sql" dialect="PostgreSQL" />
|
||||
<file url="file://$PROJECT_DIR$/../TP3/TP3.sql" dialect="PostgreSQL" />
|
||||
<file url="file://$PROJECT_DIR$/../TP4/TP4.sql" dialect="PostgreSQL" />
|
||||
<file url="file://$PROJECT_DIR$/../TP4/postgres-sakila-schema.sql" dialect="PostgreSQL" />
|
||||
<file url="file://$PROJECT_DIR$/../TP5/TP5_1.sql" dialect="GenericSQL" />
|
||||
<file url="file://$PROJECT_DIR$/../TP6/TP6.sql" dialect="MongoDB" />
|
||||
<file url="PROJECT" dialect="PostgreSQL" />
|
||||
</component>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="SqlDialectMappings">
|
||||
<file url="file://$PROJECT_DIR$/ITtpisen.sql" dialect="PostgreSQL" />
|
||||
<file url="file://$PROJECT_DIR$/TP1.sql" dialect="PostgreSQL" />
|
||||
<file url="file://$PROJECT_DIR$/../TP2/TP2.sql" dialect="PostgreSQL" />
|
||||
<file url="file://$PROJECT_DIR$/../TP3/TP3.sql" dialect="PostgreSQL" />
|
||||
<file url="file://$PROJECT_DIR$/../TP4/TP4.sql" dialect="PostgreSQL" />
|
||||
<file url="file://$PROJECT_DIR$/../TP4/postgres-sakila-schema.sql" dialect="PostgreSQL" />
|
||||
<file url="file://$PROJECT_DIR$/../TP5/TP5_1.sql" dialect="GenericSQL" />
|
||||
<file url="file://$PROJECT_DIR$/../TP6/TP6.sql" dialect="MongoDB" />
|
||||
<file url="PROJECT" dialect="PostgreSQL" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -1,33 +1,33 @@
|
||||
drop table if exists personne cascade;
|
||||
|
||||
CREATE TABLE personne
|
||||
(
|
||||
login VARCHAR (20),
|
||||
nom VARCHAR (20) NOT NULL,
|
||||
prenom VARCHAR (20) NOT NULL,
|
||||
sexe VARCHAR(1) NOT NULL,
|
||||
PRIMARY KEY(login) );
|
||||
|
||||
drop table if exists service cascade;
|
||||
|
||||
CREATE TABLE service (
|
||||
num_service INTEGER PRIMARY KEY,
|
||||
nom_service VARCHAR(50) NOT NULL,
|
||||
ville VARCHAR(50) NOT NULL
|
||||
);
|
||||
|
||||
|
||||
drop table if exists employe cascade;
|
||||
|
||||
CREATE TABLE employe (
|
||||
numemp SERIAL PRIMARY KEY,
|
||||
nom VARCHAR(20) NOT NULL,
|
||||
fonction VARCHAR(10) NOT NULL,
|
||||
numemp_sup INTEGER,
|
||||
date_embauche DATE NOT NULL,
|
||||
salaire NUMERIC(7,2) NOT NULL,
|
||||
comm NUMERIC(7,2),
|
||||
num_service INTEGER NOT NULL,
|
||||
FOREIGN KEY (num_service) REFERENCES service (num_service),
|
||||
FOREIGN KEY (numemp_sup) REFERENCES employe(numemp)
|
||||
drop table if exists personne cascade;
|
||||
|
||||
CREATE TABLE personne
|
||||
(
|
||||
login VARCHAR (20),
|
||||
nom VARCHAR (20) NOT NULL,
|
||||
prenom VARCHAR (20) NOT NULL,
|
||||
sexe VARCHAR(1) NOT NULL,
|
||||
PRIMARY KEY(login) );
|
||||
|
||||
drop table if exists service cascade;
|
||||
|
||||
CREATE TABLE service (
|
||||
num_service INTEGER PRIMARY KEY,
|
||||
nom_service VARCHAR(50) NOT NULL,
|
||||
ville VARCHAR(50) NOT NULL
|
||||
);
|
||||
|
||||
|
||||
drop table if exists employe cascade;
|
||||
|
||||
CREATE TABLE employe (
|
||||
numemp SERIAL PRIMARY KEY,
|
||||
nom VARCHAR(20) NOT NULL,
|
||||
fonction VARCHAR(10) NOT NULL,
|
||||
numemp_sup INTEGER,
|
||||
date_embauche DATE NOT NULL,
|
||||
salaire NUMERIC(7,2) NOT NULL,
|
||||
comm NUMERIC(7,2),
|
||||
num_service INTEGER NOT NULL,
|
||||
FOREIGN KEY (num_service) REFERENCES service (num_service),
|
||||
FOREIGN KEY (numemp_sup) REFERENCES employe(numemp)
|
||||
);
|
||||
@@ -1,19 +1,19 @@
|
||||
INSERT INTO service values (10, 'siege','Paris');
|
||||
INSERT INTO service values (20, 'recherche','Brest');
|
||||
INSERT INTO service values (30, 'commercial','Lyon');
|
||||
INSERT INTO service values (40, 'production','Lille');
|
||||
|
||||
INSERT INTO employe values (839,'Leroy','pdg',null,'2001-11-17',5000,null,10);
|
||||
INSERT INTO employe values (566,'Dupont','directeur',839,'2001-04-02',2975,null,20);
|
||||
INSERT INTO employe values (902,'Duguet','ingenieur',566,'2001-12-03',3000,null,20);
|
||||
INSERT INTO employe values (369,'Lefevre','secretaire',902,'2000-12-17',800,null,20);
|
||||
INSERT INTO employe values (698,'Lenoir','directeur',839,'2001-05-01',2850,null,30);
|
||||
INSERT INTO employe values (499,'Lefort','commercial',698,'2001-02-20',1600,300,30);
|
||||
INSERT INTO employe values (521,'Garde','commercial',698,'2001-02-22',1250,500,30);
|
||||
INSERT INTO employe values (654,'Martin','commercial',698,'2001-09-28',1250,1400,30);
|
||||
INSERT INTO employe values (782,'Leclerc','directeur',839,'2001-06-09',2450,null,10);
|
||||
INSERT INTO employe values (788,'Lescaut','ingenieur',566,'2001-11-09',3000,null,20);
|
||||
INSERT INTO employe values (844,'Tournier','commercial',698,'2001-09-08',1500,0,30);
|
||||
INSERT INTO employe values (876,'Adam','secretaire',788,'2000-09-23',1100,null,20);
|
||||
INSERT INTO employe values (900,'Jan','secretaire',698,'2000-12-03',950,null,30);
|
||||
INSERT INTO service values (10, 'siege','Paris');
|
||||
INSERT INTO service values (20, 'recherche','Brest');
|
||||
INSERT INTO service values (30, 'commercial','Lyon');
|
||||
INSERT INTO service values (40, 'production','Lille');
|
||||
|
||||
INSERT INTO employe values (839,'Leroy','pdg',null,'2001-11-17',5000,null,10);
|
||||
INSERT INTO employe values (566,'Dupont','directeur',839,'2001-04-02',2975,null,20);
|
||||
INSERT INTO employe values (902,'Duguet','ingenieur',566,'2001-12-03',3000,null,20);
|
||||
INSERT INTO employe values (369,'Lefevre','secretaire',902,'2000-12-17',800,null,20);
|
||||
INSERT INTO employe values (698,'Lenoir','directeur',839,'2001-05-01',2850,null,30);
|
||||
INSERT INTO employe values (499,'Lefort','commercial',698,'2001-02-20',1600,300,30);
|
||||
INSERT INTO employe values (521,'Garde','commercial',698,'2001-02-22',1250,500,30);
|
||||
INSERT INTO employe values (654,'Martin','commercial',698,'2001-09-28',1250,1400,30);
|
||||
INSERT INTO employe values (782,'Leclerc','directeur',839,'2001-06-09',2450,null,10);
|
||||
INSERT INTO employe values (788,'Lescaut','ingenieur',566,'2001-11-09',3000,null,20);
|
||||
INSERT INTO employe values (844,'Tournier','commercial',698,'2001-09-08',1500,0,30);
|
||||
INSERT INTO employe values (876,'Adam','secretaire',788,'2000-09-23',1100,null,20);
|
||||
INSERT INTO employe values (900,'Jan','secretaire',698,'2000-12-03',950,null,30);
|
||||
INSERT INTO employe values (934,'Meunier','secretaire',782,'2002-01-23',1300,null,10);
|
||||
@@ -1,10 +1,10 @@
|
||||
SELECT nom, salaire FROM employe WHERE salaire >= 1000 AND salaire <=1500 ORDER BY salaire, nom;
|
||||
SELECT nom, salaire, comm FROM employe WHERE comm IS NOT NULL;
|
||||
SELECT nom, date_embauche FROM employe WHERE date_embauche >= '2001-01-01' AND date_embauche <= '2001-12-31' ORDER BY date_embauche;
|
||||
SELECT * FROM employe WHERE fonction != 'secretaire';
|
||||
SELECT nom, fonction, num_service FROM employe WHERE fonction = 'directeur' AND (num_service = 20 OR num_service = 30);
|
||||
SELECT nom FROM employe WHERE nom LIKE 'LE%' OR nom LIKE 'le%' OR nom LIKE 'Le%' OR nom LIKE 'lE%' ORDER BY LENGTH(nom), nom;
|
||||
SELECT nom, AGE(CURRENT_DATE, date_embauche) AS "Durée d'embauche" FROM employe ORDER BY AGE(CURRENT_DATE, date_embauche);
|
||||
SELECT nom, fonction, salaire, comm, salaire + COALESCE(comm, 0) AS "Revenu mensuel" FROM employe ORDER BY "Revenu mensuel";
|
||||
SELECT COUNT(*) FROM employe WHERE comm > salaire / 4;
|
||||
SELECT nom, salaire FROM employe WHERE salaire >= 1000 AND salaire <=1500 ORDER BY salaire, nom;
|
||||
SELECT nom, salaire, comm FROM employe WHERE comm IS NOT NULL;
|
||||
SELECT nom, date_embauche FROM employe WHERE date_embauche >= '2001-01-01' AND date_embauche <= '2001-12-31' ORDER BY date_embauche;
|
||||
SELECT * FROM employe WHERE fonction != 'secretaire';
|
||||
SELECT nom, fonction, num_service FROM employe WHERE fonction = 'directeur' AND (num_service = 20 OR num_service = 30);
|
||||
SELECT nom FROM employe WHERE nom LIKE 'LE%' OR nom LIKE 'le%' OR nom LIKE 'Le%' OR nom LIKE 'lE%' ORDER BY LENGTH(nom), nom;
|
||||
SELECT nom, AGE(CURRENT_DATE, date_embauche) AS "Durée d'embauche" FROM employe ORDER BY AGE(CURRENT_DATE, date_embauche);
|
||||
SELECT nom, fonction, salaire, comm, salaire + COALESCE(comm, 0) AS "Revenu mensuel" FROM employe ORDER BY "Revenu mensuel";
|
||||
SELECT COUNT(*) FROM employe WHERE comm > salaire / 4;
|
||||
SELECT MIN(salaire) AS "salaire min", ROUND(AVG(salaire),2) AS "salaire moy", MAX(salaire) AS "salaire max", ROUND(MAX(salaire)/MIN(salaire)) AS "rapport max/min" FROM employe;
|
||||
@@ -1,30 +1,30 @@
|
||||
-- 1/ Requêtes avec équi-jointure --
|
||||
--Afficher le nom, la fonction et le lieu de travail des employés, triés par lieu de travail et fonction--
|
||||
SELECT nom, fonction, ville FROM employe JOIN public.service s on employe.num_service = s.num_service ORDER BY ville, fonction;
|
||||
|
||||
-- Afficher le nom et la fonction des employés travaillant à Brest --
|
||||
SELECT nom, fonction FROM employe JOIN public.service s on employe.num_service = s.num_service WHERE ville = 'Brest';
|
||||
|
||||
-- Afficher le nom et la fonction des employés dont le supérieur hiérarchique n’est pas le PDG --
|
||||
SELECT nom, fonction FROM employe JOIN public.service s on employe.num_service = s.num_service WHERE numemp_sup <> 1;
|
||||
|
||||
-- Afficher le nom, la fonction, le nom et la fonction du supérieur hiérarchique (renommer ces 2 colonnes) et le lieu de travail des employés, triés par fonction et nom --
|
||||
SELECT nom, fonction, nom AS nom_sup, fonction AS fonction_sup, ville FROM employe JOIN public.service s on employe.num_service = s.num_service ORDER BY fonction, nom;
|
||||
|
||||
-- 2/ Requêtes avec "GROUP BY" --
|
||||
-- Afficher le nombre d'employés par service --
|
||||
SELECT nom_service, COUNT(*) FROM employe JOIN public.service s on employe.num_service = s.num_service GROUP BY nom_service;
|
||||
|
||||
-- Afficher le lieu de travail, le nombre d’employés et leur salaire moyen, par lieu de travail --
|
||||
SELECT ville, COUNT(*), AVG(salaire) FROM employe JOIN public.service s on employe.num_service = s.num_service GROUP BY ville;
|
||||
|
||||
-- 3/ Requêtes avec imbrication de "SELECT" --
|
||||
-- Afficher le numéro et nom des services qui n’ont aucun employé --
|
||||
SELECT num_service, nom_service FROM service WHERE num_service NOT IN (SELECT num_service FROM employe);
|
||||
|
||||
-- 4/ Bonus --
|
||||
-- Reprendre la quatrième requêtes de la partie 1), en affichant aussi le PDG (indice : jointure externe) --
|
||||
SELECT nom, fonction, nom AS nom_sup, fonction AS fonction_sup, ville FROM employe LEFT JOIN public.service s on employe.num_service = s.num_service ORDER BY fonction, nom;
|
||||
|
||||
-- Rechercher plusieurs variantes de la requête de la partie 3) : avec sous-select synchronisé, avec jointure externe--
|
||||
-- 1/ Requêtes avec équi-jointure --
|
||||
--Afficher le nom, la fonction et le lieu de travail des employés, triés par lieu de travail et fonction--
|
||||
SELECT nom, fonction, ville FROM employe JOIN public.service s on employe.num_service = s.num_service ORDER BY ville, fonction;
|
||||
|
||||
-- Afficher le nom et la fonction des employés travaillant à Brest --
|
||||
SELECT nom, fonction FROM employe JOIN public.service s on employe.num_service = s.num_service WHERE ville = 'Brest';
|
||||
|
||||
-- Afficher le nom et la fonction des employés dont le supérieur hiérarchique n’est pas le PDG --
|
||||
SELECT nom, fonction FROM employe JOIN public.service s on employe.num_service = s.num_service WHERE numemp_sup <> 1;
|
||||
|
||||
-- Afficher le nom, la fonction, le nom et la fonction du supérieur hiérarchique (renommer ces 2 colonnes) et le lieu de travail des employés, triés par fonction et nom --
|
||||
SELECT nom, fonction, nom AS nom_sup, fonction AS fonction_sup, ville FROM employe JOIN public.service s on employe.num_service = s.num_service ORDER BY fonction, nom;
|
||||
|
||||
-- 2/ Requêtes avec "GROUP BY" --
|
||||
-- Afficher le nombre d'employés par service --
|
||||
SELECT nom_service, COUNT(*) FROM employe JOIN public.service s on employe.num_service = s.num_service GROUP BY nom_service;
|
||||
|
||||
-- Afficher le lieu de travail, le nombre d’employés et leur salaire moyen, par lieu de travail --
|
||||
SELECT ville, COUNT(*), AVG(salaire) FROM employe JOIN public.service s on employe.num_service = s.num_service GROUP BY ville;
|
||||
|
||||
-- 3/ Requêtes avec imbrication de "SELECT" --
|
||||
-- Afficher le numéro et nom des services qui n’ont aucun employé --
|
||||
SELECT num_service, nom_service FROM service WHERE num_service NOT IN (SELECT num_service FROM employe);
|
||||
|
||||
-- 4/ Bonus --
|
||||
-- Reprendre la quatrième requêtes de la partie 1), en affichant aussi le PDG (indice : jointure externe) --
|
||||
SELECT nom, fonction, nom AS nom_sup, fonction AS fonction_sup, ville FROM employe LEFT JOIN public.service s on employe.num_service = s.num_service ORDER BY fonction, nom;
|
||||
|
||||
-- Rechercher plusieurs variantes de la requête de la partie 3) : avec sous-select synchronisé, avec jointure externe--
|
||||
SELECT nom_service, COUNT(*) FROM service LEFT JOIN employe ON service.num_service = employe.num_service GROUP BY nom_service;
|
||||
@@ -1,58 +1,58 @@
|
||||
--Attention : Ne faites pas de commit avant que ce ne soit demandé.--
|
||||
--Insérer un nouvel employé, de fonction directeur, embauché à la date d’aujourd’hui, dans le service 40. Son supérieur hiérarchique est le PDG (numemp_sup=839 ). Vous pouvez choisir son numéro (numemp), son nom et son salaire--
|
||||
INSERT INTO employe (numemp, nom, fonction, date_embauche, salaire, numemp_sup, num_service) VALUES (1000, 'Marquet', 'Directeur', '2023-11-23', 10000, 839, 40);
|
||||
|
||||
--Insérer un second employé, de fonction ingenieur, encore embauché à la date d’aujourd’hui dans le service 40. Son supérieur hiérarchique est le directeur embauché précédemment.--
|
||||
INSERT INTO employe(numemp, nom, fonction, date_embauche, salaire, numemp_sup, num_service) VALUES (1001, 'Duval', 'Ingénieur', '2023-11-23', 5000, 1000, 40);
|
||||
|
||||
-- Vérifiez, avec un select, que vous voyez bien ces deux employés.--
|
||||
SELECT * FROM employe WHERE nom='Marquet' OR nom='Duval';
|
||||
|
||||
--Faites, dans la session principale, un commit pour valider la transaction (=insertion des deux nouveaux employés).--
|
||||
COMMIT;
|
||||
|
||||
-- Vérifiez, avec un select, que maintenant vous voyez bien ces deux nouveaux employés dans la seconde session ouverte--
|
||||
SELECT * FROM employe WHERE nom='MARQUET' OR nom='DUPONT';
|
||||
|
||||
--Dans la session principale, insérer un nouvel employé, de fonction directeur, embauché à la date d’aujourd’hui, dans le service 50. Est-ce que PostgreSQL l’accepte ? Si non, expliquer, puis passer au paragraphe 2 suivant--
|
||||
--INSERT INTO employe (numemp, nom, fonction, date_embauche, salaire, numemp_sup, num_service) VALUES (1002, 'DUPUIS', 'Directeur', '2023-11-23', 10000, 839, 50);--
|
||||
-- PostgreSQL n'accepte pas l'insertion car le service 50 n'existe pas. Il faut donc créer le service 50 avant d'insérer l'employé.
|
||||
|
||||
-- Augmentez le salaire de tous les employés de 10%. Vérifiez par un select tous les salaires toujours sans commit--
|
||||
UPDATE employe SET salaire = salaire * 1.1;
|
||||
SELECT * FROM employe;
|
||||
|
||||
--Faites un rollback.--
|
||||
ROLLBACK;
|
||||
SELECT * FROM employe;
|
||||
|
||||
--Mettez à jour la colonne numemp_sup de l’employé Dupont : donnez-lui la valeur 999. Est-ce que Postgresql l’accepte ? Expliquer--
|
||||
UPDATE employe SET numemp_sup = 999 WHERE nom = 'Dupont';
|
||||
-- PostgreSQL n'accepte pas l'update car le numéro 999 n'existe pas. Il faut donc créer l'employé 999 avant de mettre à jour l'employé Dupont.
|
||||
|
||||
--Faites un commit. Regardez, avec un select, si Dupont a été modifié. Si non, pourquoi ?--
|
||||
COMMIT;
|
||||
SELECT * FROM employe WHERE nom = 'Dupont';
|
||||
-- Dupont n'a pas été modifié car le commit n'a pas été fait.--
|
||||
|
||||
--Supprimez les employés du service 40. Est-ce que Postgresql l’accepte ?--
|
||||
DELETE FROM employe WHERE num_service = 40;
|
||||
-- Oui PostgreSQL accepte la suppression car le service 40 existe.--
|
||||
|
||||
-- Supprimez le PDG. Est-ce que Postgresql l’accepte ? Si non, trouver une méthode pour pouvoir réaliser cette suppression en maintenant l’intégrité référentielle de la base--
|
||||
DELETE FROM employe WHERE numemp = 839;
|
||||
-- PostgreSQL n'accepte pas la suppression car le PDG est le supérieur hiérarchique de l'employé 1000. Il faut donc modifier le supérieur hiérarchique de l'employé 1000 avant de supprimer le PDG.--
|
||||
|
||||
-- Faites un rollback.--
|
||||
ROLLBACK;
|
||||
|
||||
--Recréez la clé étrangère sur numemp_sup (alter table drop foreign key ... suivi de alter table add foreign key ..., cherchez la syntaxe précise en ligne), pour y rajouter une action référentielle de type on delete cascade--
|
||||
ALTER TABLE employe DROP CONSTRAINT employe_numemp_sup_fkey;
|
||||
ALTER TABLE employe ADD CONSTRAINT employe_numemp_sup_fkey FOREIGN KEY (numemp_sup) REFERENCES employe (numemp) ON DELETE CASCADE;
|
||||
|
||||
--Réessayez de supprimer le PDG--
|
||||
DELETE FROM employe WHERE numemp = 839;
|
||||
|
||||
ROLLBACK;
|
||||
|
||||
--Attention : Ne faites pas de commit avant que ce ne soit demandé.--
|
||||
--Insérer un nouvel employé, de fonction directeur, embauché à la date d’aujourd’hui, dans le service 40. Son supérieur hiérarchique est le PDG (numemp_sup=839 ). Vous pouvez choisir son numéro (numemp), son nom et son salaire--
|
||||
INSERT INTO employe (numemp, nom, fonction, date_embauche, salaire, numemp_sup, num_service) VALUES (1000, 'Marquet', 'Directeur', '2023-11-23', 10000, 839, 40);
|
||||
|
||||
--Insérer un second employé, de fonction ingenieur, encore embauché à la date d’aujourd’hui dans le service 40. Son supérieur hiérarchique est le directeur embauché précédemment.--
|
||||
INSERT INTO employe(numemp, nom, fonction, date_embauche, salaire, numemp_sup, num_service) VALUES (1001, 'Duval', 'Ingénieur', '2023-11-23', 5000, 1000, 40);
|
||||
|
||||
-- Vérifiez, avec un select, que vous voyez bien ces deux employés.--
|
||||
SELECT * FROM employe WHERE nom='Marquet' OR nom='Duval';
|
||||
|
||||
--Faites, dans la session principale, un commit pour valider la transaction (=insertion des deux nouveaux employés).--
|
||||
COMMIT;
|
||||
|
||||
-- Vérifiez, avec un select, que maintenant vous voyez bien ces deux nouveaux employés dans la seconde session ouverte--
|
||||
SELECT * FROM employe WHERE nom='MARQUET' OR nom='DUPONT';
|
||||
|
||||
--Dans la session principale, insérer un nouvel employé, de fonction directeur, embauché à la date d’aujourd’hui, dans le service 50. Est-ce que PostgreSQL l’accepte ? Si non, expliquer, puis passer au paragraphe 2 suivant--
|
||||
--INSERT INTO employe (numemp, nom, fonction, date_embauche, salaire, numemp_sup, num_service) VALUES (1002, 'DUPUIS', 'Directeur', '2023-11-23', 10000, 839, 50);--
|
||||
-- PostgreSQL n'accepte pas l'insertion car le service 50 n'existe pas. Il faut donc créer le service 50 avant d'insérer l'employé.
|
||||
|
||||
-- Augmentez le salaire de tous les employés de 10%. Vérifiez par un select tous les salaires toujours sans commit--
|
||||
UPDATE employe SET salaire = salaire * 1.1;
|
||||
SELECT * FROM employe;
|
||||
|
||||
--Faites un rollback.--
|
||||
ROLLBACK;
|
||||
SELECT * FROM employe;
|
||||
|
||||
--Mettez à jour la colonne numemp_sup de l’employé Dupont : donnez-lui la valeur 999. Est-ce que Postgresql l’accepte ? Expliquer--
|
||||
UPDATE employe SET numemp_sup = 999 WHERE nom = 'Dupont';
|
||||
-- PostgreSQL n'accepte pas l'update car le numéro 999 n'existe pas. Il faut donc créer l'employé 999 avant de mettre à jour l'employé Dupont.
|
||||
|
||||
--Faites un commit. Regardez, avec un select, si Dupont a été modifié. Si non, pourquoi ?--
|
||||
COMMIT;
|
||||
SELECT * FROM employe WHERE nom = 'Dupont';
|
||||
-- Dupont n'a pas été modifié car le commit n'a pas été fait.--
|
||||
|
||||
--Supprimez les employés du service 40. Est-ce que Postgresql l’accepte ?--
|
||||
DELETE FROM employe WHERE num_service = 40;
|
||||
-- Oui PostgreSQL accepte la suppression car le service 40 existe.--
|
||||
|
||||
-- Supprimez le PDG. Est-ce que Postgresql l’accepte ? Si non, trouver une méthode pour pouvoir réaliser cette suppression en maintenant l’intégrité référentielle de la base--
|
||||
DELETE FROM employe WHERE numemp = 839;
|
||||
-- PostgreSQL n'accepte pas la suppression car le PDG est le supérieur hiérarchique de l'employé 1000. Il faut donc modifier le supérieur hiérarchique de l'employé 1000 avant de supprimer le PDG.--
|
||||
|
||||
-- Faites un rollback.--
|
||||
ROLLBACK;
|
||||
|
||||
--Recréez la clé étrangère sur numemp_sup (alter table drop foreign key ... suivi de alter table add foreign key ..., cherchez la syntaxe précise en ligne), pour y rajouter une action référentielle de type on delete cascade--
|
||||
ALTER TABLE employe DROP CONSTRAINT employe_numemp_sup_fkey;
|
||||
ALTER TABLE employe ADD CONSTRAINT employe_numemp_sup_fkey FOREIGN KEY (numemp_sup) REFERENCES employe (numemp) ON DELETE CASCADE;
|
||||
|
||||
--Réessayez de supprimer le PDG--
|
||||
DELETE FROM employe WHERE numemp = 839;
|
||||
|
||||
ROLLBACK;
|
||||
|
||||
SELECT * FROM employe WHERE numemp = 839;
|
||||
@@ -1,12 +1,12 @@
|
||||
select title, name, release_year from film join film_category fc using(film_id) join category c on c.category_id=fc.category_id;
|
||||
update actor set first_name='BRAD' where last_name='PITT';
|
||||
select first_name, last_name from actor join film_actor fa using(actor_id) where fa.film_id=(select film_id from film where title='AMADEUS HOLY');
|
||||
select title, (select count(*) from actor join film_actor fa using(actor_id) where fa.film_id=f.film_id) as "Nombre_acteurs" from film f order by "Nombre_acteurs" desc;
|
||||
select a.first_name, a.last_name, (select count(*) from film_actor fa where fa.actor_id=a.actor_id) as "Nombre_films" from actor a order by "Nombre_films" desc limit 10;
|
||||
select first_name, last_name, (select sum(amount) from payment join rental r using(rental_id) where r.customer_id=c.customer_id) as "Montants" from customer c order by "Montants" desc limit 10;
|
||||
select name, city, (select sum(amount) from payment p where s.id=p.staff_id) as "Montants" from staff_list s;
|
||||
select name, (select sum(amount) from payment p where s.id=p.staff_id and p.payment_date>='2005-06-15' and p.payment_date<='2005-07-14') as "Montants" from staff_list s;
|
||||
select date(p.payment_date), s.name, s.city, sum(p.amount) as "Montant" from staff_list s left join payment p on s.id=p.staff_id and date(p.payment_date)>='2005-06-15' and date(p.payment_date)<='2005-07-14' group by date(p.payment_date), s.name, s.city order by date(p.payment_date);
|
||||
select f.title, count(*) as "Nb loué" from film f join inventory using(film_id) join rental using(inventory_id) join payment using(rental_id) group by f.title order by "Nb loué" desc limit 10;
|
||||
select f.title, count(*) as "Nb loué" from film f join inventory i using(film_id) join store using(store_id) join address a using(address_id) join city c using(city_id) join rental r on r.inventory_id=i.inventory_id join payment using(rental_id) where a.address='47 MySakila Drive' and c.city='Lethbridge' group by f.title order by "Nb loué" desc limit 10;
|
||||
select f.title, avg(age(r.return_date,r.rental_date)) as "Durée" from film f join inventory using(film_id) join rental r using(inventory_id) group by f.title order by "Durée" desc limit 10;
|
||||
select title, name, release_year from film join film_category fc using(film_id) join category c on c.category_id=fc.category_id;
|
||||
update actor set first_name='BRAD' where last_name='PITT';
|
||||
select first_name, last_name from actor join film_actor fa using(actor_id) where fa.film_id=(select film_id from film where title='AMADEUS HOLY');
|
||||
select title, (select count(*) from actor join film_actor fa using(actor_id) where fa.film_id=f.film_id) as "Nombre_acteurs" from film f order by "Nombre_acteurs" desc;
|
||||
select a.first_name, a.last_name, (select count(*) from film_actor fa where fa.actor_id=a.actor_id) as "Nombre_films" from actor a order by "Nombre_films" desc limit 10;
|
||||
select first_name, last_name, (select sum(amount) from payment join rental r using(rental_id) where r.customer_id=c.customer_id) as "Montants" from customer c order by "Montants" desc limit 10;
|
||||
select name, city, (select sum(amount) from payment p where s.id=p.staff_id) as "Montants" from staff_list s;
|
||||
select name, (select sum(amount) from payment p where s.id=p.staff_id and p.payment_date>='2005-06-15' and p.payment_date<='2005-07-14') as "Montants" from staff_list s;
|
||||
select date(p.payment_date), s.name, s.city, sum(p.amount) as "Montant" from staff_list s left join payment p on s.id=p.staff_id and date(p.payment_date)>='2005-06-15' and date(p.payment_date)<='2005-07-14' group by date(p.payment_date), s.name, s.city order by date(p.payment_date);
|
||||
select f.title, count(*) as "Nb loué" from film f join inventory using(film_id) join rental using(inventory_id) join payment using(rental_id) group by f.title order by "Nb loué" desc limit 10;
|
||||
select f.title, count(*) as "Nb loué" from film f join inventory i using(film_id) join store using(store_id) join address a using(address_id) join city c using(city_id) join rental r on r.inventory_id=i.inventory_id join payment using(rental_id) where a.address='47 MySakila Drive' and c.city='Lethbridge' group by f.title order by "Nb loué" desc limit 10;
|
||||
select f.title, avg(age(r.return_date,r.rental_date)) as "Durée" from film f join inventory using(film_id) join rental r using(inventory_id) group by f.title order by "Durée" desc limit 10;
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,19 +1,19 @@
|
||||
CREATE DATABASE testbdd;
|
||||
CREATE ROLE tp6 WITH LOGIN PASSWORD 'a';
|
||||
GRANT ALL PRIVILEGES ON DATABASE testbdd TO testuser;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS public."table1" (
|
||||
id SERIAL PRIMARY KEY,
|
||||
username VARCHAR(50) NOT NULL,
|
||||
password VARCHAR(50) NOT NULL,
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS public."table2" (
|
||||
table2_id SERIAL PRIMARY KEY,
|
||||
poulpe VARCHAR(50) NOT NULL,
|
||||
);
|
||||
|
||||
--A partir de tp6 créer un deuxième utilisateur (rôle) ayant accès à la table "table1" uniquement avec les privilèges insert, select, update et delete--
|
||||
CREATE ROLE tp6_2 WITH LOGIN PASSWORD 'a';
|
||||
GRANT INSERT, SELECT, UPDATE, DELETE ON TABLE "table1" TO tp6_2;
|
||||
|
||||
CREATE DATABASE testbdd;
|
||||
CREATE ROLE tp6 WITH LOGIN PASSWORD 'a';
|
||||
GRANT ALL PRIVILEGES ON DATABASE testbdd TO testuser;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS public."table1" (
|
||||
id SERIAL PRIMARY KEY,
|
||||
username VARCHAR(50) NOT NULL,
|
||||
password VARCHAR(50) NOT NULL,
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS public."table2" (
|
||||
table2_id SERIAL PRIMARY KEY,
|
||||
poulpe VARCHAR(50) NOT NULL,
|
||||
);
|
||||
|
||||
--A partir de tp6 créer un deuxième utilisateur (rôle) ayant accès à la table "table1" uniquement avec les privilèges insert, select, update et delete--
|
||||
CREATE ROLE tp6_2 WITH LOGIN PASSWORD 'a';
|
||||
GRANT INSERT, SELECT, UPDATE, DELETE ON TABLE "table1" TO tp6_2;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
--Créer une vue permettant de visualiser le nom, la fonction, le salaire + la commission, le nom du supérieur hiérarchique, le nom du service et la ville des employés--
|
||||
CREATE VIEW vue_employe AS SELECT e.nom, e.fonction, e.salaire, e.comm, e.numemp_sup, s.nom_service, s.ville FROM employe e, service s, employe e2 WHERE e.numemp_sup = e2.numemp AND e.num_service = e2.num_service;
|
||||
|
||||
|
||||
-- Construire une requête sur cette vue permettant d’afficher uniquement les employés du service "siege"--
|
||||
SELECT * FROM vue_employe WHERE nom_service = 'siege';
|
||||
|
||||
--Créer un nouvel utilisateur n’ayant accès qu’à cette vue (et vérifier ! !).--
|
||||
CREATE ROLE tp5_2;
|
||||
--Créer une vue permettant de visualiser le nom, la fonction, le salaire + la commission, le nom du supérieur hiérarchique, le nom du service et la ville des employés--
|
||||
CREATE VIEW vue_employe AS SELECT e.nom, e.fonction, e.salaire, e.comm, e.numemp_sup, s.nom_service, s.ville FROM employe e, service s, employe e2 WHERE e.numemp_sup = e2.numemp AND e.num_service = e2.num_service;
|
||||
|
||||
|
||||
-- Construire une requête sur cette vue permettant d’afficher uniquement les employés du service "siege"--
|
||||
SELECT * FROM vue_employe WHERE nom_service = 'siege';
|
||||
|
||||
--Créer un nouvel utilisateur n’ayant accès qu’à cette vue (et vérifier ! !).--
|
||||
CREATE ROLE tp5_2;
|
||||
GRANT SELECT ON vue_employe TO tp5_2;
|
||||
@@ -1,16 +1,16 @@
|
||||
--Créer un champ salaireetcom de type double--
|
||||
ALTER TABLE employe ADD COLUMN salaireetcom double precision;
|
||||
|
||||
-- Créer un déclencheur levant une alerte si la somme de salaire et commission indiquée dans salaireetcom est inférieure au montant du salaire--
|
||||
UPDATE employe
|
||||
SET salaireetcom = (SELECT salaire + COALESCE(comm, '0'));
|
||||
|
||||
CREATE FUNCTION negative_salaire() RETURNS trigger AS $negative_salaire$
|
||||
BEGIN
|
||||
IF NEW.salaire < 0 THEN
|
||||
RAISE EXCEPTION 'Le salaire ne peut pas être négatif';
|
||||
END IF;
|
||||
END;
|
||||
$negative_salaire$ LANGUAGE plpgsql;
|
||||
|
||||
--Créer un champ salaireetcom de type double--
|
||||
ALTER TABLE employe ADD COLUMN salaireetcom double precision;
|
||||
|
||||
-- Créer un déclencheur levant une alerte si la somme de salaire et commission indiquée dans salaireetcom est inférieure au montant du salaire--
|
||||
UPDATE employe
|
||||
SET salaireetcom = (SELECT salaire + COALESCE(comm, '0'));
|
||||
|
||||
CREATE FUNCTION negative_salaire() RETURNS trigger AS $negative_salaire$
|
||||
BEGIN
|
||||
IF NEW.salaire < 0 THEN
|
||||
RAISE EXCEPTION 'Le salaire ne peut pas être négatif';
|
||||
END IF;
|
||||
END;
|
||||
$negative_salaire$ LANGUAGE plpgsql;
|
||||
|
||||
CREATE TRIGGER negative_salaire BEFORE INSERT OR UPDATE ON employe FOR EACH ROW EXECUTE PROCEDURE negative_salaire();
|
||||
@@ -1,16 +1,16 @@
|
||||
--Construire la requête qui affiche la durée moyenne des locations par catégorie de films. Le résultat sera présenté dans l’ordre décroissant des durées de location moyenne par catégorie.--
|
||||
--rental_duration n'existe pas, il y a rental_date et return_date--
|
||||
SELECT category.name, AVG(rental.return_date - rental.rental_date) AS "Durée moyenne de location" FROM category, film_category, rental WHERE category.category_id = film_category.category_id AND film_category.film_id = rental.inventory_id GROUP BY category.name ORDER BY AVG(rental.return_date - rental.rental_date) DESC;
|
||||
|
||||
--Utiliser EXPLAIN ANALYZE avant le SELECT pour visualiser la réalisation de la requête et mesurer le temps d’exécution.--
|
||||
EXPLAIN ANALYZE SELECT category.name, AVG(rental.return_date - rental.rental_date) AS "Durée moyenne de location" FROM category, film_category, rental WHERE category.category_id = film_category.category_id AND film_category.film_id = rental.inventory_id GROUP BY category.name ORDER BY AVG(rental.return_date - rental.rental_date) DESC;
|
||||
|
||||
--Créer un index sur le champs rental_duration de la table film, refaire la requête précédente et comparer le temps (en utilisant EXPLAIN ANALYZE)--
|
||||
CREATE INDEX idx_rental_duration ON film (rental_duration);
|
||||
EXPLAIN ANALYZE SELECT category.name, AVG(rental.return_date - rental.rental_date) AS "Durée moyenne de location" FROM category, film_category, rental WHERE category.category_id = film_category.category_id AND film_category.film_id = rental.inventory_id GROUP BY category.name ORDER BY AVG(rental.return_date - rental.rental_date) DESC;
|
||||
|
||||
--Déterminer la taille des tables et indexes.--
|
||||
SELECT pg_size_pretty(pg_total_relation_size('film'));
|
||||
SELECT pg_size_pretty(pg_total_relation_size('film_category'));
|
||||
SELECT pg_size_pretty(pg_total_relation_size('category'));
|
||||
--Construire la requête qui affiche la durée moyenne des locations par catégorie de films. Le résultat sera présenté dans l’ordre décroissant des durées de location moyenne par catégorie.--
|
||||
--rental_duration n'existe pas, il y a rental_date et return_date--
|
||||
SELECT category.name, AVG(rental.return_date - rental.rental_date) AS "Durée moyenne de location" FROM category, film_category, rental WHERE category.category_id = film_category.category_id AND film_category.film_id = rental.inventory_id GROUP BY category.name ORDER BY AVG(rental.return_date - rental.rental_date) DESC;
|
||||
|
||||
--Utiliser EXPLAIN ANALYZE avant le SELECT pour visualiser la réalisation de la requête et mesurer le temps d’exécution.--
|
||||
EXPLAIN ANALYZE SELECT category.name, AVG(rental.return_date - rental.rental_date) AS "Durée moyenne de location" FROM category, film_category, rental WHERE category.category_id = film_category.category_id AND film_category.film_id = rental.inventory_id GROUP BY category.name ORDER BY AVG(rental.return_date - rental.rental_date) DESC;
|
||||
|
||||
--Créer un index sur le champs rental_duration de la table film, refaire la requête précédente et comparer le temps (en utilisant EXPLAIN ANALYZE)--
|
||||
CREATE INDEX idx_rental_duration ON film (rental_duration);
|
||||
EXPLAIN ANALYZE SELECT category.name, AVG(rental.return_date - rental.rental_date) AS "Durée moyenne de location" FROM category, film_category, rental WHERE category.category_id = film_category.category_id AND film_category.film_id = rental.inventory_id GROUP BY category.name ORDER BY AVG(rental.return_date - rental.rental_date) DESC;
|
||||
|
||||
--Déterminer la taille des tables et indexes.--
|
||||
SELECT pg_size_pretty(pg_total_relation_size('film'));
|
||||
SELECT pg_size_pretty(pg_total_relation_size('film_category'));
|
||||
SELECT pg_size_pretty(pg_total_relation_size('category'));
|
||||
SELECT pg_size_pretty(pg_total_relation_size('rental'));
|
||||
@@ -1,79 +1,79 @@
|
||||
//db.machin = commande a mettre dans la console mongosh
|
||||
|
||||
// le nombre d’acteurs importés
|
||||
SELECT COUNT(*) FROM acteur;
|
||||
db.acteur.count();
|
||||
// le nombre de films importés
|
||||
SELECT COUNT(*) FROM film;
|
||||
db.film.count();
|
||||
|
||||
SELECT name, age, occupation FROM acteur WHERE name="Doreen Riley";
|
||||
db.acteur.find({name:"Doreen Riley"});
|
||||
|
||||
SELECT COUNT(*) FROM acteur WHERE age >= 18 AND age <= 25;
|
||||
db.acteur.find({age:{$gte:18, $lte:25}});
|
||||
|
||||
SELECT COUNT(*) FROM acteur WHERE age > 18 AND age < 25;
|
||||
db.acteur.find({age:{$gt:18, $lt:25}});
|
||||
|
||||
SELECT COUNT(*) FROM acteur WHERE occupation="artist";
|
||||
db.acteur.find({occupation:"artist"});
|
||||
|
||||
// Nombre d’acteurs dont le nom contient "john" en ne tenant pas compte des majuscules
|
||||
SELECT COUNT(*) FROM acteur WHERE name LIKE "%john%";
|
||||
db.acteur.find({name:/john/i});
|
||||
|
||||
//Afficher les différents métiers et le nombre d’acteurs par métier
|
||||
SELECT occupation, COUNT(*) FROM acteur GROUP BY occupation;
|
||||
db.acteur.aggregate([{$group:{_id:"$occupation", count:{$sum:1}}}]);
|
||||
|
||||
//Afficher les 10 acteurs les plus vieux en affichant que le nom et l’age
|
||||
SELECT name, age FROM acteur ORDER BY age DESC LIMIT 10;
|
||||
db.acteur.find({},{name:1, age:1}).sort({age:-1}).limit(10);
|
||||
|
||||
//Afficher le nombre d’acteurs ayant joué dans le film dont l’id est 573
|
||||
SELECT COUNT(*) FROM acteur WHERE movies.movieid=573;
|
||||
db.acteur.find({"movies.movieid":573}).count();
|
||||
|
||||
SELECT COUNT(*) FROM acteur WHERE movies.movieid=260 OR movies.movieid=1196 OR movies.movieid=1210;
|
||||
db.acteur.find({"movies.movieid":{$in:[260,1196,1210]}}).count();
|
||||
|
||||
//INSERTION
|
||||
SELECT * FROM film WHERE title="Interstellar";
|
||||
// Insérer dans la collection film le film de votre choix, puis faire la requête permettant de le retrouver
|
||||
db.film.insertOne({title:"Interstellar", genre:["Adventure | Drama | Sci-Fi"]});
|
||||
|
||||
SELECT * FROM film WHERE title="Interstellar";
|
||||
db.film.find({title:"Interstellar"});
|
||||
|
||||
//Modifier votre enregistrement de film pour lui ajouter une date (dans le titre), puis ré-afficher votre enregistrement
|
||||
db.film.updateOne({title:"Interstellar"},{$set:{title:"Interstellar (2014)"}});
|
||||
|
||||
SELECT * FROM film WHERE title="Interstellar (2014)";
|
||||
db.film.find({title:"Interstellar (2014)"});
|
||||
|
||||
//Modifier votre enregistrement de film pour lui ajouter une information , puis ré-afficher votre enregistrement
|
||||
db.film.updateOne({title:"Interstellar (2014)"},{$set:{title:"Interstellar (2014)", info:{director:"Christopher Nolan", year:2014}}});
|
||||
|
||||
SELECT * FROM film WHERE title="Interstellar (2014)";
|
||||
db.film.find({title:"Interstellar (2014)"});
|
||||
|
||||
//Insérer dans la collection film un autre film de votre choix, puis faire la requête permettant de le retrouver, puis de le supprimer
|
||||
db.film.insertOne({title:"Avatar : La Voie de l'eau (2022)", genre:["Action | Adventure | Fantasy"]});
|
||||
|
||||
SELECT * FROM film WHERE title="Avatar : La Voie de l'eau (2022)";
|
||||
db.film.find({title:"Avatar : La Voie de l'eau (2022)"});
|
||||
|
||||
db.film.deleteOne({title:"Avatar : La Voie de l'eau (2022)"});
|
||||
|
||||
//OPTIMISATION DE LA COLLECTION ACTEUR
|
||||
// Faire une requête de recherche des acteurs dont l’age est 32 et déterminer le temps mis par la requête
|
||||
SELECT * FROM acteur WHERE age=32;
|
||||
db.acteur.find({age:32}).explain("executionStats");
|
||||
// executionTimeMillis: 2,
|
||||
//Faire un index sur l’age
|
||||
db.acteur.createIndex({age:1});
|
||||
//Faire une requête de recherche des acteurs dont l’age est 32 et déterminer le temps mis par la requête
|
||||
SELECT * FROM acteur WHERE age=32;
|
||||
db.acteur.find({age:32}).explain("executionStats");
|
||||
//db.machin = commande a mettre dans la console mongosh
|
||||
|
||||
// le nombre d’acteurs importés
|
||||
SELECT COUNT(*) FROM acteur;
|
||||
db.acteur.count();
|
||||
// le nombre de films importés
|
||||
SELECT COUNT(*) FROM film;
|
||||
db.film.count();
|
||||
|
||||
SELECT name, age, occupation FROM acteur WHERE name="Doreen Riley";
|
||||
db.acteur.find({name:"Doreen Riley"});
|
||||
|
||||
SELECT COUNT(*) FROM acteur WHERE age >= 18 AND age <= 25;
|
||||
db.acteur.find({age:{$gte:18, $lte:25}});
|
||||
|
||||
SELECT COUNT(*) FROM acteur WHERE age > 18 AND age < 25;
|
||||
db.acteur.find({age:{$gt:18, $lt:25}});
|
||||
|
||||
SELECT COUNT(*) FROM acteur WHERE occupation="artist";
|
||||
db.acteur.find({occupation:"artist"});
|
||||
|
||||
// Nombre d’acteurs dont le nom contient "john" en ne tenant pas compte des majuscules
|
||||
SELECT COUNT(*) FROM acteur WHERE name LIKE "%john%";
|
||||
db.acteur.find({name:/john/i});
|
||||
|
||||
//Afficher les différents métiers et le nombre d’acteurs par métier
|
||||
SELECT occupation, COUNT(*) FROM acteur GROUP BY occupation;
|
||||
db.acteur.aggregate([{$group:{_id:"$occupation", count:{$sum:1}}}]);
|
||||
|
||||
//Afficher les 10 acteurs les plus vieux en affichant que le nom et l’age
|
||||
SELECT name, age FROM acteur ORDER BY age DESC LIMIT 10;
|
||||
db.acteur.find({},{name:1, age:1}).sort({age:-1}).limit(10);
|
||||
|
||||
//Afficher le nombre d’acteurs ayant joué dans le film dont l’id est 573
|
||||
SELECT COUNT(*) FROM acteur WHERE movies.movieid=573;
|
||||
db.acteur.find({"movies.movieid":573}).count();
|
||||
|
||||
SELECT COUNT(*) FROM acteur WHERE movies.movieid=260 OR movies.movieid=1196 OR movies.movieid=1210;
|
||||
db.acteur.find({"movies.movieid":{$in:[260,1196,1210]}}).count();
|
||||
|
||||
//INSERTION
|
||||
SELECT * FROM film WHERE title="Interstellar";
|
||||
// Insérer dans la collection film le film de votre choix, puis faire la requête permettant de le retrouver
|
||||
db.film.insertOne({title:"Interstellar", genre:["Adventure | Drama | Sci-Fi"]});
|
||||
|
||||
SELECT * FROM film WHERE title="Interstellar";
|
||||
db.film.find({title:"Interstellar"});
|
||||
|
||||
//Modifier votre enregistrement de film pour lui ajouter une date (dans le titre), puis ré-afficher votre enregistrement
|
||||
db.film.updateOne({title:"Interstellar"},{$set:{title:"Interstellar (2014)"}});
|
||||
|
||||
SELECT * FROM film WHERE title="Interstellar (2014)";
|
||||
db.film.find({title:"Interstellar (2014)"});
|
||||
|
||||
//Modifier votre enregistrement de film pour lui ajouter une information , puis ré-afficher votre enregistrement
|
||||
db.film.updateOne({title:"Interstellar (2014)"},{$set:{title:"Interstellar (2014)", info:{director:"Christopher Nolan", year:2014}}});
|
||||
|
||||
SELECT * FROM film WHERE title="Interstellar (2014)";
|
||||
db.film.find({title:"Interstellar (2014)"});
|
||||
|
||||
//Insérer dans la collection film un autre film de votre choix, puis faire la requête permettant de le retrouver, puis de le supprimer
|
||||
db.film.insertOne({title:"Avatar : La Voie de l'eau (2022)", genre:["Action | Adventure | Fantasy"]});
|
||||
|
||||
SELECT * FROM film WHERE title="Avatar : La Voie de l'eau (2022)";
|
||||
db.film.find({title:"Avatar : La Voie de l'eau (2022)"});
|
||||
|
||||
db.film.deleteOne({title:"Avatar : La Voie de l'eau (2022)"});
|
||||
|
||||
//OPTIMISATION DE LA COLLECTION ACTEUR
|
||||
// Faire une requête de recherche des acteurs dont l’age est 32 et déterminer le temps mis par la requête
|
||||
SELECT * FROM acteur WHERE age=32;
|
||||
db.acteur.find({age:32}).explain("executionStats");
|
||||
// executionTimeMillis: 2,
|
||||
//Faire un index sur l’age
|
||||
db.acteur.createIndex({age:1});
|
||||
//Faire une requête de recherche des acteurs dont l’age est 32 et déterminer le temps mis par la requête
|
||||
SELECT * FROM acteur WHERE age=32;
|
||||
db.acteur.find({age:32}).explain("executionStats");
|
||||
// executionTimeMillis: 2,
|
||||
File diff suppressed because one or more lines are too long
@@ -1,7 +1,7 @@
|
||||
[{ "_id" : 6041, "name" : "Smith John", "gender" : "M", "age" : 28, "occupation" : "engineer" },
|
||||
{ "_id" : 6042, "name" : "Johnson Emily", "gender" : "F", "age" : 35, "occupation" : "teacher" },
|
||||
{ "_id" : 6043, "name" : "Brown Michael", "gender" : "M", "age" : 40, "occupation" : "artist" },
|
||||
{ "_id" : 6044, "name" : "Robert Downey Jr.", "gender" : "M", "age" : 58, "occupation" : "actor/writer" },
|
||||
{ "_id" : 6045, "name" : "Acteur A", "gender" : "M", "age": 32, "occupation": "actor"},
|
||||
{}
|
||||
[{ "_id" : 6041, "name" : "Smith John", "gender" : "M", "age" : 28, "occupation" : "engineer" },
|
||||
{ "_id" : 6042, "name" : "Johnson Emily", "gender" : "F", "age" : 35, "occupation" : "teacher" },
|
||||
{ "_id" : 6043, "name" : "Brown Michael", "gender" : "M", "age" : 40, "occupation" : "artist" },
|
||||
{ "_id" : 6044, "name" : "Robert Downey Jr.", "gender" : "M", "age" : 58, "occupation" : "actor/writer" },
|
||||
{ "_id" : 6045, "name" : "Acteur A", "gender" : "M", "age": 32, "occupation": "actor"},
|
||||
{}
|
||||
]
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,301 +1,301 @@
|
||||
Serial No.,GRE Score,TOEFL Score,University Rating,SOP,ML, CGPA,Research,Admission
|
||||
1,337,118,4,4.5,4.5,9.65,1,1
|
||||
2,324,107,4,4,4.5,8.87,1,1
|
||||
3,316,104,3,3,3.5,8,1,1
|
||||
4,322,110,3,3.5,2.5,8.67,1,1
|
||||
5,314,103,2,2,3,8.21,0,1
|
||||
6,330,115,5,4.5,3,9.34,1,1
|
||||
7,321,109,3,3,4,8.2,1,1
|
||||
8,308,101,2,3,4,7.9,0,1
|
||||
9,302,102,1,2,1.5,8,0,0
|
||||
10,323,108,3,3.5,3,8.6,0,0
|
||||
11,325,106,3,3.5,4,8.4,1,0
|
||||
12,327,111,4,4,4.5,9,1,1
|
||||
13,328,112,4,4,4.5,9.1,1,1
|
||||
14,307,109,3,4,3,8,1,1
|
||||
15,311,104,3,3.5,2,8.2,1,1
|
||||
16,314,105,3,3.5,2.5,8.3,0,0
|
||||
17,317,107,3,4,3,8.7,0,0
|
||||
18,319,106,3,4,3,8,1,1
|
||||
19,318,110,3,4,3,8.8,0,1
|
||||
20,303,102,3,3.5,3,8.5,0,1
|
||||
21,312,107,3,3,2,7.9,1,1
|
||||
22,325,114,4,3,2,8.4,0,1
|
||||
23,328,116,5,5,5,9.5,1,1
|
||||
24,334,119,5,5,4.5,9.7,1,1
|
||||
25,336,119,5,4,3.5,9.8,1,1
|
||||
26,340,120,5,4.5,4.5,9.6,1,1
|
||||
27,322,109,5,4.5,3.5,8.8,0,1
|
||||
28,298,98,2,1.5,2.5,7.5,1,0
|
||||
29,295,93,1,2,2,7.2,0,0
|
||||
30,310,99,2,1.5,2,7.3,0,0
|
||||
31,300,97,2,3,3,8.1,1,1
|
||||
32,327,103,3,4,4,8.3,1,1
|
||||
33,338,118,4,3,4.5,9.4,1,1
|
||||
34,340,114,5,4,4,9.6,1,1
|
||||
35,331,112,5,4,5,9.8,1,1
|
||||
36,320,110,5,5,5,9.2,1,1
|
||||
37,299,106,2,4,4,8.4,0,1
|
||||
38,300,105,1,1,2,7.8,0,0
|
||||
39,304,105,1,3,1.5,7.5,0,0
|
||||
40,307,108,2,4,3.5,7.7,0,0
|
||||
41,308,110,3,3.5,3,8,1,0
|
||||
42,316,105,2,2.5,2.5,8.2,1,0
|
||||
43,313,107,2,2.5,2,8.5,1,1
|
||||
44,332,117,4,4.5,4,9.1,0,1
|
||||
45,326,113,5,4.5,4,9.4,1,1
|
||||
46,322,110,5,5,4,9.1,1,1
|
||||
47,329,114,5,4,5,9.3,1,1
|
||||
48,339,119,5,4.5,4,9.7,0,1
|
||||
49,321,110,3,3.5,5,8.85,1,1
|
||||
50,327,111,4,3,4,8.4,1,1
|
||||
51,313,98,3,2.5,4.5,8.3,1,1
|
||||
52,312,100,2,1.5,3.5,7.9,1,1
|
||||
53,334,116,4,4,3,8,1,1
|
||||
54,324,112,4,4,2.5,8.1,1,1
|
||||
55,322,110,3,3,3.5,8,0,1
|
||||
56,320,103,3,3,3,7.7,0,1
|
||||
57,316,102,3,2,3,7.4,0,1
|
||||
58,298,99,2,4,2,7.6,0,1
|
||||
59,300,99,1,3,2,6.8,1,0
|
||||
60,311,104,2,2,2,8.3,0,0
|
||||
61,309,100,2,3,3,8.1,0,1
|
||||
62,307,101,3,4,3,8.2,0,0
|
||||
63,304,105,2,3,3,8.2,1,1
|
||||
64,315,107,2,4,3,8.5,1,1
|
||||
65,325,111,3,3,3.5,8.7,0,0
|
||||
66,325,112,4,3.5,3.5,8.92,0,1
|
||||
67,327,114,3,3,3,9.02,0,1
|
||||
68,316,107,2,3.5,3.5,8.64,1,1
|
||||
69,318,109,3,3.5,4,9.22,1,1
|
||||
70,328,115,4,4.5,4,9.16,1,1
|
||||
71,332,118,5,5,5,9.64,1,1
|
||||
72,336,112,5,5,5,9.76,1,1
|
||||
73,321,111,5,5,5,9.45,1,1
|
||||
74,314,108,4,4.5,4,9.04,1,1
|
||||
75,314,106,3,3,5,8.9,0,1
|
||||
76,329,114,2,2,4,8.56,1,1
|
||||
77,327,112,3,3,3,8.72,1,1
|
||||
78,301,99,2,3,2,8.22,0,1
|
||||
79,296,95,2,3,2,7.54,1,0
|
||||
80,294,93,1,1.5,2,7.36,0,0
|
||||
81,312,105,3,2,3,8.02,1,0
|
||||
82,340,120,4,5,5,9.5,1,1
|
||||
83,320,110,5,5,4.5,9.22,1,1
|
||||
84,322,115,5,4,4.5,9.36,1,1
|
||||
85,340,115,5,4.5,4.5,9.45,1,1
|
||||
86,319,103,4,4.5,3.5,8.66,0,0
|
||||
87,315,106,3,4.5,3.5,8.42,0,1
|
||||
88,317,107,2,3.5,3,8.28,0,1
|
||||
89,314,108,3,4.5,3.5,8.14,0,1
|
||||
90,316,109,4,4.5,3.5,8.76,1,1
|
||||
91,318,106,2,4,4,7.92,1,1
|
||||
92,299,97,3,5,3.5,7.66,0,0
|
||||
93,298,98,2,4,3,8.03,0,0
|
||||
94,301,97,2,3,3,7.88,1,0
|
||||
95,303,99,3,2,2.5,7.66,0,0
|
||||
96,304,100,4,1.5,2.5,7.84,0,0
|
||||
97,306,100,2,3,3,8,0,0
|
||||
98,331,120,3,4,4,8.96,1,1
|
||||
99,332,119,4,5,4.5,9.24,1,1
|
||||
100,323,113,3,4,4,8.88,1,1
|
||||
101,322,107,3,3.5,3.5,8.46,1,0
|
||||
102,312,105,2,2.5,3,8.12,0,1
|
||||
103,314,106,2,4,3.5,8.25,0,1
|
||||
104,317,104,2,4.5,4,8.47,0,1
|
||||
105,326,112,3,3.5,3,9.05,1,1
|
||||
106,316,110,3,4,4.5,8.78,1,1
|
||||
107,329,111,4,4.5,4.5,9.18,1,1
|
||||
108,338,117,4,3.5,4.5,9.46,1,1
|
||||
109,331,116,5,5,5,9.38,1,1
|
||||
110,304,103,5,5,4,8.64,0,1
|
||||
111,305,108,5,3,3,8.48,0,0
|
||||
112,321,109,4,4,4,8.68,1,1
|
||||
113,301,107,3,3.5,3.5,8.34,1,1
|
||||
114,320,110,2,4,3.5,8.56,0,1
|
||||
115,311,105,3,3.5,3,8.45,1,1
|
||||
116,310,106,4,4.5,4.5,9.04,1,1
|
||||
117,299,102,3,4,3.5,8.62,0,0
|
||||
118,290,104,4,2,2.5,7.46,0,0
|
||||
119,296,99,2,3,3.5,7.28,0,0
|
||||
120,327,104,5,3,3.5,8.84,1,1
|
||||
121,335,117,5,5,5,9.56,1,1
|
||||
122,334,119,5,4.5,4.5,9.48,1,1
|
||||
123,310,106,4,1.5,2.5,8.36,0,0
|
||||
124,308,108,3,3.5,3.5,8.22,0,1
|
||||
125,301,106,4,2.5,3,8.47,0,1
|
||||
126,300,100,3,2,3,8.66,1,1
|
||||
127,323,113,3,4,3,9.32,1,1
|
||||
128,319,112,3,2.5,2,8.71,1,1
|
||||
129,326,112,3,3.5,3,9.1,1,1
|
||||
130,333,118,5,5,5,9.35,1,1
|
||||
131,339,114,5,4,4.5,9.76,1,1
|
||||
132,303,105,5,5,4.5,8.65,0,1
|
||||
133,309,105,5,3.5,3.5,8.56,0,1
|
||||
134,323,112,5,4,4.5,8.78,0,1
|
||||
135,333,113,5,4,4,9.28,1,1
|
||||
136,314,109,4,3.5,4,8.77,1,1
|
||||
137,312,103,3,5,4,8.45,0,1
|
||||
138,316,100,2,1.5,3,8.16,1,1
|
||||
139,326,116,2,4.5,3,9.08,1,1
|
||||
140,318,109,1,3.5,3.5,9.12,0,1
|
||||
141,329,110,2,4,3,9.15,1,1
|
||||
142,332,118,2,4.5,3.5,9.36,1,1
|
||||
143,331,115,5,4,3.5,9.44,1,1
|
||||
144,340,120,4,4.5,4,9.92,1,1
|
||||
145,325,112,2,3,3.5,8.96,1,1
|
||||
146,320,113,2,2,2.5,8.64,1,1
|
||||
147,315,105,3,2,2.5,8.48,0,1
|
||||
148,326,114,3,3,3,9.11,1,1
|
||||
149,339,116,4,4,3.5,9.8,1,1
|
||||
150,311,106,2,3.5,3,8.26,1,1
|
||||
151,334,114,4,4,4,9.43,1,1
|
||||
152,332,116,5,5,5,9.28,1,1
|
||||
153,321,112,5,5,5,9.06,1,1
|
||||
154,324,105,3,3,4,8.75,0,1
|
||||
155,326,108,3,3,3.5,8.89,0,0
|
||||
156,312,109,3,3,3,8.69,0,1
|
||||
157,315,105,3,2,2.5,8.34,0,0
|
||||
158,309,104,2,2,2.5,8.26,0,1
|
||||
159,306,106,2,2,2.5,8.14,0,1
|
||||
160,297,100,1,1.5,2,7.9,0,0
|
||||
161,315,103,1,1.5,2,7.86,0,0
|
||||
162,298,99,1,1.5,3,7.46,0,0
|
||||
163,318,109,3,3,3,8.5,0,1
|
||||
164,317,105,3,3.5,3,8.56,0,1
|
||||
165,329,111,4,4.5,4,9.01,1,1
|
||||
166,322,110,5,4.5,4,8.97,0,1
|
||||
167,302,102,3,3.5,5,8.33,0,1
|
||||
168,313,102,3,2,3,8.27,0,1
|
||||
169,293,97,2,2,4,7.8,1,1
|
||||
170,311,99,2,2.5,3,7.98,0,1
|
||||
171,312,101,2,2.5,3.5,8.04,1,1
|
||||
172,334,117,5,4,4.5,9.07,1,1
|
||||
173,322,110,4,4,5,9.13,1,1
|
||||
174,323,113,4,4,4.5,9.23,1,1
|
||||
175,321,111,4,4,4,8.97,1,1
|
||||
176,320,111,4,4.5,3.5,8.87,1,1
|
||||
177,329,119,4,4.5,4.5,9.16,1,1
|
||||
178,319,110,3,3.5,3.5,9.04,0,1
|
||||
179,309,108,3,2.5,3,8.12,0,1
|
||||
180,307,102,3,3,3,8.27,0,1
|
||||
181,300,104,3,3.5,3,8.16,0,1
|
||||
182,305,107,2,2.5,2.5,8.42,0,1
|
||||
183,299,100,2,3,3.5,7.88,0,1
|
||||
184,314,110,3,4,4,8.8,0,1
|
||||
185,316,106,2,2.5,4,8.32,0,1
|
||||
186,327,113,4,4.5,4.5,9.11,1,1
|
||||
187,317,107,3,3.5,3,8.68,1,1
|
||||
188,335,118,5,4.5,3.5,9.44,1,1
|
||||
189,331,115,5,4.5,3.5,9.36,1,1
|
||||
190,324,112,5,5,5,9.08,1,1
|
||||
191,324,111,5,4.5,4,9.16,1,1
|
||||
192,323,110,5,4,5,8.98,1,1
|
||||
193,322,114,5,4.5,4,8.94,1,1
|
||||
194,336,118,5,4.5,5,9.53,1,1
|
||||
195,316,109,3,3.5,3,8.76,0,1
|
||||
196,307,107,2,3,3.5,8.52,1,1
|
||||
197,306,105,2,3,2.5,8.26,0,0
|
||||
198,310,106,2,3.5,2.5,8.33,0,1
|
||||
199,311,104,3,4.5,4.5,8.43,0,1
|
||||
200,313,107,3,4,4.5,8.69,0,1
|
||||
201,317,103,3,2.5,3,8.54,1,1
|
||||
202,315,110,2,3.5,3,8.46,1,0
|
||||
203,340,120,5,4.5,4.5,9.91,1,1
|
||||
204,334,120,5,4,5,9.87,1,1
|
||||
205,298,105,3,3.5,4,8.54,0,1
|
||||
206,295,99,2,2.5,3,7.65,0,0
|
||||
207,315,99,2,3.5,3,7.89,0,0
|
||||
208,310,102,3,3.5,4,8.02,1,1
|
||||
209,305,106,2,3,3,8.16,0,1
|
||||
210,301,104,3,3.5,4,8.12,1,1
|
||||
211,325,108,4,4.5,4,9.06,1,1
|
||||
212,328,110,4,5,4,9.14,1,1
|
||||
213,338,120,4,5,5,9.66,1,1
|
||||
214,333,119,5,5,4.5,9.78,1,1
|
||||
215,331,117,4,4.5,5,9.42,1,1
|
||||
216,330,116,5,5,4.5,9.36,1,1
|
||||
217,322,112,4,4.5,4.5,9.26,1,1
|
||||
218,321,109,4,4,4,9.13,1,1
|
||||
219,324,110,4,3,3.5,8.97,1,1
|
||||
220,312,104,3,3.5,3.5,8.42,0,1
|
||||
221,313,103,3,4,4,8.75,0,1
|
||||
222,316,110,3,3.5,4,8.56,0,1
|
||||
223,324,113,4,4.5,4,8.79,0,1
|
||||
224,308,109,2,3,4,8.45,0,1
|
||||
225,305,105,2,3,2,8.23,0,1
|
||||
226,296,99,2,2.5,2.5,8.03,0,1
|
||||
227,306,110,2,3.5,4,8.45,0,1
|
||||
228,312,110,2,3.5,3,8.53,0,1
|
||||
229,318,112,3,4,3.5,8.67,0,1
|
||||
230,324,111,4,3,3,9.01,1,1
|
||||
231,313,104,3,4,4.5,8.65,0,1
|
||||
232,319,106,3,3.5,2.5,8.33,1,1
|
||||
233,312,107,2,2.5,3.5,8.27,0,1
|
||||
234,304,100,2,2.5,3.5,8.07,0,0
|
||||
235,330,113,5,5,4,9.31,1,1
|
||||
236,326,111,5,4.5,4,9.23,1,1
|
||||
237,325,112,4,4,4.5,9.17,1,1
|
||||
238,329,114,5,4.5,5,9.19,1,1
|
||||
239,310,104,3,2,3.5,8.37,0,1
|
||||
240,299,100,1,1.5,2,7.89,0,0
|
||||
241,296,101,1,2.5,3,7.68,0,0
|
||||
242,317,103,2,2.5,2,8.15,0,1
|
||||
243,324,115,3,3.5,3,8.76,1,1
|
||||
244,325,114,3,3.5,3,9.04,1,1
|
||||
245,314,107,2,2.5,4,8.56,0,1
|
||||
246,328,110,4,4,2.5,9.02,1,1
|
||||
247,316,105,3,3,3.5,8.73,0,1
|
||||
248,311,104,2,2.5,3.5,8.48,0,1
|
||||
249,324,110,3,3.5,4,8.87,1,1
|
||||
250,321,111,3,3.5,4,8.83,1,1
|
||||
251,320,104,3,3,2.5,8.57,1,1
|
||||
252,316,99,2,2.5,3,9,0,1
|
||||
253,318,100,2,2.5,3.5,8.54,1,1
|
||||
254,335,115,4,4.5,4.5,9.68,1,1
|
||||
255,321,114,4,4,5,9.12,0,1
|
||||
256,307,110,4,4,4.5,8.37,0,1
|
||||
257,309,99,3,4,4,8.56,0,1
|
||||
258,324,100,3,4,5,8.64,1,1
|
||||
259,326,102,4,5,5,8.76,1,1
|
||||
260,331,119,4,5,4.5,9.34,1,1
|
||||
261,327,108,5,5,3.5,9.13,1,1
|
||||
262,312,104,3,3.5,4,8.09,0,1
|
||||
263,308,103,2,2.5,4,8.36,1,1
|
||||
264,324,111,3,2.5,1.5,8.79,1,1
|
||||
265,325,110,2,3,2.5,8.76,1,1
|
||||
266,313,102,3,2.5,2.5,8.68,0,0
|
||||
267,312,105,2,2,2.5,8.45,0,1
|
||||
268,314,107,3,3,3.5,8.17,1,1
|
||||
269,327,113,4,4.5,5,9.14,0,1
|
||||
270,308,108,4,4.5,5,8.34,0,1
|
||||
271,306,105,2,2.5,3,8.22,1,1
|
||||
272,299,96,2,1.5,2,7.86,0,0
|
||||
273,294,95,1,1.5,1.5,7.64,0,0
|
||||
274,312,99,1,1,1.5,8.01,1,0
|
||||
275,315,100,1,2,2.5,7.95,0,0
|
||||
276,322,110,3,3.5,3,8.96,1,1
|
||||
277,329,113,5,5,4.5,9.45,1,1
|
||||
278,320,101,2,2.5,3,8.62,0,1
|
||||
279,308,103,2,3,3.5,8.49,0,0
|
||||
280,304,102,2,3,4,8.73,0,1
|
||||
281,311,102,3,4.5,4,8.64,1,1
|
||||
282,317,110,3,4,4.5,9.11,1,1
|
||||
283,312,106,3,4,3.5,8.79,1,1
|
||||
284,321,111,3,2.5,3,8.9,1,1
|
||||
285,340,112,4,5,4.5,9.66,1,1
|
||||
286,331,116,5,4,4,9.26,1,1
|
||||
287,336,118,5,4.5,4,9.19,1,1
|
||||
288,324,114,5,5,4.5,9.08,1,1
|
||||
289,314,104,4,5,5,9.02,0,1
|
||||
290,313,109,3,4,3.5,9,0,1
|
||||
291,307,105,2,2.5,3,7.65,0,0
|
||||
292,300,102,2,1.5,2,7.87,0,0
|
||||
293,302,99,2,1,2,7.97,0,0
|
||||
294,312,98,1,3.5,3,8.18,1,0
|
||||
295,316,101,2,2.5,2,8.32,1,1
|
||||
296,317,100,2,3,2.5,8.57,0,0
|
||||
297,310,107,3,3.5,3.5,8.67,0,0
|
||||
298,320,120,3,4,4.5,9.11,0,1
|
||||
299,330,114,3,4.5,4.5,9.24,1,1
|
||||
Serial No.,GRE Score,TOEFL Score,University Rating,SOP,ML, CGPA,Research,Admission
|
||||
1,337,118,4,4.5,4.5,9.65,1,1
|
||||
2,324,107,4,4,4.5,8.87,1,1
|
||||
3,316,104,3,3,3.5,8,1,1
|
||||
4,322,110,3,3.5,2.5,8.67,1,1
|
||||
5,314,103,2,2,3,8.21,0,1
|
||||
6,330,115,5,4.5,3,9.34,1,1
|
||||
7,321,109,3,3,4,8.2,1,1
|
||||
8,308,101,2,3,4,7.9,0,1
|
||||
9,302,102,1,2,1.5,8,0,0
|
||||
10,323,108,3,3.5,3,8.6,0,0
|
||||
11,325,106,3,3.5,4,8.4,1,0
|
||||
12,327,111,4,4,4.5,9,1,1
|
||||
13,328,112,4,4,4.5,9.1,1,1
|
||||
14,307,109,3,4,3,8,1,1
|
||||
15,311,104,3,3.5,2,8.2,1,1
|
||||
16,314,105,3,3.5,2.5,8.3,0,0
|
||||
17,317,107,3,4,3,8.7,0,0
|
||||
18,319,106,3,4,3,8,1,1
|
||||
19,318,110,3,4,3,8.8,0,1
|
||||
20,303,102,3,3.5,3,8.5,0,1
|
||||
21,312,107,3,3,2,7.9,1,1
|
||||
22,325,114,4,3,2,8.4,0,1
|
||||
23,328,116,5,5,5,9.5,1,1
|
||||
24,334,119,5,5,4.5,9.7,1,1
|
||||
25,336,119,5,4,3.5,9.8,1,1
|
||||
26,340,120,5,4.5,4.5,9.6,1,1
|
||||
27,322,109,5,4.5,3.5,8.8,0,1
|
||||
28,298,98,2,1.5,2.5,7.5,1,0
|
||||
29,295,93,1,2,2,7.2,0,0
|
||||
30,310,99,2,1.5,2,7.3,0,0
|
||||
31,300,97,2,3,3,8.1,1,1
|
||||
32,327,103,3,4,4,8.3,1,1
|
||||
33,338,118,4,3,4.5,9.4,1,1
|
||||
34,340,114,5,4,4,9.6,1,1
|
||||
35,331,112,5,4,5,9.8,1,1
|
||||
36,320,110,5,5,5,9.2,1,1
|
||||
37,299,106,2,4,4,8.4,0,1
|
||||
38,300,105,1,1,2,7.8,0,0
|
||||
39,304,105,1,3,1.5,7.5,0,0
|
||||
40,307,108,2,4,3.5,7.7,0,0
|
||||
41,308,110,3,3.5,3,8,1,0
|
||||
42,316,105,2,2.5,2.5,8.2,1,0
|
||||
43,313,107,2,2.5,2,8.5,1,1
|
||||
44,332,117,4,4.5,4,9.1,0,1
|
||||
45,326,113,5,4.5,4,9.4,1,1
|
||||
46,322,110,5,5,4,9.1,1,1
|
||||
47,329,114,5,4,5,9.3,1,1
|
||||
48,339,119,5,4.5,4,9.7,0,1
|
||||
49,321,110,3,3.5,5,8.85,1,1
|
||||
50,327,111,4,3,4,8.4,1,1
|
||||
51,313,98,3,2.5,4.5,8.3,1,1
|
||||
52,312,100,2,1.5,3.5,7.9,1,1
|
||||
53,334,116,4,4,3,8,1,1
|
||||
54,324,112,4,4,2.5,8.1,1,1
|
||||
55,322,110,3,3,3.5,8,0,1
|
||||
56,320,103,3,3,3,7.7,0,1
|
||||
57,316,102,3,2,3,7.4,0,1
|
||||
58,298,99,2,4,2,7.6,0,1
|
||||
59,300,99,1,3,2,6.8,1,0
|
||||
60,311,104,2,2,2,8.3,0,0
|
||||
61,309,100,2,3,3,8.1,0,1
|
||||
62,307,101,3,4,3,8.2,0,0
|
||||
63,304,105,2,3,3,8.2,1,1
|
||||
64,315,107,2,4,3,8.5,1,1
|
||||
65,325,111,3,3,3.5,8.7,0,0
|
||||
66,325,112,4,3.5,3.5,8.92,0,1
|
||||
67,327,114,3,3,3,9.02,0,1
|
||||
68,316,107,2,3.5,3.5,8.64,1,1
|
||||
69,318,109,3,3.5,4,9.22,1,1
|
||||
70,328,115,4,4.5,4,9.16,1,1
|
||||
71,332,118,5,5,5,9.64,1,1
|
||||
72,336,112,5,5,5,9.76,1,1
|
||||
73,321,111,5,5,5,9.45,1,1
|
||||
74,314,108,4,4.5,4,9.04,1,1
|
||||
75,314,106,3,3,5,8.9,0,1
|
||||
76,329,114,2,2,4,8.56,1,1
|
||||
77,327,112,3,3,3,8.72,1,1
|
||||
78,301,99,2,3,2,8.22,0,1
|
||||
79,296,95,2,3,2,7.54,1,0
|
||||
80,294,93,1,1.5,2,7.36,0,0
|
||||
81,312,105,3,2,3,8.02,1,0
|
||||
82,340,120,4,5,5,9.5,1,1
|
||||
83,320,110,5,5,4.5,9.22,1,1
|
||||
84,322,115,5,4,4.5,9.36,1,1
|
||||
85,340,115,5,4.5,4.5,9.45,1,1
|
||||
86,319,103,4,4.5,3.5,8.66,0,0
|
||||
87,315,106,3,4.5,3.5,8.42,0,1
|
||||
88,317,107,2,3.5,3,8.28,0,1
|
||||
89,314,108,3,4.5,3.5,8.14,0,1
|
||||
90,316,109,4,4.5,3.5,8.76,1,1
|
||||
91,318,106,2,4,4,7.92,1,1
|
||||
92,299,97,3,5,3.5,7.66,0,0
|
||||
93,298,98,2,4,3,8.03,0,0
|
||||
94,301,97,2,3,3,7.88,1,0
|
||||
95,303,99,3,2,2.5,7.66,0,0
|
||||
96,304,100,4,1.5,2.5,7.84,0,0
|
||||
97,306,100,2,3,3,8,0,0
|
||||
98,331,120,3,4,4,8.96,1,1
|
||||
99,332,119,4,5,4.5,9.24,1,1
|
||||
100,323,113,3,4,4,8.88,1,1
|
||||
101,322,107,3,3.5,3.5,8.46,1,0
|
||||
102,312,105,2,2.5,3,8.12,0,1
|
||||
103,314,106,2,4,3.5,8.25,0,1
|
||||
104,317,104,2,4.5,4,8.47,0,1
|
||||
105,326,112,3,3.5,3,9.05,1,1
|
||||
106,316,110,3,4,4.5,8.78,1,1
|
||||
107,329,111,4,4.5,4.5,9.18,1,1
|
||||
108,338,117,4,3.5,4.5,9.46,1,1
|
||||
109,331,116,5,5,5,9.38,1,1
|
||||
110,304,103,5,5,4,8.64,0,1
|
||||
111,305,108,5,3,3,8.48,0,0
|
||||
112,321,109,4,4,4,8.68,1,1
|
||||
113,301,107,3,3.5,3.5,8.34,1,1
|
||||
114,320,110,2,4,3.5,8.56,0,1
|
||||
115,311,105,3,3.5,3,8.45,1,1
|
||||
116,310,106,4,4.5,4.5,9.04,1,1
|
||||
117,299,102,3,4,3.5,8.62,0,0
|
||||
118,290,104,4,2,2.5,7.46,0,0
|
||||
119,296,99,2,3,3.5,7.28,0,0
|
||||
120,327,104,5,3,3.5,8.84,1,1
|
||||
121,335,117,5,5,5,9.56,1,1
|
||||
122,334,119,5,4.5,4.5,9.48,1,1
|
||||
123,310,106,4,1.5,2.5,8.36,0,0
|
||||
124,308,108,3,3.5,3.5,8.22,0,1
|
||||
125,301,106,4,2.5,3,8.47,0,1
|
||||
126,300,100,3,2,3,8.66,1,1
|
||||
127,323,113,3,4,3,9.32,1,1
|
||||
128,319,112,3,2.5,2,8.71,1,1
|
||||
129,326,112,3,3.5,3,9.1,1,1
|
||||
130,333,118,5,5,5,9.35,1,1
|
||||
131,339,114,5,4,4.5,9.76,1,1
|
||||
132,303,105,5,5,4.5,8.65,0,1
|
||||
133,309,105,5,3.5,3.5,8.56,0,1
|
||||
134,323,112,5,4,4.5,8.78,0,1
|
||||
135,333,113,5,4,4,9.28,1,1
|
||||
136,314,109,4,3.5,4,8.77,1,1
|
||||
137,312,103,3,5,4,8.45,0,1
|
||||
138,316,100,2,1.5,3,8.16,1,1
|
||||
139,326,116,2,4.5,3,9.08,1,1
|
||||
140,318,109,1,3.5,3.5,9.12,0,1
|
||||
141,329,110,2,4,3,9.15,1,1
|
||||
142,332,118,2,4.5,3.5,9.36,1,1
|
||||
143,331,115,5,4,3.5,9.44,1,1
|
||||
144,340,120,4,4.5,4,9.92,1,1
|
||||
145,325,112,2,3,3.5,8.96,1,1
|
||||
146,320,113,2,2,2.5,8.64,1,1
|
||||
147,315,105,3,2,2.5,8.48,0,1
|
||||
148,326,114,3,3,3,9.11,1,1
|
||||
149,339,116,4,4,3.5,9.8,1,1
|
||||
150,311,106,2,3.5,3,8.26,1,1
|
||||
151,334,114,4,4,4,9.43,1,1
|
||||
152,332,116,5,5,5,9.28,1,1
|
||||
153,321,112,5,5,5,9.06,1,1
|
||||
154,324,105,3,3,4,8.75,0,1
|
||||
155,326,108,3,3,3.5,8.89,0,0
|
||||
156,312,109,3,3,3,8.69,0,1
|
||||
157,315,105,3,2,2.5,8.34,0,0
|
||||
158,309,104,2,2,2.5,8.26,0,1
|
||||
159,306,106,2,2,2.5,8.14,0,1
|
||||
160,297,100,1,1.5,2,7.9,0,0
|
||||
161,315,103,1,1.5,2,7.86,0,0
|
||||
162,298,99,1,1.5,3,7.46,0,0
|
||||
163,318,109,3,3,3,8.5,0,1
|
||||
164,317,105,3,3.5,3,8.56,0,1
|
||||
165,329,111,4,4.5,4,9.01,1,1
|
||||
166,322,110,5,4.5,4,8.97,0,1
|
||||
167,302,102,3,3.5,5,8.33,0,1
|
||||
168,313,102,3,2,3,8.27,0,1
|
||||
169,293,97,2,2,4,7.8,1,1
|
||||
170,311,99,2,2.5,3,7.98,0,1
|
||||
171,312,101,2,2.5,3.5,8.04,1,1
|
||||
172,334,117,5,4,4.5,9.07,1,1
|
||||
173,322,110,4,4,5,9.13,1,1
|
||||
174,323,113,4,4,4.5,9.23,1,1
|
||||
175,321,111,4,4,4,8.97,1,1
|
||||
176,320,111,4,4.5,3.5,8.87,1,1
|
||||
177,329,119,4,4.5,4.5,9.16,1,1
|
||||
178,319,110,3,3.5,3.5,9.04,0,1
|
||||
179,309,108,3,2.5,3,8.12,0,1
|
||||
180,307,102,3,3,3,8.27,0,1
|
||||
181,300,104,3,3.5,3,8.16,0,1
|
||||
182,305,107,2,2.5,2.5,8.42,0,1
|
||||
183,299,100,2,3,3.5,7.88,0,1
|
||||
184,314,110,3,4,4,8.8,0,1
|
||||
185,316,106,2,2.5,4,8.32,0,1
|
||||
186,327,113,4,4.5,4.5,9.11,1,1
|
||||
187,317,107,3,3.5,3,8.68,1,1
|
||||
188,335,118,5,4.5,3.5,9.44,1,1
|
||||
189,331,115,5,4.5,3.5,9.36,1,1
|
||||
190,324,112,5,5,5,9.08,1,1
|
||||
191,324,111,5,4.5,4,9.16,1,1
|
||||
192,323,110,5,4,5,8.98,1,1
|
||||
193,322,114,5,4.5,4,8.94,1,1
|
||||
194,336,118,5,4.5,5,9.53,1,1
|
||||
195,316,109,3,3.5,3,8.76,0,1
|
||||
196,307,107,2,3,3.5,8.52,1,1
|
||||
197,306,105,2,3,2.5,8.26,0,0
|
||||
198,310,106,2,3.5,2.5,8.33,0,1
|
||||
199,311,104,3,4.5,4.5,8.43,0,1
|
||||
200,313,107,3,4,4.5,8.69,0,1
|
||||
201,317,103,3,2.5,3,8.54,1,1
|
||||
202,315,110,2,3.5,3,8.46,1,0
|
||||
203,340,120,5,4.5,4.5,9.91,1,1
|
||||
204,334,120,5,4,5,9.87,1,1
|
||||
205,298,105,3,3.5,4,8.54,0,1
|
||||
206,295,99,2,2.5,3,7.65,0,0
|
||||
207,315,99,2,3.5,3,7.89,0,0
|
||||
208,310,102,3,3.5,4,8.02,1,1
|
||||
209,305,106,2,3,3,8.16,0,1
|
||||
210,301,104,3,3.5,4,8.12,1,1
|
||||
211,325,108,4,4.5,4,9.06,1,1
|
||||
212,328,110,4,5,4,9.14,1,1
|
||||
213,338,120,4,5,5,9.66,1,1
|
||||
214,333,119,5,5,4.5,9.78,1,1
|
||||
215,331,117,4,4.5,5,9.42,1,1
|
||||
216,330,116,5,5,4.5,9.36,1,1
|
||||
217,322,112,4,4.5,4.5,9.26,1,1
|
||||
218,321,109,4,4,4,9.13,1,1
|
||||
219,324,110,4,3,3.5,8.97,1,1
|
||||
220,312,104,3,3.5,3.5,8.42,0,1
|
||||
221,313,103,3,4,4,8.75,0,1
|
||||
222,316,110,3,3.5,4,8.56,0,1
|
||||
223,324,113,4,4.5,4,8.79,0,1
|
||||
224,308,109,2,3,4,8.45,0,1
|
||||
225,305,105,2,3,2,8.23,0,1
|
||||
226,296,99,2,2.5,2.5,8.03,0,1
|
||||
227,306,110,2,3.5,4,8.45,0,1
|
||||
228,312,110,2,3.5,3,8.53,0,1
|
||||
229,318,112,3,4,3.5,8.67,0,1
|
||||
230,324,111,4,3,3,9.01,1,1
|
||||
231,313,104,3,4,4.5,8.65,0,1
|
||||
232,319,106,3,3.5,2.5,8.33,1,1
|
||||
233,312,107,2,2.5,3.5,8.27,0,1
|
||||
234,304,100,2,2.5,3.5,8.07,0,0
|
||||
235,330,113,5,5,4,9.31,1,1
|
||||
236,326,111,5,4.5,4,9.23,1,1
|
||||
237,325,112,4,4,4.5,9.17,1,1
|
||||
238,329,114,5,4.5,5,9.19,1,1
|
||||
239,310,104,3,2,3.5,8.37,0,1
|
||||
240,299,100,1,1.5,2,7.89,0,0
|
||||
241,296,101,1,2.5,3,7.68,0,0
|
||||
242,317,103,2,2.5,2,8.15,0,1
|
||||
243,324,115,3,3.5,3,8.76,1,1
|
||||
244,325,114,3,3.5,3,9.04,1,1
|
||||
245,314,107,2,2.5,4,8.56,0,1
|
||||
246,328,110,4,4,2.5,9.02,1,1
|
||||
247,316,105,3,3,3.5,8.73,0,1
|
||||
248,311,104,2,2.5,3.5,8.48,0,1
|
||||
249,324,110,3,3.5,4,8.87,1,1
|
||||
250,321,111,3,3.5,4,8.83,1,1
|
||||
251,320,104,3,3,2.5,8.57,1,1
|
||||
252,316,99,2,2.5,3,9,0,1
|
||||
253,318,100,2,2.5,3.5,8.54,1,1
|
||||
254,335,115,4,4.5,4.5,9.68,1,1
|
||||
255,321,114,4,4,5,9.12,0,1
|
||||
256,307,110,4,4,4.5,8.37,0,1
|
||||
257,309,99,3,4,4,8.56,0,1
|
||||
258,324,100,3,4,5,8.64,1,1
|
||||
259,326,102,4,5,5,8.76,1,1
|
||||
260,331,119,4,5,4.5,9.34,1,1
|
||||
261,327,108,5,5,3.5,9.13,1,1
|
||||
262,312,104,3,3.5,4,8.09,0,1
|
||||
263,308,103,2,2.5,4,8.36,1,1
|
||||
264,324,111,3,2.5,1.5,8.79,1,1
|
||||
265,325,110,2,3,2.5,8.76,1,1
|
||||
266,313,102,3,2.5,2.5,8.68,0,0
|
||||
267,312,105,2,2,2.5,8.45,0,1
|
||||
268,314,107,3,3,3.5,8.17,1,1
|
||||
269,327,113,4,4.5,5,9.14,0,1
|
||||
270,308,108,4,4.5,5,8.34,0,1
|
||||
271,306,105,2,2.5,3,8.22,1,1
|
||||
272,299,96,2,1.5,2,7.86,0,0
|
||||
273,294,95,1,1.5,1.5,7.64,0,0
|
||||
274,312,99,1,1,1.5,8.01,1,0
|
||||
275,315,100,1,2,2.5,7.95,0,0
|
||||
276,322,110,3,3.5,3,8.96,1,1
|
||||
277,329,113,5,5,4.5,9.45,1,1
|
||||
278,320,101,2,2.5,3,8.62,0,1
|
||||
279,308,103,2,3,3.5,8.49,0,0
|
||||
280,304,102,2,3,4,8.73,0,1
|
||||
281,311,102,3,4.5,4,8.64,1,1
|
||||
282,317,110,3,4,4.5,9.11,1,1
|
||||
283,312,106,3,4,3.5,8.79,1,1
|
||||
284,321,111,3,2.5,3,8.9,1,1
|
||||
285,340,112,4,5,4.5,9.66,1,1
|
||||
286,331,116,5,4,4,9.26,1,1
|
||||
287,336,118,5,4.5,4,9.19,1,1
|
||||
288,324,114,5,5,4.5,9.08,1,1
|
||||
289,314,104,4,5,5,9.02,0,1
|
||||
290,313,109,3,4,3.5,9,0,1
|
||||
291,307,105,2,2.5,3,7.65,0,0
|
||||
292,300,102,2,1.5,2,7.87,0,0
|
||||
293,302,99,2,1,2,7.97,0,0
|
||||
294,312,98,1,3.5,3,8.18,1,0
|
||||
295,316,101,2,2.5,2,8.32,1,1
|
||||
296,317,100,2,3,2.5,8.57,0,0
|
||||
297,310,107,3,3.5,3.5,8.67,0,0
|
||||
298,320,120,3,4,4.5,9.11,0,1
|
||||
299,330,114,3,4.5,4.5,9.24,1,1
|
||||
300,305,112,3,3,3.5,8.65,0,0
|
||||
@@ -1,2 +1,2 @@
|
||||
SELECT * FROM profil WHERE gre_score >= 320 AND toefl_score >= 110 AND university_rating >= 3;
|
||||
SELECT * FROM profil WHERE gre_score >= 320 AND toefl_score >= 110 AND university_rating >= 3;
|
||||
SELECT COUNT(*) FROM profil WHERE gre_score >= 320 AND toefl_score >= 110 AND university_rating >= 3;
|
||||
Reference in New Issue
Block a user