blob_id
stringlengths
40
40
language
stringclasses
1 value
repo_name
stringlengths
5
133
path
stringlengths
3
276
src_encoding
stringclasses
33 values
length_bytes
int64
23
9.61M
score
float64
2.52
5.28
int_score
int64
3
5
detected_licenses
listlengths
0
44
license_type
stringclasses
2 values
text
stringlengths
23
9.43M
download_success
bool
1 class
0d280396017df60478cda2424379d5eabeecd306
SQL
ManLex/BicyclesShop
/Queries/SimpleFive.sql
UTF-8
383
4.25
4
[]
no_license
SELECT Bicycles.Name FROM Bicycles WHERE Bicycles.BrandId IN (SELECT Brands.Id FROM (Brands INNER JOIN Bicycles ON BrandId = Brands.Id) GROUP BY Brands.Id HAVING SUM(Price) > PriceNumber) AND Bicycles.BrandId NOT IN (SELECT BrandId FROM (Bicycles INNER JOIN Sales ON BicycleId = Bicycles.Id) INNER JOIN Stores ON StoreId = Stores.Id AND Stores.Name = 'StoreA')
true
6095a5aabd5e2c34a21f4831e5a80d02175c013b
SQL
nabil17-2/Web-tech--B-
/Lab Task 5/product_id.sql
UTF-8
1,603
3.078125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 19, 2020 at 06:09 PM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.4.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `product_id` -- -- -------------------------------------------------------- -- -- Table structure for table `products` -- CREATE TABLE `products` ( `id` int(20) NOT NULL, `name` varchar(30) NOT NULL, `buyingprice` varchar(10) NOT NULL, `sellingprice` varchar(10) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `products` -- INSERT INTO `products` (`id`, `name`, `buyingprice`, `sellingprice`) VALUES (1, 'mobile', '300', '1000'), (2, 'headphone', '150', '200'), (3, 'pc', '25000', '50000'), (13, 'mobile', '200', '300'); -- -- Indexes for dumped tables -- -- -- Indexes for table `products` -- ALTER TABLE `products` ADD PRIMARY KEY (`id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `products` -- ALTER TABLE `products` MODIFY `id` int(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14; COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
true
f04e10d2ed87b84994b1308232f907f9c43e0776
SQL
seolbee/projectPortfolio
/jsp/Book20107/WebContent/book_sql.sql
UTF-8
574
2.890625
3
[]
no_license
CREATE TABLE BOOK_TBL( BCODE NUMBER(5, 0) NOT NULL PRIMARY KEY, BTITLE VARCHAR2(30), BWRITER VARCHAR2(30), BPUB NUMBER(4, 0), BPRICE NUMBER(10, 0), BDATE DATE NOT NULL ); INSERT INTO BOOK_TBL VALUES(10100, '자바킹', '강길동', 1001, 12000, '20201102'); INSERT INTO BOOK_TBL VALUES(10101, '알고리즘', '남길동', 1002, 18000, '20200505'); INSERT INTO BOOK_TBL VALUES(10102, '스프링두', '서길동', 1003, 23000, '20190803'); INSERT INTO BOOK_TBL VALUES(10103, '파이썬', '홍길동', 1001, 12000, '20191011'); DELETE FROM BOOK_TBL WHERE BCODE = 10104;
true
e5aad6d3535bdc896e5ddbcabdce775deb07a8e0
SQL
riomunas/dojo-contact-app
/install.sql
UTF-8
2,393
3.578125
4
[]
no_license
create user 'dojo'@'localhost' identified by 'somepass'; create database dojocontacts; grant all privileges on dojocontacts.* to 'dojo'@'localhost' with grant option; use dojocontacts; create table groups( id int(11) auto_increment primary key, name varchar(100) not null ) engine=INNODB; create table contacts( id int(11) auto_increment primary key, group_id int(11) not null, first_name varchar(100) not null, last_name varchar(100) not null, email_address varchar(255) not null, home_phone varchar(100), work_phone varchar(100), mobile_phone varchar(100), twitter varchar(255), facebook varchar(255), linkedin varchar(255), foreign key(group_id) references groups(id) on delete cascade ) engine=INNODB; insert into groups(name) values('Family'); insert into groups(name) values('Friends'); insert into groups(name) values('Colleagues'); insert into groups(name) values('Others'); insert into contacts(group_id, first_name, last_name, email_address, home_phone, work_phone, twitter, facebook, linkedin) values(3, 'Joe', 'Lennon', 'joe@joelennon.ie', '(555) 123-4567', '(555) 456-1237', 'joelennon', 'joelennon', 'joelennon'); insert into contacts(group_id, first_name, last_name, email_address, home_phone, work_phone, twitter, facebook, linkedin) values(1, 'Mary', 'Murphy', 'mary@example.com', '(555) 234-5678', '(555) 567-2348', 'mmurphy', 'marym', 'mary.murphy'); insert into contacts(group_id, first_name, last_name, email_address, home_phone, work_phone, twitter, facebook, linkedin) values(2, 'Tom', 'Smith', 'tsmith@example.com', '(555) 345-6789', '(555) 678-3459', 'tom.smith', 'tsmith', 'smithtom'); insert into contacts(group_id, first_name, last_name, email_address, home_phone, work_phone, twitter, facebook, linkedin) values(4, 'John', 'Cameron', 'jc@example.com', '(555) 456-7890', '(555) 789-4560', 'jcameron', 'john.cameron', 'johnc'); insert into contacts(group_id, first_name, last_name, email_address, home_phone, work_phone, twitter, facebook, linkedin) values(4, 'Ann', 'Dunne', 'anndunne@example.com', '(555) 567-8901', '(555) 890-5671', 'ann.dunne', 'adunne', 'dunneann'); insert into contacts(group_id, first_name, last_name, email_address, home_phone, work_phone, twitter, facebook, linkedin) values(1, 'James', 'Murphy', 'james@example.com', '(555) 678-9012', '(555) 901-6782', 'jmurphy', 'jamesmurphy', 'james.murphy');
true
4e1f1779a49405426b52296790e9983e1f3efcd4
SQL
minjaeme/BigData_summer
/project05_SQL/gisa.sql
UTF-8
1,773
4.375
4
[]
no_license
#기사 예제풀이 #database를 생성한다. create database pnudb; #pnudb database을 사용한다. use pnudb; /* CRUD INSERT SELECT UPDATE DELETE 생성 일기 갱신 삭제 */ #pnudb에 'gisa'라는 table을 생성한다. #CREATE create table gisa( # std_no 정수형, primary key형 std_no integer primary key, # email varchar형, no null email varchar(30) not null, # score 정수형, no null kor_score integer not null, eng_score integer not null, math_score integer not null, sci_score integer not null, hist_score integer not null, total integer not null, # code varchar(1) manager_code char(1) not null, acc_code char(1) not null, loc_code char(1) not null ); # select * 전체 다 출력 select * from gisa; #출력:std_no와 eng_score+kor_score, eng_score+kor_score는 temp로 저장 select std_no,eng_score+kor_score as temp #gisa table에서 from gisa #조건: acc_code='A' or acc_code='B' where acc_code = 'A' or acc_code = 'B' #출력순서는 temp기준으로 내림차순, std_no기준 오름차순 order by temp desc,std_no asc #출려제한 4등만, +사람 limit 4,1; /* acc_code가 A, B, C일 때, */ select case acc_code when 'A' then eng_core + 5 when 'B' then eng_core + 15 when 'C' then eng_core + 20 # 출력 ( case - end 까지를) and plus_score로 대입 end as plus_score from gisa where total >=150; /* 서브쿼리 사용법 */ #갯수를 새자 select count(*) from( #kor_score를 acc_code에 따라 변환 select case acc_code when 'A' then kor_score + 10 when 'B' then kor_score + 15 when 'C' then kor_score + 20 end as temp from gisa #조건: manage_code = 'B' where manager_code='B') tbl #얘를 tbl로 #tbl.temp 가 50보다 큰 사람들 where tbl.temp > 50;
true
49a0ed9ddc499a0074378855158871a778d5aea2
SQL
akkujii/tsoha-taloyhtio
/sql/create_tables.sql
UTF-8
2,060
4
4
[]
no_license
# Create table -lauseet CREATE TABLE Resurssi ( id int NOT NULL AUTO_INCREMENT, PRIMARY KEY (id), resurssinnimi varchar(32), # resurssin nimi (sauna, pyykkitupa jne.) kayttoaikaalkaa TIME, # oletusarvoinen kellonaika jolloin on mahdollista tehdä ensimmäinen varaus kayttoaikapaattyy TIME, # oletusarvoinen kellonaika jonka jälkeen ei ole enää mahdollista tehdä varauksia varausyksikko TIME, # varauksen kesto minuutteina hinta DECIMAL(4,2) # varausyksikön hinta ); CREATE TABLE Aikarako ( id int NOT NULL AUTO_INCREMENT, PRIMARY KEY (id), resurssi_id int, FOREIGN KEY (resurssi_id) REFERENCES Resurssi(id) ON DELETE CASCADE, paivamaara DATE, kellonaika TIME, kesto time ); CREATE TABLE Kayttaja ( id int NOT NULL AUTO_INCREMENT, PRIMARY KEY (id), nimi varchar(64), kayttajatunnus varchar(32), salasana varchar(64), asunto varchar(64) kayttooikeus ENUM('hallinto', 'asukas') DEFAULT ('asukas') ); CREATE TABLE Lasku ( id int NOT NULL AUTO_INCREMENT, PRIMARY KEY (id), maksettu boolean, summa decimal(7,2), viitenumero int, erapaiva DATE ); CREATE TABLE Varaus ( id int NOT NULL AUTO_INCREMENT, PRIMARY KEY (id), tunnusluku varchar(4), aikarako_id int, FOREIGN KEY (aikarako_id) REFERENCES Aikarako(id) ON DELETE CASCADE, varaaja_id int, FOREIGN KEY (varaaja_id) REFERENCES Kayttaja(id) ON DELETE CASCADE, lasku_id int, FOREIGN KEY (lasku_id) REFERENCES Lasku(id) ); # luo annetulle päivämäärälle määrä aikarakoja # ensimmäinen mahdollinen aikarako on resurssi-taulun kattoaikaalkaa-sarake delimiter // CREATE PROCEDURE luoaikaraotpaivalle(res int, pvm date) BEGIN SET @takaraja = (SELECT kayttoaikapaattyy FROM Resurssi WHERE id = res); SET @i = (SELECT kayttoaikaalkaa FROM Resurssi WHERE id = res); SET @incr = (SELECT varausyksikko FROM Resurssi WHERE id = res); REPEAT INSERT INTO Aikarako (resurssi_id, paivamaara, kellonaika, kesto) VALUES (res, pvm, @i, @incr); SET @i = ADDTIME(@i, @incr); UNTIL @i = @takaraja END REPEAT; END // DELIMITER ;
true
e397aec370ebc01324fb115178694e8dc57a054d
SQL
pjehan/dcpro7-blog
/blog.sql
UTF-8
2,150
4.4375
4
[]
no_license
USE dcpro7_blog; -- Rechercher la liste des catégories SELECT categorie.id, categorie.libelle FROM categorie; -- Rechercher la liste des tags liés à un article SELECT tag.id, tag.libelle FROM tag INNER JOIN article_has_tag ON article_has_tag.tag_id = tag.id WHERE article_has_tag.article_id = 1; -- Rechercher les informations d'un article SELECT * FROM article WHERE article.id = 1; -- Rechercher la liste des 3 derniers articles postés SELECT article.titre, article.image, article.date_creation, DATE_FORMAT(article.date_creation, '%e %M %Y à %h:%i') AS date_creation_format, CONCAT(utilisateur.prenom, ' ', utilisateur.nom) AS utilisateur FROM article INNER JOIN categorie ON categorie.id = article.categorie_id INNER JOIN utilisateur ON utilisateur.id = article.utilisateur_id ORDER BY article.date_creation DESC LIMIT 3; -- Rechercher le nombre total d'articles SELECT COUNT(*) AS nb_articles FROM article; -- Rechercher le nombre total d'articles par catégorie SELECT categorie.id, categorie.libelle, COUNT(article.id) AS nb_articles FROM categorie LEFT JOIN article ON article.categorie_id = categorie.id GROUP BY categorie.id; -- Rechercher le nom et le prénom de l’utilisateur ayant posté le plus de messages SELECT utilisateur.nom, utilisateur.prenom, COUNT(commentaire.id) AS nb_commentaires FROM utilisateur INNER JOIN commentaire ON commentaire.utilisateur_id = utilisateur.id GROUP BY utilisateur.id ORDER BY nb_commentaires DESC LIMIT 1 ; -- Rechercher le nombre moyen de messages postés par utilisateur SELECT AVG(t0.nb_commentaires) FROM ( SELECT commentaire.utilisateur_id, COUNT(*) AS nb_commentaires FROM commentaire GROUP BY commentaire.utilisateur_id ) AS t0; SELECT commentaire.id, commentaire.contenu, commentaire.date_creation, DATE_FORMAT(commentaire.date_creation, '%e %M %Y à %H:%i:%s') AS date_creation_format, CONCAT(utilisateur.prenom, ' ', utilisateur.nom) AS utilisateur FROM commentaire INNER JOIN utilisateur ON utilisateur.id = commentaire.utilisateur_id WHERE commentaire.article_id = 2 AND commentaire.commentaire_id IS NULL;
true
d66645adc1f61a3eb6a65fe90814221dac932bb2
SQL
panduputraperdana/kadinbatam
/db/kadinbatam.sql
UTF-8
3,949
3
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.12 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 07 Des 2020 pada 16.33 -- Versi Server: 5.6.16 -- PHP Version: 5.5.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; -- -- Database: `kadinbatam` -- -- -------------------------------------------------------- -- -- Struktur dari tabel `data_usaha` -- CREATE TABLE IF NOT EXISTS `data_usaha` ( `id` int(128) NOT NULL AUTO_INCREMENT, `id_user` int(11) NOT NULL, `nama_lengkap` longtext NOT NULL, `no_anggota` varchar(256) NOT NULL, `jenis_kelamin` text NOT NULL, `alamat` longtext NOT NULL, `email` varchar(128) NOT NULL, `nama_usaha` text NOT NULL, `nama_penanggungjawab` text NOT NULL, `tahun_berdiri` year(4) NOT NULL, `kondisi_usaha` text NOT NULL, `alamat_usaha` longtext NOT NULL, `npwp` varchar(128) NOT NULL, `no_hp` int(128) NOT NULL, `email_perusahaan` varchar(128) NOT NULL, `website_perusahaan` longtext NOT NULL, `account_facebook` varchar(128) NOT NULL, `account_instagram` varchar(100) NOT NULL, `badan_usaha` text NOT NULL, `kategori_produk` text NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=32 ; -- -- Dumping data untuk tabel `data_usaha` -- INSERT INTO `data_usaha` (`id`, `id_user`, `nama_lengkap`, `no_anggota`, `jenis_kelamin`, `alamat`, `email`, `nama_usaha`, `nama_penanggungjawab`, `tahun_berdiri`, `kondisi_usaha`, `alamat_usaha`, `npwp`, `no_hp`, `email_perusahaan`, `website_perusahaan`, `account_facebook`, `account_instagram`, `badan_usaha`, `kategori_produk`) VALUES (26, 8, 'Consequatur Sunt ve', '43', 'Laki-Laki', 'Voluptatem aspernat', 'fihuguh@mailinator.com', 'Sed laboriosam volu', 'Aliqua Perspiciatis', 1990, 'Sudah Tutup', 'Tempore ex velit vo', '87', 41, 'kiqe@mailinator.com', 'https://www.symori.ws', 'Minus explicabo Nos', 'Molestiae neque sequ', 'PT', 'Perikanan'), (28, 8, 'Sit deserunt eos e', '20', 'Perempuan', 'Asperiores expedita ', 'nyseqasyfu@mailinator.com', 'Vel numquam velit ip', 'Commodi reprehenderi', 2060, 'Masih Berjalan', 'Itaque facere est q', '71', 44, 'humeza@mailinator.com', 'https://www.juxiziwuhovymil.me', 'Quia voluptatem illu', 'Placeat et expedita', 'PT', 'Perdagangan'), (29, 10, 'Recusandae Voluptas', '34', 'Laki-Laki', 'Aliqua Qui cillum c', 'negofik@mailinator.com', 'Odit repudiandae con', 'Animi consequatur ', 1978, 'Sudah Tutup', 'Ipsa recusandae Ad', '55', 59, 'xaqumo@mailinator.com', 'https://www.kynemitiwody.biz', 'Omnis quos dolor sed', 'Enim ullam ab labore', 'Belum ada', 'Olahan Makanan/Minuman'), (31, 11, 'Rerum libero et modi', '98', 'Laki-Laki', 'Modi distinctio In ', 'bahyxoqal@mailinator.com', 'Dolor nemo dolor ut ', 'Ipsa quia soluta au', 2009, 'Masih Berjalan', 'Adipisicing ea ea ad', '71', 31, 'tykuwafi@mailinator.com', 'https://www.qur.info', 'Consequatur quia qui', 'Non nulla aliquam et', 'PT', 'Olahan Makanan/Minuman'); -- -------------------------------------------------------- -- -- Struktur dari tabel `user` -- CREATE TABLE IF NOT EXISTS `user` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_no` varchar(128) NOT NULL, `nama` text NOT NULL, `password` varchar(256) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=13 ; -- -- Dumping data untuk tabel `user` -- INSERT INTO `user` (`id`, `user_no`, `nama`, `password`) VALUES (8, '002', 'Jhon', '$2y$10$fQcgEDnyb/IT44su7oNUpuDkv4zxFqD3OqkIUsPfXIRM0oVZ9T/U2'), (10, '001', 'Pandu', '$2y$10$fQcgEDnyb/IT44su7oNUpuDkv4zxFqD3OqkIUsPfXIRM0oVZ9T/U2'), (11, '003', 'Joni', '$2y$10$9AHKqIewbgFgBZuYBiS/wexFrm0wJwQ8vNRHaDUHcD5seCstezTpe'), (12, '004', 'Rudi', '$2y$10$soq3TkB/rAaQ4CBFPI2az.bOn1rvzxpTc3xA.olsKdSpd.QaKgv8a'); /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
true
0b6d48998c27136926d39d31d3a651a29f81c4c3
SQL
greenplum-db/gpdb
/contrib/hstore/hstore--1.2--1.3.sql
UTF-8
525
2.8125
3
[ "Apache-2.0", "LicenseRef-scancode-generic-cla", "PostgreSQL", "OpenSSL", "LicenseRef-scancode-stream-benchmark", "ISC", "LicenseRef-scancode-openssl", "LicenseRef-scancode-other-copyleft", "LicenseRef-scancode-ssleay-windows", "BSD-2-Clause", "Python-2.0" ]
permissive
/* contrib/hstore/hstore--1.2--1.3.sql */ -- complain if script is sourced in psql, rather than via ALTER EXTENSION \echo Use "ALTER EXTENSION hstore UPDATE TO '1.3'" to load this file. \quit CREATE FUNCTION hstore_to_jsonb(hstore) RETURNS jsonb AS 'MODULE_PATHNAME', 'hstore_to_jsonb' LANGUAGE C IMMUTABLE STRICT; CREATE CAST (hstore AS jsonb) WITH FUNCTION hstore_to_jsonb(hstore); CREATE FUNCTION hstore_to_jsonb_loose(hstore) RETURNS jsonb AS 'MODULE_PATHNAME', 'hstore_to_jsonb_loose' LANGUAGE C IMMUTABLE STRICT;
true
f4ef74cc6adad163c43e160321d381bdea214545
SQL
cdleema/database-project
/project.sql
UTF-8
16,139
3.609375
4
[]
no_license
PRAGMA foreign_keys = ON; CREATE TABLE Company ( Id INTEGER PRIMARY KEY AUTOINCREMENT, Name VARCHAR(255) NOT NULL, CountryOfOrigin VARCHAR(255), CONSTRAINT UK_Name UNIQUE(Name) ); CREATE TABLE Warehouse ( Id INTEGER PRIMARY KEY AUTOINCREMENT, Name VARCHAR(255) NOT NULL, Location VARCHAR(255) NOT NULL, Owner VARCHAR(255) NOT NULL, Size INTEGER, CONSTRAINT UK_Name_Location UNIQUE(Name, Location), CONSTRAINT FK_Warehouse_Owner_2_Company_Name FOREIGN KEY (Owner) REFERENCES Company(Name) ); CREATE TABLE ShippingLocation ( Id INTEGER PRIMARY KEY AUTOINCREMENT, Name VARCHAR(255) NOT NULL, CONSTRAINT UK_Location UNIQUE(Name) ); CREATE TABLE WarehouseShippingLocation( Id INTEGER PRIMARY KEY AUTOINCREMENT, WarehouseId INTEGER NOT NULL, ShippingLocationId INTEGER NOT NULL, CONSTRAINT FK_WarehouseShippingLocation_WarehouseId_2_Warehouse_Id FOREIGN KEY (WarehouseId) REFERENCES Warehouse(Id), CONSTRAINT FK_WarehouseShippingLocation_ShippingLocationId_2_ShippingLocation_Id FOREIGN KEY (ShippingLocationId) REFERENCES ShippingLocation(Id) ); CREATE TABLE Item ( Id INTEGER PRIMARY KEY AUTOINCREMENT, Name VARCHAR(255) NOT NULL, Msrp DECIMAL(8,2) NULL, ExpiryDate DATE NULL, CONSTRAINT UK_Name UNIQUE(Name) ); CREATE TABLE Type( Id INTEGER PRIMARY KEY AUTOINCREMENT, Name VARCHAR(255) NOT NULL, CONSTRAINT UK_Type UNIQUE(Name) ); CREATE TABLE ItemType( Id INTEGER PRIMARY KEY AUTOINCREMENT, ItemId INTEGER NOT NULL, TypeId INTEGER NOT NULL, CONSTRAINT FK_ItemType_ItemId_2_Item_Id FOREIGN KEY (ItemId) REFERENCES Item(Id), CONSTRAINT FK_ItemType_TypeId_2_Type_Id FOREIGN KEY (TypeId) REFERENCES Type(Id) ); CREATE TABLE WarehouseItem( Id INTEGER PRIMARY KEY AUTOINCREMENT, WarehouseId INTEGER NOT NULL, ItemId INTEGER NOT NULL, Quantity INTEGER NOT NULL, CONSTRAINT FK_WarehouseItem_WarehouseId_2_Warehouse_Id FOREIGN KEY (WarehouseId) REFERENCES Warehouse(Id), CONSTRAINT FK_WarehouseItem_ItemId_2_Item_Id FOREIGN KEY (ItemId) REFERENCES Item(Id) ); CREATE TABLE Vehicle( Id INTEGER PRIMARY KEY AUTOINCREMENT, PlateNumber CHAR(8) NOT NULL, Owner VARCHAR(255) NOT NULL, ActiveServiceLife INTEGER, VehicleType VARCHAR(255), Capacity INTEGER, Manufacturer VARCHAR(255), Model VARCHAR(255), CONSTRAINT UK_PlateNumber UNIQUE(PlateNUmber), CONSTRAINT FK_Vehicle_Owner_2_Company_Name FOREIGN KEY (Owner) REFERENCES Company(Name) ); CREATE TABLE Store( Id INTEGER PRIMARY KEY AUTOINCREMENT, Owner VARCHAR(255), Name VARCHAR(255) NOT NULL, Location VARCHAR(255) NOT NULL, CONSTRAINT UK_Name_Location UNIQUE(Name, Location), CONSTRAINT FK_Store_Owner_2_Company_Name FOREIGN KEY (Owner) REFERENCES Company(Name) ); CREATE TABLE StoreItem( Id INTEGER PRIMARY KEY AUTOINCREMENT, StoreId INTEGER NOT NULL, ItemId INTEGER NOT NULL, Quantity INTEGER NOT NULL, CONSTRAINT FK_StoreItem_StoreId_2_Store_Id FOREIGN KEY (StoreId) REFERENCES Store(Id), CONSTRAINT FK_StoreItem_ItemId_2_Item_Id FOREIGN KEY (ItemId) REFERENCES Item(Id) ); INSERT INTO Company(Name, CountryOfOrigin) VALUES ('Tru Kids, Inc', 'US'); INSERT INTO Company(Name, CountryOfOrigin) VALUES ('Food Company', 'US'); INSERT INTO Company(Name, CountryOfOrigin) VALUES ('Automobile Company', 'US'); INSERT INTO Company(Name, CountryOfOrigin) VALUES ('Walmart', 'US'); INSERT INTO Company(Name, CountryOfOrigin) VALUES ('Hudsons Bay', 'CAN'); INSERT INTO Company(Name, CountryOfOrigin) VALUES ('Lowes', 'US'); INSERT INTO Company(Name, CountryOfOrigin) VALUES ('McDonalds Co', 'US'); INSERT INTO Company(Name, CountryOfOrigin) VALUES ('Jeans Company', 'ENG'); INSERT INTO Company(Name, CountryOfOrigin) VALUES ('Indigo Books & Music Inc', 'CAN'); INSERT INTO Company(Name, CountryOfOrigin) VALUES ('Storage Company', 'AUS'); INSERT INTO Store(Owner, Name, Location) VALUES ('Tru Kids, Inc', 'Toys R Us', 'New York'); INSERT INTO Store(Owner, Name, Location) VALUES ('Walmart', 'Walmart', 'Toronto'); INSERT INTO Store(Owner, Name, Location) VALUES ('Zellers', 'Hudsons Bay', 'Toronto'); INSERT INTO Store(Owner, Name, Location) VALUES ('Rona', 'Lowes', 'Mississauga'); INSERT INTO Store(Owner, Name, Location) VALUES ('McDonalds', 'McDonalds Co', 'Toronto'); INSERT INTO Store(Owner, Name, Location) VALUES ('McDonalds', 'McDonalds Co', 'New York'); INSERT INTO Store(Owner, Name, Location) VALUES ('McDonalds', 'McDonalds Co', 'Ottawa'); INSERT INTO Store(Owner, Name, Location) VALUES ('CarPlace', 'Automobile Company', 'Toronto'); INSERT INTO Store(Owner, Name, Location) VALUES ('Walmart', 'Walmart', 'Ottawa'); INSERT INTO Store(Owner, Name, Location) VALUES ('Indigo Books & Music Inc', 'Indigos', 'Mississauga'); INSERT INTO ShippingLocation(Name) VALUES ('Toronto'); INSERT INTO ShippingLocation(Name) VALUES ('Mississauga'); INSERT INTO ShippingLocation(Name) VALUES ('New York City'); INSERT INTO ShippingLocation(Name) VALUES ('Montreal'); INSERT INTO ShippingLocation(Name) VALUES ('Kitchener'); INSERT INTO ShippingLocation(Name) VALUES ('Malton'); INSERT INTO ShippingLocation(Name) VALUES ('York'); INSERT INTO ShippingLocation(Name) VALUES ('Trent'); INSERT INTO ShippingLocation(Name) VALUES ('Vaughn'); INSERT INTO ShippingLocation(Name) VALUES ('Caledon'); INSERT INTO Warehouse(Name, Location, Owner, Size) VALUES ('warehouse1','New York City', 'Tru Kids, Inc', 200000); INSERT INTO Warehouse(Name, Location, Owner, Size) VALUES ('warehouse2', 'Toronto', 'Storage Company', 11000); INSERT INTO Warehouse(Name, Location, Owner, Size) VALUES ('warehouse3', 'Mississauga', 'Storage Company', 10000); INSERT INTO Warehouse(Name, Location, Owner, Size) VALUES ('warehouse4', 'Montreal', 'Storage Company', 8000); INSERT INTO Warehouse(Name, Location, Owner, Size) VALUES ('warehouse5', 'Kitchener', 'Storage Company', 250000); INSERT INTO Warehouse(Name, Location, Owner, Size) VALUES ('warehouse6', 'Malton', 'Storage Company', 10000); INSERT INTO Warehouse(Name, Location, Owner, Size) VALUES ('warehouse7', 'Toronto', 'Storage Company', 12000); INSERT INTO Warehouse(Name, Location, Owner, Size) VALUES ('warehouse8', 'Vaughn', 'Storage Company', 10000); INSERT INTO Warehouse(Name, Location, Owner, Size) VALUES ('warehouse9', 'New York City', 'Storage Company', 10000); INSERT INTO Warehouse(Name, Location, Owner, Size) VALUES ('warehouse10', 'Caledon', 'Storage Company', 10000); INSERT INTO WarehouseShippingLocation(WarehouseId, ShippingLocationId) VALUES ((SELECT Id FROM Warehouse WHERE Name='warehouse1'),(SELECT Id FROM ShippingLocation WHERE Name='Toronto')); INSERT INTO WarehouseShippingLocation(WarehouseId, ShippingLocationId) VALUES ((SELECT Id FROM Warehouse WHERE Name='warehouse2'),(SELECT Id FROM ShippingLocation WHERE Name='New York City')); INSERT INTO WarehouseShippingLocation(WarehouseId, ShippingLocationId) VALUES ((SELECT Id FROM Warehouse WHERE Name='warehouse3'),(SELECT Id FROM ShippingLocation WHERE Name='Mississauga')); INSERT INTO WarehouseShippingLocation(WarehouseId, ShippingLocationId) VALUES ((SELECT Id FROM Warehouse WHERE Name='warehouse4'),(SELECT Id FROM ShippingLocation WHERE Name='Toronto')); INSERT INTO WarehouseShippingLocation(WarehouseId, ShippingLocationId) VALUES ((SELECT Id FROM Warehouse WHERE Name='warehouse5'),(SELECT Id FROM ShippingLocation WHERE Name='Montreal')); INSERT INTO WarehouseShippingLocation(WarehouseId, ShippingLocationId) VALUES ((SELECT Id FROM Warehouse WHERE Name='warehouse6'),(SELECT Id FROM ShippingLocation WHERE Name='Kitchener')); INSERT INTO WarehouseShippingLocation(WarehouseId, ShippingLocationId) VALUES ((SELECT Id FROM Warehouse WHERE Name='warehouse7'),(SELECT Id FROM ShippingLocation WHERE Name='Caledon')); INSERT INTO WarehouseShippingLocation(WarehouseId, ShippingLocationId) VALUES ((SELECT Id FROM Warehouse WHERE Name='warehouse8'),(SELECT Id FROM ShippingLocation WHERE Name='Toronto')); INSERT INTO WarehouseShippingLocation(WarehouseId, ShippingLocationId) VALUES ((SELECT Id FROM Warehouse WHERE Name='warehouse8'),(SELECT Id FROM ShippingLocation WHERE Name='New York City')); INSERT INTO WarehouseShippingLocation(WarehouseId, ShippingLocationId) VALUES ((SELECT Id FROM Warehouse WHERE Name='warehouse9'),(SELECT Id FROM ShippingLocation WHERE Name='New York City')); INSERT INTO Item(Name, MSRP, ExpiryDate) VALUES ('bicycle', 200.00, NULL); INSERT INTO Item(Name, MSRP, ExpiryDate) VALUES ('jeans', 40.00, NULL); INSERT INTO Item(Name, MSRP, ExpiryDate) VALUES ('Intro to Data Engineering', 210.00, NULL); INSERT INTO Item(Name, MSRP, ExpiryDate) VALUES ('lego', 15.50, NULL); INSERT INTO Item(Name, MSRP, ExpiryDate) VALUES ('chair', 35.00, NULL); INSERT INTO Item(Name, MSRP, ExpiryDate) VALUES ('lettuce', 2.00, '2020-03-22'); INSERT INTO Item(Name, MSRP, ExpiryDate) VALUES ('pen',0.50, NULL); INSERT INTO Item(Name, MSRP, ExpiryDate) VALUES ('laptop', 2000.00, NULL); INSERT INTO Item(Name, MSRP, ExpiryDate) VALUES ('screwdriver', 6.00, NULL); INSERT INTO Item(Name, MSRP, ExpiryDate) VALUES ('dictionary', 10.00, NULL); INSERT INTO Type(Name) VALUES ('Children'); INSERT INTO Type(Name) VALUES ('Sports'); INSERT INTO Type(Name) VALUES ('Furniture'); INSERT INTO Type(Name) VALUES ('Food'); INSERT INTO Type(Name) VALUES ('Education'); INSERT INTO Type(Name) VALUES ('Entertainment'); INSERT INTO Type(Name) VALUES ('Books'); INSERT INTO Type(Name) VALUES ('Electronics'); INSERT INTO Type(Name) VALUES ('Clothing'); INSERT INTO Type(Name) VALUES ('Tools'); INSERT INTO ItemType(ItemId, TypeId) VALUES ((SELECT Id FROM Item Where Name = 'bicycle'),(SELECT Id FROM Type WHERE Name = 'Children')); INSERT INTO ItemType(ItemId, TypeId) VALUES ((SELECT Id FROM Item Where Name = 'bicycle'), (SELECT Id FROM Type WHERE Name = 'Sports')); INSERT INTO ItemType(ItemId, TypeId) VALUES ((SELECT Id FROM Item Where Name = 'bicycle'), (SELECT Id FROM Type WHERE Name = 'Entertainment')); INSERT INTO ItemType(ItemId, TypeId) VALUES ((SELECT Id FROM Item Where Name = 'chair'), (SELECT Id FROM Type WHERE Name = 'Furniture')); INSERT INTO ItemType(ItemId, TypeId) VALUES ((SELECT Id FROM Item Where Name = 'jeans'), (SELECT Id FROM Type WHERE Name = 'Clothing')); INSERT INTO ItemType(ItemId, TypeId) VALUES ((SELECT Id FROM Item Where Name = 'Intro to Data Engineering'), (SELECT Id FROM Type WHERE Name = 'Books')); INSERT INTO ItemType(ItemId, TypeId) VALUES ((SELECT Id FROM Item Where Name = 'Intro to Data Engineering'), (SELECT Id FROM Type WHERE Name = 'Education')); INSERT INTO ItemType(ItemId, TypeId) VALUES ((SELECT Id FROM Item Where Name = 'lettuce'), (SELECT Id FROM Type WHERE Name = 'Food')); INSERT INTO ItemType(ItemId, TypeId) VALUES ((SELECT Id FROM Item Where Name = 'pen'), (SELECT Id FROM Type WHERE Name = 'Education')); INSERT INTO ItemType(ItemId, TypeId) VALUES ((SELECT Id FROM Item Where Name = 'laptop'), (SELECT Id FROM Type WHERE Name = 'Electronics')); INSERT INTO ItemType(ItemId, TypeId) VALUES ((SELECT Id FROM Item Where Name = 'screwdriver'), (SELECT Id FROM Type WHERE Name = 'Tools')); INSERT INTO ItemType(ItemId, TypeId) VALUES ((SELECT Id FROM Item Where Name = 'dictionary'), (SELECT Id FROM Type WHERE Name = 'Books')); INSERT INTO ItemType(ItemId, TypeId) VALUES ((SELECT Id FROM Item Where Name = 'dictionary'), (SELECT Id FROM Type WHERE Name = 'Education')); INSERT INTO StoreItem(StoreId, ItemId, Quantity) VALUES (1, (SELECT Id FROM Item WHERE name = 'bicycle'), 200); INSERT INTO StoreItem(StoreId, ItemId, Quantity) VALUES (2, (SELECT Id FROM Item WHERE name = 'Intro to Data Engineering'), 30); INSERT INTO StoreItem(StoreId, ItemId, Quantity) VALUES (3,(SELECT Id FROM Item WHERE name = 'dictionary'), 50); INSERT INTO StoreItem(StoreId, ItemId, Quantity) VALUES (4, (SELECT Id FROM Item WHERE name = 'chair'), 55); INSERT INTO StoreItem(StoreId, ItemId, Quantity) VALUES (5, (SELECT Id FROM Item WHERE name = 'pen'), 5000); INSERT INTO StoreItem(StoreId, ItemId, Quantity) VALUES (6, (SELECT Id FROM Item WHERE name = 'laptop'), 35); INSERT INTO StoreItem(StoreId, ItemId, Quantity) VALUES (7, (SELECT Id FROM Item WHERE name = 'lettuce'), 100); INSERT INTO StoreItem(StoreId, ItemId, Quantity) VALUES (8, (SELECT Id FROM Item WHERE name = 'lego'), 300); INSERT INTO StoreItem(StoreId, ItemId, Quantity) VALUES (9, (SELECT Id FROM Item WHERE name = 'jeans'), 10000); INSERT INTO StoreItem(StoreId, ItemId, Quantity) VALUES (10, (SELECT Id FROM Item WHERE name = 'screwdriver'), 300); INSERT INTO WarehouseItem(WarehouseId, ItemId, Quantity) VALUES ((SELECT Id FROM Warehouse WHERE name = 'warehouse1'), (SELECT Id FROM Item WHERE name = 'jeans'), 40000); INSERT INTO WarehouseItem(WarehouseId, ItemId, Quantity) VALUES ((SELECT Id FROM Warehouse WHERE name = 'warehouse2'), (SELECT Id FROM Item WHERE name = 'pens'), 1000000); INSERT INTO WarehouseItem(WarehouseId, ItemId, Quantity) VALUES ((SELECT Id FROM Warehouse WHERE name = 'warehouse3'), (SELECT Id FROM Item WHERE name = 'bicycles'), 500); INSERT INTO WarehouseItem(WarehouseId, ItemId, Quantity) VALUES ((SELECT Id FROM Warehouse WHERE name = 'warehouse4'), (SELECT Id FROM Item WHERE name = 'laptops'), 2500); INSERT INTO WarehouseItem(WarehouseId, ItemId, Quantity) VALUES ((SELECT Id FROM Warehouse WHERE name = 'warehouse5'), (SELECT Id FROM Item WHERE name = 'jeans'), 50000); INSERT INTO WarehouseItem(WarehouseId, ItemId, Quantity) VALUES ((SELECT Id FROM Warehouse WHERE name = 'warehouse6'), (SELECT Id FROM Item WHERE name = 'lettuce'), 40000); INSERT INTO WarehouseItem(WarehouseId, ItemId, Quantity) VALUES ((SELECT Id FROM Warehouse WHERE name = 'warehouse7'), (SELECT Id FROM Item WHERE name = 'screwdriver'), 1000000); INSERT INTO WarehouseItem(WarehouseId, ItemId, Quantity) VALUES ((SELECT Id FROM Warehouse WHERE name = 'warehouse8'), (SELECT Id FROM Item WHERE name = 'chair'), 400); INSERT INTO WarehouseItem(WarehouseId, ItemId, Quantity) VALUES ((SELECT Id FROM Warehouse WHERE name = 'warehouse9'), (SELECT Id FROM Item WHERE name = 'dictionary'), 500); INSERT INTO WarehouseItem(WarehouseId, ItemId, Quantity) VALUES ((SELECT Id FROM Warehouse WHERE name = 'warehouse10'), (SELECT Id FROM Item WHERE name = 'Intro to Data Engineering'), 100); INSERT INTO Vehicle(PlateNumber, Owner, ActiveServiceLife, VehicleType, Capacity, Manufacturer, Model) VALUES ('5TGY606', 'Walmart', 3, 'Truck', 1000, 'Mack', 'Pinnacle CHU613'); INSERT INTO Vehicle(PlateNumber, Owner, ActiveServiceLife, VehicleType, Capacity, Manufacturer, Model) VALUES ('3SKN889', 'Tru Kids, Inc', 4, 'Truck', 1000, 'Mack', 'Pinnacle CHU613'); INSERT INTO Vehicle(PlateNumber, Owner, ActiveServiceLife, VehicleType, Capacity, Manufacturer, Model) VALUES ('DAN6346', 'Food Company', 1, 'Plane', 1000, 'Boeing', '757'); INSERT INTO Vehicle(PlateNumber, Owner, ActiveServiceLife, VehicleType, Capacity, Manufacturer, Model) VALUES ('149BVW', 'Automobile Company', 14, 'Truck', 1000, 'Mack', 'Pinnacle CHU613'); INSERT INTO Vehicle(PlateNumber, Owner, ActiveServiceLife, VehicleType, Capacity, Manufacturer, Model) VALUES ('T674863C', 'Walmart', 1, 'Truck', 1000, 'Mack', 'Pinnacle CHU613'); INSERT INTO Vehicle(PlateNumber, Owner, ActiveServiceLife, VehicleType, Capacity, Manufacturer, Model) VALUES ('AGE5055', 'McDonalds Co', 5, 'Truck', 1000, 'Mack', 'Pinnacle CHU613'); INSERT INTO Vehicle(PlateNumber, Owner, ActiveServiceLife, VehicleType, Capacity, Manufacturer, Model) VALUES ('HRX7050', 'Walmart', 3, 'Truck', 1000, 'Mack', 'Pinnacle CHU613'); INSERT INTO Vehicle(PlateNumber, Owner, ActiveServiceLife, VehicleType, Capacity, Manufacturer, Model) VALUES ('996KRW', 'McDonalds Co', 8, 'Truck', 1000, 'Mack', 'Pinnacle CHU613'); INSERT INTO Vehicle(PlateNumber, Owner, ActiveServiceLife, VehicleType, Capacity, Manufacturer, Model) VALUES ('JPB5563', 'Walmart', 1, 'Truck', 1000, 'Mack', 'Pinnacle CHU613'); INSERT INTO Vehicle(PlateNumber, Owner, ActiveServiceLife, VehicleType, Capacity, Manufacturer, Model) VALUES ('DP3ZD7', 'McDonalds Co', 4, 'Truck', 1000, 'Mack', 'Pinnacle CHU613');
true
86415dfe9f2bc3236b6605f3f35da731c4532d28
SQL
Amit998/DotNet-and-csharp
/SQL/Practice/assignment2.sql
UTF-8
836
4.78125
5
[]
no_license
--Write separate queries using a join, a subquery, a CTE, and then an EXISTS to list all AdventureWorks customers who have not placed an order. --using join SELECT * FROM Sales.Customer c LEFT OUTER JOIN Sales.SalesOrderHeader s ON c.CustomerID = s.CustomerID WHERE s.PurchaseOrderNumber IS NULL; --using subquery SELECT * FROM Sales.Customer c WHERE c.CustomerID in( SELECT s.CustomerID FROM Sales.SalesOrderHeader s WHERE s.PurchaseOrderNumber IS NULL ) --using CTE WITH s AS ( SELECT * FROM Sales.SalesOrderHeader ) SELECT * FROM Sales.Customer c LEFT OUTER JOIN s ON c.CustomerID=s.CustomerID WHERE s.PurchaseOrderNumber IS NULL order by c.CustomerID; --using exists SELECT * FROM Sales.Customer c where EXISTS( SELECT * FROM Sales.SalesOrderHeader s WHERE c.CustomerID=s.CustomerID AND s.PurchaseOrderNumber IS NULL);
true
8d0762619f78a2a112ab26c19aae634c16df249f
SQL
Baltasky/BDA-2020
/INSERT_UPDATE.sql
UTF-8
616
3.046875
3
[]
no_license
--Agregar registro a una tabla INSERT INTO dbo.TablaDemo (Nombre,Fecha,Precio,Activo) VALUES ('Prueba','20200318',9.5,1) INSERT INTO dbo.TablaDemo (Nombre,Fecha,Precio,Activo) VALUES ('Prueba2','20200318',12.3,1) SELECT * FROM dbo.TablaDemo --Actualizar registro UPDATE dbo.TablaDemo SET Nombre = 'PruebaDos' --CUIDADO! Actualizará todos los registros --Es de vital importancia especificar la sentencia WHERE para indicar el registro --que queremos modificar. UPDATE dbo.TablaDemo SET Nombre = 'Prueba' WHERE Id = 1 UPDATE dbo.TablaDemo SET Nombre = 'Prueba2' WHERE Id = 2 SELECT * FROM dbo.TablaDemo
true
113d53d8d229ec81d27feb117da477235970a6e8
SQL
z-sector/go-clean-architecture-1
/examples/book-rest-api/migrations/mysql/002_seeding-data.sql
UTF-8
5,781
2.65625
3
[ "MIT" ]
permissive
use gca; INSERT INTO books (title, released_year) values ("Clean Code", 2008); INSERT INTO books (title, released_year) values ("Clean Architecture: A Craftsman's Guide to Software Structure and Design", 2017); INSERT INTO books (title, released_year) values ("Clean Agile: Back to Basics", 2019); INSERT INTO books (title, released_year) values ("The Pragmatic Programmer", 1999); INSERT INTO books (title, released_year) values ("Pragmatic Thinking and Learning: Refactor Your Wetware", 2008); INSERT INTO books (title, released_year) values ("Learn to Program using Minecraft Plugins with Bukkit", 2014); INSERT INTO books (title, released_year) values ("Refactoring", 1999); INSERT INTO books (title, released_year) values ("Planning Extreme Programming", 2000); INSERT INTO books (title, released_year) values ("Test-Driven Development by Example", 2002); INSERT INTO books (title, released_year) values ("JUnit Pocket Guide", 2004); INSERT INTO books (title, released_year) values ("Implementation Patterns", 2008); INSERT INTO book_rating (book_id, user_id, rating) values (1, 1, 5); INSERT INTO book_rating (book_id, user_id, rating) values (1, 12, 4); INSERT INTO book_rating (book_id, user_id, rating) values (1, 3, 4); INSERT INTO book_rating (book_id, user_id, rating) values (1, 44, 5); INSERT INTO book_rating (book_id, user_id, rating) values (1, 66, 5); INSERT INTO book_rating (book_id, user_id, rating) values (1, 13, 5); INSERT INTO book_rating (book_id, user_id, rating) values (2, 41, 5); INSERT INTO book_rating (book_id, user_id, rating) values (2, 32, 3); INSERT INTO book_rating (book_id, user_id, rating) values (2, 38, 5); INSERT INTO book_rating (book_id, user_id, rating) values (2, 11, 3); INSERT INTO book_rating (book_id, user_id, rating) values (2, 46, 5); INSERT INTO book_rating (book_id, user_id, rating) values (2, 27, 4); INSERT INTO book_rating (book_id, user_id, rating) values (2, 48, 3); INSERT INTO book_rating (book_id, user_id, rating) values (2, 6, 5); INSERT INTO book_rating (book_id, user_id, rating) values (2, 62, 5); INSERT INTO book_rating (book_id, user_id, rating) values (3, 41, 5); INSERT INTO book_rating (book_id, user_id, rating) values (3, 3, 3); INSERT INTO book_rating (book_id, user_id, rating) values (3, 99, 3); INSERT INTO book_rating (book_id, user_id, rating) values (4, 35, 5); INSERT INTO book_rating (book_id, user_id, rating) values (4, 14, 2); INSERT INTO book_rating (book_id, user_id, rating) values (4, 95, 1); INSERT INTO book_rating (book_id, user_id, rating) values (4, 26, 3); INSERT INTO book_rating (book_id, user_id, rating) values (4, 87, 3); INSERT INTO book_rating (book_id, user_id, rating) values (4, 66, 4); INSERT INTO book_rating (book_id, user_id, rating) values (4, 42, 4); INSERT INTO book_rating (book_id, user_id, rating) values (4, 81, 4); INSERT INTO book_rating (book_id, user_id, rating) values (4, 88, 3); INSERT INTO book_rating (book_id, user_id, rating) values (4, 96, 5); INSERT INTO book_rating (book_id, user_id, rating) values (4, 80, 5); INSERT INTO book_rating (book_id, user_id, rating) values (4, 84, 4); INSERT INTO book_rating (book_id, user_id, rating) values (4, 83, 3); INSERT INTO book_rating (book_id, user_id, rating) values (4, 5, 4); INSERT INTO book_rating (book_id, user_id, rating) values (4, 47 , 2); INSERT INTO book_rating (book_id, user_id, rating) values (5, 55, 5); INSERT INTO book_rating (book_id, user_id, rating) values (5, 72, 5); INSERT INTO book_rating (book_id, user_id, rating) values (5, 25, 5); INSERT INTO book_rating (book_id, user_id, rating) values (6, 68, 2); INSERT INTO book_rating (book_id, user_id, rating) values (6, 76, 4); INSERT INTO book_rating (book_id, user_id, rating) values (6, 65, 1); INSERT INTO book_rating (book_id, user_id, rating) values (6, 96, 3); INSERT INTO book_rating (book_id, user_id, rating) values (6, 10, 2); INSERT INTO book_rating (book_id, user_id, rating) values (6, 45, 4); INSERT INTO book_rating (book_id, user_id, rating) values (7, 40, 5); INSERT INTO book_rating (book_id, user_id, rating) values (7, 73, 3); INSERT INTO book_rating (book_id, user_id, rating) values (7, 9, 3); INSERT INTO book_rating (book_id, user_id, rating) values (7, 93, 1); INSERT INTO book_rating (book_id, user_id, rating) values (7, 38, 2); INSERT INTO book_rating (book_id, user_id, rating) values (7, 30, 5); INSERT INTO book_rating (book_id, user_id, rating) values (7, 80, 2); INSERT INTO book_rating (book_id, user_id, rating) values (7, 81, 4); INSERT INTO book_rating (book_id, user_id, rating) values (7, 50, 4); INSERT INTO book_rating (book_id, user_id, rating) values (7, 22, 5); INSERT INTO book_rating (book_id, user_id, rating) values (7, 95, 5); INSERT INTO book_rating (book_id, user_id, rating) values (7, 52, 5); INSERT INTO book_rating (book_id, user_id, rating) values (8, 58, 4); INSERT INTO book_rating (book_id, user_id, rating) values (9, 16, 5); INSERT INTO book_rating (book_id, user_id, rating) values (9, 47, 5); INSERT INTO book_rating (book_id, user_id, rating) values (9, 96, 5); INSERT INTO book_rating (book_id, user_id, rating) values (9, 22, 5); INSERT INTO book_rating (book_id, user_id, rating) values (9, 79, 3); INSERT INTO book_rating (book_id, user_id, rating) values (9, 70, 5); INSERT INTO book_rating (book_id, user_id, rating) values (9, 9, 4); INSERT INTO book_rating (book_id, user_id, rating) values (9, 73, 5); INSERT INTO book_rating (book_id, user_id, rating) values (9, 26, 4); INSERT INTO book_rating (book_id, user_id, rating) values (10, 27, 3); INSERT INTO book_rating (book_id, user_id, rating) values (10, 51, 4); INSERT INTO book_rating (book_id, user_id, rating) values (10, 66, 2); INSERT INTO book_rating (book_id, user_id, rating) values (10, 33, 3);
true
927fcfce10c83ed2a51aa194be2be5e40ff67e15
SQL
indratbg/code
/SPR_CASH_FLOW_HARIAN.sql
UTF-8
17,009
3.21875
3
[]
no_license
create or replace PROCEDURE SPR_CASH_FLOW_HARIAN(P_REP_DATE DATE, P_USER_ID VARCHAR2, P_GENERATE_DATE DATE, P_RAND_VALUE OUT NUMBER, P_ERROR_CODE OUT NUMBER, P_ERROR_MSG OUT VARCHAR2) IS V_RANDOM_VALUE NUMBER(10,0); V_ERR EXCEPTION; V_ERROR_CODE NUMBER; V_ERROR_MSG VARCHAR2(200); V_BEG_BAL_BANK NUMBER; V_BGN_BAL_DATE DATE; V_REAL_BALANCE_BANK NUMBER; V_EST_BALANCE_BANK NUMBER; --i integer :=1; V_REAL_MASUK NUMBER; V_EST_MASUK NUMBER; V_EST_KELUAR NUMBER; V_EST_MASUK_RDN NUMBER; V_EST_MASUK_NSB NUMBER; CURSOR CSR_DATA IS SELECT T.ORDER_GROUP,T.ORDER_NO,T.MAIN_KATEGORI MAIN, T.KATEGORI,t.sesi, T.DESCRIPTION,NVL(A.MASUK,0) REAL_MASUK,NVL(A.KELUAR,0) REAL_KELUAR, NVL(DECODE(SIGN( NVL(B.MASUK,0)-NVL(A.MASUK,0)),1,( NVL(B.MASUK,0)-NVL(A.MASUK,0)),0),0) EST_MASUK, NVL(DECODE(SIGN( NVL(B.KELUAR,0)-NVL(A.KELUAR,0)),1,( NVL(B.KELUAR,0)-NVL(A.KELUAR,0)),0),0) EST_KELUAR , NVL(B.MASUK,0) ORI_EST_MASUK, NVL(B.KELUAR,0) ORI_EST_KELUAR FROM T_CASH_FLOW_KATEGORI T, ( SELECT KATEGORI, NVL(MASUK,0)MASUK,NVL(KELUAR,0)KELUAR FROM TMP_CASH_FLOW_REAL WHERE RAND_VALUE=V_RANDOM_VALUE AND USER_ID=P_USER_ID )A, ( SELECT KATEGORI,NVL(MASUK,0)MASUK,NVL(KELUAR,0)KELUAR FROM TMP_CASH_FLOW_ESTIMASI WHERE RAND_VALUE=V_RANDOM_VALUE AND USER_ID=P_USER_ID )B WHERE T.KATEGORI=A.KATEGORI(+) AND T.KATEGORI=B.KATEGORI(+) ORDER BY T.ORDER_GROUP,T.SESI,T.ORDER_NO; CURSOR CSR_JUR_EX IS SELECT A.XN_DOC_NUM, B.PAYREC_NUM FROM ( SELECT XN_DOC_NUM, T_ACCOUNT_LEDGER.DOC_DATE, CLIENT_CD, CURR_VAL FROM T_ACCOUNT_LEDGER, T_PAYRECH, MST_GLA_TRX G WHERE DOC_DATE = P_REP_DATE AND t_account_ledger.due_date = P_REP_DATE AND TRIM(T_ACCOUNT_LEDGER.GL_ACCT_CD) = G.GL_A AND G.JUR_TYPE='BANK' AND RECORD_SOURCE = 'PD' AND XN_DOC_NUM = PAYREC_NUM AND CLIENT_CD IS NOT NULL AND TRIM(T_PAYRECH.ACCT_TYPE) = 'RDM' ) A, ( SELECT PAYREC_NUM, T_ACCOUNT_LEDGER.DOC_DATE, CLIENT_CD, CURR_VAL FROM T_ACCOUNT_LEDGER, T_PAYRECH, MST_GLA_TRX G WHERE DOC_DATE = P_REP_DATE AND TRIM(T_ACCOUNT_LEDGER.GL_ACCT_CD) = G.GL_A AND G.JUR_TYPE='BANK' AND t_account_ledger.due_date = P_REP_DATE AND RECORD_SOURCE = 'RV' AND XN_DOC_NUM = PAYREC_NUM AND CLIENT_CD IS NOT NULL AND TRIM(T_PAYRECH.ACCT_TYPE) = 'RDI' ) B WHERE A.DOC_DATE = B.DOC_DATE AND A.CLIENT_CD = B.CLIENT_CD AND A.CURR_VAL = B.CURR_VAL; CURSOR CSR_REPORT IS SELECT MAIN_KATEGORI,KATEGORI,REAL_MASUK,REAL_KELUAR,EST_MASUK,EST_KELUAR FROM R_CASH_FLOW_HARIAN WHERE RAND_VALUE=V_RANDOM_VALUE AND USER_ID=P_USER_ID AND KATEGORI <> '00' ORDER BY ORDER_GROUP,SESI,ORDER_NO; BEGIN V_RANDOM_VALUE :=ABS(DBMS_RANDOM.RANDOM); BEGIN SP_RPT_REMOVE_RAND('R_CASH_FLOW_HARIAN',V_RANDOM_VALUE,V_ERROR_MSG,V_ERROR_CODE); EXCEPTION WHEN OTHERS THEN V_ERROR_CODE := -3; V_ERROR_MSG := SUBSTR('SP_RPT_REMOVE_RAND '||V_ERROR_MSG||SQLERRM(SQLCODE),1,200); RAISE V_ERR; END; IF V_ERROR_CODE < 0 THEN V_ERROR_CODE := -4; V_ERROR_MSG := SUBSTR('SP_RPT_REMOVE_RAND'||V_ERROR_MSG,1,200); RAISE V_ERR; END IF; --GET BEGINNING BALANCE DATE V_BGN_BAL_DATE := P_REP_DATE-TO_CHAR(P_REP_DATE,'DD')+1; --GET BEGINNING BALANCE BANK BEGIN SELECT SUM(NVL(beg_bal, 0)) INTO V_BEG_BAL_BANK FROM ( SELECT SUM(NVL(b.deb_obal, 0) - NVL(b.cre_obal, 0)) BEG_BAL FROM t_day_trs b, MST_GLA_TRX G WHERE b.trs_dt = V_BGN_BAL_DATE AND trim(b.gl_acct_cd) = G.GL_A AND G.JUR_TYPE='BANK' UNION ALL SELECT DECODE(d.db_cr_flg, 'D', 1, - 1) * NVL(d.curr_val, 0) MVMT_AMT FROM t_account_ledger d, MST_GLA_TRX G WHERE d.doc_date BETWEEN V_BGN_BAL_DATE AND(P_REP_DATE - 1) AND trim(d.gl_acct_cd) = G.GL_A AND G.JUR_TYPE='BANK' AND d.approved_sts = 'A' ) ; EXCEPTION WHEN OTHERS THEN V_ERROR_CODE := -10; V_ERROR_MSG := SUBSTR('SELECT BEGINNING BALANCE YESTERDAY '||SQLERRM(SQLCODE), 1, 200) ; RAISE V_err; END; --EXCLUDE JOURNAL FOR REC IN CSR_JUR_EX LOOP BEGIN INSERT INTO TEMP_DAILY_CASH_FLOW ( XN_DOC_NUM, RAND_VALUE, USER_ID ) VALUES ( REC.XN_DOC_NUM, V_RANDOM_VALUE, P_USER_ID ) ; EXCEPTION WHEN OTHERS THEN V_ERROR_CODE := -12; V_ERROR_MSG := SUBSTR('INSERT XN_DOC_NUM TEMP_DAILY_CASH_FLOW '||SQLERRM(SQLCODE), 1, 200) ; RAISE V_ERR; END; BEGIN INSERT INTO TEMP_DAILY_CASH_FLOW ( XN_DOC_NUM, RAND_VALUE, USER_ID ) VALUES ( REC.PAYREC_NUM, V_RANDOM_VALUE, P_USER_ID ) ; EXCEPTION WHEN OTHERS THEN V_ERROR_CODE := -13; V_ERROR_MSG := SUBSTR('INSERT PAYREC_NUM TEMP_DAILY_CASH_FLOW '||SQLERRM(SQLCODE), 1, 200) ; RAISE V_ERR; END; END LOOP; --UNTUK REPO BEGIN INSERT INTO TEMP_DAILY_CASH_FLOW ( XN_DOC_NUM, RAND_VALUE, USER_ID ) SELECT DECODE(B.BARIS,1,DOC_NUM,2,DOC_REF_NUM,RVPV_NUMBER) DOC_NUM, V_RANDOM_VALUE,P_USER_ID FROM ( SELECT A.DOC_NUM, A.DOC_REF_NUM, T.RVPV_NUMBER, T.RECORD_SOURCE FROM ( select B.DOC_NUM,B.DOC_REF_NUM from IPNEXTG.t_repo a join IPNEXTG.t_repo_vch b on a.repo_num=b.repo_num where a.approved_stat='A' AND B.APPROVED_STAT='A' AND SUBSTR(B.DOC_REF_NUM,5,2) IN('PD','RD') AND A.DUE_DATE=P_REP_DATE AND B.DOC_DT=P_REP_DATE )A JOIN T_ACCOUNT_LEDGER T ON A.DOC_NUM=T.XN_DOC_NUM WHERE T.APPROVED_STS='A' AND REVERSAL_JUR='N' AND T.RECORD_SOURCE IN ('RVO','PVO') ) N, (SELECT 1 BARIS FROM DUAL UNION SELECT 2 BARIS FROM DUAL UNION SELECT 3 BARIS FROM DUAL )B; EXCEPTION WHEN OTHERS THEN V_ERROR_CODE := -13; V_ERROR_MSG := SUBSTR('INSERT PAYREC_NUM TEMP_DAILY_CASH_FLOW '||SQLERRM(SQLCODE), 1, 200) ; RAISE V_ERR; END; BEGIN SP_CASH_FLOW_REAL( P_REP_DATE, P_USER_ID, V_RANDOM_VALUE, V_ERROR_CODE, V_ERROR_MSG); EXCEPTION WHEN OTHERS THEN V_ERROR_CODE:=-20; V_ERROR_MSG :=SUBSTR('CALL SP_CASH_FLOW_REAL '||SQLERRM,1,200); RAISE V_ERR; END; IF V_ERROR_CODE<0 THEN V_ERROR_CODE :=-25; V_ERROR_MSG := SUBSTR('CALL SP_CASH_FLOW_REAL '||V_ERROR_MSG,1,200); RAISE V_ERR; END IF; BEGIN SP_CASH_FLOW_ESTIMASI( P_REP_DATE, P_USER_ID, V_RANDOM_VALUE, V_ERROR_CODE, V_ERROR_MSG); EXCEPTION WHEN OTHERS THEN V_ERROR_CODE:=-30; V_ERROR_MSG :=SUBSTR('CALL SP_CASH_FLOW_ESTIMASI '||SQLERRM,1,200); RAISE V_ERR; END; IF V_ERROR_CODE<0 THEN V_ERROR_CODE :=-35; V_ERROR_MSG := SUBSTR('CALL SP_CASH_FLOW_ESTIMASI '||V_ERROR_MSG,1,200); RAISE V_ERR; END IF; V_REAL_BALANCE_BANK :=V_BEG_BAL_BANK; V_EST_BALANCE_BANK :=V_BEG_BAL_BANK; BEGIN INSERT INTO R_CASH_FLOW_HARIAN(ORDER_NO,REP_DATE,MAIN_KATEGORI,KATEGORI,DESCRIPTION,REAL_BALANCE, EST_BALANCE,RAND_VALUE,USER_ID,GENERATE_DATE,SESI,ORDER_GROUP) VALUES(1,P_REP_DATE,'BANK','00','SALDO AWAL', V_BEG_BAL_BANK, V_BEG_BAL_BANK, V_RANDOM_VALUE,P_USER_ID,P_GENERATE_DATE,1,1); EXCEPTION WHEN OTHERS THEN V_ERROR_CODE:=-40; V_ERROR_MSG :=SUBSTR('INSERT INTO R_CASH_FLOW_HARIAN '||SQLERRM,1,200); RAISE V_ERR; END; FOR REC IN CSR_DATA LOOP V_EST_MASUK := REC.EST_MASUK; V_EST_KELUAR := REC.EST_KELUAR; IF REC.KATEGORI IN('RMBRDN','RMBNSB','RRBRDN','RRBNSB','TBRDN','TBNSB') THEN V_EST_MASUK := REC.ORI_EST_MASUK; V_EST_KELUAR := REC.ORI_EST_KELUAR; END IF; BEGIN INSERT INTO R_CASH_FLOW_HARIAN(ORDER_NO,REP_DATE,MAIN_KATEGORI,KATEGORI,DESCRIPTION,REAL_MASUK,REAL_KELUAR, EST_MASUK,EST_KELUAR,RAND_VALUE,USER_ID,GENERATE_DATE,sesi, order_group) VALUES(REC.ORDER_NO,P_REP_DATE,REC.MAIN,REC.KATEGORI,REC.DESCRIPTION, REC.REAL_MASUK,REC.REAL_KELUAR, V_EST_MASUK,V_EST_KELUAR, V_RANDOM_VALUE,P_USER_ID,P_GENERATE_DATE,rec.sesi,rec.order_group); EXCEPTION WHEN OTHERS THEN V_ERROR_CODE:=-42; V_ERROR_MSG :=SUBSTR('INSERT INTO R_CASH_FLOW_HARIAN '||SQLERRM,1,200); RAISE V_ERR; END; END LOOP; --KHUSUS TRX RETAIL BELI --RETAIL MARGIN BELI RDN/NASABAH BEGIN SELECT REAL_MASUK, EST_MASUK INTO V_REAL_MASUK, V_EST_MASUK_RDN FROM R_CASH_FLOW_HARIAN WHERE RAND_VALUE=V_RANDOM_VALUE AND USER_ID=P_USER_ID AND KATEGORI ='RMBRDN'; EXCEPTION WHEN OTHERS THEN V_ERROR_CODE:=-50; V_ERROR_MSG :=SUBSTR('SELECT REAL_MASUK REK DANA FROM R_CASH_FLOW_HARIAN '||SQLERRM,1,200); RAISE V_ERR; END; IF V_REAL_MASUK>0 THEN --JIKA LEBIH BESAR DANA EST DI RDN DARIPADA REAL MASUK IF V_EST_MASUK_RDN - V_REAL_MASUK >0 THEN BEGIN UPDATE R_CASH_FLOW_HARIAN SET EST_MASUK=(EST_MASUK - V_REAL_MASUK) WHERE RAND_VALUE=V_RANDOM_VALUE AND USER_ID=P_USER_ID AND KATEGORI='RMBRDN'; EXCEPTION WHEN OTHERS THEN V_ERROR_CODE:=-70; V_ERROR_MSG :=SUBSTR('UPDATE R_CASH_FLOW_HARIAN FIELD EST_MASUK NASABAH'||SQLERRM,1,200); RAISE V_ERR; END; ELSE BEGIN UPDATE R_CASH_FLOW_HARIAN SET EST_MASUK=0 WHERE RAND_VALUE=V_RANDOM_VALUE AND USER_ID=P_USER_ID AND KATEGORI='RMBRDN'; EXCEPTION WHEN OTHERS THEN V_ERROR_CODE:=-80; V_ERROR_MSG :=SUBSTR('UPDATE R_CASH_FLOW_HARIAN FIELD EST_MASUK NASABAH'||SQLERRM,1,200); RAISE V_ERR; END; V_EST_MASUK_RDN := V_REAL_MASUK - V_EST_MASUK_RDN;--SISA JIKA DARI RDN LEBIH KECIL DARI REAL MASUK BEGIN UPDATE R_CASH_FLOW_HARIAN SET EST_MASUK=EST_MASUK-V_EST_MASUK_RDN WHERE RAND_VALUE=V_RANDOM_VALUE AND USER_ID=P_USER_ID AND KATEGORI='RMBNSB'; EXCEPTION WHEN OTHERS THEN V_ERROR_CODE:=-90; V_ERROR_MSG :=SUBSTR('UPDATE R_CASH_FLOW_HARIAN FIELD EST_MASUK RDN '||SQLERRM,1,200); RAISE V_ERR; END; END IF; END IF; --RETAIL REGULAR BELI RDN/NASABAH BEGIN SELECT REAL_MASUK, EST_MASUK INTO V_REAL_MASUK, V_EST_MASUK_RDN FROM R_CASH_FLOW_HARIAN WHERE RAND_VALUE=V_RANDOM_VALUE AND USER_ID=P_USER_ID AND KATEGORI ='RRBRDN'; EXCEPTION WHEN OTHERS THEN V_ERROR_CODE:=-100; V_ERROR_MSG :=SUBSTR('SELECT REAL_MASUK REK DANA FROM R_CASH_FLOW_HARIAN '||SQLERRM,1,200); RAISE V_ERR; END; IF V_REAL_MASUK>0 THEN IF V_EST_MASUK_RDN - V_REAL_MASUK >0 THEN BEGIN UPDATE R_CASH_FLOW_HARIAN SET EST_MASUK=(EST_MASUK - V_REAL_MASUK) WHERE RAND_VALUE=V_RANDOM_VALUE AND USER_ID=P_USER_ID AND KATEGORI='RRBRDN'; EXCEPTION WHEN OTHERS THEN V_ERROR_CODE:=-120; V_ERROR_MSG :=SUBSTR('UPDATE R_CASH_FLOW_HARIAN FIELD EST_MASUK NASABAH'||SQLERRM,1,200); RAISE V_ERR; END; ELSE BEGIN UPDATE R_CASH_FLOW_HARIAN SET EST_MASUK=0 WHERE RAND_VALUE=V_RANDOM_VALUE AND USER_ID=P_USER_ID AND KATEGORI='RRBRDN'; EXCEPTION WHEN OTHERS THEN V_ERROR_CODE:=-130; V_ERROR_MSG :=SUBSTR('UPDATE R_CASH_FLOW_HARIAN FIELD EST_MASUK NASABAH'||SQLERRM,1,200); RAISE V_ERR; END; V_EST_MASUK_RDN := V_REAL_MASUK - V_EST_MASUK_RDN;--SISA JIKA DARI RDN LEBIH KECIL DARI REAL MASUK BEGIN UPDATE R_CASH_FLOW_HARIAN SET EST_MASUK=EST_MASUK-V_EST_MASUK_RDN WHERE RAND_VALUE=V_RANDOM_VALUE AND USER_ID=P_USER_ID AND KATEGORI='RRBNSB'; EXCEPTION WHEN OTHERS THEN V_ERROR_CODE:=-140; V_ERROR_MSG :=SUBSTR('UPDATE R_CASH_FLOW_HARIAN FIELD EST_MASUK RDN '||SQLERRM,1,200); RAISE V_ERR; END; END IF; END IF; --RETAIL TPLUS BELI RDN/NASABAH BEGIN SELECT REAL_MASUK, EST_MASUK INTO V_REAL_MASUK, V_EST_MASUK_RDN FROM R_CASH_FLOW_HARIAN WHERE RAND_VALUE=V_RANDOM_VALUE AND USER_ID=P_USER_ID AND KATEGORI ='TBRDN'; EXCEPTION WHEN OTHERS THEN V_ERROR_CODE:=-150; V_ERROR_MSG :=SUBSTR('SELECT REAL_MASUK REK DANA FROM R_CASH_FLOW_HARIAN '||SQLERRM,1,200); RAISE V_ERR; END; IF V_REAL_MASUK>0 THEN IF V_EST_MASUK_RDN - V_REAL_MASUK >0 THEN BEGIN UPDATE R_CASH_FLOW_HARIAN SET EST_MASUK=(EST_MASUK - V_REAL_MASUK) WHERE RAND_VALUE=V_RANDOM_VALUE AND USER_ID=P_USER_ID AND KATEGORI='TBRDN'; EXCEPTION WHEN OTHERS THEN V_ERROR_CODE:=-170; V_ERROR_MSG :=SUBSTR('UPDATE R_CASH_FLOW_HARIAN FIELD EST_MASUK NASABAH'||SQLERRM,1,200); RAISE V_ERR; END; ELSE BEGIN UPDATE R_CASH_FLOW_HARIAN SET EST_MASUK=0 WHERE RAND_VALUE=V_RANDOM_VALUE AND USER_ID=P_USER_ID AND KATEGORI='TBRDN'; EXCEPTION WHEN OTHERS THEN V_ERROR_CODE:=-180; V_ERROR_MSG :=SUBSTR('UPDATE R_CASH_FLOW_HARIAN FIELD EST_MASUK NASABAH'||SQLERRM,1,200); RAISE V_ERR; END; V_EST_MASUK_RDN := V_REAL_MASUK - V_EST_MASUK_RDN;--SISA JIKA DARI RDN LEBIH KECIL DARI REAL MASUK BEGIN UPDATE R_CASH_FLOW_HARIAN SET EST_MASUK=EST_MASUK-V_EST_MASUK_RDN WHERE RAND_VALUE=V_RANDOM_VALUE AND USER_ID=P_USER_ID AND KATEGORI='TBNSB'; EXCEPTION WHEN OTHERS THEN V_ERROR_CODE:=-190; V_ERROR_MSG :=SUBSTR('UPDATE R_CASH_FLOW_HARIAN FIELD EST_MASUK RDN '||SQLERRM,1,200); RAISE V_ERR; END; END IF; END IF; --UPDATE BALANCE FOR REC IN CSR_REPORT LOOP -- IF REC.MAIN_KATEGORI='BANK' OR REC.MAIN_KATEGORI='OUTSTANDING' THEN V_REAL_BALANCE_BANK :=V_REAL_BALANCE_BANK+REC.REAL_MASUK-REC.REAL_KELUAR; V_EST_BALANCE_BANK :=V_EST_BALANCE_BANK+REC.REAL_MASUK-REC.REAL_KELUAR+REC.EST_MASUK-REC.EST_KELUAR; BEGIN UPDATE R_CASH_FLOW_HARIAN SET REAL_BALANCE=V_REAL_BALANCE_BANK, EST_BALANCE = V_EST_BALANCE_BANK WHERE RAND_VALUE=V_RANDOM_VALUE AND USER_ID=P_USER_ID AND KATEGORI=REC.KATEGORI; EXCEPTION WHEN OTHERS THEN V_ERROR_CODE:=-200; V_ERROR_MSG :=SUBSTR('UPDATE R_CASH_FLOW_HARIAN BALANCE '||SQLERRM,1,200); RAISE V_ERR; END; -- END IF; /* IF REC.MAIN_KATEGORI='NA' THEN BEGIN UPDATE R_CASH_FLOW_HARIAN SET REAL_BALANCE=REAL_MASUK-REAL_KELUAR, EST_BALANCE = EST_MASUK-EST_KELUAR WHERE RAND_VALUE=V_RANDOM_VALUE AND USER_ID=P_USER_ID AND KATEGORI=REC.KATEGORI; EXCEPTION WHEN OTHERS THEN V_ERROR_CODE:=-200; V_ERROR_MSG :=SUBSTR('UPDATE R_CASH_FLOW_HARIAN BALANCE '||SQLERRM,1,200); RAISE V_ERR; END; END IF; */ END LOOP; --DELETE DATA TEMPORARY TABLE BEGIN DELETE FROM TMP_CASH_FLOW_REAL WHERE RAND_VALUE=V_RANDOM_VALUE AND USER_ID=P_USER_ID; EXCEPTION WHEN OTHERS THEN V_ERROR_CODE :=-50; V_ERROR_MSG :=SUBSTR('DELETE FROM TMP_CASH_FLOW_REAL '||SQLERRM,1,200); RAISE V_ERR; END; BEGIN DELETE FROM TMP_CASH_FLOW_ESTIMASI WHERE RAND_VALUE=V_RANDOM_VALUE AND USER_ID=P_USER_ID; EXCEPTION WHEN OTHERS THEN V_ERROR_CODE :=-55; V_ERROR_MSG :=SUBSTR('DELETE FROM TMP_CASH_FLOW_REAL '||SQLERRM,1,200); RAISE V_ERR; END; BEGIN DELETE FROM TEMP_DAILY_CASH_FLOW WHERE RAND_VALUE=V_RANDOM_VALUE AND USER_ID=P_USER_ID; EXCEPTION WHEN OTHERS THEN V_ERROR_CODE :=-55; V_ERROR_MSG :=SUBSTR('DELETE FROM TMP_CASH_FLOW_REAL '||SQLERRM,1,200); RAISE V_ERR; END; P_RAND_VALUE :=V_RANDOM_VALUE; P_ERROR_CODE:=1; P_ERROR_MSG:=''; EXCEPTION WHEN V_ERR THEN ROLLBACK; P_ERROR_CODE :=V_ERROR_CODE; P_ERROR_MSG := V_ERROR_MSG; WHEN OTHERS THEN ROLLBACK; P_ERROR_CODE :=-1; P_ERROR_MSG := SUBSTR(SQLERRM,1,200); END SPR_CASH_FLOW_HARIAN;
true
304f8eb11b94744a41dc5a139dd15cfbe09f6b4a
SQL
dbshisode/Escheatment
/SQL/1_create_clock_table.sql
UTF-8
2,831
3.265625
3
[]
no_license
-------------------------------------------------------- -- DDL for Table CLOCK -------------------------------------------------------- CREATE TABLE "ESCHEATMENT"."CLOCK" ( "CLOCK_ID" NUMBER(10,0), "CLOCK_TYPE_ID" NUMBER(*,0), "CLOCK_INDEX" NUMBER(*,0), "LAWFUL_OWNER_ID" NUMBER(10,0), "TRUST_ID" NUMBER(10,0), "CLOCK_START" DATE, "CLOCK_END" DATE, "CLOCK_EXPIRE_IND" VARCHAR2(1 BYTE) DEFAULT 'N', "CLOCK_STOP_IND" VARCHAR2(1 BYTE) DEFAULT 'N', "CREATE_USER_ID" VARCHAR2(40 BYTE), "CREATE_DT" DATE, "UPDATE_USER_ID" VARCHAR2(40 BYTE), "UPDATE_DT" DATE ) SEGMENT CREATION IMMEDIATE PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "USERS" ; -------------------------------------------------------- -- DDL for Index CLOCK_PK -------------------------------------------------------- CREATE UNIQUE INDEX "ESCHEATMENT"."CLOCK_PK" ON "ESCHEATMENT"."CLOCK" ("CLOCK_ID") PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "USERS" ; -------------------------------------------------------- -- Constraints for Table CLOCK -------------------------------------------------------- ALTER TABLE "ESCHEATMENT"."CLOCK" MODIFY ("UPDATE_DT" NOT NULL ENABLE); ALTER TABLE "ESCHEATMENT"."CLOCK" MODIFY ("UPDATE_USER_ID" NOT NULL ENABLE); ALTER TABLE "ESCHEATMENT"."CLOCK" MODIFY ("CREATE_DT" NOT NULL ENABLE); ALTER TABLE "ESCHEATMENT"."CLOCK" MODIFY ("CREATE_USER_ID" NOT NULL ENABLE); ALTER TABLE "ESCHEATMENT"."CLOCK" ADD CONSTRAINT "CLOCK_PK" PRIMARY KEY ("CLOCK_ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "USERS" ENABLE; ALTER TABLE "ESCHEATMENT"."CLOCK" MODIFY ("CLOCK_STOP_IND" NOT NULL ENABLE); ALTER TABLE "ESCHEATMENT"."CLOCK" MODIFY ("CLOCK_EXPIRE_IND" NOT NULL ENABLE); ALTER TABLE "ESCHEATMENT"."CLOCK" MODIFY ("CLOCK_START" NOT NULL ENABLE); ALTER TABLE "ESCHEATMENT"."CLOCK" MODIFY ("TRUST_ID" NOT NULL ENABLE); ALTER TABLE "ESCHEATMENT"."CLOCK" MODIFY ("LAWFUL_OWNER_ID" NOT NULL ENABLE); ALTER TABLE "ESCHEATMENT"."CLOCK" MODIFY ("CLOCK_INDEX" NOT NULL ENABLE); ALTER TABLE "ESCHEATMENT"."CLOCK" MODIFY ("CLOCK_TYPE_ID" NOT NULL ENABLE); ALTER TABLE "ESCHEATMENT"."CLOCK" MODIFY ("CLOCK_ID" NOT NULL ENABLE);
true
782f42b44224e0b3ec6bea287918c5d78acec209
SQL
chriskwan/Schema-Surgeon
/SchemaSurgeon/ReadSqlData/Scripts/GetTriggersWithUserDefinedTableType.sql
UTF-8
528
4.03125
4
[ "Apache-2.0" ]
permissive
SELECT OBJECT_NAME(modules.object_id) trigger_name, SCHEMA_NAME(o.SCHEMA_ID) trigger_schema FROM sys.sql_expression_dependencies dependencies INNER JOIN sys.sql_modules modules ON modules.object_id = dependencies.referencing_id INNER JOIN sys.objects o ON o.object_id = modules.object_id INNER JOIN sys.types types ON types.user_type_id= referenced_id WHERE referenced_entity_name = @user_defined_table_type_name AND SCHEMA_NAME(types.schema_id) = @user_defined_table_type_schema AND O.type_desc = 'SQL_TRIGGER'
true
a156a416af68199765a68c6f2aedef106e39b822
SQL
arezoo3733/DB-project
/postgreSQL/Queries/Q (22).sql
UTF-8
689
3.15625
3
[]
no_license
-- $ID$ -- TPC-H/TPC-R Global Sales Opportunity Query (Q22) -- Functional Query Definition -- Approved February 1998 :x :o \o /root/pst-arezoo/q22.txt EXPLAIN ANALYZE select cntrycode,count(*) as numcust,sum(c_acctbal) as totacctbal from (select substring(c_phone from 1 for 2) as cntrycode,c_acctbal from customer where substring(c_phone from 1 for 2) in ('13', '21', '32', '17', '25', '19', '28') and c_acctbal > (select avg(c_acctbal) from customer where c_acctbal > 0.00 and substring(c_phone from 1 for 2) in ('13', '21', '32', '17', '25', '19', '28')) and not exists (select * from orders where o_custkey = c_custkey)) as custsale group by cntrycode order by cntrycode;
true
97b017ee6c73114da6f1fee4b48c0cd667e44078
SQL
lvalencia201/Pewlett-Hackard-Analysis
/Module7/Employee_Database_challenge.sql.sql
UTF-8
1,152
3.984375
4
[]
no_license
drop table if exists public.retirement_titles; select e.emp_no,e.first_name, e.last_name ,t.from_date,t.to_date into public.retirement_titles from public.employee e inner join public.title t on e.emp_no = t.emp_no where e.birth_date >='1952-01-01' and e.birth_date<= '1955-12-31'; drop table if exists public.mentorship_eligibility; select e.emp_no,e.first_name, e.last_name ,t.title ,de.from_date,de.to_date into public.mentorship_eligibility from public.employee e inner join public.title t on e.emp_no = t.emp_no inner join public.department_employee de on e.emp_no=de.emp_no where e.birth_date >='1965-01-01' and e.birth_date<= '1965-01-01'; drop table if exists public.unique_titles; select e.emp_no,e.first_name, e.last_name,t.title into public.unique_titles from public.employee e inner join public.title t on e.emp_no = t.emp_no where e.birth_date >='1952-01-01' and e.birth_date<= '1955-12-31' and t.to_date=(select max (t2.to_date) from public.title t2 where t2.emp_no=t.emp_no); drop table if exists retiring_titles; select count (title) as count,title into retiring_titles from unique_titles group by title order by count(title)desc;
true
f0cba25c15d41a5739500c56eb49ca00652c0310
SQL
brase127/INFO323_Project
/phase1/src/DatabaseSchema.sql
UTF-8
1,124
3.875
4
[]
no_license
CREATE TABLE products ( ID INTEGER NOT NULL, NAME VARCHAR NOT NULL, DESCRIPTION VARCHAR NOT NULL, CATEGORY VARCHAR NOT NULL, PRICE FLOAT NOT NULL, QUANTITY INTEGER NOT NULL check (Quantity>=0), PHOTO Varchar, CONSTRAINT PK_PRODUCTS PRIMARY KEY(ID) ); CREATE TABLE CUSTOMERS ( USERNAME Varchar2 NOT NULL, NAME VARCHAR2 NOT NULL, ADDRESS VARCHAR2 NOT NULL, CREDITCARDDETAILS VARCHAR NOT NULL, PASSWORD VARCHAR2 NOT NULL, EMAIL VARCHAR2 NOT NULL, CONSTRAINT PK_CUSTOMERS PRIMARY KEY(USERNAME) ) create table orders ( orderId integer generated by default as identity (start with 1000) not null, date timestamp not null, customer varchar not null, constraint pk_orders primary key (orderId), constraint fk_orders_customers foreign key (customer) references customers(username) ); create table orderitems ( orderId integer not null, ID varchar not null, quantity double not null, constraint pk_orderitems primary key (orderId, ID), constraint fk_orderitems_orders foreign key (orderId) references orders(orderId), constraint fk_orderitems_products foreign key (ID) references products(ID) );
true
b69f18239fad48820e4bede4cc81d96c59e4f252
SQL
nicodiaz/ageatest
/doc/sql/agea_test.sql
UTF-8
2,806
2.90625
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 3.5.8.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: May 13, 2014 at 08:45 PM -- Server version: 5.5.32-log -- PHP Version: 5.4.17 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Database: `agea_test` -- -- -------------------------------------------------------- -- -- Table structure for table `T_SISTEMA` -- CREATE TABLE IF NOT EXISTS `T_SISTEMA` ( `id` int(11) NOT NULL AUTO_INCREMENT, `nombre` varchar(255) NOT NULL, `descripcion` text NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `T_SISTEMA` -- INSERT INTO `T_SISTEMA` (`id`, `nombre`, `descripcion`) VALUES (1, 'Adenda', ' Elaboración presupuestaria del subsector administrativo de carácter limitativo (Estados financieros de Organismos autónomos, Personal, Inversiones y proyectos, Beneficios fiscales, Flujo documental y Memorias presupuestarias) '), (2, 'ATENEA', 'Aplicación para la tramitación electrónica normalizada de expedientes de modificaciones presupuestarias de la Administración '), (3, 'AUDInet', ' Sistema de información y seguimiento de las actuaciones del plan nacional de control financiero de la IGAE. '), (4, 'BÁSICAL', 'Sistema de información contable para las Entidades locales a las que resulta de aplicación el modelo básico previsto en la correspondiente Instrucción de Contabilidad para la Administración local. '), (5, 'BDNS', ' Base de datos nacional de subvenciones. '), (6, 'BESTA', 'Sistema para la gestión de la Cuenta de la Administración General del Estado y su posterior remisión al Tribunal de Cuentas, de acuerdo con lo regulado en la Orden EHA/3067/2011 por la que se aprueba la Instrucción de Contabilidad para la Administración General del Estado. '), (7, 'CANOA Centralizado', 'Sistema de Contabilidad Analítica Normalizada para Organizaciones Administrativas (Centros Gestores y Organismos de la Administración General del Estado). '), (8, 'CANOA Descentralizado', 'Sistema de Contabilidad Analítica Normalizada para Organizaciones Administrativas (Universidades). '), (9, 'CIBI', 'Central de Información del inventario general de bienes y derechos de la Administración General del Estado y OO.AA. '), (10, 'CICEP.red', ' Sistema para remisión a la IGAE de las Cuentas anuales y demás información que las entidades del Sector público estatal de naturaleza empresarial y fundacional han de rendir al Tribunal de Cuentas, en virtud de la Ley 47/2003 General Presupuestaria, y de la Orden EHA/2043/2010, y para su posterior remisión por la IGAE al Tribunal de Cuentas, así como para la gestión de la información establecida en la Ley 4/2007 de Transparencia, según los modelos y procedimientos regulados en el RD 1759/2007 ');
true
877ae2809a8448d57dfe7b664b06071aeedc947b
SQL
hakanaku2009/opman
/ExpTree_Demo/ram_version2.sql
UTF-8
12,593
2.640625
3
[]
no_license
--create table contact ( -- client_no character varying, -- description text, -- f_name character varying, --s_name character varying, --salutation character varying, --pobox text, --e_mail1 text, --e_mail2 text, -- fax character varying, -- tel character varying, -- cell character varying, -- physicaladd character varying -- ); --alter table clients add column least_status varchar; --create table leads ( -- leads_no varchar, -- client_no varchar, -- descrip varchar, -- status varchar -- ); --alter table leads add column date_sniffed timestamp; --alter table clients add column leads_no varchar; --alter table clients add column oclient_no varchar; --alter table rcljobs add column ojob_no varchar; --alter table leads add column title varchar; --alter table leads add column journal varchar; --alter table leads --alter column journal type text; --alter table leads add column title varchar; --alter table leads add column amount varchar; --alter table rcljobs add column descrip varchar; --changing the jobs --alter table rcljobs add column date_sniffed timestamp; --alter table rcljobs add column amount varchar; --alter table rcljobs add column journal varchar; ---/////for version 2.3 only --personnel information create table personnel_info ( namme text, id_no character varying, hourly_rate character varying, gender character varying ); -- add an id_no to the security check table alter table seccheck add column id_no varchar; -- daily time sheet create table daily_time ( id_no character varying, job_no character varying, task text, description text, ddate timestamp, timespent character varying ); alter table daily_time add column milliseconds varchar; -- archive time sheet create table archive_time ( id_no character varying, job_no character varying, task text, description text, ddate timestamp, timespent character varying ); alter table archive_time add column milliseconds varchar; -- rcljobs_expenses create table rcljobs_expenses ( accomodation character varying, job_no character varying, travel character varying, description text, amount character varying ); -- altering personnel_info table alter table personnel_info add column phone_no varchar; alter table personnel_info add column mobile_no varchar; alter table personnel_info add column postal_address text; alter table personnel_info add column email text; alter table personnel_info add column pin_no varchar; --alering seccheck table insert into seccheck (name,password,seclevel) values ( 'Administrator','admin','1,1,1,1,1'); update seccheck set id_no='22040031' where name='Njue'; update seccheck set id_no='A636250' where name='DHWH'; update seccheck set id_no='20111801' where name='wns'; update seccheck set id_no='12955892' where name='LEONARD'; update seccheck set id_no='21501480' where name='MOHAMMED'; update seccheck set id_no='13505221' where name='RAMSEY'; update seccheck set id_no='14427325' where name='MARTIN'; update seccheck set id_no='21759600' where name='IRENE'; insert into seccheck (name,password,id_no) values ( 'Joshua','joshua','13349144'); update seccheck set id_no='20137594' where name='LINET'; update seccheck set id_no='22073499' where name='CHARLES'; update seccheck set id_no='21701213' where name='WYCLIFFE'; update seccheck set id_no='10861607' where name='Mutinda'; update seccheck set id_no='21236628' where name='REGINA'; update seccheck set id_no='21199927' where name='Rotich'; insert into seccheck (name,password,id_no) values ( 'Alex','Alex','22171926'); insert into seccheck (name,password,id_no) values ( 'Annastacia','Annastacia','21086326'); update seccheck set id_no='1' where name='JOHN'; update seccheck set id_no='2' where name='WILLIAM'; update seccheck set id_no='3' where name='Kebaso'; insert into personnel_info (namme,id_no) values ( 'Administrator','221345678'); insert into personnel_info (namme,id_no) values ( 'njue','22040031'); insert into personnel_info (namme,id_no) values ( 'DHWH','A636250'); insert into personnel_info (namme,id_no) values ( 'wns','20111801'); insert into personnel_info (namme,id_no) values ( 'LEONARD','12955892'); insert into personnel_info (namme,id_no) values ( 'MOHAMMED','21501480'); insert into personnel_info (namme,id_no) values ( 'RAMSEY','13505221'); insert into personnel_info (namme,id_no) values ( 'MARTIN','14427325'); insert into personnel_info (namme,id_no) values ( 'IRENE','21759600'); insert into personnel_info (namme,id_no) values ( 'Joshua','13349144'); insert into personnel_info (namme,id_no) values ( 'LINET','20137594'); insert into personnel_info (namme,id_no) values ( 'CHARLES','22073499'); insert into personnel_info (namme,id_no) values ( 'WYCLIFFE','21701213'); insert into personnel_info (namme,id_no) values ( 'Mutinda','10861607'); insert into personnel_info (namme,id_no) values ( 'REGINA','21236628'); insert into personnel_info (namme,id_no) values ( 'Rotich','21199927'); insert into personnel_info (namme,id_no) values ( 'Alex','22171926'); insert into personnel_info (namme,id_no) values ( 'Annastacia','21086326'); insert into personnel_info (namme,id_no) values ( 'JOHN','1'); insert into personnel_info (namme,id_no) values ( 'WILLIAM','2'); insert into personnel_info (namme,id_no) values ( 'Kebaso','3'); --equipments ---------------- create table equip_info ( equip_id character varying, manufacturer character varying, model_no character varying, serial_no character varying, model_name character varying, purchase_date timestamp, description text, license character varying, guarantee character varying, condition character varying, type character varying, model_year character varying ); --current equipments create table current_equip ( equip_id character varying, job_no character varying, other character varying, task character varying, description text, assigned_by character varying, date_assigned timestamp, estimate_release_date timestamp ); alter table current_equip add column date_released timestamp ; alter table current_equip add column autonumber character varying ; --historical data for equipments create table history_equip ( equip_id character varying, job_no character varying, other character varying, task character varying, description text, assigned_by character varying, date_assigned timestamp, estimate_release_date timestamp ); alter table history_equip add column autonumber character varying ; alter table history_equip add column date_released timestamp ; ALTER TABLE history_equip ALTER COLUMN date_assigned TYPE character varying, ALTER COLUMN estimate_release_date TYPE character varying, ALTER COLUMN date_released TYPE character varying; ALTER TABLE current_equip ALTER COLUMN date_assigned TYPE character varying, ALTER COLUMN estimate_release_date TYPE character varying, ALTER COLUMN date_released TYPE character varying; --assignment info for equipments create table assigned_info ( equip_id character varying, status character varying ); create table equip_finances ( equip_id character varying, hourly_rate character varying ); create table maintenance_info ( equip_id character varying, service_date timestamp, description text, cost_incurred character varying, invoice_no character varying ); alter table maintenance_info add column autonumber character varying ; create table tblno ( auto_no character varying ); -- --------------------------end of equipments -----------------table for controlling time create table times ( today timestamp, usedate character varying ); --------------------version 2.4 --------leads alter table leads add column department varchar; alter table rcljobs add column department varchar; alter table contacts add column mobile1 varchar; alter table contacts add column mobile2 varchar; -- altering personnel_info table alter table personnel_info add column birthday varchar; alter table personnel_info add column contract_end text; alter table personnel_info add column nssf_no varchar; alter table personnel_info add column nhif_no varchar; alter table personnel_info add column medical_cover text; alter table personnel_info add column dateofemployment timestamp; alter table personnel_info add column nextofkin varchar; alter table personnel_info add column dateoftermination timestamp; alter table personnel_info add column imagefile text; --alter table personnel_info drop column birthday ; --alter table personnel_info drop column contract_end ; --alter table personnel_info drop column nssf_no ; --alter table personnel_info drop column nhif_no ; --alter table personnel_info drop column medical_cover ; --alter table personnel_info drop column dateofemployment ; --alter table personnel_info drop column nextofkin ; --alter table personnel_info drop column dateoftermination ; -----------------table for leaves create table leaves ( idno character varying, description text, sdate timestamp, edate timestamp, ano serial ); create table sickoff ( idno character varying, description text, sdate timestamp, edate timestamp, ano serial ); create table dayoff ( idno character varying, description text, dateoff timestamp, timeoff time, ano serial ); create table timeoff ( idno character varying, description text, dateoff timestamp, timeoff time, ano serial ); create table casuals ( job_no character varying, description text, task text, datehired timestamp, wagespaid character varying, ano serial ); alter table casuals add column namme text; create table accomodation ( job_no character varying, description text, costincurred character varying, ano serial ); create table travel ( job_no character varying, description text, costincurred character varying, ano serial ); -- today is may 10 2006 alter table rcljobs add column budgetarycost character varying; alter table rcljobs add column grossmargin character varying; alter table travel add column kilometers character varying; alter table travel add column othermodes character varying; alter table travel add column namme character varying; alter table accomodation add column namme character varying; alter table accomodation add column hotel character varying; alter table accomodation add column entry character varying; ---------hired equipments create table hiredequip ( equipname character varying, description text, assigndate timestamp, releasedate timestamp, hourly_rate character varying, cost character varying, ano serial ); alter table hiredequip add column job_no character varying; alter table equip_info add column hourly_rate character varying; --------today is may 11 2006 alter table daily_time add column ano serial; alter table archive_time add column ano serial; create table grossmargin ( personnel character varying, casual character varying, accomodation character varying, travel character varying, ramani character varying, hired character varying, job_no character varying, ano serial ); --------------------------------------------post instal --alering seccheck table update seccheck set id_no='221345678' where name='Administrator'; -------------
true
c41f43cad8bc617057144097a62c084fd91a4abc
SQL
Francleene/SpbAUFrancleene
/PPL/Homework#10/6.sql
UTF-8
214
3.75
4
[]
no_license
SELECT City.Name, City.Population, Country.Population FROM City INNER JOIN Country ON City.CountryCode = Country.Code ORDER BY (0.1 * 10 * City.Population / Country.Population) DESC, City.Name DESC LIMIT 20;
true
638a3022d9d2ccee6be2c05fc88a4c2b015586c6
SQL
radtek/tensordev
/sql/db_creation_info.sql
UTF-8
808
2.765625
3
[]
no_license
-- ----------------------------------------------------------------------------------- -- File Name : db_creation_info.sql -- Description : Displays information about tempfiles. -- Requirements : Access to the DBA views. -- Call Syntax : @db_creation_info.sql -- Last Modified: 24/05/2012 -- ----------------------------------------------------------------------------------- col dbid format 99999999999 col name for a10 col db_unique_name for a14 col log_mode for a15 col open_mode for a10 col guard_status for a12 col flashback_on for a12 col version_time for a12 col created for a18 select dbid, name, db_unique_name, log_mode, to_char(created, 'DD/MM/YYYY HH24:MM') CREATED, to_char(version_time, 'DD/MM/YYYY') VERSION_TIME, open_mode, guard_status, flashback_on from v$database;
true
f87ca84ffba9c452032329a60818799817c7d3be
SQL
xiaokun-hadoop/quick--
/任务完成数最新版.sql
UTF-8
8,380
3.03125
3
[]
no_license
###################################################################################################################### ###################################################################################################################### ###################################################################################################################### ###################################################################################################################### ############################################## 任务完成数 ######################################################### ###################################################################################################################### select null, sum(if(adddate(concat(date_format(now(), '%Y-%m-%d %H:'), lpad(floor(date_format(now(), '%i') / 15) * 15, 2, '0'), ':00'), INTERVAL -15 minute) <= date_format(updated_date, '%Y-%m-%d %H:%i:%s') and adddate(concat(date_format(now(), '%Y-%m-%d %H:'), lpad(floor(date_format(now(), '%i') / 15) * 15, 2, '0'), ':00'), INTERVAL -1 second) >= date_format(updated_date, '%Y-%m-%d %H:%i:%s'), 1, 0)) done_num, adddate(concat(date_format(now(), '%Y-%m-%d %H:'), lpad(floor(date_format(now(), '%i') / 15) * 15, 2, '0'), ':00'), INTERVAL -15 minute) done_start_time, adddate(concat(date_format(now(), '%Y-%m-%d %H:'), lpad(floor(date_format(now(), '%i') / 15) * 15, 2, '0'), ':00'), INTERVAL -1 second) done_end_time, project_name, project_num, now() from picking_job_bi group by project_name, project_num; ################################################################################################################## ######################################### 插入数据到picking_job_down_num ######################################### ################################################################################################################## insert into picking_job_done_num select null, sum(if(adddate(concat(date_format(now(), '%Y-%m-%d %H:'), lpad(floor(date_format(now(), '%i') / 15) * 15, 2, '0'), ':00'), INTERVAL -15 minute) <= date_format(updated_date, '%Y-%m-%d %H:%i:%s') and adddate(concat(date_format(now(), '%Y-%m-%d %H:'), lpad(floor(date_format(now(), '%i') / 15) * 15, 2, '0'), ':00'), INTERVAL -1 second) >= date_format(updated_date, '%Y-%m-%d %H:%i:%s'), 1, 0)) done_num, adddate(concat(date_format(now(), '%Y-%m-%d %H:'), lpad(floor(date_format(now(), '%i') / 15) * 15, 2, '0'), ':00'), INTERVAL -15 minute) done_start_time, adddate(concat(date_format(now(), '%Y-%m-%d %H:'), lpad(floor(date_format(now(), '%i') / 15) * 15, 2, '0'), ':00'), INTERVAL -1 second) done_end_time, project_name, project_num, now() from picking_job_bi group by project_name, project_num; ##################################################################################################################### ##################################################################################################################### # ## 时间字段测试 # select adddate(concat(date_format(now(), '%Y-%m-%d %H:'), lpad(floor(date_format(now(), '%i') / 15) * 15, 2, '0'), # ':00'), INTERVAL -15 minute); # ## # select adddate(concat(date_format(now(), '%Y-%m-%d %H:'), lpad(floor(date_format(now(), '%i') / 15) * 15, 2, '0'), # ':00'), INTERVAL -1 second); # ## 针对当前时段进行测试 # #################################################### 错误形式 ####################################################### # select adddate(concat(date_format(now(), '%H:'), lpad(floor(date_format(now(), '%i') / 15) * 15, 2, '0'), ':00'), # INTERVAL -15 minute); # ##################################################################################################################### # select date_format(now(), '%H:%i:%s'); # select date_format(adddate(concat(date_format(now(), '%Y-%m-%d %H:'), # lpad(floor(date_format(now(), '%i') / 15) * 15, 2, '0'), ':00'), interval -15 minute), # '%H:%i:%s'); #################################################################################################################### ########################################### 历史七天任务完成数 #################################################### #################################################################################################################### select null, avg(done_rate) done_rate_avg, done_start_time, done_end_time, project_name, project_num, now() from ( select null, done_rate, adddate(concat(date_format(now(), '%Y-%m-%d %H:'), lpad(floor(date_format(now(), '%i') / 15) * 15, 2, '0'), ':00'), INTERVAL -15 minute) done_start_time, adddate(concat(date_format(now(), '%Y-%m-%d %H:'), lpad(floor(date_format(now(), '%i') / 15) * 15, 2, '0'), ':00'), INTERVAL -1 second) done_end_time, project_name, project_num from picking_job_done_rate WHERE date_format(done_start_time, '%Y-%m-%d') >= adddate(date_format(now(), '%Y-%m-%d'), interval -7 day) and date_format(done_start_time, '%Y-%m-%d') <= adddate(date_format(now(), '%Y-%m-%d'), interval -1 day) and date_format(adddate(concat(date_format(now(), '%Y-%m-%d %H:'), lpad(floor(date_format(now(), '%i') / 15) * 15, 2, '0'), ':00'), interval -15 minute), '%H:%i:%s') = date_format(done_start_time, '%H:%i:%s') ) t1 group by project_name, project_num; ################################################################################################################## ######################################### 插入数据到picking_job_down_num ######################################### ################################################################################################################## insert into picking_job_done_num_avg select null, avg(done_rate) done_rate_avg, done_start_time, done_end_time, project_name, project_num, now() from ( select null, done_rate, adddate(concat(date_format(now(), '%Y-%m-%d %H:'), lpad(floor(date_format(now(), '%i') / 15) * 15, 2, '0'), ':00'), INTERVAL -15 minute) done_start_time, adddate(concat(date_format(now(), '%Y-%m-%d %H:'), lpad(floor(date_format(now(), '%i') / 15) * 15, 2, '0'), ':00'), INTERVAL -1 second) done_end_time, project_name, project_num from picking_job_done_rate WHERE date_format(done_start_time, '%Y-%m-%d') >= adddate(date_format(now(), '%Y-%m-%d'), interval -7 day) and date_format(done_start_time, '%Y-%m-%d') <= adddate(date_format(now(), '%Y-%m-%d'), interval -1 day) and date_format(adddate(concat(date_format(now(), '%Y-%m-%d %H:'), lpad(floor(date_format(now(), '%i') / 15) * 15, 2, '0'), ':00'), interval -15 minute), '%H:%i:%s') = date_format(done_start_time, '%H:%i:%s') ) t1 group by project_name, project_num; ##################################################################################################################### #####################################################################################################################
true
30fb7f20ee82110a6e2282f7f13067a79fab222b
SQL
KoronaKraljevo/hakaton
/baze/hakaton.sql
UTF-8
6,076
3.21875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Nov 25, 2019 at 08:07 PM -- Server version: 5.7.26 -- PHP Version: 7.2.18 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `hakaton` -- CREATE DATABASE IF NOT EXISTS `hakaton` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci; USE `hakaton`; -- -------------------------------------------------------- -- -- Table structure for table `events` -- DROP TABLE IF EXISTS `events`; CREATE TABLE IF NOT EXISTS `events` ( `id` int(11) NOT NULL AUTO_INCREMENT, `naziv` varchar(50) DEFAULT NULL, `datum` date NOT NULL, `mesto` varchar(30) NOT NULL, `avatar` varchar(20) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=32 DEFAULT CHARSET=latin1; -- -- Dumping data for table `events` -- INSERT INTO `events` (`id`, `naziv`, `datum`, `mesto`, `avatar`) VALUES (1, 'Bunt Rok Festival', '2010-04-20', 'Beograd', 'muzicar'), (2, 'Festival nauke', '2020-12-20', 'Beograd', 'naucnik'), (3, 'Tramvaj pab', '2020-12-20', 'Beograd', 'partymaniac'), (4, 'Istrazivanje tunela Kalemegdana', '2020-11-20', 'Beograd', 'avanturista'), (5, 'Sajam sporta', '2020-09-20', 'Beograd', 'sportista'), (6, 'Street Art Festival', '2020-08-20', 'Kraljevo', 'muzicar'), (7, 'Festival nauke', '2020-10-20', 'Kraljevo', 'naucnik'), (8, 'Jagger party', '2020-06-30', 'Kraljevo', 'partymaniac'), (9, 'Maglic fest', '2020-05-21', 'Kraljevo', 'avanturista'), (10, 'Mali sajam sporta', '2020-10-04', 'Kraljevo', 'sportista'), (11, 'Exit', '2020-07-11', 'Novi Sad', 'muzicar'), (12, 'Festival nauke i obrazovanja', '2020-05-19', 'Novi Sad', 'naucnik'), (13, 'Outlook party', '2020-09-05', 'Novi Sad', 'partymaniac'), (14, 'Pesacenje po Fruskoj gori', '2020-05-01', 'Novi Sad', 'avanturista'), (15, 'Novogodisnji festival odbojke', '2019-12-29', 'Novi Sad', 'sportista'), (16, 'PozitivNI', '2020-05-31', 'Nis', 'muzicar'), (17, 'Nauk nije bauk', '2019-11-30', 'Nis', 'naucnik'), (18, 'K-pop party', '2020-07-23', 'Nis', 'partymaniac'), (19, 'Ekspedicija po Sicevackoj klisuri', '2020-06-15', 'Nis', 'avanturista'), (20, 'Medijana sport', '2020-09-23', 'Nis', 'sportista'), (21, 'Arsenal', '2020-06-20', 'Kragujevac', 'muzicar'), (22, 'Sumadija fest', '2020-10-19', 'Kragujevac', 'partymaniac'), (23, 'Izvidjanje Rudnika', '2020-04-04', 'Kragujevac', 'avanturista'), (24, 'Sport fest', '2020-05-28', 'Kragujevac', 'sportista'), (25, 'Sajam nauke', '2020-03-17', 'Kragujevac', 'naucnik'), (26, 'Festival prica', '2020-09-09', 'Cacak', 'muzicar'), (27, 'Festival nauke', '2019-12-04', 'Cacak', 'naucnik'), (28, 'DUK festival', '2020-06-08', 'Cacak', 'partymaniac'), (29, 'Pesacenje po Ovcaru', '2020-08-16', 'Cacak', 'avanturista'), (30, 'Gradski maraton', '2020-04-01', 'Cacak', 'sportista'), (31, 'Sajam sporta', '2020-09-20', 'Beograd', 'sportista'); -- -------------------------------------------------------- -- -- Table structure for table `komentari` -- DROP TABLE IF EXISTS `komentari`; CREATE TABLE IF NOT EXISTS `komentari` ( `id` int(11) NOT NULL AUTO_INCREMENT, `komentar` varchar(500) NOT NULL, `datum` varchar(20) NOT NULL, `ime` varchar(20) NOT NULL, `prezime` varchar(30) NOT NULL, `email` varchar(50) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=latin1; -- -- Dumping data for table `komentari` -- INSERT INTO `komentari` (`id`, `komentar`, `datum`, `ime`, `prezime`, `email`) VALUES (8, 'Ovo je jedan kul komentar!', '11.25.2019', 'Korona', 'Tim', 'korona@gmail.com'), (3, 'Jako kul komentar', '11.24.2019', 'Nevena', 'Gligorov', 'nenakv3@gmail.com'), (4, 'Pozdrav od tima Korona!', '11.25.2019', 'Strahinja', 'Pantic', 'pantic@gmail.com'), (9, 'Primer komentara', '11.25.2019', 'Andrija', 'Slovic', 'andrija@gmail.com'), (10, 'Kraljevo still rules!', '11.25.2019', 'Tim', 'Korona', 'timkorona@gmail.com'); -- -------------------------------------------------------- -- -- Table structure for table `korisnikevents` -- DROP TABLE IF EXISTS `korisnikevents`; CREATE TABLE IF NOT EXISTS `korisnikevents` ( `id` int(11) NOT NULL AUTO_INCREMENT, `naziv` varchar(50) NOT NULL, `email` varchar(50) NOT NULL, `br_tel` int(15) NOT NULL, `mesto_odr` varchar(50) NOT NULL, `dat_odr` date NOT NULL, `naziv_dog` varchar(50) NOT NULL, `kategorija` varchar(20) NOT NULL, `opis` varchar(150) NOT NULL, `slika` longblob NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=92 DEFAULT CHARSET=latin1; -- -- Dumping data for table `korisnikevents` -- INSERT INTO `korisnikevents` (`id`, `naziv`, `email`, `br_tel`, `mesto_odr`, `dat_odr`, `naziv_dog`, `kategorija`, `opis`, `slika`) VALUES (88, 'Tim Korona12', 'korona@gmail.com', 614579864, 'Kraljevo', '2020-12-12', 'Sajam nauke', 'Naucnik', 'Prikaz 1. Sajma nauke!', 0x433a77616d703634096d70706870393539372e746d70), (89, 'asdsad1111', 'strahinjapantic133@gmail.com', 614579864, 'sdadas', '2001-11-12', 'asdsad', 'Naucnik', 'asdadf', 0x433a77616d703634096d70706870343233422e746d70); -- -------------------------------------------------------- -- -- Table structure for table `pretplatnici` -- DROP TABLE IF EXISTS `pretplatnici`; CREATE TABLE IF NOT EXISTS `pretplatnici` ( `id` int(11) NOT NULL AUTO_INCREMENT, `email` varchar(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=51 DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `pretplatnici` -- INSERT INTO `pretplatnici` (`id`, `email`) VALUES (23, 'korona@gmail.com'), (25, 'slovic@gmail.com'), (26, 'pantic@gmail.com'), (27, 'gligorov@gmail.com'), (28, 'jovanovic@gmail.com'), (44, 'nena@gmail.com'), (45, 'nenakv@gmail.com'), (46, 'nenakv3@gmail.com'), (47, 'korona1@gmail.com'), (48, 'korrona@gmail.com'), (49, 'kraljevorules@gmail.com'), (50, ''); COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
true
12f3414c4ae1f2960838c8162c9b1867d8a9571c
SQL
wuynje/keblogs
/keblogs/sqlscript/ke_file.sql
UTF-8
2,189
2.890625
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : yjytke Source Server Type : MySQL Source Server Version : 80011 Source Host : localhost:3306 Source Schema : yjytke Target Server Type : MySQL Target Server Version : 80011 File Encoding : 65001 Date: 17/09/2018 09:31:32 */ SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for ke_file -- ---------------------------- DROP TABLE IF EXISTS `ke_file`; CREATE TABLE `ke_file` ( `id` int(11) NOT NULL AUTO_INCREMENT, `userId` int(11) NULL DEFAULT NULL COMMENT '用户id', `fname` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文件名', `ftype` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类型', `fkey` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '地址', `created` bigint(255) NULL DEFAULT NULL COMMENT '创建时间', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '\'sys.x$waits_global_by_latency\' is not BASE TABLE' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of ke_file -- ---------------------------- INSERT INTO `ke_file` VALUES (7, 1, 'pic10.jpg', 'img', 'https://keblog-1252041665.cos.ap-beijing.myqcloud.com/2018/08/1535704302318eYgCkVQlP3.jpg', 1535704302822); INSERT INTO `ke_file` VALUES (8, 1, 'pic04.jpg', 'img', 'https://keblog-1252041665.cos.ap-beijing.myqcloud.com/2018/09/15360505358058iabdToBOY.jpg', 1536050536468); INSERT INTO `ke_file` VALUES (9, 1, 'pic01.jpg', 'img', 'https://keblog-1252041665.cos.ap-beijing.myqcloud.com/2018/09/1536133742499TLhndblB67.jpg', 1536133743049); INSERT INTO `ke_file` VALUES (10, 1, 'pic13.jpg', 'img', 'https://keblog-1252041665.cos.ap-beijing.myqcloud.com/2018/09/15367334112447NHhAHSSDA.jpg', 1536733411926); INSERT INTO `ke_file` VALUES (11, 1, 'pic05.jpg', 'img', 'https://keblog-1252041665.cos.ap-beijing.myqcloud.com/2018/09/15368937828412VmFPg7964.jpg', 1536893783486); SET FOREIGN_KEY_CHECKS = 1;
true
ac6ec96b595f7fbc6494ccaf805f2d5d10b3433b
SQL
GIP-RECIA/cahier-de-texte
/application/test_data/data.sql
UTF-8
190,224
3.078125
3
[]
no_license
SET SCHEMA cahier_courant; -- -- Data for Name: cahier_annee_scolaire; Type: TABLE DATA; Schema: cahier_courant; Owner: ent -- INSERT INTO cahier_annee_scolaire (id, exercice, date_rentree, date_sortie, periode_vacance, ouverture_ent, periode_scolaire) VALUES (1, '2013-2014', '2013-09-01', '2014-06-30', '19/10/2013:03/11/2013|21/12/2013:05/01/2014|01/03/2014:16/03/2014|', true, NULL); -- -- Data for Name: cahier_archive_devoir; Type: TABLE DATA; Schema: cahier_courant; Owner: ent -- INSERT INTO cahier_archive_devoir (id_archive_devoir, date_remise, code, intitule, description, id_type_devoir, id_archive_seance) VALUES (35, '2013-10-08', 'DEV30', 'Illustration de la tangente', '<p> R&eacute;aliser un sch&eacute;ma illustrant la compr&eacute;hension de la le&ccedil;on sur la tangente.</p> <p> Faire bien attention &agrave; remettre<u><strong> un travail soign&eacute;</strong></u>. En g&eacute;om&eacute;trie le soin est absolument n&eacute;cessaire.</p> ', 7, 37); INSERT INTO cahier_archive_devoir (id_archive_devoir, date_remise, code, intitule, description, id_type_devoir, id_archive_seance) VALUES (36, '2013-10-10', 'DEV31', 'Mise en pratique des calculs d''angles', '<p> R&eacute;aliser les exercices 1, 2, et 4 de la page 25.</p> <p> Faire bien attention &agrave;<strong> lire l&#39;&eacute;noncer </strong>avant de se lancer dans la r&eacute;solution du probl&egrave;me.</p> <p> &nbsp;</p> ', 7, 38); INSERT INTO cahier_archive_devoir (id_archive_devoir, date_remise, code, intitule, description, id_type_devoir, id_archive_seance) VALUES (37, '2013-10-01', 'DEV27', 'Apprendre la leçon', '<p> Revoir &agrave; la maison la le&ccedil;on vue en cours.</p> <p> En d&eacute;but de cours, une <strong><span style="color:#0000ff;">&eacute;valuation</span> </strong>sera r&eacute;alis&eacute;e !</p> ', 9, 39); INSERT INTO cahier_archive_devoir (id_archive_devoir, date_remise, code, intitule, description, id_type_devoir, id_archive_seance) VALUES (38, '2013-10-03', 'DEV28', 'Exo 1 et 2', '<p> Faire les exercices de g&eacute;om&eacute;trie 1 et 2 de la page 15.</p> ', 8, 40); INSERT INTO cahier_archive_devoir (id_archive_devoir, date_remise, code, intitule, description, id_type_devoir, id_archive_seance) VALUES (39, '2013-10-07', 'DEV29', 'Utilisation de la calculatrice', '<p> S&#39;entrainer avec la calculatrice pour r&eacute;aliser les calcul d&#39;angle pr&eacute;sent&eacute; sur les exercices N&deg;3 et 4 de la page 21.</p> ', 7, 41); INSERT INTO cahier_archive_devoir (id_archive_devoir, date_remise, code, intitule, description, id_type_devoir, id_archive_seance) VALUES (40, '2013-10-14', 'DEV58', 'Exercices de trigonométrie', '<p> R&eacute;aliser &agrave; la maison les exercices<strong> 5, 7 et 9</strong> de la page <strong>35 </strong>du livre de trigonom&eacute;trie.</p> <p> &nbsp;</p> ', 7, 42); INSERT INTO cahier_archive_devoir (id_archive_devoir, date_remise, code, intitule, description, id_type_devoir, id_archive_seance) VALUES (41, '2013-10-15', 'DEV53', 'Révision sur les formules trigonométrique', '<p> Revoir et conna&icirc;tre par coeur toutes les formules vues en cours.</p> ', 7, 43); INSERT INTO cahier_archive_devoir (id_archive_devoir, date_remise, code, intitule, description, id_type_devoir, id_archive_seance) VALUES (42, '2013-11-04', 'DEV59', 'Calcul des longueurs', '<p> D&eacute;terminer les longueurs manquantes de chaque c&ocirc;t&eacute; des triangles rectangles&nbsp; pr&eacute;sent&eacute;s en page 43 du cahier d&#39;exercices.</p> <p> &nbsp;</p> ', 8, 44); INSERT INTO cahier_archive_devoir (id_archive_devoir, date_remise, code, intitule, description, id_type_devoir, id_archive_seance) VALUES (43, '2013-10-15', 'DEV55', 'Mise en pratique des calculs d''angles', '<p> R&eacute;aliser les exercices 1, 2, et 4 de la page 25.</p> <p> Faire bien attention &agrave;<strong> lire l&#39;&eacute;noncer </strong>avant de se lancer dans la r&eacute;solution du probl&egrave;me.</p> <p> &nbsp;</p> ', 7, 45); INSERT INTO cahier_archive_devoir (id_archive_devoir, date_remise, code, intitule, description, id_type_devoir, id_archive_seance) VALUES (44, '2013-11-04', 'DEV56', 'Exercices de trigonométrie', '<p> R&eacute;aliser &agrave; la maison les exercices<strong> 5, 7 et 9</strong> de la page <strong>35 </strong>du livre de trigonom&eacute;trie.</p> <p> &nbsp;</p> ', 7, 46); INSERT INTO cahier_archive_devoir (id_archive_devoir, date_remise, code, intitule, description, id_type_devoir, id_archive_seance) VALUES (45, '2013-10-07', 'DEV29', 'Utilisation de la calculatrice', '<p> S&#39;entrainer avec la calculatrice pour r&eacute;aliser les calcul d&#39;angle pr&eacute;sent&eacute; sur les exercices N&deg;3 et 4 de la page 21.</p> ', 7, 54); INSERT INTO cahier_archive_devoir (id_archive_devoir, date_remise, code, intitule, description, id_type_devoir, id_archive_seance) VALUES (46, '2013-10-08', 'DEV30', 'Illustration de la tangente', '<p> R&eacute;aliser un sch&eacute;ma illustrant la compr&eacute;hension de la le&ccedil;on sur la tangente.</p> <p> Faire bien attention &agrave; remettre<u><strong> un travail soign&eacute;</strong></u>. En g&eacute;om&eacute;trie le soin est absolument n&eacute;cessaire.</p> ', 7, 50); INSERT INTO cahier_archive_devoir (id_archive_devoir, date_remise, code, intitule, description, id_type_devoir, id_archive_seance) VALUES (47, '2013-10-10', 'DEV31', 'Mise en pratique des calculs d''angles', '<p> R&eacute;aliser les exercices 1, 2, et 4 de la page 25.</p> <p> Faire bien attention &agrave;<strong> lire l&#39;&eacute;noncer </strong>avant de se lancer dans la r&eacute;solution du probl&egrave;me.</p> <p> &nbsp;</p> ', 7, 51); INSERT INTO cahier_archive_devoir (id_archive_devoir, date_remise, code, intitule, description, id_type_devoir, id_archive_seance) VALUES (48, '2013-10-01', 'DEV27', 'Apprendre la leçon', '<p> Revoir &agrave; la maison la le&ccedil;on vue en cours.</p> <p> En d&eacute;but de cours, une <strong><span style="color:#0000ff;">&eacute;valuation</span> </strong>sera r&eacute;alis&eacute;e !</p> ', 9, 52); INSERT INTO cahier_archive_devoir (id_archive_devoir, date_remise, code, intitule, description, id_type_devoir, id_archive_seance) VALUES (49, '2013-10-03', 'DEV28', 'Exo 1 et 2', '<p> Faire les exercices de g&eacute;om&eacute;trie 1 et 2 de la page 15.</p> ', 8, 53); INSERT INTO cahier_archive_devoir (id_archive_devoir, date_remise, code, intitule, description, id_type_devoir, id_archive_seance) VALUES (50, '2013-10-14', 'DEV60', 'Exercices de trigonométrie', '<p> R&eacute;aliser &agrave; la maison les exercices<strong> 5, 7 et 9</strong> de la page <strong>35 </strong>du livre de trigonom&eacute;trie.</p> <p> &nbsp;</p> ', 7, 55); -- -- Data for Name: cahier_archive_piece_jointe_devoir; Type: TABLE DATA; Schema: cahier_courant; Owner: ent -- INSERT INTO cahier_archive_piece_jointe_devoir (id_piece_jointe, id_archive_devoir) VALUES (14, 40); INSERT INTO cahier_archive_piece_jointe_devoir (id_piece_jointe, id_archive_devoir) VALUES (13, 37); INSERT INTO cahier_archive_piece_jointe_devoir (id_piece_jointe, id_archive_devoir) VALUES (10, 38); INSERT INTO cahier_archive_piece_jointe_devoir (id_piece_jointe, id_archive_devoir) VALUES (15, 36); INSERT INTO cahier_archive_piece_jointe_devoir (id_piece_jointe, id_archive_devoir) VALUES (17, 41); INSERT INTO cahier_archive_piece_jointe_devoir (id_piece_jointe, id_archive_devoir) VALUES (19, 42); INSERT INTO cahier_archive_piece_jointe_devoir (id_piece_jointe, id_archive_devoir) VALUES (15, 43); INSERT INTO cahier_archive_piece_jointe_devoir (id_piece_jointe, id_archive_devoir) VALUES (14, 44); INSERT INTO cahier_archive_piece_jointe_devoir (id_piece_jointe, id_archive_devoir) VALUES (13, 48); INSERT INTO cahier_archive_piece_jointe_devoir (id_piece_jointe, id_archive_devoir) VALUES (10, 49); INSERT INTO cahier_archive_piece_jointe_devoir (id_piece_jointe, id_archive_devoir) VALUES (15, 47); INSERT INTO cahier_archive_piece_jointe_devoir (id_piece_jointe, id_archive_devoir) VALUES (14, 50); -- -- Data for Name: cahier_archive_piece_jointe_seance; Type: TABLE DATA; Schema: cahier_courant; Owner: ent -- INSERT INTO cahier_archive_piece_jointe_seance (id_piece_jointe, id_archive_seance) VALUES (9, 40); INSERT INTO cahier_archive_piece_jointe_seance (id_piece_jointe, id_archive_seance) VALUES (12, 41); INSERT INTO cahier_archive_piece_jointe_seance (id_piece_jointe, id_archive_seance) VALUES (13, 42); INSERT INTO cahier_archive_piece_jointe_seance (id_piece_jointe, id_archive_seance) VALUES (16, 43); INSERT INTO cahier_archive_piece_jointe_seance (id_piece_jointe, id_archive_seance) VALUES (18, 44); INSERT INTO cahier_archive_piece_jointe_seance (id_piece_jointe, id_archive_seance) VALUES (13, 46); INSERT INTO cahier_archive_piece_jointe_seance (id_piece_jointe, id_archive_seance) VALUES (12, 54); INSERT INTO cahier_archive_piece_jointe_seance (id_piece_jointe, id_archive_seance) VALUES (9, 53); INSERT INTO cahier_archive_piece_jointe_seance (id_piece_jointe, id_archive_seance) VALUES (13, 55); -- -- Data for Name: cahier_archive_seance; Type: TABLE DATA; Schema: cahier_courant; Owner: ent -- INSERT INTO cahier_archive_seance (id_archive_seance, date_archive, id_visa, id_seance, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations) VALUES (40, '2013-09-26 11:22:44.915013', 9, 7, 'SEA7', 'Résivion sur les triangles rectangles', '2013-10-01', 9, 11, 0, 0, '<p> Revoir les formules li&eacute;es aux triangles rectangles.</p> <p> Entre autres rappel sur la formule de <strong>Pythagore</strong>.</p> Rappel sur la forumle des triangles rectangle : <br/> <p> &lt;Latex&gt;C^{2}=A^{2}+B^{2}&lt;/Latex&gt;</p> <p> Soit :</p> <p> &lt;Latex&gt;C= \sqrt{A^{2}+B^{2}} &lt;/Latex&gt;</p> <p> &nbsp;</p> ', 5, 11, ''); INSERT INTO cahier_archive_seance (id_archive_seance, date_archive, id_visa, id_seance, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations) VALUES (41, '2013-09-26 11:22:44.915013', 9, 8, 'SEA8', 'Calculatrice pour les angles', '2013-10-03', 13, 16, 45, 0, '<p> Pr&eacute;sentation de la calculatrice.</p> <p> Attention au mode de calcul : <strong>radian </strong>ou <strong>degr&eacute;</strong>.</p> <p> Les valeurs utilis&eacute;es pour les calculs doivent &ecirc;tre saisie avec <span style="color:#ff0000;"><strong>application</strong></span>. Les erreurs de frappe sont souvent la premi&egrave;re cause dans des faux r&eacute;sultats.</p> <p> Le calcul de l&#39;hypot&eacute;nuse fait appel &agrave; une imbrication de calcul : racine carr&eacute;e, parenth&egrave;ses et addition de carr&eacute;. L&#39;ordre de saisie et l&#39;utilisation des <strong>parenth&egrave;ses </strong>est tr&egrave;s importante !</p> ', 5, 11, NULL); INSERT INTO cahier_archive_seance (id_archive_seance, date_archive, id_visa, id_seance, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations) VALUES (42, '2013-09-26 11:22:44.915013', 9, 11, 'SEA11', 'Propriétés des formules trigonométriques', '2013-10-10', 13, 16, 45, 0, '<h2> <font color="#000000" face="Arial" size="2"><font color="#ff9900" size="4"><strong>Propri&eacute;t&eacute;s des formules trigonom&eacute;triques</strong></font></font></h2> <p> <font color="#000000" face="Arial" size="2">&nbsp;<br /> &nbsp;<br /> <font color="#ff0000"><strong>Dans un triangle rectangle, quelle que soit la mesure x d&rsquo;un angle aigu, on a&nbsp;: </strong></font><br /> &nbsp;</font></p> <br /> <div align="center"> <img alt="" height="70" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-17.png" width="409" /></div> <p> <font color="#000000" face="Arial" size="2">&nbsp;<br /> <em>Preuve :</em><br /> &nbsp;<br /> <img alt="" height="113" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-17b.png" width="645" /><br /> &nbsp;<br /> <strong><font color="#ff0000" size="3">2)</font> On note :</strong><br /> CA le c&ocirc;t&eacute; adjacent &agrave; l&rsquo;angle x ;<br /> CO le c&ocirc;t&eacute; oppos&eacute; &agrave; l&rsquo;angle x ;<br /> H l&rsquo;hypot&eacute;nuse du triangle rectangle ;<br /> &nbsp;<br /> <strong>On a :</strong><br /> <img alt="" height="59" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-17c.png" width="450" /><br /> &nbsp;<br /> <strong>Or :</strong> dans un triangle rectangle, d&rsquo;apr&egrave;s la propri&eacute;t&eacute; de Pythagore, <strong>CA&sup2; + CO&sup2; = H&sup2;</strong><br /> &nbsp;<br /> <strong>Donc :</strong> <strong><font color="#ff0000">cos&sup2; x + sin&sup2; x = 1</font></strong></font></p> ', 5, 11, '<p> Fournir aux &eacute;l&egrave;ves une fiche r&eacute;capitulative des formules &agrave; conna&icirc;tre par coeur.</p> <p> Prendre la fiche verte</p> '); INSERT INTO cahier_archive_seance (id_archive_seance, date_archive, id_visa, id_seance, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations) VALUES (43, '2013-09-26 11:23:27.091668', 9, 25, 'SEA25', 'Application avec un tableur', '2013-10-14', 9, 11, 0, 0, '<p> <span style="color:#000000;"><strong><span style="background-color: rgb(255, 255, 0);">Saisie par le rempla&ccedil;ant : Annie-Jean SAGNEAUX</span></strong></span></p> <p> Rappel sur l&#39;utilisation d&#39;un tableur.</p> <p> Utiliser le tableur de la salle d&#39;informatique pour r&eacute;aliser le calcul des fonctions suivantes :</p> <p> - <strong>Cosinus(angle, unit&eacute;) </strong></p> <p> - <strong>Sinus(angle, unit&eacute;)</strong></p> <p> Avec unit&eacute; = Degr&eacute;, Radian ou Grade</p> ', 5, 13, '<p> Faire une petite d&eacute;monstration de l&#39;utilisation de Excel sur un fonction simple.</p> '); INSERT INTO cahier_archive_seance (id_archive_seance, date_archive, id_visa, id_seance, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations) VALUES (44, '2013-09-26 11:23:27.091668', 9, 26, 'SEA26', 'Calcul de longueur et trigonométrie', '2013-10-15', 9, 11, 0, 0, '<div> <span style="color:#000000;"><strong><span style="background-color: rgb(255, 255, 0);">Saisie par le rempla&ccedil;ant : Annie-Jean SAGNEAUX</span></strong></span></div> <div> &nbsp;</div> <div align="center"> <font color="#ff9900" face="Arial"><strong><font size="3">Formules trigonom&eacute;triques et<br /> calcul de longueurs :</font></strong></font></div> <br /> <div align="justify"> <span style="font-weight: normal;"><span style="font-weight: normal;"><font face="Arial" size="2">Ce cours a pour objectifs de d&eacute;montrer</font></span><span style="font-weight: normal;"><font face="Arial" size="2"> dans un premier temps</font></span><span style="font-weight: normal;"><font face="Arial" size="2"> les formules de trigonom&eacute;trie puis de les utiliser </font></span><span style="font-weight: normal;"><font face="Arial" size="2">dans le but de calculer des longueurs et de travailler l&rsquo;utilisation de la calculatrice.</font></span><span style="font-weight: normal;"><font face="Arial" size="2"> La premi&egrave;re partie est commune avec le chapitre &quot;Formules trigonom&eacute;triques et calcul d&#39;angles&quot; </font></span><span style="font-weight: normal;"><font face="Arial" size="2">mais l&#39;exemple d&#39;application en fin de chapitre diff&egrave;re et s&#39;int&eacute;resse ici au calcul de longueurs. </font></span></span></div> <div align="justify"> &nbsp;</div> <div align="justify"> <span style="font-weight: normal;"><span style="font-weight: normal;"><font face="Arial" size="2">Application des formules.</font></span></span></div> <p> &nbsp;</p> ', 5, 13, '<p> Penser &agrave; faire des photocopies des sch&eacute;mas d&#39;illustration</p> '); INSERT INTO cahier_archive_seance (id_archive_seance, date_archive, id_visa, id_seance, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations) VALUES (54, '2013-09-26 14:32:30.784659', 10, 8, 'SEA8', 'Calculatrice pour les angles', '2013-10-03', 13, 16, 45, 0, '<p> Pr&eacute;sentation de la calculatrice.</p> <p> Attention au mode de calcul : <strong>radian </strong>ou <strong>degr&eacute;</strong>.</p> <p> Les valeurs utilis&eacute;es pour les calculs doivent &ecirc;tre saisie avec <span style="color:#ff0000;"><strong>application</strong></span>. Les erreurs de frappe sont souvent la premi&egrave;re cause dans des faux r&eacute;sultats.</p> <p> Le calcul de l&#39;hypot&eacute;nuse fait appel &agrave; une imbrication de calcul : racine carr&eacute;e, parenth&egrave;ses et addition de carr&eacute;. L&#39;ordre de saisie et l&#39;utilisation des <strong>parenth&egrave;ses </strong>est tr&egrave;s importante !</p> ', 5, 11, NULL); INSERT INTO cahier_archive_seance (id_archive_seance, date_archive, id_visa, id_seance, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations) VALUES (39, '2013-09-26 11:22:44.915013', 9, 6, 'SEA6', 'Formule trigonométrique : cosinus', '2013-09-30', 9, 11, 0, 0, '<p> <font color="#000000" face="Arial" size="2">En 4&egrave;me, on a d&eacute;couvert un nouvel outil appel&eacute; &laquo;&nbsp;<font color="#ff00ff">cosinus</font>&nbsp;&raquo;.</font></p> <p> <latex>cosinus=cote \cdot adjacent \div hypotenuse</latex><br /> <font color="#000000" face="Arial" size="2">Cet outil s&rsquo;utilise uniquement dans les <font color="#ff00ff">triangles rectangles</font>.</font></p> <p> <font color="#000000" face="Arial" size="2">Ce rapport ne d&eacute;pend que de <font color="#ff00ff">la mesure de l&rsquo;angle consid&eacute;r&eacute;</font>.<br /> La valeur du cosinus d&rsquo;un angle est toujours comprise entre <strong><font color="#ff00ff">0</font></strong> et <strong><font color="#ff00ff">1</font></strong>.</font></p> ', 5, 11, '<p> Montrer des exemples au tableau avec des triangles rectangles</p> '); INSERT INTO cahier_archive_seance (id_archive_seance, date_archive, id_visa, id_seance, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations) VALUES (37, '2013-09-26 11:22:44.915013', 9, 9, 'SEA9', 'Définition de la tangente', '2013-10-07', 9, 11, 0, 0, '<p> D&eacute;finition de la formule trigonom&eacute;trique du calcul de la tangente :</p> <p> &nbsp;</p> <p> <font color="#000000" face="Arial" size="2"><font color="#ff9900"><strong>La valeur commune</strong></font> des rapports&nbsp;<img align="absMiddle" alt="" height="45" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-10a.png" width="33" /> et&nbsp;<img align="absMiddle" alt="" height="45" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-10b.png" width="31" /> ne d&eacute;pend que de <font color="#ff0000"><strong>la mesure de l&rsquo;angle</strong></font><img align="absMiddle" alt="" height="30" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-08bonus%281%29.png" width="59" /><br /> &nbsp;<br /> On l&rsquo;appelle <font color="#ff9900"><strong>la tangente</strong></font> de <font color="#ff0000"><strong>l&rsquo;angle</strong></font></font><font color="#000000" face="Arial" size="2"><img align="absMiddle" alt="" height="30" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-08bonus%281%29.png" width="59" /><img align="right" alt="" height="150" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-10c.png" width="200" /></font><br /> <font color="#000000" face="Arial" size="2">&nbsp;<br /> &nbsp;<br /> <img alt="" height="64" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-10d.png" width="445" /></font></p> ', 5, 11, ''); INSERT INTO cahier_archive_seance (id_archive_seance, date_archive, id_visa, id_seance, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations) VALUES (38, '2013-09-26 11:22:44.915013', 9, 10, 'SEA10', 'Exemple du calcul d''angles', '2013-10-08', 9, 11, 0, 0, '<h2> <font color="#000000" face="Arial" size="2"><font color="#ff9900" size="4"><strong>Exemple d&rsquo;application du calcul d&#39;angles</strong></font></font></h2> <p> <font color="#000000" face="Arial" size="2"><em>Exemple&nbsp;:</em><br /> &nbsp;<br /> ABC est un triangle rectangle en A, tel que : AB = 6 cm et&nbsp; AC = 4 cm.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br /> <strong>Calculer l&rsquo;arrondi au degr&eacute; de l&rsquo;angle</strong> <img align="absMiddle" alt="" height="30" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-16a%281%29.png" width="58" /><strong>.</strong><br /> &nbsp;</font></p> <div align="center"> <font color="#000000" face="Arial" size="2"><img alt="" height="152" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-16b.png" width="300" /></font></div> <p> <font color="#000000" face="Arial" size="2">&nbsp;<br /> <em>M&eacute;thode :</em><br /> &nbsp;<br /> &diams; On trace une figure &agrave; main lev&eacute;e.<br /> On repasse en couleur les donn&eacute;es connues et celle cherch&eacute;e.<br /> &diams; Par rapport &agrave; l&rsquo;angle connu, on connait le c&ocirc;t&eacute; adjacent et on cherche la longueur du c&ocirc;t&eacute; oppos&eacute;.<br /> On va utiliser la formule <font color="#ff0000">de la tangente</font>.<br /> &nbsp;<br /> <font color="#0000ff"><strong>Dans le triangle ABC rectangle en B, on a :</strong> <img align="absMiddle" alt="" height="50" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-16c.png" width="126" /></font><br /> <strong><font color="#0000ff">Soit :</font> </strong><img align="absMiddle" alt="" height="50" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-16d.png" width="150" /><br /> <font color="#0000ff"><strong>D&#39;o&ugrave; :</strong></font> <img align="absMiddle" alt="" height="35" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-16e.png" width="155" /><br /> <font color="#0000ff"><strong>&nbsp;<br /> Sur la calculatrice, on lit : 56,30993247</strong></font><br /> &nbsp;<br /> <font color="#0000ff"><strong>Finalement :</strong></font> <img align="absMiddle" alt="" height="35" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-16f.png" width="122" /><br /> &nbsp; </font></p> ', 5, 11, '<p> Faire passer au tableau quelques &eacute;l&egrave;ves pour r&eacute;aliser les illustrations</p> '); INSERT INTO cahier_archive_seance (id_archive_seance, date_archive, id_visa, id_seance, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations) VALUES (47, '2013-09-26 11:25:23.901423', 14, 24, 'SEA24', 'Rattrapage', '2013-10-03', 16, 17, 0, 0, '<p> Cours de rattrapage avec les &eacute;l&egrave;ves du 1ere groupe</p> ', 7, 11, ''); INSERT INTO cahier_archive_seance (id_archive_seance, date_archive, id_visa, id_seance, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations) VALUES (48, '2013-09-26 11:25:23.901423', 16, 22, 'SEA22', 'TD : Application du cosinus / sinus', '2013-10-04', 11, 12, 15, 15, '<p> R&eacute;alisation dans le cadre de groupes de travail de calcul des cosinus et sinus des cas concrets.</p> ', 8, 11, ''); INSERT INTO cahier_archive_seance (id_archive_seance, date_archive, id_visa, id_seance, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations) VALUES (49, '2013-09-26 11:25:23.901423', 16, 23, 'SEA23', 'Cours de rattrapage', '2013-09-30', 16, 17, 0, 0, '<p> Cours de soutien avec les &eacute;l&egrave;ves du 2&egrave;me groupe</p> <p> &nbsp;</p> ', 8, 11, ''); INSERT INTO cahier_archive_seance (id_archive_seance, date_archive, id_visa, id_seance, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations) VALUES (45, '2013-09-26 11:23:27.091668', 11, 27, 'SEA27', 'Exemple du calcul d''angles', '2013-10-14', 13, 15, 45, 45, '<p> <span style="color:#000000;"><strong><span style="background-color: rgb(255, 255, 0);">Saisie par le rempla&ccedil;ant : Annie-Jean SAGNEAUX</span></strong></span></p> <h2> <font color="#000000" face="Arial" size="2"><font color="#ff9900" size="4"><strong>Exemple d&rsquo;application du calcul d&#39;angles</strong></font></font></h2> <p> <font color="#000000" face="Arial" size="2"><em>Exemple&nbsp;:</em><br /> &nbsp;<br /> ABC est un triangle rectangle en A, tel que : AB = 6 cm et&nbsp; AC = 4 cm.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br /> <strong>Calculer l&rsquo;arrondi au degr&eacute; de l&rsquo;angle</strong> <img align="absMiddle" alt="" height="30" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-16a%281%29.png" width="58" /><strong>.</strong><br /> &nbsp;</font></p> <div align="center"> <font color="#000000" face="Arial" size="2"><img alt="" height="152" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-16b.png" width="300" /></font></div> <p> <font color="#000000" face="Arial" size="2">&nbsp;<br /> <em>M&eacute;thode :</em><br /> &nbsp;<br /> &diams; On trace une figure &agrave; main lev&eacute;e.<br /> On repasse en couleur les donn&eacute;es connues et celle cherch&eacute;e.<br /> &diams; Par rapport &agrave; l&rsquo;angle connu, on connait le c&ocirc;t&eacute; adjacent et on cherche la longueur du c&ocirc;t&eacute; oppos&eacute;.<br /> On va utiliser la formule <font color="#ff0000">de la tangente</font>.<br /> &nbsp;<br /> <font color="#0000ff"><strong>Dans le triangle ABC rectangle en B, on a :</strong> <img align="absMiddle" alt="" height="50" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-16c.png" width="126" /></font><br /> <strong><font color="#0000ff">Soit :</font> </strong><img align="absMiddle" alt="" height="50" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-16d.png" width="150" /><br /> <font color="#0000ff"><strong>D&#39;o&ugrave; :</strong></font> <img align="absMiddle" alt="" height="35" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-16e.png" width="155" /><br /> <font color="#0000ff"><strong>&nbsp;<br /> Sur la calculatrice, on lit : 56,30993247</strong></font><br /> &nbsp;<br /> <font color="#0000ff"><strong>Finalement :</strong></font> <img align="absMiddle" alt="" height="35" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-16f.png" width="122" /><br /> &nbsp; </font></p> ', 6, 13, '<p> Faire passer au tableau quelques &eacute;l&egrave;ves pour r&eacute;aliser les illustrations</p> '); INSERT INTO cahier_archive_seance (id_archive_seance, date_archive, id_visa, id_seance, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations) VALUES (46, '2013-09-26 11:23:27.091668', 11, 28, 'SEA28', 'Propriétés des formules trigonométriques', '2013-10-15', 14, 17, 45, 0, '<p> <span style="color:#000000;"><strong><span style="background-color: rgb(255, 255, 0);">Saisie par le rempla&ccedil;ant : Annie-Jean SAGNEAUX</span></strong></span></p> <h2> <font color="#000000" face="Arial" size="2"><font color="#ff9900" size="4"><strong>Propri&eacute;t&eacute;s des formules trigonom&eacute;triques</strong></font></font></h2> <p> <font color="#000000" face="Arial" size="2">&nbsp;<br /> &nbsp;<br /> <font color="#ff0000"><strong>Dans un triangle rectangle, quelle que soit la mesure x d&rsquo;un angle aigu, on a&nbsp;: </strong></font><br /> &nbsp;</font></p> <br /> <div align="center"> <img alt="" height="70" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-17.png" width="409" /></div> <p> <font color="#000000" face="Arial" size="2">&nbsp;<br /> <em>Preuve :</em><br /> &nbsp;<br /> <img alt="" height="113" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-17b.png" width="645" /><br /> &nbsp;<br /> <strong><font color="#ff0000" size="3">2)</font> On note :</strong><br /> CA le c&ocirc;t&eacute; adjacent &agrave; l&rsquo;angle x ;<br /> CO le c&ocirc;t&eacute; oppos&eacute; &agrave; l&rsquo;angle x ;<br /> H l&rsquo;hypot&eacute;nuse du triangle rectangle ;<br /> &nbsp;<br /> <strong>On a :</strong><br /> <img alt="" height="59" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-17c.png" width="450" /><br /> &nbsp;<br /> <strong>Or :</strong> dans un triangle rectangle, d&rsquo;apr&egrave;s la propri&eacute;t&eacute; de Pythagore, <strong>CA&sup2; + CO&sup2; = H&sup2;</strong>.<br /> &nbsp;<br /> <strong>Donc :</strong> <strong><font color="#ff0000">cos&sup2; x + sin&sup2; x = 1</font></strong></font></p> ', 6, 13, '<p> Fournir aux &eacute;l&egrave;ves une fiche r&eacute;capitulative des formules &agrave; conna&icirc;tre par coeur</p> '); INSERT INTO cahier_archive_seance (id_archive_seance, date_archive, id_visa, id_seance, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations) VALUES (50, '2013-09-26 14:32:30.784659', 10, 9, 'SEA9', 'Définition de la tangente', '2013-10-07', 9, 11, 0, 0, '<p> D&eacute;finition de la formule trigonom&eacute;trique du calcul de la tangente :</p> <p> &nbsp;</p> <p> <font color="#000000" face="Arial" size="2"><font color="#ff9900"><strong>La valeur commune</strong></font> des rapports&nbsp;<img align="absMiddle" alt="" height="45" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-10a.png" width="33" /> et&nbsp;<img align="absMiddle" alt="" height="45" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-10b.png" width="31" /> ne d&eacute;pend que de <font color="#ff0000"><strong>la mesure de l&rsquo;angle</strong></font><img align="absMiddle" alt="" height="30" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-08bonus%281%29.png" width="59" /><br /> &nbsp;<br /> On l&rsquo;appelle <font color="#ff9900"><strong>la tangente</strong></font> de <font color="#ff0000"><strong>l&rsquo;angle</strong></font></font><font color="#000000" face="Arial" size="2"><img align="absMiddle" alt="" height="30" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-08bonus%281%29.png" width="59" /><img align="right" alt="" height="150" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-10c.png" width="200" /></font><br /> <font color="#000000" face="Arial" size="2">&nbsp;<br /> &nbsp;<br /> <img alt="" height="64" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-10d.png" width="445" /></font></p> ', 5, 11, ''); INSERT INTO cahier_archive_seance (id_archive_seance, date_archive, id_visa, id_seance, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations) VALUES (51, '2013-09-26 14:32:30.784659', 10, 10, 'SEA10', 'Exemple du calcul d''angles', '2013-10-08', 9, 11, 0, 0, '<h2> <font color="#000000" face="Arial" size="2"><font color="#ff9900" size="4"><strong>Exemple d&rsquo;application du calcul d&#39;angles</strong></font></font></h2> <p> <font color="#000000" face="Arial" size="2"><em>Exemple&nbsp;:</em><br /> &nbsp;<br /> ABC est un triangle rectangle en A, tel que : AB = 6 cm et&nbsp; AC = 4 cm.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br /> <strong>Calculer l&rsquo;arrondi au degr&eacute; de l&rsquo;angle</strong> <img align="absMiddle" alt="" height="30" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-16a%281%29.png" width="58" /><strong>.</strong><br /> &nbsp;</font></p> <div align="center"> <font color="#000000" face="Arial" size="2"><img alt="" height="152" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-16b.png" width="300" /></font></div> <p> <font color="#000000" face="Arial" size="2">&nbsp;<br /> <em>M&eacute;thode :</em><br /> &nbsp;<br /> &diams; On trace une figure &agrave; main lev&eacute;e.<br /> On repasse en couleur les donn&eacute;es connues et celle cherch&eacute;e.<br /> &diams; Par rapport &agrave; l&rsquo;angle connu, on connait le c&ocirc;t&eacute; adjacent et on cherche la longueur du c&ocirc;t&eacute; oppos&eacute;.<br /> On va utiliser la formule <font color="#ff0000">de la tangente</font>.<br /> &nbsp;<br /> <font color="#0000ff"><strong>Dans le triangle ABC rectangle en B, on a :</strong> <img align="absMiddle" alt="" height="50" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-16c.png" width="126" /></font><br /> <strong><font color="#0000ff">Soit :</font> </strong><img align="absMiddle" alt="" height="50" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-16d.png" width="150" /><br /> <font color="#0000ff"><strong>D&#39;o&ugrave; :</strong></font> <img align="absMiddle" alt="" height="35" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-16e.png" width="155" /><br /> <font color="#0000ff"><strong>&nbsp;<br /> Sur la calculatrice, on lit : 56,30993247</strong></font><br /> &nbsp;<br /> <font color="#0000ff"><strong>Finalement :</strong></font> <img align="absMiddle" alt="" height="35" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-16f.png" width="122" /><br /> &nbsp; </font></p> ', 5, 11, '<p> Faire passer au tableau quelques &eacute;l&egrave;ves pour r&eacute;aliser les illustrations</p> '); INSERT INTO cahier_archive_seance (id_archive_seance, date_archive, id_visa, id_seance, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations) VALUES (52, '2013-09-26 14:32:30.784659', 10, 6, 'SEA6', 'Formule trigonométrique : cosinus', '2013-09-30', 9, 11, 0, 0, '<p> <font color="#000000" face="Arial" size="2">En 4&egrave;me, on a d&eacute;couvert un nouvel outil appel&eacute; &laquo;&nbsp;<font color="#ff00ff">cosinus</font>&nbsp;&raquo;.</font></p> <p> <latex>cosinus=cote \cdot adjacent \div hypotenuse</latex><br /> <font color="#000000" face="Arial" size="2">Cet outil s&rsquo;utilise uniquement dans les <font color="#ff00ff">triangles rectangles</font>.</font></p> <p> <font color="#000000" face="Arial" size="2">Ce rapport ne d&eacute;pend que de <font color="#ff00ff">la mesure de l&rsquo;angle consid&eacute;r&eacute;</font>.<br /> La valeur du cosinus d&rsquo;un angle est toujours comprise entre <strong><font color="#ff00ff">0</font></strong> et <strong><font color="#ff00ff">1</font></strong>.</font></p> ', 5, 11, '<p> Montrer des exemples au tableau avec des triangles rectangles</p> '); INSERT INTO cahier_archive_seance (id_archive_seance, date_archive, id_visa, id_seance, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations) VALUES (53, '2013-09-26 14:32:30.784659', 10, 7, 'SEA7', 'Résivion sur les triangles rectangles', '2013-10-01', 9, 11, 0, 0, '<p> Revoir les formules li&eacute;es aux triangles rectangles.</p> <p> Entre autres rappel sur la formule de <strong>Pythagore</strong>.</p> Rappel sur la forumle des triangles rectangle : <br/> <p> &lt;Latex&gt;C^{2}=A^{2}+B^{2}&lt;/Latex&gt;</p> <p> Soit :</p> <p> &lt;Latex&gt;C= \sqrt{A^{2}+B^{2}} &lt;/Latex&gt;</p> <p> &nbsp;</p> ', 5, 11, ''); INSERT INTO cahier_archive_seance (id_archive_seance, date_archive, id_visa, id_seance, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations) VALUES (55, '2013-09-26 14:32:30.784659', 10, 11, 'SEA11', 'Propriétés des formules trigonométriques', '2013-10-10', 13, 16, 45, 0, '<h2> <font color="#000000" face="Arial" size="2"><font color="#ff9900" size="4"><strong>Propri&eacute;t&eacute;s des formules trigonom&eacute;triques</strong></font></font></h2> <p> <font color="#000000" face="Arial" size="2">&nbsp;<br /> &nbsp;<br /> <font color="#ff0000"><strong>Dans un triangle rectangle, quelle que soit la mesure x d&rsquo;un angle aigu, on a&nbsp;: </strong></font><br /> &nbsp;</font></p> <br /> <div align="center"> <img alt="" height="70" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-17.png" width="409" /></div> <p> <font color="#000000" face="Arial" size="2">&nbsp;<br /> <em>Preuve :</em><br /> &nbsp;<br /> <img alt="" height="113" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-17b.png" width="645" /><br /> &nbsp;<br /> <strong><font color="#ff0000" size="3">2)</font> On note :</strong><br /> CA le c&ocirc;t&eacute; adjacent &agrave; l&rsquo;angle x ;<br /> CO le c&ocirc;t&eacute; oppos&eacute; &agrave; l&rsquo;angle x ;<br /> H l&rsquo;hypot&eacute;nuse du triangle rectangle ;<br /> &nbsp;<br /> <strong>On a :</strong><br /> <img alt="" height="59" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-17c.png" width="450" /><br /> &nbsp;<br /> <strong>Or :</strong> dans un triangle rectangle, d&rsquo;apr&egrave;s la propri&eacute;t&eacute; de Pythagore, <strong>CA&sup2; + CO&sup2; = H&sup2;</strong><br /> &nbsp;<br /> <strong>Donc :</strong> <strong><font color="#ff0000">cos&sup2; x + sin&sup2; x = 1</font></strong></font></p> <p> <span style="background-color:#ffff00;">Ce commentaire a &eacute;t&eacute; rajout&eacute; apr&egrave;s la pose du visa du directeur.</span></p> ', 5, 11, '<p> Fournir aux &eacute;l&egrave;ves une fiche r&eacute;capitulative des formules &agrave; conna&icirc;tre par coeur.</p> <p> Prendre la fiche verte</p> '); -- -- Data for Name: cahier_classe; Type: TABLE DATA; Schema: cahier_courant; Owner: ent -- INSERT INTO cahier_classe (id, code, designation, id_etablissement, id_annee_scolaire) VALUES (1, 'CLA1', 'TS1', 1, 1); INSERT INTO cahier_classe (id, code, designation, id_etablissement, id_annee_scolaire) VALUES (2, 'CLA2', 'TS2', 1, 1); INSERT INTO cahier_classe (id, code, designation, id_etablissement, id_annee_scolaire) VALUES (3, 'CLA3', 'TES', 1, 1); INSERT INTO cahier_classe (id, code, designation, id_etablissement, id_annee_scolaire) VALUES (4, 'CLA4', '2A', 2, 1); INSERT INTO cahier_classe (id, code, designation, id_etablissement, id_annee_scolaire) VALUES (5, 'CLA5', '2B', 2, 1); INSERT INTO cahier_classe (id, code, designation, id_etablissement, id_annee_scolaire) VALUES (6, 'CLA6', '2C', 2, 1); INSERT INTO cahier_classe (id, code, designation, id_etablissement, id_annee_scolaire) VALUES (7, 'CLA7', '3A', 3, 1); INSERT INTO cahier_classe (id, code, designation, id_etablissement, id_annee_scolaire) VALUES (8, 'CLA8', '3B', 3, 1); INSERT INTO cahier_classe (id, code, designation, id_etablissement, id_annee_scolaire) VALUES (9, 'CLA9', 'TS1', 4, 1); INSERT INTO cahier_classe (id, code, designation, id_etablissement, id_annee_scolaire) VALUES (10, 'CLA10', 'TS2', 4, 1); INSERT INTO cahier_classe (id, code, designation, id_etablissement, id_annee_scolaire) VALUES (11, 'CLA11', 'TES', 4, 1); INSERT INTO cahier_classe (id, code, designation, id_etablissement, id_annee_scolaire) VALUES (12, 'CLA12', '2A', 5, 1); INSERT INTO cahier_classe (id, code, designation, id_etablissement, id_annee_scolaire) VALUES (13, 'CLA13', '2B', 5, 1); INSERT INTO cahier_classe (id, code, designation, id_etablissement, id_annee_scolaire) VALUES (14, 'CLA14', '2C', 5, 1); INSERT INTO cahier_classe (id, code, designation, id_etablissement, id_annee_scolaire) VALUES (15, 'CLA15', '3A', 6, 1); INSERT INTO cahier_classe (id, code, designation, id_etablissement, id_annee_scolaire) VALUES (16, 'CLA16', '3B', 6, 1); -- -- Data for Name: cahier_cycle; Type: TABLE DATA; Schema: cahier_courant; Owner: ent -- INSERT INTO cahier_cycle (id, id_enseignant, uid_enseignant, titre, objectif, prerequis, description) VALUES (1, 6, 'z130001a', 'test', 'obj test', 'pré-requis test', 'desc test'); INSERT INTO cahier_cycle (id, id_enseignant, uid_enseignant, titre, objectif, prerequis, description) VALUES (2, 6, 'z130001a', 'Apprentissage de la trigonométrie', 'Les trigonométrie et sa méga complexité. Les élèves vont apprendre à maitriser ce super bidule.', 'Géométrie : les bases Algorithme : niveau avancé', 'Présentation de la trigo avec une approche empirique appliquée.'); INSERT INTO cahier_cycle (id, id_enseignant, uid_enseignant, titre, objectif, prerequis, description) VALUES (3, 11, 'z130001f', 'Trigonométrie - 1er cycle', 'Démontrer les formules de trigonométrie Puis les utiliser dans le but de calculer des angles Travailler l’utilisation de la calculatrice. ', 'Connaissance des calculs géométrique Théorème de math pythagore', 'Ce cours a pour objectifs de démontrer dans un premier temps les formules de trigonométrie puis de les utiliser dans le but de calculer des angles et de travailler l’utilisation de la calculatrice. La première partie est commune avec le chapitre "Formules trigonométriques et calcul de longueurs" mais l''exemple d''application en fin de chapitre diffère et s''intéresse ici au calcul d''angles'); -- -- Data for Name: cahier_cycle_devoir; Type: TABLE DATA; Schema: cahier_courant; Owner: ent -- INSERT INTO cahier_cycle_devoir (id, id_cycle_seance, intitule, description, id_type_devoir, date_remise) VALUES (1, 1, 'seq pédagogique taf 1', '<p> deuxi&egrave;me s&eacute;ance suivant</p> <p> &nbsp;</p> <p> Deux pi&egrave;ces jointes</p> ', 6, 2); INSERT INTO cahier_cycle_devoir (id, id_cycle_seance, intitule, description, id_type_devoir, date_remise) VALUES (2, 1, 'seq pédagogique taf 2', '<p> S&eacute;ance de la 3&eacute;me semaine suivant</p> <p> Devoir maison</p> ', 4, 103); INSERT INTO cahier_cycle_devoir (id, id_cycle_seance, intitule, description, id_type_devoir, date_remise) VALUES (3, 2, 'Faire l''exo 1 de la leçon', '<p> Faire l&#39;exo N&deg;1 vu en cours.</p> <div id="idPopupSeance_form:idMenuActionPopupSeanceAdd" style="white-space: nowrap;"> &nbsp;</div> <div style="white-space: nowrap;"> <span id="idPopupSeance_form:idPopupSeance_panel">&lt;Latex&gt; \sqrt[2]{A^{2}+B^{2}} &lt;/Latex&gt;</span></div> <br /> <br /> ', 5, 1); INSERT INTO cahier_cycle_devoir (id, id_cycle_seance, intitule, description, id_type_devoir, date_remise) VALUES (4, 3, 'Apprendre la leçon', '<p> Apprendre la le&ccedil;on vu en cours</p> ', 4, 1); INSERT INTO cahier_cycle_devoir (id, id_cycle_seance, intitule, description, id_type_devoir, date_remise) VALUES (5, 5, 'Exo 1 et 2', '<p> Faire les exercices de g&eacute;om&eacute;trie 1 et 2 de la page 15.</p> ', 8, 1); INSERT INTO cahier_cycle_devoir (id, id_cycle_seance, intitule, description, id_type_devoir, date_remise) VALUES (6, 6, 'Utilisation de la calculatrice', '<p> S&#39;entrainer avec la calculatrice pour r&eacute;aliser les calcul d&#39;angle pr&eacute;sent&eacute; sur les exercices N&deg;3 et 4 de la page 21.</p> ', 7, 1); INSERT INTO cahier_cycle_devoir (id, id_cycle_seance, intitule, description, id_type_devoir, date_remise) VALUES (7, 9, 'Exercices de trigonométrie', '<p> R&eacute;aliser &agrave; la maison les exercices<strong> 5, 7 et 9</strong> de la page <strong>35 </strong>du livre de trigonom&eacute;trie.</p> <p> &nbsp;</p> ', 7, 1); INSERT INTO cahier_cycle_devoir (id, id_cycle_seance, intitule, description, id_type_devoir, date_remise) VALUES (8, 4, 'Apprendre la leçon', '<p> Revoir &agrave; la maison la le&ccedil;on vue en cours.</p> <p> En d&eacute;but de cours, une <strong><span style="color:#0000ff;">&eacute;valuation</span> </strong>sera r&eacute;alis&eacute;e !</p> ', 9, 1); INSERT INTO cahier_cycle_devoir (id, id_cycle_seance, intitule, description, id_type_devoir, date_remise) VALUES (9, 7, 'Illustration de la tangente', '<p> R&eacute;aliser un sch&eacute;ma illustrant la compr&eacute;hension de la le&ccedil;on sur la tangente.</p> <p> Faire bien attention &agrave; remettre<u><strong> un travail soign&eacute;</strong></u>. En g&eacute;om&eacute;trie le soin est absolument n&eacute;cessaire.</p> ', 7, 101); INSERT INTO cahier_cycle_devoir (id, id_cycle_seance, intitule, description, id_type_devoir, date_remise) VALUES (10, 8, 'Mise en pratique des calculs d''angles', '<p> R&eacute;aliser les exercices 1, 2, et 4 de la page 25.</p> <p> Faire bien attention &agrave;<strong> lire l&#39;&eacute;noncer </strong>avant de se lancer dans la r&eacute;solution du probl&egrave;me.</p> <p> &nbsp;</p> ', 7, 101); INSERT INTO cahier_cycle_devoir (id, id_cycle_seance, intitule, description, id_type_devoir, date_remise) VALUES (11, 10, 'Révision sur les formules trigonométrique', '<p> Revoir et conna&icirc;tre par coeur toutes les formules vues en cours.</p> ', 7, 101); INSERT INTO cahier_cycle_devoir (id, id_cycle_seance, intitule, description, id_type_devoir, date_remise) VALUES (12, 11, 'Calcul des longueurs', '<p> D&eacute;terminer les longueurs manquantes de chaque c&ocirc;t&eacute; des triangles rectangles&nbsp; pr&eacute;sent&eacute;s en page 43 du cahier d&#39;exercices.</p> <p> &nbsp;</p> ', 8, 101); -- -- Data for Name: cahier_cycle_groupe; Type: TABLE DATA; Schema: cahier_courant; Owner: ent -- INSERT INTO cahier_cycle_groupe (id_cycle, id_groupe) VALUES (3, 21); -- -- Data for Name: cahier_cycle_seance; Type: TABLE DATA; Schema: cahier_courant; Owner: ent -- INSERT INTO cahier_cycle_seance (id, id_cycle, id_enseignant, uid_enseignant, enseignement, objectif, intitule, description, annotations, annotations_visible, indice) VALUES (1, 1, 6, 'z130001a', 'seq pédagogique enseignement', 'seq pédagogique objectifs', 'seq pédagogique intitulé', '<p> seq p&eacute;dagogique description &lt;Latex&gt;7 \epsilon 7777 \not\epsilon 9 \wedge 7 \not\exists 8&lt;/Latex&gt;</p> ', '<p> annotation&nbsp; &lt;Latex&gt;7 \epsilon 7 \not\epsilon 9 \wedge 7 \not\exists 8&lt;/Latex&gt;</p> ', false, 1); INSERT INTO cahier_cycle_seance (id, id_cycle, id_enseignant, uid_enseignant, enseignement, objectif, intitule, description, annotations, annotations_visible, indice) VALUES (8, 3, 11, 'z130001f', 'Math', 'Présentation s''appuyant sur un exemple concret du calcul d''angle', 'Exemple du calcul d''angles', '<h2> <font color="#000000" face="Arial" size="2"><font color="#ff9900" size="4"><strong>Exemple d&rsquo;application du calcul d&#39;angles</strong></font></font></h2> <p> <font color="#000000" face="Arial" size="2"><em>Exemple&nbsp;:</em><br /> &nbsp;<br /> ABC est un triangle rectangle en A, tel que : AB = 6 cm et&nbsp; AC = 4 cm.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br /> <strong>Calculer l&rsquo;arrondi au degr&eacute; de l&rsquo;angle</strong> <img align="absMiddle" alt="" height="30" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-16a%281%29.png" width="58" /><strong>.</strong><br /> &nbsp;</font></p> <div align="center"> <font color="#000000" face="Arial" size="2"><img alt="" height="152" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-16b.png" width="300" /></font></div> <p> <font color="#000000" face="Arial" size="2">&nbsp;<br /> <em>M&eacute;thode :</em><br /> &nbsp;<br /> &diams; On trace une figure &agrave; main lev&eacute;e.<br /> On repasse en couleur les donn&eacute;es connues et celle cherch&eacute;e.<br /> &diams; Par rapport &agrave; l&rsquo;angle connu, on connait le c&ocirc;t&eacute; adjacent et on cherche la longueur du c&ocirc;t&eacute; oppos&eacute;.<br /> On va utiliser la formule <font color="#ff0000">de la tangente</font>.<br /> &nbsp;<br /> <font color="#0000ff"><strong>Dans le triangle ABC rectangle en B, on a :</strong> <img align="absMiddle" alt="" height="50" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-16c.png" width="126" /></font><br /> <strong><font color="#0000ff">Soit :</font> </strong><img align="absMiddle" alt="" height="50" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-16d.png" width="150" /><br /> <font color="#0000ff"><strong>D&#39;o&ugrave; :</strong></font> <img align="absMiddle" alt="" height="35" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-16e.png" width="155" /><br /> <font color="#0000ff"><strong>&nbsp;<br /> Sur la calculatrice, on lit : 56,30993247</strong></font><br /> &nbsp;<br /> <font color="#0000ff"><strong>Finalement :</strong></font> <img align="absMiddle" alt="" height="35" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-16f.png" width="122" /><br /> &nbsp; </font></p> ', '<p> Faire passer au tableau quelques &eacute;l&egrave;ves pour r&eacute;aliser les illustrations</p> ', true, 5); INSERT INTO cahier_cycle_seance (id, id_cycle, id_enseignant, uid_enseignant, enseignement, objectif, intitule, description, annotations, annotations_visible, indice) VALUES (2, 2, 6, 'z130001a', 'Math', 'Faire croire aux enfants que la trigo est facile. ', 'Présentation', '<p> Pr&eacute;sentation de la trigo aux enfants avec des exemples simples</p> ', '<p> Attention &agrave; bien rester calme</p> ', false, 1); INSERT INTO cahier_cycle_seance (id, id_cycle, id_enseignant, uid_enseignant, enseignement, objectif, intitule, description, annotations, annotations_visible, indice) VALUES (3, 2, 6, 'z130001a', 'Math', 'Notions de base de la trigo', 'Premier TD', '<p> Le&ccedil;on sur les bases de la trigo illustr&eacute;e par un premier TD avec les enfants</p> ', '', false, 2); INSERT INTO cahier_cycle_seance (id, id_cycle, id_enseignant, uid_enseignant, enseignement, objectif, intitule, description, annotations, annotations_visible, indice) VALUES (5, 3, 11, 'z130001f', 'Math', 'Réviser les triangles rectangles', 'Résivion sur les triangles rectangles', '<p> Revoir les formules li&eacute;es aux triangles rectangles.</p> <p> Entre autres rappel sur la formule de <strong>Pythagore</strong>.</p> Rappel sur la forumle des triangles rectangle : <br/> <p> &lt;Latex&gt;C^{2}=A^{2}+B^{2}&lt;/Latex&gt;</p> <p> Soit :</p> <p> &lt;Latex&gt;C= \sqrt{A^{2}+B^{2}} &lt;/Latex&gt;</p> <p> &nbsp;</p> ', '', false, 2); INSERT INTO cahier_cycle_seance (id, id_cycle, id_enseignant, uid_enseignant, enseignement, objectif, intitule, description, annotations, annotations_visible, indice) VALUES (6, 3, 13, 'z130001h', 'Math', 'Apprendre à utiliser la calculatrice pour calculer le cosinus et sinus des angles d''un triangle rectangle', 'Calculatrice pour les angles', '<p> Pr&eacute;sentation de la calculatrice.</p> <p> Attention au mode de calcul : <strong>radian </strong>ou <strong>degr&eacute;</strong>.</p> <p> Les valeurs utilis&eacute;es pour les calculs doivent &ecirc;tre saisie avec <span style="color:#ff0000;"><strong>application</strong></span>. Les erreurs de frappe sont souvent la premi&egrave;re cause dans des faux r&eacute;sultats.</p> <p> Le calcul de l&#39;hypot&eacute;nuse fait appel &agrave; une imbrication de calcul : racine carr&eacute;e, parenth&egrave;ses et addition de carr&eacute;. L&#39;ordre de saisie et l&#39;utilisation des <strong>parenth&egrave;ses </strong>est tr&egrave;s importante !</p> ', '', false, 3); INSERT INTO cahier_cycle_seance (id, id_cycle, id_enseignant, uid_enseignant, enseignement, objectif, intitule, description, annotations, annotations_visible, indice) VALUES (4, 3, 11, 'z130001f', 'Math', 'Rappel des bases du calcul du cosinus', 'Formule trigonométrique : cosinus', '<p> <font color="#000000" face="Arial" size="2">En 4&egrave;me, on a d&eacute;couvert un nouvel outil appel&eacute; &laquo;&nbsp;<font color="#ff00ff">cosinus</font>&nbsp;&raquo;.</font></p> <p> <latex>cosinus=cote \cdot adjacent \div hypotenuse</latex><br /> <font color="#000000" face="Arial" size="2">Cet outil s&rsquo;utilise uniquement dans les <font color="#ff00ff">triangles rectangles</font>.</font></p> <p> <font color="#000000" face="Arial" size="2">Ce rapport ne d&eacute;pend que de <font color="#ff00ff">la mesure de l&rsquo;angle consid&eacute;r&eacute;</font>.<br /> La valeur du cosinus d&rsquo;un angle est toujours comprise entre <strong><font color="#ff00ff">0</font></strong> et <strong><font color="#ff00ff">1</font></strong>.</font></p> ', '<p> Montrer des exemples au tableau avec des triangles rectangles</p> ', true, 1); INSERT INTO cahier_cycle_seance (id, id_cycle, id_enseignant, uid_enseignant, enseignement, objectif, intitule, description, annotations, annotations_visible, indice) VALUES (7, 3, 11, 'z130001f', 'Math', 'Calcul et démonstration du calcul de la tangente', 'Définition de la tangente', '<p> D&eacute;finition de la formule trigonom&eacute;trique du calcul de la tangente :</p> <p> &nbsp;</p> <p> <font color="#000000" face="Arial" size="2"><font color="#ff9900"><strong>La valeur commune</strong></font> des rapports&nbsp;<img align="absMiddle" alt="" height="45" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-10a.png" width="33" /> et&nbsp;<img align="absMiddle" alt="" height="45" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-10b.png" width="31" /> ne d&eacute;pend que de <font color="#ff0000"><strong>la mesure de l&rsquo;angle</strong></font><img align="absMiddle" alt="" height="30" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-08bonus%281%29.png" width="59" /><br /> &nbsp;<br /> On l&rsquo;appelle <font color="#ff9900"><strong>la tangente</strong></font> de <font color="#ff0000"><strong>l&rsquo;angle</strong></font></font><font color="#000000" face="Arial" size="2"><img align="absMiddle" alt="" height="30" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-08bonus%281%29.png" width="59" /><img align="right" alt="" height="150" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-10c.png" width="200" /></font><br /> <font color="#000000" face="Arial" size="2">&nbsp;<br /> &nbsp;<br /> <img alt="" height="64" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-10d.png" width="445" /></font></p> ', '', false, 4); INSERT INTO cahier_cycle_seance (id, id_cycle, id_enseignant, uid_enseignant, enseignement, objectif, intitule, description, annotations, annotations_visible, indice) VALUES (9, 3, 11, 'z130001f', 'Math', 'Apprendre les propriétés des formules trigonométriques', 'Propriétés des formules trigonométriques', '<h2> <font color="#000000" face="Arial" size="2"><font color="#ff9900" size="4"><strong>Propri&eacute;t&eacute;s des formules trigonom&eacute;triques</strong></font></font></h2> <p> <font color="#000000" face="Arial" size="2">&nbsp;<br /> &nbsp;<br /> <font color="#ff0000"><strong>Dans un triangle rectangle, quelle que soit la mesure x d&rsquo;un angle aigu, on a&nbsp;: </strong></font><br /> &nbsp;</font></p> <br /> <div align="center"> <img alt="" height="70" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-17.png" width="409" /></div> <p> <font color="#000000" face="Arial" size="2">&nbsp;<br /> <em>Preuve :</em><br /> &nbsp;<br /> <img alt="" height="113" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-17b.png" width="645" /><br /> &nbsp;<br /> <strong><font color="#ff0000" size="3">2)</font> On note :</strong><br /> CA le c&ocirc;t&eacute; adjacent &agrave; l&rsquo;angle x ;<br /> CO le c&ocirc;t&eacute; oppos&eacute; &agrave; l&rsquo;angle x ;<br /> H l&rsquo;hypot&eacute;nuse du triangle rectangle ;<br /> &nbsp;<br /> <strong>On a :</strong><br /> <img alt="" height="59" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-17c.png" width="450" /><br /> &nbsp;<br /> <strong>Or :</strong> dans un triangle rectangle, d&rsquo;apr&egrave;s la propri&eacute;t&eacute; de Pythagore, <strong>CA&sup2; + CO&sup2; = H&sup2;</strong>.<br /> &nbsp;<br /> <strong>Donc :</strong> <strong><font color="#ff0000">cos&sup2; x + sin&sup2; x = 1</font></strong></font></p> ', '<p> Fournir aux &eacute;l&egrave;ves une fiche r&eacute;capitulative des formules &agrave; conna&icirc;tre par coeur</p> ', false, 6); INSERT INTO cahier_cycle_seance (id, id_cycle, id_enseignant, uid_enseignant, enseignement, objectif, intitule, description, annotations, annotations_visible, indice) VALUES (10, 3, 13, 'z130001h', 'Informatique', 'Utilisation d''un tableur comme Excel pour calculer les fonctions trigonométriques', 'Application avec un tableur', '<p> Rappel sur l&#39;utilisation d&#39;un tableur.</p> <p> Utiliser le tableur de la salle d&#39;informatique pour r&eacute;aliser le calcul des fonctions suivantes :</p> <p> - <strong>Cosinus(angle, unit&eacute;) </strong></p> <p> - <strong>Sinus(angle, unit&eacute;)</strong></p> <p> Avec unit&eacute; = Degr&eacute;, Radian ou Grade</p> ', '<p> Faire une petite d&eacute;monstration de l&#39;utilisation de Excel sur un fonction simple.</p> ', true, 7); INSERT INTO cahier_cycle_seance (id, id_cycle, id_enseignant, uid_enseignant, enseignement, objectif, intitule, description, annotations, annotations_visible, indice) VALUES (11, 3, 13, 'z130001h', 'Math', 'Utilisation des fonction trigo pour le calcul de longueurs', 'Calcul de longueur et trigonométrie', '<div align="center"> <font color="#ff9900" face="Arial"><strong><font size="3">Formules trigonom&eacute;triques et<br /> calcul de longueurs :</font></strong></font></div> <br /> <div align="justify"> <span style="font-weight: normal;"><span style="font-weight: normal;"><font face="Arial" size="2">Ce cours a pour objectifs de d&eacute;montrer</font></span><span style="font-weight: normal;"><font face="Arial" size="2"> dans un premier temps</font></span><span style="font-weight: normal;"><font face="Arial" size="2"> les formules de trigonom&eacute;trie puis de les utiliser </font></span><span style="font-weight: normal;"><font face="Arial" size="2">dans le but de calculer des longueurs et de travailler l&rsquo;utilisation de la calculatrice.</font></span><span style="font-weight: normal;"><font face="Arial" size="2"> La premi&egrave;re partie est commune avec le chapitre &quot;Formules trigonom&eacute;triques et calcul d&#39;angles&quot; </font></span><span style="font-weight: normal;"><font face="Arial" size="2">mais l&#39;exemple d&#39;application en fin de chapitre diff&egrave;re et s&#39;int&eacute;resse ici au calcul de longueurs. </font></span></span></div> <p> &nbsp;</p> ', '<p> Penser &agrave; faire des photocopies des sch&eacute;mas d&#39;illustration</p> ', true, 8); -- -- Data for Name: cahier_devoir; Type: TABLE DATA; Schema: cahier_courant; Owner: ent -- INSERT INTO cahier_devoir (id, date_remise, code, intitule, description, id_type_devoir, id_seance) VALUES (3, '2014-01-06', 'DEV3', 'seq pédagogique taf 2', '<p> S&eacute;ance de la 3&eacute;me semaine suivant</p> <p> Devoir maison</p> ', 4, 3); INSERT INTO cahier_devoir (id, date_remise, code, intitule, description, id_type_devoir, id_seance) VALUES (4, '2013-12-11', 'DEV4', 'seq pédagogique taf 1', '<p> deuxi&egrave;me s&eacute;ance suivant</p> <p> &nbsp;</p> <p> Deux pi&egrave;ces jointes</p> ', 6, 3); INSERT INTO cahier_devoir (id, date_remise, code, intitule, description, id_type_devoir, id_seance) VALUES (19, '2013-09-23', 'DEV19', 'encore', '<p> plus un</p> ', NULL, 5); INSERT INTO cahier_devoir (id, date_remise, code, intitule, description, id_type_devoir, id_seance) VALUES (20, '2013-09-23', 'DEV20', 'Devoir 1', '<p> Faire les exo 1 et 2</p> ', 4, 4); INSERT INTO cahier_devoir (id, date_remise, code, intitule, description, id_type_devoir, id_seance) VALUES (25, '2013-12-02', 'DEV25', 'seq pédagogique taf 1', '<p> deuxi&egrave;me s&eacute;ance suivant</p> <p> &nbsp;</p> <p> Deux pi&egrave;ces jointes</p> ', 6, 2); INSERT INTO cahier_devoir (id, date_remise, code, intitule, description, id_type_devoir, id_seance) VALUES (26, '2013-12-16', 'DEV26', 'seq pédagogique taf 2', '<p> S&eacute;ance de la 3&eacute;me semaine suivant</p> <p> Devoir maison</p> ', 4, 2); INSERT INTO cahier_devoir (id, date_remise, code, intitule, description, id_type_devoir, id_seance) VALUES (27, '2013-10-01', 'DEV27', 'Apprendre la leçon', '<p> Revoir &agrave; la maison la le&ccedil;on vue en cours.</p> <p> En d&eacute;but de cours, une <strong><span style="color:#0000ff;">&eacute;valuation</span> </strong>sera r&eacute;alis&eacute;e !</p> ', 9, 6); INSERT INTO cahier_devoir (id, date_remise, code, intitule, description, id_type_devoir, id_seance) VALUES (28, '2013-10-03', 'DEV28', 'Exo 1 et 2', '<p> Faire les exercices de g&eacute;om&eacute;trie 1 et 2 de la page 15.</p> ', 8, 7); INSERT INTO cahier_devoir (id, date_remise, code, intitule, description, id_type_devoir, id_seance) VALUES (30, '2013-10-08', 'DEV30', 'Illustration de la tangente', '<p> R&eacute;aliser un sch&eacute;ma illustrant la compr&eacute;hension de la le&ccedil;on sur la tangente.</p> <p> Faire bien attention &agrave; remettre<u><strong> un travail soign&eacute;</strong></u>. En g&eacute;om&eacute;trie le soin est absolument n&eacute;cessaire.</p> ', 7, 9); INSERT INTO cahier_devoir (id, date_remise, code, intitule, description, id_type_devoir, id_seance) VALUES (31, '2013-10-10', 'DEV31', 'Mise en pratique des calculs d''angles', '<p> R&eacute;aliser les exercices 1, 2, et 4 de la page 25.</p> <p> Faire bien attention &agrave;<strong> lire l&#39;&eacute;noncer </strong>avant de se lancer dans la r&eacute;solution du probl&egrave;me.</p> <p> &nbsp;</p> ', 7, 10); INSERT INTO cahier_devoir (id, date_remise, code, intitule, description, id_type_devoir, id_seance) VALUES (35, '2013-10-01', 'DEV35', 'Apprendre la leçon', '<p> Revoir &agrave; la maison la le&ccedil;on vue en cours.</p> <p> En d&eacute;but de cours, une <strong><span style="color:#0000ff;">&eacute;valuation</span> </strong>sera r&eacute;alis&eacute;e !</p> ', 9, 14); INSERT INTO cahier_devoir (id, date_remise, code, intitule, description, id_type_devoir, id_seance) VALUES (36, '2013-10-07', 'DEV36', 'Exo 1 et 2', '<p> Faire les exercices de g&eacute;om&eacute;trie 1 et 2 de la page 15.</p> ', 8, 15); INSERT INTO cahier_devoir (id, date_remise, code, intitule, description, id_type_devoir, id_seance) VALUES (37, '2013-10-08', 'DEV37', 'Utilisation de la calculatrice', '<p> S&#39;entrainer avec la calculatrice pour r&eacute;aliser les calcul d&#39;angle pr&eacute;sent&eacute; sur les exercices N&deg;3 et 4 de la page 21.</p> ', 7, 16); INSERT INTO cahier_devoir (id, date_remise, code, intitule, description, id_type_devoir, id_seance) VALUES (41, '2013-11-05', 'DEV41', 'Révision sur les formules trigonométrique', '<p> Revoir et conna&icirc;tre par coeur toutes les formules vues en cours.</p> ', 7, 20); INSERT INTO cahier_devoir (id, date_remise, code, intitule, description, id_type_devoir, id_seance) VALUES (42, '2013-11-12', 'DEV42', 'Calcul des longueurs', '<p> D&eacute;terminer les longueurs manquantes de chaque c&ocirc;t&eacute; des triangles rectangles&nbsp; pr&eacute;sent&eacute;s en page 43 du cahier d&#39;exercices.</p> <p> &nbsp;</p> ', 8, 21); INSERT INTO cahier_devoir (id, date_remise, code, intitule, description, id_type_devoir, id_seance) VALUES (53, '2013-10-15', 'DEV53', 'Révision sur les formules trigonométrique', '<p> Revoir et conna&icirc;tre par coeur toutes les formules vues en cours.</p> ', 7, 25); INSERT INTO cahier_devoir (id, date_remise, code, intitule, description, id_type_devoir, id_seance) VALUES (55, '2013-10-15', 'DEV55', 'Mise en pratique des calculs d''angles', '<p> R&eacute;aliser les exercices 1, 2, et 4 de la page 25.</p> <p> Faire bien attention &agrave;<strong> lire l&#39;&eacute;noncer </strong>avant de se lancer dans la r&eacute;solution du probl&egrave;me.</p> <p> &nbsp;</p> ', 7, 27); INSERT INTO cahier_devoir (id, date_remise, code, intitule, description, id_type_devoir, id_seance) VALUES (56, '2013-11-04', 'DEV56', 'Exercices de trigonométrie', '<p> R&eacute;aliser &agrave; la maison les exercices<strong> 5, 7 et 9</strong> de la page <strong>35 </strong>du livre de trigonom&eacute;trie.</p> <p> &nbsp;</p> ', 7, 28); INSERT INTO cahier_devoir (id, date_remise, code, intitule, description, id_type_devoir, id_seance) VALUES (60, '2013-10-14', 'DEV60', 'Exercices de trigonométrie', '<p> R&eacute;aliser &agrave; la maison les exercices<strong> 5, 7 et 9</strong> de la page <strong>35 </strong>du livre de trigonom&eacute;trie.</p> <p> &nbsp;</p> ', 7, 11); INSERT INTO cahier_devoir (id, date_remise, code, intitule, description, id_type_devoir, id_seance) VALUES (61, '2013-11-04', 'DEV61', 'Calcul des longueurs', '<p> D&eacute;terminer les longueurs manquantes de chaque c&ocirc;t&eacute; des triangles rectangles&nbsp; pr&eacute;sent&eacute;s en page 43 du cahier d&#39;exercices.</p> <p> &nbsp;</p> ', 8, 26); INSERT INTO cahier_devoir (id, date_remise, code, intitule, description, id_type_devoir, id_seance) VALUES (62, '2013-10-14', 'DEV62', 'Illustration de la tangente', '<p> R&eacute;aliser un sch&eacute;ma illustrant la compr&eacute;hension de la le&ccedil;on sur la tangente.</p> <p> Faire bien attention &agrave; remettre<u><strong> un travail soign&eacute;</strong></u>. En g&eacute;om&eacute;trie le soin est absolument n&eacute;cessaire.</p> ', 7, 17); INSERT INTO cahier_devoir (id, date_remise, code, intitule, description, id_type_devoir, id_seance) VALUES (64, '2013-10-07', 'DEV64', 'Utilisation de la calculatrice', '<p> S&#39;entrainer avec la calculatrice pour r&eacute;aliser les calcul d&#39;angle pr&eacute;sent&eacute; sur les exercices N&deg;3 et 4 de la page 21.</p> ', 7, 8); -- -- Data for Name: cahier_eleve; Type: TABLE DATA; Schema: cahier_courant; Owner: ent -- INSERT INTO cahier_eleve (id, nom, prenom, uid) VALUES (32, 'Maher', 'Robin', 'z130002d'); INSERT INTO cahier_eleve (id, nom, prenom, uid) VALUES (33, 'Gaudin', 'Auguste', 'z130002e'); INSERT INTO cahier_eleve (id, nom, prenom, uid) VALUES (34, 'Morvan', 'Arsene', 'z130002f'); INSERT INTO cahier_eleve (id, nom, prenom, uid) VALUES (35, 'Devaux', 'Armand', 'z130002g'); INSERT INTO cahier_eleve (id, nom, prenom, uid) VALUES (36, 'Lesage', 'Ahmed', 'z130002h'); INSERT INTO cahier_eleve (id, nom, prenom, uid) VALUES (1, 'RESTANI', 'Quentin', 'z130000g'); INSERT INTO cahier_eleve (id, nom, prenom, uid) VALUES (2, 'GANNIER', 'Erwan', 'z130000h'); INSERT INTO cahier_eleve (id, nom, prenom, uid) VALUES (3, 'MOREAU', 'Julien', 'z130000i'); INSERT INTO cahier_eleve (id, nom, prenom, uid) VALUES (4, 'CANDEL', 'Marius', 'z130000j'); INSERT INTO cahier_eleve (id, nom, prenom, uid) VALUES (5, 'LYAM', 'Thomas', 'z130000k'); INSERT INTO cahier_eleve (id, nom, prenom, uid) VALUES (6, 'RESTANI', 'Margaux', 'z130000l'); INSERT INTO cahier_eleve (id, nom, prenom, uid) VALUES (7, 'LUPI', 'Lea', 'z130000m'); INSERT INTO cahier_eleve (id, nom, prenom, uid) VALUES (8, 'GAUDIN', 'Nathalie', 'z130000n'); INSERT INTO cahier_eleve (id, nom, prenom, uid) VALUES (9, 'TAGUET', 'Laetitia', 'z130000o'); INSERT INTO cahier_eleve (id, nom, prenom, uid) VALUES (10, 'JUSTON', 'Yann', 'z130000p'); INSERT INTO cahier_eleve (id, nom, prenom, uid) VALUES (11, 'COURPET', 'Claude', 'z130000q'); INSERT INTO cahier_eleve (id, nom, prenom, uid) VALUES (12, 'LUPI', 'Antoine', 'z130000r'); INSERT INTO cahier_eleve (id, nom, prenom, uid) VALUES (13, 'GOUT', 'Emmanuel', 'z130000s'); INSERT INTO cahier_eleve (id, nom, prenom, uid) VALUES (14, 'CANRY', 'Robin', 'z130000t'); INSERT INTO cahier_eleve (id, nom, prenom, uid) VALUES (15, 'CARBONELL', 'Maxime', 'z130000u'); INSERT INTO cahier_eleve (id, nom, prenom, uid) VALUES (16, 'GALANO', 'Florian', 'z130000v'); INSERT INTO cahier_eleve (id, nom, prenom, uid) VALUES (17, 'PAGES', 'Christophe', 'z130000w'); INSERT INTO cahier_eleve (id, nom, prenom, uid) VALUES (18, 'GOUT', 'Romain', 'z130000x'); INSERT INTO cahier_eleve (id, nom, prenom, uid) VALUES (19, 'Breton', 'Anais', 'z1300020'); INSERT INTO cahier_eleve (id, nom, prenom, uid) VALUES (20, 'Besnard', 'Alix', 'z1300021'); INSERT INTO cahier_eleve (id, nom, prenom, uid) VALUES (21, 'Verdier', 'Alfred', 'z1300022'); INSERT INTO cahier_eleve (id, nom, prenom, uid) VALUES (22, 'Mahe', 'Anthony', 'z1300023'); INSERT INTO cahier_eleve (id, nom, prenom, uid) VALUES (23, 'Pons', 'Arnaud', 'z1300024'); INSERT INTO cahier_eleve (id, nom, prenom, uid) VALUES (24, 'Breton', 'Dana', 'z1300025'); INSERT INTO cahier_eleve (id, nom, prenom, uid) VALUES (25, 'Pichon', 'Jean', 'z1300026'); INSERT INTO cahier_eleve (id, nom, prenom, uid) VALUES (26, 'Camuis', 'Andre', 'z1300027'); INSERT INTO cahier_eleve (id, nom, prenom, uid) VALUES (27, 'Launay', 'Apolline', 'z1300028'); INSERT INTO cahier_eleve (id, nom, prenom, uid) VALUES (28, 'Martel', 'Elise', 'z1300029'); INSERT INTO cahier_eleve (id, nom, prenom, uid) VALUES (29, 'Bigot', 'Marc', 'z130002a'); INSERT INTO cahier_eleve (id, nom, prenom, uid) VALUES (30, 'Pichon', 'Emilienne', 'z130002b'); INSERT INTO cahier_eleve (id, nom, prenom, uid) VALUES (31, 'Lesage', 'Caroline', 'z130002c'); -- -- Data for Name: cahier_eleve_classe; Type: TABLE DATA; Schema: cahier_courant; Owner: ent -- INSERT INTO cahier_eleve_classe (id_classe, id_eleve) VALUES (1, 1); INSERT INTO cahier_eleve_classe (id_classe, id_eleve) VALUES (1, 2); INSERT INTO cahier_eleve_classe (id_classe, id_eleve) VALUES (2, 3); INSERT INTO cahier_eleve_classe (id_classe, id_eleve) VALUES (2, 4); INSERT INTO cahier_eleve_classe (id_classe, id_eleve) VALUES (3, 5); INSERT INTO cahier_eleve_classe (id_classe, id_eleve) VALUES (3, 6); INSERT INTO cahier_eleve_classe (id_classe, id_eleve) VALUES (4, 7); INSERT INTO cahier_eleve_classe (id_classe, id_eleve) VALUES (4, 8); INSERT INTO cahier_eleve_classe (id_classe, id_eleve) VALUES (5, 9); INSERT INTO cahier_eleve_classe (id_classe, id_eleve) VALUES (5, 10); INSERT INTO cahier_eleve_classe (id_classe, id_eleve) VALUES (6, 11); INSERT INTO cahier_eleve_classe (id_classe, id_eleve) VALUES (6, 12); INSERT INTO cahier_eleve_classe (id_classe, id_eleve) VALUES (7, 13); INSERT INTO cahier_eleve_classe (id_classe, id_eleve) VALUES (7, 14); INSERT INTO cahier_eleve_classe (id_classe, id_eleve) VALUES (7, 15); INSERT INTO cahier_eleve_classe (id_classe, id_eleve) VALUES (8, 16); INSERT INTO cahier_eleve_classe (id_classe, id_eleve) VALUES (8, 17); INSERT INTO cahier_eleve_classe (id_classe, id_eleve) VALUES (8, 18); INSERT INTO cahier_eleve_classe (id_classe, id_eleve) VALUES (9, 19); INSERT INTO cahier_eleve_classe (id_classe, id_eleve) VALUES (9, 20); INSERT INTO cahier_eleve_classe (id_classe, id_eleve) VALUES (10, 21); INSERT INTO cahier_eleve_classe (id_classe, id_eleve) VALUES (10, 22); INSERT INTO cahier_eleve_classe (id_classe, id_eleve) VALUES (11, 23); INSERT INTO cahier_eleve_classe (id_classe, id_eleve) VALUES (11, 24); INSERT INTO cahier_eleve_classe (id_classe, id_eleve) VALUES (12, 25); INSERT INTO cahier_eleve_classe (id_classe, id_eleve) VALUES (12, 26); INSERT INTO cahier_eleve_classe (id_classe, id_eleve) VALUES (13, 27); INSERT INTO cahier_eleve_classe (id_classe, id_eleve) VALUES (13, 28); INSERT INTO cahier_eleve_classe (id_classe, id_eleve) VALUES (14, 29); INSERT INTO cahier_eleve_classe (id_classe, id_eleve) VALUES (14, 30); INSERT INTO cahier_eleve_classe (id_classe, id_eleve) VALUES (15, 31); INSERT INTO cahier_eleve_classe (id_classe, id_eleve) VALUES (15, 32); INSERT INTO cahier_eleve_classe (id_classe, id_eleve) VALUES (15, 33); INSERT INTO cahier_eleve_classe (id_classe, id_eleve) VALUES (16, 34); INSERT INTO cahier_eleve_classe (id_classe, id_eleve) VALUES (16, 35); INSERT INTO cahier_eleve_classe (id_classe, id_eleve) VALUES (16, 36); -- -- Data for Name: cahier_eleve_groupe; Type: TABLE DATA; Schema: cahier_courant; Owner: ent -- INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (19, 10); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (19, 11); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (20, 12); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (20, 10); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (21, 10); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (21, 11); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (22, 12); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (22, 10); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (25, 13); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (26, 13); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (27, 13); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (28, 14); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (29, 14); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (30, 14); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (31, 15); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (31, 16); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (32, 17); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (32, 16); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (33, 15); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (33, 16); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (34, 17); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (34, 18); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (35, 15); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (35, 18); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (36, 17); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (36, 18); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (1, 1); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (1, 2); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (2, 3); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (2, 1); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (3, 1); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (3, 2); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (4, 3); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (4, 1); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (7, 22); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (7, 4); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (8, 4); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (9, 4); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (10, 5); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (11, 5); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (12, 5); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (13, 6); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (13, 7); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (14, 6); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (14, 8); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (15, 6); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (15, 7); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (16, 9); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (16, 8); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (17, 9); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (17, 7); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (18, 9); INSERT INTO cahier_eleve_groupe (id_eleve, id_groupe) VALUES (18, 8); -- -- Data for Name: cahier_emploi; Type: TABLE DATA; Schema: cahier_courant; Owner: ent -- INSERT INTO cahier_emploi (id, jour, type_semaine, heure_debut, heure_fin, minute_debut, minute_fin, id_enseignant, id_classe, id_groupe, id_enseignement, id_etablissement, description, couleur_case, code_salle, id_periode_emploi) VALUES (1, 'MARDI', '1', 10, 11, 0, 0, 6, 4, NULL, 2, 2, 'test1', '#5484ED', 'test2', 1); INSERT INTO cahier_emploi (id, jour, type_semaine, heure_debut, heure_fin, minute_debut, minute_fin, id_enseignant, id_classe, id_groupe, id_enseignement, id_etablissement, description, couleur_case, code_salle, id_periode_emploi) VALUES (2, 'JEUDI', '1', 10, 14, 37, 39, 6, 6, NULL, 2, 2, 'test2', '#FF887C', 'test2', 1); INSERT INTO cahier_emploi (id, jour, type_semaine, heure_debut, heure_fin, minute_debut, minute_fin, id_enseignant, id_classe, id_groupe, id_enseignement, id_etablissement, description, couleur_case, code_salle, id_periode_emploi) VALUES (3, 'LUNDI', '1', 9, 10, 2, 0, 6, 4, NULL, 2, 2, 'test1', '#5484ED', 'test2', 2); INSERT INTO cahier_emploi (id, jour, type_semaine, heure_debut, heure_fin, minute_debut, minute_fin, id_enseignant, id_classe, id_groupe, id_enseignement, id_etablissement, description, couleur_case, code_salle, id_periode_emploi) VALUES (4, 'MERCREDI', '1', 9, 13, 2, 2, 6, 4, NULL, 2, 2, 'test1', '#FF887C', 'test2', 2); INSERT INTO cahier_emploi (id, jour, type_semaine, heure_debut, heure_fin, minute_debut, minute_fin, id_enseignant, id_classe, id_groupe, id_enseignement, id_etablissement, description, couleur_case, code_salle, id_periode_emploi) VALUES (5, 'MARDI', '1', 11, 12, 0, 0, 6, 6, NULL, 2, 2, 'testc1', '#DC2127', 'testc1', 2); INSERT INTO cahier_emploi (id, jour, type_semaine, heure_debut, heure_fin, minute_debut, minute_fin, id_enseignant, id_classe, id_groupe, id_enseignement, id_etablissement, description, couleur_case, code_salle, id_periode_emploi) VALUES (6, 'JEUDI', '1', 10, 11, 0, 3, 6, 6, NULL, 2, 2, 'testc2', '#E1E1E1', 'testc2', 2); INSERT INTO cahier_emploi (id, jour, type_semaine, heure_debut, heure_fin, minute_debut, minute_fin, id_enseignant, id_classe, id_groupe, id_enseignement, id_etablissement, description, couleur_case, code_salle, id_periode_emploi) VALUES (7, 'MERCREDI', '1', 9, 10, 0, 0, 6, 5, NULL, 2, 2, 'desc 1', '#FBD75B', 'salle 1', 1); INSERT INTO cahier_emploi (id, jour, type_semaine, heure_debut, heure_fin, minute_debut, minute_fin, id_enseignant, id_classe, id_groupe, id_enseignement, id_etablissement, description, couleur_case, code_salle, id_periode_emploi) VALUES (8, 'LUNDI', '1', 11, 12, 0, 0, 6, 5, NULL, 2, 2, 'test 2', '#DC2127', 'salle 2', 1); INSERT INTO cahier_emploi (id, jour, type_semaine, heure_debut, heure_fin, minute_debut, minute_fin, id_enseignant, id_classe, id_groupe, id_enseignement, id_etablissement, description, couleur_case, code_salle, id_periode_emploi) VALUES (9, 'MARDI', '1', 10, 11, 0, 0, 6, 4, NULL, 2, 2, 'Essai', '#7AE7BF', 'F43-A', 2); INSERT INTO cahier_emploi (id, jour, type_semaine, heure_debut, heure_fin, minute_debut, minute_fin, id_enseignant, id_classe, id_groupe, id_enseignement, id_etablissement, description, couleur_case, code_salle, id_periode_emploi) VALUES (10, 'LUNDI', '1', 13, 15, 45, 45, 5, 7, NULL, 4, 3, 'Leçon', '#51B749', 'B13', 3); INSERT INTO cahier_emploi (id, jour, type_semaine, heure_debut, heure_fin, minute_debut, minute_fin, id_enseignant, id_classe, id_groupe, id_enseignement, id_etablissement, description, couleur_case, code_salle, id_periode_emploi) VALUES (12, 'MARDI', '1', 11, 12, 15, 15, 5, 7, NULL, 4, 3, 'Leçon', '#51B749', 'B13', 3); INSERT INTO cahier_emploi (id, jour, type_semaine, heure_debut, heure_fin, minute_debut, minute_fin, id_enseignant, id_classe, id_groupe, id_enseignement, id_etablissement, description, couleur_case, code_salle, id_periode_emploi) VALUES (11, 'JEUDI', '1', 9, 11, 0, 0, 5, 7, NULL, 4, 3, 'TD', '#51B749', 'TD25', 3); INSERT INTO cahier_emploi (id, jour, type_semaine, heure_debut, heure_fin, minute_debut, minute_fin, id_enseignant, id_classe, id_groupe, id_enseignement, id_etablissement, description, couleur_case, code_salle, id_periode_emploi) VALUES (13, 'LUNDI', '1', 9, 11, 0, 0, 11, 7, NULL, 2, 3, 'Cours', '#5484ED', 'A17', 4); INSERT INTO cahier_emploi (id, jour, type_semaine, heure_debut, heure_fin, minute_debut, minute_fin, id_enseignant, id_classe, id_groupe, id_enseignement, id_etablissement, description, couleur_case, code_salle, id_periode_emploi) VALUES (15, 'MARDI', '1', 9, 11, 0, 0, 11, 7, NULL, 2, 3, 'Cours', '#5484ED', 'H12', 4); INSERT INTO cahier_emploi (id, jour, type_semaine, heure_debut, heure_fin, minute_debut, minute_fin, id_enseignant, id_classe, id_groupe, id_enseignement, id_etablissement, description, couleur_case, code_salle, id_periode_emploi) VALUES (19, 'LUNDI', '1', 11, 12, 15, 15, 12, 7, NULL, 8, 3, 'Cours', '#FBD75B', 'D9', 5); INSERT INTO cahier_emploi (id, jour, type_semaine, heure_debut, heure_fin, minute_debut, minute_fin, id_enseignant, id_classe, id_groupe, id_enseignement, id_etablissement, description, couleur_case, code_salle, id_periode_emploi) VALUES (20, 'VENDREDI', '1', 9, 11, 0, 0, 12, 7, NULL, 8, 3, 'Cours', '#FBD75B', 'C1', 5); INSERT INTO cahier_emploi (id, jour, type_semaine, heure_debut, heure_fin, minute_debut, minute_fin, id_enseignant, id_classe, id_groupe, id_enseignement, id_etablissement, description, couleur_case, code_salle, id_periode_emploi) VALUES (23, 'LUNDI', '1', 9, 11, 0, 0, 12, 8, NULL, 8, 3, 'Cours', '#FFB878', '', 5); INSERT INTO cahier_emploi (id, jour, type_semaine, heure_debut, heure_fin, minute_debut, minute_fin, id_enseignant, id_classe, id_groupe, id_enseignement, id_etablissement, description, couleur_case, code_salle, id_periode_emploi) VALUES (24, 'LUNDI', '1', 13, 14, 45, 45, 12, 8, NULL, 8, 3, 'TD', '#FFB878', 'A1', 5); INSERT INTO cahier_emploi (id, jour, type_semaine, heure_debut, heure_fin, minute_debut, minute_fin, id_enseignant, id_classe, id_groupe, id_enseignement, id_etablissement, description, couleur_case, code_salle, id_periode_emploi) VALUES (25, 'LUNDI', '1', 14, 17, 45, 0, 12, 8, NULL, 8, 3, 'TD', '#FFB878', 'C5', 5); INSERT INTO cahier_emploi (id, jour, type_semaine, heure_debut, heure_fin, minute_debut, minute_fin, id_enseignant, id_classe, id_groupe, id_enseignement, id_etablissement, description, couleur_case, code_salle, id_periode_emploi) VALUES (27, 'JEUDI', '1', 10, 11, 0, 0, 12, 8, NULL, 8, 3, 'TD', '#FFB878', 'A4', 5); INSERT INTO cahier_emploi (id, jour, type_semaine, heure_debut, heure_fin, minute_debut, minute_fin, id_enseignant, id_classe, id_groupe, id_enseignement, id_etablissement, description, couleur_case, code_salle, id_periode_emploi) VALUES (26, 'MARDI', '1', 11, 12, 15, 15, 12, 8, NULL, 8, 3, 'TD', '#FFB878', 'A4', 5); INSERT INTO cahier_emploi (id, jour, type_semaine, heure_debut, heure_fin, minute_debut, minute_fin, id_enseignant, id_classe, id_groupe, id_enseignement, id_etablissement, description, couleur_case, code_salle, id_periode_emploi) VALUES (22, 'VENDREDI', '1', 16, 17, 0, 0, 12, NULL, 8, 8, 3, 'TD', '#FF887C', 'C3', 5); INSERT INTO cahier_emploi (id, jour, type_semaine, heure_debut, heure_fin, minute_debut, minute_fin, id_enseignant, id_classe, id_groupe, id_enseignement, id_etablissement, description, couleur_case, code_salle, id_periode_emploi) VALUES (21, 'MARDI', '1', 16, 17, 0, 0, 12, NULL, 7, 8, 3, 'TD', '#FF887C', 'H7', 5); INSERT INTO cahier_emploi (id, jour, type_semaine, heure_debut, heure_fin, minute_debut, minute_fin, id_enseignant, id_classe, id_groupe, id_enseignement, id_etablissement, description, couleur_case, code_salle, id_periode_emploi) VALUES (28, 'LUNDI', '1', 16, 17, 0, 0, 10, 7, NULL, 9, 3, 'TD', '#DBADFF', 'A6', 6); INSERT INTO cahier_emploi (id, jour, type_semaine, heure_debut, heure_fin, minute_debut, minute_fin, id_enseignant, id_classe, id_groupe, id_enseignement, id_etablissement, description, couleur_case, code_salle, id_periode_emploi) VALUES (29, 'MARDI', '1', 13, 15, 45, 45, 10, 7, NULL, 9, 3, 'Cours', '#DBADFF', 'D10', 6); INSERT INTO cahier_emploi (id, jour, type_semaine, heure_debut, heure_fin, minute_debut, minute_fin, id_enseignant, id_classe, id_groupe, id_enseignement, id_etablissement, description, couleur_case, code_salle, id_periode_emploi) VALUES (30, 'JEUDI', '1', 11, 12, 15, 15, 10, NULL, 6, 9, 3, 'TD', '#DBADFF', 'A9', 6); INSERT INTO cahier_emploi (id, jour, type_semaine, heure_debut, heure_fin, minute_debut, minute_fin, id_enseignant, id_classe, id_groupe, id_enseignement, id_etablissement, description, couleur_case, code_salle, id_periode_emploi) VALUES (31, 'VENDREDI', '1', 13, 14, 45, 45, 10, NULL, 9, 9, 3, 'TD', '#DBADFF', 'C5', 6); INSERT INTO cahier_emploi (id, jour, type_semaine, heure_debut, heure_fin, minute_debut, minute_fin, id_enseignant, id_classe, id_groupe, id_enseignement, id_etablissement, description, couleur_case, code_salle, id_periode_emploi) VALUES (32, 'LUNDI', '1', 9, 11, 0, 0, 10, 8, NULL, 9, 3, 'Cours', '#7AE7BF', 'C3', 6); INSERT INTO cahier_emploi (id, jour, type_semaine, heure_debut, heure_fin, minute_debut, minute_fin, id_enseignant, id_classe, id_groupe, id_enseignement, id_etablissement, description, couleur_case, code_salle, id_periode_emploi) VALUES (33, 'MARDI', '1', 11, 12, 15, 15, 10, 8, NULL, 9, 3, 'TD', '#7AE7BF', 'C5', 6); INSERT INTO cahier_emploi (id, jour, type_semaine, heure_debut, heure_fin, minute_debut, minute_fin, id_enseignant, id_classe, id_groupe, id_enseignement, id_etablissement, description, couleur_case, code_salle, id_periode_emploi) VALUES (34, 'JEUDI', '1', 10, 11, 0, 0, 10, 8, NULL, 9, 3, 'TD', '#DBADFF', 'C6', 6); INSERT INTO cahier_emploi (id, jour, type_semaine, heure_debut, heure_fin, minute_debut, minute_fin, id_enseignant, id_classe, id_groupe, id_enseignement, id_etablissement, description, couleur_case, code_salle, id_periode_emploi) VALUES (35, 'JEUDI', '1', 13, 16, 45, 0, 11, 7, NULL, 2, 3, 'Cours', '#5484ED', 'A2', 4); INSERT INTO cahier_emploi (id, jour, type_semaine, heure_debut, heure_fin, minute_debut, minute_fin, id_enseignant, id_classe, id_groupe, id_enseignement, id_etablissement, description, couleur_case, code_salle, id_periode_emploi) VALUES (36, 'VENDREDI', '1', 11, 12, 15, 15, 13, NULL, 7, 2, 3, 'TD', '#5484ED', 'A3', 7); INSERT INTO cahier_emploi (id, jour, type_semaine, heure_debut, heure_fin, minute_debut, minute_fin, id_enseignant, id_classe, id_groupe, id_enseignement, id_etablissement, description, couleur_case, code_salle, id_periode_emploi) VALUES (18, 'VENDREDI', '1', 11, 12, 15, 15, 11, NULL, 8, 2, 3, 'TD', '#A4BDFC', 'F13', 4); INSERT INTO cahier_emploi (id, jour, type_semaine, heure_debut, heure_fin, minute_debut, minute_fin, id_enseignant, id_classe, id_groupe, id_enseignement, id_etablissement, description, couleur_case, code_salle, id_periode_emploi) VALUES (14, 'LUNDI', '1', 13, 15, 45, 45, 11, 8, NULL, 2, 3, 'Cours', '#FBD75B', '', 4); INSERT INTO cahier_emploi (id, jour, type_semaine, heure_debut, heure_fin, minute_debut, minute_fin, id_enseignant, id_classe, id_groupe, id_enseignement, id_etablissement, description, couleur_case, code_salle, id_periode_emploi) VALUES (16, 'MARDI', '1', 14, 17, 45, 0, 11, 8, NULL, 2, 3, 'Cours', '#FBD75B', 'H12', 4); -- -- Data for Name: cahier_enseignant; Type: TABLE DATA; Schema: cahier_courant; Owner: ent -- INSERT INTO cahier_enseignant (id, nom, prenom, uid, civilite, depot_stockage) VALUES (14, 'Payet', 'Armelle', 'z130002o', 'M.', NULL); INSERT INTO cahier_enseignant (id, nom, prenom, uid, civilite, depot_stockage) VALUES (15, 'Berger', 'Aglae', 'z130002q', 'M.', NULL); INSERT INTO cahier_enseignant (id, nom, prenom, uid, civilite, depot_stockage) VALUES (16, 'Guyot', 'Ambroise', 'z130002r', 'M.', NULL); INSERT INTO cahier_enseignant (id, nom, prenom, uid, civilite, depot_stockage) VALUES (17, 'Maillard', 'Auguste', 'z130002s', 'M.', NULL); INSERT INTO cahier_enseignant (id, nom, prenom, uid, civilite, depot_stockage) VALUES (18, 'Rey', 'Leonce', 'z130002t', 'M.', NULL); INSERT INTO cahier_enseignant (id, nom, prenom, uid, civilite, depot_stockage) VALUES (19, 'Lacroix', 'Alban', 'z130002u', 'M.', NULL); INSERT INTO cahier_enseignant (id, nom, prenom, uid, civilite, depot_stockage) VALUES (20, 'Trolles', 'Theo', 'z130002v', 'M.', NULL); INSERT INTO cahier_enseignant (id, nom, prenom, uid, civilite, depot_stockage) VALUES (21, 'Bailly', 'James', 'z130002w', 'M.', NULL); INSERT INTO cahier_enseignant (id, nom, prenom, uid, civilite, depot_stockage) VALUES (22, 'Millets', 'Amandine', 'z130002x', 'M.', NULL); INSERT INTO cahier_enseignant (id, nom, prenom, uid, civilite, depot_stockage) VALUES (23, 'Hubert', 'Daniel', 'z130002y', 'M.', NULL); INSERT INTO cahier_enseignant (id, nom, prenom, uid, civilite, depot_stockage) VALUES (24, 'Fleury', 'Adam', 'z130002z', 'M.', NULL); INSERT INTO cahier_enseignant (id, nom, prenom, uid, civilite, depot_stockage) VALUES (25, 'Collet', 'Marc', 'z1300030', 'M.', NULL); INSERT INTO cahier_enseignant (id, nom, prenom, uid, civilite, depot_stockage) VALUES (26, 'Chauvin', 'Sophie', 'z1300031', 'M.', NULL); INSERT INTO cahier_enseignant (id, nom, prenom, uid, civilite, depot_stockage) VALUES (1, 'Lines', 'Michael', 'z1300014', 'M.', NULL); INSERT INTO cahier_enseignant (id, nom, prenom, uid, civilite, depot_stockage) VALUES (2, 'Covent', 'Alexandra', 'z1300016', 'M.', NULL); INSERT INTO cahier_enseignant (id, nom, prenom, uid, civilite, depot_stockage) VALUES (3, 'Perconte', 'Emilie', 'z1300017', 'M.', NULL); INSERT INTO cahier_enseignant (id, nom, prenom, uid, civilite, depot_stockage) VALUES (4, 'Nassier', 'Nicolas', 'z1300018', 'M.', NULL); INSERT INTO cahier_enseignant (id, nom, prenom, uid, civilite, depot_stockage) VALUES (5, 'Ressagat', 'Yves', 'z1300019', 'M.', NULL); INSERT INTO cahier_enseignant (id, nom, prenom, uid, civilite, depot_stockage) VALUES (6, 'Batiman', 'Francois', 'z130001a', 'M.', NULL); INSERT INTO cahier_enseignant (id, nom, prenom, uid, civilite, depot_stockage) VALUES (7, 'Trolet', 'Marc', 'z130001b', 'M.', NULL); INSERT INTO cahier_enseignant (id, nom, prenom, uid, civilite, depot_stockage) VALUES (8, 'Berenguer', 'Jean', 'z130001c', 'M.', NULL); INSERT INTO cahier_enseignant (id, nom, prenom, uid, civilite, depot_stockage) VALUES (9, 'PETIT', 'KARINE', 'z130001d', 'M.', NULL); INSERT INTO cahier_enseignant (id, nom, prenom, uid, civilite, depot_stockage) VALUES (10, 'Boyer', 'Philippe', 'z130001e', 'M.', NULL); INSERT INTO cahier_enseignant (id, nom, prenom, uid, civilite, depot_stockage) VALUES (11, 'JOLLY', 'CELINE', 'z130001f', 'M.', NULL); INSERT INTO cahier_enseignant (id, nom, prenom, uid, civilite, depot_stockage) VALUES (12, 'BERTHELOT', 'THIERRY', 'z130001g', 'M.', NULL); INSERT INTO cahier_enseignant (id, nom, prenom, uid, civilite, depot_stockage) VALUES (13, 'SAGEAUX', 'ANNIE JEAN', 'z130001h', 'M.', NULL); -- -- Data for Name: cahier_enseignant_classe; Type: TABLE DATA; Schema: cahier_courant; Owner: ent -- INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (14, 9); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (15, 11); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (16, 10); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (16, 9); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (16, 11); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (17, 10); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (17, 9); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (17, 11); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (18, 10); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (1, 1); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (18, 9); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (18, 11); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (19, 13); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (19, 14); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (19, 12); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (20, 13); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (20, 14); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (20, 12); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (21, 13); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (21, 14); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (21, 12); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (22, 13); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (22, 14); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (22, 12); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (23, 15); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (23, 16); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (24, 15); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (24, 16); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (2, 3); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (3, 2); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (3, 1); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (3, 3); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (4, 2); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (4, 1); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (4, 3); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (5, 7); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (5, 2); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (5, 1); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (5, 3); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (6, 4); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (6, 6); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (6, 5); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (7, 4); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (7, 6); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (7, 5); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (8, 4); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (8, 6); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (8, 5); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (9, 4); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (9, 6); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (9, 5); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (10, 7); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (10, 8); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (11, 7); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (11, 8); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (12, 7); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (12, 8); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (13, 7); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (13, 8); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (25, 15); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (25, 16); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (26, 15); INSERT INTO cahier_enseignant_classe (id_enseignant, id_classe) VALUES (26, 16); -- -- Data for Name: cahier_enseignant_enseignement; Type: TABLE DATA; Schema: cahier_courant; Owner: ent -- INSERT INTO cahier_enseignant_enseignement (id_enseignement, id_enseignant, id_etablissement) VALUES (1, 1, 1); INSERT INTO cahier_enseignant_enseignement (id_enseignement, id_enseignant, id_etablissement) VALUES (2, 3, 1); INSERT INTO cahier_enseignant_enseignement (id_enseignement, id_enseignant, id_etablissement) VALUES (3, 4, 2); INSERT INTO cahier_enseignant_enseignement (id_enseignement, id_enseignant, id_etablissement) VALUES (2, 4, 2); INSERT INTO cahier_enseignant_enseignement (id_enseignement, id_enseignant, id_etablissement) VALUES (4, 5, 1); INSERT INTO cahier_enseignant_enseignement (id_enseignement, id_enseignant, id_etablissement) VALUES (4, 5, 3); INSERT INTO cahier_enseignant_enseignement (id_enseignement, id_enseignant, id_etablissement) VALUES (2, 6, 2); INSERT INTO cahier_enseignant_enseignement (id_enseignement, id_enseignant, id_etablissement) VALUES (5, 7, 2); INSERT INTO cahier_enseignant_enseignement (id_enseignement, id_enseignant, id_etablissement) VALUES (6, 7, 2); INSERT INTO cahier_enseignant_enseignement (id_enseignement, id_enseignant, id_etablissement) VALUES (7, 8, 2); INSERT INTO cahier_enseignant_enseignement (id_enseignement, id_enseignant, id_etablissement) VALUES (8, 8, 2); INSERT INTO cahier_enseignant_enseignement (id_enseignement, id_enseignant, id_etablissement) VALUES (9, 9, 2); INSERT INTO cahier_enseignant_enseignement (id_enseignement, id_enseignant, id_etablissement) VALUES (10, 10, 3); INSERT INTO cahier_enseignant_enseignement (id_enseignement, id_enseignant, id_etablissement) VALUES (9, 10, 3); INSERT INTO cahier_enseignant_enseignement (id_enseignement, id_enseignant, id_etablissement) VALUES (2, 11, 3); INSERT INTO cahier_enseignant_enseignement (id_enseignement, id_enseignant, id_etablissement) VALUES (8, 12, 3); INSERT INTO cahier_enseignant_enseignement (id_enseignement, id_enseignant, id_etablissement) VALUES (2, 13, 3); INSERT INTO cahier_enseignant_enseignement (id_enseignement, id_enseignant, id_etablissement) VALUES (1, 14, 4); INSERT INTO cahier_enseignant_enseignement (id_enseignement, id_enseignant, id_etablissement) VALUES (2, 16, 4); INSERT INTO cahier_enseignant_enseignement (id_enseignement, id_enseignant, id_etablissement) VALUES (3, 17, 5); INSERT INTO cahier_enseignant_enseignement (id_enseignement, id_enseignant, id_etablissement) VALUES (2, 17, 5); INSERT INTO cahier_enseignant_enseignement (id_enseignement, id_enseignant, id_etablissement) VALUES (4, 18, 5); INSERT INTO cahier_enseignant_enseignement (id_enseignement, id_enseignant, id_etablissement) VALUES (2, 19, 5); INSERT INTO cahier_enseignant_enseignement (id_enseignement, id_enseignant, id_etablissement) VALUES (6, 20, 5); INSERT INTO cahier_enseignant_enseignement (id_enseignement, id_enseignant, id_etablissement) VALUES (5, 20, 5); INSERT INTO cahier_enseignant_enseignement (id_enseignement, id_enseignant, id_etablissement) VALUES (8, 21, 5); INSERT INTO cahier_enseignant_enseignement (id_enseignement, id_enseignant, id_etablissement) VALUES (7, 21, 5); INSERT INTO cahier_enseignant_enseignement (id_enseignement, id_enseignant, id_etablissement) VALUES (9, 22, 5); INSERT INTO cahier_enseignant_enseignement (id_enseignement, id_enseignant, id_etablissement) VALUES (10, 23, 6); INSERT INTO cahier_enseignant_enseignement (id_enseignement, id_enseignant, id_etablissement) VALUES (9, 23, 6); INSERT INTO cahier_enseignant_enseignement (id_enseignement, id_enseignant, id_etablissement) VALUES (2, 24, 6); INSERT INTO cahier_enseignant_enseignement (id_enseignement, id_enseignant, id_etablissement) VALUES (8, 25, 6); INSERT INTO cahier_enseignant_enseignement (id_enseignement, id_enseignant, id_etablissement) VALUES (2, 26, 6); -- -- Data for Name: cahier_enseignant_groupe; Type: TABLE DATA; Schema: cahier_courant; Owner: ent -- INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (2, 3); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (2, 1); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (2, 2); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (3, 1); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (3, 2); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (15, 12); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (15, 10); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (15, 11); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (16, 10); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (16, 11); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (17, 12); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (17, 11); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (18, 12); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (18, 11); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (20, 14); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (20, 13); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (21, 14); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (21, 13); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (22, 14); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (22, 13); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (23, 18); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (23, 16); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (24, 15); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (24, 17); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (25, 15); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (25, 17); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (26, 15); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (4, 3); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (4, 2); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (5, 3); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (5, 2); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (5, 20); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (6, 19); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (7, 22); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (7, 4); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (7, 5); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (8, 4); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (8, 5); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (9, 4); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (9, 5); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (10, 9); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (10, 6); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (10, 20); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (11, 8); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (11, 7); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (11, 20); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (11, 21); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (12, 8); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (12, 7); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (12, 20); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (13, 8); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (13, 7); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (13, 20); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (13, 21); INSERT INTO cahier_enseignant_groupe (id_enseignant, id_groupe) VALUES (26, 17); -- -- Data for Name: cahier_enseignement; Type: TABLE DATA; Schema: cahier_courant; Owner: ent -- INSERT INTO cahier_enseignement (id, code, designation) VALUES (1, '1', 'CHIMIE'); INSERT INTO cahier_enseignement (id, code, designation) VALUES (2, '2', 'MATHEMATIQUES'); INSERT INTO cahier_enseignement (id, code, designation) VALUES (3, '3', 'INFORMATIQUE'); INSERT INTO cahier_enseignement (id, code, designation) VALUES (4, '4', 'SCIENCES DE LA VIE ET DE LA TERRE'); INSERT INTO cahier_enseignement (id, code, designation) VALUES (5, '5', 'SCIENCES PHYSIQUES'); INSERT INTO cahier_enseignement (id, code, designation) VALUES (6, '6', 'PHYSIQUE'); INSERT INTO cahier_enseignement (id, code, designation) VALUES (7, '7', 'EDUCATION CIVIQUE JURIDIQUE ET SOCIALE'); INSERT INTO cahier_enseignement (id, code, designation) VALUES (8, '8', 'HISTOIRE ET GEOGRAPHIE'); INSERT INTO cahier_enseignement (id, code, designation) VALUES (9, '9', 'ANGLAIS LV1'); INSERT INTO cahier_enseignement (id, code, designation) VALUES (10, '10', 'ANGLAIS LV2'); -- -- Data for Name: cahier_etab_eleve; Type: TABLE DATA; Schema: cahier_courant; Owner: ent -- INSERT INTO cahier_etab_eleve (id_eleve, id_etablissement) VALUES (1, 1); INSERT INTO cahier_etab_eleve (id_eleve, id_etablissement) VALUES (2, 1); INSERT INTO cahier_etab_eleve (id_eleve, id_etablissement) VALUES (3, 1); INSERT INTO cahier_etab_eleve (id_eleve, id_etablissement) VALUES (4, 1); INSERT INTO cahier_etab_eleve (id_eleve, id_etablissement) VALUES (5, 1); INSERT INTO cahier_etab_eleve (id_eleve, id_etablissement) VALUES (6, 1); INSERT INTO cahier_etab_eleve (id_eleve, id_etablissement) VALUES (7, 2); INSERT INTO cahier_etab_eleve (id_eleve, id_etablissement) VALUES (8, 2); INSERT INTO cahier_etab_eleve (id_eleve, id_etablissement) VALUES (9, 2); INSERT INTO cahier_etab_eleve (id_eleve, id_etablissement) VALUES (10, 2); INSERT INTO cahier_etab_eleve (id_eleve, id_etablissement) VALUES (11, 2); INSERT INTO cahier_etab_eleve (id_eleve, id_etablissement) VALUES (12, 2); INSERT INTO cahier_etab_eleve (id_eleve, id_etablissement) VALUES (13, 3); INSERT INTO cahier_etab_eleve (id_eleve, id_etablissement) VALUES (14, 3); INSERT INTO cahier_etab_eleve (id_eleve, id_etablissement) VALUES (15, 3); INSERT INTO cahier_etab_eleve (id_eleve, id_etablissement) VALUES (16, 3); INSERT INTO cahier_etab_eleve (id_eleve, id_etablissement) VALUES (17, 3); INSERT INTO cahier_etab_eleve (id_eleve, id_etablissement) VALUES (18, 3); INSERT INTO cahier_etab_eleve (id_eleve, id_etablissement) VALUES (19, 4); INSERT INTO cahier_etab_eleve (id_eleve, id_etablissement) VALUES (20, 4); INSERT INTO cahier_etab_eleve (id_eleve, id_etablissement) VALUES (21, 4); INSERT INTO cahier_etab_eleve (id_eleve, id_etablissement) VALUES (22, 4); INSERT INTO cahier_etab_eleve (id_eleve, id_etablissement) VALUES (23, 4); INSERT INTO cahier_etab_eleve (id_eleve, id_etablissement) VALUES (24, 4); INSERT INTO cahier_etab_eleve (id_eleve, id_etablissement) VALUES (25, 5); INSERT INTO cahier_etab_eleve (id_eleve, id_etablissement) VALUES (26, 5); INSERT INTO cahier_etab_eleve (id_eleve, id_etablissement) VALUES (27, 5); INSERT INTO cahier_etab_eleve (id_eleve, id_etablissement) VALUES (28, 5); INSERT INTO cahier_etab_eleve (id_eleve, id_etablissement) VALUES (29, 5); INSERT INTO cahier_etab_eleve (id_eleve, id_etablissement) VALUES (30, 5); INSERT INTO cahier_etab_eleve (id_eleve, id_etablissement) VALUES (31, 6); INSERT INTO cahier_etab_eleve (id_eleve, id_etablissement) VALUES (32, 6); INSERT INTO cahier_etab_eleve (id_eleve, id_etablissement) VALUES (33, 6); INSERT INTO cahier_etab_eleve (id_eleve, id_etablissement) VALUES (34, 6); INSERT INTO cahier_etab_eleve (id_eleve, id_etablissement) VALUES (35, 6); INSERT INTO cahier_etab_eleve (id_eleve, id_etablissement) VALUES (36, 6); -- -- Data for Name: cahier_etab_enseignant; Type: TABLE DATA; Schema: cahier_courant; Owner: ent -- INSERT INTO cahier_etab_enseignant (id_enseignant, id_etablissement, saisie_simplifiee) VALUES (1, 1, NULL); INSERT INTO cahier_etab_enseignant (id_enseignant, id_etablissement, saisie_simplifiee) VALUES (2, 1, NULL); INSERT INTO cahier_etab_enseignant (id_enseignant, id_etablissement, saisie_simplifiee) VALUES (3, 1, NULL); INSERT INTO cahier_etab_enseignant (id_enseignant, id_etablissement, saisie_simplifiee) VALUES (4, 2, NULL); INSERT INTO cahier_etab_enseignant (id_enseignant, id_etablissement, saisie_simplifiee) VALUES (4, 1, NULL); INSERT INTO cahier_etab_enseignant (id_enseignant, id_etablissement, saisie_simplifiee) VALUES (5, 1, NULL); INSERT INTO cahier_etab_enseignant (id_enseignant, id_etablissement, saisie_simplifiee) VALUES (7, 2, NULL); INSERT INTO cahier_etab_enseignant (id_enseignant, id_etablissement, saisie_simplifiee) VALUES (8, 2, NULL); INSERT INTO cahier_etab_enseignant (id_enseignant, id_etablissement, saisie_simplifiee) VALUES (9, 2, NULL); INSERT INTO cahier_etab_enseignant (id_enseignant, id_etablissement, saisie_simplifiee) VALUES (13, 2, NULL); INSERT INTO cahier_etab_enseignant (id_enseignant, id_etablissement, saisie_simplifiee) VALUES (14, 4, NULL); INSERT INTO cahier_etab_enseignant (id_enseignant, id_etablissement, saisie_simplifiee) VALUES (15, 4, NULL); INSERT INTO cahier_etab_enseignant (id_enseignant, id_etablissement, saisie_simplifiee) VALUES (16, 4, NULL); INSERT INTO cahier_etab_enseignant (id_enseignant, id_etablissement, saisie_simplifiee) VALUES (17, 5, NULL); INSERT INTO cahier_etab_enseignant (id_enseignant, id_etablissement, saisie_simplifiee) VALUES (17, 4, NULL); INSERT INTO cahier_etab_enseignant (id_enseignant, id_etablissement, saisie_simplifiee) VALUES (18, 5, NULL); INSERT INTO cahier_etab_enseignant (id_enseignant, id_etablissement, saisie_simplifiee) VALUES (18, 4, NULL); INSERT INTO cahier_etab_enseignant (id_enseignant, id_etablissement, saisie_simplifiee) VALUES (19, 5, NULL); INSERT INTO cahier_etab_enseignant (id_enseignant, id_etablissement, saisie_simplifiee) VALUES (20, 5, NULL); INSERT INTO cahier_etab_enseignant (id_enseignant, id_etablissement, saisie_simplifiee) VALUES (21, 5, NULL); INSERT INTO cahier_etab_enseignant (id_enseignant, id_etablissement, saisie_simplifiee) VALUES (22, 5, NULL); INSERT INTO cahier_etab_enseignant (id_enseignant, id_etablissement, saisie_simplifiee) VALUES (23, 6, NULL); INSERT INTO cahier_etab_enseignant (id_enseignant, id_etablissement, saisie_simplifiee) VALUES (24, 6, NULL); INSERT INTO cahier_etab_enseignant (id_enseignant, id_etablissement, saisie_simplifiee) VALUES (25, 6, NULL); INSERT INTO cahier_etab_enseignant (id_enseignant, id_etablissement, saisie_simplifiee) VALUES (26, 5, NULL); INSERT INTO cahier_etab_enseignant (id_enseignant, id_etablissement, saisie_simplifiee) VALUES (26, 6, NULL); INSERT INTO cahier_etab_enseignant (id_enseignant, id_etablissement, saisie_simplifiee) VALUES (6, 2, true); INSERT INTO cahier_etab_enseignant (id_enseignant, id_etablissement, saisie_simplifiee) VALUES (5, 3, NULL); INSERT INTO cahier_etab_enseignant (id_enseignant, id_etablissement, saisie_simplifiee) VALUES (11, 3, true); INSERT INTO cahier_etab_enseignant (id_enseignant, id_etablissement, saisie_simplifiee) VALUES (12, 3, true); INSERT INTO cahier_etab_enseignant (id_enseignant, id_etablissement, saisie_simplifiee) VALUES (10, 3, true); INSERT INTO cahier_etab_enseignant (id_enseignant, id_etablissement, saisie_simplifiee) VALUES (13, 3, true); -- -- Data for Name: cahier_etablissement; Type: TABLE DATA; Schema: cahier_courant; Owner: ent -- INSERT INTO cahier_etablissement (id, code, designation, horaire_cours, alternance_semaine, jours_ouvres, duree_cours, heure_debut, heure_fin, minute_debut, ouverture, import, date_import, fractionnement) VALUES (1, '22334455667788', 'Marcel Pagnol', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, false, NULL, 1); INSERT INTO cahier_etablissement (id, code, designation, horaire_cours, alternance_semaine, jours_ouvres, duree_cours, heure_debut, heure_fin, minute_debut, ouverture, import, date_import, fractionnement) VALUES (2, '33445566778899', 'Alexandre Dumas', NULL, NULL, NULL, NULL, NULL, NULL, NULL, true, false, NULL, 1); INSERT INTO cahier_etablissement (id, code, designation, horaire_cours, alternance_semaine, jours_ouvres, duree_cours, heure_debut, heure_fin, minute_debut, ouverture, import, date_import, fractionnement) VALUES (4, '66778899112233', 'Jean Moulin', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, false, NULL, 1); INSERT INTO cahier_etablissement (id, code, designation, horaire_cours, alternance_semaine, jours_ouvres, duree_cours, heure_debut, heure_fin, minute_debut, ouverture, import, date_import, fractionnement) VALUES (5, '77889911223344', 'Alphonse Daudet', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, false, NULL, 1); INSERT INTO cahier_etablissement (id, code, designation, horaire_cours, alternance_semaine, jours_ouvres, duree_cours, heure_debut, heure_fin, minute_debut, ouverture, import, date_import, fractionnement) VALUES (6, '88991122334455', 'Pierre de Coubertin', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, false, NULL, 1); INSERT INTO cahier_etablissement (id, code, designation, horaire_cours, alternance_semaine, jours_ouvres, duree_cours, heure_debut, heure_fin, minute_debut, ouverture, import, date_import, fractionnement) VALUES (3, '44556677889911', 'Emile Zola', '9:0#10:0|10:0#11:0|11:15#12:15|13:45#14:45|14:45#15:45|16:0#17:0|', NULL, NULL, 60, 9, 17, 0, true, false, NULL, 1); -- -- Data for Name: cahier_groupe; Type: TABLE DATA; Schema: cahier_courant; Owner: ent -- INSERT INTO cahier_groupe (id, code, designation, id_etablissement, id_annee_scolaire, groupe_collaboratif, nom_long) VALUES (1, 'GRP1', 'TSA', 1, 1, false, NULL); INSERT INTO cahier_groupe (id, code, designation, id_etablissement, id_annee_scolaire, groupe_collaboratif, nom_long) VALUES (2, 'GRP2', 'TSB', 1, 1, false, NULL); INSERT INTO cahier_groupe (id, code, designation, id_etablissement, id_annee_scolaire, groupe_collaboratif, nom_long) VALUES (3, 'GRP3', 'TSC', 1, 1, false, NULL); INSERT INTO cahier_groupe (id, code, designation, id_etablissement, id_annee_scolaire, groupe_collaboratif, nom_long) VALUES (4, 'GRP4', '2A1', 2, 1, false, NULL); INSERT INTO cahier_groupe (id, code, designation, id_etablissement, id_annee_scolaire, groupe_collaboratif, nom_long) VALUES (5, 'GRP5', '2A2', 2, 1, false, NULL); INSERT INTO cahier_groupe (id, code, designation, id_etablissement, id_annee_scolaire, groupe_collaboratif, nom_long) VALUES (6, 'GRP6', '3AGL-A', 3, 1, false, NULL); INSERT INTO cahier_groupe (id, code, designation, id_etablissement, id_annee_scolaire, groupe_collaboratif, nom_long) VALUES (7, 'GRP7', '3A1', 3, 1, false, NULL); INSERT INTO cahier_groupe (id, code, designation, id_etablissement, id_annee_scolaire, groupe_collaboratif, nom_long) VALUES (8, 'GRP8', '3A2', 3, 1, false, NULL); INSERT INTO cahier_groupe (id, code, designation, id_etablissement, id_annee_scolaire, groupe_collaboratif, nom_long) VALUES (9, 'GRP9', '3AGL-B', 3, 1, false, NULL); INSERT INTO cahier_groupe (id, code, designation, id_etablissement, id_annee_scolaire, groupe_collaboratif, nom_long) VALUES (10, 'GRP10', 'TSA', 4, 1, false, NULL); INSERT INTO cahier_groupe (id, code, designation, id_etablissement, id_annee_scolaire, groupe_collaboratif, nom_long) VALUES (11, 'GRP11', 'TSB', 4, 1, false, NULL); INSERT INTO cahier_groupe (id, code, designation, id_etablissement, id_annee_scolaire, groupe_collaboratif, nom_long) VALUES (12, 'GRP12', 'TSC', 4, 1, false, NULL); INSERT INTO cahier_groupe (id, code, designation, id_etablissement, id_annee_scolaire, groupe_collaboratif, nom_long) VALUES (13, 'GRP13', '2A1', 5, 1, false, NULL); INSERT INTO cahier_groupe (id, code, designation, id_etablissement, id_annee_scolaire, groupe_collaboratif, nom_long) VALUES (14, 'GRP14', '2A2', 5, 1, false, NULL); INSERT INTO cahier_groupe (id, code, designation, id_etablissement, id_annee_scolaire, groupe_collaboratif, nom_long) VALUES (15, 'GRP15', '3A1', 6, 1, false, NULL); INSERT INTO cahier_groupe (id, code, designation, id_etablissement, id_annee_scolaire, groupe_collaboratif, nom_long) VALUES (16, 'GRP16', '3AGL-A', 6, 1, false, NULL); INSERT INTO cahier_groupe (id, code, designation, id_etablissement, id_annee_scolaire, groupe_collaboratif, nom_long) VALUES (17, 'GRP17', '3A2', 6, 1, false, NULL); INSERT INTO cahier_groupe (id, code, designation, id_etablissement, id_annee_scolaire, groupe_collaboratif, nom_long) VALUES (18, 'GRP18', '3AGL-B', 6, 1, false, NULL); INSERT INTO cahier_groupe (id, code, designation, id_etablissement, id_annee_scolaire, groupe_collaboratif, nom_long) VALUES (19, 'GRP19', 'bobby_jenkis', 2, 1, true, '33445566778899$bobby_jenkis'); INSERT INTO cahier_groupe (id, code, designation, id_etablissement, id_annee_scolaire, groupe_collaboratif, nom_long) VALUES (20, 'GRP20', 'Profs3eme', 3, 1, true, '44556677889911$Profs3eme'); INSERT INTO cahier_groupe (id, code, designation, id_etablissement, id_annee_scolaire, groupe_collaboratif, nom_long) VALUES (21, 'GRP21', 'ProfsMath', 3, 1, true, '44556677889911$ProfsMath'); INSERT INTO cahier_groupe (id, code, designation, id_etablissement, id_annee_scolaire, groupe_collaboratif, nom_long) VALUES (22, 'GRP22', '2A4', 2, 1, false, NULL); -- -- Data for Name: cahier_groupe_classe; Type: TABLE DATA; Schema: cahier_courant; Owner: ent -- INSERT INTO cahier_groupe_classe (id_groupe, id_classe) VALUES (1, 1); INSERT INTO cahier_groupe_classe (id_groupe, id_classe) VALUES (2, 1); INSERT INTO cahier_groupe_classe (id_groupe, id_classe) VALUES (3, 1); INSERT INTO cahier_groupe_classe (id_groupe, id_classe) VALUES (1, 2); INSERT INTO cahier_groupe_classe (id_groupe, id_classe) VALUES (2, 2); INSERT INTO cahier_groupe_classe (id_groupe, id_classe) VALUES (3, 2); INSERT INTO cahier_groupe_classe (id_groupe, id_classe) VALUES (4, 4); INSERT INTO cahier_groupe_classe (id_groupe, id_classe) VALUES (4, 5); INSERT INTO cahier_groupe_classe (id_groupe, id_classe) VALUES (5, 5); INSERT INTO cahier_groupe_classe (id_groupe, id_classe) VALUES (5, 6); INSERT INTO cahier_groupe_classe (id_groupe, id_classe) VALUES (6, 7); INSERT INTO cahier_groupe_classe (id_groupe, id_classe) VALUES (7, 7); INSERT INTO cahier_groupe_classe (id_groupe, id_classe) VALUES (8, 7); INSERT INTO cahier_groupe_classe (id_groupe, id_classe) VALUES (9, 8); INSERT INTO cahier_groupe_classe (id_groupe, id_classe) VALUES (8, 8); INSERT INTO cahier_groupe_classe (id_groupe, id_classe) VALUES (7, 8); INSERT INTO cahier_groupe_classe (id_groupe, id_classe) VALUES (10, 9); INSERT INTO cahier_groupe_classe (id_groupe, id_classe) VALUES (11, 9); INSERT INTO cahier_groupe_classe (id_groupe, id_classe) VALUES (12, 9); INSERT INTO cahier_groupe_classe (id_groupe, id_classe) VALUES (10, 10); INSERT INTO cahier_groupe_classe (id_groupe, id_classe) VALUES (11, 10); INSERT INTO cahier_groupe_classe (id_groupe, id_classe) VALUES (12, 10); INSERT INTO cahier_groupe_classe (id_groupe, id_classe) VALUES (13, 12); INSERT INTO cahier_groupe_classe (id_groupe, id_classe) VALUES (13, 13); INSERT INTO cahier_groupe_classe (id_groupe, id_classe) VALUES (14, 13); INSERT INTO cahier_groupe_classe (id_groupe, id_classe) VALUES (14, 14); INSERT INTO cahier_groupe_classe (id_groupe, id_classe) VALUES (15, 15); INSERT INTO cahier_groupe_classe (id_groupe, id_classe) VALUES (16, 15); INSERT INTO cahier_groupe_classe (id_groupe, id_classe) VALUES (17, 15); INSERT INTO cahier_groupe_classe (id_groupe, id_classe) VALUES (17, 16); INSERT INTO cahier_groupe_classe (id_groupe, id_classe) VALUES (18, 16); INSERT INTO cahier_groupe_classe (id_groupe, id_classe) VALUES (15, 16); INSERT INTO cahier_groupe_classe (id_groupe, id_classe) VALUES (22, 4); -- -- Data for Name: cahier_inspecteur; Type: TABLE DATA; Schema: cahier_courant; Owner: ent -- INSERT INTO cahier_inspecteur (id, nom, prenom, uid, civilite) VALUES (2, 'Hoarau', 'Jean', 'z1300032', 'M.'); INSERT INTO cahier_inspecteur (id, nom, prenom, uid, civilite) VALUES (1, 'BARTHE', 'Jean', 'z130001i', 'M.'); -- -- Data for Name: cahier_libelle_enseignement; Type: TABLE DATA; Schema: cahier_courant; Owner: ent -- INSERT INTO cahier_libelle_enseignement (id_enseignement, id_etablissement, libelle) VALUES (8, 3, 'HIST.GEO'); INSERT INTO cahier_libelle_enseignement (id_enseignement, id_etablissement, libelle) VALUES (2, 3, 'MATH'); INSERT INTO cahier_libelle_enseignement (id_enseignement, id_etablissement, libelle) VALUES (4, 3, 'SVT'); -- -- Data for Name: cahier_ouverture_inspecteur; Type: TABLE DATA; Schema: cahier_courant; Owner: ent -- INSERT INTO cahier_ouverture_inspecteur (id_etablissement, id_enseignant, id_inspecteur, date_debut, nomdirecteur, uiddirecteur, date_fin) VALUES (3, 12, 1, '2013-09-25', 'Buzan Pascal', 'z1300010', NULL); INSERT INTO cahier_ouverture_inspecteur (id_etablissement, id_enseignant, id_inspecteur, date_debut, nomdirecteur, uiddirecteur, date_fin) VALUES (3, 10, 1, '2013-09-25', 'Buzan Pascal', 'z1300010', NULL); INSERT INTO cahier_ouverture_inspecteur (id_etablissement, id_enseignant, id_inspecteur, date_debut, nomdirecteur, uiddirecteur, date_fin) VALUES (3, 11, 1, '2013-09-25', 'Buzan Pascal', 'z1300010', NULL); -- -- Data for Name: cahier_periode_emploi; Type: TABLE DATA; Schema: cahier_courant; Owner: ent -- INSERT INTO cahier_periode_emploi (id, id_etablissement, id_enseignant, date_debut) VALUES (1, 2, 6, '2013-11-14'); INSERT INTO cahier_periode_emploi (id, id_etablissement, id_enseignant, date_debut) VALUES (2, 2, 6, '2013-09-12'); INSERT INTO cahier_periode_emploi (id, id_etablissement, id_enseignant, date_debut) VALUES (3, 3, 5, '2013-09-09'); INSERT INTO cahier_periode_emploi (id, id_etablissement, id_enseignant, date_debut) VALUES (4, 3, 11, '2013-09-09'); INSERT INTO cahier_periode_emploi (id, id_etablissement, id_enseignant, date_debut) VALUES (5, 3, 12, '2013-09-09'); INSERT INTO cahier_periode_emploi (id, id_etablissement, id_enseignant, date_debut) VALUES (6, 3, 10, '2013-09-09'); INSERT INTO cahier_periode_emploi (id, id_etablissement, id_enseignant, date_debut) VALUES (7, 3, 13, '2013-09-09'); -- -- Data for Name: cahier_piece_jointe; Type: TABLE DATA; Schema: cahier_courant; Owner: ent -- INSERT INTO cahier_piece_jointe (id, code, nom_fichier, uid, chemin) VALUES (1, 'PJ1', 'alfresco_20092013-164846.log', 'z130001a', '/Documents du CTN'); INSERT INTO cahier_piece_jointe (id, code, nom_fichier, uid, chemin) VALUES (2, 'PJ2', 'left_arrow_23092013-92854.png', 'z130001a', '/Documents du CTN'); INSERT INTO cahier_piece_jointe (id, code, nom_fichier, uid, chemin) VALUES (5, 'PJ5', 'cahier_23092013-93417.png', 'z130001a', '/Documents du CTN'); INSERT INTO cahier_piece_jointe (id, code, nom_fichier, uid, chemin) VALUES (6, 'PJ6', 'P1291088_23092013-162448.JPG', 'z130001a', '/Documents du CTN'); INSERT INTO cahier_piece_jointe (id, code, nom_fichier, uid, chemin) VALUES (7, 'PJ7', 'P1291116_23092013-162648.JPG', 'z130001a', '/Documents du CTN'); INSERT INTO cahier_piece_jointe (id, code, nom_fichier, uid, chemin) VALUES (8, 'PJ8', 'P1291132_23092013-163037.JPG', 'z130001a', '/Documents du CTN'); INSERT INTO cahier_piece_jointe (id, code, nom_fichier, uid, chemin) VALUES (4, 'PJ4', 'news_23092013-93258.png', 'z130001a', '/Documents du CTN/sous dossier'); INSERT INTO cahier_piece_jointe (id, code, nom_fichier, uid, chemin) VALUES (3, 'PJ3', 'right_arrow_23092013-92910.png', 'z130001a', '/Documents du CTN/sous dossier'); INSERT INTO cahier_piece_jointe (id, code, nom_fichier, uid, chemin) VALUES (9, 'PJ9', 'Geometrie.doc', 'z130001f', '/Documents du CTN'); INSERT INTO cahier_piece_jointe (id, code, nom_fichier, uid, chemin) VALUES (10, 'PJ10', 'ExercicesGeometrie.ppt', 'z130001f', '/Documents du CTN'); INSERT INTO cahier_piece_jointe (id, code, nom_fichier, uid, chemin) VALUES (11, 'PJ11', 'formules-trigonometriques-08b_24092013-171251.png', 'z130001h', '/Documents du CTN'); INSERT INTO cahier_piece_jointe (id, code, nom_fichier, uid, chemin) VALUES (12, 'PJ12', 'formules-trigonometriques-08b.png', 'z130001h', '/Documents du CTN'); INSERT INTO cahier_piece_jointe (id, code, nom_fichier, uid, chemin) VALUES (13, 'PJ13', 'Trigonometrie.doc', 'z130001f', '/Documents du CTN'); INSERT INTO cahier_piece_jointe (id, code, nom_fichier, uid, chemin) VALUES (14, 'PJ14', 'ExercicesTrigonometrieN2.ppt', 'z130001f', '/Documents du CTN'); INSERT INTO cahier_piece_jointe (id, code, nom_fichier, uid, chemin) VALUES (15, 'PJ15', 'NathanMathematique.ppt', 'z130001f', '/Documents du CTN'); INSERT INTO cahier_piece_jointe (id, code, nom_fichier, uid, chemin) VALUES (16, 'PJ16', 'Trigonometrie.doc', 'z130001h', '/Documents du CTN'); INSERT INTO cahier_piece_jointe (id, code, nom_fichier, uid, chemin) VALUES (17, 'PJ17', 'NathanMathematique.ppt', 'z130001h', '/Documents du CTN'); INSERT INTO cahier_piece_jointe (id, code, nom_fichier, uid, chemin) VALUES (18, 'PJ18', 'ExercicesTrigonometrieN2.ppt', 'z130001h', '/Documents du CTN'); INSERT INTO cahier_piece_jointe (id, code, nom_fichier, uid, chemin) VALUES (19, 'PJ19', 'ExercicesGeometrie.ppt', 'z130001h', '/Documents du CTN'); INSERT INTO cahier_piece_jointe (id, code, nom_fichier, uid, chemin) VALUES (20, 'PJ20', 'formules-trigonometriques-08b.png', 'z130001f', '/Documents du CTN'); -- -- Data for Name: cahier_piece_jointe_cycle_devoir; Type: TABLE DATA; Schema: cahier_courant; Owner: ent -- INSERT INTO cahier_piece_jointe_cycle_devoir (id_piece_jointe, id_cycle_devoir) VALUES (4, 1); INSERT INTO cahier_piece_jointe_cycle_devoir (id_piece_jointe, id_cycle_devoir) VALUES (5, 1); INSERT INTO cahier_piece_jointe_cycle_devoir (id_piece_jointe, id_cycle_devoir) VALUES (6, 3); INSERT INTO cahier_piece_jointe_cycle_devoir (id_piece_jointe, id_cycle_devoir) VALUES (8, 4); INSERT INTO cahier_piece_jointe_cycle_devoir (id_piece_jointe, id_cycle_devoir) VALUES (10, 5); INSERT INTO cahier_piece_jointe_cycle_devoir (id_piece_jointe, id_cycle_devoir) VALUES (13, 8); INSERT INTO cahier_piece_jointe_cycle_devoir (id_piece_jointe, id_cycle_devoir) VALUES (15, 10); INSERT INTO cahier_piece_jointe_cycle_devoir (id_piece_jointe, id_cycle_devoir) VALUES (14, 7); INSERT INTO cahier_piece_jointe_cycle_devoir (id_piece_jointe, id_cycle_devoir) VALUES (17, 11); INSERT INTO cahier_piece_jointe_cycle_devoir (id_piece_jointe, id_cycle_devoir) VALUES (19, 12); -- -- Data for Name: cahier_piece_jointe_cycle_seance; Type: TABLE DATA; Schema: cahier_courant; Owner: ent -- INSERT INTO cahier_piece_jointe_cycle_seance (id_piece_jointe, id_cycle_seance) VALUES (2, 1); INSERT INTO cahier_piece_jointe_cycle_seance (id_piece_jointe, id_cycle_seance) VALUES (3, 1); INSERT INTO cahier_piece_jointe_cycle_seance (id_piece_jointe, id_cycle_seance) VALUES (9, 5); INSERT INTO cahier_piece_jointe_cycle_seance (id_piece_jointe, id_cycle_seance) VALUES (12, 6); INSERT INTO cahier_piece_jointe_cycle_seance (id_piece_jointe, id_cycle_seance) VALUES (13, 9); INSERT INTO cahier_piece_jointe_cycle_seance (id_piece_jointe, id_cycle_seance) VALUES (16, 10); INSERT INTO cahier_piece_jointe_cycle_seance (id_piece_jointe, id_cycle_seance) VALUES (18, 11); -- -- Data for Name: cahier_piece_jointe_devoir; Type: TABLE DATA; Schema: cahier_courant; Owner: ent -- INSERT INTO cahier_piece_jointe_devoir (id_piece_jointe, id_devoir) VALUES (4, 4); INSERT INTO cahier_piece_jointe_devoir (id_piece_jointe, id_devoir) VALUES (5, 4); INSERT INTO cahier_piece_jointe_devoir (id_piece_jointe, id_devoir) VALUES (1, 20); INSERT INTO cahier_piece_jointe_devoir (id_piece_jointe, id_devoir) VALUES (3, 20); INSERT INTO cahier_piece_jointe_devoir (id_piece_jointe, id_devoir) VALUES (7, 20); INSERT INTO cahier_piece_jointe_devoir (id_piece_jointe, id_devoir) VALUES (4, 25); INSERT INTO cahier_piece_jointe_devoir (id_piece_jointe, id_devoir) VALUES (5, 25); INSERT INTO cahier_piece_jointe_devoir (id_piece_jointe, id_devoir) VALUES (13, 27); INSERT INTO cahier_piece_jointe_devoir (id_piece_jointe, id_devoir) VALUES (10, 28); INSERT INTO cahier_piece_jointe_devoir (id_piece_jointe, id_devoir) VALUES (15, 31); INSERT INTO cahier_piece_jointe_devoir (id_piece_jointe, id_devoir) VALUES (13, 35); INSERT INTO cahier_piece_jointe_devoir (id_piece_jointe, id_devoir) VALUES (10, 36); INSERT INTO cahier_piece_jointe_devoir (id_piece_jointe, id_devoir) VALUES (17, 41); INSERT INTO cahier_piece_jointe_devoir (id_piece_jointe, id_devoir) VALUES (19, 42); INSERT INTO cahier_piece_jointe_devoir (id_piece_jointe, id_devoir) VALUES (17, 53); INSERT INTO cahier_piece_jointe_devoir (id_piece_jointe, id_devoir) VALUES (15, 55); INSERT INTO cahier_piece_jointe_devoir (id_piece_jointe, id_devoir) VALUES (14, 56); INSERT INTO cahier_piece_jointe_devoir (id_piece_jointe, id_devoir) VALUES (14, 60); INSERT INTO cahier_piece_jointe_devoir (id_piece_jointe, id_devoir) VALUES (19, 61); -- -- Data for Name: cahier_piece_jointe_seance; Type: TABLE DATA; Schema: cahier_courant; Owner: ent -- INSERT INTO cahier_piece_jointe_seance (id_piece_jointe, id_seance) VALUES (1, 1); INSERT INTO cahier_piece_jointe_seance (id_piece_jointe, id_seance) VALUES (2, 3); INSERT INTO cahier_piece_jointe_seance (id_piece_jointe, id_seance) VALUES (3, 3); INSERT INTO cahier_piece_jointe_seance (id_piece_jointe, id_seance) VALUES (3, 4); INSERT INTO cahier_piece_jointe_seance (id_piece_jointe, id_seance) VALUES (6, 4); INSERT INTO cahier_piece_jointe_seance (id_piece_jointe, id_seance) VALUES (2, 2); INSERT INTO cahier_piece_jointe_seance (id_piece_jointe, id_seance) VALUES (3, 2); INSERT INTO cahier_piece_jointe_seance (id_piece_jointe, id_seance) VALUES (7, 2); INSERT INTO cahier_piece_jointe_seance (id_piece_jointe, id_seance) VALUES (9, 7); INSERT INTO cahier_piece_jointe_seance (id_piece_jointe, id_seance) VALUES (9, 15); INSERT INTO cahier_piece_jointe_seance (id_piece_jointe, id_seance) VALUES (12, 16); INSERT INTO cahier_piece_jointe_seance (id_piece_jointe, id_seance) VALUES (16, 20); INSERT INTO cahier_piece_jointe_seance (id_piece_jointe, id_seance) VALUES (18, 21); INSERT INTO cahier_piece_jointe_seance (id_piece_jointe, id_seance) VALUES (16, 25); INSERT INTO cahier_piece_jointe_seance (id_piece_jointe, id_seance) VALUES (13, 28); INSERT INTO cahier_piece_jointe_seance (id_piece_jointe, id_seance) VALUES (13, 11); INSERT INTO cahier_piece_jointe_seance (id_piece_jointe, id_seance) VALUES (18, 26); INSERT INTO cahier_piece_jointe_seance (id_piece_jointe, id_seance) VALUES (20, 8); -- -- Data for Name: cahier_preferences_utilisateur; Type: TABLE DATA; Schema: cahier_courant; Owner: ent -- -- -- Data for Name: cahier_remplacement; Type: TABLE DATA; Schema: cahier_courant; Owner: ent -- INSERT INTO cahier_remplacement (id, id_etablissement, id_enseignant_absent, id_enseignant_remplacant, date_debut, date_fin) VALUES (1, 3, 11, 13, '2013-10-14 00:00:00', '2013-10-18 00:00:00'); -- -- Data for Name: cahier_seance; Type: TABLE DATA; Schema: cahier_courant; Owner: ent -- INSERT INTO cahier_seance (id, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations, date_maj) VALUES (1, 'SEA1', 'test seance', '2013-09-18', 9, 13, 2, 2, '<p> seance test 1 18/09</p> ', 1, 6, '', '2013-09-20 16:51:31.359'); INSERT INTO cahier_seance (id, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations, date_maj) VALUES (3, 'SEA3', 'seq pédagogique intitulé', '2013-12-04', 9, 10, 0, 0, '<p> seq p&eacute;dagogique description &lt;Latex&gt;7 \epsilon 7777 \not\epsilon 9 \wedge 7 \not\exists 8&lt;/Latex&gt;</p> ', 2, 6, '<p> annotation&nbsp; &lt;Latex&gt;7 \epsilon 7 \not\epsilon 9 \wedge 7 \not\exists 8&lt;/Latex&gt;</p> ', '2013-09-23 09:49:14.327'); INSERT INTO cahier_seance (id, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations, date_maj) VALUES (9, 'SEA9', 'Définition de la tangente', '2013-10-07', 9, 11, 0, 0, '<p> D&eacute;finition de la formule trigonom&eacute;trique du calcul de la tangente :</p> <p> &nbsp;</p> <p> <font color="#000000" face="Arial" size="2"><font color="#ff9900"><strong>La valeur commune</strong></font> des rapports&nbsp;<img align="absMiddle" alt="" height="45" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-10a.png" width="33" /> et&nbsp;<img align="absMiddle" alt="" height="45" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-10b.png" width="31" /> ne d&eacute;pend que de <font color="#ff0000"><strong>la mesure de l&rsquo;angle</strong></font><img align="absMiddle" alt="" height="30" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-08bonus%281%29.png" width="59" /><br /> &nbsp;<br /> On l&rsquo;appelle <font color="#ff9900"><strong>la tangente</strong></font> de <font color="#ff0000"><strong>l&rsquo;angle</strong></font></font><font color="#000000" face="Arial" size="2"><img align="absMiddle" alt="" height="30" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-08bonus%281%29.png" width="59" /><img align="right" alt="" height="150" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-10c.png" width="200" /></font><br /> <font color="#000000" face="Arial" size="2">&nbsp;<br /> &nbsp;<br /> <img alt="" height="64" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-10d.png" width="445" /></font></p> ', 5, 11, '', '2013-09-25 15:06:04.916'); INSERT INTO cahier_seance (id, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations, date_maj) VALUES (10, 'SEA10', 'Exemple du calcul d''angles', '2013-10-08', 9, 11, 0, 0, '<h2> <font color="#000000" face="Arial" size="2"><font color="#ff9900" size="4"><strong>Exemple d&rsquo;application du calcul d&#39;angles</strong></font></font></h2> <p> <font color="#000000" face="Arial" size="2"><em>Exemple&nbsp;:</em><br /> &nbsp;<br /> ABC est un triangle rectangle en A, tel que : AB = 6 cm et&nbsp; AC = 4 cm.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br /> <strong>Calculer l&rsquo;arrondi au degr&eacute; de l&rsquo;angle</strong> <img align="absMiddle" alt="" height="30" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-16a%281%29.png" width="58" /><strong>.</strong><br /> &nbsp;</font></p> <div align="center"> <font color="#000000" face="Arial" size="2"><img alt="" height="152" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-16b.png" width="300" /></font></div> <p> <font color="#000000" face="Arial" size="2">&nbsp;<br /> <em>M&eacute;thode :</em><br /> &nbsp;<br /> &diams; On trace une figure &agrave; main lev&eacute;e.<br /> On repasse en couleur les donn&eacute;es connues et celle cherch&eacute;e.<br /> &diams; Par rapport &agrave; l&rsquo;angle connu, on connait le c&ocirc;t&eacute; adjacent et on cherche la longueur du c&ocirc;t&eacute; oppos&eacute;.<br /> On va utiliser la formule <font color="#ff0000">de la tangente</font>.<br /> &nbsp;<br /> <font color="#0000ff"><strong>Dans le triangle ABC rectangle en B, on a :</strong> <img align="absMiddle" alt="" height="50" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-16c.png" width="126" /></font><br /> <strong><font color="#0000ff">Soit :</font> </strong><img align="absMiddle" alt="" height="50" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-16d.png" width="150" /><br /> <font color="#0000ff"><strong>D&#39;o&ugrave; :</strong></font> <img align="absMiddle" alt="" height="35" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-16e.png" width="155" /><br /> <font color="#0000ff"><strong>&nbsp;<br /> Sur la calculatrice, on lit : 56,30993247</strong></font><br /> &nbsp;<br /> <font color="#0000ff"><strong>Finalement :</strong></font> <img align="absMiddle" alt="" height="35" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-16f.png" width="122" /><br /> &nbsp; </font></p> ', 5, 11, '<p> Faire passer au tableau quelques &eacute;l&egrave;ves pour r&eacute;aliser les illustrations</p> ', '2013-09-25 15:06:04.954'); INSERT INTO cahier_seance (id, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations, date_maj) VALUES (8, 'SEA8', 'Calculatrice pour les angles', '2013-10-03', 13, 16, 45, 0, '<p> Pr&eacute;sentation de la calculatrice.</p> <p> Attention au mode de calcul : <strong>radian </strong>ou <strong>degr&eacute;</strong>.</p> <p> Les valeurs utilis&eacute;es pour les calculs doivent &ecirc;tre saisie avec <span style="color:#ff0000;"><strong>application</strong></span>. Les erreurs de frappe sont souvent la premi&egrave;re cause dans des faux r&eacute;sultats.</p> <p> Le calcul de l&#39;hypot&eacute;nuse fait appel &agrave; une imbrication de calcul : racine carr&eacute;e, parenth&egrave;ses et addition de carr&eacute;. L&#39;ordre de saisie et l&#39;utilisation des <strong>parenth&egrave;ses </strong>est tr&egrave;s importante !</p> <p> &nbsp;</p> <p> <a onclick="window.open(this.href); return false;" href="http://ent-bull.surinter.net/uPortal/f/u28l1s6/p/mes_cours.u28l1n27/max/render.uP?pCp">http://ent-bull.surinter.net/uPortal/f/u28l1s6/p/mes_cours.u28l1n27/max/render.uP?pCp</a></p> <p> &nbsp;</p> ', 5, 11, '', '2013-10-04 11:47:10.351'); INSERT INTO cahier_seance (id, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations, date_maj) VALUES (5, 'SEA5', 'Séance MATHEMATIQUES du 16/09/2013', '2013-09-16', 9, 10, 2, 0, '', 1, 6, '', '2013-09-23 17:18:35.706'); INSERT INTO cahier_seance (id, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations, date_maj) VALUES (4, 'SEA4', 'Séance MATHEMATIQUES du 17/09/2013', '2013-09-17', 10, 11, 0, 0, '<p> S&eacute;ance de pr&eacute;sentation</p> <p> Avec le sourire</p> ', 1, 6, '<p> Anno perso</p> ', '2013-09-23 17:19:19.64'); INSERT INTO cahier_seance (id, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations, date_maj) VALUES (2, 'SEA2', 'seq pédagogique intitulé', '2013-11-25', 11, 12, 0, 0, '<p> seq p&eacute;dagogique description &lt;Latex&gt;7 \epsilon 7777 \not\epsilon 9 \wedge 7 \not\exists 8&lt;/Latex&gt; 7 abcaesnuthaoetnsuh 888</p> ', 2, 6, '<p> annotation&nbsp; &lt;Latex&gt;7 \epsilon 7 \not\epsilon 9 \wedge 7 \not\exists 8&lt;/Latex&gt;</p> ', '2013-09-24 11:23:24.931'); INSERT INTO cahier_seance (id, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations, date_maj) VALUES (6, 'SEA6', 'Formule trigonométrique : cosinus', '2013-09-30', 9, 11, 0, 0, '<p> <font color="#000000" face="Arial" size="2">En 4&egrave;me, on a d&eacute;couvert un nouvel outil appel&eacute; &laquo;&nbsp;<font color="#ff00ff">cosinus</font>&nbsp;&raquo;.</font></p> <p> <latex>cosinus=cote \cdot adjacent \div hypotenuse</latex><br /> <font color="#000000" face="Arial" size="2">Cet outil s&rsquo;utilise uniquement dans les <font color="#ff00ff">triangles rectangles</font>.</font></p> <p> <font color="#000000" face="Arial" size="2">Ce rapport ne d&eacute;pend que de <font color="#ff00ff">la mesure de l&rsquo;angle consid&eacute;r&eacute;</font>.<br /> La valeur du cosinus d&rsquo;un angle est toujours comprise entre <strong><font color="#ff00ff">0</font></strong> et <strong><font color="#ff00ff">1</font></strong>.</font></p> ', 5, 11, '<p> Montrer des exemples au tableau avec des triangles rectangles</p> ', '2013-09-25 15:06:04.664'); INSERT INTO cahier_seance (id, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations, date_maj) VALUES (7, 'SEA7', 'Résivion sur les triangles rectangles', '2013-10-01', 9, 11, 0, 0, '<p> Revoir les formules li&eacute;es aux triangles rectangles.</p> <p> Entre autres rappel sur la formule de <strong>Pythagore</strong>.</p> Rappel sur la forumle des triangles rectangle : <br/> <p> &lt;Latex&gt;C^{2}=A^{2}+B^{2}&lt;/Latex&gt;</p> <p> Soit :</p> <p> &lt;Latex&gt;C= \sqrt{A^{2}+B^{2}} &lt;/Latex&gt;</p> <p> &nbsp;</p> ', 5, 11, '', '2013-09-25 15:06:04.779'); INSERT INTO cahier_seance (id, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations, date_maj) VALUES (14, 'SEA14', 'Formule trigonométrique : cosinus', '2013-09-30', 13, 15, 45, 45, '<p> <font color="#000000" face="Arial" size="2">En 4&egrave;me, on a d&eacute;couvert un nouvel outil appel&eacute; &laquo;&nbsp;<font color="#ff00ff">cosinus</font>&nbsp;&raquo;.</font></p> <p> <latex>cosinus=cote \cdot adjacent \div hypotenuse</latex><br /> <font color="#000000" face="Arial" size="2">Cet outil s&rsquo;utilise uniquement dans les <font color="#ff00ff">triangles rectangles</font>.</font></p> <p> <font color="#000000" face="Arial" size="2">Ce rapport ne d&eacute;pend que de <font color="#ff00ff">la mesure de l&rsquo;angle consid&eacute;r&eacute;</font>.<br /> La valeur du cosinus d&rsquo;un angle est toujours comprise entre <strong><font color="#ff00ff">0</font></strong> et <strong><font color="#ff00ff">1</font></strong>.</font></p> ', 6, 11, '<p> Montrer des exemples au tableau avec des triangles rectangles</p> ', '2013-09-25 15:07:00.717'); INSERT INTO cahier_seance (id, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations, date_maj) VALUES (15, 'SEA15', 'Résivion sur les triangles rectangles', '2013-10-01', 14, 17, 45, 0, '<p> Revoir les formules li&eacute;es aux triangles rectangles.</p> <p> Entre autres rappel sur la formule de <strong>Pythagore</strong>.</p> Rappel sur la forumle des triangles rectangle : <br/> <p> &lt;Latex&gt;C^{2}=A^{2}+B^{2}&lt;/Latex&gt;</p> <p> Soit :</p> <p> &lt;Latex&gt;C= \sqrt{A^{2}+B^{2}} &lt;/Latex&gt;</p> <p> &nbsp;</p> ', 6, 11, '', '2013-09-25 15:07:00.802'); INSERT INTO cahier_seance (id, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations, date_maj) VALUES (16, 'SEA16', 'Calculatrice pour les angles', '2013-10-07', 13, 15, 45, 45, '<p> Pr&eacute;sentation de la calculatrice.</p> <p> Attention au mode de calcul : <strong>radian </strong>ou <strong>degr&eacute;</strong>.</p> <p> Les valeurs utilis&eacute;es pour les calculs doivent &ecirc;tre saisie avec <span style="color:#ff0000;"><strong>application</strong></span>. Les erreurs de frappe sont souvent la premi&egrave;re cause dans des faux r&eacute;sultats.</p> <p> Le calcul de l&#39;hypot&eacute;nuse fait appel &agrave; une imbrication de calcul : racine carr&eacute;e, parenth&egrave;ses et addition de carr&eacute;. L&#39;ordre de saisie et l&#39;utilisation des <strong>parenth&egrave;ses </strong>est tr&egrave;s importante !</p> ', 6, 11, NULL, '2013-09-25 15:07:00.896'); INSERT INTO cahier_seance (id, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations, date_maj) VALUES (22, 'SEA22', 'TD : Application du cosinus / sinus', '2013-10-04', 11, 12, 15, 15, '<p> R&eacute;alisation dans le cadre de groupes de travail de calcul des cosinus et sinus des cas concrets.</p> ', 8, 11, '', '2013-09-25 15:11:42.51'); INSERT INTO cahier_seance (id, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations, date_maj) VALUES (17, 'SEA17', 'Définition de la tangente', '2013-10-08', 14, 17, 45, 0, '<p> D&eacute;finition de la formule trigonom&eacute;trique du calcul de la tangente :</p> <p> &nbsp;</p> <p> <font color="#000000" face="Arial" size="2"><font color="#ff9900"><strong>La valeur commune</strong></font> des rapports&nbsp;<img align="absMiddle" alt="" height="45" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-10a.png" width="33" /> et&nbsp;<img align="absMiddle" alt="" height="45" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-10b.png" width="31" /> ne d&eacute;pend que de <font color="#ff0000"><strong>la mesure de l&rsquo;angle</strong></font><img align="absMiddle" alt="" height="30" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-08bonus%281%29.png" width="59" /><br /> &nbsp;<br /> On l&rsquo;appelle <font color="#ff9900"><strong>la tangente</strong></font> de <font color="#ff0000"><strong>l&rsquo;angle</strong></font></font><font color="#000000" face="Arial" size="2"><img align="absMiddle" alt="" height="30" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-08bonus%281%29.png" width="59" /><img align="right" alt="" height="150" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-10c.png" width="200" /></font><br /> <font color="#000000" face="Arial" size="2">&nbsp;<br /> &nbsp;<br /> <img alt="" height="64" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-10d.png" width="445" /></font></p> <p> &nbsp;</p> ', 6, 11, '', '2013-09-26 14:34:48.292'); INSERT INTO cahier_seance (id, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations, date_maj) VALUES (20, 'SEA20', 'Application avec un tableur', '2013-11-04', 13, 15, 45, 45, '<p> Rappel sur l&#39;utilisation d&#39;un tableur.</p> <p> Utiliser le tableur de la salle d&#39;informatique pour r&eacute;aliser le calcul des fonctions suivantes :</p> <p> - <strong>Cosinus(angle, unit&eacute;) </strong></p> <p> - <strong>Sinus(angle, unit&eacute;)</strong></p> <p> Avec unit&eacute; = Degr&eacute;, Radian ou Grade</p> ', 6, 11, '<p> Faire une petite d&eacute;monstration de l&#39;utilisation de Excel sur un fonction simple.</p> ', '2013-09-25 15:07:01.301'); INSERT INTO cahier_seance (id, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations, date_maj) VALUES (21, 'SEA21', 'Calcul de longueur et trigonométrie', '2013-11-05', 14, 17, 45, 0, '<div align="center"> <font color="#ff9900" face="Arial"><strong><font size="3">Formules trigonom&eacute;triques et<br /> calcul de longueurs :</font></strong></font></div> <br /> <div align="justify"> <span style="font-weight: normal;"><span style="font-weight: normal;"><font face="Arial" size="2">Ce cours a pour objectifs de d&eacute;montrer</font></span><span style="font-weight: normal;"><font face="Arial" size="2"> dans un premier temps</font></span><span style="font-weight: normal;"><font face="Arial" size="2"> les formules de trigonom&eacute;trie puis de les utiliser </font></span><span style="font-weight: normal;"><font face="Arial" size="2">dans le but de calculer des longueurs et de travailler l&rsquo;utilisation de la calculatrice.</font></span><span style="font-weight: normal;"><font face="Arial" size="2"> La premi&egrave;re partie est commune avec le chapitre &quot;Formules trigonom&eacute;triques et calcul d&#39;angles&quot; </font></span><span style="font-weight: normal;"><font face="Arial" size="2">mais l&#39;exemple d&#39;application en fin de chapitre diff&egrave;re et s&#39;int&eacute;resse ici au calcul de longueurs. </font></span></span></div> <p> &nbsp;</p> ', 6, 11, '<p> Penser &agrave; faire des photocopies des sch&eacute;mas d&#39;illustration</p> ', '2013-09-25 15:07:01.417'); INSERT INTO cahier_seance (id, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations, date_maj) VALUES (23, 'SEA23', 'Cours de rattrapage', '2013-09-30', 16, 17, 0, 0, '<p> Cours de soutien avec les &eacute;l&egrave;ves du 2&egrave;me groupe</p> <p> &nbsp;</p> ', 8, 11, '', '2013-09-25 15:48:17.035'); INSERT INTO cahier_seance (id, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations, date_maj) VALUES (24, 'SEA24', 'Rattrapage', '2013-10-03', 16, 17, 0, 0, '<p> Cours de rattrapage avec les &eacute;l&egrave;ves du 1ere groupe</p> ', 7, 11, '', '2013-09-25 15:49:28.361'); INSERT INTO cahier_seance (id, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations, date_maj) VALUES (25, 'SEA25', 'Application avec un tableur', '2013-10-14', 9, 11, 0, 0, '<p> <span style="color:#000000;"><strong><span style="background-color: rgb(255, 255, 0);">Saisie par le rempla&ccedil;ant : Annie-Jean SAGNEAUX</span></strong></span></p> <p> Rappel sur l&#39;utilisation d&#39;un tableur.</p> <p> Utiliser le tableur de la salle d&#39;informatique pour r&eacute;aliser le calcul des fonctions suivantes :</p> <p> - <strong>Cosinus(angle, unit&eacute;) </strong></p> <p> - <strong>Sinus(angle, unit&eacute;)</strong></p> <p> Avec unit&eacute; = Degr&eacute;, Radian ou Grade</p> ', 5, 13, '<p> Faire une petite d&eacute;monstration de l&#39;utilisation de Excel sur un fonction simple.</p> ', '2013-09-25 16:04:55.217'); INSERT INTO cahier_seance (id, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations, date_maj) VALUES (27, 'SEA27', 'Exemple du calcul d''angles', '2013-10-14', 13, 15, 45, 45, '<p> <span style="color:#000000;"><strong><span style="background-color: rgb(255, 255, 0);">Saisie par le rempla&ccedil;ant : Annie-Jean SAGNEAUX</span></strong></span></p> <h2> <font color="#000000" face="Arial" size="2"><font color="#ff9900" size="4"><strong>Exemple d&rsquo;application du calcul d&#39;angles</strong></font></font></h2> <p> <font color="#000000" face="Arial" size="2"><em>Exemple&nbsp;:</em><br /> &nbsp;<br /> ABC est un triangle rectangle en A, tel que : AB = 6 cm et&nbsp; AC = 4 cm.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br /> <strong>Calculer l&rsquo;arrondi au degr&eacute; de l&rsquo;angle</strong> <img align="absMiddle" alt="" height="30" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-16a%281%29.png" width="58" /><strong>.</strong><br /> &nbsp;</font></p> <div align="center"> <font color="#000000" face="Arial" size="2"><img alt="" height="152" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-16b.png" width="300" /></font></div> <p> <font color="#000000" face="Arial" size="2">&nbsp;<br /> <em>M&eacute;thode :</em><br /> &nbsp;<br /> &diams; On trace une figure &agrave; main lev&eacute;e.<br /> On repasse en couleur les donn&eacute;es connues et celle cherch&eacute;e.<br /> &diams; Par rapport &agrave; l&rsquo;angle connu, on connait le c&ocirc;t&eacute; adjacent et on cherche la longueur du c&ocirc;t&eacute; oppos&eacute;.<br /> On va utiliser la formule <font color="#ff0000">de la tangente</font>.<br /> &nbsp;<br /> <font color="#0000ff"><strong>Dans le triangle ABC rectangle en B, on a :</strong> <img align="absMiddle" alt="" height="50" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-16c.png" width="126" /></font><br /> <strong><font color="#0000ff">Soit :</font> </strong><img align="absMiddle" alt="" height="50" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-16d.png" width="150" /><br /> <font color="#0000ff"><strong>D&#39;o&ugrave; :</strong></font> <img align="absMiddle" alt="" height="35" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-16e.png" width="155" /><br /> <font color="#0000ff"><strong>&nbsp;<br /> Sur la calculatrice, on lit : 56,30993247</strong></font><br /> &nbsp;<br /> <font color="#0000ff"><strong>Finalement :</strong></font> <img align="absMiddle" alt="" height="35" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-16f.png" width="122" /><br /> &nbsp; </font></p> ', 6, 13, '<p> Faire passer au tableau quelques &eacute;l&egrave;ves pour r&eacute;aliser les illustrations</p> ', '2013-09-25 16:05:52.635'); INSERT INTO cahier_seance (id, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations, date_maj) VALUES (28, 'SEA28', 'Propriétés des formules trigonométriques', '2013-10-15', 14, 17, 45, 0, '<p> <span style="color:#000000;"><strong><span style="background-color: rgb(255, 255, 0);">Saisie par le rempla&ccedil;ant : Annie-Jean SAGNEAUX</span></strong></span></p> <h2> <font color="#000000" face="Arial" size="2"><font color="#ff9900" size="4"><strong>Propri&eacute;t&eacute;s des formules trigonom&eacute;triques</strong></font></font></h2> <p> <font color="#000000" face="Arial" size="2">&nbsp;<br /> &nbsp;<br /> <font color="#ff0000"><strong>Dans un triangle rectangle, quelle que soit la mesure x d&rsquo;un angle aigu, on a&nbsp;: </strong></font><br /> &nbsp;</font></p> <br /> <div align="center"> <img alt="" height="70" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-17.png" width="409" /></div> <p> <font color="#000000" face="Arial" size="2">&nbsp;<br /> <em>Preuve :</em><br /> &nbsp;<br /> <img alt="" height="113" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-17b.png" width="645" /><br /> &nbsp;<br /> <strong><font color="#ff0000" size="3">2)</font> On note :</strong><br /> CA le c&ocirc;t&eacute; adjacent &agrave; l&rsquo;angle x ;<br /> CO le c&ocirc;t&eacute; oppos&eacute; &agrave; l&rsquo;angle x ;<br /> H l&rsquo;hypot&eacute;nuse du triangle rectangle ;<br /> &nbsp;<br /> <strong>On a :</strong><br /> <img alt="" height="59" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-17c.png" width="450" /><br /> &nbsp;<br /> <strong>Or :</strong> dans un triangle rectangle, d&rsquo;apr&egrave;s la propri&eacute;t&eacute; de Pythagore, <strong>CA&sup2; + CO&sup2; = H&sup2;</strong>.<br /> &nbsp;<br /> <strong>Donc :</strong> <strong><font color="#ff0000">cos&sup2; x + sin&sup2; x = 1</font></strong></font></p> ', 6, 13, '<p> Fournir aux &eacute;l&egrave;ves une fiche r&eacute;capitulative des formules &agrave; conna&icirc;tre par coeur</p> ', '2013-09-25 16:06:16.184'); INSERT INTO cahier_seance (id, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations, date_maj) VALUES (29, 'SEA29', 'Latex', '2013-11-26', 9, 11, 0, 0, '<p> &lt;Latex&gt; \sqrt[]{2} &lt;/Latex&gt;</p> ', 5, 11, '', '2013-09-27 17:21:11.015'); INSERT INTO cahier_seance (id, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations, date_maj) VALUES (11, 'SEA11', 'Propriétés des formules trigonométriques', '2013-10-10', 13, 16, 45, 0, '<h2> <font color="#000000" face="Arial" size="2"><font color="#ff9900" size="4"><strong>Propri&eacute;t&eacute;s des formules trigonom&eacute;triques</strong></font></font></h2> <p> <font color="#000000" face="Arial" size="2">&nbsp;<br /> &nbsp;<br /> <font color="#ff0000"><strong>Dans un triangle rectangle, quelle que soit la mesure x d&rsquo;un angle aigu, on a&nbsp;: </strong></font><br /> &nbsp;</font></p> <br /> <div align="center"> <img alt="" height="70" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-17.png" width="409" /></div> <p> <font color="#000000" face="Arial" size="2">&nbsp;<br /> <em>Preuve :</em><br /> &nbsp;<br /> <img alt="" height="113" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-17b.png" width="645" /><br /> &nbsp;<br /> <strong><font color="#ff0000" size="3">2)</font> On note :</strong><br /> CA le c&ocirc;t&eacute; adjacent &agrave; l&rsquo;angle x ;<br /> CO le c&ocirc;t&eacute; oppos&eacute; &agrave; l&rsquo;angle x ;<br /> H l&rsquo;hypot&eacute;nuse du triangle rectangle ;<br /> &nbsp;<br /> <strong>On a :</strong><br /> <img alt="" height="59" src="http://www.educastream.com/IMG/Image/formules-trigonometriques-17c.png" width="450" /><br /> &nbsp;<br /> <strong>Or :</strong> dans un triangle rectangle, d&rsquo;apr&egrave;s la propri&eacute;t&eacute; de Pythagore, <strong>CA&sup2; + CO&sup2; = H&sup2;</strong><br /> &nbsp;<br /> <strong>Donc :</strong> <strong><font color="#ff0000">cos&sup2; x + sin&sup2; x = 1</font></strong></font></p> <p> <span style="background-color:#ffff00;">Ce commentaire a &eacute;t&eacute; rajout&eacute; apr&egrave;s la pose du visa du directeur.</span></p> ', 5, 11, '<p> Fournir aux &eacute;l&egrave;ves une fiche r&eacute;capitulative des formules &agrave; conna&icirc;tre par coeur.</p> <p> Prendre la fiche verte</p> ', '2013-09-26 11:43:56.772'); INSERT INTO cahier_seance (id, code, intitule, date, heure_debut, heure_fin, minute_debut, minute_fin, description, id_sequence, id_enseignant, annotations, date_maj) VALUES (26, 'SEA26', 'Calcul de longueur et trigonométrie', '2013-10-15', 9, 11, 0, 0, '<div> <span style="color:#000000;"><strong><span style="background-color: rgb(255, 255, 0);">Saisie par le rempla&ccedil;ant : Annie-Jean SAGNEAUX</span></strong></span></div> <div> &nbsp;</div> <div align="center"> <font color="#ff9900" face="Arial"><strong><font size="3">Formules trigonom&eacute;triques et<br /> calcul de longueurs :</font></strong></font></div> <div align="justify"> <span style="font-weight: normal;"><span style="font-weight: normal;"><font face="Arial" size="2">Ce cours a pour objectifs de d&eacute;montrer</font></span><span style="font-weight: normal;"><font face="Arial" size="2"> dans un premier temps</font></span><span style="font-weight: normal;"><font face="Arial" size="2"> les formules de trigonom&eacute;trie puis de les utiliser </font></span><span style="font-weight: normal;"><font face="Arial" size="2">dans le but de calculer des longueurs et de travailler l&rsquo;utilisation de la calculatrice.</font></span><span style="font-weight: normal;"><font face="Arial" size="2"> La premi&egrave;re partie est commune avec le chapitre &quot;Formules trigonom&eacute;triques et calcul d&#39;angles&quot; </font></span><span style="font-weight: normal;"><font face="Arial" size="2">mais l&#39;exemple d&#39;application en fin de chapitre diff&egrave;re et s&#39;int&eacute;resse ici au calcul de longueurs. </font></span></span></div> <div align="justify"> &nbsp;</div> <div align="justify"> <span style="font-weight: normal;"><span style="font-weight: normal;"><font face="Arial" size="2">Application des formules.</font></span></span></div> <p> <span style="background-color:#ffff00;">Rajout d&#39;un commentaire <strong>apr&egrave;s </strong>la pose du visa par le directeur.</span></p> ', 5, 13, '<p> Penser &agrave; faire des photocopies des sch&eacute;mas d&#39;illustration</p> ', '2013-09-26 12:02:14.09'); -- -- Data for Name: cahier_sequence; Type: TABLE DATA; Schema: cahier_courant; Owner: ent -- INSERT INTO cahier_sequence (id, code, intitule, description, date_debut, date_fin, id_enseignant, id_etablissement, id_enseignement, id_groupe, id_classe) VALUES (1, 'SEQ1', 'MATHEMATIQUES / 2A', 'Séquence automatique - MATHEMATIQUES - Classe 2A', '2013-09-01', '2014-06-30', 6, 2, 2, NULL, 4); INSERT INTO cahier_sequence (id, code, intitule, description, date_debut, date_fin, id_enseignant, id_etablissement, id_enseignement, id_groupe, id_classe) VALUES (3, 'SEQ3', 'MATHEMATIQUES / 2C', 'Séquence automatique - MATHEMATIQUES - Classe 2C', '2013-09-01', '2014-06-30', 6, 2, 2, NULL, 6); INSERT INTO cahier_sequence (id, code, intitule, description, date_debut, date_fin, id_enseignant, id_etablissement, id_enseignement, id_groupe, id_classe) VALUES (2, 'SEQ2', 'MATHEMATIQUES / 2B', '<p> S&eacute;quence automatique - MATHEMATIQUES - Classe 2BW</p> ', '2013-09-01', '2014-06-30', 6, 2, 2, NULL, 5); INSERT INTO cahier_sequence (id, code, intitule, description, date_debut, date_fin, id_enseignant, id_etablissement, id_enseignement, id_groupe, id_classe) VALUES (4, 'SEQ4', 'Séq MATHEMATIQUES / 33445566778899$bobb...', 'Séquence automatique - MATHEMATIQUES - 33445566778899$bobby_jenkis', '2013-09-01', '2014-06-30', 6, 2, 2, 19, NULL); INSERT INTO cahier_sequence (id, code, intitule, description, date_debut, date_fin, id_enseignant, id_etablissement, id_enseignement, id_groupe, id_classe) VALUES (5, 'SEQ5', 'MATHEMATIQUES / 3A', 'Séquence automatique - MATHEMATIQUES - Classe 3A', '2013-09-01', '2014-06-30', 11, 3, 2, NULL, 7); INSERT INTO cahier_sequence (id, code, intitule, description, date_debut, date_fin, id_enseignant, id_etablissement, id_enseignement, id_groupe, id_classe) VALUES (6, 'SEQ6', 'MATHEMATIQUES / 3B', 'Séquence automatique - MATHEMATIQUES - Classe 3B', '2013-09-01', '2014-06-30', 11, 3, 2, NULL, 8); INSERT INTO cahier_sequence (id, code, intitule, description, date_debut, date_fin, id_enseignant, id_etablissement, id_enseignement, id_groupe, id_classe) VALUES (7, 'SEQ7', 'MATHEMATIQUES / 3A1', 'Séquence automatique - MATHEMATIQUES et le groupe 3A1', '2013-09-01', '2014-06-30', 11, 3, 2, 7, NULL); INSERT INTO cahier_sequence (id, code, intitule, description, date_debut, date_fin, id_enseignant, id_etablissement, id_enseignement, id_groupe, id_classe) VALUES (8, 'SEQ8', 'MATHEMATIQUES / 3A2', 'Séquence automatique - MATHEMATIQUES et le groupe 3A2', '2013-09-01', '2014-06-30', 11, 3, 2, 8, NULL); INSERT INTO cahier_sequence (id, code, intitule, description, date_debut, date_fin, id_enseignant, id_etablissement, id_enseignement, id_groupe, id_classe) VALUES (9, 'SEQ9', 'MATHEMATIQUES / Profs3eme', 'Séquence automatique - MATHEMATIQUES et le groupe Profs3eme', '2013-09-01', '2014-06-30', 11, 3, 2, 20, NULL); INSERT INTO cahier_sequence (id, code, intitule, description, date_debut, date_fin, id_enseignant, id_etablissement, id_enseignement, id_groupe, id_classe) VALUES (10, 'SEQ10', 'MATHEMATIQUES / ProfsMath', 'Séquence automatique - MATHEMATIQUES et le groupe ProfsMath', '2013-09-01', '2014-06-30', 11, 3, 2, 21, NULL); INSERT INTO cahier_sequence (id, code, intitule, description, date_debut, date_fin, id_enseignant, id_etablissement, id_enseignement, id_groupe, id_classe) VALUES (11, 'SEQ11', 'HISTOIRE ET GEOGRAPHIE / 3A', 'Séquence automatique - HISTOIRE ET GEOGRAPHIE - Classe 3A', '2013-09-01', '2014-06-30', 12, 3, 8, NULL, 7); INSERT INTO cahier_sequence (id, code, intitule, description, date_debut, date_fin, id_enseignant, id_etablissement, id_enseignement, id_groupe, id_classe) VALUES (12, 'SEQ12', 'HISTOIRE ET GEOGRAPHIE / 3B', 'Séquence automatique - HISTOIRE ET GEOGRAPHIE - Classe 3B', '2013-09-01', '2014-06-30', 12, 3, 8, NULL, 8); INSERT INTO cahier_sequence (id, code, intitule, description, date_debut, date_fin, id_enseignant, id_etablissement, id_enseignement, id_groupe, id_classe) VALUES (13, 'SEQ13', 'HISTOIRE ET GEOGRAPHIE / 3A1', 'Séquence automatique - HISTOIRE ET GEOGRAPHIE et le groupe 3A1', '2013-09-01', '2014-06-30', 12, 3, 8, 7, NULL); INSERT INTO cahier_sequence (id, code, intitule, description, date_debut, date_fin, id_enseignant, id_etablissement, id_enseignement, id_groupe, id_classe) VALUES (14, 'SEQ14', 'HISTOIRE ET GEOGRAPHIE / 3A2', 'Séquence automatique - HISTOIRE ET GEOGRAPHIE et le groupe 3A2', '2013-09-01', '2014-06-30', 12, 3, 8, 8, NULL); INSERT INTO cahier_sequence (id, code, intitule, description, date_debut, date_fin, id_enseignant, id_etablissement, id_enseignement, id_groupe, id_classe) VALUES (15, 'SEQ15', 'HISTOIRE ET GEOGRAPHIE / Profs3eme', 'Séquence automatique - HISTOIRE ET GEOGRAPHIE et le groupe Profs3eme', '2013-09-01', '2014-06-30', 12, 3, 8, 20, NULL); INSERT INTO cahier_sequence (id, code, intitule, description, date_debut, date_fin, id_enseignant, id_etablissement, id_enseignement, id_groupe, id_classe) VALUES (16, 'SEQ16', 'ANGLAIS LV1 / 3A', 'Séquence automatique - ANGLAIS LV1 - Classe 3A', '2013-09-01', '2014-06-30', 10, 3, 9, NULL, 7); INSERT INTO cahier_sequence (id, code, intitule, description, date_debut, date_fin, id_enseignant, id_etablissement, id_enseignement, id_groupe, id_classe) VALUES (17, 'SEQ17', 'ANGLAIS LV1 / 3B', 'Séquence automatique - ANGLAIS LV1 - Classe 3B', '2013-09-01', '2014-06-30', 10, 3, 9, NULL, 8); INSERT INTO cahier_sequence (id, code, intitule, description, date_debut, date_fin, id_enseignant, id_etablissement, id_enseignement, id_groupe, id_classe) VALUES (18, 'SEQ18', 'ANGLAIS LV1 / 3AGL-A', 'Séquence automatique - ANGLAIS LV1 et le groupe 3AGL-A', '2013-09-01', '2014-06-30', 10, 3, 9, 6, NULL); INSERT INTO cahier_sequence (id, code, intitule, description, date_debut, date_fin, id_enseignant, id_etablissement, id_enseignement, id_groupe, id_classe) VALUES (19, 'SEQ19', 'ANGLAIS LV1 / 3AGL-B', 'Séquence automatique - ANGLAIS LV1 et le groupe 3AGL-B', '2013-09-01', '2014-06-30', 10, 3, 9, 9, NULL); INSERT INTO cahier_sequence (id, code, intitule, description, date_debut, date_fin, id_enseignant, id_etablissement, id_enseignement, id_groupe, id_classe) VALUES (20, 'SEQ20', 'ANGLAIS LV1 / Profs3eme', 'Séquence automatique - ANGLAIS LV1 et le groupe Profs3eme', '2013-09-01', '2014-06-30', 10, 3, 9, 20, NULL); INSERT INTO cahier_sequence (id, code, intitule, description, date_debut, date_fin, id_enseignant, id_etablissement, id_enseignement, id_groupe, id_classe) VALUES (21, 'SEQ21', 'ANGLAIS LV2 / 3A', 'Séquence automatique - ANGLAIS LV2 - Classe 3A', '2013-09-01', '2014-06-30', 10, 3, 10, NULL, 7); INSERT INTO cahier_sequence (id, code, intitule, description, date_debut, date_fin, id_enseignant, id_etablissement, id_enseignement, id_groupe, id_classe) VALUES (22, 'SEQ22', 'ANGLAIS LV2 / 3B', 'Séquence automatique - ANGLAIS LV2 - Classe 3B', '2013-09-01', '2014-06-30', 10, 3, 10, NULL, 8); INSERT INTO cahier_sequence (id, code, intitule, description, date_debut, date_fin, id_enseignant, id_etablissement, id_enseignement, id_groupe, id_classe) VALUES (23, 'SEQ23', 'ANGLAIS LV2 / 3AGL-A', 'Séquence automatique - ANGLAIS LV2 et le groupe 3AGL-A', '2013-09-01', '2014-06-30', 10, 3, 10, 6, NULL); INSERT INTO cahier_sequence (id, code, intitule, description, date_debut, date_fin, id_enseignant, id_etablissement, id_enseignement, id_groupe, id_classe) VALUES (24, 'SEQ24', 'ANGLAIS LV2 / 3AGL-B', 'Séquence automatique - ANGLAIS LV2 et le groupe 3AGL-B', '2013-09-01', '2014-06-30', 10, 3, 10, 9, NULL); INSERT INTO cahier_sequence (id, code, intitule, description, date_debut, date_fin, id_enseignant, id_etablissement, id_enseignement, id_groupe, id_classe) VALUES (25, 'SEQ25', 'ANGLAIS LV2 / Profs3eme', 'Séquence automatique - ANGLAIS LV2 et le groupe Profs3eme', '2013-09-01', '2014-06-30', 10, 3, 10, 20, NULL); INSERT INTO cahier_sequence (id, code, intitule, description, date_debut, date_fin, id_enseignant, id_etablissement, id_enseignement, id_groupe, id_classe) VALUES (26, 'SEQ26', 'MATHEMATIQUES / 3A', 'Séquence automatique - MATHEMATIQUES - Classe 3A', '2013-09-01', '2014-06-30', 13, 3, 2, NULL, 7); INSERT INTO cahier_sequence (id, code, intitule, description, date_debut, date_fin, id_enseignant, id_etablissement, id_enseignement, id_groupe, id_classe) VALUES (27, 'SEQ27', 'MATHEMATIQUES / 3B', 'Séquence automatique - MATHEMATIQUES - Classe 3B', '2013-09-01', '2014-06-30', 13, 3, 2, NULL, 8); INSERT INTO cahier_sequence (id, code, intitule, description, date_debut, date_fin, id_enseignant, id_etablissement, id_enseignement, id_groupe, id_classe) VALUES (28, 'SEQ28', 'MATHEMATIQUES / 3A1', 'Séquence automatique - MATHEMATIQUES et le groupe 3A1', '2013-09-01', '2014-06-30', 13, 3, 2, 7, NULL); INSERT INTO cahier_sequence (id, code, intitule, description, date_debut, date_fin, id_enseignant, id_etablissement, id_enseignement, id_groupe, id_classe) VALUES (29, 'SEQ29', 'MATHEMATIQUES / 3A2', 'Séquence automatique - MATHEMATIQUES et le groupe 3A2', '2013-09-01', '2014-06-30', 13, 3, 2, 8, NULL); INSERT INTO cahier_sequence (id, code, intitule, description, date_debut, date_fin, id_enseignant, id_etablissement, id_enseignement, id_groupe, id_classe) VALUES (30, 'SEQ30', 'MATHEMATIQUES / Profs3eme', 'Séquence automatique - MATHEMATIQUES et le groupe Profs3eme', '2013-09-01', '2014-06-30', 13, 3, 2, 20, NULL); INSERT INTO cahier_sequence (id, code, intitule, description, date_debut, date_fin, id_enseignant, id_etablissement, id_enseignement, id_groupe, id_classe) VALUES (31, 'SEQ31', 'MATHEMATIQUES / ProfsMath', 'Séquence automatique - MATHEMATIQUES et le groupe ProfsMath', '2013-09-01', '2014-06-30', 13, 3, 2, 21, NULL); -- -- Data for Name: cahier_type_devoir; Type: TABLE DATA; Schema: cahier_courant; Owner: ent -- INSERT INTO cahier_type_devoir (id, code, libelle, id_etablissement, categorie) VALUES (1, 'TD1', 'Devoir maison', 1, 'NORMAL'); INSERT INTO cahier_type_devoir (id, code, libelle, id_etablissement, categorie) VALUES (2, 'TD2', 'Exercice(s)', 1, 'NORMAL'); INSERT INTO cahier_type_devoir (id, code, libelle, id_etablissement, categorie) VALUES (3, 'TD3', 'Autre', 1, 'NORMAL'); INSERT INTO cahier_type_devoir (id, code, libelle, id_etablissement, categorie) VALUES (4, 'TD4', 'Devoir maison', 2, 'NORMAL'); INSERT INTO cahier_type_devoir (id, code, libelle, id_etablissement, categorie) VALUES (5, 'TD5', 'Exercice(s)', 2, 'NORMAL'); INSERT INTO cahier_type_devoir (id, code, libelle, id_etablissement, categorie) VALUES (6, 'TD6', 'Autre', 2, 'NORMAL'); INSERT INTO cahier_type_devoir (id, code, libelle, id_etablissement, categorie) VALUES (8, 'TD8', 'Exercice(s)', 3, 'NORMAL'); INSERT INTO cahier_type_devoir (id, code, libelle, id_etablissement, categorie) VALUES (9, 'TD9', 'Autre', 3, 'NORMAL'); INSERT INTO cahier_type_devoir (id, code, libelle, id_etablissement, categorie) VALUES (10, 'TD10', 'Devoir maison', 4, 'NORMAL'); INSERT INTO cahier_type_devoir (id, code, libelle, id_etablissement, categorie) VALUES (11, 'TD11', 'Exercice(s)', 4, 'NORMAL'); INSERT INTO cahier_type_devoir (id, code, libelle, id_etablissement, categorie) VALUES (12, 'TD12', 'Autre', 4, 'NORMAL'); INSERT INTO cahier_type_devoir (id, code, libelle, id_etablissement, categorie) VALUES (13, 'TD13', 'Devoir maison', 5, 'NORMAL'); INSERT INTO cahier_type_devoir (id, code, libelle, id_etablissement, categorie) VALUES (14, 'TD14', 'Exercice(s)', 5, 'NORMAL'); INSERT INTO cahier_type_devoir (id, code, libelle, id_etablissement, categorie) VALUES (15, 'TD15', 'Autre', 5, 'NORMAL'); INSERT INTO cahier_type_devoir (id, code, libelle, id_etablissement, categorie) VALUES (16, 'TD16', 'Devoir maison', 6, 'NORMAL'); INSERT INTO cahier_type_devoir (id, code, libelle, id_etablissement, categorie) VALUES (17, 'TD17', 'Exercice(s)', 6, 'NORMAL'); INSERT INTO cahier_type_devoir (id, code, libelle, id_etablissement, categorie) VALUES (18, 'TD18', 'Autre', 6, 'NORMAL'); INSERT INTO cahier_type_devoir (id, code, libelle, id_etablissement, categorie) VALUES (7, 'TD7', 'Devoir maison', 3, 'DEVOIR'); -- -- Data for Name: cahier_visa; Type: TABLE DATA; Schema: cahier_courant; Owner: ent -- INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (5, NULL, 'ENTDirecteur', NULL, 2, 6, 2, 6, NULL, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (6, NULL, 'ENTInspecteur', NULL, 2, 6, 2, 6, NULL, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (52, NULL, 'ENTInspecteur', NULL, 3, 13, 2, 7, NULL, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (53, NULL, 'ENTDirecteur', NULL, 3, 13, 2, 8, NULL, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (54, NULL, 'ENTInspecteur', NULL, 3, 13, 2, 8, NULL, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (55, NULL, 'ENTDirecteur', NULL, 3, 13, 2, NULL, 7, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (56, NULL, 'ENTInspecteur', NULL, 3, 13, 2, NULL, 7, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (57, NULL, 'ENTDirecteur', NULL, 3, 13, 2, NULL, 8, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (58, NULL, 'ENTInspecteur', NULL, 3, 13, 2, NULL, 8, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (59, NULL, 'ENTDirecteur', NULL, 3, 13, 2, NULL, 20, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (60, NULL, 'ENTInspecteur', NULL, 3, 13, 2, NULL, 20, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (61, NULL, 'ENTDirecteur', NULL, 3, 13, 2, NULL, 21, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (62, NULL, 'ENTInspecteur', NULL, 3, 13, 2, NULL, 21, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (14, '2013-09-26 11:25:23.926', 'ENTInspecteur', 'MEMO', 3, 11, 2, NULL, 7, '2013-09-25 15:49:28.361'); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (16, '2013-09-26 11:25:23.958', 'ENTInspecteur', 'MEMO', 3, 11, 2, NULL, 8, '2013-09-25 15:48:17.035'); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (11, NULL, 'ENTDirecteur', NULL, 3, 11, 2, 8, NULL, '2013-09-26 14:34:48.292'); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (12, NULL, 'ENTInspecteur', NULL, 3, 11, 2, 8, NULL, '2013-09-26 14:34:48.292'); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (9, '2013-09-26 11:23:27.153', 'ENTDirecteur', 'MEMO', 3, 11, 2, 7, NULL, '2013-10-04 11:47:10.351'); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (10, '2013-09-26 14:32:31.034', 'ENTInspecteur', 'MEMO', 3, 11, 2, 7, NULL, '2013-10-04 11:47:10.351'); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (2, NULL, 'ENTInspecteur', NULL, 2, 6, 2, 4, NULL, '2013-09-23 17:19:19.64'); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (1, NULL, 'ENTDirecteur', NULL, 2, 6, 2, 4, NULL, '2013-09-23 17:19:19.64'); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (7, NULL, 'ENTDirecteur', NULL, 2, 6, 2, NULL, 19, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (8, NULL, 'ENTInspecteur', NULL, 2, 6, 2, NULL, 19, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (4, NULL, 'ENTInspecteur', NULL, 2, 6, 2, 5, NULL, '2013-09-24 11:23:24.931'); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (3, NULL, 'ENTDirecteur', NULL, 2, 6, 2, 5, NULL, '2013-09-24 11:23:24.931'); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (17, NULL, 'ENTDirecteur', NULL, 3, 11, 2, NULL, 20, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (18, NULL, 'ENTInspecteur', NULL, 3, 11, 2, NULL, 20, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (19, NULL, 'ENTDirecteur', NULL, 3, 11, 2, NULL, 21, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (20, NULL, 'ENTInspecteur', NULL, 3, 11, 2, NULL, 21, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (21, NULL, 'ENTDirecteur', NULL, 3, 12, 8, 7, NULL, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (22, NULL, 'ENTInspecteur', NULL, 3, 12, 8, 7, NULL, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (23, NULL, 'ENTDirecteur', NULL, 3, 12, 8, 8, NULL, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (24, NULL, 'ENTInspecteur', NULL, 3, 12, 8, 8, NULL, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (25, NULL, 'ENTDirecteur', NULL, 3, 12, 8, NULL, 7, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (26, NULL, 'ENTInspecteur', NULL, 3, 12, 8, NULL, 7, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (27, NULL, 'ENTDirecteur', NULL, 3, 12, 8, NULL, 8, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (28, NULL, 'ENTInspecteur', NULL, 3, 12, 8, NULL, 8, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (29, NULL, 'ENTDirecteur', NULL, 3, 12, 8, NULL, 20, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (30, NULL, 'ENTInspecteur', NULL, 3, 12, 8, NULL, 20, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (31, NULL, 'ENTDirecteur', NULL, 3, 10, 9, 7, NULL, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (32, NULL, 'ENTInspecteur', NULL, 3, 10, 9, 7, NULL, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (33, NULL, 'ENTDirecteur', NULL, 3, 10, 9, 8, NULL, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (34, NULL, 'ENTInspecteur', NULL, 3, 10, 9, 8, NULL, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (35, NULL, 'ENTDirecteur', NULL, 3, 10, 9, NULL, 6, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (36, NULL, 'ENTInspecteur', NULL, 3, 10, 9, NULL, 6, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (37, NULL, 'ENTDirecteur', NULL, 3, 10, 9, NULL, 9, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (38, NULL, 'ENTInspecteur', NULL, 3, 10, 9, NULL, 9, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (39, NULL, 'ENTDirecteur', NULL, 3, 10, 9, NULL, 20, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (40, NULL, 'ENTInspecteur', NULL, 3, 10, 9, NULL, 20, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (41, NULL, 'ENTDirecteur', NULL, 3, 10, 10, 7, NULL, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (42, NULL, 'ENTInspecteur', NULL, 3, 10, 10, 7, NULL, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (43, NULL, 'ENTDirecteur', NULL, 3, 10, 10, 8, NULL, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (44, NULL, 'ENTInspecteur', NULL, 3, 10, 10, 8, NULL, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (45, NULL, 'ENTDirecteur', NULL, 3, 10, 10, NULL, 6, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (46, NULL, 'ENTInspecteur', NULL, 3, 10, 10, NULL, 6, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (47, NULL, 'ENTDirecteur', NULL, 3, 10, 10, NULL, 9, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (48, NULL, 'ENTInspecteur', NULL, 3, 10, 10, NULL, 9, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (49, NULL, 'ENTDirecteur', NULL, 3, 10, 10, NULL, 20, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (50, NULL, 'ENTInspecteur', NULL, 3, 10, 10, NULL, 20, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (51, NULL, 'ENTDirecteur', NULL, 3, 13, 2, 7, NULL, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (13, NULL, 'ENTDirecteur', NULL, 3, 11, 2, NULL, 7, NULL); INSERT INTO cahier_visa (id, date_visa, profil, type_visa, id_etablissement, id_enseignant, id_enseignement, id_classe, id_groupe, date_dernier_maj) VALUES (15, NULL, 'ENTDirecteur', NULL, 3, 11, 2, NULL, 8, NULL); -- -- Data for Name: cahier_visa_seance; Type: TABLE DATA; Schema: cahier_courant; Owner: ent -- INSERT INTO cahier_visa_seance (id_visa, id_seance) VALUES (9, 9); INSERT INTO cahier_visa_seance (id_visa, id_seance) VALUES (9, 10); INSERT INTO cahier_visa_seance (id_visa, id_seance) VALUES (9, 6); INSERT INTO cahier_visa_seance (id_visa, id_seance) VALUES (9, 7); INSERT INTO cahier_visa_seance (id_visa, id_seance) VALUES (9, 8); INSERT INTO cahier_visa_seance (id_visa, id_seance) VALUES (9, 11); INSERT INTO cahier_visa_seance (id_visa, id_seance) VALUES (9, 25); INSERT INTO cahier_visa_seance (id_visa, id_seance) VALUES (9, 26); INSERT INTO cahier_visa_seance (id_visa, id_seance) VALUES (11, 27); INSERT INTO cahier_visa_seance (id_visa, id_seance) VALUES (11, 28); INSERT INTO cahier_visa_seance (id_visa, id_seance) VALUES (14, 24); INSERT INTO cahier_visa_seance (id_visa, id_seance) VALUES (16, 22); INSERT INTO cahier_visa_seance (id_visa, id_seance) VALUES (16, 23); INSERT INTO cahier_visa_seance (id_visa, id_seance) VALUES (10, 9); INSERT INTO cahier_visa_seance (id_visa, id_seance) VALUES (10, 10); INSERT INTO cahier_visa_seance (id_visa, id_seance) VALUES (10, 6); INSERT INTO cahier_visa_seance (id_visa, id_seance) VALUES (10, 7); INSERT INTO cahier_visa_seance (id_visa, id_seance) VALUES (10, 8); INSERT INTO cahier_visa_seance (id_visa, id_seance) VALUES (10, 11);
true
c4a4a2460cbe476b7d434de2aa3bd00e15d6613a
SQL
AlexAV07/CRUD
/script_for_database.sql
UTF-8
1,224
2.875
3
[]
no_license
CREATE TABLE `user` ( `id` INT(8) NOT NULL AUTO_INCREMENT, `name` VARCHAR(25) NULL DEFAULT NULL, `age` INT(11) NULL DEFAULT NULL, `isAdmin` BIT(1) NULL DEFAULT NULL, `createdDate` TIMESTAMP NULL DEFAULT NULL, PRIMARY KEY (`id`) ) COLLATE='utf8_general_ci' ENGINE=InnoDB AUTO_INCREMENT=28 ; insert into user(name,age,isadmin,createddate) values('user 1',20,0,'2017-01-01'); insert into user(name,age,isadmin,createddate) values('user 2',23,0,'2017-02-01'); insert into user(name,age,isadmin,createddate) values('user 3',24,0,'2017-03-01'); insert into user(name,age,isadmin,createddate) values('user 4',25,0,'2017-02-01'); insert into user(name,age,isadmin,createddate) values('user 5',26,0,'2017-01-11'); insert into user(name,age,isadmin,createddate) values('user 6',27,0,'2017-01-31'); insert into user(name,age,isadmin,createddate) values('user 7',28,0,'2017-01-21'); insert into user(name,age,isadmin,createddate) values('user 8',29,0,'2017-01-10'); insert into user(name,age,isadmin,createddate) values('user 9',30,0,'2017-01-16'); insert into user(name,age,isadmin,createddate) values('user 10',40,0,'2017-01-18'); insert into user(name,age,isadmin,createddate) values('user 11',50,0,'2017-01-01');
true
974993dcec80d04cb05cd82d1202de9740ecf7ee
SQL
zfr0411/Order-System-Backend
/db/TinyHippo.sql
UTF-8
7,961
3.390625
3
[ "MIT" ]
permissive
-- MySQL Script generated by MySQL Workbench -- Thu Jun 21 10:01:43 2018 -- Model: New Model Version: 1.0 -- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES'; -- ----------------------------------------------------- -- Schema TINYHIPPO -- ----------------------------------------------------- -- ----------------------------------------------------- -- Schema TINYHIPPO -- ----------------------------------------------------- CREATE SCHEMA IF NOT EXISTS `TINYHIPPO` DEFAULT CHARACTER SET utf8 ; USE `TINYHIPPO` ; -- ----------------------------------------------------- -- Table `TINYHIPPO`.`Restaurant` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `TINYHIPPO`.`Restaurant` ( `restaurantID` INT UNSIGNED NOT NULL AUTO_INCREMENT, `restaurantName` VARCHAR(50) NOT NULL, `password` VARCHAR(45) NOT NULL, `phone` VARCHAR(45) NOT NULL, `email` VARCHAR(45) NOT NULL, PRIMARY KEY (`restaurantID`), UNIQUE INDEX `restaurantID_UNIQUE` (`restaurantID` ASC), UNIQUE INDEX `restaurantName_UNIQUE` (`restaurantName` ASC), UNIQUE INDEX `phone_UNIQUE` (`phone` ASC), UNIQUE INDEX `email_UNIQUE` (`email` ASC)); -- ----------------------------------------------------- -- Table `TINYHIPPO`.`RestaurantTable` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `TINYHIPPO`.`RestaurantTable` ( `tableID` INT UNSIGNED NOT NULL AUTO_INCREMENT, `tableNumber` INT UNSIGNED NOT NULL, `currentOrderNumber` INT NOT NULL, `restaurantID` INT UNSIGNED NOT NULL, PRIMARY KEY (`tableID`, `restaurantID`), UNIQUE INDEX `tableID_UNIQUE` (`tableID` ASC), INDEX `fk_Table_Restaurant1_idx` (`restaurantID` ASC), CONSTRAINT `fk_Table_Restaurant1` FOREIGN KEY (`restaurantID`) REFERENCES `TINYHIPPO`.`Restaurant` (`restaurantID`) ON DELETE NO ACTION ON UPDATE NO ACTION); -- ----------------------------------------------------- -- Table `TINYHIPPO`.`OrderList` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `TINYHIPPO`.`OrderList` ( `orderID` INT UNSIGNED NOT NULL AUTO_INCREMENT, `orderNumber` INT NOT NULL, `orderDetail` VARCHAR(5000) NOT NULL, `total` FLOAT NOT NULL, `isPaid` VARCHAR(10) NOT NULL, `status` VARCHAR(10) NOT NULL, `editedTime` DATETIME NOT NULL, `customerID` VARCHAR(45) NOT NULL, `tableID` INT UNSIGNED NOT NULL, `restaurantID` INT UNSIGNED NOT NULL, PRIMARY KEY (`orderID`, `tableID`), UNIQUE INDEX `orderID_UNIQUE` (`orderID` ASC), INDEX `fk_OrderList_Table1_idx` (`tableID` ASC), INDEX `fk_OrderList_Restaurant1_idx` (`restaurantID` ASC), CONSTRAINT `fk_OrderList_Table1` FOREIGN KEY (`tableID`) REFERENCES `TINYHIPPO`.`RestaurantTable` (`tableID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_OrderList_Restaurant1` FOREIGN KEY (`restaurantID`) REFERENCES `TINYHIPPO`.`Restaurant` (`restaurantID`) ON DELETE NO ACTION ON UPDATE NO ACTION); -- ----------------------------------------------------- -- Table `TINYHIPPO`.`QRlink` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `TINYHIPPO`.`QRlink` ( `linkID` INT UNSIGNED NOT NULL AUTO_INCREMENT, `linkImageURL` VARCHAR(255) NOT NULL, `tableID` INT UNSIGNED NOT NULL, PRIMARY KEY (`linkID`, `tableID`), UNIQUE INDEX `linkID_UNIQUE` (`linkID` ASC), UNIQUE INDEX `tableID_UNIQUE` (`tableID` ASC), INDEX `fk_QRlink_RestaurantTable1_idx` (`tableID` ASC), CONSTRAINT `fk_QRlink_RestaurantTable1` FOREIGN KEY (`tableID`) REFERENCES `TINYHIPPO`.`RestaurantTable` (`tableID`) ON DELETE NO ACTION ON UPDATE NO ACTION); -- ----------------------------------------------------- -- Table `TINYHIPPO`.`DishType` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `TINYHIPPO`.`DishType` ( `dishTypeID` INT UNSIGNED NOT NULL AUTO_INCREMENT, `dishTypeName` VARCHAR(255) NOT NULL, `restaurantID` INT UNSIGNED NOT NULL, PRIMARY KEY (`dishTypeID`, `restaurantID`), UNIQUE INDEX `dishTypeID_UNIQUE` (`dishTypeID` ASC), INDEX `fk_DishType_Restaurant1_idx` (`restaurantID` ASC), CONSTRAINT `fk_DishType_Restaurant1` FOREIGN KEY (`restaurantID`) REFERENCES `TINYHIPPO`.`Restaurant` (`restaurantID`) ON DELETE NO ACTION ON UPDATE NO ACTION); -- ----------------------------------------------------- -- Table `TINYHIPPO`.`Dish` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `TINYHIPPO`.`Dish` ( `dishID` INT UNSIGNED NOT NULL AUTO_INCREMENT, `dishName` VARCHAR(255) NOT NULL, `dishDescription` VARCHAR(255) NOT NULL, `onSale` TINYINT NOT NULL, `price` FLOAT NOT NULL, `dishImageURL` VARCHAR(255) NOT NULL, `dishHot` TINYINT UNSIGNED NOT NULL, `monthlySales` INT UNSIGNED NOT NULL, `restaurantID` INT UNSIGNED NOT NULL, `dishTypeID` INT UNSIGNED NOT NULL, PRIMARY KEY (`dishID`, `restaurantID`, `dishTypeID`), UNIQUE INDEX `dishID_UNIQUE` (`dishID` ASC), INDEX `fk_Dish_Restaurant1_idx` (`restaurantID` ASC), INDEX `fk_Dish_DishType1_idx` (`dishTypeID` ASC), CONSTRAINT `fk_Dish_Restaurant1` FOREIGN KEY (`restaurantID`) REFERENCES `TINYHIPPO`.`Restaurant` (`restaurantID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_Dish_DishType1` FOREIGN KEY (`dishTypeID`) REFERENCES `TINYHIPPO`.`DishType` (`dishTypeID`) ON DELETE NO ACTION ON UPDATE NO ACTION); -- ----------------------------------------------------- -- Table `TINYHIPPO`.`DishComment` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `TINYHIPPO`.`DishComment` ( `dishCommentID` INT UNSIGNED NOT NULL AUTO_INCREMENT, `comment` VARCHAR(255) NOT NULL, `dishID` INT UNSIGNED NOT NULL, PRIMARY KEY (`dishCommentID`, `dishID`), UNIQUE INDEX `dishCommentID_UNIQUE` (`dishCommentID` ASC), INDEX `fk_DishComment_Dish1_idx` (`dishID` ASC), CONSTRAINT `fk_DishComment_Dish1` FOREIGN KEY (`dishID`) REFERENCES `TINYHIPPO`.`Dish` (`dishID`) ON DELETE NO ACTION ON UPDATE NO ACTION); -- ----------------------------------------------------- -- Table `TINYHIPPO`.`Recommendation` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `TINYHIPPO`.`Recommendation` ( `recommendationID` INT UNSIGNED NOT NULL AUTO_INCREMENT, `title` VARCHAR(45) NOT NULL, `tag` VARCHAR(45) NOT NULL, `imageURL` VARCHAR(255) NOT NULL, `editedTime` DATETIME NOT NULL, `restaurantID` INT UNSIGNED NOT NULL, INDEX `fk_Recommendation_Restaurant1_idx` (`restaurantID` ASC), PRIMARY KEY (`recommendationID`, `restaurantID`), CONSTRAINT `fk_Recommendation_Restaurant1` FOREIGN KEY (`restaurantID`) REFERENCES `TINYHIPPO`.`Restaurant` (`restaurantID`) ON DELETE NO ACTION ON UPDATE NO ACTION); -- ----------------------------------------------------- -- Table `TINYHIPPO`.`RecommendationDetails` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `TINYHIPPO`.`RecommendationDetails` ( `recommendationID` INT UNSIGNED NOT NULL, `dishID` INT UNSIGNED NOT NULL, `description` VARCHAR(5000) NOT NULL, INDEX `fk_Recommendation_has_Dish_Recommendation1_idx` (`recommendationID` ASC), CONSTRAINT `fk_Recommendation_has_Dish_Recommendation1` FOREIGN KEY (`recommendationID`) REFERENCES `TINYHIPPO`.`Recommendation` (`recommendationID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_Recommendation_has_Dish_Dish1` FOREIGN KEY (`dishID`) REFERENCES `TINYHIPPO`.`Dish` (`dishID`) ON DELETE NO ACTION ON UPDATE NO ACTION); SET SQL_MODE=@OLD_SQL_MODE; SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS; SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
true
970514b8d81567427700103808005d4e60b599ce
SQL
sonyujin95/Tech-Stack
/RDBMS/12Index.sql
UTF-8
1,060
3.828125
4
[]
no_license
/* # db의 빠른 검색을 위한 색인 기능의 index 학습 - primary key(not null/unique)는 기본적으로 자동 index로 설정됨 - DB 자체적으로 빠른 검색 기능 부여 = index를 통해 빠른 검색 가능 - sql명령문의 검색 처리 속도 향상을 위한 oracle db 자체의 객체 # 주의사항 - index가 반영된 컬럼 데이터가 수시로 변경되는 데이터라면 index 적용은 오히려 부작용 - 데이터 셋의 15% 이상의 데이터들이 잦은 변경이 이뤄질 경우 index 설정 비추 # Syntax - 원하는 table에 index 설정 방법 create index <제약조건명> on <원하는 table명>(<index를 설정할 컬럼명>); - index 삭제 명령어 drop index <제약조건명>; */ drop table emp01; create table emp01 as select * from emp; -- index 생성 create index idx_emp01_empno on emp01(empno); -- SMITH 사번 검색 시간 체크 select * from emp01 where empno=7369; select * from emp01 where ename='SMITH'; -- index 삭제 명령어 drop index idx_emp01_empno;
true
4c8a259e0798a260be06746e29d33dba7dbacd3d
SQL
Bitluck/PL-SQL-labs
/chap08-functions/funcAccomSelectUserFullNameByID.sql
UTF-8
467
3.390625
3
[ "MIT" ]
permissive
--CREATE FUNCTION Accom_Select_UserFullName_ByID WHICH RETURNS FULLNAME OF THE CLIENT BY HIS ID --WITH PARAMETER @p_client_ID CREATE OR REPLACE FUNCTION Accom_Select_UserFullName_ByID ( p_client_ID IN NUMBER) RETURN VARCHAR2 AS retClientFullName VARCHAR2(60); BEGIN SELECT c_surname || ' ' || c_name || ' ' || c_patronymic INTO retClientFullName FROM CLIENTS WHERE client_ID = p_client_ID; RETURN retClientFullName; END Accom_Select_UserFullName_ByID;
true
509e58fb7a20e730615511335032615c0b2e6ea2
SQL
PapooSoftware/PapooCMS
/plugins/newsletter/sql/import_update.sql
UTF-8
930
3.109375
3
[ "MIT" ]
permissive
DROP TABLE IF EXISTS `XXX_papoo_news_error_report`; ##b_dump## CREATE TABLE `XXX_papoo_news_error_report` ( `report_id` int(11) NOT NULL auto_increment , `import_time` timestamp NOT NULL , `imported_by` text NOT NULL, `records_to_import` int(11) NOT NULL DEFAULT 0 , `error_count` int(11) NOT NULL DEFAULT 0 , `success_count` int(11) NOT NULL DEFAULT 0, `highest_cc` int(11) NOT NULL DEFAULT 0, `used_file` text NOT NULL, PRIMARY KEY (`report_id`) ) ENGINE=MyISAM ; ##b_dump## DROP TABLE IF EXISTS `XXX_papoo_news_error_report_details`; ##b_dump## CREATE TABLE `XXX_papoo_news_error_report_details` ( `report_id` int(11) NOT NULL , `import_file_record_no` int(11) NOT NULL DEFAULT 0 , `import_file_field_position` smallint(11) NOT NULL DEFAULT 0 , `import_file_field_name` text NOT NULL , `completion_code` int(11) NOT NULL DEFAULT 0 , KEY `idx_records` (`report_id`) ) ENGINE=MyISAM ; ##b_dump##
true
1ed648a16111f482c7bda312fb295c2d47faa9d0
SQL
roxreis/project-node-recode
/App/config/material_escritorio.sql
UTF-8
1,597
3.265625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Tempo de geração: 03-Fev-2021 às 22:11 -- Versão do servidor: 10.4.17-MariaDB -- versão do PHP: 7.4.14 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Banco de dados: `material_escritorio` -- -- -------------------------------------------------------- -- -- Estrutura da tabela `material` -- CREATE TABLE `material` ( `id` int(11) NOT NULL, `nome_produto` varchar(200) NOT NULL, `quantidade` int(11) NOT NULL, `preco` float NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Extraindo dados da tabela `material` -- INSERT INTO `material` (`id`, `nome_produto`, `quantidade`, `preco`) VALUES (1, 'Borracha Branca', 3, 2.65), (3, 'Caneta azul', 3, 1.5), (4, 'Resma Papel', 10, 6.75); -- -- Índices para tabelas despejadas -- -- -- Índices para tabela `material` -- ALTER TABLE `material` ADD PRIMARY KEY (`id`); -- -- AUTO_INCREMENT de tabelas despejadas -- -- -- AUTO_INCREMENT de tabela `material` -- ALTER TABLE `material` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
true
978df496b1e10c86d743f3a7508c2e2dff6276ea
SQL
martileos/jqueryphp
/pw10am.sql
UTF-8
1,287
2.8125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.12 -- http://www.phpmyadmin.net -- -- Servidor: localhost -- Tiempo de generación: 12-05-2015 a las 18:47:42 -- Versión del servidor: 5.6.16 -- Versión de PHP: 5.5.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; -- -- Base de datos: `pw10am` -- -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `usuarios` -- CREATE TABLE IF NOT EXISTS `usuarios` ( `usuario` varchar(15) NOT NULL, `nombre` varchar(80) NOT NULL, `clave` varchar(32) NOT NULL, `tipousuario` int(11) NOT NULL, PRIMARY KEY (`usuario`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Volcado de datos para la tabla `usuarios` -- INSERT INTO `usuarios` (`usuario`, `nombre`, `clave`, `tipousuario`) VALUES ('pw', 'Usuario del sistema', '1c7a92ae351d4e21ebdfb897508f59d6', 1); /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
true
34bbe4cec0b649013a5f3657a25c7aa21984505b
SQL
XMLPro/todoControl
/testdata.sql
UTF-8
529
2.65625
3
[]
no_license
DELETE from tasks; DELETE from places; insert into tasks(content, limit_time, workload, place_id, importance) values("content1", "", 0, 0, 0); insert into tasks(content, limit_time, workload, place_id, importance) values("content2", "", 0, 1, 0); insert into tasks(content, limit_time, workload, place_id, importance) values("content3", "", 10, 1, 50); insert into places(place_name, importance) values("university", 10); insert into places(place_name, importance) values("friends", 50);
true
e0ede708e978214f5bbc80d075175523713dd640
SQL
radtek/Scripts
/sql_mon_events.sql
UTF-8
324
3.171875
3
[]
no_license
SELECT NVL(wait_class,'CPU') AS wait_class, NVL(event,'CPU') AS event, sql_plan_line_id, COUNT(*) FROM v$active_session_history a WHERE sql_id = '&sqlid' AND sql_exec_id = &sql_exec_id AND sql_exec_start=TO_DATE('&sql_exec_start','dd-mm-yyyy hh24:mi:ss') GROUP BY wait_class,event,sql_plan_line_id;
true
9430cc10ec1822f166caf23be515f394516247a5
SQL
an-24/bebrb
/src/test/db/createdb.sql
UTF-8
246
2.859375
3
[]
no_license
CREATE TABLE COMPANY { COMPANY_ID INTEGER PRIMARY KEY UNIQUE, COMPANY_NAME VARCHAR(160) UNIQUE, COMPANY_ADDRESS VARCHAR(240) } CREATE TABLE PRODUCT { PRODUCT_ID INTEGER PRIMARY KEY NOT NULL, PRODUCT_NAME VARCHAR(210) UNIQUE NOT NULL }
true
a09dd40848219e07f5b497bba83f96a400e18068
SQL
JWill1990/Web-Tech
/setup.sql
UTF-8
1,744
3.3125
3
[]
no_license
DROP TABLE IF EXISTS Follows; DROP TABLE IF EXISTS Upd8; DROP TABLE IF EXISTS Person; CREATE TABLE Person( id INTEGER PRIMARY KEY, uname TEXT NOT NULL UNIQUE, pword TEXT NOT NULL, dname TEXT NOT NULL, email TEXT NOT NULL ); CREATE TABLE Upd8( id INTEGER PRIMARY KEY, poster INTEGER REFERENCES Person(id), message TEXT NOT NULL, url TEXT, postedAt INTEGER NOT NULL ); CREATE TABLE Follows( follower INTEGER REFERENCES Person(id), followee INTEGER REFERENCES Person(id) ); INSERT INTO Person VALUES (null, 'liamw', 'sha1$0ad7f9a3$1$96a27d0ecfab2c64913a3e6b8b60d9c6e4ee97e2', 'Liam', 'liam@email.com'); INSERT INTO Person VALUES (null, 'jackw', 'sha1$7f85da2c$1$325693e85f749a9009263ddccdea88235dd8a919', 'Jack', 'jack@email.com'); INSERT INTO Person VALUES (null, 'ianh', 'sha1$66bf5894$1$992b5366848df3807e6f68d5da8a89b238e90344', 'Ian', 'ian@email.com'); INSERT INTO Person VALUES (null, 'supercool123', 'sha1$ae32a91b$1$b1c1f17feafc7ab3b15669c176af67d9cf5a9b9c', 'Super Cool', 'sc123@email.com'); INSERT INTO Person VALUES (null, 'compsci', 'sha1$710e8a4b$1$7d61ef9d4ddf4b7883cc48a582004c77d17fa661', 'Computer Science', 'compsci@email.com'); INSERT INTO Upd8 VALUES (null, 1, 'message 1-1', 'url 1', 1463751854892); INSERT INTO Upd8 VALUES (null, 1, 'message 1-2', 'url 2', 1463752903202); INSERT INTO Upd8 VALUES (null, 2, 'message 2-1', 'url 1', 1463751854892); INSERT INTO Upd8 VALUES (null, 2, 'message 2-2', 'url 2', 1463752903202); INSERT INTO Upd8 VALUES (null, 3, 'message 3-1', 'url 1', 1463751854892); INSERT INTO Upd8 VALUES (null, 3, 'message 3-2', 'url 2', 1463752903202); INSERT INTO Follows VALUES (1,2); INSERT INTO Follows VALUES (1,3); INSERT INTO Follows VALUES (2,1); INSERT INTO Follows VALUES (3,2);
true
192a9537aa9438a409bf1908159e16fef63e795c
SQL
arifk-repo/social_media
/media/social_media_mysql_create.sql
UTF-8
1,079
3.6875
4
[]
no_license
CREATE TABLE `user` ( `id` INT(4) NOT NULL AUTO_INCREMENT, `username` varchar(12) NOT NULL UNIQUE, `email` varchar(30) NOT NULL UNIQUE, `bio` varchar(100) NOT NULL, PRIMARY KEY (`id`) ); CREATE TABLE `post` ( `id` INT(5) NOT NULL AUTO_INCREMENT, `caption` varchar(1000) NOT NULL, `attachment` varchar(300), `user_id` INT(5) NOT NULL, `date_created` DATETIME NOT NULL, PRIMARY KEY (`id`) ); CREATE TABLE `comment` ( `id` INT(5) NOT NULL AUTO_INCREMENT, `id_post` INT(5) NOT NULL, `username` varchar(30) NOT NULL, `comment` varchar(500), `date_created` DATETIME NOT NULL, `attachment` varchar(300), PRIMARY KEY (`id`) ); CREATE TABLE `hashtag` ( `id` INT NOT NULL AUTO_INCREMENT, `title` varchar(250) NOT NULL AUTO_INCREMENT, PRIMARY KEY (`id`) ); ALTER TABLE `post` ADD CONSTRAINT `post_fk0` FOREIGN KEY (`user_id`) REFERENCES `user`(`id`); ALTER TABLE `comment` ADD CONSTRAINT `comment_fk0` FOREIGN KEY (`id_post`) REFERENCES `post`(`id`); ALTER TABLE `comment` ADD CONSTRAINT `comment_fk1` FOREIGN KEY (`username`) REFERENCES `user`(`username`);
true
8ac859871e094b8d4984dcf9e48f93b950047723
SQL
ChemaGit/hive-impala-data-analyst
/hive/theory-exercises/inserting-data/using-load-command.sql
UTF-8
646
2.984375
3
[]
no_license
-- $ beeline -u jdbc:hive2://quickstart.cloudera:10000/training_retail CREATE TABLE orders ( order_id STRING COMMENT 'Unique order id', order_date STRING COMMENT 'Date on which order is placed', order_customer_id STRING COMMENT 'Customer id who placed the order', order_status STRING COMMENT 'Table to save order level details' ) COMMENT 'Table to save order level details' ROW FORMAT DELIMITED FIELDS TERMINATED BY ','; LOAD DATA LOCAL INPATH '/home/cloudera/CCA159DataAnalyst/data/retail_db/orders' INTO TABLE orders; DESCRIBE orders; TRUNCATE order_items; INSERT INTO OVERWRITE TABLE order_items; SELECT * FROM order_items_stage;
true
365f39b7bcf503706aa9f578789818e526185f5a
SQL
kiosowski/Database
/Projects/DatabaseBasics/DataTypes/13.sql
UTF-8
1,529
3.6875
4
[]
no_license
CREATE TABLE Directors( Id INT PRIMARY KEY NOT NULL, DirectorName NVARCHAR(50) NOT NULL, Notes NVARCHAR(MAX) ) CREATE TABLE Genres( Id INT PRIMARY KEY NOT NULL, GenreName NVARCHAR(50) NOT NULL, Notes NVARCHAR(MAX) ) CREATE TABLE Categories( Id INT PRIMARY KEY NOT NULL, CategoryName NVARCHAR(50) NOT NULL, Notes NVARCHAR(MAX) ) CREATE TABLE Movies( Id INT PRIMARY KEY NOT NULL, Title NVARCHAR(255) NOT NULL, DirectorId INT FOREIGN KEY REFERENCES Directors(Id), CopyrightYear INT, Lenght NVARCHAR(50), GenreId INT FOREIGN KEY REFERENCES Genres(Id), CategoryId INT FOREIGN KEY REFERENCES Categories(Id), Rating INT, Notes NVARCHAR(MAX) ) INSERT INTO Directors(Id,DirectorName) VALUES ( 1, 'Director One' ), ( 2, 'Director Two' ), ( 3, 'Director Three' ), ( 4, 'Director Four' ), ( 5, 'Director Five' ); INSERT INTO Genres(Id,GenreName) VALUES ( 1, 'Genre One' ), ( 2, 'Genre Two' ), ( 3, 'Genre Three' ), ( 4, 'Genre Four' ), ( 5, 'Genre Five' ); INSERT INTO Categories(Id,CategoryName) VALUES ( 1, 'Category One' ), ( 2, 'Category Two' ), ( 3, 'Category Three' ), ( 4, 'Category Four' ), ( 5, 'Category Five' ); INSERT INTO Movies(Id,Title,DirectorId,GenreId,CategoryId) VALUES ( 1, 'Title One', 2, 3, 4 ), ( 2, 'Title Two', 3, 4, 5 ), ( 3, 'Title Three', 1, 2, 3 ), ( 4, 'Title Four', 5, 1, 3 ), ( 5, 'Title Five', 3, 5, 2 );
true
97f03485e202b9058ec95d86148a5dbaf71cf281
SQL
tijus/resurgence
/database.sql
UTF-8
12,398
2.953125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.0.2 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jun 06, 2017 at 03:55 PM -- Server version: 10.0.17-MariaDB -- PHP Version: 5.6.14 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `sc` -- -- -------------------------------------------------------- -- -- Table structure for table `admins` -- CREATE TABLE `admins` ( `AdminId` int(11) NOT NULL, `username` varchar(50) NOT NULL, `password` varchar(15) NOT NULL, `remarks` varchar(50) NOT NULL, `Name` varchar(30) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `admins` -- INSERT INTO `admins` (`AdminId`, `username`, `password`, `remarks`, `Name`) VALUES (1, 'badalkotak@gmail.com', 'koyO', 'Tech Team Head', 'Badal Kotak'); -- -------------------------------------------------------- -- -- Table structure for table `admission` -- CREATE TABLE `admission` ( `Id` int(10) NOT NULL, `Label` varchar(100) NOT NULL, `Matter` varchar(100) NOT NULL, `URL` varchar(100) NOT NULL, `Date` date NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `admission` -- INSERT INTO `admission` (`Id`, `Label`, `Matter`, `URL`, `Date`) VALUES (3, 'fdasf', '', '../uploads/media/pdf/student affidavit.pdf', '0000-00-00'), (4, 'asdf', 'fads', '../uploads/media/pdf/parent affidavit.pdf', '0000-00-00'); -- -------------------------------------------------------- -- -- Table structure for table `noticeboard` -- CREATE TABLE `noticeboard` ( `id` int(5) NOT NULL, `Label` varchar(30) NOT NULL, `Matter` text NOT NULL, `URL` varchar(100) NOT NULL, `Date` varchar(15) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `noticeboard` -- INSERT INTO `noticeboard` (`id`, `Label`, `Matter`, `URL`, `Date`) VALUES (11, 'SE, TE, BE admissions', 'adf', '../uploads/media/pdf/monthwise.pdf', '06/07/2016'); -- -------------------------------------------------------- -- -- Table structure for table `registrations` -- CREATE TABLE `registrations` ( `Timestamps` varchar(20) NOT NULL, `FullName` varchar(50) NOT NULL, `College` varchar(100) NOT NULL, `Contact` varchar(10) NOT NULL, `Branch` varchar(30) NOT NULL, `Participants` varchar(30) NOT NULL, `Amount` varchar(30) NOT NULL, `type` varchar(30) NOT NULL, `InterScore` varchar(30) NOT NULL, `IntraScore` varchar(30) NOT NULL, `Surge` varchar(30) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `registrations` -- INSERT INTO `registrations` (`Timestamps`, `FullName`, `College`, `Contact`, `Branch`, `Participants`, `Amount`, `type`, `InterScore`, `IntraScore`, `Surge`) VALUES ('Timestamp', 'Full Name', 'Name of the College', 'Contact No', 'Branch & Year', 'Accompanied Participants', 'Amount Paid', 'Event Type', 'Inter-Score Events', 'Intra-Score Events', 'Surge Events'), ('', '', '', '', '', '', '', '', '', '', ''), ('', '', '', '', '', '', '', '', '', '', ''), ('', '', '', '', '', '', '', '', '', '', ''), ('2/6/2016 12:01:18', 'Pushkar Mutha', 'Vidyalankar', '9011211210', 'Se-Etrx', '0', '50', 'Surge', '', '', 'EDM Night'), ('2/6/2016 22:00:53', 'Vinit Nalekar', 'Vidyalankar', '9820356001', 'Se-etrx', '5', '(paid-100)(left-150)', 'Surge', '', '', 'Treasure Hunt'), ('2/6/2016 22:03:08', 'Unath Rajula', 'Vidyalankar', '7506320783', 'Sy-It', '0', '(50/-)', 'Surge', '', '', 'FIFA'), ('2/6/2016 22:04:41', 'Karan Thakur', 'Vidyalankar', '7738568531', 'Sy-It', '0', '(50/-)', 'Surge', '', '', 'FIFA'), ('2/6/2016 22:05:56', 'Esha Kalgutkar', 'Vidyalankar', '9029476980', 'Te-It', '0', '(50/-)', 'Surge', '', '', 'Mumbais Got Talent'), ('2/6/2016 22:07:30', 'Veena Vemula', 'Vidyalankar', '9588779338', 'Sy-BBI', '0', '(50/-)', 'Surge', '', '', 'Art and Culture'), ('2/6/2016 22:08:54', 'Veena Vemula', 'Vidyalankar', '9588779338', 'Te-It', '0', '(30/-)', 'Surge', '', '', 'Art and Culture'), ('2/6/2016 22:09:59', 'Kishan Yadav', 'Vidyalankar', '8976999263', 'Sy-BBI', '0', '(50/-)', 'Surge', '', '', 'EDM Night'), ('2/6/2016 22:12:14', 'Ritesh Shelar', 'TSEC', '9820799749', 'Biomed', '0', '(100/-)', 'Surge', '', '', 'Rubik Cube Competition'), ('2/6/2016 22:26:21', 'Jigar Parekh', 'Somaiya Vidyavihar', '9987669472', '-', '0', '(50/-)', 'Surge', '', '', 'Mumbais Got Talent'), ('2/6/2016 22:27:15', 'Siddhi Satam', 'Somaiya Vidyavihar', '7208867075', '-', '0', '(50/-)', 'Surge', '', '', 'Mumbais Got Talent'), ('2/6/2016 22:28:51', 'Ganesh Patil', 'Somaiya Vidyavihar', '9594450905', '-', '0', '(paid-30/-)(left-20/-)', 'Surge', '', '', 'Art and Culture'), ('2/6/2016 22:30:01', 'Abhijeet Jadhav', 'Somaiya Vidyvihar', '8308783296', '-', '0', '(50/-)(left-50/-)', 'Surge', '', '', 'Debate'), ('2/6/2016 22:31:14', 'Abhijeet Jadhav', 'Somaiya Vidyavihar', '8308783296', '-', '5', '(100/-)(left-150/-)', 'Surge', '', '', 'Treasure Hunt'), ('2/6/2016 22:32:41', 'Amey Meher', 'Somaiya Vidyavihar', '9757260405', '-', '0', '(50/-)(left-50/-)', 'Score', 'Badminton Boys (Single)', '', ''), ('2/6/2016 22:34:13', 'Sarvesh Barve', 'Somaiya Vidyavihar', '8425024939', '-', '0', '(100/-)(left-150/-)', 'Surge', '', '', 'Treasure Hunt'), ('2/6/2016 22:35:25', 'Doravh Rathod', 'Somaiya Vidyavihar', '9892828337', '-', '0', '(50/-)(left-50/-)', 'Score', 'Badminton Boys (Single)', '', ''), ('2/6/2016 22:44:19', 'Mauthan Joshi', 'Somaiya Vidyavihar', '9833594203', '-', '4', '(150/-)(left-100/-)', 'Surge', '', '', 'CounterStrike'), ('2/6/2016 22:45:13', 'Harshil Shah', 'Somaiya Vidyavihar', '7058455221', '-', '0', '(50/-)', 'Surge', '', '', 'Mumbais Got Talent'), ('2/6/2016 22:49:24', 'Heeth Shah', 'Shah & Anchor', '9967000300', '-', '6', '(100/-)(left-600/-)', 'Score', 'Rink Football', '', ''), ('2/6/2016 23:01:13', 'Sanket', 'Vidyalankar', '9769653993', '-', '1', '100/-', 'Score', 'Carrom (Doubles)', '', ''), ('2/6/2016 23:02:14', 'Pranay', 'Vidyalankar', '9594259445', '-', '0', '50/-', 'Score', 'Carrom (Singles)', '', ''), ('2/6/2016 23:04:19', 'Chaitanya', 'Vidyalankar', '8108214966', '-', '14', '(200/-)(left-1600/-)', 'Score', 'Open Football', '', ''), ('2/6/2016 23:05:43', 'Pranay Shanbhag', 'Vidyalankar', '9869668047', '-', '0', '(50/-)', 'Score', 'Chess', '', ''), ('2/6/2016 23:06:36', 'Varun Nair', 'Vidyalankar', '9820833714', '-', '0', '(30/-)(left-20/-)', 'Score', 'Chess', '', ''), ('2/6/2016 23:07:32', 'Rajnikant', 'Vidyalankar', '9820833714', '-', '0', '(20/-)(left-30/-)', 'Score', 'Chess', '', ''), ('2/6/2016 23:09:20', 'Tanmayee Rawale', 'vidyalankar', '983367274', '-', '0', '(50/-)', 'Score', 'Carrom (Singles)', '', ''), ('2/6/2016 23:10:27', 'Jayshree Tayde', 'Vidyalankar', '7276833924', '-', '1', '(200/-)', 'Score', 'Badminton Boys (Double)', '', ''), ('2/6/2016 23:11:25', 'Minal Sawant', 'Vidyalankar', '9167137386', '-', '1', '(100/-)', 'Score', 'Carrom (Doubles)', '', ''), ('2/6/2016 23:12:18', 'Priya Patil', 'Vasantdada Patil', '8879223781', '-', '0', '(50/-)', 'Score', 'Chess', '', ''), ('2/7/2016 15:28:18', 'Abdul Rehman', 'Rizvi', '9702213118', '-', '1', '(150/-)(left-50/-)', 'Score', 'Badminton Boys (Double)', '', ''), ('2/7/2016 16:00:13', 'Abdul Rehman', 'Rizvi', '9702213118', '-', '0', '(50/-)(left-50/-)', 'Score', 'Badminton Boys (Single)', '', ''), ('2/7/2016 16:02:08', 'Payodhi', 'Rizvi', '9769960933', '-', '0', '(50/-)(left-50/-)', 'Score', 'Badminton Girls (Single)', '', ''), ('2/7/2016 16:06:46', 'Bhushan Navgire', 'Kc', '7045035626', 'Be-It', '0', '50/-', 'Surge', '', '', 'NFS'), ('2/7/2016 16:35:31', 'Umer Khan', 'Rizvi', '9820594045', '-', '0', '(200/-)(left-100/-)', 'Surge', '', '', 'Neon Cricket'), ('2/7/2016 16:36:53', 'Sadhana Jadhav', 'Vasantdada Patil', '9819503497', '-', '0', '(50/-)(left-50/-)', 'Surge', '', '', 'Masterchef'), ('2/7/2016 17:19:37', 'Rajvee Shah', 'DJ Sanghvi', '9323613514', '-', '0', '(15/-)(left-30/-)', 'Surge', '', '', 'Art and Culture'); -- -------------------------------------------------------- -- -- Table structure for table `results` -- CREATE TABLE `results` ( `Id` int(5) NOT NULL, `Class` varchar(10) NOT NULL, `Class_sess` varchar(10) NOT NULL, `Url` varchar(100) NOT NULL, `date_selected` date NOT NULL, `Syllabus` varchar(30) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `results` -- INSERT INTO `results` (`Id`, `Class`, `Class_sess`, `Url`, `date_selected`, `Syllabus`) VALUES (5, 'af', 'adsf', '../uploads/media/pdf/Question Bank.pdf', '0000-00-00', 'fsda'); -- -------------------------------------------------------- -- -- Table structure for table `sponsors` -- CREATE TABLE `sponsors` ( `SponsorId` int(11) NOT NULL, `SponsorName` varchar(50) NOT NULL, `URL` varchar(120) NOT NULL, `type` varchar(50) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sponsors` -- INSERT INTO `sponsors` (`SponsorId`, `SponsorName`, `URL`, `type`) VALUES (2, 'Vodafone', 'http://www.vodafone.com', ''), (3, 'Samsung', 'http://www.samsung.com', ''); -- -------------------------------------------------------- -- -- Table structure for table `updates` -- CREATE TABLE `updates` ( `id` int(11) NOT NULL, `UpdateTitle` varchar(20) NOT NULL, `UpdateDescription` varchar(50) NOT NULL, `ImagePath` varchar(120) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `updates` -- INSERT INTO `updates` (`id`, `UpdateTitle`, `UpdateDescription`, `ImagePath`) VALUES (2, 'asdfffssadfaf', 'dsfa', '../uploads/updates/index.jpg'); -- -------------------------------------------------------- -- -- Table structure for table `user` -- CREATE TABLE `user` ( `Fullname` varchar(30) NOT NULL, `Username` varchar(100) NOT NULL, `BranchnYear` varchar(20) NOT NULL, `College` varchar(40) NOT NULL, `Contact` varchar(10) NOT NULL, `EventType` varchar(15) NOT NULL, `EventRegistered` varchar(30) NOT NULL, `ConfirmationStatus` varchar(1) NOT NULL, `id` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `user` -- INSERT INTO `user` (`Fullname`, `Username`, `BranchnYear`, `College`, `Contact`, `EventType`, `EventRegistered`, `ConfirmationStatus`, `id`) VALUES ('Badal Kotak', 'badalkotak', 'SEIT', 'KJSIEIT', '9820003397', 'Event 2', 'Event2 Name 2', 'Y', 20), ('Badal Kotak', 'badalkotak', 'SEIT', 'KJSIEIT', '9820003397', 'Event 3', 'Event3 Name 2', 'Y', 22), ('Badal Kotak', 'badalkotak', 'SEIT', 'KJSIEIT', '9820003397', 'Event 3', 'Event3 Name 3', 'Y', 23), ('Nir J', 'nj@gmail.com', 'SEIT', 'SAKEC', '8877665544', 'Event 1', 'Event1 Name 1', 'N', 24), ('Nir J', 'nj@gmail.com', 'SEIT', 'SAKEC', '8877665544', 'Event 1', 'Event1 Name 2', 'N', 25); -- -- Indexes for dumped tables -- -- -- Indexes for table `admins` -- ALTER TABLE `admins` ADD PRIMARY KEY (`AdminId`); -- -- Indexes for table `admission` -- ALTER TABLE `admission` ADD PRIMARY KEY (`Id`); -- -- Indexes for table `noticeboard` -- ALTER TABLE `noticeboard` ADD PRIMARY KEY (`id`); -- -- Indexes for table `results` -- ALTER TABLE `results` ADD PRIMARY KEY (`Id`); -- -- Indexes for table `sponsors` -- ALTER TABLE `sponsors` ADD PRIMARY KEY (`SponsorId`); -- -- Indexes for table `updates` -- ALTER TABLE `updates` ADD PRIMARY KEY (`id`); -- -- Indexes for table `user` -- ALTER TABLE `user` ADD PRIMARY KEY (`id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `admins` -- ALTER TABLE `admins` MODIFY `AdminId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `admission` -- ALTER TABLE `admission` MODIFY `Id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT for table `noticeboard` -- ALTER TABLE `noticeboard` MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12; -- -- AUTO_INCREMENT for table `results` -- ALTER TABLE `results` MODIFY `Id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; -- -- AUTO_INCREMENT for table `sponsors` -- ALTER TABLE `sponsors` MODIFY `SponsorId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; -- -- AUTO_INCREMENT for table `updates` -- ALTER TABLE `updates` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT for table `user` -- ALTER TABLE `user` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=26; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
true
9471ebbdbe371bfc03874a2294147a42d4774254
SQL
cezary-ptaszek/spring_library_v2
/src/main/resources/schema.sql
UTF-8
837
3.84375
4
[]
no_license
CREATE TABLE Books( id BIGINT AUTO_INCREMENT PRIMARY KEY, title VARCHAR(200) NOT NULL, author_id BIGINT NOT NULL ); CREATE TABLE Authors( id BIGINT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(200) NOT NULL, surname VARCHAR(200) NOT NULL ); CREATE TABLE Readers( id BIGINT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(200) NOT NULL, surname VARCHAR(200) NOT NULL ); CREATE TABLE Orders( id BIGINT AUTO_INCREMENT PRIMARY KEY, book_id BIGINT NOT NULL, reader_id BIGINT NOT NULL ); ALTER TABLE Books ADD CONSTRAINT books_author_id FOREIGN KEY (author_id) REFERENCES authors(id); ALTER TABLE Orders ADD CONSTRAINT orders_book_id FOREIGN KEY (book_id) REFERENCES books(id); ALTER TABLE Orders ADD CONSTRAINT orders_reader_id FOREIGN KEY (reader_id) REFERENCES readers(id);
true
1af5f6ae329ff0ca9073672f7d719d7e1fe7457d
SQL
eatsleeppl4y/PortfolioProjects
/coviddeathsproject.sql
UTF-8
3,990
4.21875
4
[]
no_license
use Portfolio; SELECT * FROM CovidDeaths where continent is not null order by 3,4 --SELECT * --FROM Portfolio..CovidVacs --order by 3,4 -- select data that we are going to be using Select location, date, total_cases, new_cases, total_deaths, population From Portfolio..CovidDeaths order by 1, 2 -- looking at total cases vs total deaths -- shows the likelihoodof dying if you contract covid in your country Select location, date, total_cases, total_deaths, (total_deaths/total_cases)*100 as DeathPercentage From Portfolio..CovidDeaths where location = 'United States' order by 1, 2 -- looking at total cases vs populaion -- shows what percentage of population contracted covid Select location, date, population, total_cases, (total_cases/population)*100 as PercentPopulationInfected From Portfolio..CovidDeaths where location = 'South Korea' order by 1, 2 -- looking at countries with the highest infection rate compared to population Select location, max(total_cases) as HighestInfectionCount, max((total_cases/population))*100 as PercentPopulationInfected From Portfolio..CovidDeaths -- where location = 'South Korea' Group by population, location order by PercentPopulationInfected desc -- shows countries with the highest death count per population Select Location, max(cast(total_deaths as int)) as TotalDeathCount, max(total_deaths/population)*100 as TotalDeathPercent From Portfolio..CovidDeaths where continent is not null group by location, population order by TotalDeathCount -- break things down by continent -- showing continents with the highest death count per population Select Continent, max(cast(total_deaths as int)) as TotalDeathCount From Portfolio..CovidDeaths where continent is not null group by continent order by TotalDeathCount desc -- global numbers Select sum(new_cases) as Total_Cases, sum(cast(new_deaths as int)) as Total_Deaths, sum(cast(new_deaths as int))/sum(new_cases)*100 as DeathPercentage --total_cases, --total_deaths, --(total_deaths/total_cases)*100 as DeathPercentage From Portfolio..CovidDeaths where continent is not null --group by date order by 1, 2 -- total population vs vaccinations With popvsvac (continent, location, date, population, new_vaccinations, rollingpeoplevacs) as ( select dea.continent, dea.location, dea.date, dea.population, vac.new_vaccinations, SUM(CONVERT(int, vac.new_vaccinations)) OVER (Partition by dea.location Order by dea.location, dea.date) as RollingPeopleVacs from CovidDeaths dea Join CovidVacs vac on dea.location = vac.location and dea.date = vac.date where dea.continent is not null --order by 2, 3 ) select *, (rollingpeoplevacs/population) * 100 from popvsvac -- temp table create table #percentpopulationvaccinated ( continent varchar(255), location varchar(255), date datetime, population int, new_vaccinations int, rollingpeoplevacs int ) insert into #percentpopulationvaccinated select dea.continent, dea.location, dea.date, dea.population, vac.new_vaccinations, SUM(CONVERT(int, vac.new_vaccinations)) OVER (Partition by dea.location Order by dea.location, dea.date) as RollingPeopleVacs from CovidDeaths dea Join CovidVacs vac on dea.location = vac.location and dea.date = vac.date --where dea.continent is not null --order by 2, 3 select *, (rollingpeoplevacs/population) * 100 from #percentpopulationvaccinated -- creating view to store data for later visualtions create view percentpopulationvaccinated as select dea.continent, dea.location, dea.date, dea.population, vac.new_vaccinations, SUM(CONVERT(int, vac.new_vaccinations)) OVER (Partition by dea.location Order by dea.location, dea.date) as RollingPeopleVacs from CovidDeaths dea Join CovidVacs vac on dea.location = vac.location and dea.date = vac.date where dea.continent is not null --order by 2, 3
true
d82639010bb34044876785d7b22ae17e6ec31a22
SQL
ripples3/index-coop-analytics
/product/uniswap-price-impacts/wbtc-eth-price-impacts.sql
UTF-8
5,832
4.25
4
[ "MIT" ]
permissive
-- https://duneanalytics.com/queries/75887 -- v2 vs v3 Price Impact (WBTC:ETH) WITH v2 AS ( with params as ( select 8 as dec0 ,18 as dec1 , '\x2260fac5e5542a773aa44fbcfedf7c193bc2c599'::bytea as token0 , '\xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'::bytea as token1 , '\xbb2b8038a1640196fbe3e38816f3e67cba72d940'::bytea as pool ) , swap as ( select evt_block_time as swap_time ,"amount0In"/10^p.dec0 as amount0in ,"amount1In"/10^p.dec1 as amount1in ,"amount0Out"/10^p.dec0 as amount0out ,"amount1Out"/10^p.dec1 as amount1out ,concat(evt_block_number, coalesce(lpad(evt_index::text,3,'0'), '00')) as ky --key to join on so order of transactions is known even inside the block from uniswap_v2."Pair_evt_Swap" swap inner join params p on p.pool = swap.contract_address where date_trunc('day', evt_block_time) > '2021-04-01' -- for testing ) , sync as ( select evt_block_time as sync_time ,reserve0/10^p.dec0 as reserve0 ,reserve1/10^p.dec1 as reserve1 ,(reserve0/10^p.dec0 * pr0.price) + (reserve1/10^p.dec1 * pr1.price) AS reserves_usd ,concat(evt_block_number, coalesce(lpad(evt_index::text,3,'0'), '00')) as ky --key to join on so order of transactions is known even inside the block from uniswap_v2."Pair_evt_Sync" sync inner join params p on p.pool = sync.contract_address left join prices.usd pr0 ON date_trunc('minute', evt_block_time) = pr0.minute AND p.token0 = pr0.contract_address left join prices.usd pr1 ON date_trunc('minute', evt_block_time) = pr1.minute AND p.token1 = pr1.contract_address where date_trunc('day', evt_block_time) > '2021-04-01' -- for testing ) -- objective of sync_swap CTE: get the last synced reserves right before the swap , sync_swap as ( select * from ( select a.* ,rank() over(partition by ky order by order_diff asc) as order_rnk from ( select a.* ,b.sync_time ,b.ky as bky ,cast(a.ky as decimal(12,0)) - cast(b.ky as decimal(12,0)) as order_diff ,b.reserve0 ,b.reserve1 ,b.reserves_usd ,b.reserve0 - a.amount0in as pre_swap_reserve0 ,b.reserve1 + amount1out as pre_swap_reserve1 ,(b.reserve1 + amount1out)/(b.reserve0 - a.amount0in) as price_pre_swap from swap a inner join sync b on a.ky > b.ky and date_trunc('day', swap_time) = date_trunc('day', sync_time) ) a ) a where 1=1 and order_rnk = 1 and amount0in > 0 -- only looking at sales of WBTC ) , price_impact as ( select swap_time ,sync_time ,reserves_usd ,amount0in + amount0out AS amount0_actual ,amount1out + amount1in AS amount1_actual ,((amount1out + amount1in)/(amount0in + amount0out)) as swap_price ,price_pre_swap ,((((amount1out + amount1in)/(amount0in + amount0out)) - price_pre_swap)/price_pre_swap) * 100 as price_impact_percentage from sync_swap where abs(amount0in + amount0out) > 2 ) select swap_time AS time ,'v2' AS version ,abs(amount0_actual) AS btc ,reserves_usd ,abs(price_impact_percentage) AS price_impact from price_impact ), v3 AS ( with params as ( select 8 as dec0 ,18 as dec1 , '\xcbcdf9626bc03e24f779434178a73a0b4bad62ed'::bytea as pool ) , price_impact as ( select * ,((price_paid - pre_swap_price)/pre_swap_price) * 100 as price_impact_percentage from ( select * ,lag(post_swap_price) over(partition by contract_address order by evt_block_number asc) as pre_swap_price -- This is simply a lag of post swap price. The post swap price of previous trade is the pre swap price of current trade from ( select evt_block_time ,evt_block_number ,contract_address ,amount0/10^p.dec0 as amount0_actual ,amount1/10^p.dec1 as amount1_actual ,liquidity ,abs(amount1/10^p.dec1)/abs(amount0/10^p.dec0) as price_paid --quantity_y/quantity_x is the price paid for the swap ,((power("sqrtPriceX96",2) * 10^(p.dec0-p.dec1)) / (2^(96*2))) as post_swap_price -- As per docs, sqrtPriceX96 records the sqrt(price) after the swap from uniswap_v3."Pair_evt_Swap" swap inner join params p on p.pool = swap.contract_address ) a where abs(amount0_actual) > 2 ) a ) select evt_block_time AS time ,'v3' AS version ,abs(amount0_actual) AS btc ,liquidity AS reserves_usd ,abs(price_impact_percentage) AS price_impact from price_impact ), trades AS ( SELECT * FROM v2 UNION ALL SELECT * FROM v3 ) SELECT * FROM trades
true
015adbf7e06e77832003d5e9acc4bc13bd247dba
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/low/day12/select1724.sql
UTF-8
178
2.65625
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o WHERE timestamp>'2017-11-11T17:24:00Z' AND timestamp<'2017-11-12T17:24:00Z' AND temperature>=41 AND temperature<=93
true
9ada755d6baddbab6169a14eadbff85938ff1a56
SQL
JoparatonSIG/MuseoWalter
/doc/db/migracion/tipoanalisis.sql
UTF-8
334
2.859375
3
[ "MIT" ]
permissive
INSERT INTO museotest.tipoanalisis ( id, tipo, subtipo, valorPredeterminado, creacion, modifica ) SELECT IdTipo, Tipo, Subtipo, ValorPredeter, now(), now() FROM original.analisistipo ori LEFT OUTER JOIN museotest.tipoanalisis o ON (ori.IdTipo = o.id) ORDER BY ori.IdTipo ASC;
true
526a65ffda2a8c5df770696fd7066fb43650df3f
SQL
subhashsubramanyam-mitel/sqlserver_db_projects
/FinanceBI/invoice/Views/VwIncrMRRbase_EX_Aggregate.sql
UTF-8
1,788
3.9375
4
[]
no_license
 -- SELECT * FROM [invoice].[VwIncrMRRbase_EX_Aggregate] CREATE VIEW [invoice].[VwIncrMRRbase_EX_Aggregate] AS -- ActiveMRR and InvoiceCounts for Invoices SELECT A.[Ac Id] AS AccountId ,IA.InvoiceMonth ,SUM(coalesce(IA.CurCharge, 0.0)) AS ActiveMRR ,coalesce(COUNT(1), 0) Num FROM invoice.MonthlyIACP IA INNER JOIN oss.VwServiceProduct_Ranked_EX S ON s.ServiceId = IA.ServiceId AND s.productId = coalesce(IA.curProductId, IA.LastProductId) AND S.RankNum = 1 LEFT JOIN company.Location L WITH (NOLOCK) ON L.Id = s.LocationId LEFT JOIN company.VwAccount A WITH (NOLOCK) ON A.[Ac Id] = s.AccountId LEFT JOIN oss.[Order] o WITH (NOLOCK) ON o.id = IA.OrderId LEFT JOIN enum.DimDate D ON D.DATE = IA.InvoiceMonth INNER JOIN ( SELECT DateAdd(month, 1, dbo.UfnFirstOfMonth(getdate())) NextMonth ) M ON 1 = 1 WHERE IA.Category != 'Close' GROUP BY A.[Ac Id] ,IA.InvoiceMonth UNION ALL -- Expected ActiveMRR for Invoice SELECT A.[Ac Id] AS AccountId ,IA.InvoiceMonth ,SUM(coalesce(IA.CurCharge, 0.0)) AS ActiveMRR ,coalesce(COUNT(1), 0) Num FROM expinvoice.IncrIACP IA INNER JOIN oss.VwServiceProduct_Ranked_EX S ON s.ServiceId = IA.ServiceId AND s.productId = coalesce(IA.curProductId, IA.LastProductId) AND S.RankNum = 1 LEFT JOIN company.Location L WITH (NOLOCK) ON L.Id = s.LocationId LEFT JOIN company.VwAccount A WITH (NOLOCK) ON A.[Ac Id] = s.AccountId LEFT JOIN oss.[Order] o WITH (NOLOCK) ON o.id = IA.OrderId LEFT JOIN enum.DimDate D ON D.DATE = IA.InvoiceMonth INNER JOIN ( SELECT DateAdd(month, 1, dbo.UfnFirstOfMonth(getdate())) NextMonth ) M ON 1 = 1 WHERE IA.Category != 'Close' AND cast(getdate() AS DATE) NOT IN ( DATEADD(m, DATEDIFF(m, 0, GETDATE()), 0) ,DATEADD(DAY, 1, DATEADD(m, DATEDIFF(m, 0, GETDATE()), 0)) ) GROUP BY A.[Ac Id] ,IA.InvoiceMonth
true
b3420df671f0f4fccd273c0c240cde926264b49a
SQL
furoyce/test_cases
/PLSQL_Exception_handler.sql
UTF-8
1,555
3.359375
3
[ "MIT" ]
permissive
--Main-- begin prova_proc; exception when others then dbms_output.put_line('[MAIN] unhandled exception:' || sqlerrm); end; / SELECT * FROM prova; truncate table prova; --END Main-- --Procedure for Exception Handler test case-- create or replace procedure prova_proc is --SQLCODE l_err_num number; --SQLERRM l_err_desc varchar2(100); --TEST Result test_err varchar2(10) := 'TEST_ERR'; this_violation_exception exception; PRAGMA EXCEPTION_INIT(this_violation_exception, -88888); begin insert into prova values(1); SAVEPOINT A; insert into prova values(2); insert into prova values(1); commit; IF (test_err = 'TEST_ERR') THEN RAISE this_violation_exception; END IF; EXCEPTION WHEN this_violation_exception THEN l_err_num := SQLCODE; l_err_desc := SQLERRM; dbms_output.put_line('[ERR] violation exception!!!'||l_err_num||' : '||l_err_desc); RAISE; WHEN OTHERS THEN l_err_num := SQLCODE; l_err_desc := SQLERRM; DBMS_OUTPUT.PUT_LINE('[ERROR]'||l_err_num||' : '||l_err_desc); DBMS_OUTPUT.PUT_LINE('SQLCODE :'||l_err_num); DBMS_OUTPUT.PUT_LINE('SQLERRM :'||l_err_desc); ROLLBACK to A; SELECT COD INTO test_err from prova; DBMS_OUTPUT.PUT_LINE('TEST_ERR :'||test_err); RAISE; insert into prova values(3); commit; end; / SELECT * FROM prova; truncate table prova; --Configuration select * from user_tables; --drop table prova; create table prova (cod number); alter table prova add constraint pk_prova primary key (cod);
true
876ad8b6bb8e5fb831451839943e1b683e494bb5
SQL
ProfDema/uam
/pam/examples/anon_data/group_0077/q2.sql
UTF-8
762
3.609375
4
[]
no_license
truncate query2; CREATE TEMP VIEW Table2 AS SELECT ord.oid AS oid, ord.pid AS pid, ord.shipwid AS wid, ord.quantity AS ordqty, stock.quantity AS stockqty FROM orders ord JOIN stock ON ord.shipwid = stock.wid AND ord.pid = stock.pid WHERE status = 'O' AND ord.quantity > stock.quantity; CREATE TEMP VIEW NotInStock AS SELECT oid AS oid, ord.pid AS pid, shipwid AS wid, ord.quantity AS ordqty, 0 AS stockqty FROM orders ord WHERE ord.quantity > 0 AND status = 'O' AND NOT EXISTS(SELECT * FROM stock WHERE ord.shipwid = stock.wid AND ord.pid = stock.pid); INSERT INTO Query2 (SELECT * FROM Table2 UNION ALL SELECT * FROM NotInStock); DROP VIEW NotInStock; DROP VIEW Table2; select * from query2;
true
ebba933415f9f0342879f8d1a9f84aaecdd8cdc4
SQL
cadeparkhurst/DnDatabase
/Stored Proc Scripts/getNumLanguages.sql
UTF-8
335
3.59375
4
[]
no_license
CREATE PROCEDURE getNumLangs @CharacterID int AS BEGIN IF NOT EXISTS (SELECT * FROM Character WHERE CharacterID=@CharacterID) BEGIN RAISERROR('That character does not exist',14,1) RETURN 1 END SELECT b.NumLanguagesGained FROM Character c JOIN Background b ON b.Name = c.Background WHERE c.CharacterID = @CharacterID END
true
00316ee37c24785d32ebc6172585b0fa8a05cd3d
SQL
weathered/Blood-Donor-Database
/blooddonordatabase.sql
UTF-8
2,198
3.125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Dec 20, 2015 at 03:02 AM -- Server version: 10.1.9-MariaDB -- PHP Version: 5.6.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `blooddonordatabase` -- -- -------------------------------------------------------- -- -- Table structure for table `admintable` -- CREATE TABLE `admintable` ( `username` varchar(20) NOT NULL, `password` varchar(20) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `admintable` -- INSERT INTO `admintable` (`username`, `password`) VALUES ('abc', 'abc'); -- -------------------------------------------------------- -- -- Table structure for table `donortable` -- CREATE TABLE `donortable` ( `id` int(255) NOT NULL, `name` varchar(30) NOT NULL, `email` varchar(60) NOT NULL, `contactNumber` varchar(14) NOT NULL, `address` varchar(100) NOT NULL, `bloodgroup` varchar(3) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `donortable` -- INSERT INTO `donortable` (`id`, `name`, `email`, `contactNumber`, `address`, `bloodgroup`) VALUES (1, 'Mohammad Al-Amin', 'alamin.nirob@gmail.com', '01675362998', 'Dhaka', 'A+'), (2, 'Mashroor Ahmed', 'mashoorahmed31@gmail.com', '01521332482', 'Dhaka', 'B+'), (3, 'Saadman Avik', 'saadmanavik1081@gmail.com ', '01751999221', 'Dhaka', 'O+'), (4, 'MD Shadman Tanjim', 'shadman0545@gmail.com', '01911305201', 'Dhaka', 'A+'), (5, 'Sami', 'sk.sami.aljabar@gmail.com ', '01720345155', 'Dhaka', 'O+'), (6, 'Ashik Mahmud', 'ashikmahmud41@gmail.com', '01620117012', 'Dhaka', 'B+'), (7, 'Saqib', 'fattahsaqib@gmail.com', '01682028900', 'Dhaka', 'O+'), (8, 'Abid Hassan', 'hassanabidtokee@gmail.com', '+8801677032780', 'Dhaka', 'A+'); -- -- Indexes for dumped tables -- -- -- Indexes for table `donortable` -- ALTER TABLE `donortable` ADD PRIMARY KEY (`id`); /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
true
6d44dad3147eb5003c7d9bf466dc52867065d2c7
SQL
Fujiatma/Simple-API-Getter
/database/homecredit.sql
UTF-8
8,890
3.171875
3
[]
no_license
/* SQLyog Community v12.5.0 (64 bit) MySQL - 10.1.38-MariaDB : Database - homecredit ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; CREATE DATABASE /*!32312 IF NOT EXISTS*/`homecredit` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `homecredit`; /*Table structure for table `category` */ DROP TABLE IF EXISTS `category`; CREATE TABLE `category` ( `category_id` int(11) NOT NULL, `group_id` int(11) NOT NULL, `module_name` varchar(255) DEFAULT NULL, `module_order` int(11) NOT NULL, `description` varchar(255) DEFAULT NULL, `created_at` datetime DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, `updated_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`category_id`), KEY `group_id` (`group_id`), CONSTRAINT `category_ibfk_1` FOREIGN KEY (`group_id`) REFERENCES `user_group` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*Data for the table `category` */ insert into `category`(`category_id`,`group_id`,`module_name`,`module_order`,`description`,`created_at`,`updated_at`) values (1,1,'PromoCard',1,'Belongs to the user A','2019-07-16 09:09:53','2019-07-16 09:09:53'), (2,1,'CategoryCard',2,'Belongs to the user A','2019-07-16 09:10:14','2019-07-16 09:10:14'), (3,1,'FlashSaleCard',3,'Belongs to the user A','2019-07-16 09:14:59','2019-07-16 09:14:59'), (4,1,'HistoryCard',4,'Belongs to the user A','2019-07-16 09:15:52','2019-07-16 09:15:52'), (5,1,'NewsCard',5,'Belongs to the user A','2019-07-16 09:15:54','2019-07-16 09:15:54'), (6,2,'PromoCard',1,'Belongs to the user B','2019-07-16 09:11:59','2019-07-16 09:11:59'), (7,2,'NewsCard',2,'Belongs to the user B','2019-07-16 09:15:56','2019-07-16 09:15:56'), (8,2,'FlashSaleCard',3,'Belongs to the user B','2019-07-16 09:15:58','2019-07-16 09:15:58'), (9,2,'CategoryCard',4,'Belongs to the user B','2019-07-16 09:15:59','2019-07-16 09:15:59'), (10,2,'NewsCard',5,'Belongs to the user B','2019-07-16 09:16:01','2019-07-16 09:16:01'), (11,3,'PromoCard',1,'Belongs to the user C','2019-07-16 09:16:03','2019-07-16 09:16:03'), (12,3,'FlashSaleCard',2,'Belongs to the user C','2019-07-16 09:13:46','2019-07-16 09:13:46'), (13,3,'CategoryCard',3,'Belongs to the user C','2019-07-16 09:16:04','2019-07-16 09:16:04'), (14,3,'NewsCard',4,'Belongs to the user C','2019-07-16 09:16:06','2019-07-16 09:16:06'), (15,3,'HistoryCard',5,'Belongs to the user C','2019-07-16 09:16:11','2019-07-16 09:16:11'); /*Table structure for table `contact` */ DROP TABLE IF EXISTS `contact`; CREATE TABLE `contact` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `email` varchar(255) DEFAULT NULL, `name` varchar(255) DEFAULT NULL, `phone` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=51 DEFAULT CHARSET=latin1; /*Data for the table `contact` */ insert into `contact`(`id`,`email`,`name`,`phone`) values (41,'contact1@email.com','Contact 1','(111) 111-1111'), (42,'contact2@email.com','Contact 2','(111) 111-1111'), (43,'contact3@email.com','Contact 3','(111) 111-1111'), (44,'contact4@email.com','Contact 4','(111) 111-1111'), (45,'contact5@email.com','Contact 5','(111) 111-1111'), (46,'contact6@email.com','Contact 6','(111) 111-1111'), (47,'contact7@email.com','Contact 7','(111) 111-1111'), (48,'contact8@email.com','Contact 8','(111) 111-1111'), (49,'contact9@email.com','Contact 9','(111) 111-1111'), (50,'contact10@email.com','Contact 10','(111) 111-1111'); /*Table structure for table `flash_sale` */ DROP TABLE IF EXISTS `flash_sale`; CREATE TABLE `flash_sale` ( `flash_sale_id` varchar(255) NOT NULL, `created_at` datetime DEFAULT NULL, `description` varchar(255) DEFAULT NULL, `end_at` datetime DEFAULT NULL, `name` varchar(255) DEFAULT NULL, `productid` varchar(255) DEFAULT NULL, `promo_id` varchar(255) DEFAULT NULL, `quantity` int(11) NOT NULL, `start_at` datetime DEFAULT NULL, `status` bit(1) NOT NULL, `updated_at` datetime DEFAULT NULL, `product_id` varchar(255) DEFAULT NULL, PRIMARY KEY (`flash_sale_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*Data for the table `flash_sale` */ /*Table structure for table `news` */ DROP TABLE IF EXISTS `news`; CREATE TABLE `news` ( `id` varchar(255) NOT NULL, `created_at` datetime DEFAULT NULL, `end_at` datetime DEFAULT NULL, `head_line` varchar(255) DEFAULT NULL, `news_content` varchar(255) DEFAULT NULL, `start_at` datetime DEFAULT NULL, `status` bit(1) NOT NULL, `updated_at` datetime DEFAULT NULL, `news_id` varchar(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*Data for the table `news` */ /*Table structure for table `order` */ DROP TABLE IF EXISTS `order`; CREATE TABLE `order` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_id` varchar(255) DEFAULT NULL, `product_id` int(11) DEFAULT NULL, `promo_id` varchar(255) DEFAULT NULL, `flash_sale_id` varchar(255) DEFAULT NULL, `quantity` bigint(20) DEFAULT NULL, `price_order` double DEFAULT NULL, `created_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, `updated_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*Data for the table `order` */ /*Table structure for table `product` */ DROP TABLE IF EXISTS `product`; CREATE TABLE `product` ( `id` int(11) NOT NULL AUTO_INCREMENT, `product_name` varchar(50) DEFAULT NULL, `quantity` bigint(20) DEFAULT NULL, `price` double DEFAULT NULL, `product_category` varchar(50) DEFAULT NULL, `created_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, `updated_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*Data for the table `product` */ /*Table structure for table `promo` */ DROP TABLE IF EXISTS `promo`; CREATE TABLE `promo` ( `promo_id` varchar(255) NOT NULL, `created_at` datetime DEFAULT NULL, `description` varchar(255) DEFAULT NULL, `end_at` datetime DEFAULT NULL, `name` varchar(255) DEFAULT NULL, `start_at` datetime DEFAULT NULL, `status` bit(1) NOT NULL, `type` varchar(255) DEFAULT NULL, `updated_at` datetime DEFAULT NULL, PRIMARY KEY (`promo_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*Data for the table `promo` */ /*Table structure for table `transaction_history` */ DROP TABLE IF EXISTS `transaction_history`; CREATE TABLE `transaction_history` ( `th_id` varchar(255) NOT NULL, `created_at` datetime DEFAULT NULL, `orderid` varchar(255) DEFAULT NULL, `status` varchar(255) DEFAULT NULL, `user_id` varchar(255) DEFAULT NULL, PRIMARY KEY (`th_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*Data for the table `transaction_history` */ /*Table structure for table `user` */ DROP TABLE IF EXISTS `user`; CREATE TABLE `user` ( `user_id` varchar(255) NOT NULL, `group_id` int(11) NOT NULL, `name` varchar(255) DEFAULT NULL, `email` varchar(255) DEFAULT NULL, `username` varchar(255) DEFAULT NULL, `password` varchar(255) DEFAULT NULL, `created_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, `updated_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`user_id`), KEY `group_id` (`group_id`), CONSTRAINT `user_ibfk_1` FOREIGN KEY (`group_id`) REFERENCES `user_group` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*Data for the table `user` */ insert into `user`(`user_id`,`group_id`,`name`,`email`,`username`,`password`,`created_at`,`updated_at`) values ('u001',1,'fujiatma','fujiatma@gmail.com','fuji','fuji123','2019-07-16 10:19:08','2019-07-16 10:19:08'), ('u002',2,'yusuf','yusuf@gmail.com','yusuf','yusuf123','2019-07-16 10:19:12','2019-07-16 10:19:12'), ('u003',3,'dian','dian@gmail.com','dian','dian123','2019-07-16 10:19:17','2019-07-16 10:19:17'); /*Table structure for table `user_group` */ DROP TABLE IF EXISTS `user_group`; CREATE TABLE `user_group` ( `id` int(11) NOT NULL AUTO_INCREMENT, `group_name` varchar(50) DEFAULT NULL, `created_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, `updated_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `group_id` (`group_name`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1; /*Data for the table `user_group` */ insert into `user_group`(`id`,`group_name`,`created_at`,`updated_at`) values (1,'UserA','2019-07-15 15:47:47','2019-07-15 15:47:47'), (2,'UserB','2019-07-15 15:47:50','2019-07-15 15:47:50'), (3,'UserC','2019-07-15 15:47:53','2019-07-15 15:47:53'); /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
true
e4f120a5412540ac70798f5cba4d3f905657c6d9
SQL
OHDSI/WebAPI
/src/main/resources/resources/evidence/sql/negativecontrols/exportNegativeControls.sql
UTF-8
1,535
3.359375
3
[ "Apache-2.0" ]
permissive
INSERT INTO @cem_results_schema.NC_RESULTS ( concept_set_id, negative_control, outcome_of_interest_concept_id, outcome_of_interest_concept_name, sort_order, descendant_pmid_cnt, exact_pmid_cnt, parent_pmid_cnt, ancestor_pmid_cnt, ind_ci, too_broad, drug_induced, pregnancy, descendant_splicer_cnt, exact_splicer_cnt, parent_splicer_cnt, ancestor_splicer_cnt, descendant_faers_cnt, exact_faers_cnt, parent_faers_cnt, ancestor_faers_cnt, user_excluded, user_included, optimized_out, not_prevalent ) select @conceptSetId, CASE WHEN o.OPTIMIZED = 1 THEN 1 ELSE 0 END NEGATIVE_CONTROL, d.outcome_of_interest_concept_id, d.outcome_of_interest_concept_name, d.sort_order, d.descendant_pmid_count, d.exact_pmid_count, d.parent_pmid_count, d.ancestor_pmid_count, d.ind_ci, d.too_broad, d.drug_induced, d.pregnancy, d.DESCENDANT_SPLICER, d.EXACT_SPLICER, d.PARENT_SPLICER, d.ANCESTOR_SPLICER, d.DESCENDANT_FAERS, d.EXACT_FAERS, d.PARENT_FAERS, d.ANCESTOR_FAERS, d.user_excluded, d.user_included, CASE WHEN o.OPTIMIZED = 0 AND o.NOT_PREVELANT = 0 THEN 1 ELSE 0 END OPTIMIZED_OUT, CASE WHEN o.NOT_PREVELANT = 1 THEN 1 ELSE 0 END NOT_PREVALENT FROM #NC_SUMMARY d LEFT OUTER JOIN #NC_SUMMARY_OPTIMIZED o ON d.OUTCOME_OF_INTEREST_CONCEPT_ID = o.OUTCOME_OF_INTEREST_CONCEPT_ID {@outcomeOfInterest == 'drug'}?{ WHERE d.OUTCOME_OF_INTEREST_CONCEPT_ID IN ( SELECT CONCEPT_ID FROM @vocabulary.CONCEPT WHERE DOMAIN_ID = 'Drug' AND CONCEPT_CLASS_ID = 'Ingredient' ) } ;
true
ca0ea1bc7901219557271f32ce7fd329a5fc5cd4
SQL
satishreddy406/sql-queries
/Srikanth/SQLpracticeFinal.sql
UTF-8
1,577
3.578125
4
[]
no_license
show databases; create database customerdb; use customerdb; drop database customerdb; create table Patient(id int,first_name varchar(50),middle_name varchar(50),last_name varchar(50),phone_number nvarchar(50),email varchar(50)); insert into Patient values(1,'Srikanth','Reddy','Gurram',991234567,'srikanth@gmail.com'); insert into Patient values(2,'vishnu','Reddy','S',9912346138,'vishnu@gmail.com'); insert into Patient values(3,'satya','Narayana','N',8484848484,'satya@gmail.com'); insert into Patient(id,first_name,middle_name,email) values(4,'sreeshanth','joshi','sreeshant@gmail.com'); select * from Patient; select * from Patient where id=2; select * from Patient where id=2 and first_name ='vishnu'; select * from Patient where id=2 or first_name ='vishnu'; select * from Patient where id=2 or first_name ='vishnu' or email = 'satya@gmail.com'; select * from Patient where id IN(1,2); delete from Patient where middle_name ='joshi'; delete from Patient where id = 1; delete from Patient where id = 2 AND first_name = 'Srikanth'; delete from Patient where id = 2 OR first_name = 'Srikanth'; delete from Patient where id !=2; delete from Patient where id =2 AND first_name ='Srikanth' OR last_name = 'N'; update Patient set phone_number = 912121212 where middle_name = 'joshi'; update Patient set last_name = 'A' where phone_number = 912121212; select * from Patient where id =2; select * from Patient where id !=2; select * from Patient where id <=2; select * from Patient where id >=2; select * from Patient where id >2; select * from Patient where id <2; SELECT * FROM Patient WHERE first_name LIKE '%h';
true
02c6953075d9c820628f74599b3ba4ff45478cdf
SQL
Istanolion/ProyectoBD
/ejecutableProceduresV3.sql
UTF-8
8,959
2.75
3
[]
no_license
--@AUTORES: GARCIAREBOLLO -- JUAREZ -- SALAZAR --@DESCRIPCION: SCRIPT ENCARGADO DE LA CREACION DE PROCEDIMIENTOS DEL PROYECTO BIBLIOTECA --@FECHA: CREATE OR REPLACE PROCEDURE spInsertAutor( vIdAutor autor.idAutor%TYPE, vNacionalidad autor.nacionalidad%TYPE, vNombre autor.nombreAutor%TYPE, vApPat autor.apPatAutor%TYPE, vApMat autor.apMatAutor%TYPE:=NULL ) AS BEGIN INSERT INTO autor VALUES (UPPER(vIdAutor),UPPER(vNacionalidad),UPPER(vNombre), UPPER(vApPat),UPPER(vApMat)); END spInsertAutor; / ---------------------------------------------------------------------------------- CREATE OR REPLACE PROCEDURE spInsertDir( vIdDir director.IdDir%TYPE, vGradoEst director.gradoEst%TYPE, vnombre director.nombreDir%TYPE, vapPat director.apPatDir%TYPE, vapMat director.apMatDir%TYPE:=NULL ) AS BEGIN INSERT INTO director VALUES (UPPER(vIdDir),UPPER(vGradoEst),UPPER(vNombre), UPPER(vApPat),UPPER(vApMat)); END spInsertDir; / ---------------------------------------------------------------------------------- CREATE OR REPLACE PROCEDURE spInsertTesis( vIdMaterial material.idMaterial%TYPE, vUbicacion material.ubicacion%TYPE, vClasificacion material.clasificacion%TYPE, vTitulo material.titulo%TYPE, vIdAutor autor.IdAutor%TYPE, vIdTesis Tesis.IdTesis%TYPE, vCarrera Tesis.Carrera%TYPE, vAnio Tesis.AnioPublicacion%TYPE, vIdDir Tesis.IdDir%TYPE ) AS BEGIN INSERT INTO material VALUES (UPPER(vIdMaterial),UPPER(vUbicacion), UPPER(vClasificacion),UPPER(vTitulo),'TESIS'); INSERT INTO tesis VALUES (UPPER(vIdMaterial),UPPER(vIdTesis),UPPER(vCarrera), UPPER(vanio),UPPER(vIdDir)); INSERT INTO autorMat VALUES (UPPER(vIdAutor),UPPER(vIdMaterial)); END spInsertTesis; / ---------------------------------------------------------------------------------- CREATE OR REPLACE PROCEDURE spInsertLibro( vIdMaterial material.idMaterial%TYPE, vUbicacion material.ubicacion%TYPE, vClasificacion material.clasificacion%TYPE, vTitulo material.titulo%TYPE, vtipoMaterial material.tipoMaterial%TYPE, vIdAutor autor.IdAutor%TYPE, vISBN libro.isbn%TYPE, vEdicion libro.edicion%TYPE, vTema libro.tema%TYPE, vAdquisicion libro.adquisicion%TYPE ) AS BEGIN INSERT INTO material VALUES (UPPER(vIdMaterial),UPPER(vUbicacion), UPPER(vClasificacion),UPPER(vTitulo),'LIBRO'); INSERT INTO libro VALUES(UPPER(vIdMaterial),UPPER(vIsbn),UPPER(vEdicion), UPPER(vTema),UPPER(vAdquisicion)); INSERT INTO autorMat VALUES (UPPER(vIdAutor),UPPER(vIdMaterial)); END spInsertLibro; / ---------------------------------------------------------------------------------- CREATE OR REPLACE PROCEDURE spInsertEjemplar( vidMaterial ejemplar.idMaterial%TYPE, vidEjem ejemplar.IdEjem%TYPE, vStatus ejemplar.status%TYPE ) AS BEGIN INSERT INTO ejemplar VALUES (UPPER(vIdMaterial),UPPER(vIdEjem),UPPER(vStatus)); END spInsertEjemplar; / ---------------------------------------------------------------------------------- CREATE OR REPLACE PROCEDURE spInsertTipoLec( vIdTipo TipoLector.IdTipo%TYPE, vRefrendos TipoLector.Refrendos%TYPE, vDiasPrest TipoLector.DiasPrest%TYPE, vLimiteMat TipoLector.LimiteMat%TYPE, vDescrip TipoLector.DescLector%TYPE ) AS BEGIN INSERT INTO TipoLector VALUES(UPPER(vIdTipo),UPPER(vRefrendos), UPPER(vDiasPrest),UPPER(vLimiteMat),UPPER(vDescrip)); END spInsertTipoLec; / ---------------------------------------------------------------------------------- CREATE OR REPLACE PROCEDURE spInsertLector( vIdLector Lector.IdLector%TYPE, vTelefono Lector.Telefono%TYPE, vCalle Lector.CalleLect%TYPE, vColonia Lector.ColoniaLect%TYPE, vDel Lector.DelLect%TYPE, vIdTipo Lector.IdTipo%TYPE, vNombre Lector.NombreLect%TYPE, vApPat Lector.ApPatLect%TYPE, vApMat Lector.ApMatLect%TYPE:=NULL ) AS BEGIN INSERT INTO lector(IdLector,Telefono,NombreLect,ApPatLect,ApMatLect, CalleLect,ColoniaLect,DelLect,IdTipo) VALUES(UPPER(vIdLector),vTelefono,UPPER(vNombre),UPPER(vApPat),UPPER(vApMat), UPPER(vCalle),UPPER(vColonia),UPPER(vDel),UPPER(vIdTipo)); END spInsertLector; / ---------------------------------------------------------------------------------- CREATE OR REPLACE PROCEDURE spPrestamo( vIdPrestamo prestamo.idPrestamo%TYPE, vIdMaterial ejemplar.idMaterial%TYPE, vIdEjem ejemplar.idEjem%TYPE, vIdLector lector.idLector%TYPE ) AS vTipoLector lector.idTipo%TYPE; vDiasTipoLector tipoLector.diasPrest%TYPE; BEGIN --LOS TRIGGERS SE ENCARGARAN DE VERIFICAR: --QUE NO HAYA MULTA PARA EL idLector --QUE EL EJEMPLAR TENGA EL STATUS DE DISPONIBLE status --QUE EL CONTEO DE LIBROS SEA CORRECTO PARA EL idLEctor --SELECCION DEL TIPO DE LECTOR SELECT idTipo INTO vTipoLector FROM lector WHERE idLector = vIdLector; --SELECCION DEL NUMERO DE DIAS SELECT diasPrest INTO vDiasTipoLector FROM tipoLector WHERE idTipo = vTipoLector; --INSERCION DE DATOS INSERT INTO prestamo (idPrestamo,fechaDevl,idMaterial,idLector,idEjem,fechaVen) VALUES(vIdPrestamo,SYSDATE+vIdLector,vIdMaterial,vIdLector, vIdEjem,SYSDATE+vIdLector); --ACTUALIZACION DE STATUS DEL MATERIAL UPDATE ejemplar SET status = 'PRESTAMO' WHERE idMaterial = vIdMaterial AND IdEjem = vIdEjem; END spPrestamo; / ---------------------------------------------------------------------------------- CREATE OR REPLACE PROCEDURE spDevol( vIdMaterial ejemplar.idMaterial%TYPE, vIdEjem ejemplar.idEjem%TYPE, vIdLector lector.idLector%TYPE ) AS CURSOR curDev IS SELECT idPrestamo FROM prestamo p WHERE p.idLector =vIdLector AND p.idEjem = vIdEjem AND p.idMaterial = vIdMaterial; vIdPrestamo prestamo.idPrestamo%TYPE; BEGIN --EL TRIGGER tgPrestamo SECCION DELETING SE ENCARGARA DE VERIFICAR: --QUE NO HAYA MULTA PARA EL idLector Y DE SER --NECESARIO LA CREARA begin OPEN curDev; FETCH curDev INTO vIdPrestamo; CLOSE curDev; EXCEPTION WHEN NO_DATA_FOUND THEN RAISE_APPLICATION_ERROR(-20020,'EL PRESTAMO SOLICITADO NO EXISTE'); END; --BORRADO DEL PRESTAMO DELETE FROM prestamo WHERE idPrestamo = vIdPrestamo; --ACTUALIZACION DEL STATUS DEL MATERIAL UPDATE ejemplar SET status = 'DISPONIBLE' WHERE idMaterial = vIdMaterial AND IdEjem = vIdEjem; END spDevol; / ---------------------------------------------------------------------------------- CREATE OR REPLACE PROCEDURE spResello( vIdMaterial ejemplar.idMaterial%TYPE, vIdEjem ejemplar.idEjem%TYPE, vIdLector lector.idLector%TYPE ) AS CURSOR curDev IS SELECT idPrestamo FROM prestamo p WHERE p.idLector =vIdLector AND p.idEjem = vIdEjem AND p.idMaterial = vIdMaterial; vIdPrestamo prestamo.idPrestamo%TYPE; vTipoLector lector.idTipo%TYPE; vDiasTipoLector tipoLector.diasPrest%TYPE; BEGIN --EL TRIGGER tgPrestamo SECCION UPDATING SE ENCARGARA DE VERIFICAR: --QUE EL DIA DE RESELLO SEA VALIDO --SI SE EXCEDE SOLICITA QUE SE HAGA LA DEVOLUCION --SI ESTA CON TIEMPO DE SOBRA SOLO RECHAZA EL RESELLO --TAMBIEN VERIFICA QUE NO SE TENGA EL LIMITE DE REFRENDOS BEGIN OPEN curDev; FETCH curDev INTO vIdPrestamo; CLOSE curDev; EXCEPTION WHEN NO_DATA_FOUND THEN RAISE_APPLICATION_ERROR(-20020,'EL PRESTAMO SOLICITADO NO EXISTE'); END; --SELECCION DEL TIPO DE LECTOR SELECT idTipo INTO vTipoLector FROM lector WHERE idLector = vIdLector; --SELECCION DEL NUMERO DE DIAS DE PRESTAMOS PARA --REALIZAR LA ACTUALIZACION DE FECHAS SELECT diasPrest INTO vDiasTipoLector FROM tipoLector WHERE idTipo = vTipoLector; --ACTUALIZACION DEL PRESTAMO UPDATE prestamo SET fechaPres =SYSDATE, fechaDevl = SYSDATE + vDiasTipoLector, numRese = numRese+1 WHERE idPrestamo = vIdPrestamo; END spResello; / ---------------------------------------------------------------------------------- CREATE OR REPLACE PROCEDURE spPagMulta( vIdLector lector.idLector%TYPE, vIdPrestamo prestamo.idPrestamo%TYPE, vMonto multa.monto%TYPE ) AS BEGIN --SE LIQUIDA LA MULTA ENTONCES EN FUNCION DEL ADEUDO SE PERMITIRA --O NO EL BORRADO UPDATE lector SET adeudo = adeudo - vMonto WHERE idLector = vIdLector; --SE ELIMINA EL REGISTRO DE MULTA DELETE FROM multa WHERE idPrestamo = vIdPrestamo; DBMS_OUTPUT.PUT_LINE('SE HA LIQUIDADO LA MULTA ASOCIADA AL PRESTAMO '||vIdPrestamo); DELETE FROM prestamo WHERE idPrestamo = vIdPrestamo; END spPagMulta; / ---------------------------------------------------------------------------------- CREATE OR REPLACE PROCEDURE spMulta( vIdPrestamo prestamo.idPrestamo%TYPE, vMonto NUMBER, vDiasRet NUMBER) AS BEGIN INSERT INTO multa (idPrestamo,monto,diasRetraso) VALUES(vIdPrestamo,vMonto,vDiasRet); END spMulta; / ---------------------------------------------------------------------------------- CONNECT system/oracle SELECT object_name FROM dba_objects WHERE object_type = 'PROCEDURE' AND OWNER='ADBIBLIO'; CONNECT adbiblio/proyecto
true
3f91252b8042a4c7e4db71e409a6d9c704b92075
SQL
akhileshkumarverma/mot-automated-testsuite
/src/server/resources/queries/vehicle/VEHICLE_CLASS_4_BEFORE_1960_WITH_AN_MOT.sql
UTF-8
896
3.9375
4
[ "MIT" ]
permissive
select d.registration as registration, d.vin as vin, mtc.odometer_value as mileage from dvla_vehicle d, ( select max(id) as id, vehicle_id from mot_test_current group by vehicle_id limit 100000) as latest_mot, mot_test_current mtc where d.registration is not null -- nullable in PP/Prod and d.vin is not null -- nullable in PP/Prod and mtc.id = latest_mot.id and d.vehicle_id = latest_mot.vehicle_id and d.first_registration_date < '1960-01-01' -- select a vehicle which requires an optional MOT and d.vehicle_id in (select vehicle_id from mot_test_current where expiry_date > now()) and not exists ( select 1 from mot_test_current mtc where d.id = mtc.vehicle_id and mtc.status_id not in (4,5) -- exclude vehicles whose latest status is under test or failed ) -- BL-8277 Due to know issue, exclude vehicles that have the same id as a failed dvsa vehicle limit 5
true
48e7c37cbffc5084add9ddca862e8a767d071d9d
SQL
D1mas1o/python-bloc2HW
/tabletext.sql
UTF-8
712
3.90625
4
[]
no_license
CREATE TABLE NewsCategory ( NewsCategoryId integer PRIMARY KEY AUTOINCREMENT NOT NULL, Name text UNIQUE ); CREATE TABLE UsersCategory ( NewsCategoryId integer REFERENCES NewsCategory(NewsCategoryId) NOT NULL, UserId integer REFERENCES Users(UserId) NOT NULL, CONSTRAINT uniq_id PRIMARY KEY (NewsCategoryId,UserId) ); CREATE TABLE Users ( UserId integer PRIMARY KEY NOT NULL, FirstName text, LastName text ); CREATE TABLE UserKeyWords ( UserId integer REFERENCES Users(UserId) NOT NULL, KeyWordsId integer REFERENCES KeyWords(KeyWordsId) NOT NULL, CONSTRAINT uniq_keyid PRIMARY KEY (UserId,KeyWordsId) ); CREATE TABLE KeyWords ( KeyWordsId integer PRIMARY KEY AUTOINCREMENT NOT NULL, KeyWord text UNIQUE );
true
f332bccd134c79256fbf6d262ab2deaaa16e388a
SQL
YassineAzdoud/Brief_C3N1_C5N1_C6N1_C7N1
/SQL/shema.sql
UTF-8
1,043
3.171875
3
[]
no_license
-- -- Structure de la table `formations` -- CREATE TABLE `formations` ( `id` bigint(20) NOT NULL, `techno` enum('html','cgi','js','ajax','php') NOT NULL, `date` date NOT NULL ) ENGINE=InnoDB ; -- -- Déchargement des données de la table `formations` -- INSERT INTO `formations` (`id`, `techno`, `date`) VALUES (1, 'html', '2021-03-03'); -- -------------------------------------------------------- -- -- Structure de la table `technos` -- CREATE TABLE `technos` ( `id` bigint(20) NOT NULL, `html` enum('-1','0','1','2','3','4','5') NOT NULL, `cgi` enum('-1','0','1','2','3','4','5') NOT NULL, `js` enum('-1','0','1','2','3','4','5') NOT NULL, `ajax` enum('-1','0','1','2','3','4','5') NOT NULL, `php` enum('-1','0','1','2','3','4','5') NOT NULL ) ENGINE=InnoDB; -- -- Structure de la table `users` -- CREATE TABLE `users` ( `id` bigint(20) NOT NULL, `first_name` varchar(200) NOT NULL, `last_name` varchar(200) NOT NULL, `password` varchar(200) NOT NULL, `email` varchar(200) NOT NULL ) ENGINE=InnoDB;
true
4963f9e9aca48c1a754611cc06cd945f82c979fc
SQL
MartonTevald/codecool-webshop
/src/main/java/com/codecool/shop/config/init_table.sql
UTF-8
5,169
3.84375
4
[]
no_license
DROP TABLE IF EXISTS product, supplier, prodCat,supplier,user_details,"order",order_details; CREATE TABLE supplier ( id SERIAL PRIMARY KEY, name VARCHAR(50) UNIQUE, department varchar(50), description varchar(200) ); CREATE TABLE prodCat ( id SERIAL PRIMARY KEY, name VARCHAR(50) UNIQUE, department varchar(50), description varchar(500) ); CREATE TABLE product ( id SERIAL PRIMARY KEY, name varchar(150) UNIQUE, description varchar(500), price float, supplier_id int REFERENCES supplier (id), prodCat_id int REFERENCES prodCat (id) ); CREATE TABLE user_details ( id SERIAL PRIMARY KEY, fullname varchar, username varchar, email varchar, password varchar, phonenumber varchar, address varchar, city varchar, state varchar, zip varchar ); CREATE TABLE "order" ( id serial PRIMARY KEY, user_id int REFERENCES user_details (id), status varchar ); CREATE TABLE order_details ( id SERIAL PRIMARY KEY, prod_id INT REFERENCES product (id), quantity INT, order_id INT REFERENCES "order" (id) ); INSERT INTO supplier(name, department, description) VALUES ('Amazon', 'Digital content and services', 'Amazon.com Inc.'); INSERT INTO supplier(name, department, description) VALUES ('Lenovo', 'Computers', 'Lenovo Inc.'); INSERT INTO supplier(name, department, description) VALUES ('Apple', 'Computers and Digital content', 'Apple Inc.'); INSERT INTO supplier(name, department, description) VALUES ('Mustang', 'Motorbikes', 'Mustang Inc.'); INSERT INTO supplier(name, department, description) VALUES ('Pinkie', 'Evertyhing', 'Pinkie Inc.'); INSERT INTO prodCat (name, department, description) VALUES ('Tablet', 'Hardware', 'A tablet computer, commonly ' || 'shortened to tablet, is a thin, flat mobile computer with a touchscreen display.'); INSERT INTO prodCat (name, department, description) VALUES ('Laptop', 'Hardware', 'A laptop computer, sometimes ' || 'called a notebook computer by manufacturers, is a battery- or AC-powered personal ' || 'computer generally smaller than a briefcase that can easily be transported and ' || 'conveniently used in temporary spaces such as on airplanes, in libraries, temporary ' || 'offices, and at meetings.'); INSERT INTO prodCat (name, department, description) VALUES ('Accessories', 'Hardware', 'Other products, accessories.'); INSERT INTO product(name, description, price, supplier_id, prodCat_id) VALUES ('Amazon Fire', 'Fantastic price. Large content ecosystem. Good parental controls. Helpful technical support.', '49', 1, 1); INSERT INTO product(name, description, price, supplier_id, prodCat_id) VALUES ('Lenovo IdeaPad Miix 700', 'Keyboard cover is included. Fanless Core m5 processor. Full-size USB ports. Adjustable kickstand.', '479', 2, 1); INSERT INTO product(name, description, price, supplier_id, prodCat_id) VALUES ('Amazon Fire HD 8', 'Amazon''s latest Fire HD 8 tablet is a great value for media consumption.', '89', 1, 1); INSERT INTO product(name, description, price, supplier_id, prodCat_id) VALUES ('Apple - MacBook Air 13.3"', 'The latest MacBook Air features a stunning Retina display with True Tone technology, Touch ID, the ' || 'latest Apple-designed keyboard, and a Force Touch trackpad - all housed in a thin and light iconic wedge' || ' design made from 100 percent recycled aluminum. And with 12-hour battery life, it''s a do-it-all notebook' || ' that goes all day long.', '999', 3, 2); INSERT INTO product(name, description, price, supplier_id, prodCat_id) VALUES ('Lenovo ThinkPad Yoga 370 Touch Laptop', 'Combining power, performance, and portability, the stylish yet durable ThinkPad Yoga 370 gives you the ' || 'freedom to work/play anywhere. Enjoy using it in different ways-from laptop to tablet and anything in ' || 'between. Save time by writing, highlighting, or drawing directly on screen. Take delight in seeing your ' || 'visuals, presentations, and movies come to life on the vibrant 13.3" display. And then relax knowing the ' || 'Yoga 370 has an all-day battery life and comes with a worldwide warranty.', '750', 2, 2); INSERT INTO product(name, description, price, supplier_id, prodCat_id) VALUES ('Apple iPad Pro (12.9-inch, Wi-Fi, 256GB) ', 'Immensely powerful, portable, and capable, the 12.9-inch iPad Pro features a redesigned Retina display' || ' that is the most advanced on the planet.', '989', 3, 1); INSERT INTO product(name, description, price, supplier_id, prodCat_id) VALUES ('Java 50', 'The ultimate tool if it comes to change geoposition and you are a developer.', '9999', 4, 3); INSERT INTO product(name, description, price, supplier_id, prodCat_id) VALUES ('Barbie', 'The ultimate adult oh sorry kid laptop.', '999', 5, 2)
true
acfbad8e21c665c08640427dca7a47885d5b30a3
SQL
eminmuhammadi/emigaProblemManagement
/install/emigaproject.sql
UTF-8
5,631
3.078125
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Dec 13, 2018 at 10:13 PM -- Server version: 10.1.36-MariaDB -- PHP Version: 7.2.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `emigaproject` -- -- -------------------------------------------------------- -- -- Table structure for table `del_posts` -- CREATE TABLE `del_posts` ( `problem_id` int(6) UNSIGNED NOT NULL, `department_detail` mediumtext COLLATE utf8_bin NOT NULL, `user_detail` mediumtext COLLATE utf8_bin NOT NULL, `problem_mobile` int(16) DEFAULT NULL, `problem_title` varchar(60) COLLATE utf8_bin DEFAULT NULL, `problem_description` mediumtext COLLATE utf8_bin NOT NULL, `problem_status` varchar(2) COLLATE utf8_bin NOT NULL DEFAULT 'P', `problem_admin` varchar(60) COLLATE utf8_bin DEFAULT '~', `problem_status_description` varchar(999) COLLATE utf8_bin NOT NULL DEFAULT '~', `reg_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `department_user_id` int(6) DEFAULT NULL, `user_id` int(6) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -- -------------------------------------------------------- -- -- Table structure for table `departments` -- CREATE TABLE `departments` ( `department_id` int(6) UNSIGNED NOT NULL, `department_title` varchar(60) COLLATE utf8_bin DEFAULT NULL, `department_desc` mediumtext COLLATE utf8_bin, `department_room` varchar(60) COLLATE utf8_bin DEFAULT NULL, `department_space` varchar(60) COLLATE utf8_bin DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -- -------------------------------------------------------- -- -- Table structure for table `notf` -- CREATE TABLE `notf` ( `notf_id` int(11) NOT NULL, `notf_subject` varchar(250) COLLATE utf8_bin NOT NULL, `notf_permission` varchar(2) COLLATE utf8_bin NOT NULL DEFAULT 'U', `notf_text` text COLLATE utf8_bin NOT NULL, `notf_status` int(1) NOT NULL, `user_id` int(6) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -- -------------------------------------------------------- -- -- Table structure for table `posts` -- CREATE TABLE `posts` ( `problem_id` int(6) UNSIGNED NOT NULL, `department_detail` mediumtext COLLATE utf8_bin NOT NULL, `user_detail` mediumtext COLLATE utf8_bin NOT NULL, `user_id` int(10) NOT NULL, `department_user_id` int(6) NOT NULL, `problem_title` varchar(60) COLLATE utf8_bin DEFAULT NULL, `problem_description` mediumtext COLLATE utf8_bin NOT NULL, `problem_status` varchar(2) COLLATE utf8_bin NOT NULL DEFAULT 'P', `problem_admin` varchar(60) COLLATE utf8_bin DEFAULT '~', `problem_mobile` varchar(16) COLLATE utf8_bin DEFAULT NULL, `problem_status_description` varchar(999) COLLATE utf8_bin NOT NULL DEFAULT '~', `reg_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -- -------------------------------------------------------- -- -- Table structure for table `users` -- CREATE TABLE `users` ( `user_id` int(6) UNSIGNED NOT NULL, `verified` bit(1) NOT NULL DEFAULT b'0', `user_name` varchar(30) COLLATE utf8_bin NOT NULL, `user_lastname` varchar(30) COLLATE utf8_bin NOT NULL, `user_password` varchar(32) COLLATE utf8_bin NOT NULL, `user_permission` varchar(3) COLLATE utf8_bin NOT NULL DEFAULT 'U', `user_email` varchar(256) COLLATE utf8_bin NOT NULL, `user_mobile` varchar(16) COLLATE utf8_bin DEFAULT NULL, `user_department_detail` varchar(60) COLLATE utf8_bin DEFAULT '~', `reg_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `last_logged` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `ip` varchar(15) COLLATE utf8_bin NOT NULL DEFAULT '0.0.0.0', `token` mediumtext COLLATE utf8_bin, `user_agent` mediumtext COLLATE utf8_bin ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -- -- Indexes for dumped tables -- -- -- Indexes for table `del_posts` -- ALTER TABLE `del_posts` ADD PRIMARY KEY (`problem_id`); -- -- Indexes for table `departments` -- ALTER TABLE `departments` ADD PRIMARY KEY (`department_id`), ADD UNIQUE KEY `department_title` (`department_title`); -- -- Indexes for table `notf` -- ALTER TABLE `notf` ADD PRIMARY KEY (`notf_id`); -- -- Indexes for table `posts` -- ALTER TABLE `posts` ADD PRIMARY KEY (`problem_id`); -- -- Indexes for table `users` -- ALTER TABLE `users` ADD PRIMARY KEY (`user_id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `del_posts` -- ALTER TABLE `del_posts` MODIFY `problem_id` int(6) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `departments` -- ALTER TABLE `departments` MODIFY `department_id` int(6) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `notf` -- ALTER TABLE `notf` MODIFY `notf_id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `posts` -- ALTER TABLE `posts` MODIFY `problem_id` int(6) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `users` -- ALTER TABLE `users` MODIFY `user_id` int(6) UNSIGNED NOT NULL AUTO_INCREMENT; COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
true
68586191bd6a60692548a7799717c216e887e4eb
SQL
mizm/TIL-c9
/projects/03_db/03_select.sql
UTF-8
446
3.078125
3
[]
no_license
SELECT * FROM movies WHERE 상영시간>=150; SELECT 영화코드,영화이름 FROM movies WHERE 장르='애니메이션'; SELECT 영화이름 FROM movies WHERE 장르='애니메이션' AND 제작국가='덴마크'; SELECT 영화이름,누적관객수 FROM movies WHERE 누적관객수 >= 1000000 AND 관람등급 ='청소년관람불가'; SELECT * FROM movies WHERE 개봉연도 BETWEEN 20000101 AND 20091231; SELECT DISTINCT 장르 FROM movies;
true
2984671fdcff8214a5dddfc1c6ee8385ec925def
SQL
chregu/liipto
/conf/liip_to.sql
UTF-8
1,152
2.84375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 2.9.1.1-Debian-3 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jul 23, 2008 at 02:31 PM -- Server version: 5.0.32 -- PHP Version: 5.2.6-dev -- -- Database: `liip_to` -- -- -------------------------------------------------------- -- -- Table structure for table `ids_lower` -- CREATE TABLE `ids_lower` ( `id` int(11) NOT NULL auto_increment, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `ids_mixed` -- CREATE TABLE `ids_mixed` ( `id` int(11) NOT NULL auto_increment, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `urls` -- CREATE TABLE `urls` ( `code` varchar(30) character set latin1 collate latin1_bin NOT NULL, `url` varchar(2000) NOT NULL, `md5` char(32) NOT NULL, `changed` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, PRIMARY KEY (`code`), UNIQUE KEY `md5` (`md5`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
true
02e0c98525b8d5890e6957b1bd182af402244720
SQL
huyvofjh/PortfolioProject
/OlympicProject/Olympic.sql
UTF-8
2,755
4.6875
5
[]
no_license
-- Data for Visualization SELECT ath.[ID], ath.[Name] AS Competitor, CASE WHEN ath.[Sex] = 'M' THEN 'Male' -- Convert "M" and "F" to "Male" and "Female" WHEN ath.[Sex] = 'F' THEN 'Female' END AS Gender, CASE WHEN ath.[Age] < 18 THEN 'Under 18' -- Convert Age to Age Grouping WHEN ath.[Age] BETWEEN 18 AND 25 THEN '18-25' WHEN ath.[Age] BETWEEN 25 AND 30 THEN '25-30' WHEN ath.[Age] > 30 THEN 'Over 30' END AS Age, ath.[Height], ath.[Weight], ath.[NOC] AS CountryCode, SUBSTRING(ath.Games, 1, CHARINDEX(' ', ath.Games)-1) AS Year, -- Breaking out Games into individual columns (Year, Season) -- LEFT(ath.Games, CHARINDEX(' ',ath.Games)-1) AS Year, -- RIGHT(ath.Games, CHARINDEX(' ',REVERSE(ath.Games))-1) AS Season SUBSTRING(ath.Games, CHARINDEX(' ', ath.Games)+ 1, LEN(ath.Games)) AS Season , ath.[City], ath.[Sport], ath.[Event], CASE WHEN ath.[Medal] = 'NA' THEN 'No Information' -- Convert "NA" to "No Information" ELSE ath.Medal END AS Medal, coun.Definition AS Country FROM olympic_games..athletes_event_results AS ath LEFT JOIN olympic_games..[dbo.countrycode] AS coun ON ath.NOC = coun.[Code Value] --------------------------------------------------------------------------------- -- Shows the Total Athletes in the Summer (Winter) Olympic Games WITH OlympicCTE (ID, Name,Year, Season) AS ( SELECT ID, Name, SUBSTRING(Games, 1, CHARINDEX(' ', Games)-1) AS Year, SUBSTRING(Games, CHARINDEX(' ', Games)+ 1, LEN(Games)) AS Season FROM olympic_games..athletes_event_results ) SELECT COUNT(DISTINCT(ID)) AS NumberOfAthletes FROM OlympicCTE WHERE Season = 'Summer' --------------------------------------------------------------------------------- -- Shows the Total Number of Medals in the Summer (Winter) Olympic Games WITH OlympicCTE (ID, Name,Medal, Year, Season) AS ( SELECT ID, Name, Medal, SUBSTRING(Games, 1, CHARINDEX(' ', Games)-1) AS Year, SUBSTRING(Games, CHARINDEX(' ', Games)+ 1, LEN(Games)) AS Season FROM olympic_games..athletes_event_results ) SELECT COUNT(Medal)AS NumberOfMedals FROM OlympicCTE WHERE Season = 'Summer' AND Medal <> 'NA' SELECT * FROM olympic_games..athletes_event_results ---------------------------------------------------------------------------------- -- Shows the Number of Medals in the Summer (Winter) Olympic Games WITH OlympicCTE (ID, Name,Medal, Year, Season) AS ( SELECT ID, Name, Medal, SUBSTRING(Games, 1, CHARINDEX(' ', Games)-1) AS Year, SUBSTRING(Games, CHARINDEX(' ', Games)+ 1, LEN(Games)) AS Season FROM olympic_games..athletes_event_results ) SELECT DISTINCT(Medal), COUNT(Medal)AS NumberOfMedals FROM OlympicCTE WHERE Season = 'Summer' AND Medal <> 'NA' GROUP BY Medal
true
dc7ee516fe375e1fe4683fcaa6fb9af5c08ee9b4
SQL
ShubhamKubal/VehicleConfigurator
/database/db.sql
UTF-8
18,786
3.03125
3
[]
no_license
open mysql terminal on Ubuntu : mysql -u root -p database creation : show databases; create database vehicleconfigurator; use vehicleconfigurator; table creation: create table Segment( seg_id INT NOT NULL AUTO_INCREMENT, seg_name VARCHAR(100) NOT NULL, PRIMARY KEY ( seg_id ) ); create table Manufacturer( man_id INT NOT NULL AUTO_INCREMENT, man_name VARCHAR(100) NOT NULL, PRIMARY KEY ( man_id ) ); create table Variant( var_id INT NOT NULL AUTO_INCREMENT, var_name VARCHAR(100) NOT NULL, min_qty INT NOT NULL, base_price DECIMAL NOT NULL, seg_id INT, man_id INT, image_path VARCHAR(50), PRIMARY KEY ( var_id ), FOREIGN KEY (seg_id) REFERENCES Segment(seg_id), FOREIGN KEY (man_id) REFERENCES Manufacturer(man_id) ); create table configuration( conf_id INT NOT NULL AUTO_INCREMENT, description VARCHAR(500), type VARCHAR(50) NOT NULL, configurable VARCHAR(15) NOT NULL, var_id INT, PRIMARY KEY ( conf_id ), FOREIGN KEY (var_id) REFERENCES Variant(var_id) ); create table alternate_conf( alt_id INT NOT NULL AUTO_INCREMENT, alt_description VARCHAR(500), alt_price DECIMAL NOT NULL, conf_id INT, PRIMARY KEY ( alt_id ), FOREIGN KEY (conf_id) REFERENCES configuration(conf_id) ); create table Customer( company_id INT NOT NULL AUTO_INCREMENT, company_name VARCHAR(50) NOT NULL, login_id VARCHAR(50) NOT NULL UNIQUE, password VARCHAR(50) NOT NULL, customer_name VARCHAR(50) NOT NULL, designation VARCHAR(50) NOT NULL, email_id VARCHAR(50) NOT NULL UNIQUE, address_line_1 VARCHAR(100) NOT NULL, address_line_2 VARCHAR(100), city VARCHAR(50) NOT NULL, state VARCHAR(50) NOT NULL, pincode INT NOT NULL, company_tel VARCHAR(15), customer_mob VARCHAR(15), vat_no VARCHAR(15), pan_no VARCHAR(15) UNIQUE NOT NULL, holding VARCHAR(15), PRIMARY KEY ( company_id ) ); Data Insertion : insert into Segment (seg_name) values ("small car"); insert into Segment (seg_name) values ("compact car"); insert into Segment (seg_name) values ("sedan"); insert into Segment (seg_name) values ("SUVs"); insert into Segment (seg_name) values ("luxury cars"); insert into Manufacturer (man_name) values ("tata motors"); insert into Manufacturer (man_name) values ("mahindra and mahindra"); insert into Manufacturer (man_name) values ("maruti suzuki"); insert into Manufacturer (man_name) values ("bmw"); insert into Manufacturer (man_name) values ("jeep"); insert into Manufacturer (man_name) values ("ford"); insert into Manufacturer (man_name) values ("honda"); insert into Manufacturer (man_name) values ("hyundai"); insert into Manufacturer (man_name) values ("kia"); insert into Manufacturer (man_name) values ("mercedes"); insert into Manufacturer (man_name) values ("renault"); insert into Manufacturer (man_name) values ("nissan"); insert into Manufacturer (man_name) values ("toyoto"); insert into Manufacturer (man_name) values ("volkswagen"); insert into Manufacturer (man_name) values ("tesla"); insert into Variant ( var_name, min_qty, base_price, seg_id, man_id ) values ("tigor", 20, 549000, 3, 1); insert into Variant ( var_name, min_qty, base_price, seg_id, man_id ) values ("nexon", 20, 709000, 2, 1); insert into Variant ( var_name, min_qty, base_price, seg_id, man_id ) values ("harrier", 20, 1400000, 4, 1); insert into Variant ( var_name, min_qty, base_price, seg_id, man_id ) values ("safari", 20, 1474000, 4, 1); insert into Variant ( var_name, min_qty, base_price, seg_id, man_id ) values ("indica", 20, 513000, 1, 1); insert into Variant ( var_name, min_qty, base_price, seg_id, man_id ) values ("nano", 20, 205000, 1, 1); insert into Variant ( var_name, min_qty, base_price, seg_id, man_id ) values ("bmw x1", 20, 3720000, 4, 4); insert into Variant ( var_name, min_qty, base_price, seg_id, man_id ) values ("bmw 3 series", 20, 4260000, 3, 4); insert into Variant ( var_name, min_qty, base_price, seg_id, man_id ) values ("bmw 2 series", 20, 4040000, 3, 4); insert into Variant ( var_name, min_qty, base_price, seg_id, man_id ) values ("bmw x5", 20, 7550000, 4, 4); insert into Variant ( var_name, min_qty, base_price, seg_id, man_id ) values ("mercedes benz glc", 20, 5736000, 4, 10); insert into Variant ( var_name, min_qty, base_price, seg_id, man_id ) values ("mercedes benz g class", 20, 16200000, 4, 10); insert into Variant ( var_name, min_qty, base_price, seg_id, man_id ) values ("mercedes benz v class", 20, 7170000, 2, 10); insert into Variant ( var_name, min_qty, base_price, seg_id, man_id ) values ("mercedes benz s class", 20, 14100000, 3, 10); insert into configuration ( description, type, configurable, var_id ) values ("ARAI Mileage : 20.3 kmpl" ,"default" ,"no",1 ); insert into configuration ( description, type, configurable, var_id ) values ("City Mileage : 12.34 kmpl" ,"default" ,"no",1 ); insert into configuration ( description, type, configurable, var_id ) values ("Fuel Type : petrol" ,"default" ,"no",1 ); insert into configuration ( description, type, configurable, var_id ) values ("Engine displacement : 1199cc" ,"default" ,"no",1 ); insert into configuration ( description, type, configurable, var_id ) values ("Seating Capacity : 5" ,"default" ,"no",1 ); insert into configuration ( description, type, configurable, var_id ) values ("Power Steering" ,"default" ,"no",1 ); insert into configuration ( description, type, configurable, var_id ) values ("Air Conditioner" ,"default" ,"no",1 ); insert into configuration ( description, type, configurable, var_id ) values ("Driver and passenger Airbag" ,"default" ,"no",1 ); insert into configuration ( description, type, configurable, var_id ) values ("Driver Airbag" ,"default" ,"no",1 ); insert into configuration ( description, type, configurable, var_id ) values ("Tachometer" ,"interior" ,"no",1 ); insert into configuration ( description, type, configurable, var_id ) values ("Electronic Multi-Tripmeter" ,"interior" ,"no",1 ); insert into configuration ( description, type, configurable, var_id ) values ("Seat cover" ,"interior" ,"yes",1 ); insert into configuration ( description, type, configurable, var_id ) values ("Steering Wheel" ,"interior" ,"yes",1 ); insert into configuration ( description, type, configurable, var_id ) values ("gear-shift selector wrap" ,"interior" ,"yes",1 ); insert into configuration ( description, type, configurable, var_id ) values ("headlights" ,"exterior" ,"yes",1 ); insert into configuration ( description, type, configurable, var_id ) values ("foglights front and rear" ,"exterior" ,"yes",1 ); insert into configuration ( description, type, configurable, var_id ) values ("exterior mirrors" ,"exterior" ,"yes",1 ); insert into configuration ( description, type, configurable, var_id ) values ("wheel covers" ,"exterior" ,"yes",1 ); insert into configuration ( description, type, configurable, var_id ) values ("roof carrier" ,"exterior" ,"yes",1 ); insert into configuration ( description, type, configurable, var_id ) values ("antenna" ,"exterior" ,"no",1 ); insert into configuration ( description, type, configurable, var_id ) values ("music system" ,"accessories" ,"yes",1 ); insert into configuration ( description, type, configurable, var_id ) values ("car cover" ,"accessories" ,"yes",1 ); insert into configuration ( description, type, configurable, var_id ) values ("radio" ,"accessories" ,"yes",1 ); -------------------------------------------------------------------------------------------- insert into configuration ( description, type, configurable, var_id ) values ("ARAI Mileage : 19.62 kmpl" ,"default" ,"no",7 ); insert into configuration ( description, type, configurable, var_id ) values ("City Mileage : 12.34 kmpl" ,"default" ,"no",7 ); insert into configuration ( description, type, configurable, var_id ) values ("Fuel Type : diesel" ,"default" ,"no",7 ); insert into configuration ( description, type, configurable, var_id ) values ("Engine displacement : 1998cc" ,"default" ,"no",7 ); insert into configuration ( description, type, configurable, var_id ) values ("Seating Capacity : 5" ,"default" ,"no",7 ); insert into configuration ( description, type, configurable, var_id ) values ("Power Steering" ,"default" ,"no",7 ); insert into configuration ( description, type, configurable, var_id ) values ("Air Conditioner" ,"default" ,"no",7 ); insert into configuration ( description, type, configurable, var_id ) values ("Driver and passenger Airbag" ,"default" ,"no",7 ); insert into configuration ( description, type, configurable, var_id ) values ("Driver Airbag" ,"default" ,"no",7 ); insert into configuration ( description, type, configurable, var_id ) values ("Tachometer" ,"interior" ,"no",7 ); insert into configuration ( description, type, configurable, var_id ) values ("Electronic Multi-Tripmeter" ,"interior" ,"no",7 ); insert into configuration ( description, type, configurable, var_id ) values ("Seat cover" ,"interior" ,"yes",7 ); insert into configuration ( description, type, configurable, var_id ) values ("Steering Wheel" ,"interior" ,"yes",7 ); insert into configuration ( description, type, configurable, var_id ) values ("gear-shift selector wrap" ,"interior" ,"yes",7 ); insert into configuration ( description, type, configurable, var_id ) values ("headlights" ,"exterior" ,"yes",7 ); insert into configuration ( description, type, configurable, var_id ) values ("foglights front and rear" ,"exterior" ,"yes",7 ); insert into configuration ( description, type, configurable, var_id ) values ("exterior mirrors" ,"exterior" ,"yes",7 ); insert into configuration ( description, type, configurable, var_id ) values ("wheel covers" ,"exterior" ,"yes",7 ); insert into configuration ( description, type, configurable, var_id ) values ("roof carrier" ,"exterior" ,"yes",7 ); insert into configuration ( description, type, configurable, var_id ) values ("antenna" ,"exterior" ,"no",7 ); insert into configuration ( description, type, configurable, var_id ) values ("music system" ,"accessories" ,"yes",7 ); insert into configuration ( description, type, configurable, var_id ) values ("car cover" ,"accessories" ,"yes",7 ); insert into configuration ( description, type, configurable, var_id ) values ("radio" ,"accessories" ,"yes",7 ); ----------------------------------------------------------------------------------------------------------------------------------- insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 7, "Air conditioner 1", 15000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 7, "Air conditioner 2", 20000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 7, "Air conditioner 3", 25000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 8, "Passenger airbags 1", 8000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 8, "Passenger airbags 2", 10000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 8, "Passenger airbags 3", 12000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 9, "Driver airbags 1", 5000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 9, "Driver airbags 2", 6500 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 9, "Driver airbags 3", 8000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 12, "Seat Cover 1", 4000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 12, "Seat Cover 2", 6000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 12, "Seat Cover 3", 8000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 12, "Seat Cover 4", 10000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 13, "Steering wheel 1", 5000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 13, "Steering wheel 2", 8000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 14, "gear-shift selector wrap 1", 1500 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 14, "gear-shift selector wrap 2", 2500 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 15, "headlights 1", 5000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 15, "headlights 2", 8000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 15, "headlights 3", 12000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 16, "foglights 1", 7000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 16, "foglights 2", 10000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 17, "exterior mirror 1", 1500 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 17, "exterior mirror 2", 1500 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 17, "exterior mirror 3", 3000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 18, "wheel covers 1", 4000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 18, "wheel covers 2", 16000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 19, "roof carrier 1", 15000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 19, "roof carrier 2", 20000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 19, "roof carrier 3", 30000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 21, "music system 1", 12000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 21, "music system 2", 25000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 21, "music system 3", 40000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 22, "car cover 1", 1500 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 22, "car cover 2", 3000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 23, "radio 1", 3000 ); ---------------------------------------------------------- insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 30, "Air conditioner 1 bmw", 15000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 30, "Air conditioner 2 bmw", 20000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 30, "Air conditioner 3 bmw", 25000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 31, "Passenger airbags 1 bmw", 8000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 31, "Passenger airbags 2 bmw", 10000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 31, "Passenger airbags 3 bmw", 12000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 32, "Driver airbags 1 bmw", 5000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 32, "Driver airbags 2 bmw", 6500 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 32, "Driver airbags 3 bmw", 8000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 35, "Seat Cover 1 bmw", 4000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 35, "Seat Cover 2 bmw", 6000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 35, "Seat Cover 3 bmw", 8000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 35, "Seat Cover 4 bmw", 10000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 36, "Steering wheel 1 bmw", 5000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 36, "Steering wheel 2 bmw", 8000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 37, "gear-shift selector wrap 1 bmw", 1500 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 37, "gear-shift selector wrap 2 bmw", 2500 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 38, "headlights 1 bmw", 5000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 38, "headlights 2 bmw", 8000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 38, "headlights 3 bmw", 12000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 39, "foglights 1 bmw", 7000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 39, "foglights 2 bmw", 10000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 40, "exterior mirror 1 bmw", 1500 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 40, "exterior mirror 2 bmw", 1500 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 40, "exterior mirror 3 bmw", 3000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 41, "wheel covers 1 bmw", 4000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 41, "wheel covers 2 bmw", 16000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 42, "roof carrier 1 bmw", 15000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 42, "roof carrier 2 bmw", 20000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 42, "roof carrier 3 bmw", 30000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 44, "music system 1 bmw", 12000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 44, "music system 2 bmw", 25000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 44, "music system 3 bmw", 40000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 45, "car cover 1 bmw", 1500 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 45, "car cover 2 bmw", 3000 ); insert into alternate_conf ( conf_id, alt_description, alt_price ) values ( 46, "radio 1 bmw", 3000 );
true
767ca811d8f7a8a9dd9cf242595def0311d4c834
SQL
leo-s-souza/classes
/source/src/br/com/casaautomacao/casagold/classes/sincronizacao/estrutura-db-sync.sql
UTF-8
3,849
3.640625
4
[]
no_license
SET TERM ^ ; CREATE PROCEDURE PR_REGISTRA_UPDATE_VAL ( TABELA varchar(100), TIPO_ALTERACAO smallint, COL_PK_1 varchar(100), VAL_PK_1 smallint, COL_PK_2 varchar(100) DEFAULT null, VAL_PK_2 smallint DEFAULT null, COL_PK_3 varchar(100) DEFAULT null, VAL_PK_3 smallint DEFAULT null, COL_PK_4 varchar(100) DEFAULT null, VAL_PK_4 smallint DEFAULT null ) AS declare variable source_sync varchar(100) default 'localhost:/var/fdb-dbs/sync1.fdb'; declare variable user_sync varchar(20) default 'SYSDBA'; declare variable pass_user_sync varchar(20) default 'masterkey'; BEGIN if (:col_pk_4 is not null) then begin execute statement 'execute procedure PR_REGISTRA_UPDATE_VAL( '''||:TABELA||''', '||:TIPO_ALTERACAO||', '''||:COL_PK_1||''', '||:VAL_PK_1||', '''||:COL_PK_2||''', '||:VAL_PK_2||', '''||:COL_PK_3||''', '||:VAL_PK_3||', '''||:COL_PK_4||''', '||:VAL_PK_4||' )' on EXTERNAL data source :source_sync as USER :user_sync password :pass_user_sync; exit; end if (:col_pk_3 is not null) then begin execute statement 'execute procedure PR_REGISTRA_UPDATE_VAL( '''||:TABELA||''', '||:TIPO_ALTERACAO||', '''||:COL_PK_1||''', '||:VAL_PK_1||', '''||:COL_PK_2||''', '||:VAL_PK_2||', '''||:COL_PK_3||''', '||:VAL_PK_3||' )' on EXTERNAL data source :source_sync as USER :user_sync password :pass_user_sync; exit; end if (:col_pk_2 is not null) then begin execute statement 'execute procedure PR_REGISTRA_UPDATE_VAL( '''||:TABELA||''', '||:TIPO_ALTERACAO||', '''||:COL_PK_1||''', '||:VAL_PK_1||', '''||:COL_PK_2||''', '||:VAL_PK_2||' )' on EXTERNAL data source :source_sync as USER :user_sync password :pass_user_sync; exit; end execute statement 'execute procedure PR_REGISTRA_UPDATE_VAL( '''||:TABELA||''', '||:TIPO_ALTERACAO||', '''||:COL_PK_1||''', '||:VAL_PK_1||' )' on EXTERNAL data source :source_sync as USER :user_sync password :pass_user_sync; END^ SET TERM ; ^ comment on procedure PR_REGISTRA_UPDATE_VAL is 'Realiza a replicação dos dados das tabelas configuradas para que seja possível trabalhar em modo sincronizado'; GRANT EXECUTE ON PROCEDURE PR_REGISTRA_UPDATE_VAL TO SYNC; ------------------------------------------------------ ------------------------------------------------------ --TODA TABELA QUE NECESSITA SER SINCRONIZADA PRECISA: ------------------------------------------------------ ------------------------------------------------------ -- Trigger para controlar a geração do ID e a replicação dos seus dados SET TERM ^ ; CREATE TRIGGER {TABELA AQUI}_BI FOR {TABELA AQUI} ACTIVE before insert POSITION 0 AS BEGIN if (CURRENT_USER = 'SYNC') then exit; NEW.ID = GEN_ID({GENERATOR DA TABELA AQUI}, 1); END^ SET TERM ; ^ -- Trigger para controlar a replicação dos seus dados SET TERM ^ ; CREATE TRIGGER {TABELA AQUI}_AIUD FOR {TABELA AQUI} ACTIVE after insert or update or delete POSITION 0 as begin if (CURRENT_USER = 'SYNC') then exit; IF (INSERTING) THEN execute procedure PR_REGISTRA_UPDATE_VAL ('{TABELA AQUI}', 0,'ID', new.ID); IF (updating) THEN execute procedure PR_REGISTRA_UPDATE_VAL ('{TABELA AQUI}', 1,'ID', new.ID); IF (deleting) THEN execute procedure PR_REGISTRA_UPDATE_VAL ('{TABELA AQUI}', 2,'ID', old.ID); end^ SET TERM ; ^ GRANT all ON table {TABELA AQUI} TO SYNC;
true
c1008368561567166de65dccc7a7b9eae85d177e
SQL
lanaflonPerso/intelisoft-hibernate_4
/SQL/DB_create.sql
UTF-8
821
3.265625
3
[]
no_license
SET global time_zone = `+02:00`; CREATE SCHEMA if not exists `auto_service_db` DEFAULT CHARACTER SET utf8; use `auto_service_db`; CREATE TABLE `consumer` ( `id` BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, `firstName` VARCHAR(40) NOT NULL, `lastName` VARCHAR(40) NOT NULL, `birthDate` DATETIME NOT NULL, `country` VARCHAR(40) NOT NULL, `city` VARCHAR(40) NOT NULL ); CREATE TABLE `car` ( `id` BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, `maker` VARCHAR(40) NOT NULL, `model` VARCHAR(40) NOT NULL, `productionYear` INT NOT NULL, `color` VARCHAR(40) NOT NULL, `engineType` VARCHAR(40) NOT NULL, `odometer` INT NOT NULL, `consumer_id` BIGINT, FOREIGN KEY (`consumer_id`) REFERENCES `consumer` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT );
true
1e068bb1a3859963b52a9ef024a857af97ce38fa
SQL
Steii3/bowling
/bowlingdb.sql
UTF-8
29,424
3.28125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1:3306 -- Généré le : ven. 26 mars 2021 à 10:36 -- Version du serveur : 5.7.31 -- Version de PHP : 7.3.21 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Base de données : `bowlingdb` -- -- -------------------------------------------------------- -- -- Structure de la table `categorie_age` -- DROP TABLE IF EXISTS `categorie_age`; CREATE TABLE IF NOT EXISTS `categorie_age` ( `id` int(100) NOT NULL AUTO_INCREMENT, `libellé` varchar(25) NOT NULL, `age_min` int(11) NOT NULL, `age_max` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8; -- -- Déchargement des données de la table `categorie_age` -- INSERT INTO `categorie_age` (`id`, `libellé`, `age_min`, `age_max`) VALUES (1, 'poussin', 6, 8), (2, 'benjamin', 9, 11), (3, 'minime', 12, 14), (4, 'cadet', 15, 17), (5, 'juniors', 18, 21), (6, 'senior', 22, 49); -- -------------------------------------------------------- -- -- Structure de la table `centre` -- DROP TABLE IF EXISTS `centre`; CREATE TABLE IF NOT EXISTS `centre` ( `id` int(11) NOT NULL, `nom` varchar(11) NOT NULL, `adresse` varchar(50) NOT NULL, `num_tel` int(11) NOT NULL, `adresse_email` varchar(25) NOT NULL, `nbr_pistes` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Déchargement des données de la table `centre` -- INSERT INTO `centre` (`id`, `nom`, `adresse`, `num_tel`, `adresse_email`, `nbr_pistes`) VALUES (1, 'Blazej', '71 Waubesa Parkway', 2147483647, 'gblazej0@phoca.cz', 7), (2, 'Gogarty', '925 Center Circle', 1638208905, 'rgogarty1@twitter.com', 2), (3, 'Baversor', '80 Merchant Lane', 2147483647, 'mbaversor2@storify.com', 4), (4, 'Clackers', '7834 Laurel Plaza', 1848924864, 'eclackers3@1und1.de', 9), (5, 'Attenboroug', '96 Del Sol Terrace', 2147483647, 'aattenborough4@webnode.co', 2), (6, 'Skoughman', '9283 Ridgeview Pass', 2147483647, 'jskoughman5@ow.ly', 4), (7, 'Kubis', '21 Ridge Oak Lane', 2147483647, 'ikubis6@is.gd', 2), (8, 'Crosfeld', '401 Comanche Pass', 2147483647, 'scrosfeld7@shutterfly.com', 8), (9, 'Wilcot', '619 Carioca Avenue', 2147483647, 'ewilcot8@ovh.net', 8), (10, 'Dunklee', '92352 Pearson Junction', 2147483647, 'bdunklee9@xing.com', 3), (11, 'Renals', '0 Briar Crest Way', 1413944887, 'drenalsa@hexun.com', 7), (12, 'Zoppo', '04 Continental Plaza', 2147483647, 'tzoppob@reverbnation.com', 5), (13, 'Lister', '58714 Annamark Point', 2147483647, 'glisterc@i2i.jp', 4), (14, 'Schermick', '2 Warrior Crossing', 1387362172, 'sschermickd@examiner.com', 9), (15, 'Liddiatt', '6268 Monterey Park', 2147483647, 'gliddiatte@typepad.com', 6), (16, 'Silverman', '72425 Grover Point', 2147483647, 'csilvermanf@gnu.org', 1), (17, 'Dyson', '7940 Kedzie Trail', 2147483647, 'mdysong@unblog.fr', 5), (18, 'Castellino', '9 Elmside Circle', 2147483647, 'kcastellinoh@ycombinator.', 9), (19, 'Treadgold', '8162 Corscot Parkway', 2147483647, 'atreadgoldi@springer.com', 8), (20, 'Bougourd', '75340 Thierer Crossing', 2147483647, 'nbougourdj@bing.com', 0), (21, 'Greasty', '418 Oak Valley Pass', 2147483647, 'pgreastyk@ucoz.ru', 9), (22, 'Boullin', '68724 Eggendart Crossing', 2147483647, 'lboullinl@sphinn.com', 9), (23, 'Wardrope', '9 Goodland Junction', 2147483647, 'gwardropem@csmonitor.com', 7), (24, 'Temporal', '70 Clyde Gallagher Plaza', 2147483647, 'ktemporaln@hubpages.com', 6), (25, 'Spalding', '76 Logan Parkway', 2147483647, 'cspaldingo@wufoo.com', 8), (26, 'Kealy', '91 Northland Alley', 2147483647, 'tkealyp@lycos.com', 6), (27, 'Brampton', '949 Muir Pass', 2147483647, 'pbramptonq@godaddy.com', 3), (28, 'MacGill', '1 Sunnyside Road', 2147483647, 'bmacgillr@theatlantic.com', 0), (29, 'Hardacre', '30536 Shoshone Crossing', 2147483647, 'ahardacres@dailymotion.co', 1), (30, 'Blade', '0 Barby Pass', 2147483647, 'fbladet@cyberchimps.com', 1), (31, 'Metterick', '11 Oakridge Avenue', 2147483647, 'bmettericku@nih.gov', 3), (32, 'Ollie', '65298 Sunbrook Drive', 2147483647, 'tolliev@miitbeian.gov.cn', 9), (33, 'Pottiphar', '63 Ramsey Road', 2147483647, 'ipottipharw@rediff.com', 5), (34, 'Adcock', '6676 Cody Drive', 2147483647, 'tadcockx@domainmarket.com', 2), (35, 'Barbier', '468 Namekagon Center', 1686970963, 'ebarbiery@bluehost.com', 4), (36, 'Body', '529 Dixon Center', 2147483647, 'mbodyz@ustream.tv', 4), (37, 'Pykett', '433 Duke Crossing', 1026228684, 'bpykett10@usnews.com', 4), (38, 'Cristofalo', '74 Green Pass', 2147483647, 'acristofalo11@ow.ly', 5), (39, 'Trees', '43581 Westend Plaza', 2147483647, 'otrees12@harvard.edu', 1), (40, 'McGow', '82777 Ruskin Center', 2147483647, 'smcgow13@tmall.com', 6), (41, 'Goldes', '27387 Quincy Point', 1449318927, 'igoldes14@ebay.co.uk', 4), (42, 'Sicha', '6 Esch Plaza', 2147483647, 'fsicha15@aol.com', 7), (43, 'Yakebovich', '310 Banding Hill', 2147483647, 'myakebovich16@icio.us', 4), (44, 'Christoforo', '0747 Portage Place', 2147483647, 'echristoforou17@discuz.ne', 2), (45, 'Kennermann', '71 Canary Trail', 2147483647, 'ckennermann18@rakuten.co.', 7), (46, 'Bickersteth', '5 Jenna Hill', 2147483647, 'mbickersteth19@admin.ch', 1), (47, 'Lehr', '86296 Ridgeway Parkway', 2147483647, 'vlehr1a@example.com', 1), (48, 'Spehr', '23184 Quincy Drive', 2147483647, 'aspehr1b@xing.com', 4), (49, 'Torel', '865 Vera Point', 2147483647, 'atorel1c@dropbox.com', 3), (50, 'Nethercott', '9 Crest Line Terrace', 2147483647, 'lnethercott1d@flickr.com', 2), (51, 'Cullum', '405 Towne Center', 2147483647, 'kcullum1e@marriott.com', 7), (52, 'de Merida', '0 Warrior Lane', 2147483647, 'ndemerida1f@bluehost.com', 4), (53, 'Kilday', '9 Valley Edge Road', 2147483647, 'rkilday1g@prweb.com', 4), (54, 'Laffan', '78423 Marcy Court', 2147483647, 'dlaffan1h@wordpress.com', 9), (55, 'Grimm', '040 Packers Crossing', 2147483647, 'agrimm1i@flickr.com', 0), (56, 'Ebbin', '8360 Manley Circle', 2147483647, 'oebbin1j@networkadvertisi', 8), (57, 'Blair', '51 4th Junction', 2147483647, 'nblair1k@techcrunch.com', 7), (58, 'Hardwicke', '26 Delladonna Parkway', 2147483647, 'lhardwicke1l@tiny.cc', 7), (59, 'Dermott', '3327 Drewry Street', 2021914962, 'kdermott1m@hostgator.com', 9), (60, 'Brusby', '4858 Dwight Crossing', 2147483647, 'gbrusby1n@sitemeter.com', 1), (61, 'Ebbrell', '704 Londonderry Terrace', 1107684550, 'jebbrell1o@yolasite.com', 2), (62, 'Buyers', '6 Barby Crossing', 2147483647, 'rbuyers1p@vimeo.com', 6), (63, 'Zanni', '35 Emmet Plaza', 2147483647, 'ezanni1q@hud.gov', 7), (64, 'Degli Abbat', '4 Green Pass', 2147483647, 'pdegliabbati1r@dmoz.org', 4), (65, 'Lancashire', '11 Barnett Point', 2147483647, 'klancashire1s@apple.com', 4), (66, 'Murkitt', '1157 Lakeland Avenue', 2147483647, 'imurkitt1t@goodreads.com', 2), (67, 'Ramelet', '5 Superior Street', 2147483647, 'cramelet1u@guardian.co.uk', 3), (68, 'Treves', '87310 Debra Alley', 2147483647, 'htreves1v@tinypic.com', 1), (69, 'Jorczyk', '7265 Maywood Center', 2147483647, 'wjorczyk1w@japanpost.jp', 4), (70, 'Pound', '173 Valley Edge Plaza', 2147483647, 'gpound1x@arizona.edu', 5), (71, 'Castagnasso', '850 Springs Road', 2147483647, 'scastagnasso1y@disqus.com', 1), (72, 'Moggach', '532 Toban Center', 2147483647, 'tmoggach1z@army.mil', 6), (73, 'Hagart', '1 Pennsylvania Center', 2147483647, 'ghagart20@php.net', 7), (74, 'Goodricke', '1667 Spaight Hill', 2147483647, 'tgoodricke21@guardian.co.', 6), (75, 'Sobtka', '6839 Badeau Terrace', 2147483647, 'rsobtka22@seattletimes.co', 1), (76, 'Boays', '001 Delaware Hill', 2147483647, 'oboays23@bing.com', 4), (77, 'Rospars', '83 Manufacturers Circle', 2147483647, 'prospars24@economist.com', 5), (78, 'Karpychev', '54035 Muir Pass', 2147483647, 'ekarpychev25@si.edu', 6), (79, 'Tatham', '7 Burning Wood Park', 2147483647, 'btatham26@myspace.com', 8), (80, 'Wille', '9128 Mendota Center', 2147483647, 'wwille27@people.com.cn', 0), (81, 'O\'Fogarty', '17640 Maryland Junction', 2147483647, 'zofogarty28@abc.net.au', 9), (82, 'Hanselman', '1001 Dixon Center', 2147483647, 'ahanselman29@spiegel.de', 9), (83, 'Garnett', '53397 Sutteridge Hill', 2147483647, 'bgarnett2a@npr.org', 4), (84, 'Gosnell', '5 Dorton Park', 2147483647, 'agosnell2b@statcounter.co', 3), (85, 'Rabbe', '47 Forster Street', 2147483647, 'brabbe2c@mayoclinic.com', 8), (86, 'Odgers', '791 Twin Pines Road', 2147483647, 'jodgers2d@china.com.cn', 3), (87, 'Cota', '010 Artisan Hill', 2147483647, 'ccota2e@slashdot.org', 5), (88, 'Adcocks', '266 Alpine Parkway', 2147483647, 'cadcocks2f@hao123.com', 5), (89, 'Foulks', '53005 Comanche Park', 2147483647, 'efoulks2g@gravatar.com', 5), (90, 'Almeida', '81 Main Street', 2147483647, 'salmeida2h@simplemachines', 3), (91, 'Marzellano', '4 Boyd Road', 2147483647, 'gmarzellano2i@mac.com', 0), (92, 'Tunkin', '52 Michigan Junction', 2147483647, 'atunkin2j@reference.com', 3), (93, 'Zanolli', '2 Golf Course Parkway', 2147483647, 'lzanolli2k@google.com.br', 3), (94, 'Hayman', '50631 Iowa Alley', 2147483647, 'mhayman2l@princeton.edu', 0), (95, 'Bleakley', '49785 Hoffman Alley', 2147483647, 'tbleakley2m@parallels.com', 4), (96, 'Klempke', '6 Maple Wood Avenue', 2147483647, 'rklempke2n@networksolutio', 0), (97, 'Todaro', '672 Alpine Drive', 2147483647, 'btodaro2o@patch.com', 0), (98, 'Gillicuddy', '3 Nancy Point', 2147483647, 'ugillicuddy2p@apple.com', 2), (99, 'Colyer', '05 Arapahoe Circle', 2147483647, 'scolyer2q@seattletimes.co', 3), (100, 'Steiner', '1 Moland Trail', 2147483647, 'isteiner2r@godaddy.com', 9); -- -------------------------------------------------------- -- -- Structure de la table `club` -- DROP TABLE IF EXISTS `club`; CREATE TABLE IF NOT EXISTS `club` ( `id` int(11) NOT NULL, `nom` varchar(25) NOT NULL, `ville` varchar(25) NOT NULL, `adresse` varchar(25) NOT NULL, `president` varchar(25) NOT NULL, `centre` int(25) NOT NULL, PRIMARY KEY (`id`), KEY `Cascade club` (`centre`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Déchargement des données de la table `club` -- INSERT INTO `club` (`id`, `nom`, `ville`, `adresse`, `president`, `centre`) VALUES (1, 'Meevee', 'Guinsadan', 'Macpherson', 'Sindee', 92), (2, 'Kamba', 'Danzi', 'Bay', 'Ainslee', 23), (3, 'Gigashots', 'Cheban', 'Corry', 'Mort', 66), (4, 'Skynoodle', 'Hualgayoc', 'Harbort', 'Jordana', 30), (5, 'Devbug', 'Roboré', 'Ridgeview', 'Arnie', 67), (6, 'Voonder', 'Panambi', 'Sherman', 'Carri', 96), (7, 'Quimba', 'Koszęcin', 'Stephen', 'Wylma', 86), (8, 'Edgewire', 'Świętajno', 'Cherokee', 'Chelsie', 11), (9, 'Gabvine', 'Sukaraja', 'Veith', 'Stacy', 33), (10, 'Meevee', 'Sumurber', 'Rowland', 'Aime', 34), (11, 'Meembee', 'Shuozhou', 'Vernon', 'Hyacintha', 2), (12, 'Feedbug', 'Karanggedang', 'Spohn', 'Mattheus', 38), (13, 'Zava', 'Greater Napanee', 'Derek', 'Cynthie', 74), (14, 'Eire', 'Payxambabazar', 'Steensland', 'Rorie', 92), (15, 'Riffwire', 'Wuhu', 'Daystar', 'Timi', 91), (16, 'Bluezoom', 'Beitou', 'Sutteridge', 'Patricio', 71), (17, 'Twitternation', 'Burgos', 'Florence', 'Susannah', 17), (18, 'Reallinks', 'Ágios Andréas', 'Sherman', 'Maurise', 10), (19, 'Skibox', 'Burgas', 'Anthes', 'Marabel', 68), (20, 'Skajo', 'Vila Velha', 'Rowland', 'Dianemarie', 4), (21, 'Abatz', 'Vostryakovo', 'Sundown', 'Renaldo', 93), (22, 'Vinte', 'Tevriz', 'Sutherland', 'Leah', 58), (23, 'Realbuzz', 'Ngantru', 'Sunbrook', 'Spencer', 49), (24, 'Zooxo', 'Évry', 'Scoville', 'Dorri', 76), (25, 'Devpulse', 'Vinsady', 'Waywood', 'Vernor', 35), (26, 'Plajo', 'Baomin', 'Golf Course', 'Felicle', 21), (27, 'Fiveclub', 'Mesopotam', 'Union', 'Culver', 82), (28, 'Topiclounge', 'Nepomuceno', 'Fairfield', 'Chris', 23), (29, 'Fatz', 'Wang Nam Yen', 'Carioca', 'Maiga', 73), (30, 'Trupe', 'Matiompong', 'Almo', 'Kalvin', 79), (31, 'Rhybox', 'Phan Rang-Tháp Chàm', 'Warbler', 'Ingra', 86), (32, 'Flashspan', 'Guanshan', 'Moulton', 'Candy', 71), (33, 'Skiba', 'Wola Rębkowska', 'Spenser', 'Humberto', 60), (34, 'Skidoo', 'Taoyuan', 'Ridgeway', 'Kearney', 54), (35, 'Eamia', 'Golug', 'Warner', 'Liam', 97), (36, 'Jamia', 'Terezín', 'Bobwhite', 'Gigi', 92), (37, 'Oloo', 'Dziemiany', 'Arapahoe', 'Jenilee', 7), (38, 'Gabspot', 'Szczurowa', 'Little Fleur', 'Darren', 68), (39, 'Divape', 'Ar Ruways', 'Warrior', 'Andre', 50), (40, 'InnoZ', 'Sioguí Abajo', 'Lukken', 'Filberte', 91), (41, 'Skimia', 'Noşratābād', 'Independence', 'Chastity', 66), (42, 'Feedfish', 'Panenjoan', 'Bultman', 'Sylvester', 57), (43, 'Realcube', 'Parchowo', 'Bunting', 'Lorant', 79), (44, 'Realbuzz', 'Yangxu', 'Mosinee', 'Arden', 5), (45, 'Fiveclub', 'Hwacheon', 'Vermont', 'Skylar', 90), (46, 'Tambee', 'Bojonglarang', 'Iowa', 'Lucilia', 31), (47, 'Feedfire', 'Dolega District', 'Gulseth', 'Susanetta', 86), (48, 'Zazio', 'Shepetivka', 'Farmco', 'Kathryn', 65), (49, 'Buzzshare', 'Gereneng', 'Lighthouse Bay', 'Venita', 24), (50, 'Linkbridge', 'Danané', 'Dayton', 'Jobie', 2), (51, 'Voonyx', 'Kaltungo', 'Mayfield', 'Gardiner', 61), (52, 'Lazzy', 'Minas', 'Village Green', 'Hogan', 4), (53, 'Skinix', 'Ochobo', 'South', 'Maureen', 66), (54, 'Livefish', 'Huaguoshan', 'Logan', 'Griswold', 38), (55, 'Thoughtbridge', 'Asmara', 'Bartelt', 'Celine', 55), (56, 'Shuffletag', 'Rio Branco', 'Pierstorff', 'Boyd', 78), (57, 'Linkbridge', 'Bato', 'Pennsylvania', 'Dexter', 49), (58, 'Lajo', 'Dahedian', 'Petterle', 'Gaile', 89), (59, 'Devbug', 'Paita', 'Clyde Gallagher', 'Erinna', 28), (60, 'Thoughtstorm', 'Pasarnangka', 'American', 'Bryana', 23), (61, 'Cogidoo', 'Tharyarwady', 'Mendota', 'Kaitlyn', 96), (62, 'Shuffledrive', 'Göteborg', 'Lillian', 'Cly', 62), (63, 'Oyoyo', 'Yekaterinovka', 'Melby', 'Becka', 96), (64, 'Livetube', 'Xiang Ngeun', 'Macpherson', 'Gerhardt', 82), (65, 'Thoughtbeat', 'Savran’', 'Beilfuss', 'Christoph', 55), (66, 'Jabbersphere', 'Cockburn Town', 'Darwin', 'Aarika', 33), (67, 'Oloo', 'Piškorevci', 'Bunting', 'Felisha', 33), (68, 'Quatz', 'Shuiyang', 'Ilene', 'Tristam', 8), (69, 'Avamm', 'Strasbourg', 'Bay', 'Imogene', 80), (70, 'Divanoodle', 'Kaminoyama', 'Lien', 'Adrian', 1), (71, 'Centidel', 'Onitsha', 'Vera', 'Evelyn', 71), (72, 'Thoughtbeat', 'Araci', 'Eastlawn', 'Calv', 58), (73, 'Quimm', 'Haputale', 'Springs', 'Rivy', 85), (74, 'Realmix', 'Kubanskiy', 'Sauthoff', 'Lucinda', 69), (75, 'Teklist', 'Cabay', 'Hanson', 'Selina', 74), (76, 'Yambee', 'Haeju', 'Scoville', 'Andeee', 4), (77, 'Centizu', 'Kisovec', 'Melby', 'Lon', 51), (78, 'Chatterpoint', 'Krivodanovka', 'Fordem', 'Baxie', 28), (79, 'Jaxnation', 'Urachiche', 'Pleasure', 'Gisela', 30), (80, 'Photobug', 'Dokri', 'Heath', 'Alastair', 23), (81, 'Myworks', 'Des Moines', 'Rutledge', 'Rosina', 84), (82, 'Ntags', 'Bissau', 'Hooker', 'Saba', 6), (83, 'Quatz', 'Ziroudani', 'Badeau', 'Luigi', 91), (84, 'Meevee', 'Huangxi', 'Arapahoe', 'Beth', 33), (85, 'Realcube', 'Sélestat', 'Forest Run', 'Gideon', 83), (86, 'Jabbertype', 'Panyuran', 'Ruskin', 'Paulie', 38), (87, 'Viva', 'Puerto Rico', 'Dapin', 'Deanna', 77), (88, 'Flashpoint', 'Kontagora', 'Roth', 'Reinaldo', 93), (89, 'Skinix', 'Baardheere', 'Grayhawk', 'Florette', 34), (90, 'Roomm', 'Lubin', 'Blaine', 'Chuck', 98), (91, 'Tagchat', 'Kumane', 'Forest', 'Gardener', 46), (92, 'Babblestorm', 'Pervomaysk', 'Myrtle', 'Suki', 78), (93, 'Aivee', 'Ajaccio', 'Kedzie', 'Yetta', 56), (94, 'Digitube', 'Wanghu', 'Almo', 'Roberto', 50), (95, 'Twinte', 'Dnestrovsc', 'Bonner', 'Mada', 40), (96, 'Skinix', 'Irving', 'Troy', 'Carline', 50), (97, 'Trunyx', 'Willemstad', 'Fallview', 'Allis', 83), (98, 'Plambee', 'Santa Eulalia', 'Schurz', 'Felix', 66), (99, 'Youtags', 'Succha', 'Mcguire', 'Alexina', 35), (100, 'Minyx', 'Labangka Satu', 'Buena Vista', 'Albertina', 68); -- -------------------------------------------------------- -- -- Structure de la table `competition` -- DROP TABLE IF EXISTS `competition`; CREATE TABLE IF NOT EXISTS `competition` ( `num_seq` int(11) NOT NULL, `date` date NOT NULL, `centre` int(11) NOT NULL, `cout_inscription` int(11) NOT NULL, `type_compétition` int(11) NOT NULL, PRIMARY KEY (`num_seq`), KEY `Cascade Compétition` (`centre`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Déchargement des données de la table `competition` -- INSERT INTO `competition` (`num_seq`, `date`, `centre`, `cout_inscription`, `type_compétition`) VALUES (1, '2021-03-19', 6, 24, 24), (2, '2020-12-03', 45, 47, 80), (3, '2021-06-04', 33, 48, 60), (4, '2020-07-11', 25, 100, 26), (5, '2022-02-12', 1, 15, 51), (6, '2021-02-27', 37, 85, 14), (7, '2020-04-01', 47, 54, 35), (8, '2021-05-11', 28, 8, 61), (9, '2020-08-20', 9, 56, 75), (10, '2022-03-12', 44, 33, 11), (11, '2020-04-24', 61, 75, 78), (12, '2022-02-14', 45, 6, 63), (13, '2020-06-30', 72, 99, 60), (14, '2022-07-19', 66, 25, 52), (15, '2021-01-09', 39, 71, 11), (16, '2021-01-04', 27, 16, 34), (17, '2020-10-11', 68, 18, 74), (18, '2021-12-20', 80, 22, 64), (19, '2022-04-02', 63, 51, 46), (20, '2020-11-07', 1, 16, 2), (21, '2022-01-25', 25, 29, 89), (22, '2020-05-05', 5, 50, 28), (23, '2020-08-23', 74, 25, 24), (24, '2020-11-30', 19, 86, 34), (25, '2021-06-04', 9, 96, 37), (26, '2020-11-20', 97, 48, 72), (27, '2020-09-14', 69, 93, 22), (28, '2022-02-09', 59, 92, 85), (29, '2021-12-22', 45, 88, 75), (30, '2022-07-08', 45, 13, 9), (31, '2022-07-19', 97, 48, 50), (32, '2021-02-02', 94, 32, 63), (33, '2020-05-07', 70, 89, 47), (34, '2021-02-01', 3, 100, 94), (35, '2022-06-16', 49, 32, 36), (36, '2021-12-27', 1, 37, 25), (37, '2020-07-27', 7, 95, 21), (38, '2021-05-03', 5, 82, 26), (39, '2021-01-15', 70, 23, 11), (40, '2021-01-24', 54, 32, 80), (41, '2021-11-18', 39, 2, 51), (42, '2021-10-13', 65, 29, 78), (43, '2022-04-01', 37, 9, 61), (44, '2022-03-22', 83, 24, 61), (45, '2022-03-02', 7, 22, 53), (46, '2020-04-08', 6, 88, 85), (47, '2020-09-12', 11, 9, 19), (48, '2021-05-31', 37, 77, 96), (49, '2020-12-17', 99, 63, 70), (50, '2020-06-16', 12, 76, 78), (51, '2021-01-26', 44, 25, 75), (52, '2020-06-26', 8, 30, 28), (53, '2021-11-23', 83, 86, 79), (54, '2020-07-06', 77, 64, 35), (55, '2022-07-12', 40, 9, 23), (56, '2020-04-05', 62, 76, 48), (57, '2020-05-19', 62, 65, 68), (58, '2021-02-14', 60, 35, 60), (59, '2021-01-05', 79, 92, 54), (60, '2020-07-12', 4, 94, 40), (61, '2021-04-05', 58, 11, 37), (62, '2020-09-29', 1, 38, 18), (63, '2020-05-09', 2, 21, 71), (64, '2021-09-27', 76, 7, 47), (65, '2021-10-17', 38, 93, 59), (66, '2020-12-20', 35, 45, 85), (67, '2021-06-06', 96, 94, 28), (68, '2020-11-26', 11, 13, 67), (69, '2022-02-17', 95, 41, 55), (70, '2021-12-06', 42, 29, 79), (71, '2021-08-29', 40, 13, 67), (72, '2022-04-24', 74, 20, 91), (73, '2021-02-24', 29, 87, 52), (74, '2021-06-29', 47, 15, 45), (75, '2020-05-18', 45, 74, 43), (76, '2021-08-31', 41, 67, 65), (77, '2020-12-22', 80, 21, 4), (78, '2020-06-03', 9, 88, 51), (79, '2020-04-03', 21, 50, 46), (80, '2020-11-20', 68, 15, 47), (81, '2021-12-25', 36, 49, 7), (82, '2022-04-17', 52, 6, 70), (83, '2021-05-17', 83, 44, 18), (84, '2021-06-19', 29, 48, 61), (85, '2021-09-01', 38, 36, 14), (86, '2021-07-14', 91, 60, 76), (87, '2020-07-01', 25, 70, 85), (88, '2020-08-05', 28, 30, 69), (89, '2020-10-16', 11, 49, 26), (90, '2022-05-25', 58, 84, 84), (91, '2022-03-09', 51, 60, 53), (92, '2021-03-19', 85, 58, 36), (93, '2021-05-20', 94, 19, 45), (94, '2020-08-04', 45, 22, 28), (95, '2021-02-06', 37, 41, 7), (96, '2022-05-05', 25, 92, 84), (97, '2021-11-21', 70, 19, 46), (98, '2022-01-20', 89, 29, 33), (99, '2022-02-03', 76, 85, 80), (100, '2021-12-27', 49, 62, 75); -- -------------------------------------------------------- -- -- Structure de la table `licencie` -- DROP TABLE IF EXISTS `licencie`; CREATE TABLE IF NOT EXISTS `licencie` ( `id` int(11) NOT NULL, `nom` varchar(25) NOT NULL, `prenom` varchar(25) NOT NULL, `date` varchar(25) NOT NULL, `sexe` varchar(55) NOT NULL, `adresse` varchar(100) NOT NULL, `club` int(11) NOT NULL, `catAge` int(100) NOT NULL, PRIMARY KEY (`id`), KEY `contrainte_foreign_key_catAge` (`catAge`), KEY `contrainte_foreign_key_club` (`club`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='111111111111111111111111111111'; -- -- Déchargement des données de la table `licencie` -- INSERT INTO `licencie` (`id`, `nom`, `prenom`, `date`, `sexe`, `adresse`, `club`, `catAge`) VALUES (1, 'Massen', 'Jo-ann', '2021-01-28 05:51:21', 'Male', '86574 Orin Lane', 5, 6), (2, 'McKeighen', 'Katee', '2021-01-06 09:02:43', 'Genderfluid', '026 Bonner Junction', 30, 1), (3, 'Gruczka', 'Laryssa', '2020-06-27 17:14:19', 'Agender', '6075 Esker Alley', 15, 6), (4, 'Ingleson', 'Corry', '2020-07-03 10:15:05', 'Male', '762 Shasta Street', 31, 6), (5, 'Buxsey', 'Wilie', '2021-03-06 03:18:44', 'Non-binary', '93301 Thompson Avenue', 2, 4), (6, 'Ruddlesden', 'Georgetta', '2020-06-17 01:20:16', 'Bigender', '2 Washington Way', 94, 6), (7, 'Korous', 'Aldis', '2021-01-12 01:52:54', 'Bigender', '73824 Algoma Avenue', 89, 6), (8, 'Osinin', 'Lenore', '2021-03-18 09:58:28', 'Polygender', '976 Morningstar Circle', 55, 5), (9, 'Bambery', 'Charisse', '2021-01-08 08:13:42', 'Non-binary', '22 Morningstar Hill', 1, 6), (10, 'Waddingham', 'Ephraim', '2021-03-11 06:41:43', 'Non-binary', '9 Sundown Junction', 89, 1), (11, 'Pavlitschek', 'Symon', '2020-05-05 16:35:54', 'Bigender', '8732 Claremont Point', 8, 6), (12, 'Yemm', 'Griffin', '2020-06-08 10:29:10', 'Polygender', '0500 Valley Edge Place', 29, 6), (13, 'McPartling', 'Dene', '2020-09-13 02:59:39', 'Genderqueer', '55737 Golden Leaf Place', 89, 6), (14, 'Yewen', 'Maje', '2020-10-27 18:55:29', 'Female', '85144 Melby Lane', 44, 3), (15, 'Maris', 'See', '2020-10-26 15:47:07', 'Bigender', '698 Caliangt Point', 55, 4), (16, 'Langtry', 'Eddi', '2021-02-28 03:46:32', 'Non-binary', '9909 Evergreen Trail', 47, 3), (17, 'Baack', 'Reggie', '2020-09-04 20:43:40', 'Genderfluid', '3 Northview Circle', 17, 3), (18, 'Egarr', 'Andros', '2020-08-04 04:52:15', 'Agender', '32 Golf Course Parkway', 1, 5), (19, 'Caslane', 'Vanny', '2021-01-14 09:10:19', 'Genderqueer', '702 Fulton Alley', 35, 6), (20, 'Cavy', 'Alejandro', '2020-05-04 23:20:39', 'Polygender', '8283 Service Way', 49, 6), (21, 'Prescot', 'Melly', '2020-08-04 22:46:07', 'Polygender', '1 Mockingbird Way', 2, 6), (22, 'Johncey', 'Drusie', '2020-04-26 12:32:33', 'Bigender', '40073 Moulton Center', 12, 6), (23, 'Swinfon', 'Amandi', '2020-10-21 14:15:20', 'Agender', '51 Merrick Pass', 77, 5), (24, 'Keslake', 'Luce', '2020-06-22 01:54:02', 'Genderqueer', '4814 Milwaukee Alley', 16, 5), (25, 'Yarr', 'Adriane', '2021-02-12 05:22:02', 'Genderfluid', '8 Mesta Center', 63, 5), (26, 'Dakhov', 'Brandais', '2020-03-31 18:06:49', 'Non-binary', '83798 Fuller Park', 93, 6), (27, 'Whelband', 'Marchelle', '2020-10-15 10:12:14', 'Bigender', '6785 Sugar Trail', 73, 5), (28, 'Stoppe', 'Luella', '2021-02-28 02:06:28', 'Polygender', '7604 Michigan Alley', 87, 6), (29, 'Rawstorn', 'Jeanine', '2020-08-01 02:23:54', 'Polygender', '438 Reinke Road', 56, 5), (30, 'Eskriet', 'Selig', '2021-02-10 16:46:29', 'Bigender', '4857 Kropf Avenue', 14, 6), (31, 'Pendre', 'Buffy', '2021-01-22 19:38:35', 'Genderqueer', '13888 Eastwood Drive', 99, 5), (32, 'Zavattero', 'Delcine', '2020-04-07 09:34:05', 'Genderfluid', '57 Grover Point', 82, 6), (33, 'Caesmans', 'Tomasine', '2021-01-08 12:05:27', 'Bigender', '89926 Bonner Way', 13, 3), (34, 'Alwen', 'Jennette', '2020-07-16 23:04:12', 'Genderfluid', '26 Armistice Junction', 83, 6), (35, 'Bethune', 'Carmita', '2020-08-17 07:27:36', 'Genderqueer', '166 Maple Court', 93, 3), (36, 'Nesby', 'Madlen', '2020-12-09 12:10:37', 'Non-binary', '1 Carberry Park', 32, 6), (37, 'Greenacre', 'Liane', '2020-06-29 10:19:49', 'Genderfluid', '80 Springs Avenue', 20, 6), (38, 'Sweetman', 'Corry', '2021-02-28 18:31:52', 'Genderqueer', '66248 Bellgrove Alley', 34, 4), (39, 'Gooding', 'Leodora', '2020-05-24 17:41:25', 'Polygender', '0 Elmside Avenue', 88, 3), (40, 'Lawton', 'Dulcinea', '2020-07-10 10:15:41', 'Polygender', '01 Ridgeway Center', 24, 6), (41, 'Pree', 'Raffaello', '2020-08-31 10:21:27', 'Polygender', '0765 Washington Alley', 26, 6), (42, 'Clardge', 'Kenneth', '2021-03-11 12:19:27', 'Polygender', '57205 Crowley Court', 72, 5), (43, 'Lerer', 'Rosana', '2020-10-24 11:06:13', 'Agender', '2554 Shoshone Crossing', 66, 2), (44, 'Richings', 'Peg', '2020-07-02 16:04:49', 'Bigender', '22 Debs Avenue', 18, 5), (45, 'McGuire', 'Millisent', '2020-12-02 13:36:16', 'Male', '588 Vidon Terrace', 69, 6), (46, 'Braiden', 'Jethro', '2020-11-01 23:05:08', 'Agender', '03 Sutherland Point', 72, 6), (47, 'Joontjes', 'Lanny', '2020-06-11 04:22:53', 'Female', '3 Graedel Circle', 77, 6), (48, 'Ovise', 'Charil', '2020-08-07 00:01:17', 'Male', '37 Hoepker Plaza', 80, 5), (49, 'Jebb', 'Freedman', '2020-11-21 22:22:16', 'Agender', '14 Village Parkway', 71, 5), (50, 'Pilipets', 'Lucky', '2020-11-03 22:00:10', 'Agender', '2452 Messerschmidt Place', 53, 4), (51, 'Purvess', 'Barr', '2020-07-10 06:41:50', 'Genderfluid', '1097 Harper Avenue', 45, 5), (52, 'Camacke', 'Saul', '2021-03-01 07:03:24', 'Genderfluid', '19 Pankratz Street', 67, 6), (53, 'Puvia', 'Kimble', '2020-12-03 08:02:40', 'Female', '661 Raven Circle', 34, 6), (54, 'Monier', 'Saloma', '2020-09-04 10:58:22', 'Genderfluid', '83765 5th Junction', 5, 6), (55, 'Berr', 'Blinnie', '2020-06-14 10:35:18', 'Female', '6 Scoville Place', 70, 6), (56, 'Juleff', 'Mariejeanne', '2020-07-27 00:38:53', 'Female', '240 6th Crossing', 73, 4), (57, 'Crang', 'Zacharias', '2020-06-28 13:22:04', 'Agender', '3 Hintze Hill', 14, 2), (58, 'Cartmel', 'Cletus', '2021-01-13 16:51:45', 'Bigender', '900 Darwin Way', 71, 5), (59, 'Gerbel', 'Artemas', '2020-07-21 15:20:08', 'Genderfluid', '88389 Bellgrove Hill', 14, 2), (60, 'Lemm', 'Kaja', '2020-05-12 20:11:30', 'Male', '13476 Paget Road', 2, 6), (61, 'How to preserve', 'Gussie', '2020-07-02 04:44:17', 'Non-binary', '865 Elgar Circle', 99, 6), (62, 'Sheed', 'Adria', '2020-06-05 02:21:15', 'Genderfluid', '54 Schlimgen Junction', 18, 4), (63, 'Schermick', 'Rodrique', '2020-12-26 12:31:05', 'Female', '3785 Melody Center', 11, 6), (64, 'Bilbery', 'Ardelis', '2021-01-01 11:06:14', 'Female', '3 Gale Trail', 7, 6), (65, 'Killoran', 'Katti', '2020-08-11 14:14:57', 'Female', '73 Ilene Point', 71, 6), (66, 'Tucknutt', 'Baxie', '2020-03-28 04:19:17', 'Female', '80 Pennsylvania Plaza', 19, 3), (67, 'Spinelli', 'Arlinda', '2020-11-16 15:25:52', 'Non-binary', '04817 American Ash Point', 37, 5), (68, 'Filippazzo', 'Herby', '2020-05-11 09:10:44', 'Bigender', '4 Sutteridge Alley', 26, 4), (69, 'Malham', 'Anatollo', '2021-03-12 03:07:09', 'Genderfluid', '402 Petterle Point', 53, 6), (70, 'Olver', 'Cyndi', '2020-09-10 22:32:04', 'Agender', '65 Magdeline Junction', 42, 5), (71, 'Lapthorn', 'Nikoletta', '2021-02-11 15:18:51', 'Polygender', '1502 Golf Course Way', 2, 5), (72, 'Happel', 'Aldrich', '2021-02-26 02:43:48', 'Female', '1 Mesta Hill', 55, 4), (73, 'Armin', 'Grayce', '2020-06-12 21:41:34', 'Female', '47370 Ronald Regan Way', 19, 5), (74, 'Gudgeon', 'Geneva', '2021-01-28 14:30:11', 'Female', '84 Bay Circle', 92, 5), (75, 'Ilyin', 'Berenice', '2020-09-08 07:26:49', 'Polygender', '3 Bunting Terrace', 6, 3), (76, 'Rao', 'Sonny', '2020-10-26 01:00:22', 'Polygender', '8792 Blackbird Street', 88, 4), (77, 'Iacovaccio', 'Lauraine', '2020-11-03 00:01:15', 'Male', '2011 Utah Hill', 82, 6), (78, 'Reames', 'Jodie', '2020-08-21 17:12:17', 'Non-binary', '60322 Marcy Pass', 21, 3), (79, 'Dowle', 'Candi', '2020-09-12 04:05:55', 'Non-binary', '37 Clove Circle', 42, 6), (80, 'Gilbank', 'Blair', '2020-09-05 22:39:00', 'Agender', '952 Anderson Hill', 85, 6), (81, 'Frude', 'Mimi', '2021-02-08 11:20:20', 'Polygender', '8 Fisk Place', 2, 5), (82, 'McCall', 'Win', '2020-04-30 14:34:55', 'Polygender', '3332 Pierstorff Pass', 43, 5), (83, 'Kebell', 'Nial', '2020-06-02 04:30:57', 'Genderqueer', '88 Rusk Trail', 24, 6), (84, 'Syme', 'Suzie', '2020-10-09 23:28:00', 'Polygender', '06164 Birchwood Alley', 76, 6), (85, 'Garn', 'Marcos', '2021-02-15 06:59:33', 'Genderqueer', '69 Harbort Pass', 11, 4), (86, 'Gettins', 'Florette', '2021-03-04 19:56:01', 'Female', '310 Monument Trail', 88, 5), (87, 'Wadhams', 'Blondie', '2021-03-07 11:56:45', 'Genderfluid', '8 Heffernan Alley', 18, 5), (88, 'Storks', 'Janie', '2020-10-04 03:19:51', 'Male', '6323 Service Trail', 63, 3), (89, 'Codrington', 'Clair', '2021-01-21 06:22:25', 'Non-binary', '345 Fisk Circle', 89, 5), (90, 'Drinkwater', 'Marena', '2020-09-06 11:22:24', 'Genderqueer', '31 Eastwood Terrace', 96, 6), (91, 'Dreye', 'Raye', '2020-05-11 19:43:28', 'Genderqueer', '222 Derek Lane', 5, 6), (92, 'Micklewright', 'Zollie', '2020-07-09 03:09:46', 'Non-binary', '1713 Northport Center', 91, 6), (93, 'OIlier', 'Kathi', '2020-09-16 11:27:04', 'Non-binary', '97000 Clarendon Road', 55, 6), (94, 'Ridding', 'Maryann', '2020-07-18 14:27:21', 'Genderqueer', '3 Parkside Way', 7, 6), (95, 'Brinded', 'Ainsley', '2020-06-24 22:01:55', 'Genderqueer', '6 Tomscot Point', 3, 6), (96, 'Minney', 'Delilah', '2020-10-09 06:03:07', 'Male', '66 Express Street', 25, 6), (97, 'McQuirter', 'Rachelle', '2020-04-28 19:44:04', 'Non-binary', '3 John Wall Pass', 68, 4), (98, 'Keen', 'Quinlan', '2021-03-07 00:29:58', 'Genderqueer', '562 Mayfield Park', 62, 5), (99, 'Schoenfisch', 'Sandye', '2020-12-04 11:06:57', 'Genderfluid', '05 Farwell Lane', 29, 6), (100, 'O\'Heaney', 'Allie', '2020-04-02 08:28:09', 'Genderfluid', '6 Porter Street', 90, 6); -- -------------------------------------------------------- -- -- Structure de la table `participer` -- DROP TABLE IF EXISTS `participer`; CREATE TABLE IF NOT EXISTS `participer` ( `competition` int(11) NOT NULL, `joueur` int(11) NOT NULL, `nbr_total_quilles` int(11) NOT NULL, `nbr_parties` int(11) NOT NULL, PRIMARY KEY (`competition`,`joueur`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Contraintes pour les tables déchargées -- -- -- Contraintes pour la table `club` -- ALTER TABLE `club` ADD CONSTRAINT `Cascade club` FOREIGN KEY (`centre`) REFERENCES `centre` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `contrainte_foreign_key_centre` FOREIGN KEY (`centre`) REFERENCES `centre` (`id`); -- -- Contraintes pour la table `competition` -- ALTER TABLE `competition` ADD CONSTRAINT `Cascade Compétition` FOREIGN KEY (`centre`) REFERENCES `centre` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `contrainte_foreign_key_centreCompet` FOREIGN KEY (`centre`) REFERENCES `centre` (`id`); -- -- Contraintes pour la table `licencie` -- ALTER TABLE `licencie` ADD CONSTRAINT `contrainte_foreign_key_catAge` FOREIGN KEY (`catAge`) REFERENCES `categorie_age` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `contrainte_foreign_key_club` FOREIGN KEY (`club`) REFERENCES `club` (`id`) ON DELETE CASCADE; COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
true
dc46d3d7265ec623973409773523580434b305b9
SQL
ryhord/National-Park-Campsite-Registration
/Capstone.Tests/database.sql
UTF-8
2,996
2.734375
3
[]
no_license
DELETE FROM reservation; DELETE FROM site; DELETE FROM campground; DELETE FROM park; SET IDENTITY_INSERT park ON; INSERT INTO park (park_id, name, location, establish_date, area, visitors, description) VALUES (1, 'Park', 'Ohio', '2018-01-01', 10000, 2, 'Description'); INSERT INTO park (park_id, name, location, establish_date, area, visitors, description) VALUES (2, 'Other Park', 'Florida', '2018-02-01', 4500, 9382, 'Description 2'); SET IDENTITY_INSERT park OFF; SET IDENTITY_INSERT campground ON; INSERT INTO campground (campground_id, park_id, name, open_from_mm, open_to_mm, daily_fee) VALUES (1, 1, 'Test campground', '1', '12', '45.00'); INSERT INTO campground (campground_id, park_id, name, open_from_mm, open_to_mm, daily_fee) VALUES (2, 2, 'Test campground', '4', '6', '75.00'); INSERT INTO campground (campground_id, park_id, name, open_from_mm, open_to_mm, daily_fee) VALUES (3, 2, 'Test campground', '5', '9', '50.00'); SET IDENTITY_INSERT campground OFF; SET IDENTITY_INSERT site ON; INSERT INTO site (site_id, campground_id, site_number, max_occupancy, accessible, max_rv_length, utilities) VALUES (1, 1, 1, '10', '0', '12', '0'); INSERT INTO site (site_id, campground_id, site_number, max_occupancy, accessible, max_rv_length, utilities) VALUES (2, 1, 2, '8', '0', '6', '1'); INSERT INTO site (site_id, campground_id, site_number, max_occupancy, accessible, max_rv_length, utilities) VALUES (3, 2, 3, '3', '0', '9', '1'); INSERT INTO site (site_id, campground_id, site_number, max_occupancy, accessible, max_rv_length, utilities) VALUES (4, 2, 4, '2', '1', '0', '0'); INSERT INTO site (site_id, campground_id, site_number, max_occupancy, accessible, max_rv_length, utilities) VALUES (5, 3, 5, '6', '1', '0', '0'); INSERT INTO site (site_id, campground_id, site_number, max_occupancy, accessible, max_rv_length, utilities) VALUES (6, 3, 6, '8', '1', '0', '1'); SET IDENTITY_INSERT site OFF; SET IDENTITY_INSERT reservation ON; INSERT INTO reservation (reservation_id, site_id, name, from_date, to_date, create_date) VALUES (1, 6, 'Reservation test 1', '2018-06-20', '2018-06-25', '2018-03-01'); INSERT INTO reservation (reservation_id, site_id, name, from_date, to_date, create_date) VALUES (2, 5, 'Reservation test 2', '2018-08-01', '2018-08-30', '2018-01-01'); INSERT INTO reservation (reservation_id, site_id, name, from_date, to_date, create_date) VALUES (3, 4, 'Reservation test 3', '2018-04-20', '2018-04-25', '2018-03-01'); INSERT INTO reservation (reservation_id, site_id, name, from_date, to_date, create_date) VALUES (4, 3, 'Reservation test 4', '2018-05-01', '2018-05-30', '2018-01-01'); INSERT INTO reservation (reservation_id, site_id, name, from_date, to_date, create_date) VALUES (5, 2, 'Reservation test 5', '2018-06-20', '2018-06-25', '2018-03-01'); INSERT INTO reservation (reservation_id, site_id, name, from_date, to_date, create_date) VALUES (6, 1, 'Reservation test 6', '2018-08-01', '2018-08-30', '2018-01-01'); SET IDENTITY_INSERT reservation OFF;
true
c10df2015c132319c73e9aa3315fb9116adb2d32
SQL
CharmyZ/About-NodeJs
/expressProject-master/config/userinfo.sql
UTF-8
1,543
2.9375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.4.10.1 -- http://www.phpmyadmin.net -- -- 主机: localhost -- 生成日期: 2015 年 12 月 02 日 07:27 -- 服务器版本: 5.5.20 -- PHP 版本: 5.3.10 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; -- -- 数据库: `nodetest` -- -- -------------------------------------------------------- -- -- 表的结构 `userinfo` -- CREATE TABLE IF NOT EXISTS `userinfo` ( `id` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(100) NOT NULL, `password` varchar(100) NOT NULL, `nickname` varchar(100) NOT NULL, `sex` int(2) DEFAULT NULL, `age` int(3) DEFAULT NULL, `birthday` date DEFAULT NULL, `desc` varchar(100) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=8 ; -- -- 转存表中的数据 `userinfo` -- INSERT INTO `userinfo` (`id`, `username`, `password`, `nickname`, `sex`, `age`, `birthday`, `desc`) VALUES (1, 'xujiaxin', '123456', 'katte', NULL, NULL, NULL, NULL), (6, 'xujiaxin3', 'xujiaxin', 'xujiaxin3', NULL, NULL, NULL, NULL), (7, 'katte', '123456', '攻城狮', NULL, NULL, NULL, NULL); /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
true
609821b8d5c54054826bfc320222b4a374eca1e7
SQL
loris-dinardo/swapcar-backend
/Swapcar.DbCreation/01_01_create_brand.sql
UTF-8
1,990
3.9375
4
[]
no_license
----------------------------------- Create brand schema DROP SCHEMA IF EXISTS brand CASCADE; CREATE SCHEMA brand; ----------------------------------- Create brand sequences DROP SEQUENCE IF EXISTS brand.brand_seq CASCADE; CREATE SEQUENCE brand.brand_seq INCREMENT BY 1 MINVALUE 0 MAXVALUE 9223372036854775807 START WITH 1 CACHE 1 NO CYCLE OWNED BY NONE; DROP SEQUENCE IF EXISTS brand.model_seq CASCADE; CREATE SEQUENCE brand.model_seq INCREMENT BY 1 MINVALUE 0 MAXVALUE 9223372036854775807 START WITH 1 CACHE 1 NO CYCLE OWNED BY NONE; DROP SEQUENCE IF EXISTS brand.version_seq CASCADE; CREATE SEQUENCE brand.version_seq INCREMENT BY 1 MINVALUE 0 MAXVALUE 9223372036854775807 START WITH 1 CACHE 1 NO CYCLE OWNED BY NONE; -------------------------------------------------- Create brand tables -- Car Brands DROP TABLE IF EXISTS brand.brand CASCADE; CREATE TABLE brand.brand( brand_id int4 NOT NULL DEFAULT nextval('brand.brand_seq'::regclass), name varchar(255), CONSTRAINT brand_pkey PRIMARY KEY (brand_id) ); -- Car Models DROP TABLE IF EXISTS brand.model CASCADE; CREATE TABLE brand.model( model_id int4 NOT NULL DEFAULT nextval('brand.model_seq'::regclass), name varchar(255), brand_id int4, CONSTRAINT model_pkey PRIMARY KEY (model_id) ); -- Car Versions DROP TABLE IF EXISTS brand.version CASCADE; CREATE TABLE brand.version( version_id int4 NOT NULL DEFAULT nextval('brand.version_seq'::regclass), name varchar(255), model_id int4, CONSTRAINT version_pkey PRIMARY KEY (version_id) ); -------------------------------------------------- Create brand constraints -- Car Models ALTER TABLE brand.model ADD CONSTRAINT brand_fkey FOREIGN KEY (brand_id) REFERENCES brand.brand(brand_id) ON DELETE CASCADE; -- Car Versions ALTER TABLE brand.version ADD CONSTRAINT model_fkey FOREIGN KEY (model_id) REFERENCES brand.model(model_id) ON DELETE CASCADE;
true
04771593aead791d5e056805ab85877e74e568cf
SQL
jbarthelmess/RevatureConnectPlus
/scheme.sql
UTF-8
1,028
3.421875
3
[]
no_license
create table plus_user( user_id int primary key generated always as identity, username varchar(256) not null, -- can update to password and use passhash instead or chkpass extension password_ varchar(256) not null, display_name varchar(256) ); create table post( post_id int primary key generated always as identity, user_id int not null, date_posted int not null, content varchar(5000) not null ); create table like_( user_id int not null, post_id int not null ) create table comment( user_id int not null, post_id int not null, comment varchar(3000) not null ) alter table post add foreign key (user_id) references user_(user_id); alter table like_ add foreign key (user_id) references user_(user_id); alter table comment add foreign key (user_id) references user_(user_id); alter table like_ add foreign key (post_id) references post(post_id); alter table comment add foreign key (post_id) references post(post_id); alter table user_ add constraint username unique;
true
7636a3661d7f4a9a96691679b0950d8014381721
SQL
opensrp/dhis2-fhir-adapter
/fhir/src/main/resources/db/migration/production/V1.1.0.34_0_0__Resource_Updates_Fix.sql
UTF-8
4,667
2.859375
3
[ "BSD-3-Clause" ]
permissive
/* * Copyright (c) 2004-2019, University of Oslo * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * Neither the name of the HISP project nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO PROGRAM_STAGE_EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -- @formatter:off UPDATE fhir_script_source SET source_text= 'output.setVerificationStatus(fhirResourceUtils.resolveEnumValue(output, ''verificationStatus'', ''entered-in-error'')); true' WHERE id='495fd0d6-92c5-421a-812d-b4d4ba12469f' and version=0; DELETE FROM fhir_script_source_version WHERE script_source_id='495fd0d6-92c5-421a-812d-b4d4ba12469f' AND fhir_version='R4'; UPDATE fhir_script_source SET source_text= 'output.setVerificationStatus(fhirResourceUtils.resolveEnumValue(output, ''verificationStatus'', (input.getStatus() == ''COMPLETED'' ? null : ''provisional''))); true' WHERE id='1c673242-e309-43c4-a690-cb42da41fbb7' and version=0; DELETE FROM fhir_script_source_version WHERE script_source_id='1c673242-e309-43c4-a690-cb42da41fbb7' AND fhir_version='R4'; INSERT INTO fhir_script_source (id, version, script_id, source_text, source_type) VALUES ('e3dad9c6-df15-4879-b1be-05f9fc78dc6e', 0, 'a3dba79b-bbc8-4335-874d-d7eb23f6c204', 'output.setStatus(fhirResourceUtils.resolveEnumValue(output, ''status'', ''entered-in-error'')); true', 'JAVASCRIPT'); INSERT INTO fhir_script_source_version (script_source_id, fhir_version) VALUES ('e3dad9c6-df15-4879-b1be-05f9fc78dc6e', 'R4'); INSERT INTO fhir_script_source (id, version, script_id, source_text, source_type) VALUES ('7264de56-5680-4b59-8ef0-189becc5fc90', 0, '372f8459-aa9a-44b9-bb8e-71a827265e52', 'output.setVerificationStatus(null); if (input.getStatus() != ''COMPLETED'') output.getVerificationStatus().addCoding().setSystem(''http://terminology.hl7.org/CodeSystem/condition-ver-status'').setCode(''provisional''); true', 'JAVASCRIPT'); INSERT INTO fhir_script_source_version (script_source_id, fhir_version) VALUES ('7264de56-5680-4b59-8ef0-189becc5fc90', 'R4'); UPDATE fhir_script_source SET source_text= 'var updated = false; if (typeof output.dateElement !== ''undefined'') { output.setDateElement(dateTimeUtils.getDayDateTimeElement(input.getEventDate())); updated = true; } else if (typeof output.effective !== ''undefined'') { output.setEffective(dateTimeUtils.getDayDateTimeElement(input.getEventDate())); updated = true; } else if (typeof output.period !== ''undefined'') { output.setPeriod(null); output.getPeriod().setStartElement(dateTimeUtils.getDayDateTimeElement(input.getEventDate())); updated = true; } else if (typeof output.recordedElement !== ''undefined'') { output.setRecordedElement(dateTimeUtils.getDayDateTimeElement(input.getEventDate())); updated = true; } else if (typeof output.recordedDateElement !== ''undefined'') { output.setRecordedDateElement(dateTimeUtils.getDayDateTimeElement(input.getEventDate())); updated = true; } else if (typeof output.authoredOnElement !== ''undefined'') { output.setAuthoredOnElement(dateTimeUtils.getDayDateTimeElement(input.getEventDate())); updated = true; } else if (typeof output.assertedDateElement !== ''undefined'') { output.setAssertedDateElement(dateTimeUtils.getDayDateTimeElement(input.getEventDate())); updated = true; } updated' WHERE id='4a0b6fde-c0d6-4ad2-89da-992f4a47a115' and version=0;
true
6be1adde7981e9da521856a0f010b1aadfbe451b
SQL
DimaBelyakovich/epamDB
/upgrade/upgrade003/create_table_event.sql
UTF-8
567
3.890625
4
[]
no_license
DEFINE INDEX_TBS = &&1 CREATE TABLE EVENT ( ID int GENERATED ALWAYS AS IDENTITY INCREMENT BY 1 START WITH 1 MINVALUE 1 NOT NULL, NAME varchar2(100), EVENT_DATE DATE, POLE_POSITION VARCHAR2(128), CONSTRAINT PK_EVENT PRIMARY KEY (ID) USING INDEX TABLESPACE &&INDEX_TBS ); COMMENT ON COLUMN EVENT.ID IS 'Unique value, serves as the primary key for the table'; COMMENT ON COLUMN EVENT.NAME IS 'NAME of the event'; COMMENT ON COLUMN EVENT.EVENT_DATE IS 'Date of the event'; COMMENT ON COLUMN EVENT.POLE_POSITION IS 'NAME of a driver who take a pole';
true
ed90f3274d55bfdd8a50b7d63ba44864f59a55c9
SQL
ye-man/initsListing
/initsdb.sql
UTF-8
5,194
3.09375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Nov 13, 2018 at 06:27 AM -- Server version: 5.7.19 -- PHP Version: 5.6.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `initsdb` -- -- -------------------------------------------------------- -- -- Table structure for table `admin_sessions` -- DROP TABLE IF EXISTS `admin_sessions`; CREATE TABLE IF NOT EXISTS `admin_sessions` ( `session_id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, `admin_id` varchar(11) NOT NULL, `hash` varchar(255) NOT NULL, PRIMARY KEY (`session_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `biz_addresses` -- DROP TABLE IF EXISTS `biz_addresses`; CREATE TABLE IF NOT EXISTS `biz_addresses` ( `address_id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, `biz_address` varchar(120) NOT NULL, PRIMARY KEY (`address_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `biz_admins` -- DROP TABLE IF EXISTS `biz_admins`; CREATE TABLE IF NOT EXISTS `biz_admins` ( `admin_id` int(11) NOT NULL AUTO_INCREMENT, `admin_name` varchar(120) NOT NULL, `admin_pass` varchar(120) NOT NULL, `salt` varchar(120) NOT NULL, PRIMARY KEY (`admin_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `biz_analytics` -- DROP TABLE IF EXISTS `biz_analytics`; CREATE TABLE IF NOT EXISTS `biz_analytics` ( `biz_id` int(11) NOT NULL AUTO_INCREMENT, `views` int(11) NOT NULL, PRIMARY KEY (`biz_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `biz_categories` -- DROP TABLE IF EXISTS `biz_categories`; CREATE TABLE IF NOT EXISTS `biz_categories` ( `bizcat_id` int(11) NOT NULL AUTO_INCREMENT, `category_name` varchar(30) NOT NULL, PRIMARY KEY (`bizcat_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `biz_cat_pivot` -- DROP TABLE IF EXISTS `biz_cat_pivot`; CREATE TABLE IF NOT EXISTS `biz_cat_pivot` ( `bizcat_id` int(11) NOT NULL, `biz_id` int(11) NOT NULL, KEY `biz_id` (`biz_id`), KEY `bizcat_id` (`bizcat_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `biz_images` -- DROP TABLE IF EXISTS `biz_images`; CREATE TABLE IF NOT EXISTS `biz_images` ( `image_id` int(11) NOT NULL AUTO_INCREMENT, `img_path` varchar(120) DEFAULT NULL, `biz_id` int(11) NOT NULL, PRIMARY KEY (`image_id`), KEY `biz_id` (`biz_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `biz_listings` -- DROP TABLE IF EXISTS `biz_listings`; CREATE TABLE IF NOT EXISTS `biz_listings` ( `biz_id` int(11) NOT NULL AUTO_INCREMENT, `admin_id` int(11) NOT NULL, `address_id` int(11) NOT NULL, `biz_name` varchar(20) NOT NULL, `biz_description` varchar(120) NOT NULL, `biz_email` varchar(120) NOT NULL, `biz_website` varchar(80) NOT NULL, PRIMARY KEY (`biz_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `biz_phones` -- DROP TABLE IF EXISTS `biz_phones`; CREATE TABLE IF NOT EXISTS `biz_phones` ( `biz_id` int(11) NOT NULL AUTO_INCREMENT, `first_phone` varchar(15) NOT NULL, `second_phone` varchar(15) NOT NULL, PRIMARY KEY (`biz_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Constraints for dumped tables -- -- -- Constraints for table `biz_analytics` -- ALTER TABLE `biz_analytics` ADD CONSTRAINT `biz_analytics_ibfk_1` FOREIGN KEY (`biz_id`) REFERENCES `biz_listings` (`biz_id`) ON DELETE CASCADE; -- -- Constraints for table `biz_cat_pivot` -- ALTER TABLE `biz_cat_pivot` ADD CONSTRAINT `biz_cat_pivot_ibfk_1` FOREIGN KEY (`biz_id`) REFERENCES `biz_listings` (`biz_id`) ON DELETE CASCADE, ADD CONSTRAINT `biz_cat_pivot_ibfk_2` FOREIGN KEY (`bizcat_id`) REFERENCES `biz_categories` (`bizcat_id`) ON DELETE CASCADE; -- -- Constraints for table `biz_images` -- ALTER TABLE `biz_images` ADD CONSTRAINT `biz_images_ibfk_1` FOREIGN KEY (`biz_id`) REFERENCES `biz_listings` (`biz_id`) ON DELETE CASCADE; -- -- Constraints for table `biz_phones` -- ALTER TABLE `biz_phones` ADD CONSTRAINT `biz_phones_ibfk_1` FOREIGN KEY (`biz_id`) REFERENCES `biz_listings` (`biz_id`) ON DELETE CASCADE; COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
true
7c4e7517b9baa0c3029e64bdd22362820f05412b
SQL
pytorchtw/go-db-services-starter
/db_data/migrations/000001_create_pages_table.up.sql
UTF-8
159
2.703125
3
[]
no_license
CREATE TABLE IF NOT EXISTS pages ( id serial PRIMARY KEY, url VARCHAR (150) NOT NULL, content TEXT, created_date date, created_at TIMESTAMP );
true
6243dd0c0fa2595a0723812af4cd0d51a2d99327
SQL
gerardo88995/hometeach
/Adult/column analysis/male.sql
UTF-8
236
3.609375
4
[]
no_license
with amount as ( select count(sex) as male_num from adult where sex = 'Male' ) select round(count(sex) / cast(male_num as double ), 2) * 100 as male_50k_ratio, male_num from adult, amount where sex = 'Male' and salary = '>50K' ;
true
7406c5508978a488f06ee65385948babbafcc090
SQL
EDITeam/edi.file
/服务部署/hana版/sqlscript/AVA_WM_VIEW_STK1.sql
GB18030
18,483
3.53125
4
[]
no_license
/* ƣͼ-AVA_WM_VIEW_STK1 ߣAVAƷ ڣ2018-8-15 ߼ֻappչʾ ע1żУɹչʾӦƺͲɹۡ */ CREATE VIEW "AVA_WM_VIEW_STK1" AS SELECT T0.* FROM ( /*-------------------------˻ݸ壩---------------------------------*/ SELECT T0."DocEntry" "ObjectKey",T1."LineNum" "LineId",'R' AS "TransType", concat('112-', T0."ObjType") AS "DocType",T0."DocEntry" AS "DocEntry",T1."LineNum" AS "DocLine", T1."BaseType" "BaseType",T1."BaseEntry" "BaseEntry",T1."BaseLine" "BaseLine", NULL "BSType",NULL "BSEntry",NULL "BSLine", T1."ItemCode",T2."ItemName",T2."ManBtchNum",T2."ManSerNum",T2."InvntryUom",'1' "ScanType", T1."Price" "Price",T1."Currency" "Currency",0.0 "Rate",0.0 "LineTotal", T1."FromWhsCod" "FromWH",null "FromLC",T1."WhsCode" "ToWH",null "ToLC", NULL AS "Ref1",NULL AS "Ref2", IFNULL(T1."Quantity",0) "Quantity",IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) "OpenQuantity", case when IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) = IFNULL(T1."Quantity",0) then 'O' when IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) < IFNULL(T1."Quantity",0) and IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) > 0 then 'E' else 'C' end as "LineStatus" FROM "ODRF" T0 INNER JOIN "DRF1" T1 ON T0."DocEntry" = T1."DocEntry" AND T0."ObjType" = '16' INNER JOIN "OITM" T2 ON T1."ItemCode" = T2."ItemCode" left join AVA_WM_VIEW_SRP1 t3 on T1."DocEntry" = T3."BaseEntry" and concat('112-' , T0."ObjType") = t3."BaseType" and t1."LineNum" = t3."BaseLine" WHERE T1."LineStatus"='O' AND IFNULL(T0."U_Sanctified",'R') = 'R' AND IFNULL(T1."Quantity",0) > 0 /*-------------------------ӦշƱݸ壩---------------------------------*/ UNION ALL SELECT T0."DocEntry" "ObjectKey",T1."LineNum" "LineId",'R' AS "TransType", concat('112-', T0."ObjType") AS "DocType",T0."DocEntry" AS "DocEntry",T1."LineNum" AS "DocLine", T1."BaseType" "BaseType",T1."BaseEntry" "BaseEntry",T1."BaseLine" "BaseLine", NULL "BSType",NULL "BSEntry",NULL "BSLine", T1."ItemCode" ,T2."ItemName" --Ϻż ,T2."ManBtchNum",T2."ManSerNum",T2."InvntryUom",'1' "ScanType", T1."Price" "Price",T1."Currency" "Currency",0.0 "Rate",0.0 "LineTotal", T1."FromWhsCod" "FromWH",null "FromLC",T1."WhsCode" "ToWH",null "ToLC", NULL AS "Ref1",NULL AS "Ref2", IFNULL(T1."Quantity",0) "Quantity",IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) "OpenQuantity", case when IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) = IFNULL(T1."Quantity",0) then 'O' when IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) < IFNULL(T1."Quantity",0) and IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) > 0 then 'E' else 'C' end as "LineStatus" FROM "ODRF" T0 INNER JOIN "DRF1" T1 ON T0."DocEntry" = T1."DocEntry" AND T0."ObjType" = '13' INNER JOIN "OITM" T2 ON T1."ItemCode" = T2."ItemCode" left join AVA_WM_VIEW_SRP1 t3 on T1."DocEntry" = T3."BaseEntry" and concat('112-', T0."ObjType") = t3."BaseType" and t1."LineNum" = t3."BaseLine" WHERE T1."LineStatus"='O' AND IFNULL(T0."U_Sanctified",'R') = 'R' AND IFNULL(T1."Quantity",0) > 0 and T2."InvntItem"='Y' --ɸѡϣBOM /*-------------------------ջݸ壩---------------------------------*/ UNION ALL SELECT T0."DocEntry" "ObjectKey",T1."LineNum" "LineId",'R' AS "TransType", concat('112-', T0."ObjType") AS "DocType",T0."DocEntry" AS "DocEntry",T1."LineNum" AS "DocLine", T1."BaseType" "BaseType",T1."BaseEntry" "BaseEntry",T1."BaseLine" "BaseLine", NULL "BSType",NULL "BSEntry",NULL "BSLine", T1."ItemCode",T2."ItemName",T2."ManBtchNum",T2."ManSerNum",T2."InvntryUom",'1' "ScanType", T1."Price" "Price",T1."Currency" "Currency",0.0 "Rate",0.0 "LineTotal", T1."FromWhsCod" "FromWH",null "FromLC",T1."WhsCode" "ToWH",null "ToLC", NULL AS "Ref1",NULL AS "Ref2", IFNULL(T1."Quantity",0) "Quantity",IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) "OpenQuantity", case when IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) = IFNULL(T1."Quantity",0) then 'O' when IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) < IFNULL(T1."Quantity",0) and IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) > 0 then 'E' else 'C' end as "LineStatus" FROM "ODRF" T0 INNER JOIN "DRF1" T1 ON T0."DocEntry" = T1."DocEntry" AND T0."ObjType" = '59' INNER JOIN "OITM" T2 ON T1."ItemCode" = T2."ItemCode" left join AVA_WM_VIEW_SRP1 t3 on T1."DocEntry" = T3."BaseEntry" and concat('112-', T0."ObjType") = t3."BaseType" and t1."LineNum" = t3."BaseLine" WHERE T0."DocStatus"='O' AND IFNULL(T0."U_Sanctified",'R') = 'R' AND IFNULL(T1."Quantity",0) > 0 /*-------------------------淢ݸ壩---------------------------------*/ UNION ALL SELECT T0."DocEntry" "ObjectKey",T1."LineNum" "LineId",'R' AS "TransType", concat('112-', T0."ObjType") AS "DocType",T0."DocEntry" AS "DocEntry",T1."LineNum" AS "DocLine", T1."BaseType" "BaseType",T1."BaseEntry" "BaseEntry",T1."BaseLine" "BaseLine", NULL "BSType",NULL "BSEntry",NULL "BSLine", T1."ItemCode",T2."ItemName",T2."ManBtchNum",T2."ManSerNum",T2."InvntryUom",'1' "ScanType", T1."Price" "Price",T1."Currency" "Currency",0.0 "Rate",0.0 "LineTotal", T1."FromWhsCod" "FromWH",null "FromLC",T1."WhsCode" "ToWH",null "ToLC", NULL AS "Ref1",NULL AS "Ref2", IFNULL(T1."Quantity",0) "Quantity",IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) "OpenQuantity", case when IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) = IFNULL(T1."Quantity",0) then 'O' when IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) < IFNULL(T1."Quantity",0) and IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) > 0 then 'E' else 'C' end as "LineStatus" FROM "ODRF" T0 INNER JOIN "DRF1" T1 ON T0."DocEntry" = T1."DocEntry" AND T0."ObjType" = '60' INNER JOIN "OITM" T2 ON T1."ItemCode" = T2."ItemCode" left join AVA_WM_VIEW_SRP1 t3 on T1."DocEntry" = T3."BaseEntry" and concat('112-', T0."ObjType") = t3."BaseType" and t1."LineNum" = t3."BaseLine" WHERE T0."DocStatus"='O' AND IFNULL(T0."U_Sanctified",'R') = 'R' AND IFNULL(T1."Quantity",0) > 0 /*-------------------------۽ݸ壩---------------------------------*/ UNION ALL SELECT T0."DocEntry" "ObjectKey",T1."LineNum" "LineId",'I' AS "TransType", concat('112-', T0."ObjType") AS "DocType",T0."DocEntry" AS "DocEntry",T1."LineNum" AS "DocLine", T1."BaseType" "BaseType",T1."BaseEntry" "BaseEntry",T1."BaseLine" "BaseLine", NULL "BSType",NULL "BSEntry",NULL "BSLine", T1."ItemCode",T2."ItemName",T2."ManBtchNum",T2."ManSerNum",T2."InvntryUom",'1' "ScanType", T1."Price" "Price",T1."Currency" "Currency",0.0 "Rate",0.0 "LineTotal", T1."FromWhsCod" "FromWH",null "FromLC",T1."WhsCode" "ToWH",null "ToLC", NULL AS "Ref1",NULL AS "Ref2", IFNULL(T1."Quantity",0) "Quantity",IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) "OpenQuantity", case when IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) = IFNULL(T1."Quantity",0) then 'O' when IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) < IFNULL(T1."Quantity",0) and IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) > 0 then 'E' else 'C' end as "LineStatus" FROM "ODRF" T0 INNER JOIN "DRF1" T1 ON T0."DocEntry" = T1."DocEntry" AND T0."ObjType" = '15' INNER JOIN "OITM" T2 ON T1."ItemCode" = T2."ItemCode" left join AVA_WM_VIEW_SRP1 t3 on T1."DocEntry" = T3."BaseEntry" and concat('112-', T0."ObjType") = t3."BaseType" and t1."LineNum" = t3."BaseLine" WHERE T0."DocStatus"='O' AND IFNULL(T0."U_Sanctified",'R') = 'R' AND IFNULL(T1."Quantity",0) > 0 /*-------------------------ɹջݸ壩---------------------------------*/ UNION ALL SELECT T0."DocEntry" "ObjectKey",T1."LineNum" "LineId",'R' AS "TransType", concat('112-', T0."ObjType") AS "DocType",T0."DocEntry" AS "DocEntry",T1."LineNum" AS "DocLine", T1."BaseType" "BaseType",T1."BaseEntry" "BaseEntry",T1."BaseLine" "BaseLine", NULL "BSType",NULL "BSEntry",NULL "BSLine", T1."ItemCode",T2."ItemName" --Ϻż ,T2."ManBtchNum",T2."ManSerNum",T2."InvntryUom",'1' "ScanType", T1."Price" "Price",T1."Currency" "Currency",0.0 "Rate",0.0 "LineTotal", T1."FromWhsCod" "FromWH",null "FromLC",T1."WhsCode" "ToWH",null "ToLC", NULL AS "Ref1",NULL AS "Ref2", IFNULL(T1."Quantity",0) "Quantity",IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) "OpenQuantity", case when IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) = IFNULL(T1."Quantity",0) then 'O' when IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) < IFNULL(T1."Quantity",0) and IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) > 0 then 'E' else 'C' end as "LineStatus" FROM "ODRF" T0 INNER JOIN "DRF1" T1 ON T0."DocEntry" = T1."DocEntry" AND T0."ObjType" = '20' INNER JOIN "OITM" T2 ON T1."ItemCode" = T2."ItemCode" left join AVA_WM_VIEW_SRP1 t3 on T1."DocEntry" = T3."BaseEntry" and concat('112-', T0."ObjType") = t3."BaseType" and t1."LineNum" = t3."BaseLine" WHERE T0."DocStatus"='O' AND IFNULL(T0."U_Sanctified",'R') = 'R' AND IFNULL(T1."Quantity",0) > 0 /*-------------------------ɹջݸ壩---------------------------------*/ UNION ALL SELECT T0."DocEntry" "ObjectKey",T1."LineNum" "LineId",'R' AS "TransType", concat('112-', T0."ObjType") AS "DocType",T0."DocEntry" AS "DocEntry",T1."LineNum" AS "DocLine", T1."BaseType" "BaseType",T1."BaseEntry" "BaseEntry",T1."BaseLine" "BaseLine", NULL "BSType",NULL "BSEntry",NULL "BSLine", T1."ItemCode",T2."ItemName",T2."ManBtchNum",T2."ManSerNum",T2."InvntryUom",'1' "ScanType", T1."Price" "Price",T1."Currency" "Currency",0.0 "Rate",0.0 "LineTotal", T1."FromWhsCod" "FromWH",null "FromLC",T1."WhsCode" "ToWH",null "ToLC", NULL AS "Ref1",NULL AS "Ref2", IFNULL(T1."Quantity",0) "Quantity",IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) "OpenQuantity", case when IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) = IFNULL(T1."Quantity",0) then 'O' when IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) < IFNULL(T1."Quantity",0) and IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) > 0 then 'E' else 'C' end as "LineStatus" FROM "ODRF" T0 INNER JOIN "DRF1" T1 ON T0."DocEntry" = T1."DocEntry" AND T0."ObjType" = '21' INNER JOIN "OITM" T2 ON T1."ItemCode" = T2."ItemCode" left join AVA_WM_VIEW_SRP1 t3 on T1."DocEntry" = T3."BaseEntry" and concat('112-', T0."ObjType") = t3."BaseType" and t1."LineNum" = t3."BaseLine" WHERE T0."DocStatus"='O' AND IFNULL(T0."U_Sanctified",'R') = 'R' AND IFNULL(T1."Quantity",0) > 0 /*-------------------------תݸ壩---------------------------------*/ UNION ALL SELECT T0."DocEntry" "ObjectKey",T1."LineNum" "LineId",'R' AS "TransType", concat('112-', T0."ObjType") AS "DocType",T0."DocEntry" AS "DocEntry",T1."LineNum" AS "DocLine", T1."BaseType" "BaseType",T1."BaseEntry" "BaseEntry",T1."BaseLine" "BaseLine", NULL "BSType",NULL "BSEntry",NULL "BSLine", T1."ItemCode",T2."ItemName",T2."ManBtchNum",T2."ManSerNum",T2."InvntryUom",'1' "ScanType", T1."Price" "Price",T1."Currency" "Currency",0.0 "Rate",0.0 "LineTotal", T1."FromWhsCod" "FromWH",null "FromLC",T1."WhsCode" "ToWH",null "ToLC", NULL AS "Ref1",NULL AS "Ref2", IFNULL(T1."Quantity",0) "Quantity",IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) "OpenQuantity", case when IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) = IFNULL(T1."Quantity",0) then 'O' when IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) < IFNULL(T1."Quantity",0) and IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) > 0 then 'E' else 'C' end as "LineStatus" FROM "ODRF" T0 INNER JOIN "DRF1" T1 ON T0."DocEntry" = T1."DocEntry" AND T0."ObjType" = '67' INNER JOIN "OITM" T2 ON T1."ItemCode" = T2."ItemCode" left join AVA_WM_VIEW_SRP1 t3 on T1."DocEntry" = T3."BaseEntry" and concat('112-', T0."ObjType") = t3."BaseType" and t1."LineNum" = t3."BaseLine" WHERE T0."DocStatus"='O' AND IFNULL(T0."U_Sanctified",'R') = 'R' AND IFNULL(T1."Quantity",0) > 0 ) T0 left join OITM T1 on T0."ItemCode"=T1."ItemCode" union all /*-------------------------ɹ---------------------------------*/ SELECT T0."DocEntry" "ObjectKey",T1."LineNum" "LineId",'R' AS "TransType", T0."ObjType" AS "DocType",T0."DocEntry" AS "DocEntry",T1."LineNum" AS "DocLine", T1."BaseType" "BaseType",T1."BaseEntry" "BaseEntry",T1."BaseLine" "BaseLine", NULL "BSType",NULL "BSEntry",NULL "BSLine", T1."ItemCode",T2."ItemName",T2."ManBtchNum",T2."ManSerNum",T2."InvntryUom",'1' "ScanType", T1."Price" "Price",T1."Currency" "Currency",0.0 "Rate",0.0 "LineTotal", null "FromWH",null "FromLC",T1."WhsCode" "ToWH",null "ToLC", NULL AS "Ref1",NULL AS "Ref2", IFNULL(T1."Quantity",0) "Quantity",IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) "OpenQuantity", case when IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) = IFNULL(T1."Quantity",0) then 'O' when IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) < IFNULL(T1."Quantity",0) and IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) > 0 then 'E' else 'C' end as "LineStatus" FROM "OPOR" T0 INNER JOIN "POR1" T1 ON T0."DocEntry" = T1."DocEntry" INNER JOIN "OITM" T2 ON T1."ItemCode" = T2."ItemCode" left join AVA_WM_VIEW_SRP1 t3 on T1."DocEntry" = T3."BaseEntry" and T0."ObjType" = t3."BaseType" and t1."LineNum" = t3."BaseLine" WHERE T1."LineStatus"='O' AND IFNULL(T0."U_Sanctified",'R') = 'R' AND IFNULL(T1."Quantity",0) > 0 /*-------------------------ת---------------------------------*/ UNION ALL SELECT T0."DocEntry" "ObjectKey",T1."LineNum" "LineId",'T' AS "TransType", T0."ObjType" AS "DocType",T0."DocEntry" AS "DocEntry",T1."LineNum" AS "DocLine", T1."BaseType" "BaseType",T1."BaseEntry" "BaseEntry",T1."BaseLine" "BaseLine", NULL "BSType",NULL "BSEntry",NULL "BSLine", T1."ItemCode",T2."ItemName",T2."ManBtchNum",T2."ManSerNum",T2."InvntryUom",'1' "ScanType", T1."Price" "Price",T1."Currency" "Currency",0.0 "Rate",0.0 "LineTotal", T1."FromWhsCod" "FromWH",null "FromLC",T1."WhsCode" "ToWH",null "ToLC", NULL AS "Ref1",NULL AS "Ref2", IFNULL(T1."Quantity",0) "Quantity",IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) "OpenQuantity", case when IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) = IFNULL(T1."Quantity",0) then 'O' when IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) < IFNULL(T1."Quantity",0) and IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) > 0 then 'E' else 'C' end as "LineStatus" FROM "OWTQ" T0 INNER JOIN "WTQ1" T1 ON T0."DocEntry" = T1."DocEntry" INNER JOIN "OITM" T2 ON T1."ItemCode" = T2."ItemCode" left join AVA_WM_VIEW_SRP1 t3 on T1."DocEntry" = T3."BaseEntry" and T0."ObjType" = t3."BaseType" and t1."LineNum" = t3."BaseLine" WHERE T1."LineStatus"='O' AND IFNULL(T0."U_Sanctified",'R') = 'R' AND IFNULL(T1."Quantity",0) > 0 /*-------------------------۶---------------------------------*/ UNION ALL SELECT T0."DocEntry" "ObjectKey",T1."LineNum" "LineId",'I' AS "TransType", T0."ObjType" AS "DocType",T0."DocEntry" AS "DocEntry",T1."LineNum" AS "DocLine", T1."BaseType" "BaseType",T1."BaseEntry" "BaseEntry",T1."BaseLine" "BaseLine", NULL "BSType",NULL "BSEntry",NULL "BSLine", T1."ItemCode",T2."ItemName",T2."ManBtchNum",T2."ManSerNum",T2."InvntryUom",'1' "ScanType", T1."Price" "Price",T1."Currency" "Currency",0.0 "Rate",0.0 "LineTotal", T1."FromWhsCod" "FromWH",null "FromLC",T1."WhsCode" "ToWH",null "ToLC", NULL AS "Ref1",NULL AS "Ref2", IFNULL(T1."Quantity",0) "Quantity",IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) "OpenQuantity", case when IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) = IFNULL(T1."Quantity",0) then 'O' when IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) < IFNULL(T1."Quantity",0) and IFNULL(T1."Quantity",0) - IFNULL(T3."Quantity",0) > 0 then 'E' else 'C' end as "LineStatus" FROM "ORDR" T0 INNER JOIN "RDR1" T1 ON T0."DocEntry" = T1."DocEntry" INNER JOIN "OITM" T2 ON T1."ItemCode" = T2."ItemCode" left join AVA_WM_VIEW_SRP1 t3 on T1."DocEntry" = T3."BaseEntry" and T0."ObjType" = t3."BaseType" and t1."LineNum" = t3."BaseLine" WHERE T1."LineStatus"='O' AND IFNULL(T0."U_Sanctified",'R') = 'R' AND IFNULL(T1."Quantity",0) > 0
true
3bf382cd32760e40224862850d1f875580e2008f
SQL
pmakaria/codeSnippets
/SQL/03.Find_Date_from_wk_number.sql
UTF-8
697
3.84375
4
[]
no_license
--Oracle --find a date from a week number (start and end of week) --add number of weeks *7 (so that it returns the Monday of the week we are looking for) --add or subtract number of days, in order to get another day --(Subtract 1 to get Sun as the first day and add 5 to get Sat as the last day) --wk number format: YYYYWW --Start of the week (first day Sunday) select (TRUNC(TO_DATE(SUBSTR('201945',1,4) || '0110','YYYYMMDD'),'IYYY') + (SUBSTR('201945',5) - 1) * 7 - 1)as wk_start_date from dual --End of the week (last day Saturday) select (TRUNC(TO_DATE(SUBSTR('201945',1,4) || '0110','YYYYMMDD'),'IYYY') + (SUBSTR('201945',5) - 1) * 7 + 5)as wk_end_date from dual
true
56b99430c1ecabff7d2e980bf17b2826cf67a9b3
SQL
miller00315/spring_restfull_api
/src/main/resources/my_squema.sql
UTF-8
858
3.3125
3
[]
no_license
CREATE DATABASE SELLERS; USE SELLERS; CREATE TABLE client( id INTEGER PRIMARY KEY AUTO_INCREMENT, name VARCHAR(100), cpf VARCHAR (11) ); CREATE TABLE product( id INTEGER PRIMARY KEY AUTO_INCREMENT, description VARCHAR(100), unity_price NUMERIC (20, 2) ); CREATE TABLE solicitation( id INTEGER PRIMARY KEY AUTO_INCREMENT, client_id INTEGER REFERENCES client (ID), solicited_at TIMESTAMP, status VARCHAR(20), total NUMERIC(20, 2) ); CREATE TABLE solicited_item( id INTEGER PRIMARY KEY AUTO_INCREMENT, solicitation_id INTEGER REFERENCES solicitation (ID), product_id INTEGER REFERENCES product (ID), quantity INTEGER ); CREATE TABLE api_user( id INTEGER PRIMARY KEY AUTO_INCREMENT, username VARCHAR(100) NOT NULL, password VARCHAR(255) NOT NULL, admin BOOL DEFAULT FALSE );
true
9c6869c20cf7df543ec21d7040bac874c86a2464
SQL
gdis5251/LeetCode
/DataBase/1.批量插入数据.sql
UTF-8
623
3.3125
3
[]
no_license
-- 题目描述 -- 对于表actor批量插入如下数据 -- CREATE TABLE IF NOT EXISTS actor ( -- actor_id smallint(5) NOT NULL PRIMARY KEY, -- first_name varchar(45) NOT NULL, -- last_name varchar(45) NOT NULL, -- last_update timestamp NOT NULL DEFAULT (datetime('now','localtime')) -- ) -- actor_id first_name last_name last_update -- 1 PENELOPE GUINESS 2006-02-15 12:34:33 -- 2 NICK WAHLBERG 2006-02-15 12:34:33 insert into actor(actor_id, first_name, last_name, last_update) values (1, 'PENELOPE', 'GUINESS', '2006-02-15 12:34:33'), (2, 'NICK', 'WAHLBERG', '2006-02-15 12:34:33');
true
f8834c9e949397f6ae33ef9edebbcc909024abe3
SQL
dendyliu/SaleProject_JavaWebService
/SaleProject/Database/market_management.sql
UTF-8
3,948
3.109375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Nov 14, 2016 at 06:30 AM -- Server version: 10.1.16-MariaDB -- PHP Version: 5.6.24 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `market_management` -- -- -------------------------------------------------------- -- -- Table structure for table `catalogue` -- CREATE TABLE `catalogue` ( `product_id` int(11) NOT NULL, `productname` varchar(100) DEFAULT NULL, `price` int(11) DEFAULT NULL, `productdesc` varchar(200) DEFAULT NULL, `username` varchar(30) DEFAULT NULL, `dateadded` date DEFAULT NULL, `timeadded` time DEFAULT NULL, `purchases` int(11) DEFAULT NULL, `imagepath` varchar(255) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `catalogue` -- INSERT INTO `catalogue` (`product_id`, `productname`, `price`, `productdesc`, `username`, `dateadded`, `timeadded`, `purchases`, `imagepath`) VALUES (4, 'Anjing', 100000, 'adwwada', 'kdowa', '2016-11-13', '15:13:29', 0, 'img/a.png'), (5, 'akdowa', 12312301, 'awldpawlpdaw', 'kdowa', '2016-11-13', '16:38:12', 0, 'img/bfs2.png'), (6, 'ZXX', 1000, 'DKWAODA', 'kdowa', '2016-11-13', '20:40:13', 0, 'img/b2.png'); -- -------------------------------------------------------- -- -- Table structure for table `likes` -- CREATE TABLE `likes` ( `product_id` int(11) DEFAULT NULL, `user_id` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `likes` -- INSERT INTO `likes` (`product_id`, `user_id`) VALUES (4, 1), (6, 1); -- -------------------------------------------------------- -- -- Table structure for table `purchase` -- CREATE TABLE `purchase` ( `purchase_id` int(10) NOT NULL, `product_name` varchar(100) DEFAULT NULL, `product_price` int(11) DEFAULT NULL, `seller` varchar(30) DEFAULT NULL, `buyer` varchar(30) DEFAULT NULL, `image` varchar(255) DEFAULT NULL, `quantity` int(11) DEFAULT NULL, `consignee` varchar(100) DEFAULT NULL, `fulladdressbuyer` varchar(250) DEFAULT NULL, `postalcode` int(5) DEFAULT NULL, `newphonenumber` varchar(12) DEFAULT NULL, `creditcard` varchar(12) DEFAULT NULL, `verification` varchar(3) DEFAULT NULL, `datebought` date DEFAULT NULL, `timebought` time DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `purchase` -- INSERT INTO `purchase` (`purchase_id`, `product_name`, `product_price`, `seller`, `buyer`, `image`, `quantity`, `consignee`, `fulladdressbuyer`, `postalcode`, `newphonenumber`, `creditcard`, `verification`, `datebought`, `timebought`) VALUES (2, 'ZXX', 1000, 'kdowa', 'dendyyy', 'img/b2.png', 1, 'Dendy Suprihady', 'dwadawd', 12345, '12312312', '123123123121', '123', '2016-11-13', '21:08:52'), (3, 'ZXX', 1000, 'kdowa', 'dendyyy', 'img/b2.png', 1, 'Dendy Suprihady', 'dwadawd', 12345, '12312312', '123139812832', '123', '2016-11-13', '21:14:45'); -- -- Indexes for dumped tables -- -- -- Indexes for table `catalogue` -- ALTER TABLE `catalogue` ADD PRIMARY KEY (`product_id`); -- -- Indexes for table `purchase` -- ALTER TABLE `purchase` ADD PRIMARY KEY (`purchase_id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `catalogue` -- ALTER TABLE `catalogue` MODIFY `product_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; -- -- AUTO_INCREMENT for table `purchase` -- ALTER TABLE `purchase` MODIFY `purchase_id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
true
a530faba8ee249f6754ce14870d45238d970de15
SQL
alldatacenter/alldata
/studio/micro-services/SREWorks/paas/appmanager/APP-META-PRIVATE/db/73_deploy_app_add_source.up.sql
UTF-8
153
2.609375
3
[ "Apache-2.0", "BSD-3-Clause", "MIT", "LicenseRef-scancode-unknown-license-reference", "EPL-1.0", "LGPL-2.0-or-later", "MPL-2.0", "GPL-2.0-only", "JSON", "EPL-2.0" ]
permissive
alter table am_deploy_app add app_source varchar(32) null comment '应用来源'; create index idx_app_source on am_deploy_app (app_source);
true
298f64cf842f0fff837b5f3984d9ce286ecf7fb0
SQL
dryxtech/sample-service
/src/test/resources/op-schema.sql
UTF-8
920
3.5
4
[]
no_license
CREATE SCHEMA IF NOT EXISTS SAMPLE AUTHORIZATION SAMPLE; CREATE TABLE IF NOT EXISTS SAMPLE.REQUEST_HISTORY ( request_guid VARCHAR(36) PRIMARY KEY, request_organization VARCHAR2(64) NOT NULL, request_user VARCHAR2(64) NOT NULL, request_type VARCHAR2(64) NOT NULL, request_start_ts TIMESTAMP NOT NULL, request_end_ts TIMESTAMP NOT NULL, request_count INTEGER NOT NULL, response_count INTEGER NOT NULL, response_status_code INTEGER NOT NULL ); CREATE INDEX SAMPLE.REQUEST_HISTORY_ORG_IDX ON SAMPLE.REQUEST_HISTORY(request_organization); CREATE TABLE IF NOT EXISTS SAMPLE.DATA_ITEM ( data_name VARCHAR2(4) NOT NULL, data_code VARCHAR2(10) NOT NULL, data_status VARCHAR(1) NOT NULL ); CREATE UNIQUE INDEX SAMPLE.DATA_ITEM_NAME_CODE_IDX ON SAMPLE.DATA_ITEM(data_name, data_code);
true
eb0ce4a20bd450e975aa60e19545660a20e2d579
SQL
beatice/CodeFights
/Exercises/Database/13 SecurityBreach.mysql
UTF-8
683
3.265625
3
[]
no_license
/*Please add ; after each select statement*/ CREATE PROCEDURE securityBreach() BEGIN SELECT * FROM users WHERE attribute REGEXP BINARY CONCAT('.+%',first_name,'_',second_name,'%*') ORDER BY attribute; END /*Please add ; after each select statement*/ CREATE PROCEDURE securityBreach() BEGIN SELECT * FROM users WHERE attribute REGEXP BINARY CONCAT('.{1,}%',first_name,'_',second_name,'%.{0,}') ORDER BY attribute; END /*Please add ; after each select statement*/ CREATE PROCEDURE securityBreach() BEGIN SELECT * FROM users WHERE attribute REGEXP BINARY CONCAT('[0-9a-zA-Z]%',first_name,'_',second_name,'%*') ORDER BY attribute; END
true
50c4d5738b61c8e948df59430a338b4cc92dccd8
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day09/select1509.sql
UTF-8
191
2.75
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerObservation WHERE timestamp>'2017-11-08T15:09:00Z' AND timestamp<'2017-11-09T15:09:00Z' AND SENSOR_ID='4b00fa2a_da97_43af_ab58_ff5fe5d9669f'
true
3289dfee4584491152f857e7324571595cea7d2b
SQL
Dregosh/Serwis-Aukcyjny-Backend
/src/main/resources/db/migration/V10__observation_table.sql
UTF-8
226
3.140625
3
[]
no_license
CREATE TABLE observation ( id BIGINT PRIMARY KEY auto_increment, auction_id BIGINT, user_id BIGINT, FOREIGN KEY (auction_id) REFERENCES auction (id), FOREIGN KEY (user_id) REFERENCES user (id) )
true
16b676eb907a8b04e6f6cea3c5fcd6a5de3843c5
SQL
dandraden/Database-Scripts
/Oracle/others/user_script/viw_item_governo_u.sql
ISO-8859-1
1,170
2.828125
3
[]
no_license
/* Formatted on 2004/12/17 10:26 (Formatter Plus v4.5.2) */ CREATE OR REPLACE VIEW ifrbde.viw_item_governo_u ( tp_aquisicao, item_id_gov, item_desc_gov ) AS SELECT 'AD', TRIM (a.item_id_gov), 'Aquisio Direta - ' || a.item_desc_gov FROM integracao.item_governo_u a WHERE TRIM (a.item_id_gov) LIKE 'GYYYY%' UNION SELECT 'AT', TRIM (a.item_id_gov), 'Ativo Permanente - ' || a.item_desc_gov FROM integracao.item_governo_u a WHERE TRIM (a.item_id) LIKE '0132%' UNION SELECT 'OB', TRIM (a.item_id_gov), 'Obras - ' || a.item_desc_gov FROM integracao.item_governo_u a WHERE TRIM (a.item_id) LIKE '0313%' UNION /* SELECT 'ST',TRIM(a.item_id_gov), 'Almoxarifado - '||a.item_desc_gov FROM integracao.item_governo_u a where trim(a.ITEM_ID_GOV) like 'GYYYZ%' union */ SELECT 'AA', '00000000000000', 'Em Branco - Sem codigo do Governo ' FROM DUAL / -- Grants for View GRANT SELECT ON ifrbde.viw_item_governo_u TO bde_geral / -- End of DDL Script for View IFRBDE.VIW_ITEM_GOVERNO_U
true
59de9805d056bd6d608dc3d7ab0664fc088db60b
SQL
jgarzonext/plsql-testing
/script_plsql/bd_iaxis/script/indices/TMP_TRAZA_PROCESO_I1.sql
UTF-8
505
2.546875
3
[]
no_license
-------------------------------------------------------- -- DDL for Index TMP_TRAZA_PROCESO_I1 -------------------------------------------------------- CREATE INDEX "AXIS"."TMP_TRAZA_PROCESO_I1" ON "AXIS"."TMP_TRAZA_PROCESO" ("FALTA") PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "AXIS" ;
true
ef5e213582a1050c595a993e074bfa53d863871b
SQL
fork-zone/fortniteClan
/schema.sql
UTF-8
654
3.921875
4
[]
no_license
/* Create users table */ CREATE TABLE users ( id INT NOT NULL UNIQUE AUTO_INCREMENT PRIMARY KEY, username VARCHAR(255) NOT NULL, password VARCHAR(255) NOT NULL, email VARCHAR(255) NOT NULL, ); /* Create clans table */ CREATE TABLE clans ( id INT NOT NULL UNIQUE AUTO_INCREMENT PRIMARY KEY, userid INT NOT NULL, name VARCHAR(255) NOT NULL, description VARCHAR(255) NOT NULL, picture VARCHAR(255) NOT NULL, discord VARCHAR(255), website VARCHAR(255), ); /* Create link between the users and clans table */ ALTER TABLE clans ADD CONSTRAINT user-clan FOREIGN KEY (userid) REFERENCES users(id) ON DELETE CASCADE ON UPDATE CASCADE;
true
92479f3ccd4285bfece5bf4cba45edda3f6e92d2
SQL
JangJuRi/HTA_DB
/0508_과제3.sql
UHC
478
3.484375
3
[]
no_license
-- å ȣ شϴ å ǸŰ ȯϴ Լ CREATE OR REPLACE FUNCTION get_total_order_price (i_book_no IN number) RETURN number IS v_total_order_price number; BEGIN -- ż ȸϱ select nvl(sum(order_price * order_amount), 0) into v_total_order_price from sample_book_orders where book_no = i_book_no; -- ȯϱ RETURN v_total_order_price; END;
true
8837e0b911849273001ff3a3dd43707f0b11e9fe
SQL
ppate304/Week4_Day2_Hwk_MovieSQL
/movies_database.session.sql
UTF-8
747
3.640625
4
[]
no_license
CREATE TABLE customer( customer_id SERIAL PRIMARY KEY, first_name VARCHAR(50), last_name VARCHAR(50), address_name VARCHAR(50) ); CREATE TABLE movie( movie_id SERIAL PRIMARY KEY, genre VARCHAR(150), actors VARCHAR(50), movie VARCHAR (150) ); CREATE TABLE ticket( tickets_id SERIAL PRIMARY KEY, amount NUMERIC(5,2), row_num VARCHAR(50), seat INTEGER, customer_id INTEGER NOT NULL, FOREIGN KEY(customer_id) REFERENCES customer(customer_id) ); CREATE TABLE concession( concessions_id SERIAL PRIMARY KEY, customer_id INTEGER NOT NULL, movie_id INTEGER NOT NULL, FOREIGN KEY(customer_id) REFERENCES customer(customer_id), FOREIGN KEY(movie_id) REFERENCES movie(movie_id) )
true
ebc4dc6015ebddc092d60568be01e6ca192df9d1
SQL
Karlzzb/ops
/database/upgrade/充提/init-20150201/all-index.sql
UTF-8
3,301
2.75
3
[]
no_license
#优化时间 2015-01-11 降低CPU 80% ALTER TABLE fcpay.FC_WITHDRAW_LOAN_APPLY_REF ADD KEY FC__WITH_APPLY_ID_key (FC_WITH_APPLY_ID); ALTER TABLE fcpay.FC_WITHDRAW_APPLY ADD KEY USER_NAME_BUSINESS_ID_APPLY_TIME (USER_NAME,BUSINESS_ID,APPLY_TIME); #优化时间 2015-01-12 Reid 提供 #客户申请表 ALTER TABLE fcpay.FC_WITHDRAW_APPLY ADD INDEX FC_WA_INDEX1(BUSINESS_ID,USER_NAME,APPLY_TIME,RISK_STATUS,STATUS); #充值帐变表 ALTER TABLE fcpay.FC_RISK_PREPAID_ACCOUNT_CHANGE_INFO ADD INDEX FC_RPACI_INDEX2(BUSINESS_ID,ACCOUNT_CHANGE_TIME,CUSTOMER_NAME); #游戏流水明细表 ALTER TABLE fcpay.FC_RISK_GAME_FLOW_DETAIL ADD INDEX FC_RGFD_INDEX3(BUSINESS_ID,GAME_CHANGE_TIME,CHANGE_TYPE,GAME_TYPE,CUSTOMER_NAME); #游戏中奖信息表 ALTER TABLE fcpay.FC_RISK_GAME_WINNING_INFO ADD INDEX FC_RGWI_INDEX4(BUSINESS_ID,BET_TIME,GAME_RULE,CUSTOMER_NAME); #会员总账信息表 ALTER TABLE fcpay.FC_RISK_CUSTOMER_ACCOUNT_INFO ADD INDEX FC_RUAI_INDEX5(CUSTOMER_NAME); ALTER TABLE fcpay.FC_WITHDRAW_LOAN_APPLY_REF ADD INDEX FC_WDLAR_INDEX7(LOAN_RECORD_ID,FC_WITH_APPLY_ID); ALTER TABLE fcpay.FC_WITHDRAW_LOAN_DETAIL ADD INDEX FC_WDLD_INDEX8(LOAN_RECORD_ID,STATUS); ALTER TABLE fcpay.FC_WITHDRAW_TRANSIT_RECORD ADD INDEX FC_WDTD_INDEX9(FC_WITH_APPLY_ID,TRANSIT_STATUS); ALTER TABLE fcpay.FC_WITHDRAW_TRANSIT_DETAIL ADD INDEX FC_WDTD_INDEX10(TRANSIT_RECORD_ID,STATUS); ALTER TABLE fcpay.FC_WEB_GAME_TRADE ADD INDEX FC_WGT_INDEX11(TRAD_TYPE,TRAD_MSG_STATUS,TRAD_MSG_PLATFROM); #静态表,无insert ALTER TABLE fcpay.FC_SHIFT_ACTIVE_ACCOUNT ADD INDEX FC_SAA_INDEX12(STATUS,IS_TRANSFERING,TRANSIT_UPDATED_TIME); #静态表,无insert ALTER TABLE fcpay.FC_INNERC_ACCOUNT ADD INDEX FC_IA_INDEX13(ACCOUNT_NO,ACCOUNT_AUTO_TYPE,ACCOUNT_STATUS,PAYMENT_TYPE,ACCOUNT_TIER,BUSINESS_ID); #优化时间 2015-01-11 Alter table fcpay.FC_RISK_PREPAID_ACCOUNT_CHANGE_INFO add KEY CN_TIME_TYPE_KEY(CUSTOMER_NAME,ACCOUNT_CHANGE_TIME,ACCOUNT_CHANGE_TYPE); alter table fcpay.FC_WITHDRAW_APPLY add key APPLY_TIME_KEY(APPLY_TIME); #优化时间 2015-01-15 ALTER TABLE fcpay.FC_WITHDRAW_APPLY ADD KEY MULTI_KEY1(USER_NAME,APPLY_TIME,RISK_STATUS); ALTER TABLE fcpay.FC_WITHDRAW_APPLY ADD KEY MULTI_KEY2(USER_NAME,APPLY_TIME,STATUS); ALTER TABLE fcpay.FC_WITHDRAW_APPLY ADD KEY MULTI_KEY3(STATUS,USER_NAME,APPLY_TIME); ALTER TABLE fcpay.FC_WITHDRAW_APPLY ADD KEY MULTI_KEY4(BUSINESS_ID,RISK_STATUS,APPLY_TIME); ALTER table fcpay.FC_WITHDRAW_APPLY ADD KEY APPLY_TIME_KEY(APPLY_TIME); #优化时间 2015-01-16 ALTER TABLE npe.tasks add key multikey1(interstate,obtainer,taskname,obtaintime); ALTER TABLE npe.tasks add key multikey2(procinstid,taskdefid); ALTER TABLE npe.tasks add key multikey3(nodetype,taskname,interstate); ALTER TABLE npe.tasks add key multikey4(nodetype,taskcenter,interstate); ALTER TABLE npe.oplogs add key createtime_key(createtime); ALTER TABLE fcpay.FC_CRM_MEMBER add key multikey(CUSTOMER_NAME,BUSINESS_ID); ALTER TABLE fcpay.FC_RISK_GAME_WINNING_INFO add KEY multikey1 (`CUSTOMER_NAME`,`BUSINESS_ID`,`BET_TIME`,`GAME_RULE`,`GAME_DRAW_TIME`); #优化时间 2015-01-20 ALTER TABLE fcpay.FC_RISK_SORT_RULE ADD INDEX FC_RSR_INDEX6(RULE_TYPE,RULE_FLAG); #优化时间 2015-02-29 ALTER TABLE fcpay.FC_RISK_GAME_FLOW_DETAIL ADD INDEX FC_RGFD_INDEX4(CUSTOMER_NAME,BUSINESS_ID,GAME_CHANGE_TIME);
true
2ba3b46e1c37d61dd6c8a8fab59037d1ad110557
SQL
davidbarbosa23/MisionTic
/Java/src/tasks/Task4/Task4_04_Empleado.sql
UTF-8
3,402
2.890625
3
[]
no_license
-- Submitted SQLite: CREATE TABLE `empleado` ( `idBodega` INTEGER NOT NULL, `idempleado` INTEGER PRIMARY KEY AUTOINCREMENT, `nombre` VARCHAR(45) NOT NULL, `edad` INT NOT NULL, FOREIGN KEY (`idBodega`) REFERENCES `Bodega`(`idBodega`) ); INSERT INTO `empleado` (`idBodega`, `nombre`, `edad`) VALUES ((SELECT `idBodega` FROM `Bodega` WHERE `nombre` = "la amistad"), "Sylvester Leonard", 24); INSERT INTO `empleado` (`idBodega`, `nombre`, `edad`) VALUES ((SELECT `idBodega` FROM `Bodega` WHERE `nombre` = "la amistad"), "Ferdinand Dixon", 23); INSERT INTO `empleado` (`idBodega`, `nombre`, `edad`) VALUES ((SELECT `idBodega` FROM `Bodega` WHERE `nombre` = "la amistad"), "Stephen I. Caldwell", 18); INSERT INTO `empleado` (`idBodega`, `nombre`, `edad`) VALUES ((SELECT `idBodega` FROM `Bodega` WHERE `nombre` = "la amistad"), "Abraham Shepherd", 19); INSERT INTO `empleado` (`idBodega`, `nombre`, `edad`) VALUES ((SELECT `idBodega` FROM `Bodega` WHERE `nombre` = "santa cecilia"), "Taylor Z. Oliver", 37); INSERT INTO `empleado` (`idBodega`, `nombre`, `edad`) VALUES ((SELECT `idBodega` FROM `Bodega` WHERE `nombre` = "santa isabel"), "Libby J. Hendricks", 51); INSERT INTO `empleado` (`idBodega`, `nombre`, `edad`) VALUES ((SELECT `idBodega` FROM `Bodega` WHERE `nombre` = "santa cecilia"), "Nora D. Erickson", 32); INSERT INTO `empleado` (`idBodega`, `nombre`, `edad`) VALUES ((SELECT `idBodega` FROM `Bodega` WHERE `nombre` = "santa isabel"), "Sebastian C. Fleming", 50); INSERT INTO `empleado` (`idBodega`, `nombre`, `edad`) VALUES ((SELECT `idBodega` FROM `Bodega` WHERE `nombre` = "santa cecilia"), "Leila Huffman", 34); INSERT INTO `empleado` (`idBodega`, `nombre`, `edad`) VALUES ((SELECT `idBodega` FROM `Bodega` WHERE `nombre` = "santa cecilia"), "Colby M. Stephenson", 31); -- Should be MySQL: CREATE TABLE `empleado` ( `idBodega` INT NOT NULL, `idempleado` INT NOT NULL AUTO_INCREMENT, `nombre` VARCHAR(45) NOT NULL, `edad` INT NOT NULL, PRIMARY KEY (`idempleado`), FOREIGN KEY (`idBodega`) REFERENCES `Bodega`(`idBodega`) ); INSERT INTO `empleado` (`idBodega`, `nombre`, `edad`) VALUES ((SELECT `idBodega` FROM `Bodega` WHERE `nombre` = "la amistad"), "Sylvester Leonard", 24); INSERT INTO `empleado` (`idBodega`, `nombre`, `edad`) VALUES ((SELECT `idBodega` FROM `Bodega` WHERE `nombre` = "la amistad"), "Ferdinand Dixon", 23); INSERT INTO `empleado` (`idBodega`, `nombre`, `edad`) VALUES ((SELECT `idBodega` FROM `Bodega` WHERE `nombre` = "la amistad"), "Stephen I. Caldwell", 18); INSERT INTO `empleado` (`idBodega`, `nombre`, `edad`) VALUES ((SELECT `idBodega` FROM `Bodega` WHERE `nombre` = "la amistad"), "Abraham Shepherd", 19); INSERT INTO `empleado` (`idBodega`, `nombre`, `edad`) VALUES ((SELECT `idBodega` FROM `Bodega` WHERE `nombre` = "santa cecilia"), "Taylor Z. Oliver", 37); INSERT INTO `empleado` (`idBodega`, `nombre`, `edad`) VALUES ((SELECT `idBodega` FROM `Bodega` WHERE `nombre` = "santa isabel"), "Libby J. Hendricks", 51); INSERT INTO `empleado` (`idBodega`, `nombre`, `edad`) VALUES ((SELECT `idBodega` FROM `Bodega` WHERE `nombre` = "santa cecilia"), "Nora D. Erickson", 32); INSERT INTO `empleado` (`idBodega`, `nombre`, `edad`) VALUES ((SELECT `idBodega` FROM `Bodega` WHERE `nombre` = "santa isabel"), "Sebastian C. Fleming", 50); INSERT INTO `empleado` (`idBodega`, `nombre`, `edad`) VALUES ((SELECT `idBodega` FROM `Bodega` WHERE `nombre` = "santa cecilia"), "Leila Huffman", 34); INSERT INTO `empleado` (`idBodega`, `nombre`, `edad`) VALUES ((SELECT `idBodega` FROM `Bodega` WHERE `nombre` = "santa cecilia"), "Colby M. Stephenson", 31);
true
3f98bb538a619b124b26e841e5b1e745fdc3ee55
SQL
carloscasalar/sqlPlusToolBox
/fk.sql
UTF-8
2,386
3.796875
4
[ "MIT" ]
permissive
REM ######################################################################## REM ## Author : Sunil Kumar REM ## REM ## This script gives the following: REM ## 1. The list of all foreign keys of the given table. REM ## 2. The list of all foreign keys that references the given table. REM ## 3. Self referential integrity constraints REM ## REM ## The output is in tabular format that contains the list of columns REM ## that consists the foreign key. REM ####################################################################### set linesize 110 set verify off break on owner on table_name on constraint_name on r_constraint_name column owner format a5 column r_owner format a5 column column_name format a12 column tt noprint column position heading P format 9 column table_name format a15 column r_table_name format a15 column constraint_name format a15 column r_constraint_name format a15 select a.tt, a.owner, b.table_name, a.constraint_name, b.column_name, b.position, a.r_constraint_name, c.column_name, c.position, c.table_name r_table_name, a.r_owner from (select owner, constraint_name, r_constraint_name, r_owner,1 tt from all_constraints where owner=upper('&&owner') and table_name=upper('&&table_name') and constraint_type!='C' union select owner, constraint_name, r_constraint_name, r_owner,2 from all_constraints where (r_constraint_name,r_owner) in (select constraint_name, owner from all_constraints where owner=upper('&owner') and table_name=upper('&table_name')) ) a, all_cons_columns b, all_cons_columns c where b.constraint_name=a.constraint_name and b.owner=a.owner and c.constraint_name=a.r_constraint_name and c.owner=a.r_owner and b.position=c.position order by 1,2,3,4,5 / set verify on clear columns clear breaks undef owner undef table_name
true
89a1904e4de869a65a4190d720d32998f85404f9
SQL
ClaudieFaukan/exercice-SQL
/sql annonce/PROJET3.SQL
ISO-8859-1
5,539
3.96875
4
[]
no_license
DROP DATABASE IF EXISTS projet3; CREATE DATABASE IF NOT EXISTS projet3; ALTER DATABASE projet3 CHARACTER SET utf8 COLLATE utf8_general_ci; USE projet3; # ----------------------------------------------------------------------------- # TABLE : CLIENT # ----------------------------------------------------------------------------- CREATE TABLE CLIENT ( NOM VARCHAR (30) NOT NULL , ADRESSE VARCHAR (128) NULL , NOM_DIRECTEUR VARCHAR (30) NOT NULL , NOM_INTERLOCUTEUR VARCHAR (30) NOT NULL , PRIMARY KEY (NOM) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; # ----------------------------------------------------------------------------- # TABLE : PROJET # ----------------------------------------------------------------------------- CREATE TABLE PROJET ( LIBELLE_P VARCHAR (30) NOT NULL , NOM VARCHAR (30) NOT NULL , DATE_DEBUT DATE NOT NULL , DATE_FIN DATE NULL , DURE_PREVU DATE NOT NULL , PRIMARY KEY (LIBELLE_P) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; # ----------------------------------------------------------------------------- # INDEX DE LA TABLE PROJET # ----------------------------------------------------------------------------- CREATE INDEX I_FK_PROJET_CLIENT ON PROJET (NOM ASC); # ----------------------------------------------------------------------------- # TABLE : SALARIE # ----------------------------------------------------------------------------- CREATE TABLE SALARIE ( NOM_S VARCHAR (30) NOT NULL , LIBELLE_P VARCHAR (30) NOT NULL , NOM_S_CHEF_DE_PROJET VARCHAR (30) NULL , PRENOM VARCHAR (30) NOT NULL , EMPLOI VARCHAR (30) NOT NULL , ANCIENNETE DATE NULL , PRIMARY KEY (NOM_S) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; # ----------------------------------------------------------------------------- # INDEX DE LA TABLE SALARIE # ----------------------------------------------------------------------------- CREATE INDEX I_FK_SALARIE_PROJET ON SALARIE (LIBELLE_P ASC); CREATE INDEX I_FK_SALARIE_SALARIE ON SALARIE (NOM_S_CHEF_DE_PROJET ASC); # ----------------------------------------------------------------------------- # TABLE : COMPTENCE_SALARIALE # ----------------------------------------------------------------------------- CREATE TABLE COMPTENCE_SALARIALE ( COMPETENCE_SALARIE VARCHAR (30) NOT NULL , NIVEAU_QUALIFICATION INTEGER NOT NULL , ORDRE_GRANDEUR INTEGER NOT NULL , ANNE_COMPETENCE_DEBUT DATE NOT NULL , PRIMARY KEY (COMPETENCE_SALARIE) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; # ----------------------------------------------------------------------------- # TABLE : TACHES # ----------------------------------------------------------------------------- CREATE TABLE TACHES ( LIBELLE_T VARCHAR (30) NOT NULL , DUREE DATE NOT NULL , COUT DECIMAL (13,2) NOT NULL , DATE_DEBUT DATE NOT NULL , DATE_FIN DATE NOT NULL , PRIMARY KEY (LIBELLE_T) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; # ----------------------------------------------------------------------------- # TABLE : MATRIEL # ----------------------------------------------------------------------------- CREATE TABLE MATRIEL ( LIBELLE_T VARCHAR (30) NOT NULL , NOM_S VARCHAR (30) NOT NULL , NOM VARCHAR (30) NULL , TYPE VARCHAR (30) NULL , PRIMARY KEY (LIBELLE_T,NOM_S) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; # ----------------------------------------------------------------------------- # INDEX DE LA TABLE MATRIEL # ----------------------------------------------------------------------------- CREATE INDEX I_FK_MATRIEL_TACHES ON MATRIEL (LIBELLE_T ASC); CREATE INDEX I_FK_MATRIEL_SALARIE ON MATRIEL (NOM_S ASC); # ----------------------------------------------------------------------------- # TABLE : POSSEDE # ----------------------------------------------------------------------------- CREATE TABLE POSSEDE ( NOM_S VARCHAR (30) NOT NULL , COMPETENCE_SALARIE VARCHAR (30) NOT NULL , PRIMARY KEY (NOM_S,COMPETENCE_SALARIE) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; # ----------------------------------------------------------------------------- # INDEX DE LA TABLE POSSEDE # ----------------------------------------------------------------------------- CREATE INDEX I_FK_POSSEDE_SALARIE ON POSSEDE (NOM_S ASC); CREATE INDEX I_FK_POSSEDE_COMPTENCE_SALARIALE ON POSSEDE (COMPETENCE_SALARIE ASC); # ----------------------------------------------------------------------------- # CREATION DES REFERENCES DE TABLE # ----------------------------------------------------------------------------- ALTER TABLE PROJET ADD FOREIGN KEY FK_PROJET_CLIENT (NOM) REFERENCES CLIENT (NOM) ; ALTER TABLE SALARIE ADD FOREIGN KEY FK_SALARIE_PROJET (LIBELLE_P) REFERENCES PROJET (LIBELLE_P) ; ALTER TABLE SALARIE ADD FOREIGN KEY FK_SALARIE_SALARIE (NOM_S_CHEF_DE_PROJET) REFERENCES SALARIE (NOM_S) ; ALTER TABLE MATRIEL ADD FOREIGN KEY FK_MATRIEL_TACHES (LIBELLE_T) REFERENCES TACHES (LIBELLE_T) ; ALTER TABLE MATRIEL ADD FOREIGN KEY FK_MATRIEL_SALARIE (NOM_S) REFERENCES SALARIE (NOM_S) ; ALTER TABLE POSSEDE ADD FOREIGN KEY FK_POSSEDE_SALARIE (NOM_S) REFERENCES SALARIE (NOM_S) ; ALTER TABLE POSSEDE ADD FOREIGN KEY FK_POSSEDE_COMPTENCE_SALARIALE (COMPETENCE_SALARIE) REFERENCES COMPTENCE_SALARIALE (COMPETENCE_SALARIE) ;
true
4f9da6cad149c7a4d380a831038b70430f4e527f
SQL
ksamorodov/univer-db
/src/main/resources/db/changelog/1.0.1/sql/09_table_function.sql
UTF-8
425
3.296875
3
[]
no_license
create sequence if not exists employee_function_seq start 1; CREATE TABLE if not exists employee_function ( employee_function_id bigint unique not null default nextval('employee_function_seq' :: regclass), condition_id bigint not null references conditions(condition_id), name varchar(300) not null ); alter table employee_function add constraint employee_function_pk primary key (employee_function_id);
true
0853e52d07082347c11a78709428cb38e7596bd9
SQL
katlehotsopane/SQL2
/my query/Try Yourself/chapter5.sql
UTF-8
513
3.328125
3
[]
no_license
CREATE TABLE percent_change ( department varchar(20), spend_2014 numeric(10,2), spend_2017 numeric(10,2) ); INSERT INTO percent_change VALUES ('Building', 250000, 289000), ('Assessor', 178556, 179500), ('Library', 87777, 90001), ('Clerk', 451980, 650000), ('Police', 250000, 223000), ('Recreation', 199000, 195000); SELECT department, spend_2014, spend_2017, round( (spend_2017 - spend_2014) /spend_2014 * 100, 1 ) AS "pct_change" FROM percent_change;
true
f68199955b07636460d6cfded75cb93ded82de3e
SQL
rasc-br/DAAV
/sql/auth.sql
UTF-8
402
3.015625
3
[]
no_license
CREATE TABLE `apkscanner`.`users` ( `id` INT ZEROFILL NOT NULL AUTO_INCREMENT, `username` VARCHAR(45) NOT NULL, `password` VARCHAR(45) NOT NULL, `email` VARCHAR(45) NOT NULL, `status` VARCHAR(45) NOT NULL, `level` VARCHAR(45) NULL, `created` VARCHAR(45) NULL, PRIMARY KEY (`id`), UNIQUE INDEX `id_UNIQUE` (`id` ASC) VISIBLE, UNIQUE INDEX `username_UNIQUE` (`username` ASC) VISIBLE);
true
28823a40d53561e3835e998adef420a1678d676c
SQL
CGreenIdea/d4g2020-team25
/d4g2020-back/src/main/sql/table.sql
UTF-8
6,696
3.375
3
[]
no_license
/* * Create table REGION */ CREATE TABLE d4g_ifn.REGION ( RGN_ID INT auto_increment NOT NULL, RGN_NAME varchar(60) NOT NULL, RGN_CODE varchar(2) NOT NULL, CONSTRAINT REGION_PK PRIMARY KEY (RGN_ID) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; /* * Create table DEPARTMENT */ CREATE TABLE d4g_ifn.DEPARTMENT ( DPT_ID INT auto_increment NOT NULL, DPT_NAME varchar(60) NULL, DPT_CODE varchar(5) NULL, RGN_ID INT NOT NULL, CONSTRAINT DEPARTMENT_PK PRIMARY KEY (DPT_ID), CONSTRAINT DEPARTMENT_FK FOREIGN KEY (RGN_ID) REFERENCES d4g_ifn.REGION(RGN_ID) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; /* * Create table CITY */ CREATE TABLE d4g_ifn.CITY_DIGITAL_SCORING ( CDS_ID INT NOT NULL, CDS_LEGAL_POPULATION INT NULL, CDS_NETWORK_RATE_COVERAGE DECIMAL(10,4) NULL, CDS_MOBILITY_COVERAGE_RATE_2G DECIMAL(10,4) NULL, CDS_POVERTY_RATE DECIMAL(10,4) NULL, CDS_MEDIAN_INCOME DECIMAL(10,4) NULL, CDS_SINGLE_PARENT DECIMAL(10,0) NULL, CDS_SINGLE DECIMAL(10,0) NULL, CDS_PUBLIC_SERVICE_PER_PERSON DECIMAL(10,4) NULL, CDS_PUBLIC_SERVICE DECIMAL(10,4) NULL, CDS_JOBLESS_15_TO_64 DECIMAL(10,0) NULL, CDS_PERSON_AGED_15_TO_29 DECIMAL(10,0) NULL, CDS_PERSON_AGED_OVER_65 DECIMAL(10,0) NULL, CDS_NO_DIPLOMA_OVER_15 DECIMAL(10,0) NULL, CDS_CITY_ID INT NOT NULL, CDS_DIGITAL_INTERFACE DECIMAL(10,4) NULL, CDS_INFORMATION_ACCESS DECIMAL(10,4) NULL, CDS_ADMISTRATION_SKILL DECIMAL(10,4) NULL, CDS_DIGITAL_SCRILL DECIMAL(10,4) NULL, CONSTRAINT CITY_DIGITAL_SCORING_PK PRIMARY KEY (CDS_ID) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; /* * Create table DEPARTMENT */ CREATE TABLE d4g_ifn.DEPARTMENT_DIGITAL_SCORING ( CDD_ID INT NOT NULL, CDD_LEGAL_POPULATION INT NULL, CDD_NETWORK_RATE_COVERAGE DECIMAL(10,4) NULL, CDD_MOBILITY_COVERAGE_RATE_2G DECIMAL(10,4) NULL, CDD_POVERTY_RATE DECIMAL(10,4) NULL, CDD_MEDIAN_INCOME DECIMAL(10,4) NULL, CDD_SINGLE_PARENT DECIMAL(10,0) NULL, CDD_SINGLE DECIMAL(10,0) NULL, CDD_PUBLIC_SERVICE_PER_PERSON DECIMAL(10,4) NULL, CDD_PUBLIC_SERVICE DECIMAL(10,4) NULL, CDD_JOBLESS_15_TO_64 DECIMAL(10,0) NULL, CDD_PERSON_AGED_15_TO_29 DECIMAL(10,0) NULL, CDD_PERSON_AGED_OVER_65 DECIMAL(10,0) NULL, CDD_NO_DIPLOMA_OVER_15 DECIMAL(10,0) NULL, CDD_DEPARTMENT_ID INT NOT NULL, CDD_DIGITAL_INTERFACE DECIMAL(10,4) NULL, CDD_INFORMATION_ACCESS DECIMAL(10,4) NULL, CDD_ADMISTRATION_SKILL DECIMAL(10,4) NULL, CDD_DIGITAL_SCRILL DECIMAL(10,4) NULL, CONSTRAINT DEPARTMENT_DIGITAL_SCORING_PK PRIMARY KEY (CDD_ID) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; /* * Create table CITY */ CREATE TABLE d4g_ifn.CITY ( CTY_ID INT auto_increment NOT NULL, CTY_NAME varchar(128) NOT NULL, CTY_CODE_ARM varchar(5) NULL, CTY_POSTAL_CODE varchar(6) NULL, DPT_ID INT NULL, CTY_PARENT_CODE_ARM varchar(5) NULL, CONSTRAINT CITY_PK PRIMARY KEY (CTY_ID), CONSTRAINT CITY_FK FOREIGN KEY (DPT_ID) REFERENCES d4g_ifn.DEPARTMENT(DPT_ID) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; /* * Create table IMP_BASE_IC_DIPLOMES_FORMATION */ CREATE TABLE d4g_ifn.IMP_BASE_IC_DIPLOMES_FORMATION ( DLF_ID INT auto_increment NOT NULL, DLF_CODE_ARM varchar(5) NOT NULL, DLF_UNSCHOLAR_OVER_15 DECIMAL(10,0) NULL, DLF_UNSCHOLAR_NO_DIPLOMA_OVER_15 DECIMAL(10,0) NULL, CONSTRAINT IMP_BASE_IC_DIPLOMES_FORMATION_PK PRIMARY KEY (DLF_ID) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; /* * Create table IMP_BASE_CC_FILOSOFI */ CREATE TABLE d4g_ifn.IMP_BASE_CC_FILOSOFI ( FLF_ID INT auto_increment NOT NULL COMMENT 'Auto INC ID', FLF_CODE_ARM varchar(5) NOT NULL, FLF_POVERTY_RATE DECIMAL(10,4) NULL, FLF_MEDIAN_INCOME DECIMAL(10,4) NULL, CONSTRAINT IMP_BASE_IC_EVOL_STRUCT_PROP_PK PRIMARY KEY (FLF_ID) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; /* * Create table IMP_BASE_CC_FILOSOFI_DEPARTEMENT */ CREATE TABLE d4g_ifn.IMP_BASE_CC_FILOSOFI_DEPARTEMENT ( FLD_ID INT auto_increment NOT NULL COMMENT 'Auto INC ID', FLD_CODE varchar(5) NOT NULL, FLD_POVERTY_RATE DECIMAL(10,4) NULL, FLD_MEDIAN_INCOME DECIMAL(10,4) NULL, CONSTRAINT IMP_BASE_IC_EVOL_STRUCT_PROP_PK PRIMARY KEY (FLR_ID) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; /* * Create table IMP_BASE_CC_FILOSOFI_REGION */ CREATE TABLE d4g_ifn.IMP_BASE_CC_FILOSOFI_REGION ( FLR_ID INT auto_increment NOT NULL COMMENT 'Auto INC ID', FLR_CODE varchar(5) NOT NULL, FLR_POVERTY_RATE DECIMAL(10,4) NULL, FLR_MEDIAN_INCOME DECIMAL(10,4) NULL, CONSTRAINT IMP_BASE_IC_EVOL_STRUCT_PROP_PK PRIMARY KEY (FLD_ID) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; /* * Create table IMP_METROPOLE_SITES */ CREATE TABLE d4g_ifn.IMP_METROPOLE_SITES ( MPS_ID INT auto_increment NOT NULL, MPS_CODE_ARM varchar(5) NOT NULL, MPS_CODE_ACCESSIBILITY_2G DECIMAL(10,4) NULL, CONSTRAINT IMP_METROPLE_SITES_PK PRIMARY KEY (MPS_ID) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; /* * Create table IMP_BASE_IC_COUPLES_FAMILLES_MENAGES */ CREATE TABLE d4g_ifn.IMP_BASE_IC_COUPLES_FAMILLES_MENAGES ( CFM_ID INT auto_increment NOT NULL, CFM_CODE_ARM varchar(5) NOT NULL, CFM_SINGLE DECIMAL(10,0) NULL, CFM_SINGLE_PARENT DECIMAL(10,0) NULL, CONSTRAINT IMP_BASE_IC_COUPLES_FAMILLES_MENAGES_PK PRIMARY KEY (CFM_ID) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; /* * Create table IMP_BASE_IC_EVOL_STRUCT_PROP */ CREATE TABLE d4g_ifn.IMP_BASE_IC_EVOL_STRUCT_PROP ( ESP_ID INT auto_increment NOT NULL, ESP_CODE_ARM varchar(5) NOT NULL, ESP_TOTAL_POP NUMERIC(10,0) NULL, ESP_POP_AGE_0_14 NUMERIC(10,0) NULL, ESP_POP_AGE_15_29 NUMERIC(10,0) NULL, ESP_POP_AGE_OVER_65 NUMERIC(10,0) NULL, ESP_POP_NO_JOB_OVER_15 NUMERIC(10,0) NULL, CONSTRAINT IMP_BASE_IC_EVOL_STRUCT_PROP_PK PRIMARY KEY (ESP_ID) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; /* * Create table IMP_RD_THD_DEPLOIEMENT */ CREATE TABLE d4g_ifn.IMP_RD_THD_DEPLOIEMENT ( HTD_ID INT auto_increment NOT NULL, HTD_CODE_ARM varchar(5) NOT NULL, HTD_AVAILABLE_NETWORKS INT NULL, HTD_BEST_RATE DECIMAL(10,4) NULL, CONSTRAINT IMP_RD_THD_DEPLOIEMENT_PK PRIMARY KEY (HTD_ID) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; /* * Create table SCORING_HISTORY */ CREATE TABLE d4g_ifn.SCORING_HISTORY ( SGH_ID INT auto_increment NOT NULL, CDD_ID INT NOT NULL, CDS_ID INT NOT NULL, SGH_SEARCH DATETIME NOT NULL, CONSTRAINT SCORING_HISTORY_PK PRIMARY KEY (SGH_ID), CONSTRAINT SCORING_HISTORY_DEP_FK FOREIGN KEY (CDD_ID) REFERENCES d4g_ifn.DEPARTMENT_DIGITAL_SCORING(CDD_ID), CONSTRAINT SCORING_HISTORY_CITY_FK FOREIGN KEY (CDS_ID) REFERENCES d4g_ifn.CITY_DIGITAL_SCORING(CDS_ID) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
true