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
e532ec420b1e1dd40f17944f10b38eff587b73a5
SQL
nyluke/geointerestingness
/build_db.sql
UTF-8
380
3.703125
4
[]
no_license
create table t_geo ( country varchar(255) ); alter table t_geo add constraint ct_country_geo unique ( country ) ; create table t_photo ( id int not null primary key, country varchar(255) ); alter table t_photo add constraint fk_country_photo_geo foreign key ( country ) references t_geo ( country ); create index idx_country_photo on t_photo ( country );
true
89b076b67d8def33fb952e0bde78691b5b4275de
SQL
Dario23797/my_workspace
/sql/.svn/text-base/br.sql.svn-base
UTF-8
8,905
3.78125
4
[]
no_license
drop database BR; /*create database BR DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; use BR; */ create database BR; use BR; /*用户表*/ create table USER ( id varchar(32) primary key, user_name varchar(255), user_id varchar(20), /*学生号或教师工号*/ user_password varchar(50), first_login_time datetime, activity int(5), state char(1), user_birth date, user_gender int /*0:male 1:female*/, user_teleph varchar(40) , role tinyint, user_email varchar(100) ) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 ; /*群组表*/ create table `GROUP`( id varchar(32) primary key, group_name varchar(255), group_admin_id varchar(32), /*外键关联user表id*/ group_users_count int(5), description varchar(255) )ENGINE=InnoDB DEFAULT CHARACTER SET utf8; /*资源表*/ create table RESOURCE( id varchar(32) primary key, resource_real_name varchar(255), upload_user_id varchar(32), /*外键关联user表id*/ upload_time datetime, description varchar(255), resource_type varchar(10), key_words varchar(255), resource_mark int(3), resource_size bigint, category varchar(255) /*0_0_0*/, download_times int(5), share_times int(5), collect_times int(5), resource_snapshot_path varchar(255) , delete_flag int, /*0:代表资源存在 1:代表资源删除*/ mark int default 0, have_swf int default 0, /*0:代表资源不存在对应的swf 1:代表资源存在对应的swf*/ cover_jpg int default 0 )ENGINE=InnoDB DEFAULT CHARACTER SET utf8; /**/ create table RESOURCE_COURSE( resource_id varchar(32), course_id varchar(32), primary key(`resource_id`,`course_id`) )ENGINE=InnoDB DEFAULT CHARACTER SET utf8; /*标签表*/ create table TAG( id varchar(32) primary key, tag_name varchar(255), reference_times int(4) )ENGINE=InnoDB DEFAULT CHARACTER SET utf8; /*主题表*/ create table TOPIC( id varchar(32) primary key, community_id varchar(32),/*外键关联group表id*/ author_id varchar(32),/*参照user表id*/ title varchar(100), content text, pub_date datetime, delete_flag tinyint default 1 )ENGINE=InnoDB DEFAULT CHARACTER SET utf8; /*回复主题表*/ create table SUB_TOPIC( id varchar(32) primary key, reply_topic_id varchar(32), content text, author_id varchar(32), pub_date datetime )ENGINE=InnoDB DEFAULT CHARACTER SET utf8; /*用户收藏资源连接表*/ create table USER_COLLECT_RESOURCE( user_id varchar(32) , /*参照用户表id*/ resource_id varchar(32), /*参照资源表id*/ primary key (`user_id`,`resource_id`) )ENGINE=InnoDB DEFAULT CHARACTER SET utf8; /*用户下载资源连接表*/ create table USER_DOWNLOAD_RESOURCE( user_id varchar(32) , /*参照用户表id*/ resource_id varchar(32), /*参照资源表id*/ primary key (`user_id`,`resource_id`) )ENGINE=InnoDB DEFAULT CHARACTER SET utf8; /*用户分享资源连接表*/ create table USER_SHARE_RESOURCE( user_id varchar(32) , /*参照用户表id*/ resource_id varchar(32), /*参照资源表id*/ primary key (`user_id`,`resource_id`) )ENGINE=InnoDB DEFAULT CHARACTER SET utf8; /*群组用户连接表*/ create table GROUP_USER( group_id varchar(32), user_id varchar(32), primary key(`group_id`,`user_id`) )ENGINE=InnoDB DEFAULT CHARACTER SET utf8; /*群组资源推荐表 */ create table GROUP_RESOURCE( group_id varchar(32), resource_id varchar(32), share_user_id varchar(32) , primary key(`group_id`,`resource_id`) )ENGINE=InnoDB DEFAULT CHARACTER SET utf8; /*用户标签连接表*/ create table USER_TAG( user_id varchar(32), tag_id varchar(32), primary key(`user_id`,`tag_id`) )ENGINE=InnoDB DEFAULT CHARACTER SET utf8; /*标签资源连接表*/ create table TAG_RESOURCE( tag_id varchar(32), resource_id varchar(32), primary key(`tag_id`,`resource_id`) )ENGINE=InnoDB DEFAULT CHARACTER SET utf8; /*文件夹表*/ create table DIRECTORY( id varchar(32) primary key, dir_name varchar(255), user_id varchar(32)/*参照user表id*/ )ENGINE=InnoDB DEFAULT CHARACTER SET utf8; /*资源推荐表*/ create table RESOURCE_RECOMMEND( id varchar(32) primary key, resource_id varchar(32), user_id varchar(32), `type` int,/*0:系统自动推荐1:用户分享2:组分享*/ rs_rmd_id varchar(32), /*根据type字段,选择关联user或group表id,系统推荐则为0*/ read_flag int /*标记用户是否已经读过*/ )ENGINE=InnoDB DEFAULT CHARACTER SET utf8; /*用户关系表*/ create table USER_RELATION( id varchar(32) primary key, user_id varchar(32), /*外键关联usre表id*/ friend_id varchar(32), /*外键关联usre表id */ follow_id varchar(32), /*外键关联usre表id */ friend_group_id varchar(32) /*外键关联friend_group表id,没有分组为默认值0*/ )ENGINE=InnoDB DEFAULT CHARACTER SET utf8; /*用户分组表*/ create table FRIEND_GROUP( id varchar(32) primary key, user_id varchar(32), friend_group_name varchar(255) )ENGINE=InnoDB DEFAULT CHARACTER SET utf8; /*用户行为表*/ create table USER_BEHAVIOR( id varchar(32) primary key, user_id varchar(32), `time` datetime, behavior_type int,/*0:用户分享资源行为1:用户收藏资源行为2:用户下载资源行为3:用户上传资源行为4:用户评论行为*/ resource_id varchar(32), /*外键关联resource表的id*/ topic_id varchar(32) /*外键关联topic表的id*/ )ENGINE=InnoDB DEFAULT CHARACTER SET utf8; /*各个学院常量表*/ create table ACADEMY( id varchar(32) primary key, name varchar(30) not null )ENGINE=InnoDB DEFAULT CHARACTER SET utf8; create table MAJOR( id varchar(32) primary key, name varchar(30) not null, academy_id varchar(32) )ENGINE=InnoDB DEFAULT CHARACTER SET utf8; create table COURSE( id varchar(32) primary key, name varchar(30) not null, major_id varchar(32), term int/*1:一学期;2:二学期*。。。。。*/ )ENGINE=InnoDB DEFAULT CHARACTER SET utf8; create table USER_FOLLOW_MAJOR( user_id varchar(32), major_id varchar(32), primary key(`user_id`,`major_id`) )ENGINE=InnoDB DEFAULT CHARACTER SET utf8; create table USER_FOLLOW_COURSE( user_id varchar(32), course_id varchar(32), in_community int, invite int, community_id varchar(32); primary key(`user_id`,`course_id`) )ENGINE=InnoDB DEFAULT CHARACTER SET utf8; /*社区表*/ create table COMMUNITY( id varchar(32) primary key, name varchar(255), admin_id varchar(32), /*外键关联USER表老师id*/ state tinyint, /*0:激活状态,1:为激活状态*/ course_id varchar(32) /*社区对应的课程*/ )ENGINE=InnoDB DEFAULT CHARACTER SET utf8; /*社区,用户多对多关联表*/ create table COMMUNITY_USER( community_id varchar(32), user_id varchar(32), primary key(`community_id`,`user_id`) )ENGINE=InnoDB DEFAULT CHARACTER SET utf8; /*社区公告*/ create table BULLETIN( id varchar(32) primary key, community_id varchar(32), content varchar(255), pub_date timestamp )ENGINE=InnoDB DEFAULT CHARACTER SET utf8; /*推荐书籍表*/ create table HOT_BOOK( id varchar(32) primary key, user_id varchar(32), /*外间关联user表id,如果是热门图书,该值为空值,如果是根据用户学号推荐图书,则该值为用户id */ english_name varchar(200), chinese_name varchar(200), description text, author varchar(200), publisher varchar(200), isbn varchar(32), img_url varchar(100), douban_href varchar(100), lab_href varchar(100), price varchar(32), pages varchar(32), flag int, /*0:代表图书馆排行榜抓取,1:代表根据图书馆热搜词,豆瓣抓去,3:根据用户id获取推荐图书*/ pub_date varchar(15), douban_id varchar(10), binding varchar(15), tag varchar(255), rating varchar(10) )ENGINE=InnoDB DEFAULT CHARACTER SET utf8; /*豆瓣图书数据*/ create table DoubanJson( id varchar(32) primary key, title varchar(255), authors varchar(255), translators varchar(255), pub_date varchar(255), publisher varchar(255), price varchar(255), summary text, alt varchar(255), isbn10 varchar(255), smallPic varchar(255), mediumPic varchar(255), largePic varchar(255), url varchar(255), course_id varchar(32) )ENGINE=InnoDB DEFAULT CHARACTER SET utf8; /*资源评论表*/ create table RESOURCE_COMMENT( id varchar(32) primary key, content text, resource_id varchar(32), pub_user_id varchar(32), pub_date datetime )ENGINE=InnoDB DEFAULT CHARACTER SET utf8; create table RATE( id varchar(32) primary key, user_id varchar(32), resource_id varchar(32), int mark )ENGINE=InnoDB DEFAULT CHARACTER set=utf8;
true
56ccf76d97d4eed2d5fae0b08f3940c8addc4239
SQL
antoniofern/bd2-scripts
/functions-procedures-II/8.sql
UTF-8
242
2.9375
3
[ "MIT" ]
permissive
delimiter // CREATE OR replace procedure nome_milhas(codCliente int) contains SQL BEGIN SELECT cl.nome, m.quantidade FROM cliente cl, milhas m WHERE cl.codigo = codCliente AND m.cliente = codCliente; END // delimiter ; CALL nome_milhas(1);
true
4ef09ffd5c1ba0066ccd7a551393897ac12d6be4
SQL
wpalomo/fguerrero
/sql/Retenciones_Recibidos.sql
UTF-8
1,101
3.171875
3
[]
no_license
Select * from retenreci select distinct d.code, scode, sname, d.fecha, d.scedula, d.sruc, d.num, d.nomdoc, d.subconiva, d.subsiniva, d.descuconiva, d.descusiniva, d.montototal, f.valorren, f.valoriva, f.numret from vdocuments d left join retenreci f on (d.code=f.code) where d.code=328343 and d.isaccount and not d.isanulado select * from vdocuments where code=327821 select distinct d.code, scode, sname, d.fecha, r.rubname, d.scedula, d.sruc, d.num, d.nomdoc, d.subconiva, "+; "d.subsiniva, d.descuconiva, d.descusiniva, "+; "b.valor, case when b.basecal=0 then b.valor*100/r.valcal else b.basecal end as basecal, r.valcal, r.rubtab "+; "from vdocuments d left join cobros b on (d.code=b.code) "+; "left join rubros r on (b.rubcode=r.rubcode) "+; "where d.isaccount and not d.isanulado AND r.isdocret and "+fdh+; " and "+timp+" and "+cli+" and ( d.iddocu in "+; "(select distinct d.iddocu from gdoc g, dgdoc t, docuse d "+; " where (g.tag='ANXVTA' or g.tag='RECAPS' or g.tag='CISAIN' or g.tag='DOGESD') and g.idgdoc=t.idgdoc and "+; " t.dtag=d.dtag ) ) ;"
true
e7306a7cbb8252a665e359fae7093c92a2f0c729
SQL
vijaydairyf/TimelyFish
/SolomonApp/dbo/Stored Procedures/dbo.ARDoc_Bat_Cust_Type_Ref2.sql
UTF-8
415
2.75
3
[]
no_license
 /****** Object: Stored Procedure dbo.ARDoc_Bat_Cust_Type_Ref2 Script Date: 4/7/98 12:30:32 PM ******/ CREATE PROCEDURE ARDoc_Bat_Cust_Type_Ref2 @parm1 varchar (10), @parm2 varchar (15), @parm3 varchar ( 2), @parm4 varchar ( 10) as SELECT * FROM ARDoc WHERE CpnyId = @parm1 AND CustId = @parm2 AND DocType = @parm3 AND RefNbr = @parm4 AND Rlsed = 1 ORDER BY BatNbr, CustId, DocType, RefNbr
true
d0df93f5889cbe5a253b7b967b780ae71c662bba
SQL
luisroel/apq
/spAPQ_Execute_Runtime.sql
UTF-8
1,354
2.59375
3
[]
no_license
drop procedure if exists `spapq_execute_runtime`; delimiter $$ create procedure `spapq_call_runtime`( idruntime bigint ) begin -- By Summary call `spapq_create_equipmentsummary`( idruntime ); call `spapq_create_availabilitysummary`( idruntime ); call `spapq_create_prodtimessummary`( idruntime ); call `spapq_create_stopssummary`( idruntime ); call `spapq_create_countssummary`( idruntime ); call `spapq_create_setupandstartsummary`( idruntime ); -- By Area call `spapq_create_equipmentbyarea`( idruntime ); call `spapq_create_availabilitybyarea`( idruntime ); call `spapq_create_prodtimesbyarea`( idruntime ); call `spapq_create_stopsbyarea`( idruntime ); call `spapq_create_countsbyarea`( idruntime ); call `spapq_create_setupandstartbyarea`( idruntime ); -- By Line call `spapq_create_equipmentbyline`( idruntime ); call `spapq_create_availabilitybyline`( idruntime ); call `spapq_create_prodtimesbyline`( idruntime ); call `spapq_create_stopsbyline`( idruntime ); call `spapq_create_countsbyline`( idruntime ); call `spapq_create_setupandstartbyline`( idruntime ); -- By Equipment call `spapq_create_stopsbyequipment`( idruntime ); call `spapq_create_countsbyequipment`( idruntime ); call `spapq_create_prodtimesbyequipment`( idruntime ); call `spapq_create_setupandstartbyequipment`( idruntime ); end; $$ delimiter ;
true
e9b4115acc90543f2dd50846c57ce9ee76608cd5
SQL
penelopeg/daw
/create.sql
UTF-8
5,414
3.546875
4
[]
no_license
CREATE TABLE user_type ( id INT(6) AUTO_INCREMENT PRIMARY KEY, type VARCHAR(30) NOT NULL ); CREATE TABLE product_category ( id INT(6) AUTO_INCREMENT PRIMARY KEY, category VARCHAR(30) NOT NULL ); CREATE TABLE order_status ( id INT(6) AUTO_INCREMENT PRIMARY KEY, status VARCHAR(30) NOT NULL ); CREATE TABLE country( id INT(6) AUTO_INCREMENT PRIMARY KEY, country_name VARCHAR(30) NOT NULL ); CREATE TABLE city( id INT(6) AUTO_INCREMENT PRIMARY KEY, city_name VARCHAR(30) NOT NULL ); CREATE TABLE user ( id INT(6) AUTO_INCREMENT PRIMARY KEY, user_type_id INT(6) NOT NULL, firstname VARCHAR(30) NOT NULL, lastname VARCHAR(30) NOT NULL, email VARCHAR(50) NOT NULL UNIQUE, password VARCHAR(32) NOT NULL, FOREIGN KEY (user_type_id) REFERENCES user_type(id) ); CREATE TABLE client ( id INT(6) AUTO_INCREMENT PRIMARY KEY, firstname VARCHAR(50) NOT NULL, lastname VARCHAR(50) NOT NULL, email VARCHAR(50) NOT NULL, reg_date Datetime, password VARCHAR(32) NOT NULL, address VARCHAR(100), city_id INT(6), country_id INT(6), payment_info VARCHAR(100), FOREIGN KEY (city_id) REFERENCES city(id), FOREIGN KEY (country_id) REFERENCES country(id) ); CREATE TABLE product ( id INT(6) AUTO_INCREMENT PRIMARY KEY, name VARCHAR(100) NOT NULL, description VARCHAR(100), price DECIMAL(10, 2) NOT NULL, image_url VARCHAR(100), available TINYINT(1) ); CREATE TABLE product_2_categories ( product_id INT(6) NOT NULL, category_id INT(6) NOT NULL, FOREIGN KEY (category_id) REFERENCES product_category(id), FOREIGN KEY (product_id) REFERENCES product(id) ); CREATE TABLE orders ( id INT(6) AUTO_INCREMENT PRIMARY KEY, client_id INT(6), order_date Datetime, status_id INT(6), total DECIMAL(10, 2), FOREIGN KEY (status_id) REFERENCES order_status(id), FOREIGN KEY (client_id) REFERENCES client(id) ); CREATE TABLE product_2_orders ( order_id INT(6) NOT NULL, product_id INT(6) NOT NULL, quantity INT(100), price_total DECIMAL(10, 2), FOREIGN KEY (order_id) REFERENCES orders(id), FOREIGN KEY (product_id) REFERENCES product(id) ); INSERT INTO user_type (type) VALUES ('admin'); INSERT INTO user_type (type) VALUES ('editor'); INSERT INTO product_category (category) VALUES ('Tv Shows'); INSERT INTO product_category (category) VALUES ('Movies'); INSERT INTO product_category (category) VALUES ('Christmas'); INSERT INTO product_category (category) VALUES ('Easter'); INSERT INTO product_category (category) VALUES ('Halloween'); INSERT INTO product_category (category) VALUES ('Harry Potter'); INSERT INTO product_category (category) VALUES ('Star Wars'); INSERT INTO product_category (category) VALUES ('Star Trek'); INSERT INTO order_status (status) VALUES ('Preparing'); INSERT INTO order_status (status) VALUES ('Shipping'); INSERT INTO order_status (status) VALUES ('Shipped'); INSERT INTO order_status (status) VALUES ('Delivered'); INSERT INTO country (country_name) VALUES ('Portugal'); INSERT INTO country (country_name) VALUES ('EUA'); INSERT INTO city (city_name) VALUES ('Lisbon'); INSERT INTO city (city_name) VALUES ('New York'); INSERT INTO user (user_type_id, firstname, lastname, email, password) VALUES (1, "admin", "admin", "admin@admin.com", "21232f297a57a5a743894a0e4a801fc3"); INSERT INTO user (user_type_id, firstname, lastname, email, password) VALUES (2, "editor", "editor", "editor@editor.com", "5aee9dbd2a188839105073571bee1b1f"); INSERT INTO client (firstname, lastname, email, reg_date, password, address,city_id, country_id, payment_info) VALUES ("John", "Doe", "johndoe@gmail.com", NOW(), "6579e96f76baa00787a28653876c6127", "Rua das flores", 1, 1, "credit card"); INSERT INTO client (firstname, lastname, email, reg_date, password, address,city_id, country_id, payment_info) VALUES ("Joao", "Do", "jodo@gmail.com", NOW(), "3b46bc68e71b92634a97ab3a0b01dbe4", "Rua das Pedras", 2, 2, "paypal"); INSERT INTO product (name, description, price, image_url, available) VALUES ("Darth Vader Mug", "If you like your coffee on the dark side! Tea, Coffee & Hot Chocolate never looked so good!", 20, 'Darth-Vader-figural-mug.jpg', 1); insert into product (name, description, price, image_url, available) values ('Harry Potter Triwizard Cup Lamp', 'For the victorious!', 29.99, 'triwizarcup.jpg', 1); insert into product (name, description, price, image_url, available) values ('Star Wars R2-D2 Coffee Press', 'Beep bean bloop brew!', 39.99, 'r2d2_coffeepress.jpg', 1); insert into product (name, description, price, image_url, available) values ('Marvel Groot USB Car Charger', "Groot dances while plugged in and turned on - he's sound activated!", 40.99, 'usbcharger_groot.jpg', 1); insert into product (name, description, price, image_url, available) values ('Star Trek Delta Enamel Stud Earrings', "Made of sterling silver and hard enamel! Choose science blue, engineering red, or command gold", 94.95, 'startrek_earrings.jpg', 1); INSERT INTO product_2_categories (product_id, category_id) VALUES (1, 7); INSERT INTO product_2_categories (product_id, category_id) VALUES (1, 4); INSERT INTO product_2_categories (product_id, category_id) VALUES (2, 6); INSERT INTO product_2_categories (product_id, category_id) VALUES (3, 7); INSERT INTO product_2_categories (product_id, category_id) VALUES (4, 2); INSERT INTO product_2_categories (product_id, category_id) VALUES (5, 8); INSERT INTO orders (client_id, order_date, status_id) VALUES (1, NOW(), 2); INSERT INTO product_2_orders (order_id, product_id, quantity, price_total) VALUES (1, 1, 2, 40);
true
8f808ffde0e937fa334e7e3e69d3ea6167b988fa
SQL
AlyaSelviaTamzila/Rest-API-Authentication
/penyewaan_mobil.sql
UTF-8
5,253
3.109375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 30, 2020 at 10:48 AM -- Server version: 10.1.36-MariaDB -- PHP Version: 7.2.10 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: `penyewaan_mobil` -- -- -------------------------------------------------------- -- -- Table structure for table `karyawan` -- CREATE TABLE `karyawan` ( `id_karyawan` int(100) NOT NULL, `nama_karyawan` varchar(300) NOT NULL, `alamat_karyawan` varchar(300) NOT NULL, `kontak` int(100) NOT NULL, `username` varchar(100) NOT NULL, `password` varchar(100) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `karyawan` -- INSERT INTO `karyawan` (`id_karyawan`, `nama_karyawan`, `alamat_karyawan`, `kontak`, `username`, `password`) VALUES (1, 'Anisya Rahma', 'Malang', 89754356, 'anisya', '123456'), (2, 'Agzal Aviansyah', 'Banyuwangi', 896534567, 'agzalavian', '850a2e510deb594ce465c11451a7f324'), (3, 'Faisol', 'Tembokrejo', 2147483647, 'faisol', '0e7c2d2d3362229430981a5bb802933f'); -- -------------------------------------------------------- -- -- Table structure for table `mobil` -- CREATE TABLE `mobil` ( `id_mobil` int(100) NOT NULL, `nomor_mobil` int(100) NOT NULL, `merk` varchar(200) NOT NULL, `jenis` varchar(200) NOT NULL, `warna` varchar(200) NOT NULL, `tahun_pembuatan` int(20) NOT NULL, `biaya_sewa_perhari` double NOT NULL, `image` varchar(200) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `mobil` -- INSERT INTO `mobil` (`id_mobil`, `nomor_mobil`, `merk`, `jenis`, `warna`, `tahun_pembuatan`, `biaya_sewa_perhari`, `image`) VALUES (1, 9875, 'BMW Seri 3 Coupe', 'Mobil Coupe', 'Putih', 2019, 2000, 'aaaaaa'), (2, 89765, 'Honda Brio RS', 'Mobil Hatcback', 'Putih', 2019, 2000, 'bbbbb'), (3, 45678, 'Toyota Calya', 'Mobil MPV', 'Hitam', 2019, 1500, 'ccccccc'); -- -------------------------------------------------------- -- -- Table structure for table `pelanggan` -- CREATE TABLE `pelanggan` ( `id_pelanggan` int(100) NOT NULL, `nama_pelanggan` varchar(300) NOT NULL, `alamat_pelanggan` varchar(400) NOT NULL, `kontak` int(100) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `pelanggan` -- INSERT INTO `pelanggan` (`id_pelanggan`, `nama_pelanggan`, `alamat_pelanggan`, `kontak`) VALUES (1, 'Siti Khadijah', 'Kerinci V', 876545689), (2, 'Desta Laili', 'Kerinci I', 89654346), (3, 'Syah Romadhoni', 'Suhat', 8634589), (5, 'Aureliaa', 'Kendungkandang', 2147483647); -- -------------------------------------------------------- -- -- Table structure for table `sewa` -- CREATE TABLE `sewa` ( `id_sewa` int(200) NOT NULL, `id_mobil` int(100) NOT NULL, `id_karyawan` int(100) NOT NULL, `id_pelanggan` int(100) NOT NULL, `tgl_sewa` date NOT NULL, `tgl_kembali` date NOT NULL, `total_bayar` double NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sewa` -- INSERT INTO `sewa` (`id_sewa`, `id_mobil`, `id_karyawan`, `id_pelanggan`, `tgl_sewa`, `tgl_kembali`, `total_bayar`) VALUES (1, 1, 1, 1, '2020-11-30', '0000-00-00', 2000), (2, 1, 1, 2, '2020-11-30', '2020-12-01', 2000), (3, 2, 1, 3, '2020-11-30', '2020-12-01', 2000); -- -- Indexes for dumped tables -- -- -- Indexes for table `karyawan` -- ALTER TABLE `karyawan` ADD PRIMARY KEY (`id_karyawan`); -- -- Indexes for table `mobil` -- ALTER TABLE `mobil` ADD PRIMARY KEY (`id_mobil`); -- -- Indexes for table `pelanggan` -- ALTER TABLE `pelanggan` ADD PRIMARY KEY (`id_pelanggan`); -- -- Indexes for table `sewa` -- ALTER TABLE `sewa` ADD PRIMARY KEY (`id_sewa`), ADD KEY `id_mobil` (`id_mobil`), ADD KEY `id_karyawan` (`id_karyawan`), ADD KEY `id_pelanggan` (`id_pelanggan`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `karyawan` -- ALTER TABLE `karyawan` MODIFY `id_karyawan` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT for table `mobil` -- ALTER TABLE `mobil` MODIFY `id_mobil` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT for table `pelanggan` -- ALTER TABLE `pelanggan` MODIFY `id_pelanggan` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; -- -- AUTO_INCREMENT for table `sewa` -- ALTER TABLE `sewa` MODIFY `id_sewa` int(200) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- Constraints for dumped tables -- -- -- Constraints for table `sewa` -- ALTER TABLE `sewa` ADD CONSTRAINT `sewa_ibfk_1` FOREIGN KEY (`id_mobil`) REFERENCES `mobil` (`id_mobil`), ADD CONSTRAINT `sewa_ibfk_2` FOREIGN KEY (`id_karyawan`) REFERENCES `karyawan` (`id_karyawan`), ADD CONSTRAINT `sewa_ibfk_3` FOREIGN KEY (`id_pelanggan`) REFERENCES `pelanggan` (`id_pelanggan`); 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
1ccafae92d7f23fa611edbd781b8e048bc4a758a
SQL
cncf/devstats
/util_sql/inactive_prs_wip.sql
UTF-8
6,275
3.71875
4
[ "Apache-2.0" ]
permissive
with dtfrom as ( select '{{to}}'::timestamp - '3 months'::interval as dtfrom ), dtto as ( select case '{{to}}'::timestamp > now() when true then now() else '{{to}}'::timestamp end as dtto ), issues as ( select distinct sub.issue_id, sub.user_id, sub.created_at, sub.event_id from ( select distinct id as issue_id, last_value(event_id) over issues_ordered_by_update as event_id, first_value(user_id) over issues_ordered_by_update as user_id, first_value(created_at) over issues_ordered_by_update as created_at, last_value(closed_at) over issues_ordered_by_update as closed_at from gha_issues, dtfrom where created_at >= dtfrom and created_at < '{{to}}' and updated_at < '{{to}}' and is_pull_request = true and (lower(dup_user_login) {{exclude_bots}}) window issues_ordered_by_update as ( partition by id order by updated_at asc, event_id asc range between current row and unbounded following ) ) sub where sub.closed_at is null ), prs as ( select distinct i.issue_id, ipr.pull_request_id as pr_id, ipr.number, ipr.repo_name, pr.created_at, pr.user_id, i.event_id from ( select distinct id as pr_id, first_value(user_id) over prs_ordered_by_update as user_id, first_value(created_at) over prs_ordered_by_update as created_at, last_value(closed_at) over prs_ordered_by_update as closed_at, last_value(merged_at) over prs_ordered_by_update as merged_at from gha_pull_requests, dtfrom where created_at >= dtfrom and created_at < '{{to}}' and updated_at < '{{to}}' and event_id > 0 and (lower(dup_user_login) {{exclude_bots}}) window prs_ordered_by_update as ( partition by id order by updated_at asc, event_id asc range between current row and unbounded following ) ) pr, issues i, gha_issues_pull_requests ipr where ipr.issue_id = i.issue_id and ipr.pull_request_id = pr.pr_id and pr.closed_at is null and pr.merged_at is null ), pr_sigs as ( select sub2.issue_id, sub2.pr_id, sub2.event_id, sub2.number, sub2.repo_name, case sub2.sig when 'aws' then 'cloud-provider' when 'azure' then 'cloud-provider' when 'batchd' then 'cloud-provider' when 'cloud-provider-aws' then 'cloud-provider' when 'gcp' then 'cloud-provider' when 'ibmcloud' then 'cloud-provider' when 'openstack' then 'cloud-provider' when 'vmware' then 'cloud-provider' else sub2.sig end as sig from ( select sub.issue_id, sub.pr_id, sub.event_id, sub.number, sub.repo_name, sub.sig from ( select pr.issue_id, pr.pr_id, pr.event_id, pr.number, pr.repo_name, lower(substring(il.dup_label_name from '(?i)sig/(.*)')) as sig from gha_issues_labels il, prs pr where il.issue_id = pr.issue_id and il.event_id = pr.event_id ) sub where sub.sig is not null and sub.sig not in ( 'apimachinery', 'api-machiner', 'cloude-provider', 'nework', 'scalability-proprosals', 'storge', 'ui-preview-reviewes', 'cluster-fifecycle', 'rktnetes' ) and sub.sig not like '%use-only-as-a-last-resort' and sub.sig in (select sig_mentions_labels_name from tsig_mentions_labels) ) sub2 ), issues_act as ( select i2.number, i2.dup_repo_name as repo_name, extract(epoch from i2.updated_at - i.created_at) as diff from issues i, gha_issues i2 -- dtfrom where i.issue_id = i2.id and (lower(i2.dup_actor_login) {{exclude_bots}}) -- and i2.created_at >= dtfrom -- and i2.created_at < '{{to}}' -- and i2.is_pull_request = true and i2.updated_at < '{{to}}' and i2.event_id in ( select event_id from gha_issues sub where sub.dup_actor_id != i.user_id and sub.id = i.issue_id -- and sub.created_at >= dtfrom -- and sub.created_at < '{{to}}' and i2.updated_at < '{{to}}' and sub.updated_at > i.created_at + '30 seconds'::interval and sub.dup_type like '%Event' order by sub.updated_at asc limit 1 ) ), prs_act as ( select pr2.number, pr2.dup_repo_name as repo_name, extract(epoch from pr2.updated_at - pr.created_at) as diff from prs pr, gha_pull_requests pr2 -- dtfrom where pr.pr_id = pr2.id and (lower(pr2.dup_actor_login) {{exclude_bots}}) -- and pr2.created_at >= dtfrom -- and pr2.created_at < '{{to}}' and pr2.updated_at < '{{to}}' and pr2.event_id in ( select event_id from gha_pull_requests sub where sub.dup_actor_id != pr.user_id and sub.id = pr.pr_id -- and sub.created_at >= dtfrom -- and sub.created_at < '{{to}}' and pr2.updated_at < '{{to}}' and sub.updated_at > pr.created_at + '30 seconds'::interval and sub.dup_type like '%Event' order by sub.updated_at asc limit 1 ) ), act_on_issue as ( select p.number, p.repo_name, p.created_at, coalesce(ia.diff, extract(epoch from d.dtto - p.created_at)) as inactive_for from dtto d, prs p left join issues_act ia on p.repo_name = ia.repo_name and p.number = ia.number ), act as ( select aoi.number, aoi.repo_name, -- aoi.inactive_for as issue_inactrive_for, -- pra.diff as pr_inactive_for, -- extract(epoch from d.dtto - aoi.created_at) as elapsed_time, least(aoi.inactive_for, coalesce(pra.diff, extract(epoch from d.dtto - aoi.created_at))) as final_inactive_for from dtto d, act_on_issue aoi left join prs_act pra on aoi.repo_name = pra.repo_name and aoi.number = pra.number ) --select dtfrom, dtto from dtfrom, dtto; --select * from issues; --select * from prs; --select * from pr_sigs; --select * from issues_act; --select * from prs_act; --select * from act_on_issue; --select * from act_on_pr; select * from act;
true
19fd5eb0d34e00b2ff101dc8efcfcc338b220709
SQL
planetacomputer/phpFoment2016
/sql/ej2-1.sql
UTF-8
664
3.0625
3
[]
no_license
CREATE TABLE T_OFFICES( OFFC_ID INT NOT NULL, OFFC_COUNTRY VARCHAR(30) NOT NULL, OFFC_DESCRIPTION VARCHAR(80) NOT NULL, OFFC_NAME VARCHAR(30) ); DROP TABLE T_OFFICES; -- HOLA ESTO ES UN COMENT -- CREATE TABLE T_OFFICES( OFFC_ID INT NOT NULL, OFFC_COUNTRY VARCHAR(30) NOT NULL, OFFC_DESCRIPTION VARCHAR(90) NOT NULL, OFFC_NAME VARCHAR(30) ); -- Eliminar el campo OFFC_NAME -- ALTER TABLE T_OFFICES DROP COLUMN OFFC_NAME; -- Agregar campo OFF_CITY despues de OFF_COUNTRY ALTER TABLE T_OFFICES ADD COLUMN OFFC_CITY VARCHAR(50) NOT NULL AFTER OFFC_COUNTRY; -- Modificar campo -- ALTER TABLE T_OFFICES MODIFY COLUMN OFFC_DESCRIPTION VARCHAR(100);
true
0e1bc2b5c558b802bfe915baf3e6e182ef4d1a00
SQL
Pashkalab/PHPAcedemy4
/1909-oop/mvc20171107.sql
UTF-8
2,143
2.84375
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.5.57, for debian-linux-gnu (x86_64) -- -- Host: 0.0.0.0 Database: mvc -- ------------------------------------------------------ -- Server version 5.5.57-0ubuntu0.14.04.1 /*!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 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!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 */; -- -- Table structure for table `category` -- DROP TABLE IF EXISTS `category`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `category` ( `id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(50) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `category` -- LOCK TABLES `category` WRITE; /*!40000 ALTER TABLE `category` DISABLE KEYS */; INSERT INTO `category` VALUES (1,'Home'),(2,'Shoes'),(3,'Books'),(5,'Outdoors'),(7,'Games'),(9,'Jewelery'),(12,'Health'),(13,'Grocery'),(14,'Tools'),(15,'Movies'),(16,'Computers'),(18,'Automotive'),(19,'Sports'),(20,'Beauty'),(21,'Other'),(22,'Health'); /*!40000 ALTER TABLE `category` ENABLE KEYS */; UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!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 */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -- Dump completed on 2017-11-07 18:56:46
true
924f82f0ecedfa1850eb56234129ef74ecd53c57
SQL
libinruan/recipes_molinaro_sql_cookbook
/code/1-06 referencing aliases in the WHERE clause.sql
UTF-8
383
2.9375
3
[]
no_license
/* the following is false. select sal as [salary], comm as [commission] from emp where salary < 5000; */ select ename, salary, commission from ( select ename, sal as salary, comm as commission from emp ) x --- Don't forget it. where salary >= 2000; -- note: you need to use an outer query to reference -- aliases, window functions, aggregation function, etc.
true
c779bcea1a3aca0641f557fc19962d0c1a6c9271
SQL
bellmit/flexdb
/2.HOST/3.Procedure/ca0006.sql
UTF-8
3,256
3.59375
4
[]
no_license
CREATE OR REPLACE PROCEDURE ca0006 ( PV_REFCURSOR IN OUT PKG_REPORT.REF_CURSOR, OPT IN VARCHAR2, BRID IN VARCHAR2, V_CACODE IN VARCHAR2 ) IS -- -- PURPOSE: BRIEFLY EXPLAIN THE FUNCTIONALITY OF THE PROCEDURE -- BAO CAO TAI KHOAN TIEN TONG HOP CUA NGUOI DAU TU -- MODIFICATION HISTORY -- PERSON DATE COMMENTS -- NAMNT 20-DEC-06 CREATED -- --------- ------ ------------------------------------------- CUR PKG_REPORT.REF_CURSOR; V_STROPTION VARCHAR2 (5); -- A: ALL; B: BRANCH; S: SUB-BRANCH V_STRBRID VARCHAR2 (4); V_STRCACODE VARCHAR2 (20); BEGIN /* V_STROPTION := OPT; IF (V_STROPTION <> 'A') AND (BRID <> 'ALL') THEN V_STRBRID := BRID; ELSE V_STRBRID := '%%'; END IF; */ IF (V_CACODE <> 'ALL' OR V_CACODE <> '') THEN V_STRCACODE := replace(V_CACODE,'.',''); ELSE V_STRCACODE := '%%'; END IF; OPEN PV_REFCURSOR FOR SELECT CA.AUTOID, SB.SYMBOL, ISS.FULLNAME ISS_NAME, CF.CUSTID, CF.FULLNAME, (case when cf.country = '234' then cf.idcode else cf.tradingcode end) IDCODE, decode (cf.idtype, 001, 1, 002, 2, 003, 3, 005, 5, 4 ) idcode_type , al.cdcontent country, sum(ca.BALANCE + ca.PBALANCE) BALANCE, cf.address, (case when substr(cf.custodycd, 4, 1) = 'C' and af.aftype = 001 then 3 when substr(cf.custodycd, 4, 1) = 'F' and af.aftype = 001 then 4 when (substr(cf.custodycd,4,1) = 'C' and af.aftype <> 001 ) or substr(cf.custodycd,4,1) = 'P' then 5 when substr(cf.custodycd,4,1) ='F' and af.aftype <> 001 then 6 end) aftype,camast.reportdate , camast.description, decode (substr(cf.custodycd ,4,1),'P',2,1) tpye_acc, sb.parvalue, camast.reportdate reportdate1 FROM vw_CASCHD_all CA, AFMAST AF, CFMAST CF, ALLCODE AL, SBSECURITIES SB, ISSUERS ISS, vw_CAMAST_all camast where ca.afacctno = af.acctno and af.custid = cf.custid and cf.country = al.cdval and al.cdname ='COUNTRY' and ca.codeid = sb.codeid and sb.issuerid = iss.issuerid and ca.deltd <>'Y' and (ca.BALANCE + ca.pbalance) > 0 and ca.camastid =camast.camastid and ca.camastid like V_STRCACODE GROUP BY CA.AUTOID, SB.SYMBOL, ISS.FULLNAME , CF.CUSTID, CF.FULLNAME, (case when cf.country = '234' then cf.idcode else cf.tradingcode end) , decode (cf.idtype, 001, 1, 002, 2, 003, 3, 005, 5, 4 ) , al.cdcontent , cf.address, (case when substr(cf.custodycd, 4, 1) = 'C' and af.aftype = 001 then 3 when substr(cf.custodycd, 4, 1) = 'F' and af.aftype = 001 then 4 when (substr(cf.custodycd,4,1) = 'C' and af.aftype <> 001 ) or substr(cf.custodycd,4,1) = 'P' then 5 when substr(cf.custodycd,4,1) ='F' and af.aftype <> 001 then 6 end),camast.reportdate , camast.description, decode (substr(cf.custodycd ,4,1),'P',2,1) , sb.parvalue, camast.reportdate ; EXCEPTION WHEN OTHERS then --plog.error('Report:'||'CA0006:'||SQLERRM|| ':'||dbms_utility.format_error_backtrace); RETURN; END; -- PROCEDURE /
true
e78d30040858f44f5e654fde27dd3c9fa2addb67
SQL
DestinGit/courses-sql
/clients-trigger-beforeInsert.sql
UTF-8
339
2.75
3
[]
no_license
CREATE DEFINER = CURRENT_USER TRIGGER `cours`.`clients_BEFORE_INSERT` BEFORE INSERT ON `clients` FOR EACH ROW BEGIN INSERT INTO historique(nom_table, nom_colonne, operation, nouvelle_valeur) VALUES ('clients', 'nom', 'insert', NEW.nom), ('clients', 'prenom', 'insert', NEW.prenom), ('clients', 'cp', 'insert', NEW.cp); END
true
495e223f60dea14e51c614a5fecf559e56fcb6ca
SQL
nja-006/database
/Nath_DB/SimulateTransaction.sql
UTF-8
3,930
3.140625
3
[]
no_license
USE Liem --DML di bawah ini merupakan Pencatatan data header atas sebuah transaksi yang terjadi transaksi pada supply --Data yang dibutuhkan pada table ini adalah SupplyID, FactoryID, StaffID, dan juga TransactionDate --Syntax INSERT INTO berguna untuk memasukan data ke dalam table INSERT INTO TrHeaderSupply VALUES ('SU001', 'FC001', 'ST000', '2020-01-22'), ('SU002', 'FC002', 'ST001', '2019-02-18'), ('SU003', 'FC003', 'ST002', '2019-03-29'), ('SU004', 'FC004', 'ST003', '2018-04-13'), ('SU005', 'FC005', 'ST004', '2017-05-24'), ('SU006', 'FC006', 'ST005', '2018-06-30'), ('SU007', 'FC007', 'ST006', '2017-07-02'), ('SU008', 'FC008', 'ST007', '2016-08-08'), ('SU009', 'FC009', 'ST008', '2015-09-19'), ('SU010', 'FC010', 'ST009', '2013-10-20'), ('SU011', 'FC001', 'ST000', '2014-11-21'), ('SU012', 'FC002', 'ST001', '2014-12-16'), ('SU013', 'FC003', 'ST002', '2019-01-15'), ('SU014', 'FC004', 'ST003', '2020-02-14'), ('SU015', 'FC005', 'ST004', '2020-03-13') --DML di bawah ini merupakan Pencatatan data header atas sebuah transaksi yang terjadi transaksi pada Distribute --Data yang dibutuhkan pada table ini adalah DistributeID, DistributorID, StaffID, TransactionDate, dan juga DistributionCity --Syntax INSERT INTO berguna untuk memasukan data ke dalam table INSERT INTO TrHeaderDistribute VALUES ('DT001', 'DI001', 'ST000', '2020-01-10', 'Indonesia'), ('DT002', 'DI002', 'ST001', '2019-02-19', 'Thailand'), ('DT003', 'DI003', 'ST002', '2019-03-23', 'Kamboja'), ('DT004', 'DI004', 'ST003', '2018-04-19', 'Myanmar'), ('DT005', 'DI005', 'ST004', '2017-05-30', 'Japan'), ('DT006', 'DI006', 'ST005', '2018-06-20', 'Korea Selatan'), ('DT007', 'DI007', 'ST006', '2017-07-04', 'Korea Utara'), ('DT008', 'DI008', 'ST007', '2016-08-08', 'Arab Saudi'), ('DT009', 'DI009', 'ST008', '2015-09-03', 'Bangladesh'), ('DT010', 'DI010', 'ST009', '2013-10-01', 'Filipina'), ('DT011', 'DI001', 'ST000', '2014-11-22', 'India'), ('DT012', 'DI002', 'ST001', '2014-12-28', 'Malaysia'), ('DT013', 'DI003', 'ST002', '2019-01-30', 'Singapore'), ('DT014', 'DI004', 'ST003', '2020-02-19', 'Nepal'), ('DT015', 'DI005', 'ST004', '2020-03-18', 'Pakistan') --DML di bawah ini merupakan Pencatatan data detail header dari table header suply --Data yang dibutuhkan pada table ini adalah SupplyID, ItemID dan Qty --Syntax INSERT INTO berguna untuk memasukan data ke dalam table INSERT INTO TrDetailSupply VALUES ('SU010', 'IT010', 1), ('SU010', 'IT001', 2), ('SU001', 'IT002', 1), ('SU001', 'IT003', 1), ('SU002', 'IT004', 1), ('SU002', 'IT005', 1), ('SU002', 'IT006', 1), ('SU003', 'IT007', 2), ('SU004', 'IT008', 1), ('SU004', 'IT009', 2), ('SU005', 'IT010', 1), ('SU005', 'IT002', 2), ('SU006', 'IT004', 2), ('SU007', 'IT006', 1), ('SU008', 'IT008', 2), ('SU009', 'IT001', 2), ('SU009', 'IT003', 2), ('SU010', 'IT005', 1), ('SU011', 'IT007', 1), ('SU011', 'IT009', 1), ('SU011', 'IT010', 2), ('SU012', 'IT008', 2), ('SU013', 'IT001', 1), ('SU014', 'IT009', 1), ('SU014', 'IT005', 1) --DML di bawah ini merupakan Pencatatan data detail header dari table header Distribute --Data yang dibutuhkan pada table ini adalah DistributeID, ItemID dan Qty --Syntax INSERT INTO berguna untuk memasukan data ke dalam table INSERT INTO TrDetailDistribute VALUES ('DT001', 'IT002', 1), ('DT001', 'IT001', 1), ('DT002', 'IT005', 3), ('DT002', 'IT004', 2), ('DT002', 'IT001', 1), ('DT003', 'IT008', 1), ('DT003', 'IT006', 1), ('DT003', 'IT009', 2), ('DT003', 'IT003', 1), ('DT004', 'IT007', 3), ('DT004', 'IT006', 2), ('DT004', 'IT005', 2), ('DT005', 'IT004', 4), ('DT005', 'IT003', 4), ('DT005', 'IT002', 2), ('DT005', 'IT007', 2), ('DT005', 'IT001', 1), ('DT006', 'IT009', 1), ('DT007', 'IT001', 2), ('DT007', 'IT006', 1), ('DT008', 'IT004', 3), ('DT008', 'IT010', 1), ('DT010', 'IT010', 3), ('DT010', 'IT001', 2), ('DT010', 'IT002', 1)
true
55d07c050991f2a3fb3c5b3cd096e9b040b20b7f
SQL
es021/cf-app
/ref/field_study.sql
UTF-8
4,420
3.15625
3
[]
no_license
CREATE TABLE `wp_career_fair`.`ref_field_study` ( `ID` INT NOT NULL AUTO_INCREMENT , `val` VARCHAR(700) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL , `category` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL, PRIMARY KEY (`ID`), UNIQUE(`val`,`category`), INDEX (`val`), INDEX (`category`)) ENGINE = InnoDB; -- ############################################################################################### -- ############################################################################################### insert into wp_career_fair.ref_field_study (val, category) VALUES ('Advertising/Media','advertising-media'), ('Agriculture/Aquaculture/Forestry','agriculture-aquaculture-forestry'), ('Architecture','architecture'), ('Art/Design/Creative Multimedia','art-design-creative-multimedia'), ('Biology','biology'), ('Biotechnology','biotechnology'), ('Business Studies/Administration/Management','business-studies-administration-management'), ('Chemistry','chemistry'), ('Commerce','commerce'), ('Computer Science/Information Technology','computer-science-information-technology'), ('Dentistry','dentistry'), ('Economics','economics'), ('Education/Teaching/Training','education-teaching-training'), ('Engineering (Aviation/Aeronautics/Astronautics)','engineering-aviation-aeronautics-astronautics'), ('Engineering (Bioengineering/Biomedical)','engineering-bioengineering-biomedical'), ('Engineering (Chemical)','engineering-chemical'), ('Engineering (Civil)','engineering-civil'), ('Engineering (Computer/Telecommunication)','engineering-computer-telecommunication'), ('Engineering (Electrical/Electronic)','engineering-electrical-electronic'), ('Engineering (Environmental/Health/Safety','engineering-environmental-health-safety'), ('Engineering (Industrial)','engineering-industrial'), ('Engineering (Marine)','engineering-marine'), ('Engineering (Material Science)','engineering-material-science'), ('Engineering (Mechanical)','engineering-mechanical'), ('Engineering (Mechatronic/Electromechanical)','engineering-mechatronic-electromechanical'), ('Engineering (Metal Fabrication/Tool & Die/Welding)','engineering-metal-fabrication-tool-die-welding'), ('Engineering (Mining/Mineral)','engineering-mining-mineral'), ('Engineering (Others)','engineering-others'), ('Engineering (Petroleum/Oil/Gas)','engineering-petroleum-oil-gas'), ('Finance/Accountancy/Banking','finance-accountancy-banking'), ('Food & Beverage Services Management','food-beverage-services-management'), ('Food Technology/Nutrition/Dietetics','food-technology-nutrition-dietetics'), ('Geographical Science','geographical-science'), ('Geology/Geophysics','geology-geophysics'), ('History','history'), ('Hospitality/Tourism/Hotel Management','hospitality-tourism-hotel-management'), ('Human Resource Management','human-resource-management'), ('Humanities/Liberal Arts','humanities-liberal-arts'), ('Journalism','journalism'), ('Law','law'), ('Library Management','library-management'), ('Linguistic/Languages','linguistic-languages'), ('Logistic/Transportation','logistic-transportation'), ('Maritime Studies','maritime-studies'), ('Marketing','marketing'), ('Mass Communications','mass-communications'), ('Mathematics','mathematics'), ('Medical Science','medical-science'), ('Medicine','medicine'), ('Music/Performing Arts Studies','music-performing-arts-studies'), ('Nursing','nursing'), ('Optometry','optometry'), ('Personal Services','personal-services'), ('Pharmacy/Pharmacology','pharmacy-pharmacology'), ('Philosophy','philosophy'), ('Physical Therapy/Physiotherapy','physical-therapy-physiotherapy'), ('Physics','physics'), ('Political Science','political-science'), ('Property Development/Real Estate Management','property-development-real-estate-management'), ('Protective Services & Management','protective-services-management'), ('Psychology','psychology'), ('Quantity Survey','quantity-survey'), ('Science & Technology','science-technology'), ('Secretarial','secretarial'), ('Social Science/Sociology','social-science-sociology'), ('Sports Science & Management','sports-science-management'), ('Textile/Fashion Design','textile-fashion-design'), ('Urban Studies/Town Planning','urban-studies-town-planning'), ('Veterinary','veterinary'), ('Others','others');
true
6b1968d3d9b8cb037776a6a9f81b5c5b21a9ae22
SQL
rudiedirkx/11nk5
/secret_tags.sql
UTF-8
247
4.03125
4
[]
no_license
select t.*, (select count(1) from l_links where tag_id = t.id) links, (select count(1) from l_links l1 join l_links l2 on l2.url_id = l1.url_id where l1.tag_id = t.id) xlinks from l_tags t having links > 1 and links = xlinks order by t.tag asc
true
f73640fd54a57591f5a0d2e8b47afa04f642af43
SQL
johndspence/holbertonschool_higher_level_programming
/mysql_scripts_and_python_integration/0-main.sql
UTF-8
682
4.0625
4
[]
no_license
# Queries below as specified in project 169 \! echo "\nList of all tables?" show tables; \! echo "\nDisplay the table structure of TVShow, Genre and TVShowGenre?" SHOW CREATE TABLE TVShow; SHOW CREATE TABLE Genre; SHOW CREATE TABLE TVShowGenre; \! echo "\nList of TVShows, only id and name ordered by name (A-Z)?" SELECT TVShow.id, TVShow.name from TVShow ORDER BY TVShow.name; \! echo "\nList of Genres, only id and name ordered by name (Z-A)?" SELECT Genre.id, Genre.name from Genre ORDER BY name DESC; \! echo "\nList of Network, only id and name?" SELECT Network.id, Network.name from Network; \! echo "\nNumber of episodes in the database?" SELECT count(id) from Episode;
true
431b68cfdb4cd31009ee908073f8b3694cded5c7
SQL
leohill33/taxi
/0.数据清洗/cleansing.sql
UTF-8
691
3.765625
4
[]
no_license
#建表 create external table track (name STRING, time STRING, jd DOUBLE, wd DOUBLE, status INT, v DOUBLE, angle INT, dist DOUBLE) row format delimited fields terminated by ',' lines terminated by '\n' stored as textfile LOCATION 'hdfs://localhost:9000/input/track'; #除异常值 insert overwrite table track select * from track where (name is not null and name != 'name') and (time is not null) and (jd < 117.23 and jd > 109.5) and (wd < 25.6 and wd > 20.23) and (status is not null and (status = 0 or status = 1)) and (0 < v and v < 120 and v is not null and v != 0) ; select name, jd, wd from track where (jd > 117.23 and jd < 109.5) and (wd > 25.6 and wd < 20.23) ;
true
b63b6e9ce0c0825ef2c13fa7f1517b76cb123260
SQL
anupamgodse/DBMS_COEP_Class_of_2018
/Assignments/111408016SQL3.sql
UTF-8
4,862
4.375
4
[]
no_license
/* Each offering of a course (i.e. a section) can have many Teaching assistants; each teaching assistant is a student. Extend the existing schema(Add/Alter tables) to accommodate this requirement. */ drop table assistant; create table assistant ( ID varchar(5), course_id varchar(8), sec_id varchar(8), semester varchar(6), year numeric(4,0), primary key (ID, course_id, sec_id, semester, year), foreign key (ID) references student (ID) on delete cascade, foreign key (course_id, sec_id, semester, year) references section (course_id, sec_id, semester, year) on delete cascade ); /* Adding tuples to assistant relation */ delete from assistant; insert into assistant values ('00128', 'BIO-101', '1', 'Summer', '2009'); insert into assistant values ('12345', 'BIO-101', '1', 'Summer', '2009'); insert into assistant values ('12345', 'CS-347', '1', 'Fall', '2009'); insert into assistant values ('19991', 'FIN-201', '1', 'Spring', '2010'); /* According to the existing schema, one student can have only one advisor. Alter the schema to allow a student to have multiple advisors and make sure that you are able to insert multiple advisors for a student. */ alter table advisor drop foreign key advisor_ibfk_1; alter table advisor drop foreign key advisor_ibfk_2; alter table advisor drop primary key, add primary key (s_ID, i_ID); alter table advisor add foreign key (s_ID) references student (ID) on delete cascade; alter table advisor add foreign key (i_ID) references instructor (ID) on delete cascade; /* Insert in advisor */ insert into advisor values ('12345', '45565'); insert into advisor values ('12345', '76543'); insert into advisor values ('12345', '98345'); insert into advisor values ('00128', '10101'); insert into advisor values ('00128', '12121'); insert into advisor values ('55739', '76543'); /* Write SQL queries on the modified schema. You will need to insert data to ensure the query results are not empty. */ /* Find all students who have more than 3 advisors */ select name, ID from student join (select s_id, count(i_id) as cnt from advisor group by s_id having cnt > 3) as x on student.ID = s_id ; /* OUTPUT:- +---------+-------+ | name | ID | +---------+-------+ | Shankar | 12345 | +---------+-------+ 1 row in set (0.01 sec) */ /* Find all students who are co-advised by Prof. Srinivas and Prof. Ashok. */ /* inserting Ashok into instructor */ insert into instructor values ('54321', 'Ashok', 'Finance', '80000'); /* inserting into advisor students under Ashok */ insert into advisor values ('00128', '54321'); insert into advisor values ('55739', '54321'); /* Query */ select name, ID from student join (select distinct a1.s_id from advisor as a1 join advisor as a2 on a1.s_id = a2.s_id where a1.i_id = (select id from instructor where name = 'Srinivasan') and a2.i_id = (select id from instructor where name = 'Ashok')) as x on student.id = x.s_id ; /* OUTPUT:- +-------+-------+ | name | ID | +-------+-------+ | Zhang | 00128 | +-------+-------+ 1 row in set (0.00 sec) */ /* Find students advised by instructors from different departments. etc. */ drop view v; create view v as (select distinct ID, s_ID, dept_name from advisor join instructor on ID = i_ID); select distinct student.ID, name from student join v on student.ID = s_ID where student.dept_name != v.dept_name ; /* OUTPUT:- +-------+---------+ | ID | name | +-------+---------+ | 00128 | Zhang | | 55739 | Sanchez | | 12345 | Shankar | +-------+---------+ 3 rows in set (0.00 sec) */ /* Delete all information in the database which is more than 10 years old. Add data as necessary to verify your query. */ /* Adding neccesary entries */ insert into section values ('BIO-301', '1', 'Summer', '2005', 'Painter', '514', 'A'); insert into section values ('CS-190', '1', 'Fall', '2004', 'Packard', '101', 'H'); insert into teaches values ('83821', 'CS-190', '1', 'Fall', '2004'); insert into teaches values ('98345', 'BIO-301', '1', 'Summer', '2005'); insert into takes values ('00128', 'CS-190', '1', 'Fall', '2004', 'A'); insert into takes values ('12345', 'BIO-301', '1', 'Summer', '2005', 'A-'); delete from section where year < YEAR(CURDATE()) - 10; /* Delete the course CS 101.  Any course which has CS 101 as a prereq should remove CS 101 from its prereq set.  Create a cascade constraint to enforce the above rule, and verify that it is working. Cascade constraint for above rule is created in "a3DDL.sql" */ alter table prereq drop foreign key prereq_ibfk_2; alter table prereq add foreign key (prereq_id) references course (course_id) on delete cascade; delete from course where course_id = 'CS-101';
true
7368aa0e66699e28ee38aec4c530cd2b4cf59158
SQL
zzxtz007/ssm_simple_demo
/src/main/resources/sql/sql_init.sql
UTF-8
497
3.703125
4
[]
no_license
#学生表 student # 学生 id #学生姓名 name CREATE TABLE student ( id INT(10) PRIMARY KEY AUTO_INCREMENT, name VARCHAR(64) NOT NULL ); # 学生成绩表 # 成绩id id # 学生id student_id # 科目名 lesson # 成绩 score CREATE TABLE score ( id INT(10) PRIMARY KEY AUTO_INCREMENT, student_id INT(10) NOT NULL , lesson VARCHAR(64) NOT NULL , score FLOAT NOT NULL, CONSTRAINT score_student_fk_consultant FOREIGN KEY (student_id) REFERENCES student (id) ON UPDATE CASCADE );
true
b11dea74aebe154fa196b826b8571ab8e8a14588
SQL
andyzhaozhao/securityclass
/securityday2/src/main/resources/data.sql
UTF-8
1,442
2.671875
3
[]
no_license
-- INSERT INTO `users` VALUES ('admin', '$2a$10$vLSbLoHEsnjqlHVe8pv24ec11Qr/Qi.RfY7DiBE/cGfu1sdwbOQ82', '1'), ('user', '$2a$10$vLSbLoHEsnjqlHVe8pv24ec11Qr/Qi.RfY7DiBE/cGfu1sdwbOQ82', '1'); -- INSERT INTO `authorities` VALUES ('admin', 'ROLE_ADMIN'), ('user', 'ROLE_USER'); -- insert into user_info (password, roles, username, uid) values ('$2a$10$vLSbLoHEsnjqlHVe8pv24ec11Qr/Qi.RfY7DiBE/cGfu1sdwbOQ82', 'ROLE_ADMIN', 'admin', '1') -- insert into user_info (password, roles, username, uid) values ('$2a$10$vLSbLoHEsnjqlHVe8pv24ec11Qr/Qi.RfY7DiBE/cGfu1sdwbOQ82', 'ROLE_USER', 'user', '2') -- 初始化role insert into role (name, description,rid) values ('ROLE_ADMIN', '管理员','1') insert into role (name, description,rid) values ('ROLE_USER', '普通用户','2') -- 初始化user insert into user_info (password, username, uid) values ('$2a$10$vLSbLoHEsnjqlHVe8pv24ec11Qr/Qi.RfY7DiBE/cGfu1sdwbOQ82', 'admin', '1') insert into user_info (password, username, uid) values ('$2a$10$vLSbLoHEsnjqlHVe8pv24ec11Qr/Qi.RfY7DiBE/cGfu1sdwbOQ82', 'user', '2') insert into user_info (password, username, uid) values ('$2a$10$vLSbLoHEsnjqlHVe8pv24ec11Qr/Qi.RfY7DiBE/cGfu1sdwbOQ82', 'user2', '3') -- insert into user_info (password, username, uid) values (MD5('1'), 'user2', '3') -- 给User配置Role insert into user_role (rid, uid) values ('1','1') insert into user_role (rid, uid) values ('2','2') insert into user_role (rid, uid) values ('2','3')
true
f7912334f7272bdc564156c0bb05e386c09f810d
SQL
tanvipenumudy/Competitive-Programming-Solutions
/HackerRank/Sql/type_of_triangle.sql
UTF-8
822
4.21875
4
[ "MIT" ]
permissive
-- Write a query identifying the type of each record in the TRIANGLES table using its three side lengths. -- Output one of the following statements for each record in the table: -- Equilateral: It's a triangle with 3 sides of equal length. -- Isosceles: It's a triangle with 2 sides of equal length. -- Scalene: It's a triangle with 3 sides of differing lengths. -- Not A Triangle: The given values of A, B, and C don't form a triangle. SELECT CASE WHEN A+B > C AND B+C > A AND A+C > B THEN CASE WHEN A = B AND B = C THEN 'Equilateral' WHEN A = B OR B = C OR C = A THEN 'Isosceles' WHEN A != B AND B != C AND C != A THEN 'Scalene' END ELSE 'Not A Triangle' END FROM TRIANGLES; -- Sample Output -- Isosceles -- Equilateral -- Scalene -- Not A Triangle
true
7d55b8ec6249399c8852c0a850f547d35634508c
SQL
codeauslander/actualize-class
/sql/employees.sql
UTF-8
2,493
4.0625
4
[]
no_license
-- select * from employees; -- Get all info about employees whose last names begin with “Z”. -- select * from employees where last_name ilike 'z%'; -- Get the first name and last name of employees whose last names begin with “Mi”. -- select first_name, last_name from employees where first_name ilike 'Mi%' and last_name ilike 'Mi%'; -- select first_name, last_name from employees where left(last_name,2) = 'Mi'; -- select first_name, last_name from employees where substr(last_name,1,3) = 'Mi'; -- select first_name, last_name from employees where last_name >= 'Mi' and last_name < 'Mj'; -- select first_name, last_name from employees where last_name ~ '^Mi'; -- Get first name, last name, and birthday of 5 oldest employees. -- select first_name, last_name, birth_date from employees order by birth_date desc limit 5; -- Get all info about the 5 most recent hires. -- select * from employees order by hire_date desc limit 5; -- Get all info about 5 most recent female hires. -- select * from employees where gender = 'F' order by hire_date desc limit 5; -- Bonus: Get all the info on all employees whose first name is Mario or Luigi. -- select * from employees where first_name ilike 'Mario' or first_name ilike 'Luigi' -- Bonus: Get only the first and last name of employees without the the last name “Aingworth.” -- select first_name, last_name from employees where last_name not like 'Aingworth' -- select first_name, last_name from employees where not last_name = 'Aingworth' -- select first_name, last_name from employees where last_name <> 'Aingworth' -- select first_name, last_name from employees where last_name != 'Aingworth' -- Bonus: Get all the info on employees whose first name is Arif, but only those hired between 1988 and 1992. -- select * from employees where first_name = 'Arif' and hire_date between '1988-01-01' and '1992-12-31'; -- select * from employees where first_name = 'Arif' and hire_date >= '1989-01-01' and hire_date < '1992-01-01'; -- Bonus: How many employees were making over $100,000 a year on June 24, 1992? Return only a number. -- select count(*) from salaries where salary > 100000 and '1992-06-24' between from_date and to_date; -- select count(*) from salaries where salary > 100000 and from_date <= '1992-06-24' and to_date >= '1992-06-24'; -- Bonus: Repeat exercise #2 without using the LIKE keyword. -- Uber bonus: Research how to do a case-insensitive search in postgres and try it out in Postico
true
a1815300c082716020c8378b7e7c06119b7998e1
SQL
hialstkd/sql-challenge
/table_schemata.sql
UTF-8
1,000
3.671875
4
[]
no_license
Create Table departments( dept_no VARCHAR(30) NOT NULL, dept_name VARCHAR(30) NOT NULL, primary key(dept_no) ); Create Table dept_emp( emp_no int, dept_no VARCHAR(30) NOT NULL, Foreign Key (dept_no) references departments(dept_no), Foreign Key (emp_no) references employees(emp_no) ); Create Table dept_manager( dept_no VARCHAR(30) NOT NULL, emp_no int, Foreign Key (dept_no) references departments(dept_no), Foreign Key (emp_no) references employees(emp_no) ); Create Table employees( emp_no int, emp_title_id VARCHAR(30) NOT NULL, birth_date VARCHAR NOT NULL, first_name VARCHAR(30) NOT NULL, last_name VARCHAR(30) NOT NULL, sex VARCHAR(30) NOT NULL, hire_date VARCHAR NOT NULL, primary key (emp_no), Foreign Key (emp_title_id) references titles(title_id) ); Create Table salaries( emp_no int, salary int, foreign key (emp_no) references employees(emp_no) ); Create Table titles( title_id VARCHAR(30) NOT NULL, title VARCHAR(30) NOT NULL, primary key (title_id) );
true
5cfc6651ecf71df5478123f824e1b7cd1399da82
SQL
diogo-barradas/PSI18H_M16_2218089_DiogoBarradas
/scriptsbd/PSI18H_M16_2218089_DiogoBarradas.sql
UTF-8
4,062
2.71875
3
[]
no_license
create database psi18h_m16_2218089_diogobarradas; CREATE SCHEMA `psi18h_m16_2218089_diogobarradas`; use psi18h_m16_2218089_diogobarradas; CREATE TABLE `psi18h_m16_2218089_diogobarradas`.`registo` ( `ID` INT NOT NULL AUTO_INCREMENT, `Username` VARCHAR(50) NOT NULL, `PIN` VARCHAR(4) NOT NULL, `Idade` INT NOT NULL, `Email` VARCHAR(50) NOT NULL, `Morada` VARCHAR(70) NOT NULL, PRIMARY KEY (`ID`)); ALTER TABLE registo ADD UNIQUE (Email); ALTER TABLE registo ADD UNIQUE (Username); ALTER TABLE `psi18h_m16_2218089_diogobarradas`.`registo` ADD COLUMN `Saldo` DOUBLE NULL AFTER `Morada`; INSERT INTO `psi18h_m16_2218089_diogobarradas`.`registo` (`ID`, `Username`, `PIN`, `Idade`, `Email`, `Morada`) VALUES ('1', 'Admin', '1234', '50', 'admin@gmail.com', 'Santo Antonio dos Cavaleiros'); UPDATE `psi18h_m16_2218089_diogobarradas`.`registo` SET `Saldo` = '0' WHERE (`ID` = '1'); INSERT INTO `psi18h_m16_2218089_diogobarradas`.`registo` (`ID`, `Username`, `PIN`, `Idade`, `Email`, `Morada`) VALUES ('2', 'Diogo Barradas', '1234', '18', 'diogobarradas1@gmail.com', 'Santo Antonio dos Cavaleiros'); UPDATE `psi18h_m16_2218089_diogobarradas`.`registo` SET `Saldo` = '0' WHERE (`ID` = '2'); INSERT INTO `psi18h_m16_2218089_diogobarradas`.`registo` (`ID`, `Username`, `PIN`, `Idade`, `Email`, `Morada`) VALUES ('3', 'Andre Costa', '1234', '19', 'kpop@gmail.com', 'Arroja Odivelas'); UPDATE `psi18h_m16_2218089_diogobarradas`.`registo` SET `Saldo` = '0' WHERE (`ID` = '3'); INSERT INTO `psi18h_m16_2218089_diogobarradas`.`registo` (`ID`, `Username`, `PIN`, `Idade`, `Email`, `Morada`) VALUES ('4', 'Antonio Varandas', '1234', '70', 'antonio@yahoo.com', 'Alameda'); UPDATE `psi18h_m16_2218089_diogobarradas`.`registo` SET `Saldo` = '0' WHERE (`ID` = '4'); INSERT INTO `psi18h_m16_2218089_diogobarradas`.`registo` (`ID`, `Username`, `PIN`, `Idade`, `Email`, `Morada`) VALUES ('5', 'Bruno Carvalho', '1a2b', '45', 'brunocarva@sapo.pt', 'Belas Sintra'); UPDATE `psi18h_m16_2218089_diogobarradas`.`registo` SET `Saldo` = '0' WHERE (`ID` = '5'); INSERT INTO `psi18h_m16_2218089_diogobarradas`.`registo` (`ID`, `Username`, `PIN`, `Idade`, `Email`, `Morada`) VALUES ('6', 'Igor Franscisco', 'abcd', '30', 'Monkey@hotmail.com', 'Quinta do Conde'); UPDATE `psi18h_m16_2218089_diogobarradas`.`registo` SET `Saldo` = '0' WHERE (`ID` = '6'); INSERT INTO `psi18h_m16_2218089_diogobarradas`.`registo` (`ID`, `Username`, `PIN`, `Idade`, `Email`, `Morada`) VALUES ('7', 'Daniel Adrião', '1234', '25', 'danieladriao@gmail.com', 'Benfica Lisboa'); UPDATE `psi18h_m16_2218089_diogobarradas`.`registo` SET `Saldo` = '0' WHERE (`ID` = '7'); INSERT INTO `psi18h_m16_2218089_diogobarradas`.`registo` (`ID`, `Username`, `PIN`, `Idade`, `Email`, `Morada`) VALUES ('8', 'Afonso Macedo', '1234', '20', 'afonso@bing.com', 'Margem Sul'); UPDATE `psi18h_m16_2218089_diogobarradas`.`registo` SET `Saldo` = '0' WHERE (`ID` = '8'); CREATE TABLE `psi18h_m16_2218089_diogobarradas`.`depositos` ( `idDepositos` INT NOT NULL AUTO_INCREMENT, `Descriçao` VARCHAR(60) NOT NULL, `Hora` VARCHAR(5) NOT NULL, `Valor` DOUBLE NOT NULL, `ID` INT, PRIMARY KEY (`idDepositos`), foreign key (ID) references registo (ID) ); CREATE TABLE `psi18h_m16_2218089_diogobarradas`.`levantamentos` ( `idLevantamentos` INT NOT NULL AUTO_INCREMENT, `Descriçao` VARCHAR(60) NOT NULL, `Hora` VARCHAR(5) NOT NULL, `Valor` DOUBLE NOT NULL, `ID` INT, PRIMARY KEY (`idLevantamentos`), foreign key (ID) references registo (ID) ); CREATE TABLE `psi18h_m16_2218089_diogobarradas`.`transferencias` ( `idTransferencias` INT NOT NULL AUTO_INCREMENT, `Descriçao` VARCHAR(60) NOT NULL, `Hora` VARCHAR(5) NOT NULL, `Valor` DOUBLE NOT NULL, `idDestinatario` INT NOT NULL, `idRemetente` INT NOT NULL, `ID` INT, PRIMARY KEY (`idTransferencias`), foreign key (ID) references registo (ID) ); ALTER TABLE `psi18h_m16_2218089_diogobarradas`.`transferencias` DROP COLUMN `idRemetente`; SELECT * FROM registo; SELECT * FROM depositos; SELECT * FROM levantamentos; SELECT * FROM transferencias; /* drop table registo; drop table depositos; drop table levantamentos; drop table transferencias; */
true
8f6a8d9acb020f374c64e52ae4ada0bc2debf4f4
SQL
yying1/For-class-2-15
/InClass-06.sql
UTF-8
1,866
4.625
5
[]
no_license
use AdventureWorks2012; /*Activity 1. Using the HumanResource.Employee table, provide a count of the number of employees by job title. The query should consider only current employees (the CurrentFlag must equal 1). */ select jobtitle, count (BusinessEntityID) as number_of_employee from HumanResources.Employee Where currentflag = 1 Group by jobtitle; /*Activity 2. Modify the query you created in Activity 1 so that the output shows only those job titles for which there is more than 1 employee. */ select jobtitle, count (BusinessEntityID) as number_of_employee from HumanResources.Employee Where currentflag = 1 Group by jobtitle having count(businessentityid) >1 order by count(businessentityid) desc; /*Activity 3. For each product, show its ProductID and Name (FROM the ProductionProduct table) and the location of its inventory (FROM the Product.Location table) and amount of inventory held at that location (FROM the Production.ProductInventory table).*/ Select P.ProductID, P.Name as Productname, L.Name as Locationame, I.quantity as Amount FROM Production.product as P left outer join Production.ProductInventory as I on P.ProductID = I.ProductID Left outer join Production.location as L on I.LocationID = L.LocationID order by p.ProductID asc; /*Activity 4. Find the product model IDs that have no product associated with them. To do this, first do an outer join between the Production.Product table and the Production.ProductModel table in such a way that the ID FROM the ProductModel table always shows, even if there is no product associate with it. Then, add a WHERE clause to specify that the ProductID IS NULL */ Select PM.productmodelID, p.productid as ProductIDStatus from production.productmodel as pm left outer join production.product as p on pm.name = p.name where p.productid is Null Order by pm.ProductModelID asc;
true
15aa5c56562f9b0b6c1c5f2850e18276ce1ed1b8
SQL
GuilhermeS94/desafio-dock
/desafio-db/script-db.sql
UTF-8
1,411
3.75
4
[]
no_license
create database desafiodockdb; use desafiodockdb; /* Primeiro a tabela que nao depende de nenhum relacionamento */ create table Pessoas( IdPessoa INT PRIMARY KEY IDENTITY(1,1), Nome VARCHAR(100) NOT NULL, Cpf VARCHAR(11) NOT NULL, DataNascimento DATE NOT NULL ); /* Conta vinculada a uma pessoa */ create table Contas( IdConta INT PRIMARY KEY IDENTITY(1,1), IdPessoa INT NOT NULL FOREIGN KEY REFERENCES Pessoas, Saldo DECIMAL(10, 2) NOT NULL DEFAULT 0, LimiteSaqueDiario DECIMAL(10, 2) NOT NULL, FlagAtivo BIT NOT NULL, TipoConta INT NOT NULL, DataCriacao DATE NOT NULL DEFAULT GETDATE() ); /* Transacao vinculada a uma conta */ create table Transacoes( IdTransacao INT PRIMARY KEY IDENTITY(1,1), IdConta INT NOT NULL FOREIGN KEY REFERENCES Contas, Valor DECIMAL(10, 2) NOT NULL, DataExecucao DATE NOT NULL ); /* Alimentando a tabela de Pessoas */ INSERT INTO Pessoas(Nome, Cpf, DataNascimento)VALUES ('Pessoa 1', '12345678910', '1994-07-14'), ('Pessoa 2', '09876543201', '1985-07-22'), ('Pessoa 3', '12309846529', '1962-11-13'), ('Pessoa 4', '98712364592', '1920-02-28'); /* Alimentando a tabela de Contas */ INSERT INTO Contas(IdPessoa, Saldo, LimiteSaqueDiario, FlagAtivo, TipoConta, DataCriacao) VALUES (1, 3000, 400, 1, 1, GETDATE()), (2, 1000000, 2000, 1, 1, GETDATE()), (3, 700, 1500, 0, 1, GETDATE()), (4, 5789.23, 600, 1, 2, GETDATE());
true
8d89b69f2b452c6d6c280f97d16d90349b909412
SQL
herohoy/usrit
/usrit-api/src/main/resources/sql/temp.sql
UTF-8
963
3.015625
3
[]
no_license
select * from user; insert into user values( 1000000001 ,'lh' ,'today36524' ,'13344556677' ,'abc@123.com' ,'123456789' ,0 ,1 ,sysdate() ,2000000001 ,CURRENT_TIMESTAMP ,2000000001 ,''); insert into user ( user_name ,password ,telephone ,email ,qq ,integral ,created_at ,created_by ,updated_at ,updated_by ,remark ) values ( 'lh' ,'today36524' ,'13344445566' ,'abc@123.com' ,'123456789' ,0 ,CURRENT_TIMESTAMP ,2000000001 ,CURRENT_TIMESTAMP ,2000000001 ,'' ); insert into integral_journal ( user_id, integral_type, integral_price, integral_source, integral, created_at, created_by, updated_at, updated_by, remark ) select id as user_id ,1 as integral_type ,0 as integral_price ,1 as integral_source ,0 as integral ,CURRENT_TIMESTAMP as created_at ,2000000001 as created_by ,CURRENT_TIMESTAMP as updated_at ,2000000001 as updated_by ,'' as remark from user where telephone='13345678901';
true
729882cebb9a4e1855ad579a13897457a6e5dfb9
SQL
rifkiharbiawali/online-book-store
/bb.sql
UTF-8
705
2.75
3
[]
no_license
/* SQLyog Community MySQL - 10.4.14-MariaDB ********************************************************************* */ /*!40101 SET NAMES utf8 */; create table `bb` ( `id` bigint (20), `created` datetime , `created_by` varchar (765), `last_modified` datetime , `last_modified_by` varchar (765), `count` varchar (765), `basket_id` bigint (20), `book_id` bigint (20) ); insert into `bb` (`id`, `created`, `created_by`, `last_modified`, `last_modified_by`, `count`, `basket_id`, `book_id`) values('1',NULL,NULL,NULL,NULL,'5','1','2'); insert into `bb` (`id`, `created`, `created_by`, `last_modified`, `last_modified_by`, `count`, `basket_id`, `book_id`) values('2',NULL,NULL,NULL,NULL,'3','2','1');
true
b6cb67bc3691996a293a0a89d97a0a8e7d435665
SQL
DanielMuthupandi/FAST
/FAST/vsql/NETSUITE/NS_Cost_Center_Segment_Mapper_bkp.sql
UTF-8
5,877
3.6875
4
[]
no_license
/**** ****Script Name : NS_Cost_Center_Segment_Mapper.sql ****Description : Incremental data load for NS_Cost_Center_Segment_Mapper ****/ /* Setting timing on**/ \timing /**SET SESSION AUTOCOMMIT TO OFF;**/ \set ON_ERROR_STOP on CREATE LOCAL TEMP TABLE Start_Time_Tmp ON COMMIT PRESERVE ROWS AS select count(*) count, sysdate st from "swt_rpt_stg"."NS_Cost_Center_Segment_Mapper"; /* Inserting values into Audit table */ INSERT INTO swt_rpt_stg.FAST_LD_AUDT ( SUBJECT_AREA ,TBL_NM ,LD_DT ,START_DT_TIME ,END_DT_TIME ,SRC_REC_CNT ,TGT_REC_CNT ,COMPLTN_STAT ) select 'NETSUITE','NS_Cost_Center_Segment_Mapper',sysdate::date,sysdate,null,(select count from Start_Time_Tmp) ,null,'N'; Commit; CREATE LOCAL TEMP TABLE NS_Cost_Center_Segment_Mapper_stg_Tmp ON COMMIT PRESERVE ROWS AS ( SELECT DISTINCT * FROM swt_rpt_stg.NS_Cost_Center_Segment_Mapper) SEGMENTED BY HASH(cost_center_segment_mapper_id,last_modified_date) ALL NODES; INSERT /*+DIRECT*/ INTO "swt_rpt_stg".NS_Cost_Center_Segment_Mapper_Hist SELECT * from "swt_rpt_stg".NS_Cost_Center_Segment_Mapper; COMMIT; TRUNCATE TABLE swt_rpt_stg.NS_Cost_Center_Segment_Mapper; CREATE LOCAL TEMP TABLE NS_Cost_Center_Segment_Mapper_base_Tmp ON COMMIT PRESERVE ROWS AS ( SELECT DISTINCT cost_center_segment_mapper_id,last_modified_date FROM swt_rpt_base.NS_Cost_Center_Segment_Mapper) SEGMENTED BY HASH(cost_center_segment_mapper_id,last_modified_date) ALL NODES; CREATE LOCAL TEMP TABLE NS_Cost_Center_Segment_Mapper_stg_Tmp_Key ON COMMIT PRESERVE ROWS AS ( SELECT cost_center_segment_mapper_id, max(last_modified_date) as last_modified_date FROM NS_Cost_Center_Segment_Mapper_stg_Tmp group by cost_center_segment_mapper_id) SEGMENTED BY HASH(cost_center_segment_mapper_id,last_modified_date) ALL NODES; /* Inserting Stage table data into Historical Table */ insert /*+DIRECT*/ into swt_rpt_stg.NS_Cost_Center_Segment_Mapper_Hist ( business_area_id ,cost_center_segment_mapper_ext ,cost_center_segment_mapper_id ,date_created ,hpe_functional_area_id ,hpe_profit_center_id ,is_inactive ,last_modified_date ,lcci_id ,legacy_cost_center ,mru_id ,parent_id ,subsidiary_id ,LD_DT ,SWT_INS_DT ,d_source ) select business_area_id ,cost_center_segment_mapper_ext ,cost_center_segment_mapper_id ,date_created ,hpe_functional_area_id ,hpe_profit_center_id ,is_inactive ,last_modified_date ,lcci_id ,legacy_cost_center ,mru_id ,parent_id ,subsidiary_id ,SYSDATE AS LD_DT ,SWT_INS_DT ,'base' FROM "swt_rpt_base".NS_Cost_Center_Segment_Mapper WHERE cost_center_segment_mapper_id in (SELECT STG.cost_center_segment_mapper_id FROM NS_Cost_Center_Segment_Mapper_stg_Tmp_Key STG JOIN NS_Cost_Center_Segment_Mapper_base_Tmp ON STG.cost_center_segment_mapper_id = NS_Cost_Center_Segment_Mapper_base_Tmp.cost_center_segment_mapper_id AND STG.last_modified_date >= NS_Cost_Center_Segment_Mapper_base_Tmp.last_modified_date); /* Deleting before seven days data from current date in the Historical Table */ delete /*+DIRECT*/ from "swt_rpt_stg"."NS_Cost_Center_Segment_Mapper_Hist" where LD_DT::date <= TIMESTAMPADD(DAY,-7,sysdate)::date; /* Incremental VSQL script for loading data from Stage to Base */ DELETE /*+DIRECT*/ FROM "swt_rpt_base".NS_Cost_Center_Segment_Mapper WHERE cost_center_segment_mapper_id in (SELECT STG.cost_center_segment_mapper_id FROM NS_Cost_Center_Segment_Mapper_stg_Tmp_Key STG JOIN NS_Cost_Center_Segment_Mapper_base_Tmp ON STG.cost_center_segment_mapper_id = NS_Cost_Center_Segment_Mapper_base_Tmp.cost_center_segment_mapper_id AND STG.last_modified_date >= NS_Cost_Center_Segment_Mapper_base_Tmp.last_modified_date); INSERT /*+DIRECT*/ INTO "swt_rpt_base".NS_Cost_Center_Segment_Mapper ( business_area_id ,cost_center_segment_mapper_ext ,cost_center_segment_mapper_id ,date_created ,hpe_functional_area_id ,hpe_profit_center_id ,is_inactive ,last_modified_date ,lcci_id ,legacy_cost_center ,mru_id ,parent_id ,subsidiary_id ,SWT_INS_DT ) SELECT DISTINCT business_area_id ,cost_center_segment_mapper_ext ,NS_Cost_Center_Segment_Mapper_stg_Tmp.cost_center_segment_mapper_id ,date_created ,hpe_functional_area_id ,hpe_profit_center_id ,is_inactive ,NS_Cost_Center_Segment_Mapper_stg_Tmp.last_modified_date ,lcci_id ,legacy_cost_center ,mru_id ,parent_id ,subsidiary_id ,SYSDATE AS SWT_INS_DT FROM NS_Cost_Center_Segment_Mapper_stg_Tmp JOIN NS_Cost_Center_Segment_Mapper_stg_Tmp_Key ON NS_Cost_Center_Segment_Mapper_stg_Tmp.cost_center_segment_mapper_id= NS_Cost_Center_Segment_Mapper_stg_Tmp_Key.cost_center_segment_mapper_id AND NS_Cost_Center_Segment_Mapper_stg_Tmp.last_modified_date=NS_Cost_Center_Segment_Mapper_stg_Tmp_Key.last_modified_date WHERE NOT EXISTS (SELECT 1 FROM "swt_rpt_base".NS_Cost_Center_Segment_Mapper BASE WHERE NS_Cost_Center_Segment_Mapper_stg_Tmp.cost_center_segment_mapper_id = BASE.cost_center_segment_mapper_id); /* Deleting partial audit entry */ DELETE FROM swt_rpt_stg.FAST_LD_AUDT where SUBJECT_AREA = 'NETSUITE' and TBL_NM = 'NS_Cost_Center_Segment_Mapper' and COMPLTN_STAT = 'N' and LD_DT=sysdate::date and SEQ_ID = (select max(SEQ_ID) from swt_rpt_stg.FAST_LD_AUDT where SUBJECT_AREA = 'NETSUITE' and TBL_NM = 'NS_Cost_Center_Segment_Mapper' and COMPLTN_STAT = 'N'); /* Inserting new audit entry with all stats */ INSERT INTO swt_rpt_stg.FAST_LD_AUDT ( SUBJECT_AREA ,TBL_NM ,LD_DT ,START_DT_TIME ,END_DT_TIME ,SRC_REC_CNT ,TGT_REC_CNT ,COMPLTN_STAT ) select 'NETSUITE','NS_Cost_Center_Segment_Mapper',sysdate::date,(select st from Start_Time_Tmp),sysdate,(select count from Start_Time_Tmp) ,(select count(*) from swt_rpt_base.NS_Cost_Center_Segment_Mapper where SWT_INS_DT::date = sysdate::date),'Y'; Commit; SELECT DO_TM_TASK('mergeout', 'swt_rpt_base.NS_Cost_Center_Segment_Mapper'); SELECT DO_TM_TASK('mergeout', 'swt_rpt_stg.NS_Cost_Center_Segment_Mapper_Hist'); select ANALYZE_STATISTICS('swt_rpt_base.NS_Cost_Center_Segment_Mapper');
true
9c4dc94c7666145dc9edbb8412ccf9407d1004e3
SQL
Orbisnetworkadmin/orbis-grcmanager
/resources/migrations/00000000000103-password_history.up.sql
UTF-8
698
2.625
3
[ "MIT" ]
permissive
CREATE TABLE password_history ( id_password_history BIGSERIAL NOT NULL PRIMARY KEY, user_id BIGINT NOT NULL REFERENCES users (user_id), change_password_history TIMESTAMP NOT NULL DEFAULT (now() AT TIME ZONE 'utc'), password_password_history TEXT ); --;; -- create a system account for which the stock entries will be created / crea una cuenta del sistema por defecto -- INSERT INTO users (screenname, email, admin, is_active, last_login, pass) -- VALUES ('admin', 'administrador@orbisnetwork.com.ve', TRUE, TRUE, (select now() at time zone 'utc'), 'bcrypt+sha512$86186fc28f83b3e3db78bcf8350a3a57$12$8f215420e68fd7922561167b07354f05d8db6d49e212689e');
true
133c9e32de2ee42dc6711a155266de8fc81f256d
SQL
doc333/monannonce
/monannonce.sql
UTF-8
8,358
3.46875
3
[ "MIT", "BSD-3-Clause" ]
permissive
-- MySQL Script generated by MySQL Workbench -- Mon Nov 17 12:28:05 2014 -- 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 monannonce -- ----------------------------------------------------- -- ----------------------------------------------------- -- Schema monannonce -- ----------------------------------------------------- CREATE SCHEMA IF NOT EXISTS `monannonce` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci ; USE `monannonce` ; -- ----------------------------------------------------- -- Table `monannonce`.`user` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `monannonce`.`user` ( `id` INT NOT NULL AUTO_INCREMENT, `username` VARCHAR(255) NULL, `password` VARCHAR(255) NULL, `salt` VARCHAR(255) NULL, `email` VARCHAR(255) NULL, `nom` VARCHAR(255) NULL, `prenom` VARCHAR(255) NULL, `cp` VARCHAR(255) NULL, `ville` VARCHAR(255) NULL, `is_newsletter` TINYINT(1) NOT NULL DEFAULT 1, `is_desactiver` TINYINT(1) NOT NULL DEFAULT 0, `created` DATETIME NULL, `update` DATETIME NULL, PRIMARY KEY (`id`)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `monannonce`.`annonce_type` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `monannonce`.`annonce_type` ( `id` INT NOT NULL AUTO_INCREMENT, `nom` VARCHAR(255) NULL, PRIMARY KEY (`id`)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `monannonce`.`annonce` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `monannonce`.`annonce` ( `id` INT NOT NULL, `user_id` INT NOT NULL, `annonce_type_id` INT NOT NULL, `titre` VARCHAR(255) NULL, `description` VARCHAR(255) NULL, `nbr_place` INT NULL, `is_active` TINYINT(1) NOT NULL DEFAULT 0, `is_refuser` TINYINT(1) NOT NULL DEFAULT 0, `adresse` VARCHAR(255) NULL, `ville` VARCHAR(255) NULL, `cp` VARCHAR(255) NULL, `date_debut` DATETIME NULL, `date_fin` DATETIME NULL, `updated` DATETIME NULL, `created` DATETIME NULL, PRIMARY KEY (`id`), INDEX `fk_annonce_user_idx` (`user_id` ASC), INDEX `fk_annonce_annonce_type1_idx` (`annonce_type_id` ASC), CONSTRAINT `fk_annonce_user` FOREIGN KEY (`user_id`) REFERENCES `monannonce`.`user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_annonce_annonce_type1` FOREIGN KEY (`annonce_type_id`) REFERENCES `monannonce`.`annonce_type` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `monannonce`.`message_annonce` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `monannonce`.`message_annonce` ( `id` INT NOT NULL, `user_id` INT NOT NULL, `annonce_id` INT NOT NULL, `message` VARCHAR(255) NULL, `created` DATETIME NULL, `updated` DATETIME NULL, PRIMARY KEY (`id`), INDEX `fk_discussion_message_user1_idx` (`user_id` ASC), INDEX `fk_discussion_message_annonce1_idx` (`annonce_id` ASC), CONSTRAINT `fk_discussion_message_user1` FOREIGN KEY (`user_id`) REFERENCES `monannonce`.`user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_discussion_message_annonce1` FOREIGN KEY (`annonce_id`) REFERENCES `monannonce`.`annonce` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `monannonce`.`annonce_photo` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `monannonce`.`annonce_photo` ( `id` INT NOT NULL, `annonce_id` INT NOT NULL, `file_photo` VARCHAR(255) NULL, `is_principal` TINYINT(1) NULL, PRIMARY KEY (`id`), INDEX `fk_annonce_photo_annonce1_idx` (`annonce_id` ASC), CONSTRAINT `fk_annonce_photo_annonce1` FOREIGN KEY (`annonce_id`) REFERENCES `monannonce`.`annonce` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `monannonce`.`role` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `monannonce`.`role` ( `id` INT NOT NULL AUTO_INCREMENT, `role` VARCHAR(255) NULL, PRIMARY KEY (`id`)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `monannonce`.`user_role` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `monannonce`.`user_role` ( `user_id` INT NOT NULL, `role_id` INT NOT NULL, PRIMARY KEY (`user_id`, `role_id`), INDEX `fk_user_role_has_user_user1_idx` (`user_id` ASC), INDEX `fk_user_role_has_user_user_role1_idx` (`role_id` ASC), CONSTRAINT `fk_user_role_has_user_user_role1` FOREIGN KEY (`role_id`) REFERENCES `monannonce`.`role` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_user_role_has_user_user1` FOREIGN KEY (`user_id`) REFERENCES `monannonce`.`user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `monannonce`.`message_user` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `monannonce`.`message_user` ( `id` INT NOT NULL AUTO_INCREMENT, `user_id` INT NOT NULL, `user_destinataire_id` INT NOT NULL, `message` TEXT NULL, `created` DATETIME NULL, `updated` DATETIME NULL, PRIMARY KEY (`id`), INDEX `fk_discussion_user_user1_idx` (`user_id` ASC), INDEX `fk_discussion_user_user2_idx` (`user_destinataire_id` ASC), CONSTRAINT `fk_discussion_user_user1` FOREIGN KEY (`user_id`) REFERENCES `monannonce`.`user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_discussion_user_user2` FOREIGN KEY (`user_destinataire_id`) REFERENCES `monannonce`.`user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `monannonce`.`annonce_user` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `monannonce`.`annonce_user` ( `id` INT NOT NULL AUTO_INCREMENT, `annonce_id` INT NOT NULL, `user_id` INT NOT NULL, `nbr_personne` INT NULL, `note` INT NULL, PRIMARY KEY (`id`), INDEX `fk_annonce_has_user_user1_idx` (`user_id` ASC), INDEX `fk_annonce_has_user_annonce1_idx` (`annonce_id` ASC), CONSTRAINT `fk_annonce_has_user_annonce1` FOREIGN KEY (`annonce_id`) REFERENCES `monannonce`.`annonce` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_annonce_has_user_user1` FOREIGN KEY (`user_id`) REFERENCES `monannonce`.`user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `monannonce`.`departement` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `monannonce`.`departement` ( `id` INT NOT NULL AUTO_INCREMENT, `code` VARCHAR(255) NULL, `nom` VARCHAR(255) NULL, PRIMARY KEY (`id`)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `monannonce`.`user_departement` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `monannonce`.`user_departement` ( `departement_id` INT NOT NULL, `user_id` INT NOT NULL, PRIMARY KEY (`departement_id`, `user_id`), INDEX `fk_departement_has_user_user1_idx` (`user_id` ASC), INDEX `fk_departement_has_user_departement1_idx` (`departement_id` ASC), CONSTRAINT `fk_departement_has_user_departement1` FOREIGN KEY (`departement_id`) REFERENCES `monannonce`.`departement` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_departement_has_user_user1` FOREIGN KEY (`user_id`) REFERENCES `monannonce`.`user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; SET SQL_MODE=@OLD_SQL_MODE; SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS; SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
true
8811a3a18be691c90097058ecb198791eac983e2
SQL
bjprogrammer/UDR_Music_App
/mysql/udrradio.sql
UTF-8
1,479
2.78125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: fdb14.biz.nf -- Generation Time: Jun 04, 2016 at 10:24 AM -- Server version: 5.5.38-log -- PHP Version: 5.5.36 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: `2104393_bj` -- -- -------------------------------------------------------- -- -- Table structure for table `udrradio` -- CREATE TABLE `udrradio` ( `title` text NOT NULL, `language` text NOT NULL, `ID` int(255) NOT NULL, `url` varchar(100) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `udrradio` -- INSERT INTO `udrradio` (`title`, `language`, `ID`, `url`) VALUES ('Radio City', 'Hindi', 1, 'http://prclive1.listenon.in:9960'); -- -- Indexes for dumped tables -- -- -- Indexes for table `udrradio` -- ALTER TABLE `udrradio` ADD PRIMARY KEY (`ID`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `udrradio` -- ALTER TABLE `udrradio` MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; /*!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
ad27243766b238a677e79a0812d566d3fbeda27b
SQL
google/grr
/grr/server/grr_response_server/databases/mysql_migrations/0017.sql
UTF-8
597
3.109375
3
[ "Apache-2.0" ]
permissive
CREATE TABLE `client_rrg_startup_history` ( -- A unique identifier of the row. `id` BIGINT NOT NULL AUTO_INCREMENT, -- A unique identifier of the client. `client_id` BIGINT UNSIGNED NOT NULL, -- A timestamp at which the startup record was written. `timestamp` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), -- A serialized protobuf `rrg.startup.Startup` message with startup record. `startup` MEDIUMBLOB, PRIMARY KEY (`id`), CONSTRAINT `fk_client_rrg_startup_history_clients` FOREIGN KEY (`client_id`) REFERENCES `clients` (`client_id`) ON DELETE CASCADE );
true
cafc4a076af96d52d74fd3b9c0332e9c0b5cd605
SQL
BhaskaranR/kmeal
/services/postgres/migrations/00040_menu.sql
UTF-8
2,442
3.703125
4
[]
no_license
CREATE TABLE IF NOT EXISTS kmeal."menu_book" ( "menu_book_id" SERIAL PRIMARY KEY, "restaurant_id" INTEGER NOT NULL REFERENCES kmeal.restaurant("restaurant_id"), "menu_book" VARCHAR(100) NOT NULL, "sort_order" INTEGER NOT NULL ); CREATE TABLE kmeal."menu_book_section" ( "section_id" SERIAL PRIMARY KEY, "section_name" VARCHAR(100) NOT NULL, "menu_book_id" INTEGER NOT NULL REFERENCES kmeal.menu_book("menu_book_id"), "sort_order" INTEGER NOT NULL ); CREATE TABLE IF NOT EXISTS kmeal."item" ( "item_id" SERIAL NOT NULL PRIMARY KEY, "item_name" varchar(50) NOT NULL, "description" TEXT NOT NULL, "photo" varchar(50) NOT NULL, "spicy_level" INTEGER, "vegetarian" INTEGER, -- vegan, vegetarian "cooking_time" INTEGER, -- time in minutes "restaurant_id" INTEGER NOT NULL REFERENCES kmeal.restaurant(restaurant_id), "created_at" TIMESTAMP NOT NULL, "created_block" BIGINT NOT NULL, "created_trx" TEXT NOT NULL, "created_eosacc" TEXT NOT NULL, "_dmx_created_at" TIMESTAMP DEFAULT current_timestamp NOT NULL ); CREATE TABLE IF NOT EXISTS kmeal."item_section" ( "item_id" INTEGER NOT NULL REFERENCES kmeal.item("item_id"), "section_id" INTEGER NOT NULL REFERENCES kmeal.menu_book_section (section_id), "sort_order" INTEGER, PRIMARY KEY(item_id, section_id) ); CREATE TABLE IF NOT EXISTS kmeal."item_types" ( "item_id" INTEGER NOT NULL REFERENCES kmeal.item("item_id"), "item_type" VARCHAR(50) NOT NULL ); -- list type regular, dynamically priced, combo menu CREATE TABLE IF NOT EXISTS kmeal."listing" ( "listing_id" SERIAL PRIMARY KEY, "restaurant_id" INTEGER NOT NULL REFERENCES kmeal.restaurant(restaurant_id), "item_id" INTEGER NOT NULL REFERENCES kmeal.item("item_id"), "list_price" DECIMAL NOT NULL, "list_type" CHAR(1) DEFAULT 'R' NOT NULL, "min_price" DECIMAL, "quantity" INTEGER, "start_date" DATE, "end_date" DATE, "start_time" VARCHAR(10), "end_time" VARCHAR(10), "isrecurring" CHAR(1), "sliding_rate" DECIMAL, "isactive" BOOLEAN NOT NULL, "created_at" TIMESTAMP, "created_block" BIGINT, "created_trx" TEXT, "created_eosacc" TEXT, "_dmx_created_at" TIMESTAMP DEFAULT current_timestamp ); CREATE TABLE IF NOT EXISTS kmeal."listing_item_sides" ( "listing_id" INTEGER NOT NULL REFERENCES kmeal.listing("listing_id"), "item_name" VARCHAR(100) NOT NULL, "group" VARCHAR(50), "max_selection" INTEGER , "list_price" DECIMAL );
true
17a9bc96b46351e71d7cbeac8222c54afd6e22d8
SQL
dapriad/list_details_products
/Projecte_1.0/bd_gamebets.sql
UTF-8
1,642
2.90625
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `bd_gamebets` USE `bd_gamebets`; -- phpMyAdmin SQL Dump -- version 4.0.10deb1 -- http://www.phpmyadmin.net -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 17-10-2016 a las 02:44:54 -- Versión del servidor: 5.5.50-0ubuntu0.14.04.1 -- Versión de PHP: 5.5.9-1ubuntu4.19 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: `bd_gamebets` -- -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `products` -- CREATE TABLE IF NOT EXISTS `products` ( `id_prod` int(20) NOT NULL, `prod_name` varchar(200) COLLATE utf8_bin NOT NULL, `price` int(15) NOT NULL, `dis_date` varchar(15) COLLATE utf8_bin NOT NULL, `exp_date` varchar(15) COLLATE utf8_bin NOT NULL, `status` varchar(40) COLLATE utf8_bin NOT NULL, `avatar` varchar(200) COLLATE utf8_bin NOT NULL, PRIMARY KEY (`id_prod`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -- -- Volcado de datos para la tabla `products` -- INSERT INTO `products` (`id_prod`, `prod_name`, `price`, `dis_date`, `exp_date`, `status`, `avatar`) VALUES (12345678, 'Sd', 1200, '10/04/2016', '10/18/2016', 'Preowned', 'media/default-avatar.jpg'); /*!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
d40263192bcbb78991ddeef3c15300d5e053c784
SQL
habibapalekar/TrackingWebApp
/Public/db.sql
UTF-8
423
3.15625
3
[]
no_license
CREATE DATABASE tracker; use tracker; CREATE TABLE diary ( id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY, food VARCHAR(30) NOT NULL, serving INT(50) NOT NULL, kcal INT(30), meal VARCHAR(100), date TIMESTAMP ); CREATE TABLE users ( id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, username VARCHAR(50) NOT NULL UNIQUE, password VARCHAR(255) NOT NULL, created_at DATETIME DEFAULT CURRENT_TIMESTAMP );
true
05c311232c8a5d2e1e246ce827b884e29f166bf6
SQL
LuisEduardoER/petshop-website
/ petshop-website --username iamwanhe@gmail.com/food.sql
UTF-8
1,053
3.015625
3
[]
no_license
-- ---------------------------- -- Table structure for foot -- ---------------------------- DROP TABLE IF EXISTS `foot`; CREATE TABLE `foot` ( `id` int(11) NOT NULL auto_increment, `code` varchar(10) collate utf8_bin default NULL, `name_ch` varchar(50) collate utf8_bin NOT NULL, `name_en` varchar(50) collate utf8_bin NOT NULL, `first_char` varchar(1) collate utf8_bin NOT NULL, `comment_ch` text collate utf8_bin, `modify_time` timestamp NOT NULL default CURRENT_TIMESTAMP, `status` tinyint(4) default NULL, `isrecommend` int(1) default '0', `isnew` int(1) default '0', `comment_en` text collate utf8_bin, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -- ---------------------------- -- Table structure for foot_collection -- ---------------------------- DROP TABLE IF EXISTS `foot_collection`; CREATE TABLE `foot_collection` ( `id` int(11) NOT NULL auto_increment, `user_id` int(11) NOT NULL, `foot_id` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
true
0b3f9805eb3b74c2b8018070e24ca47afa5facc8
SQL
Jangbe/ebe-bot
/bot_wa.sql
UTF-8
64,628
2.546875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 06, 2020 at 07:00 AM -- Server version: 10.4.10-MariaDB -- PHP Version: 7.2.25 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: `bot_wa` -- -- -------------------------------------------------------- -- -- Table structure for table `word` -- CREATE TABLE `word` ( `id` int(11) NOT NULL, `verb1` varchar(20) NOT NULL, `verb2` varchar(20) NOT NULL, `verb3` varchar(20) NOT NULL, `ing` varchar(20) NOT NULL, `arti` varchar(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `word` -- INSERT INTO `word` (`id`, `verb1`, `verb2`, `verb3`, `ing`, `arti`) VALUES (1, 'abash', 'abashed', 'abashed', 'abashing', 'memalukan'), (2, 'abate', 'abated', 'abated', 'abating', 'mereda'), (3, 'abide', 'abode', 'abode', 'abiding', 'tinggal'), (4, 'absorb', 'absorbed', 'absorbed', 'absorbing', 'menyerap'), (5, 'accept', 'accepted', 'accepted', 'accepting', 'menerima'), (6, 'accompany', 'accompanied', 'accompanied', 'accompanying', 'menemani'), (7, 'ache', 'ached', 'ached', 'aching', 'sakit'), (8, 'achieve', 'achieved', 'achieved', 'achieving', 'mencapai'), (9, 'acquire', 'acquired', 'acquired', 'acquiring', 'memperoleh'), (10, 'act', 'acted', 'acted', 'acting', 'bertindak'), (11, 'add', 'added', 'added', 'adding', 'Menambahkan'), (12, 'address', 'addressed', 'addressed', 'addressing', 'alamat'), (13, 'adjust', 'adjusted', 'adjusted', 'adjusting', 'menyesuaikan'), (14, 'admire', 'admired', 'admired', 'admiring', 'mengagumi'), (15, 'admit', 'admitted', 'admitted', 'admitting', 'mengakui'), (16, 'advise', 'advised', 'advised', 'advising', 'menasihati'), (17, 'afford', 'afforded', 'afforded', 'affording', 'mampu'), (18, 'agree', 'agreed', 'agreed', 'agreeing', 'setuju'), (19, 'alight', 'alit', 'alit', 'alighting', 'turun'), (20, 'allow', 'allowed', 'allowed', 'allowing', 'mengizinkan'), (21, 'animate', 'animated', 'animated', 'animating', 'menghidupkan'), (22, 'announce', 'announced', 'announced', 'announcing', 'mengumumkan'), (23, 'answer', 'answered', 'answered', 'answering', 'menjawab'), (24, 'apologize', 'apologized', 'apologized', 'apologizing', 'minta maaf'), (25, 'appear', 'appeared', 'appeared', 'appearing', 'muncul'), (26, 'applaud', 'applauded', 'applauded', 'applauding', 'bertepuk tangan'), (27, 'apply', 'applied', 'applied', 'applying', 'menerapkan'), (28, 'approach', 'approached', 'approached', 'approaching', 'pendekatan'), (29, 'approve', 'approved', 'approved', 'approving', 'menyetujui'), (30, 'argue', 'argued', 'argued', 'arguing', 'memperdebatkan'), (31, 'arise', 'arose', 'arisen', 'arising', 'timbul'), (32, 'arrange', 'arranged', 'arranged', 'arranging', 'mengatur'), (33, 'arrest', 'arrested', 'arrested', 'arresting', 'menangkap'), (34, 'ask', 'asked', 'asked', 'asking', 'meminta'), (35, 'assert', 'asserted', 'asserted', 'asserting', 'menegaskan'), (36, 'assort', 'assorted', 'assorted', 'assorting', 'bergaul'), (37, 'astonish', 'astonished', 'astonished', 'astonishing', 'mencengangkan'), (38, 'attack', 'attacked', 'attacked', 'attacking', 'menyerang'), (39, 'attend', 'attended', 'attended', 'attending', 'menghadiri'), (40, 'attract', 'attracted', 'attracted', 'attracting', 'menarik'), (41, 'audit', 'audited', 'audited', 'auditing', 'audit'), (42, 'avoid', 'avoided', 'avoided', 'avoiding', 'menghindari'), (43, 'awake', 'awoke', 'awoken', 'awaking', 'bangun'), (44, 'bang', 'banged', 'banged', 'banging', 'bang'), (45, 'banish', 'banished', 'banished', 'banishing', 'membuang'), (46, 'bash', 'bashed', 'bashed', 'bashing', 'pesta'), (47, 'bat', 'batted', 'batted', 'batting', 'kelelawar'), (48, 'be (am,are)', 'was / were', 'been', 'being', 'jadilah (am, are)'), (49, 'bear', 'bore', 'born', 'bearing', 'beruang'), (50, 'bear', 'bore', 'borne', 'bearing', 'beruang'), (51, 'beat', 'beat', 'beaten', 'beating', 'mengalahkan'), (52, 'beautify', 'beautified', 'beautified', 'beautifying', 'mempercantik'), (53, 'become', 'became', 'become', 'becoming', 'menjadi'), (54, 'befall', 'befell', 'befallen', 'befalling', 'menimpa'), (55, 'beg', 'begged', 'begged', 'begging', 'mengemis'), (56, 'begin', 'began', 'begun', 'beginning', 'mulai'), (57, 'behave', 'behaved', 'behaved', 'behaving', 'bertingkah'), (58, 'behold', 'beheld', 'beheld', 'beholding', 'melihat'), (59, 'believe', 'believed', 'believed', 'believing', 'percaya'), (60, 'belong', 'belonged', 'belonged', 'belonging', 'termasuk'), (61, 'bend', 'bent', 'bent', 'bending', 'tikungan'), (62, 'bereave', 'bereft', 'bereft', 'bereaving', 'kehilangan'), (63, 'beseech', 'besought', 'besought', 'beseeching', 'memohon'), (64, 'bet', 'bet', 'bet', 'betting', 'bertaruh'), (65, 'betray', 'betrayed', 'betrayed', 'betraying', 'mengkhianati'), (66, 'bid', 'bade', 'bidden', 'bidding', 'tawaran'), (67, 'bid', 'bid', 'bid', 'bidding', 'tawaran'), (68, 'bind', 'bound', 'bound', 'binding', 'mengikat'), (69, 'bite', 'bit', 'bitten', 'biting', 'gigitan'), (70, 'bleed', 'bled', 'bled', 'bleeding', 'berdarah'), (71, 'bless', 'blessed', 'blessed', 'blessing', 'memberkati'), (72, 'blossom', 'blossomed', 'blossomed', 'blossoming', 'mekar'), (73, 'blow', 'blew', 'blown', 'blowing', 'pukulan'), (74, 'blur', 'blurred', 'blurred', 'blurring', 'mengaburkan'), (75, 'blush', 'blushed', 'blushed', 'blushing', 'blush'), (76, 'board', 'boarded', 'boarded', 'boarding', 'naik'), (77, 'boast', 'boasted', 'boasted', 'boasting', 'membanggakan'), (78, 'boil', 'boiled', 'boiled', 'boiling', 'mendidih'), (79, 'bow', 'bowed', 'bowed', 'bowing', 'busur'), (80, 'box', 'boxed', 'boxed', 'boxing', 'kotak'), (81, 'bray', 'brayed', 'brayed', 'braying', 'meringkik'), (82, 'break', 'broke', 'broken', 'breaking', 'istirahat'), (83, 'breathe', 'breathed', 'breathed', 'breathing', 'bernafas'), (84, 'breed', 'bred', 'bred', 'breeding', 'berkembang biak'), (85, 'bring', 'brought', 'brought', 'bringing', 'membawa'), (86, 'broadcast', 'broadcast', 'broadcast', 'broadcasting', 'siaran'), (87, 'brush', 'brushed', 'brushed', 'brushing', 'sikat'), (88, 'build', 'built', 'built', 'building', 'membangun'), (89, 'burn', 'burnt', 'burnt', 'burning', 'membakar'), (90, 'burst', 'burst', 'burst', 'bursting', 'ledakan'), (91, 'bury', 'buried', 'buried', 'burying', 'mengubur'), (92, 'bust', 'bust', 'bust', 'busting', 'payudara'), (93, 'buy', 'bought', 'bought', 'buying', 'membeli'), (94, 'buzz', 'buzzed', 'buzzed', 'buzzing', 'berdengung'), (95, 'calculate', 'calculated', 'calculated', 'calculating', 'menghitung'), (96, 'call', 'called', 'called', 'calling', 'panggilan'), (97, 'canvass', 'canvassed', 'canvassed', 'canvassing', 'kampas'), (98, 'capture', 'captured', 'captured', 'capturing', 'menangkap'), (99, 'caress', 'caressed', 'caressed', 'caressing', 'membelai'), (100, 'carry', 'carried', 'carried', 'carrying', 'membawa'), (101, 'carve', 'carved', 'carved', 'carving', 'mengukir'), (102, 'cash', 'cashed', 'cashed', 'cashing', 'tunai'), (103, 'cast', 'cast', 'cast', 'casting', 'Pemeran'), (104, 'catch', 'caught', 'caught', 'catching', 'menangkap'), (105, 'cause', 'caused', 'caused', 'causing', 'sebab'), (106, 'cease', 'ceased', 'ceased', 'ceasing', 'berhenti'), (107, 'celebrate', 'celebrated', 'celebrated', 'celebrating', 'merayakan'), (108, 'challenge', 'challenged', 'challenged', 'challenging', 'tantangan'), (109, 'change', 'changed', 'changed', 'changing', 'perubahan'), (110, 'charge', 'charged', 'charged', 'charging', 'biaya'), (111, 'chase', 'chased', 'chased', 'chasing', 'mengejar'), (112, 'chat', 'chatted', 'chatted', 'chatting', 'obrolan'), (113, 'check', 'checked', 'checked', 'checking', 'memeriksa'), (114, 'cheer', 'cheered', 'cheered', 'cheering', 'bersorak'), (115, 'chew', 'chewed', 'chewed', 'chewing', 'mengunyah'), (116, 'chide', 'chid', 'chid/chidden', 'chiding', 'menegur'), (117, 'chip', 'chipped', 'chipped', 'chipping', 'chip'), (118, 'choke', 'choked', 'choked', 'choking', 'tersedak'), (119, 'choose', 'chose', 'chosen', 'choosing', 'memilih'), (120, 'classify', 'classified', 'classified', 'classifying', 'menggolongkan'), (121, 'clean', 'cleaned', 'cleaned', 'cleaning', 'bersih'), (122, 'cleave', 'clove/cleft', 'cloven/cleft', 'cleaving', 'membelah'), (123, 'click', 'clicked', 'clicked', 'clicking', 'klik'), (124, 'climb', 'climbed', 'climbed', 'climbing', 'mendaki'), (125, 'cling', 'clung', 'clung', 'clinging', 'melekat'), (126, 'close', 'closed', 'closed', 'closing', 'Menutup'), (127, 'clothe', 'clad', 'clad', 'clothing', 'menutupi'), (128, 'clutch', 'clutched', 'clutched', 'clutching', 'kopling'), (129, 'collapse', 'collapsed', 'collapsed', 'collapsing', 'jatuh'), (130, 'collect', 'collected', 'collected', 'collecting', 'mengumpulkan'), (131, 'colour', 'coloured', 'coloured', 'colouring', 'warna'), (132, 'come', 'came', 'come', 'coming', 'datang'), (133, 'comment', 'commented', 'commented', 'commenting', 'komentar'), (134, 'compare', 'compared', 'compared', 'comparing', 'membandingkan'), (135, 'compel', 'compelled', 'compelled', 'compelling', 'memaksa'), (136, 'compete', 'competed', 'competed', 'competing', 'bersaing'), (137, 'complain', 'complained', 'complained', 'complaining', 'mengeluh'), (138, 'complete', 'completed', 'completed', 'completing', 'lengkap'), (139, 'conclude', 'concluded', 'concluded', 'concluding', 'menyimpulkan'), (140, 'conduct', 'conducted', 'conducted', 'conducting', 'mengadakan'), (141, 'confess', 'confessed', 'confessed', 'confessing', 'mengaku'), (142, 'confine', 'confined', 'confined', 'confining', 'membatasi'), (143, 'confiscate', 'confiscated', 'confiscated', 'confiscating', 'menyita'), (144, 'confuse', 'confused', 'confused', 'confusing', 'membingungkan'), (145, 'congratulate', 'congratulated', 'congratulated', 'congratulating', 'mengucapkan selamat'), (146, 'connect', 'connected', 'connected', 'connecting', 'Menghubung'), (147, 'connote', 'connoted', 'connoted', 'connoting', 'berarti'), (148, 'conquer', 'conquered', 'conquered', 'conquering', 'menaklukkan'), (149, 'consecrate', 'consecrated', 'consecrated', 'consecrating', 'mentahbiskan'), (150, 'consent', 'consented', 'consented', 'consenting', 'persetujuan'), (151, 'conserve', 'conserved', 'conserved', 'conserving', 'melestarikan'), (152, 'consider', 'considered', 'considered', 'considering', 'mempertimbangkan'), (153, 'consign', 'consigned', 'consigned', 'consigning', 'memperuntukkan'), (154, 'consist', 'consisted', 'consisted', 'consisting', 'terdiri'), (155, 'console', 'consoled', 'consoled', 'consoling', 'menghibur'), (156, 'consort', 'consorted', 'consorted', 'consorting', 'istri'), (157, 'conspire', 'conspired', 'conspired', 'conspiring', 'bersekongkol'), (158, 'constitute', 'constituted', 'constituted', 'constituting', 'merupakan'), (159, 'constrain', 'constrained', 'constrained', 'constraining', 'memaksa'), (160, 'construct', 'constructed', 'constructed', 'constructing', 'membangun'), (161, 'construe', 'construed', 'construed', 'construing', 'menafsirkan'), (162, 'consult', 'consulted', 'consulted', 'consulting', 'berkonsultasi'), (163, 'contain', 'contained', 'contained', 'containing', 'berisi'), (164, 'contemn', 'contemned', 'contemned', 'contemning', 'menghina'), (165, 'contend', 'contended', 'contended', 'contending', 'bersaing'), (166, 'contest', 'contested', 'contested', 'contesting', 'kontes'), (167, 'continue', 'continued', 'continued', 'continuing', 'terus'), (168, 'contract', 'contracted', 'contracted', 'contracting', 'kontrak'), (169, 'contradict', 'contradicted', 'contradicted', 'contradicting', 'bertentangan'), (170, 'contrast', 'contrasted', 'contrasted', 'contrasting', 'kontras'), (171, 'contribute', 'contributed', 'contributed', 'contributing', 'menyumbang'), (172, 'contrive', 'contrived', 'contrived', 'contriving', 'merancang'), (173, 'control', 'controlled', 'controlled', 'controlling', 'kontrol'), (174, 'convene', 'convened', 'convened', 'convening', 'bersidang'), (175, 'converge', 'converged', 'converged', 'converging', 'bertemu'), (176, 'converse', 'conversed', 'conversed', 'conversing', 'berbicara'), (177, 'convert', 'converted', 'converted', 'converting', 'mengubah'), (178, 'convey', 'conveyed', 'conveyed', 'conveying', 'menyampaikan'), (179, 'convict', 'convicted', 'convicted', 'convicting', 'menghukum'), (180, 'convince', 'convinced', 'convinced', 'convincing', 'meyakinkan'), (181, 'coo', 'cooed', 'cooed', 'cooing', 'mendekut'), (182, 'cook', 'cooked', 'cooked', 'cooking', 'memasak'), (183, 'cool', 'cooled', 'cooled', 'cooling', 'keren'), (184, 'co-operate', 'co-operated', 'co-operated', 'co-operating', 'bekerja sama'), (185, 'cope', 'coped', 'cope', 'coping', 'menghadapi'), (186, 'copy', 'copied', 'copied', 'copying', 'salinan'), (187, 'correct', 'corrected', 'corrected', 'correcting', 'benar'), (188, 'correspond', 'corresponded', 'corresponded', 'corresponding', 'sesuai'), (189, 'corrode', 'corroded', 'corroded', 'corroding', 'merusak'), (190, 'corrupt', 'corrupted', 'corrupted', 'corrupting', 'korup'), (191, 'cost', 'cost', 'cost', 'costing', 'biaya'), (192, 'cough', 'coughed', 'coughed', 'coughing', 'batuk'), (193, 'counsel', 'counselled', 'counselled', 'counselling', 'nasihat'), (194, 'count', 'counted', 'counted', 'counting', 'menghitung'), (195, 'course', 'coursed', 'coursed', 'coursing', 'tentu saja'), (196, 'cover', 'covered', 'covered', 'covering', 'penutup'), (197, 'cower', 'cowered', 'cowered', 'cowering', 'gemetar ketakutan'), (198, 'crack', 'cracked', 'cracked', 'cracking', 'retak'), (199, 'crackle', 'crackled', 'crackled', 'crackling', 'meretih'), (200, 'crash', 'crashed', 'crashed', 'crashing', 'jatuh'), (201, 'crave', 'craved', 'craved', 'craving', 'mendambakan'), (202, 'create', 'created', 'created', 'creating', 'membuat'), (203, 'creep', 'crept', 'crept', 'creeping', 'merayap'), (204, 'crib', 'cribbed', 'cribbed', 'cribbing', 'boks bayi'), (205, 'cross', 'crossed', 'crossed', 'crossing', 'menyeberang'), (206, 'crowd', 'crowded', 'crowded', 'crowding', 'orang banyak'), (207, 'crush', 'crushed', 'crushed', 'crushing', 'menghancurkan'), (208, 'cry', 'cried', 'cried', 'crying', 'menangis'), (209, 'curb', 'curbed', 'curbed', 'curbing', 'mengekang'), (210, 'cure', 'cured', 'cured', 'curing', 'menyembuhkan'), (211, 'curve', 'curved', 'curved', 'curving', 'melengkung'), (212, 'cut', 'cut', 'cut', 'cutting', 'memotong'), (213, 'cycle', 'cycled', 'cycled', 'cycling', 'siklus'), (214, 'damage', 'damaged', 'damaged', 'damaging', 'kerusakan'), (215, 'damp', 'damped', 'damped', 'damping', 'basah'), (216, 'dance', 'danced', 'danced', 'dancing', 'menari'), (217, 'dare', 'dared', 'dared', 'daring', 'berani'), (218, 'dash', 'dashed', 'dashed', 'dashing', 'berlari'), (219, 'dazzle', 'dazzled', 'dazzled', 'dazzling', 'mempesona'), (220, 'deal', 'dealt', 'dealt', 'dealing', 'Sepakat'), (221, 'decay', 'decayed', 'decayed', 'decaying', 'kerusakan'), (222, 'decide', 'decided', 'decided', 'deciding', 'memutuskan'), (223, 'declare', 'declared', 'declared', 'declaring', 'menyatakan'), (224, 'decorate', 'decorated', 'decorated', 'decorating', 'menghias'), (225, 'decrease', 'decreased', 'decreased', 'decreasing', 'mengurangi'), (226, 'dedicate', 'dedicated', 'dedicated', 'dedicating', 'dedikasi'), (227, 'delay', 'delayed', 'delayed', 'delaying', 'menunda'), (228, 'delete', 'deleted', 'deleted', 'deleting', 'menghapus'), (229, 'deny', 'denied', 'denied', 'denying', 'menyangkal'), (230, 'depend', 'depended', 'depended', 'depending', 'tergantung'), (231, 'deprive', 'deprived', 'deprived', 'depriving', 'mencabut'), (232, 'derive', 'derived', 'derived', 'deriving', 'memperoleh'), (233, 'describe', 'described', 'described', 'describing', 'menggambarkan'), (234, 'desire', 'desired', 'desired', 'desiring', 'keinginan'), (235, 'destroy', 'destroyed', 'destroyed', 'destroying', 'menghancurkan'), (236, 'detach', 'detached', 'detached', 'detaching', 'melepaskan'), (237, 'detect', 'detected', 'detected', 'detecting', 'mendeteksi'), (238, 'determine', 'determined', 'determined', 'determining', 'menentukan'), (239, 'develop', 'developed', 'developed', 'developing', 'mengembangkan'), (240, 'die', 'died', 'died', 'dying', 'mati'), (241, 'differ', 'differed', 'differed', 'differing', 'berbeda'), (242, 'dig', 'dug', 'dug', 'digging', 'menggali'), (243, 'digest', 'digested', 'digested', 'digesting', 'intisari'), (244, 'dim', 'dimmed', 'dimmed', 'dimming', 'redup'), (245, 'diminish', 'diminished', 'diminished', 'diminishing', 'mengurangi'), (246, 'dine', 'dined', 'dined', 'dining', 'makan malam'), (247, 'dip', 'dipped', 'dipped', 'dipping', 'menukik'), (248, 'direct', 'directed', 'directed', 'directing', 'langsung'), (249, 'disappear', 'disappeared', 'disappeared', 'disappearing', 'menghilang'), (250, 'discover', 'discovered', 'discovered', 'discovering', 'menemukan'), (251, 'discuss', 'discussed', 'discussed', 'discussing', 'Bahas'), (252, 'disobey', 'disobeyed', 'disobeyed', 'disobeying', 'tidak patuh'), (253, 'display', 'displayed', 'displayed', 'displaying', 'layar'), (254, 'dispose', 'disposed', 'disposed', 'disposing', 'membuang'), (255, 'distribute', 'distributed', 'distributed', 'distributing', 'mendistribusikan'), (256, 'disturb', 'disturbed', 'disturbed', 'disturbing', 'mengganggu'), (257, 'disuse', 'disused', 'disused', 'disusing', 'tidak digunakan'), (258, 'dive', 'dived', 'dived', 'diving', 'menyelam'), (259, 'divide', 'divided', 'divided', 'dividing', 'membagi'), (260, 'do', 'did', 'done', 'doing', 'melakukan'), (261, 'donate', 'donated', 'donated', 'donating', 'menyumbangkan'), (262, 'download', 'downloaded', 'downloaded', 'downloading', 'unduh'), (263, 'drag', 'dragged', 'dragged', 'dragging', 'menyeret'), (264, 'draw', 'drew', 'drawn', 'drawing', 'seri'), (265, 'dream', 'dreamt', 'dreamt', 'dreaming', 'mimpi'), (266, 'dress', 'dressed', 'dressed', 'dressing', 'gaun'), (267, 'drill', 'drilled', 'drilled', 'drilling', 'bor'), (268, 'drink', 'drank', 'drunk', 'drinking', 'minum'), (269, 'drive', 'drove', 'driven', 'driving', 'mendorong'), (270, 'drop', 'dropped', 'dropped', 'dropping', 'penurunan'), (271, 'dry', 'dried', 'dried', 'drying', 'kering'), (272, 'dump', 'dumped', 'dumped', 'dumping', 'membuang'), (273, 'dwell', 'dwelt', 'dwelt', 'dwelling', 'tinggal'), (274, 'dye', 'dyed', 'dyed', 'dyeing', 'pewarna'), (275, 'earn', 'earned', 'earned', 'earning', 'menghasilkan'), (276, 'eat', 'ate', 'eaten', 'eating', 'makan'), (277, 'educate', 'educated', 'educated', 'educating', 'mendidik'), (278, 'empower', 'empowered', 'empowered', 'empowering', 'memberdayakan'), (279, 'empty', 'emptied', 'emptied', 'emptying', 'kosong'), (280, 'encircle', 'encircled', 'encircled', 'encircling', 'mengelilingi'), (281, 'encourage', 'encouraged', 'encouraged', 'encouraging', 'mendorong'), (282, 'encroach', 'encroached', 'encroached', 'encroaching', 'mengganggu'), (283, 'endanger', 'endangered', 'endangered', 'entangling', 'membahayakan'), (284, 'endorse', 'endorsed', 'endorsed', 'endorsing', 'mengesahkan'), (285, 'endure', 'endured', 'endured', 'enduring', 'menanggung'), (286, 'engrave', 'engraved', 'engraved', 'engraving', 'mengukir'), (287, 'enjoy', 'enjoyed', 'enjoyed', 'enjoying', 'Nikmati'), (288, 'enlarge', 'enlarged', 'enlarged', 'enlarging', 'memperbesar'), (289, 'enlighten', 'enlightened', 'enlightened', 'enlightening', 'mencerahkan'), (290, 'enter', 'entered', 'entered', 'entering', 'memasukkan'), (291, 'envy', 'envied', 'envied', 'envying', 'iri'), (292, 'erase', 'erased', 'erased', 'erasing', 'menghapus'), (293, 'escape', 'escaped', 'escaped', 'escaping', 'melarikan diri'), (294, 'evaporate', 'evaporated', 'evaporated', 'evaporating', 'menguap'), (295, 'exchange', 'exchanged', 'exchanged', 'exchanging', 'bertukar'), (296, 'exclaim', 'exclaimed', 'exclaimed', 'exclaiming', 'berseru'), (297, 'exclude', 'excluded', 'excluded', 'excluding', 'mengecualikan'), (298, 'exist', 'existed', 'existed', 'existing', 'ada'), (299, 'expand', 'expanded', 'expanded', 'expanding', 'memperluas'), (300, 'expect', 'expected', 'expected', 'expecting', 'mengharapkan'), (301, 'explain', 'explained', 'explained', 'explaining', 'menjelaskan'), (302, 'explore', 'explored', 'explored', 'exploring', 'jelajahi'), (303, 'express', 'expressed', 'expressed', 'expressing', 'mengekspresikan'), (304, 'extend', 'extended', 'extended', 'extending', 'memperpanjang'), (305, 'eye', 'eyed', 'eyed', 'eyeing', 'mata'), (306, 'face', 'faced', 'faced', 'facing', 'wajah'), (307, 'fail', 'failed', 'failed', 'failing', 'gagal'), (308, 'faint', 'fainted', 'fainted', 'fainting', 'lemah'), (309, 'fall', 'fell', 'fallen', 'falling', 'jatuh'), (310, 'fan', 'fanned', 'fanned', 'fanning', 'kipas'), (311, 'fancy', 'fancied', 'fancied', 'fancying', 'mewah'), (312, 'favour', 'favoured', 'favoured', 'favouring', 'kebaikan'), (313, 'fax', 'faxed', 'faxed', 'faxing', 'fax'), (314, 'feed', 'fed', 'fed', 'feeding', 'makan'), (315, 'feel', 'felt', 'felt', 'feeling', 'merasa'), (316, 'ferry', 'ferried', 'ferried', 'ferrying', 'kapal feri'), (317, 'fetch', 'fetched', 'fetched', 'fetching', 'mengambil'), (318, 'fight', 'fought', 'fought', 'fighting', 'pertarungan'), (319, 'fill', 'filled', 'filled', 'filling', 'mengisi'), (320, 'find', 'found', 'found', 'finding', 'Temukan'), (321, 'finish', 'finished', 'finished', 'finishing', 'selesai'), (322, 'fish', 'fished', 'fished', 'fishing', 'ikan'), (323, 'fit', 'fit/fitted', 'fit/fitted', 'fitting', 'cocok'), (324, 'fix', 'fixed', 'fixed', 'fixing', 'memperbaiki'), (325, 'fizz', 'fizzed', 'fizzed', 'fizzing', 'mendesis'), (326, 'flap', 'flapped', 'flapped', 'flapping', 'tutup'), (327, 'flash', 'flashed', 'flashed', 'flashing', 'flash'), (328, 'flee', 'fled', 'fled', 'fleeing', 'melarikan diri'), (329, 'fling', 'flung', 'flung', 'flinging', 'melemparkan'), (330, 'float', 'floated', 'floated', 'floating', 'mengapung'), (331, 'flop', 'flopped', 'flopped', 'flopping', 'kegagalan'), (332, 'fly', 'flew', 'flown', 'flying', 'terbang'), (333, 'fold', 'folded', 'folded', 'folding', 'melipat'), (334, 'follow', 'followed', 'followed', 'following', 'mengikuti'), (335, 'forbid', 'forbade', 'forbidden', 'forbidding', 'melarang'), (336, 'force', 'forced', 'forced', 'forcing', 'memaksa'), (337, 'forecast', 'forecast', 'forecast', 'forecasting', 'ramalan cuaca'), (338, 'foretell', 'foretold', 'foretold', 'foretelling', 'meramalkan'), (339, 'forget', 'forgot', 'forgotten', 'forgetting', 'lupa'), (340, 'forgive', 'forgave', 'forgiven', 'forgiving', 'memaafkan'), (341, 'forlese', 'forlore', 'forlorn', 'forlesing', 'forlese'), (342, 'form', 'formed', 'formed', 'forming', 'bentuk'), (343, 'forsake', 'forsook', 'forsaken', 'forsaking', 'meninggalkan'), (344, 'found', 'founded', 'founded', 'founding', 'ditemukan'), (345, 'frame', 'framed', 'framed', 'framing', 'bingkai'), (346, 'free', 'freed', 'freed', 'freeing', 'Gratis'), (347, 'freeze', 'froze', 'frozen', 'freezing', 'membekukan'), (348, 'frighten', 'frightened', 'frightened', 'frightening', 'menakuti'), (349, 'fry', 'fried', 'fried', 'frying', 'menggoreng'), (350, 'fulfil', 'fulfilled', 'fulfilled', 'fulfilling', 'memenuhi'), (351, 'gag', 'gagged', 'gagged', 'gagging', 'muntah'), (352, 'gain', 'gained', 'gained', 'gaining', 'mendapatkan'), (353, 'gainsay', 'gainsaid', 'gainsaid', 'gainsaying', 'membantah'), (354, 'gash', 'gashed', 'gashed', 'gashing', 'luka'), (355, 'gaze', 'gazed', 'gazed', 'gazing', 'tatapan'), (356, 'get', 'got', 'got', 'getting', 'Dapatkan'), (357, 'give', 'gave', 'given', 'giving', 'memberikan'), (358, 'glance', 'glanced', 'glanced', 'glancing', 'sekilas'), (359, 'glitter', 'glittered', 'glittered', 'glittering', 'berkilau'), (360, 'glow', 'glowed', 'glowed', 'glowing', 'cahaya'), (361, 'go', 'went', 'gone', 'going', 'Pergilah'), (362, 'google', 'googled', 'googled', 'googling', 'google'), (363, 'govern', 'governed', 'governed', 'governing', 'memerintah'), (364, 'grab', 'grabbed', 'grabbed', 'grabbing', 'mengambil'), (365, 'grade', 'graded', 'graded', 'grading', 'kelas'), (366, 'grant', 'granted', 'granted', 'granting', 'hibah'), (367, 'greet', 'greeted', 'greeted', 'greeting', 'menyambut'), (368, 'grind', 'ground', 'ground', 'grinding', 'menggiling'), (369, 'grip', 'gripped', 'gripped', 'gripping', 'pegangan'), (370, 'grow', 'grew', 'grown', 'growing', 'tumbuh'), (371, 'guard', 'guarded', 'guarded', 'guarding', 'menjaga'), (372, 'guess', 'guessed', 'guessed', 'guessing', 'Tebak'), (373, 'guide', 'guided', 'guided', 'guiding', 'panduan'), (374, 'handle', 'handled', 'handled', 'handling', 'menangani'), (375, 'hang', 'hung', 'hung', 'hanging', 'menggantung'), (376, 'happen', 'happened', 'happened', 'happening', 'terjadi'), (377, 'harm', 'harmed', 'harmed', 'harming', 'membahayakan'), (378, 'hatch', 'hatched', 'hatched', 'hatching', 'menetas'), (379, 'hate', 'hated', 'hated', 'hating', 'benci'), (380, 'have', 'had', 'had', 'having', 'memiliki'), (381, 'heal', 'healed', 'healed', 'healing', 'menyembuhkan'), (382, 'hear', 'heard', 'heard', 'hearing', 'mendengar'), (383, 'heave', 'hove', 'hove', 'heaving', 'mengangkat'), (384, 'help', 'helped', 'helped', 'helping', 'Tolong'), (385, 'hew', 'hewed', 'hewn', 'hewing', 'menebang'), (386, 'hide', 'hid', 'hidden', 'hiding', 'menyembunyikan'), (387, 'hinder', 'hindered', 'hindered', 'hindering', 'menghalangi'), (388, 'hiss', 'hissed', 'hissed', 'hissing', 'mendesis'), (389, 'hit', 'hit', 'hit', 'hitting', 'memukul'), (390, 'hoax', 'hoaxed', 'hoaxed', 'hoaxing', 'kebohongan'), (391, 'hold', 'held', 'held', 'holding', 'memegang'), (392, 'hop', 'hopped', 'hopped', 'hopping', 'melompat'), (393, 'hope', 'hoped', 'hoped', 'hoping', 'berharap'), (394, 'horrify', 'horrified', 'horrified', 'horrifying', 'menakuti'), (395, 'hug', 'hugged', 'hugged', 'hugging', 'memeluk'), (396, 'hum', 'hummed', 'hummed', 'humming', 'bersenandung'), (397, 'humiliate', 'humiliated', 'humiliated', 'humiliating', 'menghina'), (398, 'hunt', 'hunted', 'hunted', 'hunting', 'berburu'), (399, 'hurl', 'hurled', 'hurled', 'hurling', 'melemparkan'), (400, 'hurry', 'hurried', 'hurried', 'hurrying', 'cepatlah'), (401, 'hurt', 'hurt', 'hurt', 'hurting', 'menyakiti'), (402, 'hush', 'hushed', 'hushed', 'hushing', 'diam'), (403, 'hustle', 'hustled', 'hustled', 'hustling', 'keramaian'), (404, 'hypnotize', 'hypnotized', 'hypnotized', 'hypnotizing', 'menghipnotis'), (405, 'idealize', 'idealized', 'idealized', 'idealizing', 'mengidealkan'), (406, 'identify', 'identified', 'identified', 'identifying', 'mengenali'), (407, 'idolize', 'idolized', 'idolized', 'idolizing', 'mendewakan'), (408, 'ignite', 'ignited', 'ignited', 'igniting', 'menyalakan'), (409, 'ignore', 'ignored', 'ignored', 'ignoring', 'mengabaikan'), (410, 'ill-treat', 'ill-treated', 'ill-treated', 'ill-treating', 'menganiaya'), (411, 'illuminate', 'illuminated', 'illuminated', 'illuminating', 'menerangi'), (412, 'illumine', 'illumined', 'illumined', 'illumining', 'menerangi'), (413, 'illustrate', 'illustrated', 'illustrated', 'illustrating', 'menjelaskan'), (414, 'imagine', 'imagined', 'imagined', 'imagining', 'membayangkan'), (415, 'imbibe', 'imbibed', 'imbibed', 'imbibing', 'menyerap'), (416, 'imitate', 'imitated', 'imitated', 'imitating', 'meniru'), (417, 'immerse', 'immersed', 'immersed', 'immersing', 'membenamkan'), (418, 'immolate', 'immolated', 'immolated', 'immolating', 'mengorbankan'), (419, 'immure', 'immured', 'immured', 'immuring', 'memenjarakan'), (420, 'impair', 'impaired', 'impaired', 'impairing', 'merusak'), (421, 'impart', 'imparted', 'imparted', 'imparting', 'memberi'), (422, 'impeach', 'impeached', 'impeached', 'impeaching', 'mendakwa'), (423, 'impede', 'impeded', 'impeded', 'impeding', 'menghalangi'), (424, 'impel', 'impelled', 'impelled', 'impelling', 'mendorong'), (425, 'impend', 'impended', 'impended', 'impending', 'mengancam'), (426, 'imperil', 'imperilled', 'imperilled', 'imperilling', 'membahayakan'), (427, 'impinge', 'impinged', 'impinged', 'impinging', 'menimpa'), (428, 'implant', 'implanted', 'implanted', 'implanting', 'mencangkok'), (429, 'implicate', 'implicated', 'implicated', 'implicating', 'melibatkan'), (430, 'implode', 'imploded', 'imploded', 'imploding', 'meledak'), (431, 'implore', 'implored', 'implored', 'imploring', 'mohon'), (432, 'imply', 'implied', 'implied', 'implying', 'berarti'), (433, 'import', 'imported', 'imported', 'importing', 'impor'), (434, 'impose', 'imposed', 'imposed', 'imposing', 'memaksakan'), (435, 'impress', 'impressed', 'impressed', 'impressing', 'mengesankan'), (436, 'imprint', 'imprinted', 'imprinted', 'imprinting', 'jejak'), (437, 'imprison', 'imprisoned', 'imprisoned', 'imprisoning', 'memenjarakan'), (438, 'improve', 'improved', 'improved', 'improving', 'memperbaiki'), (439, 'inaugurate', 'inaugurated', 'inaugurated', 'inaugurating', 'meresmikan'), (440, 'incise', 'incised', 'incised', 'incising', 'menoreh'), (441, 'include', 'included', 'included', 'including', 'termasuk'), (442, 'increase', 'increased', 'increased', 'increasing', 'meningkatkan'), (443, 'inculcate', 'inculcated', 'inculcated', 'inculcating', 'menanamkan'), (444, 'indent', 'indented', 'indented', 'indenting', 'indentasi'), (445, 'indicate', 'indicated', 'indicated', 'indicating', 'menunjukkan'), (446, 'induce', 'induced', 'induced', 'inducing', 'menyebabkan'), (447, 'indulge', 'indulged', 'indulged', 'indulging', 'memanjakan diri'), (448, 'infect', 'infected', 'infected', 'infecting', 'menulari'), (449, 'infest', 'infested', 'infested', 'infesting', 'menduduki'), (450, 'inflame', 'inflamed', 'inflamed', 'inflaming', 'terangsang'), (451, 'inflate', 'inflated', 'inflated', 'inflating', 'memompa'), (452, 'inflect', 'inflected', 'inflected', 'inflecting', 'berinfleksi'), (453, 'inform', 'informed', 'informed', 'informing', 'memberitahu'), (454, 'infringe', 'infringed', 'infringed', 'infringing', 'melanggar'), (455, 'infuse', 'infused', 'infused', 'infusing', 'menanamkan'), (456, 'ingest', 'ingested', 'ingested', 'ingesting', 'menelan'), (457, 'inhabit', 'inhabited', 'inhabited', 'inhabiting', 'menghuni'), (458, 'inhale', 'inhaled', 'inhaled', 'inhaling', 'menghirup'), (459, 'inherit', 'inherited', 'inherited', 'inheriting', 'mewarisi'), (460, 'initiate', 'initiated', 'initiated', 'initiating', 'memulai'), (461, 'inject', 'injected', 'injected', 'injecting', 'menyuntikkan'), (462, 'injure', 'injured', 'injured', 'injuring', 'melukai'), (463, 'inlay', 'inlaid', 'inlaid', 'inlaying', 'tatahan'), (464, 'innovate', 'innovated', 'innovated', 'innovating', 'berinovasi'), (465, 'input', 'input', 'input', 'inputting', 'memasukkan'), (466, 'inquire', 'inquired', 'inquired', 'inquiring', 'menanyakan'), (467, 'inscribe', 'inscribed', 'inscribed', 'inscribing', 'menuliskan'), (468, 'insert', 'inserted', 'inserted', 'inserting', 'memasukkan'), (469, 'inspect', 'inspected', 'inspected', 'inspecting', 'memeriksa'), (470, 'inspire', 'inspired', 'inspired', 'inspiring', 'mengilhami'), (471, 'install', 'installed', 'installed', 'installing', 'Install'), (472, 'insult', 'insulted', 'insulted', 'insulting', 'menghina'), (473, 'insure', 'insured', 'insured', 'insuring', 'memastikan'), (474, 'integrate', 'integrated', 'integrated', 'integrating', 'mengintegrasikan'), (475, 'introduce', 'introduced', 'introduced', 'introducing', 'memperkenalkan'), (476, 'invent', 'invented', 'invented', 'inventing', 'menciptakan'), (477, 'invite', 'invited', 'invited', 'inviting', 'Undang'), (478, 'join', 'joined', 'joined', 'joining', 'Ikuti'), (479, 'jump', 'jumped', 'jumped', 'jumping', 'melompat'), (480, 'justify', 'justified', 'justified', 'justifying', 'membenarkan'), (481, 'keep', 'kept', 'kept', 'keeping', 'menjaga'), (482, 'kick', 'kicked', 'kicked', 'kicking', 'tendangan'), (483, 'kid', 'kidded', 'kidded', 'kidding', 'anak'), (484, 'kill', 'killed', 'killed', 'killing', 'membunuh'), (485, 'kiss', 'kissed', 'kissed', 'kissing', 'ciuman'), (486, 'kneel', 'knelt', 'knelt', 'kneeling', 'berlutut'), (487, 'knit', 'knit', 'knit', 'knitting', 'merajut'), (488, 'knock', 'knocked', 'knocked', 'knocking', 'ketukan'), (489, 'know', 'knew', 'known', 'knowing', 'tahu'), (490, 'lade', 'laded', 'laden', 'lading', 'memuatkan'), (491, 'land', 'landed', 'landed', 'landing', 'tanah'), (492, 'last', 'lasted', 'lasted', 'lasting', 'terakhir'), (493, 'latch', 'latched', 'latched', 'latching', 'memalangi'), (494, 'laugh', 'laughed', 'laughed', 'laughing', 'tertawa'), (495, 'lay', 'laid', 'laid', 'laying', 'awam'), (496, 'lead', 'led', 'led', 'leading', 'memimpin'), (497, 'leak', 'leaked', 'leaked', 'leaking', 'kebocoran'), (498, 'lean', 'leant', 'leant', 'leaning', 'kurus'), (499, 'leap', 'leapt', 'leapt', 'leaping', 'lompatan'), (500, 'learn', 'learnt', 'learnt', 'learning', 'belajar'), (501, 'leave', 'left', 'left', 'leaving', 'meninggalkan'), (502, 'leer', 'leered', 'leered', 'leering', 'lirik'), (503, 'lend', 'lent', 'lent', 'lending', 'meminjamkan'), (504, 'let', 'let', 'let', 'letting', 'membiarkan'), (505, 'lick', 'licked', 'licked', 'licking', 'menjilat'), (506, 'lie', 'lay', 'lain', 'lying', 'berbohong'), (507, 'lie', 'lied', 'lied', 'lying', 'berbohong'), (508, 'lift', 'lifted', 'lifted', 'lifting', 'mengangkat'), (509, 'light', 'lit', 'lit', 'lighting', 'cahaya'), (510, 'like', 'liked', 'liked', 'liking', 'Suka'), (511, 'limp', 'limped', 'limped', 'limping', 'lemas'), (512, 'listen', 'listened', 'listened', 'listening', 'mendengarkan'), (513, 'live', 'lived', 'lived', 'living', 'hidup'), (514, 'look', 'looked', 'looked', 'looking', 'Lihat'), (515, 'lose', 'lost', 'lost', 'losing', 'kalah'), (516, 'love', 'loved', 'loved', 'loving', 'cinta'), (517, 'magnify', 'magnified', 'magnified', 'magnifying', 'memperbesar'), (518, 'maintain', 'maintained', 'maintained', 'maintaining', 'mempertahankan'), (519, 'make', 'made', 'made', 'making', 'membuat'), (520, 'manage', 'managed', 'managed', 'managing', 'mengelola'), (521, 'march', 'marched', 'marched', 'marching', 'Maret'), (522, 'mark', 'marked', 'marked', 'marking', 'menandai'), (523, 'marry', 'married', 'married', 'marrying', 'nikah'), (524, 'mash', 'mashed', 'mashed', 'mashing', 'mash'), (525, 'match', 'matched', 'matched', 'matching', 'pertandingan'), (526, 'matter', 'mattered', 'mattered', 'mattering', 'masalah'), (527, 'mean', 'meant', 'meant', 'meaning', 'berarti'), (528, 'measure', 'measured', 'measured', 'measuring', 'mengukur'), (529, 'meet', 'met', 'met', 'meeting', 'memenuhi'), (530, 'melt', 'melted', 'melted', 'melting', 'mencair'), (531, 'merge', 'merged', 'merged', 'merging', 'menggabungkan'), (532, 'mew', 'mewed', 'mewed', 'mewing', 'mengeong'), (533, 'migrate', 'migrated', 'migrated', 'migrating', 'migrasi'), (534, 'milk', 'milked', 'milked', 'milking', 'susu'), (535, 'mind', 'minded', 'minded', 'minding', 'pikiran'), (536, 'mislead', 'misled', 'misled', 'misleading', 'menyesatkan'), (537, 'miss', 'missed', 'missed', 'missing', 'Rindu'), (538, 'mistake', 'mistook', 'mistaken', 'mistaking', 'kesalahan'), (539, 'misuse', 'misused', 'misused', 'misusing', 'penyalahgunaan'), (540, 'mix', 'mixed', 'mixed', 'mixing', 'campuran'), (541, 'moan', 'moaned', 'moaned', 'moaning', 'mengerang'), (542, 'modify', 'modified', 'modified', 'modifying', 'memodifikasi'), (543, 'moo', 'mooed', 'mooed', 'mooing', 'melenguh'), (544, 'motivate', 'motivated', 'motivated', 'motivating', 'motivasi'), (545, 'mould', 'moulded', 'moulded', 'moulding', 'cetakan'), (546, 'moult', 'moulted', 'moulted', 'moulting', 'meranggas'), (547, 'move', 'moved', 'moved', 'moving', 'pindah'), (548, 'mow', 'mowed', 'mown', 'mowing', 'memotong rumput'), (549, 'multiply', 'multiplied', 'multiplied', 'multiplying', 'berkembang biak'), (550, 'murmur', 'murmured', 'murmured', 'murmuring', 'berbisik'), (551, 'nail', 'nailed', 'nailed', 'nailing', 'kuku'), (552, 'nap', 'napped', 'napped', 'napping', 'tidur sebentar'), (553, 'need', 'needed', 'needed', 'needing', 'perlu'), (554, 'neglect', 'neglected', 'neglected', 'neglecting', 'mengabaikan'), (555, 'nip', 'nipped', 'nipped', 'nipping', 'gigit'), (556, 'nod', 'nodded', 'nodded', 'nodding', 'anggukan'), (557, 'note', 'noted', 'noted', 'noting', 'catatan'), (558, 'notice', 'noticed', 'noticed', 'noticing', 'memperhatikan'), (559, 'notify', 'notified', 'notified', 'notifying', 'memberitahukan'), (560, 'nourish', 'nourished', 'nourished', 'nourishing', 'memelihara'), (561, 'nurse', 'nursed', 'nursed', 'nursing', 'perawat'), (562, 'obey', 'obeyed', 'obeyed', 'obeying', 'mematuhi'), (563, 'oblige', 'obliged', 'obliged', 'obliging', 'mewajibkan'), (564, 'observe', 'observed', 'observed', 'observing', 'mengamati'), (565, 'obstruct', 'obstructed', 'obstructed', 'obstructing', 'menghalangi'), (566, 'obtain', 'obtained', 'obtained', 'obtaining', 'memperoleh'), (567, 'occupy', 'occupied', 'occupied', 'occupying', 'menempati'), (568, 'occur', 'occurred', 'occurred', 'occurring', 'terjadi'), (569, 'offer', 'offered', 'offered', 'offering', 'menawarkan'), (570, 'offset', 'offset', 'offset', 'offsetting', 'mengimbangi'), (571, 'omit', 'omitted', 'omitted', 'omitting', 'menghilangkan'), (572, 'ooze', 'oozed', 'oozed', 'oozing', 'keluar'), (573, 'open', 'opened', 'opened', 'opening', 'Buka'), (574, 'operate', 'operated', 'operated', 'operating', 'beroperasi'), (575, 'opine', 'opined', 'opined', 'opining', 'berpendapat'), (576, 'oppress', 'oppressed', 'oppressed', 'oppressing', 'menindas'), (577, 'opt', 'opted', 'opted', 'opting', 'memilih'), (578, 'optimize', 'optimized', 'optimized', 'optimizing', 'optimalkan'), (579, 'order', 'ordered', 'ordered', 'ordering', 'memesan'), (580, 'organize', 'organized', 'organized', 'organizing', 'mengatur'), (581, 'originate', 'originated', 'originated', 'originating', 'berasal'), (582, 'output', 'output', 'output', 'outputting', 'keluaran'), (583, 'overflow', 'overflowed', 'overflowed', 'overflowing', 'meluap'), (584, 'overtake', 'overtook', 'overtaken', 'overtaking', 'menyusul'), (585, 'owe', 'owed', 'owed', 'owing', 'berhutang'), (586, 'own', 'owned', 'owned', 'owning', 'sendiri'), (587, 'pacify', 'pacified', 'pacified', 'pacifying', 'menenangkan'), (588, 'paint', 'painted', 'painted', 'painting', 'cat'), (589, 'pardon', 'pardoned', 'pardoned', 'pardoning', 'Maaf'), (590, 'part', 'parted', 'parted', 'parting', 'bagian'), (591, 'partake', 'partook', 'partaken', 'partaking', 'mengambil bagian'), (592, 'participate', 'participated', 'participated', 'participating', 'ikut'), (593, 'pass', 'passed', 'passed', 'passing', 'lulus'), (594, 'paste', 'pasted', 'pasted', 'pasting', 'tempel'), (595, 'pat', 'patted', 'patted', 'patting', 'menepuk'), (596, 'patch', 'patched', 'patched', 'patching', 'tambalan'), (597, 'pause', 'paused', 'paused', 'pausing', 'berhenti sebentar'), (598, 'pay', 'paid', 'paid', 'paying', 'membayar'), (599, 'peep', 'peeped', 'peeped', 'peeping', 'mengintip'), (600, 'perish', 'perished', 'perished', 'perishing', 'binasa'), (601, 'permit', 'permitted', 'permitted', 'permitting', 'izin'), (602, 'persuade', 'persuaded', 'persuaded', 'persuading', 'membujuk'), (603, 'phone', 'phoned', 'phoned', 'phoning', 'telepon'), (604, 'place', 'placed', 'placed', 'placing', 'tempat'), (605, 'plan', 'planned', 'planned', 'planning', 'rencana'), (606, 'play', 'played', 'played', 'playing', 'bermain'), (607, 'plead', 'pled', 'pled', 'pleading', 'mengaku'), (608, 'please', 'pleased', 'pleased', 'pleasing', 'silahkan'), (609, 'plod', 'plodded', 'plodded', 'plodding', 'terus bekerja keras'), (610, 'plot', 'plotted', 'plotted', 'plotting', 'merencanakan'), (611, 'pluck', 'plucked', 'plucked', 'plucking', 'memetik'), (612, 'ply', 'plied', 'plied', 'plying', 'lapis'), (613, 'point', 'pointed', 'pointed', 'pointing', 'titik'), (614, 'polish', 'polished', 'polished', 'polishing', 'Polandia'), (615, 'pollute', 'polluted', 'polluted', 'polluting', 'mengotori'), (616, 'ponder', 'pondered', 'pondered', 'pondering', 'merenungkan'), (617, 'pour', 'poured', 'poured', 'pouring', 'menuangkan'), (618, 'pout', 'pouted', 'pouted', 'pouting', 'mencibir'), (619, 'practise', 'practised', 'practised', 'practising', 'praktek'), (620, 'praise', 'praised', 'praised', 'praising', 'memuji'), (621, 'pray', 'prayed', 'prayed', 'praying', 'berdoa'), (622, 'preach', 'preached', 'preached', 'preaching', 'berkhotbah'), (623, 'prefer', 'preferred', 'preferred', 'preferring', 'lebih suka'), (624, 'prepare', 'prepared', 'prepared', 'preparing', 'mempersiapkan'), (625, 'prescribe', 'prescribed', 'prescribed', 'prescribing', 'menentukan'), (626, 'present', 'presented', 'presented', 'presenting', 'menyajikan'), (627, 'preserve', 'preserved', 'preserved', 'preserving', 'melestarikan'), (628, 'preset', 'preset', 'preset', 'presetting', 'preset'), (629, 'preside', 'presided', 'presided', 'presiding', 'memimpin'), (630, 'press', 'pressed', 'pressed', 'pressing', 'tekan'), (631, 'pretend', 'pretended', 'pretended', 'pretending', 'berpura-pura'), (632, 'prevent', 'prevented', 'prevented', 'preventing', 'mencegah'), (633, 'print', 'printed', 'printed', 'printing', 'mencetak'), (634, 'proceed', 'proceeded', 'proceeded', 'proceeding', 'memproses'), (635, 'produce', 'produced', 'produced', 'producing', 'menghasilkan'), (636, 'progress', 'progressed', 'progressed', 'progressing', 'kemajuan'), (637, 'prohibit', 'prohibited', 'prohibited', 'prohibiting', 'melarang'), (638, 'promise', 'promised', 'promised', 'promising', 'janji'), (639, 'propose', 'proposed', 'proposed', 'proposing', 'mengusulkan'), (640, 'prosecute', 'prosecuted', 'prosecuted', 'prosecuting', 'menuntut'), (641, 'protect', 'protected', 'protected', 'protecting', 'melindungi'), (642, 'prove', 'proved', 'proved', 'proving', 'membuktikan'), (643, 'provide', 'provided', 'provided', 'providing', 'menyediakan'), (644, 'pull', 'pulled', 'pulled', 'pulling', 'Tarik'), (645, 'punish', 'punished', 'punished', 'punishing', 'menghukum'), (646, 'purify', 'purified', 'purified', 'purifying', 'memurnikan'), (647, 'push', 'pushed', 'pushed', 'pushing', 'Dorong'), (648, 'put', 'put', 'put', 'putting', 'taruh'), (649, 'qualify', 'qualified', 'qualified', 'qualifying', 'memenuhi syarat'), (650, 'quarrel', 'quarrelled', 'quarrelled', 'quarrelling', 'bertengkar'), (651, 'question', 'questioned', 'questioned', 'questioning', 'pertanyaan'), (652, 'quit', 'quit', 'quit', 'quitting', 'berhenti'), (653, 'race', 'raced', 'raced', 'racing', 'ras'), (654, 'rain', 'rained', 'rained', 'raining', 'hujan'), (655, 'rattle', 'rattled', 'rattled', 'rattling', 'berdetak'), (656, 'reach', 'reached', 'reached', 'reaching', 'mencapai'), (657, 'read', 'read', 'read', 'reading', 'Baca'), (658, 'realize', 'realized', 'realized', 'realizing', 'menyadari'), (659, 'rebuild', 'rebuilt', 'rebuilt', 'rebuilding', 'membangun kembali'), (660, 'recall', 'recalled', 'recalled', 'recalling', 'penarikan'), (661, 'recast', 'recast', 'recast', 'recasting', 'perombakan'), (662, 'receive', 'received', 'received', 'receiving', 'menerima'), (663, 'recite', 'recited', 'recited', 'reciting', 'membaca'), (664, 'recognize', 'recognized', 'recognized', 'recognizing', 'mengakui'), (665, 'recollect', 'recollected', 'recollected', 'recollecting', 'mengingat kembali'), (666, 'recur', 'recurred', 'recurred', 'recurring', 'terulang'), (667, 'redo', 'redid', 'redone', 'redoing', 'mengulangi'), (668, 'reduce', 'reduced', 'reduced', 'reducing', 'mengurangi'), (669, 'refer', 'referred', 'referred', 'referring', 'lihat'), (670, 'reflect', 'reflected', 'reflected', 'reflecting', 'mencerminkan'), (671, 'refuse', 'refused', 'refused', 'refusing', 'menolak'), (672, 'regard', 'regarded', 'regarded', 'regarding', 'menganggap'), (673, 'regret', 'regretted', 'regretted', 'regretting', 'penyesalan'), (674, 'relate', 'related', 'related', 'relating', 'berhubungan'), (675, 'relax', 'relaxed', 'relaxed', 'relaxing', 'bersantai'), (676, 'rely', 'relied', 'relied', 'relying', 'mengandalkan'), (677, 'remain', 'remained', 'remained', 'remaining', 'tetap'), (678, 'remake', 'remade', 'remade', 'remaking', 'membuat ulang'), (679, 'remove', 'removed', 'removed', 'removing', 'menghapus'), (680, 'rend', 'rent', 'rent', 'rending', 'membelah'), (681, 'renew', 'renewed', 'renewed', 'renewing', 'memperbarui'), (682, 'renounce', 'renounced', 'renounced', 'renouncing', 'meninggalkan'), (683, 'repair', 'repaired', 'repaired', 'repairing', 'perbaikan'), (684, 'repeat', 'repeated', 'repeated', 'repeating', 'ulang'), (685, 'replace', 'replaced', 'replaced', 'replacing', 'menggantikan'), (686, 'reply', 'replied', 'replied', 'replying', 'balasan'), (687, 'report', 'reported', 'reported', 'reporting', 'melaporkan'), (688, 'request', 'requested', 'requested', 'requesting', 'permintaan'), (689, 'resell', 'resold', 'resold', 'reselling', 'dijual kembali'), (690, 'resemble', 'resembled', 'resembled', 'resembling', 'menyerupai'), (691, 'reset', 'reset', 'reset', 'resetting', 'reset'), (692, 'resist', 'resisted', 'resisted', 'resisting', 'menolak'), (693, 'resolve', 'resolved', 'resolved', 'resolving', 'menyelesaikan'), (694, 'respect', 'respected', 'respected', 'respecting', 'menghormati'), (695, 'rest', 'rested', 'rested', 'resting', 'beristirahat'), (696, 'restrain', 'restrained', 'restrained', 'restraining', 'menahan'), (697, 'retain', 'retained', 'retained', 'retaining', 'menahan'), (698, 'retch', 'retched', 'retched', 'retching', 'muntah'), (699, 'retire', 'retired', 'retired', 'retiring', 'mundur'), (700, 'return', 'returned', 'returned', 'returning', 'kembali'), (701, 'reuse', 'reused', 'reused', 'reusing', 'penggunaan kembali'), (702, 'review', 'reviewed', 'reviewed', 'reviewing', 'ulasan'), (703, 'rewind', 'rewound', 'rewound', 'rewinding', 'mundur'), (704, 'rid', 'rid', 'rid', 'ridding', 'membersihkan'), (705, 'ride', 'rode', 'ridden', 'riding', 'mengendarai'), (706, 'ring', 'rang', 'rung', 'ringing', 'cincin'), (707, 'rise', 'rose', 'risen', 'rising', 'Bangkit'), (708, 'roar', 'roared', 'roared', 'roaring', 'mengaum'), (709, 'rob', 'robbed', 'robbed', 'robbing', 'rampok'), (710, 'roll', 'rolled', 'rolled', 'rolling', 'gulungan'), (711, 'rot', 'rotted', 'rotted', 'rotting', 'membusuk'), (712, 'rub', 'rubbed', 'rubbed', 'rubbing', 'menggosok'), (713, 'rule', 'ruled', 'ruled', 'ruling', 'aturan'), (714, 'run', 'ran', 'run', 'running', 'Lari'), (715, 'rush', 'rushed', 'rushed', 'rushing', 'buru-buru'), (716, 'sabotage', 'sabotaged', 'sabotaged', 'sabotaging', 'sabotase'), (717, 'sack', 'sacked', 'sacked', 'sacking', 'memecat'), (718, 'sacrifice', 'sacrificed', 'sacrificed', 'sacrificing', 'pengorbanan'), (719, 'sadden', 'saddened', 'saddened', 'saddening', 'menyedihkan'), (720, 'saddle', 'saddled', 'saddled', 'saddling', 'pelana'), (721, 'sag', 'sagged', 'sagged', 'sagging', 'melengkung'), (722, 'sail', 'sailed', 'sailed', 'sailing', 'berlayar'), (723, 'sally', 'sallied', 'sallied', 'sallying', 'sally'), (724, 'salute', 'saluted', 'saluted', 'saluting', 'salut'), (725, 'salvage', 'salvaged', 'salvaged', 'salvaging', 'menyelamatkan'), (726, 'salve', 'salved', 'salved', 'salving', 'pelega'), (727, 'sample', 'sampled', 'sampled', 'sampling', 'Sampel'), (728, 'sanctify', 'sanctified', 'sanctified', 'sanctifying', 'menguduskan'), (729, 'sanction', 'sanctioned', 'sanctioned', 'sanctioning', 'sanksi'), (730, 'sap', 'sapped', 'sapped', 'sapping', 'getah'), (731, 'saponify', 'saponified', 'saponified', 'saponifying', 'menyabuni'), (732, 'sash', 'sashed', 'sashed', 'sashing', 'selempang'), (733, 'sashay', 'sashayed', 'sashayed', 'sashaying', 'selempang'), (734, 'sass', 'sassed', 'sassed', 'sassing', 'kelancangan'), (735, 'sate', 'sated', 'sated', 'sating', 'memuaskan'), (736, 'satiate', 'satiated', 'satiated', 'satiating', 'memuaskan'), (737, 'satirise', 'satirised', 'satirised', 'satirising', 'satirise'), (738, 'satisfy', 'satisfied', 'satisfied', 'satisfying', 'memuaskan'), (739, 'saturate', 'saturated', 'saturated', 'saturating', 'jenuh'), (740, 'saunter', 'sauntered', 'sauntered', 'sauntering', 'berjalan santai'), (741, 'save', 'saved', 'saved', 'saving', 'menyimpan'), (742, 'savor', 'savored', 'savored', 'savoring', 'menikmati'), (743, 'savvy', 'savvied', 'savvied', 'savvying', 'mengerti'), (744, 'saw', 'sawed', 'sawn', 'sawing', 'gergaji'), (745, 'say', 'said', 'said', 'saying', 'mengatakan'), (746, 'scab', 'scabbed', 'scabbed', 'scabbing', 'berkeropeng'), (747, 'scabble', 'scabbled', 'scabbled', 'scabbling', 'keropeng'), (748, 'scald', 'scalded', 'scalded', 'scalding', 'melepuh'), (749, 'scale', 'scaled', 'scaled', 'scaling', 'skala'), (750, 'scam', 'scammed', 'scammed', 'scamming', 'penipuan'), (751, 'scan', 'scanned', 'scanned', 'scanning', 'memindai'), (752, 'scant', 'scanted', 'scanted', 'scanting', 'sedikit'), (753, 'scar', 'scarred', 'scarred', 'scarring', 'bekas luka'), (754, 'scare', 'scared', 'scared', 'scaring', 'ketakutan'), (755, 'scarify', 'scarified', 'scarified', 'scarifying', 'menakuti'), (756, 'scarp', 'scarped', 'scarped', 'scarping', 'lereng curam'), (757, 'scat', 'scatted', 'scatted', 'scatting', 'Husy'), (758, 'scatter', 'scattered', 'scattered', 'scattering', 'menyebarkan'), (759, 'scold', 'scolded', 'scolded', 'scolding', 'memarahi'), (760, 'scorch', 'scorched', 'scorched', 'scorching', 'menghanguskan'), (761, 'scowl', 'scowled', 'scowled', 'scowling', 'cemberut'), (762, 'scrawl', 'scrawled', 'scrawled', 'scrawling', 'tulisan cakar ayam'), (763, 'scream', 'screamed', 'screamed', 'screaming', 'berteriak'), (764, 'screw', 'screwed', 'screwed', 'screwing', 'sekrup'), (765, 'scrub', 'scrubbed', 'scrubbed', 'scrubbing', 'menggosok'), (766, 'search', 'searched', 'searched', 'searching', 'Cari'), (767, 'seat', 'seated', 'seated', 'seating', 'kursi'), (768, 'secure', 'secured', 'secured', 'securing', 'aman'), (769, 'see', 'saw', 'seen', 'seeing', 'Lihat'), (770, 'seek', 'sought', 'sought', 'seeking', 'mencari'), (771, 'seem', 'seemed', 'seemed', 'seeming', 'terlihat'), (772, 'seize', 'seized', 'seized', 'seizing', 'merebut'), (773, 'select', 'selected', 'selected', 'selecting', 'Pilih'), (774, 'sell', 'sold', 'sold', 'selling', 'menjual'), (775, 'send', 'sent', 'sent', 'sending', 'Kirim'), (776, 'sentence', 'sentenced', 'sentenced', 'sentencing', 'kalimat'), (777, 'separate', 'separated', 'separated', 'separating', 'terpisah'), (778, 'set', 'set', 'set', 'setting', 'set'), (779, 'sever', 'severed', 'severed', 'severing', 'memutuskan'), (780, 'sew', 'sewed', 'sewn', 'sewing', 'menjahit'), (781, 'shake', 'shook', 'shaken', 'shaking', 'menggoyang'), (782, 'shape', 'shaped', 'shaped', 'shaping', 'bentuk'), (783, 'share', 'shared', 'shared', 'sharing', 'Bagikan'), (784, 'shatter', 'shattered', 'shattered', 'shattering', 'pecah'), (785, 'shave', 'shove', 'shaven', 'shaving', 'mencukur'), (786, 'shear', 'shore', 'shorn', 'shearing', 'mencukur'), (787, 'shed', 'shed', 'shed', 'shedding', 'gudang'), (788, 'shine', 'shone', 'shone', 'shining', 'bersinar'), (789, 'shirk', 'shirked', 'shirked', 'shirking', 'melalaikan'), (790, 'shit', 'shit', 'shit', 'shitting', 'kotoran'), (791, 'shiver', 'shivered', 'shivered', 'shivering', 'menggigil'), (792, 'shock', 'shocked', 'shocked', 'shocking', 'syok'), (793, 'shoe', 'shod', 'shod', 'shoeing', 'sepatu'), (794, 'shoot', 'shot', 'shot', 'shooting', 'menembak'), (795, 'shorten', 'shortened', 'shortened', 'shortening', 'mempersingkat'), (796, 'shout', 'shouted', 'shouted', 'shouting', 'berteriak'), (797, 'show', 'showed', 'shown', 'showing', 'menunjukkan'), (798, 'shrink', 'shrank', 'shrunk', 'shrinking', 'menyusut'), (799, 'shun', 'shunned', 'shunned', 'shunning', 'menghindari'), (800, 'shut', 'shut', 'shut', 'shutting', 'menutup'), (801, 'sight', 'sighted', 'sighted', 'sighting', 'melihat'), (802, 'signal', 'signalled', 'signalled', 'signalling', 'sinyal'), (803, 'signify', 'signified', 'signified', 'signifying', 'menandakan'), (804, 'sing', 'sang', 'sung', 'singing', 'bernyanyi'), (805, 'sink', 'sank', 'sunk', 'sinking', 'wastafel'), (806, 'sip', 'sipped', 'sipped', 'sipping', 'menyesap'), (807, 'sit', 'sat', 'sat', 'sitting', 'duduk'), (808, 'ski', 'skied', 'skied', 'skiing', 'main ski'), (809, 'skid', 'skidded', 'skidded', 'skidding', 'selip'), (810, 'slam', 'slammed', 'slammed', 'slamming', 'membanting'), (811, 'slay', 'slew', 'slain', 'slaying', 'membunuh'), (812, 'sleep', 'slept', 'slept', 'sleeping', 'tidur'); INSERT INTO `word` (`id`, `verb1`, `verb2`, `verb3`, `ing`, `arti`) VALUES (813, 'slide', 'slid', 'slid/slide', 'sliding', 'meluncur'), (814, 'slim', 'slimmed', 'slimmed', 'slimming', 'ramping'), (815, 'sling', 'slung', 'slung', 'slinging', 'pengumban'), (816, 'slink', 'slunk', 'slunk', 'slinking', 'menyelinap'), (817, 'slip', 'slipped', 'slipped', 'slipping', 'tergelincir'), (818, 'slit', 'slit', 'slit', 'slitting', 'celah'), (819, 'smash', 'smashed', 'smashed', 'smashing', 'menghancurkan'), (820, 'smell', 'smelt', 'smelt', 'smelling', 'bau'), (821, 'smile', 'smiled', 'smiled', 'smiling', 'tersenyum'), (822, 'smite', 'smote', 'smitten', 'smiting', 'memukul'), (823, 'smooth', 'smoothed', 'smoothed', 'smoothing', 'halus'), (824, 'smother', 'smothered', 'smothered', 'smothering', 'melimpahi'), (825, 'snap', 'snapped', 'snapped', 'snapping', 'jepret'), (826, 'snatch', 'snatched', 'snatched', 'snatching', 'merebut'), (827, 'sneak', 'snuck', 'snuck', 'sneaking', 'menyelinap'), (828, 'sneeze', 'sneezed', 'sneezed', 'sneezing', 'bersin'), (829, 'sniff', 'sniffed', 'sniffed', 'sniffing', 'mengendus'), (830, 'soar', 'soared', 'soared', 'soaring', 'melonjak'), (831, 'sob', 'sobbed', 'sobbed', 'sobbing', 'menangis'), (832, 'solicit', 'solicited', 'solicited', 'soliciting', 'mengumpulkan'), (833, 'solve', 'solved', 'solved', 'solving', 'memecahkan'), (834, 'soothe', 'soothed', 'soothed', 'soothing', 'menenangkan'), (835, 'sort', 'sorted', 'sorted', 'sorting', 'menyortir'), (836, 'sow', 'sowed', 'sowed', 'sowing', 'menabur'), (837, 'sparkle', 'sparkled', 'sparkled', 'sparkling', 'berkilau'), (838, 'speak', 'spoke', 'spoken', 'speaking', 'berbicara'), (839, 'speed', 'sped', 'sped', 'speeding', 'kecepatan'), (840, 'spell', 'spelt', 'spelt', 'spelling', 'mengeja'), (841, 'spend', 'spent', 'spent', 'spending', 'menghabiskan'), (842, 'spill', 'spilt', 'spilt', 'spilling', 'tumpahan'), (843, 'spin', 'span/spun', 'spun', 'spinning', 'berputar'), (844, 'spit', 'spat/spit', 'spat/spit', 'spitting', 'meludah'), (845, 'split', 'split', 'split', 'splitting', 'membagi'), (846, 'spoil', 'spoilt', 'spoilt', 'spoiling', 'memanjakan'), (847, 'spray', 'sprayed', 'sprayed', 'spraying', 'semprot'), (848, 'spread', 'spread', 'spread', 'spreading', 'sebaran'), (849, 'spring', 'sprang', 'sprung', 'springing', 'musim semi'), (850, 'sprout', 'sprouted', 'sprouted', 'sprouting', 'tumbuh'), (851, 'squeeze', 'squeezed', 'squeezed', 'squeezing', 'meremas'), (852, 'stand', 'stood', 'stood', 'standing', 'berdiri'), (853, 'stare', 'stared', 'stared', 'staring', 'menatap'), (854, 'start', 'started', 'started', 'starting', 'Mulailah'), (855, 'state', 'stated', 'stated', 'stating', 'negara'), (856, 'stay', 'stayed', 'stayed', 'staying', 'tinggal'), (857, 'steal', 'stole', 'stolen', 'stealing', 'mencuri'), (858, 'steep', 'steeped', 'steeped', 'steeping', 'curam'), (859, 'stem', 'stemmed', 'stemmed', 'stemming', 'batang'), (860, 'step', 'stepped', 'stepped', 'stepping', 'langkah'), (861, 'sterilize', 'sterilized', 'sterilized', 'sterilizing', 'mensterilkan'), (862, 'stick', 'stuck', 'stuck', 'sticking', 'tongkat'), (863, 'stimulate', 'stimulated', 'stimulated', 'stimulating', 'merangsang'), (864, 'sting', 'stung', 'stung', 'stinging', 'menyengat'), (865, 'stink', 'stank', 'stunk', 'stinking', 'bau'), (866, 'stir', 'stirred', 'stirred', 'stirring', 'menggerakkan'), (867, 'stitch', 'stitched', 'stitched', 'stitching', 'menjahit'), (868, 'stoop', 'stooped', 'stooped', 'stooping', 'membungkuk'), (869, 'stop', 'stopped', 'stopped', 'stopping', 'berhenti'), (870, 'store', 'stored', 'stored', 'storing', 'toko'), (871, 'strain', 'strained', 'strained', 'straining', 'regangan'), (872, 'stray', 'strayed', 'strayed', 'straying', 'menyimpang'), (873, 'stress', 'stressed', 'stressed', 'stressing', 'menekankan'), (874, 'stretch', 'stretched', 'stretched', 'stretching', 'meregang'), (875, 'strew', 'strewed', 'strewn', 'strewing', 'menaburi'), (876, 'stride', 'strode', 'stridden', 'striding', 'melangkah'), (877, 'strike', 'struck', 'struck/stricken', 'striking', 'menyerang'), (878, 'string', 'strung', 'strung', 'stringing', 'tali'), (879, 'strive', 'strove', 'striven', 'striving', 'berjuang'), (880, 'study', 'studied', 'studied', 'studying', 'belajar'), (881, 'submit', 'submitted', 'submitted', 'submitting', 'Kirimkan'), (882, 'subscribe', 'subscribed', 'subscribed', 'subscribing', 'langganan'), (883, 'subtract', 'subtracted', 'subtracted', 'subtracting', 'mengurangi'), (884, 'succeed', 'succeeded', 'succeeded', 'succeeding', 'berhasil'), (885, 'suck', 'sucked', 'sucked', 'sucking', 'mengisap'), (886, 'suffer', 'suffered', 'suffered', 'suffering', 'menderita'), (887, 'suggest', 'suggested', 'suggested', 'suggesting', 'menyarankan'), (888, 'summon', 'summoned', 'summoned', 'summoning', 'memanggil'), (889, 'supply', 'supplied', 'supplied', 'supplying', 'Pasokan'), (890, 'support', 'supported', 'supported', 'supporting', 'dukung'), (891, 'suppose', 'supposed', 'supposed', 'supposing', 'seharusnya'), (892, 'surge', 'surged', 'surged', 'surging', 'lonjakan'), (893, 'surmise', 'surmised', 'surmised', 'surmising', 'menduga'), (894, 'surpass', 'surpassed', 'surpassed', 'surpassing', 'melampaui'), (895, 'surround', 'surrounded', 'surrounded', 'surrounding', 'mengelilingi'), (896, 'survey', 'surveyed', 'surveyed', 'surveying', 'survei'), (897, 'survive', 'survived', 'survived', 'surviving', 'bertahan'), (898, 'swallow', 'swallowed', 'swallowed', 'swallowing', 'menelan'), (899, 'sway', 'swayed', 'swayed', 'swaying', 'bergoyang'), (900, 'swear', 'swore', 'sworn', 'swearing', 'bersumpah'), (901, 'sweat', 'sweat', 'sweat', 'sweating', 'keringat'), (902, 'sweep', 'swept', 'swept', 'sweeping', 'menyapu'), (903, 'swell', 'swelled', 'swollen', 'swelling', 'membengkak'), (904, 'swim', 'swam', 'swum', 'swimming', 'berenang'), (905, 'swing', 'swung', 'swung', 'swinging', 'ayunan'), (906, 'swot', 'swotted', 'swotted', 'swotting', 'kerja keras'), (907, 'take', 'took', 'taken', 'taking', 'mengambil'), (908, 'talk', 'talked', 'talked', 'talking', 'berbicara'), (909, 'tap', 'tapped', 'tapped', 'tapping', 'keran'), (910, 'taste', 'tasted', 'tasted', 'tasting', 'rasa'), (911, 'tax', 'taxed', 'taxed', 'taxing', 'pajak'), (912, 'teach', 'taught', 'taught', 'teaching', 'mengajar'), (913, 'tear', 'tore', 'torn', 'tearing', 'air mata'), (914, 'tee', 'teed', 'teed', 'teeing', 'tee'), (915, 'tell', 'told', 'told', 'telling', 'menceritakan'), (916, 'tempt', 'tempted', 'tempted', 'tempting', 'menggoda'), (917, 'tend', 'tended', 'tended', 'tending', 'cenderung'), (918, 'terminate', 'terminated', 'terminated', 'terminating', 'mengakhiri'), (919, 'terrify', 'terrified', 'terrified', 'terrifying', 'menakuti'), (920, 'test', 'tested', 'tested', 'testing', 'uji'), (921, 'thank', 'thanked', 'thanked', 'thanking', 'terima kasih'), (922, 'think', 'thought', 'thought', 'thinking', 'berpikir'), (923, 'thrive', 'throve', 'thriven', 'thriving', 'berkembang'), (924, 'throw', 'threw', 'thrown', 'throwing', 'melemparkan'), (925, 'thrust', 'thrust', 'thrust', 'thrusting', 'dorongan'), (926, 'thump', 'thumped', 'thumped', 'thumping', 'berdebar'), (927, 'tie', 'tied', 'tied', 'tying', 'dasi'), (928, 'tire', 'tired', 'tired', 'tiring', 'ban'), (929, 'toss', 'tossed', 'tossed', 'tossing', 'melemparkan'), (930, 'touch', 'touched', 'touched', 'touching', 'menyentuh'), (931, 'train', 'trained', 'trained', 'training', 'melatih'), (932, 'trample', 'trampled', 'trampled', 'trampling', 'menginjak-injak'), (933, 'transfer', 'transferred', 'transferred', 'transferring', 'transfer'), (934, 'transform', 'transformed', 'transformed', 'transforming', 'mengubah'), (935, 'translate', 'translated', 'translated', 'translating', 'menterjemahkan'), (936, 'trap', 'trapped', 'trapped', 'trapping', 'perangkap'), (937, 'travel', 'travelled', 'travelled', 'travelling', 'perjalanan'), (938, 'tread', 'trod', 'trodden', 'treading', 'tapak'), (939, 'treasure', 'treasured', 'treasured', 'treasuring', 'harta'), (940, 'treat', 'treated', 'treated', 'treating', 'memperlakukan'), (941, 'tree', 'treed', 'treed', 'treeing', 'pohon'), (942, 'tremble', 'trembled', 'trembled', 'trembling', 'gemetar'), (943, 'triumph', 'triumphed', 'triumphed', 'triumphing', 'kemenangan'), (944, 'trust', 'trusted', 'trusted', 'trusting', 'kepercayaan'), (945, 'try', 'tried', 'tried', 'trying', 'mencoba'), (946, 'turn', 'turned', 'turned', 'turning', 'belok'), (947, 'type', 'typed', 'typed', 'typing', 'Tipe'), (948, 'typeset', 'typeset', 'typeset', 'typesetting', 'mengeset'), (949, 'understand', 'understood', 'understood', 'understanding', 'memahami'), (950, 'undo', 'undid', 'undone', 'undoing', 'membuka'), (951, 'uproot', 'uprooted', 'uprooted', 'uprooting', 'menumbangkan'), (952, 'upset', 'upset', 'upset', 'upsetting', 'kesal'), (953, 'urge', 'urged', 'urged', 'urging', 'dorongan'), (954, 'use', 'used', 'used', 'using', 'menggunakan'), (955, 'utter', 'uttered', 'uttered', 'uttering', 'mengucapkan'), (956, 'value', 'valued', 'valued', 'valuing', 'nilai'), (957, 'vanish', 'vanished', 'vanished', 'vanishing', 'lenyap'), (958, 'vary', 'varied', 'varied', 'varying', 'berbeda'), (959, 'verify', 'verified', 'verified', 'verifying', 'memeriksa'), (960, 'vex', 'vexed', 'vexed', 'vexing', 'menyusahkan'), (961, 'vie', 'vied', 'vied', 'vying', 'bersaing'), (962, 'view', 'viewed', 'viewed', 'viewing', 'melihat'), (963, 'violate', 'violated', 'violated', 'violating', 'melanggar'), (964, 'vomit', 'vomited', 'vomited', 'vomiting', 'muntahan'), (965, 'wake', 'woke', 'woken', 'waking', 'bangun'), (966, 'walk', 'walked', 'walked', 'walking', 'berjalan'), (967, 'wander', 'wandered', 'wandered', 'wandering', 'mengembara'), (968, 'want', 'wanted', 'wanted', 'wanting', 'ingin'), (969, 'warn', 'warned', 'warned', 'warning', 'memperingatkan'), (970, 'waste', 'wasted', 'wasted', 'wasting', 'limbah'), (971, 'watch', 'watched', 'watched', 'watching', 'menonton'), (972, 'water', 'watered', 'watered', 'watering', 'air'), (973, 'wave', 'waved', 'waved', 'waving', 'gelombang'), (974, 'wax', 'waxed', 'waxed', 'waxing', 'lilin'), (975, 'waylay', 'waylaid', 'waylaid', 'waylaying', 'menghentikan'), (976, 'wear', 'wore', 'worn', 'wearing', 'memakai'), (977, 'weave', 'wove', 'woven', 'weaving', 'menenun'), (978, 'wed', 'wed', 'wed', 'wedding', 'mengawinkan'), (979, 'weep', 'wept', 'wept', 'weeping', 'menangis'), (980, 'weigh', 'weighed', 'weighed', 'weighing', 'Menimbang'), (981, 'welcome', 'welcomed', 'welcomed', 'welcoming', 'Selamat datang'), (982, 'wend', 'went', 'went', 'wending', 'pergi ke'), (983, 'wet', 'wet', 'wet', 'wetting', 'basah'), (984, 'whip', 'whipped', 'whipped', 'whipping', 'cambuk'), (985, 'whisper', 'whispered', 'whispered', 'whispering', 'bisikan'), (986, 'win', 'won', 'won', 'winning', 'menang'), (987, 'wind', 'wound', 'wound', 'winding', 'angin'), (988, 'wish', 'wished', 'wished', 'wishing', 'ingin'), (989, 'withdraw', 'withdrew', 'withdrawn', 'withdrawing', 'menarik'), (990, 'work', 'worked', 'worked', 'working', 'kerja'), (991, 'worry', 'worried', 'worried', 'worrying', 'khawatir'), (992, 'worship', 'worshipped', 'worshipped', 'worshipping', 'menyembah'), (993, 'wring', 'wrung', 'wrung', 'wringing', 'memeras'), (994, 'write', 'wrote', 'written', 'writing', 'menulis'), (995, 'yawn', 'yawned', 'yawned', 'yawning', 'menguap'), (996, 'yell', 'yelled', 'yelled', 'yelling', 'berteriak'), (997, 'yield', 'yielded', 'yielded', 'yielding', 'menghasilkan'), (998, 'zinc', 'zincked', 'zincked', 'zincking', 'seng'), (999, 'zoom', 'zoomed', 'zoomed', 'zooming', 'Perbesar'); -- -- Indexes for dumped tables -- -- -- Indexes for table `word` -- ALTER TABLE `word` ADD PRIMARY KEY (`id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `word` -- ALTER TABLE `word` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1000; 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
3adab632667cafac1956cd0e8caf15493ac86c74
SQL
cr1315/leetcode_database
/LC0610.sql
UTF-8
373
3.625
4
[]
no_license
create database `LC0610`; use LC0610; Create table If Not Exists triangle (x int, y int, z int); Truncate table triangle; insert into triangle (x, y, z) values ('13', '15', '30'); insert into triangle (x, y, z) values ('10', '20', '15'); SELECT x, y, z, CASE when x + y > z and x + z > y and y + z > x then 'Yes' ELSE 'No' end as triangle from triangle;
true
a564082bd9a4cb42772ad9be2620243f365e76c0
SQL
koreahong/bigquery
/ch08/27.sql
UTF-8
162
3.421875
3
[]
no_license
WITH days AS ( SELECT GENERATE_DATE_ARRAY('2019-06-23', '2019-08-22', INTERVAL 10 DAY) AS summer ) SELECT summer_day FROM days, UNNEST(summer) AS summer_day
true
51d80e298ab297f29e4d8cad14af2ab349e81014
SQL
SethDeSilva10/cse414
/hw3/submission/hw3-q6.sql
UTF-8
476
3.421875
3
[]
no_license
-- question six with subFlight as (select distinct f1.carrier_id from FLIGHTS as f1 where f1.origin_city = 'Seattle WA' and f1.dest_city = 'San Francisco CA') select c1.name as carrier from CARRIERS as c1, subFlight as sub where c1.cid = sub.carrier_id order by c1.name asc; /* result: 1.the number of the query returns 4 2.how long the query took 6 3.first 20 rows of the results CARRIER Alaska Airlines Inc. SkyWest Airlines Inc. United Air Lines Inc. Virgin America */
true
0c4a91196aecd8dd8205d96aee4be9181e1ab120
SQL
yunzhangMr/footprint
/footprint.sql
UTF-8
41,870
3.3125
3
[]
no_license
-- -------------------------------------------------------- -- 主机: 127.0.0.1 -- 服务器版本: 5.6.26 - MySQL Community Server (GPL) -- 服务器操作系统: Win32 -- HeidiSQL 版本: 9.3.0.4984 -- -------------------------------------------------------- /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET NAMES utf8mb4 */; /*!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' */; -- 导出 footprint 的数据库结构 CREATE DATABASE IF NOT EXISTS `footprint` /*!40100 DEFAULT CHARACTER SET utf8mb4 */; USE `footprint`; -- 导出 表 footprint.f_actionlog 结构 CREATE TABLE IF NOT EXISTS `f_actionlog` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', `createtime` datetime DEFAULT '0000-00-00 00:00:00' COMMENT '操作时间', `actionname` varchar(20) DEFAULT '' COMMENT '操作名称', `actor` varchar(50) DEFAULT '' COMMENT '操作人', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- 正在导出表 footprint.f_actionlog 的数据:~0 rows (大约) /*!40000 ALTER TABLE `f_actionlog` DISABLE KEYS */; /*!40000 ALTER TABLE `f_actionlog` ENABLE KEYS */; -- 导出 表 footprint.f_baby 结构 CREATE TABLE IF NOT EXISTS `f_baby` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', `bname` varchar(50) DEFAULT '' COMMENT '姓名', `namespell` varchar(64) DEFAULT NULL COMMENT '名字拼音', `gender` varchar(4) DEFAULT '' COMMENT '性别', `birth` date DEFAULT '0000-00-00' COMMENT '生日', `telephone` varchar(20) DEFAULT '' COMMENT '电话', `parent_id` varchar(50) DEFAULT '' COMMENT '家长ID', `parent_name` varchar(50) DEFAULT '' COMMENT '家长姓名', `nursery_id` int(11) DEFAULT '0' COMMENT '幼儿园ID', `createuser` varchar(50) DEFAULT '' COMMENT '创建人员', `createdate` date DEFAULT '0000-00-00' COMMENT '录入日期', `animalsign` varchar(4) DEFAULT '' COMMENT '属相', `nickname` varchar(50) DEFAULT '' COMMENT '乳名', `nurture` varchar(250) DEFAULT '' COMMENT '入园前抚育方式', `status` varchar(10) DEFAULT '' COMMENT '状态', PRIMARY KEY (`id`), UNIQUE KEY `namespell` (`namespell`) ) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8mb4 COMMENT='宝宝信息'; -- 正在导出表 footprint.f_baby 的数据:~2 rows (大约) /*!40000 ALTER TABLE `f_baby` DISABLE KEYS */; INSERT INTO `f_baby` (`id`, `bname`, `namespell`, `gender`, `birth`, `telephone`, `parent_id`, `parent_name`, `nursery_id`, `createuser`, `createdate`, `animalsign`, `nickname`, `nurture`, `status`) VALUES (26, '赵莹', 'ZhaoYing', '女', '2016-12-23', '13343567890', 'ZhaoYing', NULL, 0, '112', '2016-12-23', NULL, NULL, NULL, 'Y'), (27, '李白白', 'LiBaiBai', '男', '2016-12-07', '12345678903', 'LiBaiBai', NULL, 0, '112', '2016-12-23', NULL, NULL, NULL, 'Y'), (28, '李白白', 'LiBaiBai001', '女', '2016-12-07', '', 'LiBaiBai001', NULL, 0, '112', '2016-12-23', NULL, NULL, NULL, 'Y'); /*!40000 ALTER TABLE `f_baby` ENABLE KEYS */; -- 导出 表 footprint.f_babyprofile 结构 CREATE TABLE IF NOT EXISTS `f_babyprofile` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', `baby_id` int(11) DEFAULT '0' COMMENT '宝宝ID', `baby_name` varchar(20) DEFAULT '' COMMENT '宝宝姓名', `createyear` varchar(20) DEFAULT '' COMMENT '学年', `term` varchar(20) DEFAULT '' COMMENT '学期', `grade` varchar(20) DEFAULT '' COMMENT '年级', `createdate` date DEFAULT '0000-00-00' COMMENT '创建时间', `allergenic` varchar(250) DEFAULT '' COMMENT '过敏反应', `congenital` varchar(250) DEFAULT '' COMMENT '疾病或先天病史', `health` varchar(250) DEFAULT '' COMMENT '现在身体状况', `favfood` varchar(250) DEFAULT '' COMMENT '喜欢的食物', `friend` varchar(250) DEFAULT '' COMMENT '喜欢的朋友', `liketodo` varchar(250) DEFAULT '' COMMENT '喜欢做的事', `personality` varchar(250) DEFAULT '' COMMENT '性格特点', `selfcare` varchar(250) DEFAULT '' COMMENT '自理能力', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- 正在导出表 footprint.f_babyprofile 的数据:~0 rows (大约) /*!40000 ALTER TABLE `f_babyprofile` DISABLE KEYS */; /*!40000 ALTER TABLE `f_babyprofile` ENABLE KEYS */; -- 导出 表 footprint.f_baby_class 结构 CREATE TABLE IF NOT EXISTS `f_baby_class` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', `baby_id` int(11) DEFAULT '0' COMMENT '宝宝ID', `class_id` int(11) DEFAULT '0' COMMENT '班级ID', `status` varchar(20) DEFAULT '' COMMENT '状态', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8mb4; -- 正在导出表 footprint.f_baby_class 的数据:~3 rows (大约) /*!40000 ALTER TABLE `f_baby_class` DISABLE KEYS */; INSERT INTO `f_baby_class` (`id`, `baby_id`, `class_id`, `status`) VALUES (1, 1, 2, 'N'), (17, 26, 1318, 'N'), (18, 27, 1318, 'N'), (19, 28, 1318, 'N'); /*!40000 ALTER TABLE `f_baby_class` ENABLE KEYS */; -- 导出 表 footprint.f_class 结构 CREATE TABLE IF NOT EXISTS `f_class` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', `cname` varchar(50) DEFAULT '' COMMENT '名称', `nursery_id` int(11) DEFAULT '0' COMMENT '幼儿园ID', `nursery_name` varchar(50) DEFAULT '' COMMENT '幼儿园名称', `createdate` date DEFAULT '2000-01-01' COMMENT '录入日期', `createyear` varchar(20) DEFAULT '' COMMENT '学年', `grade` varchar(20) DEFAULT '' COMMENT '年级', `term` varchar(20) DEFAULT '' COMMENT '学期', `cnum` varchar(5) DEFAULT '' COMMENT '班数', `teacher1id` varchar(50) DEFAULT '' COMMENT '老师1ID', `teacher2id` varchar(50) DEFAULT '' COMMENT '老师2ID', `teacher3id` varchar(50) DEFAULT '' COMMENT '老师3ID', `teacher1name` varchar(50) DEFAULT '' COMMENT '老师1姓名', `teacher2name` varchar(50) DEFAULT '' COMMENT '老师2姓名', `teacher3name` varchar(50) DEFAULT '' COMMENT '老师3姓名', `previous_id` int(10) DEFAULT NULL COMMENT '上学期班级编号', `status` varchar(10) DEFAULT '1' COMMENT '状态', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1327 DEFAULT CHARSET=utf8mb4 COMMENT='班级'; -- 正在导出表 footprint.f_class 的数据:~9 rows (大约) /*!40000 ALTER TABLE `f_class` DISABLE KEYS */; INSERT INTO `f_class` (`id`, `cname`, `nursery_id`, `nursery_name`, `createdate`, `createyear`, `grade`, `term`, `cnum`, `teacher1id`, `teacher2id`, `teacher3id`, `teacher1name`, `teacher2name`, `teacher3name`, `previous_id`, `status`) VALUES (1318, '大(1)班', 0, '', '2016-12-23', '2016', '大', '上学期', '1', '2', '4', '43', '测试老师', '保健医生', '孙名', NULL, 'Y'), (1319, '大(2)班', 0, '', '2016-12-23', '2016', '大', '上学期', '2', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Y'), (1320, '中(1)班', 0, '', '2016-12-23', '2016', '中', '上学期', '1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Y'), (1321, '中(2)班', 0, '', '2016-12-23', '2016', '中', '上学期', '2', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Y'), (1322, '中(3)班', 0, '', '2016-12-23', '2016', '中', '上学期', '3', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Y'), (1323, '小(1)班', 0, '', '2016-12-23', '2016', '小', '上学期', '1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Y'), (1324, '小(2)班', 0, '', '2016-12-23', '2016', '小', '上学期', '2', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Y'), (1325, '小(3)班', 0, '', '2016-12-23', '2016', '小', '上学期', '3', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Y'), (1326, '小(4)班', 0, '', '2016-12-23', '2016', '小', '上学期', '4', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Y'); /*!40000 ALTER TABLE `f_class` ENABLE KEYS */; -- 导出 表 footprint.f_comment_p_m 结构 CREATE TABLE IF NOT EXISTS `f_comment_p_m` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', `createyear` varchar(20) DEFAULT '' COMMENT '学年', `term` varchar(20) DEFAULT '' COMMENT '学期', `class_id` int(11) DEFAULT '0' COMMENT '班级ID', `createmonth` varchar(50) DEFAULT '' COMMENT '月份', `grade` varchar(20) DEFAULT '' COMMENT '年级', `createdate` date DEFAULT '0000-00-00' COMMENT '录入日期', `baby_id` int(11) DEFAULT '0' COMMENT '宝宝ID', `baby_name` varchar(50) DEFAULT '' COMMENT '宝宝姓名', `nursery_id` int(11) DEFAULT '0' COMMENT '幼儿园ID', `parent_id` varchar(50) DEFAULT '' COMMENT '家长ID', `parent_name` varchar(50) DEFAULT '' COMMENT '家长姓名', `behavior` varchar(250) DEFAULT '' COMMENT '表现', `suggestion` varchar(250) DEFAULT '' COMMENT '建议', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='在家每月总结'; -- 正在导出表 footprint.f_comment_p_m 的数据:~0 rows (大约) /*!40000 ALTER TABLE `f_comment_p_m` DISABLE KEYS */; /*!40000 ALTER TABLE `f_comment_p_m` ENABLE KEYS */; -- 导出 表 footprint.f_comment_p_t 结构 CREATE TABLE IF NOT EXISTS `f_comment_p_t` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', `createyear` char(4) DEFAULT '' COMMENT '创建年度', `createdate` date DEFAULT '0000-00-00' COMMENT '录入日期', `baby_id` int(11) DEFAULT '0' COMMENT '宝宝ID', `baby_name` varchar(50) DEFAULT '' COMMENT '宝宝姓名', `nursery_id` int(11) DEFAULT '0' COMMENT '幼儿园ID', `class_id` int(11) DEFAULT '0' COMMENT '班级ID', `parent_id` varchar(50) DEFAULT '' COMMENT '家长ID', `parent_name` varchar(50) DEFAULT '' COMMENT '家长姓名', `grade` varchar(20) DEFAULT '' COMMENT '年级', `term` varchar(20) DEFAULT '' COMMENT '学期', `sparkle` varchar(250) DEFAULT '' COMMENT '闪光点', `progress` varchar(250) DEFAULT '' COMMENT '进步', `guidance` varchar(250) DEFAULT '' COMMENT '需指导', `hope` varchar(250) DEFAULT '' COMMENT '鼓励', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='在家学期总结'; -- 正在导出表 footprint.f_comment_p_t 的数据:~0 rows (大约) /*!40000 ALTER TABLE `f_comment_p_t` DISABLE KEYS */; /*!40000 ALTER TABLE `f_comment_p_t` ENABLE KEYS */; -- 导出 表 footprint.f_comment_t_m 结构 CREATE TABLE IF NOT EXISTS `f_comment_t_m` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', `createyear` varchar(20) DEFAULT '' COMMENT '学年', `term` varchar(20) DEFAULT '' COMMENT '学期', `class_id` int(11) DEFAULT '0' COMMENT '班级ID', `createmonth` varchar(50) DEFAULT '' COMMENT '月份', `grade` varchar(20) DEFAULT '' COMMENT '年级', `createdate` date DEFAULT '2000-01-01' COMMENT '录入日期', `baby_id` int(11) DEFAULT '0' COMMENT '宝宝ID', `baby_name` varchar(50) DEFAULT '' COMMENT '宝宝姓名', `nursery_id` int(11) DEFAULT '0' COMMENT '幼儿园ID', `teacher_id` varchar(50) DEFAULT '' COMMENT '老师ID', `teacher_name` varchar(50) DEFAULT '' COMMENT '老师姓名', `behavior` varchar(250) DEFAULT '' COMMENT '表现', `suggestion` varchar(250) DEFAULT '' COMMENT '建议', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COMMENT='在园每月评价'; -- 正在导出表 footprint.f_comment_t_m 的数据:~0 rows (大约) /*!40000 ALTER TABLE `f_comment_t_m` DISABLE KEYS */; INSERT INTO `f_comment_t_m` (`id`, `createyear`, `term`, `class_id`, `createmonth`, `grade`, `createdate`, `baby_id`, `baby_name`, `nursery_id`, `teacher_id`, `teacher_name`, `behavior`, `suggestion`) VALUES (3, '2016', '上学期', 1318, '12', '大', '2016-12-23', 26, '赵莹', 0, '112', '测试老师', '很好', ''); /*!40000 ALTER TABLE `f_comment_t_m` ENABLE KEYS */; -- 导出 表 footprint.f_comment_t_t 结构 CREATE TABLE IF NOT EXISTS `f_comment_t_t` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', `createyear` varchar(20) DEFAULT '' COMMENT '学年', `term` varchar(20) DEFAULT '' COMMENT '学期', `class_id` int(11) DEFAULT '0' COMMENT '班级ID', `grade` varchar(20) DEFAULT '' COMMENT '年级', `createdate` date DEFAULT '0000-00-00' COMMENT '录入日期', `baby_id` int(11) DEFAULT '0' COMMENT '宝宝ID', `baby_name` varchar(50) DEFAULT '' COMMENT '宝宝姓名', `baby_gender` varchar(4) DEFAULT '' COMMENT '性别', `nursery_id` int(11) DEFAULT '0' COMMENT '幼儿园ID', `teacher_id` varchar(50) DEFAULT '' COMMENT '老师ID', `teacher_name` varchar(50) DEFAULT '' COMMENT '老师姓名', `sparkle` varchar(250) DEFAULT '' COMMENT '闪光点', `progress` varchar(250) DEFAULT '' COMMENT '进步', `guidance` varchar(250) DEFAULT '' COMMENT '需指导', `factors` varchar(250) DEFAULT '' COMMENT '影响因素', `plan` varchar(250) DEFAULT '' COMMENT '指导计划', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COMMENT='在园学期总结'; -- 正在导出表 footprint.f_comment_t_t 的数据:~3 rows (大约) /*!40000 ALTER TABLE `f_comment_t_t` DISABLE KEYS */; INSERT INTO `f_comment_t_t` (`id`, `createyear`, `term`, `class_id`, `grade`, `createdate`, `baby_id`, `baby_name`, `baby_gender`, `nursery_id`, `teacher_id`, `teacher_name`, `sparkle`, `progress`, `guidance`, `factors`, `plan`) VALUES (18, '2016', '上学期', 1318, '大', '0000-00-00', 26, '赵莹', '女', 0, '2', '测试老师', '好棒的尽快投入可以听结婚了经营管理v麓湖路经过了机会氯碱化工过来就会更快乐就好过了计划管理结合高科技高了就不', '', '', '', ''), (19, '2016', '上学期', 1318, '大', '0000-00-00', 27, '李白白', '男', 0, '2', '测试老师', '', '', '', '', ''), (20, '2016', '上学期', 1318, '大', '0000-00-00', 28, '李白白', '女', 0, '2', '测试老师', '', '', '', '', ''); /*!40000 ALTER TABLE `f_comment_t_t` ENABLE KEYS */; -- 导出 表 footprint.f_common_expressions 结构 CREATE TABLE IF NOT EXISTS `f_common_expressions` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增编号', `content` varchar(255) DEFAULT '' COMMENT '常用语内容', `type` varchar(255) DEFAULT '' COMMENT '常用语类别', `teacher_id` varchar(50) DEFAULT '' COMMENT '老师ID', `nursery_id` varchar(50) DEFAULT '' COMMENT '幼儿园ID', `displayorder` int(11) DEFAULT '0' COMMENT '显示顺序', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8mb4 COMMENT='常用语'; -- 正在导出表 footprint.f_common_expressions 的数据:~2 rows (大约) /*!40000 ALTER TABLE `f_common_expressions` DISABLE KEYS */; INSERT INTO `f_common_expressions` (`id`, `content`, `type`, `teacher_id`, `nursery_id`, `displayorder`) VALUES (27, '真的好!', '闪光点', '2', '0', 1), (29, '好棒的', '闪光点', '2', '0', 2), (30, '好棒的尽快投入可以听结婚了经营管理v麓湖路经过了机会氯碱化工过来就会更快乐就好过了计划管理结合高科技高了就不', '闪光点', '2', '0', 2); /*!40000 ALTER TABLE `f_common_expressions` ENABLE KEYS */; -- 导出 表 footprint.f_function 结构 CREATE TABLE IF NOT EXISTS `f_function` ( `code` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '编码', `descript` varchar(50) DEFAULT '' COMMENT '描述', `displayorder` int(11) DEFAULT '0' COMMENT '显示顺序', `url` varchar(250) DEFAULT '' COMMENT '链接', PRIMARY KEY (`code`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='功能菜单'; -- 正在导出表 footprint.f_function 的数据:~0 rows (大约) /*!40000 ALTER TABLE `f_function` DISABLE KEYS */; /*!40000 ALTER TABLE `f_function` ENABLE KEYS */; -- 导出 表 footprint.f_grade 结构 CREATE TABLE IF NOT EXISTS `f_grade` ( `code` int(10) unsigned NOT NULL COMMENT '编码', `gname` varchar(20) DEFAULT '' COMMENT '名称', `displayorder` int(11) DEFAULT '0' COMMENT '显示顺序', PRIMARY KEY (`code`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='年级'; -- 正在导出表 footprint.f_grade 的数据:~0 rows (大约) /*!40000 ALTER TABLE `f_grade` DISABLE KEYS */; /*!40000 ALTER TABLE `f_grade` ENABLE KEYS */; -- 导出 表 footprint.f_health 结构 CREATE TABLE IF NOT EXISTS `f_health` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', `createyear` varchar(20) DEFAULT '' COMMENT '学年', `term` varchar(20) DEFAULT '' COMMENT '学期', `class_id` int(11) DEFAULT '0' COMMENT '班级ID', `createdate` date DEFAULT '0000-00-00' COMMENT '录入日期', `grade` varchar(20) DEFAULT '' COMMENT '年级', `baby_id` int(11) DEFAULT '0' COMMENT '宝宝ID', `baby_name` varchar(50) DEFAULT '' COMMENT '宝宝姓名', `nursery_id` int(11) DEFAULT '0' COMMENT '幼儿园ID', `teacher_id` varchar(50) DEFAULT '' COMMENT '医生ID', `teacher_name` varchar(50) DEFAULT '' COMMENT '医生姓名', `height` varchar(50) DEFAULT '' COMMENT '身高', `weight` varchar(50) DEFAULT '' COMMENT '体重', `HB` varchar(50) DEFAULT '' COMMENT '血色素', `allcaries` varchar(50) DEFAULT '' COMMENT '总共龋齿', `newcaries` varchar(50) DEFAULT '' COMMENT '新增龋齿', `lefteyesight` varchar(50) DEFAULT '' COMMENT '左眼视力', `righteyesight` varchar(50) DEFAULT '' COMMENT '右眼视力', `mark` varchar(250) DEFAULT '' COMMENT '备注', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COMMENT='健康评价'; -- 正在导出表 footprint.f_health 的数据:~3 rows (大约) /*!40000 ALTER TABLE `f_health` DISABLE KEYS */; INSERT INTO `f_health` (`id`, `createyear`, `term`, `class_id`, `createdate`, `grade`, `baby_id`, `baby_name`, `nursery_id`, `teacher_id`, `teacher_name`, `height`, `weight`, `HB`, `allcaries`, `newcaries`, `lefteyesight`, `righteyesight`, `mark`) VALUES (1, '2016-2017', '上学期', 2, '2016-12-16', '大', 1, '张小云', 0, '115', '张四111', '150', '', '', '', '', '', '', ''), (2, '2016-2017', '上学期', 1315, '2016-12-23', '大', 25, '张小云', 0, '114', '保健医生', '150', '', '', '', '', '', '', ''), (3, '2016-2017', '上学期', 1318, '2016-12-23', '大', 26, '赵莹', 0, '114', '保健医生', '170', '', '', '', '', '', '', '水电费斯蒂芬森'); /*!40000 ALTER TABLE `f_health` ENABLE KEYS */; -- 导出 表 footprint.f_item 结构 CREATE TABLE IF NOT EXISTS `f_item` ( `code` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '编码', `quota` varchar(50) NOT NULL DEFAULT '0' COMMENT '评价指标', `descript` varchar(200) DEFAULT '' COMMENT '描述', `type` varchar(50) DEFAULT '0' COMMENT '评价类型', `belongto` int(11) DEFAULT '0' COMMENT '类型', `level` int(11) DEFAULT '0' COMMENT '级别', `scorestyle` int(11) DEFAULT '0' COMMENT '评分样式', `grade` varchar(20) DEFAULT '' COMMENT '年级', `term` varchar(20) DEFAULT '' COMMENT '学期', `displayorder` int(11) DEFAULT '0' COMMENT '显示顺序', PRIMARY KEY (`code`) ) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COMMENT='评测项目'; -- 正在导出表 footprint.f_item 的数据:~13 rows (大约) /*!40000 ALTER TABLE `f_item` DISABLE KEYS */; INSERT INTO `f_item` (`code`, `quota`, `descript`, `type`, `belongto`, `level`, `scorestyle`, `grade`, `term`, `displayorder`) VALUES (1, '走', '上体正直,上下肢体动作自然,较协调,落地亲。列队走时能听口令踏准节拍', '健康', 1, 0, 0, '大', '上学期', 11101), (2, '跑', '跑', '健康', 1, 0, 0, '大', '上学期', 21304), (3, '跳', '跳', '健康', 1, 0, 0, '大', '上学期', 0), (4, '平衡', '平衡', '健康', 1, 0, 0, '大', '上学期', 0), (5, '拍球', '拍球', '健康', 1, 0, 0, '大', '上学期', 0), (6, '进餐', '进餐', '健康', 1, 0, 0, '大', '上学期', 0), (7, '穿衣', '穿衣', '健康', 1, 0, 0, '大', '上学期', 0), (8, '卫生习惯', '卫生习惯', '健康', 1, 0, 0, '大', '上学期', 0), (9, '躲避危险', '躲避危险', '健康', 1, 0, 0, '大', '上学期', 0), (10, '自我保护', '自我保护', '健康', 1, 0, 0, '大', '上学期', 0), (11, '空间', '空间', '认知', 2, 0, 0, '大', '上学期', 0); /*!40000 ALTER TABLE `f_item` ENABLE KEYS */; -- 导出 表 footprint.f_item_score 结构 CREATE TABLE IF NOT EXISTS `f_item_score` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', `createyear` varchar(20) DEFAULT '' COMMENT '学年', `term` varchar(20) DEFAULT '' COMMENT '学期', `class_id` int(11) DEFAULT '0' COMMENT '班级ID', `grade` varchar(20) DEFAULT '' COMMENT '年级', `stage` varchar(20) DEFAULT '' COMMENT '阶段', `item_code` int(11) DEFAULT '0' COMMENT '项目编码', `score` int(11) DEFAULT '0' COMMENT '评分', `baby_id` int(11) DEFAULT '0' COMMENT '宝宝ID', `baby_name` varchar(50) DEFAULT '' COMMENT '宝宝姓名', `baby_gender` varchar(4) DEFAULT '' COMMENT '性别', `createdate` date DEFAULT '2000-01-01' COMMENT '录入日期', `nursery_id` int(11) DEFAULT '0' COMMENT '幼儿园ID', `teacher_id` varchar(50) DEFAULT '' COMMENT '老师ID', `teacher_name` varchar(50) DEFAULT '' COMMENT '老师姓名', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=658 DEFAULT CHARSET=utf8mb4 COMMENT='评测记录'; -- 正在导出表 footprint.f_item_score 的数据:~33 rows (大约) /*!40000 ALTER TABLE `f_item_score` DISABLE KEYS */; INSERT INTO `f_item_score` (`id`, `createyear`, `term`, `class_id`, `grade`, `stage`, `item_code`, `score`, `baby_id`, `baby_name`, `baby_gender`, `createdate`, `nursery_id`, `teacher_id`, `teacher_name`) VALUES (625, '2016', '上学期', 1318, '大', '开学', 1, 1, 26, '赵莹', '女', '2000-01-01', 0, '2', '测试老师'), (626, '2016', '上学期', 1318, '大', '开学', 1, 2, 27, '李白白', '男', '2000-01-01', 0, '2', '测试老师'), (627, '2016', '上学期', 1318, '大', '开学', 1, 3, 28, '李白白', '女', '2000-01-01', 0, '2', '测试老师'), (628, '2016', '上学期', 1318, '大', '开学', 2, 0, 26, '赵莹', '女', '2000-01-01', 0, '2', '测试老师'), (629, '2016', '上学期', 1318, '大', '开学', 2, 0, 27, '李白白', '男', '2000-01-01', 0, '2', '测试老师'), (630, '2016', '上学期', 1318, '大', '开学', 2, 0, 28, '李白白', '女', '2000-01-01', 0, '2', '测试老师'), (631, '2016', '上学期', 1318, '大', '开学', 3, 0, 26, '赵莹', '女', '2000-01-01', 0, '2', '测试老师'), (632, '2016', '上学期', 1318, '大', '开学', 3, 0, 27, '李白白', '男', '2000-01-01', 0, '2', '测试老师'), (633, '2016', '上学期', 1318, '大', '开学', 3, 0, 28, '李白白', '女', '2000-01-01', 0, '2', '测试老师'), (634, '2016', '上学期', 1318, '大', '开学', 4, 0, 26, '赵莹', '女', '2000-01-01', 0, '2', '测试老师'), (635, '2016', '上学期', 1318, '大', '开学', 4, 0, 27, '李白白', '男', '2000-01-01', 0, '2', '测试老师'), (636, '2016', '上学期', 1318, '大', '开学', 4, 0, 28, '李白白', '女', '2000-01-01', 0, '2', '测试老师'), (637, '2016', '上学期', 1318, '大', '开学', 5, 0, 26, '赵莹', '女', '2000-01-01', 0, '2', '测试老师'), (638, '2016', '上学期', 1318, '大', '开学', 5, 0, 27, '李白白', '男', '2000-01-01', 0, '2', '测试老师'), (639, '2016', '上学期', 1318, '大', '开学', 5, 0, 28, '李白白', '女', '2000-01-01', 0, '2', '测试老师'), (640, '2016', '上学期', 1318, '大', '开学', 6, 0, 26, '赵莹', '女', '2000-01-01', 0, '2', '测试老师'), (641, '2016', '上学期', 1318, '大', '开学', 6, 0, 27, '李白白', '男', '2000-01-01', 0, '2', '测试老师'), (642, '2016', '上学期', 1318, '大', '开学', 6, 0, 28, '李白白', '女', '2000-01-01', 0, '2', '测试老师'), (643, '2016', '上学期', 1318, '大', '开学', 7, 0, 26, '赵莹', '女', '2000-01-01', 0, '2', '测试老师'), (644, '2016', '上学期', 1318, '大', '开学', 7, 0, 27, '李白白', '男', '2000-01-01', 0, '2', '测试老师'), (645, '2016', '上学期', 1318, '大', '开学', 7, 0, 28, '李白白', '女', '2000-01-01', 0, '2', '测试老师'), (646, '2016', '上学期', 1318, '大', '开学', 8, 0, 26, '赵莹', '女', '2000-01-01', 0, '2', '测试老师'), (647, '2016', '上学期', 1318, '大', '开学', 8, 0, 27, '李白白', '男', '2000-01-01', 0, '2', '测试老师'), (648, '2016', '上学期', 1318, '大', '开学', 8, 0, 28, '李白白', '女', '2000-01-01', 0, '2', '测试老师'), (649, '2016', '上学期', 1318, '大', '开学', 9, 0, 26, '赵莹', '女', '2000-01-01', 0, '2', '测试老师'), (650, '2016', '上学期', 1318, '大', '开学', 9, 0, 27, '李白白', '男', '2000-01-01', 0, '2', '测试老师'), (651, '2016', '上学期', 1318, '大', '开学', 9, 0, 28, '李白白', '女', '2000-01-01', 0, '2', '测试老师'), (652, '2016', '上学期', 1318, '大', '开学', 10, 0, 26, '赵莹', '女', '2000-01-01', 0, '2', '测试老师'), (653, '2016', '上学期', 1318, '大', '开学', 10, 0, 27, '李白白', '男', '2000-01-01', 0, '2', '测试老师'), (654, '2016', '上学期', 1318, '大', '开学', 10, 0, 28, '李白白', '女', '2000-01-01', 0, '2', '测试老师'), (655, '2016', '上学期', 1318, '大', '开学', 11, 0, 26, '赵莹', '女', '2000-01-01', 0, '2', '测试老师'), (656, '2016', '上学期', 1318, '大', '开学', 11, 0, 27, '李白白', '男', '2000-01-01', 0, '2', '测试老师'), (657, '2016', '上学期', 1318, '大', '开学', 11, 0, 28, '李白白', '女', '2000-01-01', 0, '2', '测试老师'); /*!40000 ALTER TABLE `f_item_score` ENABLE KEYS */; -- 导出 表 footprint.f_item_type 结构 CREATE TABLE IF NOT EXISTS `f_item_type` ( `列 1` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- 正在导出表 footprint.f_item_type 的数据:~0 rows (大约) /*!40000 ALTER TABLE `f_item_type` DISABLE KEYS */; /*!40000 ALTER TABLE `f_item_type` ENABLE KEYS */; -- 导出 表 footprint.f_menu 结构 CREATE TABLE IF NOT EXISTS `f_menu` ( `id` varchar(10) NOT NULL COMMENT 'ID', `icon` varchar(50) DEFAULT '' COMMENT '图标', `fname` varchar(50) DEFAULT '' COMMENT '名称', `seq` int(11) DEFAULT '0' COMMENT '编号', `furl` varchar(200) DEFAULT '' COMMENT 'url', `belongto` varchar(10) DEFAULT '' COMMENT '上级', `roleid` varchar(20) DEFAULT '' COMMENT '角色', `url` varchar(50) DEFAULT NULL, `ROLEIDS` varchar(20) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- 正在导出表 footprint.f_menu 的数据:~27 rows (大约) /*!40000 ALTER TABLE `f_menu` DISABLE KEYS */; INSERT INTO `f_menu` (`id`, `icon`, `fname`, `seq`, `furl`, `belongto`, `roleid`, `url`, `ROLEIDS`) VALUES ('0', '', 'Home', 1, '', '', '', 'admin/manageClass1', NULL), ('m1', '', '新学期啦', 1, '', '0', '1', 'admin/manageClass2', NULL), ('m10', '', '在园每月评价', 10, '', '0', '2', 'teacher/inGarden/inGardenMothEvaluation', NULL), ('m11', '', '在园学期总结', 11, '', '0', '2', 'teacher/termlySummary', NULL), ('m12', '', '家长观察总结', 12, '', '0', '2', 'teacher/termlySummaryP', NULL), ('m13', '', '发送家长通知', 13, '', '0', '2', 'garden/termConclusion', NULL), ('m14', '', '信息统计查询', 14, '', '0', '2', 'admin/manageClass7', NULL), ('m15', '', '修改本人信息', 15, '', '0', '2', 'admin/changeOwnMessage', NULL), ('m16', '', '打印成长手册', 16, '', '0', '2', 'admin/manageClass9', NULL), ('m17', '', '宝宝成长评价', 17, '', '0', '3', 'parent/babyGrowthEvaluation', NULL), ('m18', '', '在园每月总结', 18, '', '0', '3', 'admin/manageClass11', NULL), ('m19', '', '在园学期总结', 19, '', '0', '3', 'admin/manageClass12', NULL), ('m2', '', '班级管理', 2, '', '0', '1', 'admin/manageClass', NULL), ('m20', '', '宝宝档案资料', 20, '', '0', '3', 'admin/manageClass1111', NULL), ('m21', '', '在家每月总结', 21, '', '0', '3', 'admin/manageClass11111', NULL), ('m22', '', '在家学期总结', 22, '', '0', '3', 'admin/manageClass11112', NULL), ('m23', '', '修改登录密码', 23, '', '0', '3', 'admin/manageClass22222', NULL), ('m24', '', '生长发育评价', 24, '', '0', '4', 'doctor/evaluate', NULL), ('m25', '', '修改信息', 25, '', '0', '4', 'doctor/changeInfo', NULL), ('m26', '', '创建班级', 26, '', '0', '1', 'admin/createClass', NULL), ('m3', '', '离园调班', 3, '', '0', '1', 'admin/transferClass', NULL), ('m4', '', '评价模板', 4, '', '0', '0', 'admin/manageClass66', NULL), ('m5', '', '配置老师', 5, '', '0', '1', 'admin/configurationTeacher', NULL), ('m6', '', '基本信息', 6, '', '0', '1', 'admin/manageClass88', NULL), ('m7', '', '宝宝入园登记', 7, '', '0', '2', 'teacher/register/inRegister', NULL), ('m8', '', '修改宝宝信息', 8, '', '0', '2', 'teacher/babyInfo/changeBabyInfo', NULL), ('m9', '', '全班成长评价', 9, '', '0', '2', 'teacher/growthEvaluation', NULL); /*!40000 ALTER TABLE `f_menu` ENABLE KEYS */; -- 导出 表 footprint.f_movelog 结构 CREATE TABLE IF NOT EXISTS `f_movelog` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', `movetime` datetime DEFAULT '0000-00-00 00:00:00' COMMENT '调班时间', `actor` varchar(50) DEFAULT '' COMMENT '操作人', `previous` int(11) DEFAULT '0' COMMENT '之前班级ID', `after` int(11) DEFAULT '0' COMMENT '调后班级ID', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- 正在导出表 footprint.f_movelog 的数据:~0 rows (大约) /*!40000 ALTER TABLE `f_movelog` DISABLE KEYS */; /*!40000 ALTER TABLE `f_movelog` ENABLE KEYS */; -- 导出 表 footprint.f_notes 结构 CREATE TABLE IF NOT EXISTS `f_notes` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', `createdate` date DEFAULT '0000-00-00' COMMENT '录入日期', `nursery_id` int(11) DEFAULT '0' COMMENT '幼儿园ID', `class_id` int(11) DEFAULT '0' COMMENT '班级ID', `teacher_id` varchar(50) DEFAULT '' COMMENT '老师ID', `teacher_name` varchar(50) DEFAULT '' COMMENT '老师姓名', `parent_id` varchar(50) DEFAULT '' COMMENT '家长ID', `parent_name` varchar(50) DEFAULT '' COMMENT '家长姓名', `content` varchar(250) DEFAULT '' COMMENT '内容', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='通知'; -- 正在导出表 footprint.f_notes 的数据:~0 rows (大约) /*!40000 ALTER TABLE `f_notes` DISABLE KEYS */; /*!40000 ALTER TABLE `f_notes` ENABLE KEYS */; -- 导出 表 footprint.f_nursery 结构 CREATE TABLE IF NOT EXISTS `f_nursery` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', `nname` varchar(50) DEFAULT '' COMMENT '名称', `headname` varchar(50) DEFAULT '' COMMENT '园长姓名', `level` varchar(50) DEFAULT '' COMMENT '等级', `nurserycode` varchar(20) DEFAULT '' COMMENT '幼儿园编码', `address` varchar(250) DEFAULT '' COMMENT '地址', `admincode` varchar(20) DEFAULT '' COMMENT '行政区划代码', `province` varchar(50) DEFAULT '' COMMENT '省', `city` varchar(50) DEFAULT '' COMMENT '市', `county` varchar(50) DEFAULT '' COMMENT '县', `telephone` varchar(20) DEFAULT '' COMMENT '联系电话', `nature` varchar(50) DEFAULT '' COMMENT '性质', `createdate` date DEFAULT '2000-01-01' COMMENT '录入日期', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='幼儿园信息'; -- 正在导出表 footprint.f_nursery 的数据:~0 rows (大约) /*!40000 ALTER TABLE `f_nursery` DISABLE KEYS */; /*!40000 ALTER TABLE `f_nursery` ENABLE KEYS */; -- 导出 表 footprint.f_nursery_level 结构 CREATE TABLE IF NOT EXISTS `f_nursery_level` ( `code` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '编码', `descript` varchar(50) DEFAULT '' COMMENT '描述', `displayorder` int(11) DEFAULT '0' COMMENT '显示顺序', PRIMARY KEY (`code`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='幼儿园级别'; -- 正在导出表 footprint.f_nursery_level 的数据:~0 rows (大约) /*!40000 ALTER TABLE `f_nursery_level` DISABLE KEYS */; /*!40000 ALTER TABLE `f_nursery_level` ENABLE KEYS */; -- 导出 表 footprint.f_nursery_nature 结构 CREATE TABLE IF NOT EXISTS `f_nursery_nature` ( `code` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '编码', `descript` varchar(50) DEFAULT '' COMMENT '描述', `displayorder` int(11) DEFAULT '0' COMMENT '显示顺序', PRIMARY KEY (`code`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='幼儿园性质'; -- 正在导出表 footprint.f_nursery_nature 的数据:~0 rows (大约) /*!40000 ALTER TABLE `f_nursery_nature` DISABLE KEYS */; /*!40000 ALTER TABLE `f_nursery_nature` ENABLE KEYS */; -- 导出 表 footprint.f_p_item 结构 CREATE TABLE IF NOT EXISTS `f_p_item` ( `code` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '编码', `descript` varchar(250) DEFAULT '' COMMENT '描述', `grade` varchar(20) DEFAULT '' COMMENT '年级', `term` varchar(20) DEFAULT '' COMMENT '学期', `createmonth` varchar(50) DEFAULT '' COMMENT '月份', `displayorder` int(11) DEFAULT '0' COMMENT '显示顺序', PRIMARY KEY (`code`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='在家观察项目'; -- 正在导出表 footprint.f_p_item 的数据:~0 rows (大约) /*!40000 ALTER TABLE `f_p_item` DISABLE KEYS */; /*!40000 ALTER TABLE `f_p_item` ENABLE KEYS */; -- 导出 表 footprint.f_p_item_score 结构 CREATE TABLE IF NOT EXISTS `f_p_item_score` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', `createyear` varchar(20) DEFAULT '' COMMENT '学年', `term` varchar(20) DEFAULT '' COMMENT '学期', `class_id` int(11) DEFAULT '0' COMMENT '班级ID', `createmonth` varchar(50) DEFAULT '' COMMENT '月份', `grade` varchar(20) DEFAULT '' COMMENT '年级', `createdate` date DEFAULT '0000-00-00' COMMENT '录入日期', `item_code` int(11) DEFAULT '0' COMMENT '项目编码', `score` int(11) DEFAULT '0' COMMENT '评分', `baby_id` int(11) DEFAULT '0' COMMENT '宝宝ID', `baby_name` varchar(50) DEFAULT '' COMMENT '宝宝姓名', `nursery_id` int(11) DEFAULT '0' COMMENT '幼儿园ID', `parent_id` varchar(50) DEFAULT '' COMMENT '家长ID', `parent_name` varchar(50) DEFAULT '' COMMENT '家长姓名', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='在家观察评分'; -- 正在导出表 footprint.f_p_item_score 的数据:~0 rows (大约) /*!40000 ALTER TABLE `f_p_item_score` DISABLE KEYS */; /*!40000 ALTER TABLE `f_p_item_score` ENABLE KEYS */; -- 导出 表 footprint.f_role 结构 CREATE TABLE IF NOT EXISTS `f_role` ( `code` int(10) unsigned NOT NULL COMMENT '编码', `rolename` varchar(20) DEFAULT '' COMMENT '名称', `displayorder` int(11) DEFAULT '0' COMMENT '显示顺序', PRIMARY KEY (`code`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='角色(幼儿园管理员、老师、家长、保健医生、教委)'; -- 正在导出表 footprint.f_role 的数据:~0 rows (大约) /*!40000 ALTER TABLE `f_role` DISABLE KEYS */; /*!40000 ALTER TABLE `f_role` ENABLE KEYS */; -- 导出 表 footprint.f_r_f 结构 CREATE TABLE IF NOT EXISTS `f_r_f` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', `role_id` int(11) DEFAULT '0' COMMENT '角色ID', `f_code` int(11) DEFAULT '0' COMMENT '功能编码', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='角色-功能'; -- 正在导出表 footprint.f_r_f 的数据:~0 rows (大约) /*!40000 ALTER TABLE `f_r_f` DISABLE KEYS */; /*!40000 ALTER TABLE `f_r_f` ENABLE KEYS */; -- 导出 表 footprint.f_sequence_auto 结构 CREATE TABLE IF NOT EXISTS `f_sequence_auto` ( `id` int(5) unsigned zerofill NOT NULL AUTO_INCREMENT, `name` varchar(50) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4; -- 正在导出表 footprint.f_sequence_auto 的数据:~3 rows (大约) /*!40000 ALTER TABLE `f_sequence_auto` DISABLE KEYS */; INSERT INTO `f_sequence_auto` (`id`, `name`) VALUES (00002, 'sequence'), (00003, 'name'), (00005, 'sequence'); /*!40000 ALTER TABLE `f_sequence_auto` ENABLE KEYS */; -- 导出 表 footprint.f_stage 结构 CREATE TABLE IF NOT EXISTS `f_stage` ( `code` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '编码', `descript` varchar(50) DEFAULT '' COMMENT '描述', `displayorder` int(11) DEFAULT '0' COMMENT '显示顺序', PRIMARY KEY (`code`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='阶段(评测学期中的阶段)'; -- 正在导出表 footprint.f_stage 的数据:~0 rows (大约) /*!40000 ALTER TABLE `f_stage` DISABLE KEYS */; /*!40000 ALTER TABLE `f_stage` ENABLE KEYS */; -- 导出 表 footprint.f_templete 结构 CREATE TABLE IF NOT EXISTS `f_templete` ( `code` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '编码', `descript` varchar(250) DEFAULT '' COMMENT '描述', `type` varchar(50) DEFAULT '' COMMENT '类型', `displayorder` int(11) DEFAULT '0' COMMENT '显示顺序', PRIMARY KEY (`code`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='模板'; -- 正在导出表 footprint.f_templete 的数据:~0 rows (大约) /*!40000 ALTER TABLE `f_templete` DISABLE KEYS */; /*!40000 ALTER TABLE `f_templete` ENABLE KEYS */; -- 导出 表 footprint.f_term 结构 CREATE TABLE IF NOT EXISTS `f_term` ( `code` int(10) unsigned NOT NULL COMMENT '编码', `tname` varchar(20) DEFAULT '' COMMENT '名称', `displayorder` int(11) DEFAULT '0' COMMENT '显示顺序', PRIMARY KEY (`code`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='学期'; -- 正在导出表 footprint.f_term 的数据:~0 rows (大约) /*!40000 ALTER TABLE `f_term` DISABLE KEYS */; /*!40000 ALTER TABLE `f_term` ENABLE KEYS */; -- 导出 表 footprint.f_user 结构 CREATE TABLE IF NOT EXISTS `f_user` ( `sid` int(11) NOT NULL AUTO_INCREMENT COMMENT '唯一序列号', `id` varchar(50) NOT NULL COMMENT '登录号', `username` varchar(50) DEFAULT '' COMMENT '姓名', `gender` varchar(4) DEFAULT '' COMMENT '性别', `roleids` varchar(20) DEFAULT '0' COMMENT '角色IDS,用,分割多种角色权限', `password` varchar(300) DEFAULT '' COMMENT '密码', `telephone` varchar(20) DEFAULT '' COMMENT '电话', `mobile` varchar(20) DEFAULT '' COMMENT '手机', `email` varchar(100) DEFAULT '' COMMENT 'email', `createdate` date DEFAULT '2000-01-01' COMMENT '录入日期', `nursery_id` int(11) DEFAULT '0' COMMENT '幼儿园ID', `nursery_name` varchar(50) DEFAULT '' COMMENT '幼儿园名称', `status` varchar(10) DEFAULT '' COMMENT '状态', `class_id` int(11) DEFAULT '0' COMMENT '班级ID', `sessioncode` varchar(300) DEFAULT '' COMMENT 'session代码', `isadmin` varchar(4) DEFAULT '' COMMENT '是否管理员', PRIMARY KEY (`sid`), UNIQUE KEY `id` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=54 DEFAULT CHARSET=utf8mb4 COMMENT='用户'; -- 正在导出表 footprint.f_user 的数据:~13 rows (大约) /*!40000 ALTER TABLE `f_user` DISABLE KEYS */; INSERT INTO `f_user` (`sid`, `id`, `username`, `gender`, `roleids`, `password`, `telephone`, `mobile`, `email`, `createdate`, `nursery_id`, `nursery_name`, `status`, `class_id`, `sessioncode`, `isadmin`) VALUES (1, '111', '园长', '', '1', 'e10adc3949ba59abbe56e057f20f883e', '', '', '', '2000-01-01', 0, '', 'Y', 0, '', 'N'), (2, '112', '测试老师', '男', '2', 'e10adc3949ba59abbe56e057f20f883e', '', '111111', '', '2016-12-06', 0, '向日葵幼儿园', 'Y', 1318, NULL, 'N'), (3, '113', '家长', '男', '3', 'e10adc3949ba59abbe56e057f20f883e', '', '213', '', '2016-12-06', 0, '向日葵幼儿园', 'Y', 0, NULL, 'N'), (4, '114', '保健医生', '男', '4', 'e10adc3949ba59abbe56e057f20f883e', '', '112', '', '2016-12-06', 0, '向日葵幼儿园', 'Y', 1318, NULL, 'N'), (38, '692', '张三', '男', '2', 'e10adc3949ba59abbe56e057f20f883e', '', '13334567890', '', '2016-12-23', 0, '', 'Y', 0, NULL, 'N'), (39, '42', '李四', '男', '2', 'e10adc3949ba59abbe56e057f20f883e', '', '13434567890', '', '2016-12-23', 0, '', 'Y', 0, NULL, 'N'), (40, '933', '赵五', '女', '2', 'e10adc3949ba59abbe56e057f20f883e', '', '13534567890', '', '2016-12-23', 0, '', 'Y', 0, NULL, 'N'), (41, '716', '程非', '女', '2', 'e10adc3949ba59abbe56e057f20f883e', '', '13734567890', '', '2016-12-23', 0, '', 'Y', 0, NULL, 'N'), (42, '935', '吕丽', '女', '2', 'e10adc3949ba59abbe56e057f20f883e', '', '13934567890', '', '2016-12-23', 0, '', 'Y', 0, NULL, 'N'), (43, '318', '孙名', '女', '2', 'e10adc3949ba59abbe56e057f20f883e', '', '13834567890', '', '2016-12-23', 0, '', 'Y', 1318, NULL, 'N'), (49, 'ZhangXiaoYun', NULL, NULL, '3', 'e10adc3949ba59abbe56e057f20f883e', NULL, NULL, NULL, '2016-12-23', 0, NULL, 'N', 0, NULL, 'N'), (50, '496', '马佳伟', '女', '2', 'e10adc3949ba59abbe56e057f20f883e', '', '13334567890', '', '2016-12-23', 0, '', 'Y', 0, NULL, 'N'), (51, 'ZhaoYing', NULL, NULL, '3', 'e10adc3949ba59abbe56e057f20f883e', NULL, NULL, NULL, '2016-12-23', 0, NULL, 'N', NULL, NULL, 'N'), (52, 'LiBaiBai', NULL, NULL, '3', 'e10adc3949ba59abbe56e057f20f883e', NULL, NULL, NULL, '2016-12-23', 0, NULL, 'N', NULL, NULL, 'N'), (53, 'LiBaiBai001', NULL, NULL, '3', 'e10adc3949ba59abbe56e057f20f883e', NULL, NULL, NULL, '2016-12-23', 0, NULL, 'N', NULL, NULL, 'N'); /*!40000 ALTER TABLE `f_user` ENABLE KEYS */; -- 导出 表 footprint.sequence 结构 CREATE TABLE IF NOT EXISTS `sequence` ( `name` varchar(50) NOT NULL, `current_value` int(11) NOT NULL, `increment` int(11) NOT NULL DEFAULT '1', PRIMARY KEY (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- 正在导出表 footprint.sequence 的数据:~0 rows (大约) /*!40000 ALTER TABLE `sequence` DISABLE KEYS */; /*!40000 ALTER TABLE `sequence` ENABLE KEYS */; /*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */; /*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
true
520ad543c37041037e20abb6812df4ed8793c32a
SQL
jessicabrock/oracle
/oracle/dba/ipcbc.sql
UTF-8
1,256
3.09375
3
[]
no_license
-- ******************************************************************** -- * Filename : ipcbc -- * Author : Jess Brock -- * Original : 03-mar-2015 -- * Last Update : 03-mar-2015 -- * Description : Instance parameter related to the cache -- * buffer chains. -- * Usage : Must be run as Oracle user "sys" -- * @ipcbc.sql -- * Note : Based upon the ipx.sql report. -- ******************************************************************** set pages 99 def prog = 'ipcbc.sql' def title = 'Display CBC Related Instance Parameters' @title col param format a50 heading "Instance Param and Value" word_wrapped col description format a20 heading "Description" word_wrapped col default format a8 heading "Default?" word_wrapped select rpad(i.ksppinm, 35) || ' = ' || v.ksppstvl param, i.ksppdesc description, v.ksppstdf "default" from x$ksppi i, x$ksppcv v where v.indx = i.indx and v.inst_id = i.inst_id and i.ksppinm in ('db_block_buffers','_db_block_buffers','db_block_size', '_db_block_hash_buckets','_db_block_hash_latches' ) order by i.ksppinm / @clear
true
4f978fa67e6be7254d1db53d8a200c591fd63f76
SQL
mesteves9/BDCGH_20192020
/Ficha4_PovoarTabelas.sql
UTF-8
2,032
3.078125
3
[]
no_license
/* SAMPLE DO POVOAMENTO DAS TABELAS */ INSERT INTO Ficha3.ALUNO (id_aluno, nome, data_nascimento, n_contribuinte, n_cc, nome_pai, nome_mae, nome_encarregado_educacao, rua, codigo_postal, localidade) VALUES (1, 'Mario Goncalves', '1993-01-09', 123456789, '123456781ABC', 'Joaquim Alves', 'Maria Duarte', 'Maria Duarte', 'Rua Eng. Pedro Henriques n.º 114, 7.º DTO', '4715-011', 'Braga'); /* (...) */ INSERT INTO Ficha3.ALUNO_CONTACTO (id_aluno, tipo, numero) VALUES (1, 'telemovel', 919999999); INSERT INTO Ficha3.ALUNO_CONTACTO (id_aluno, tipo, numero) VALUES (1, 'telemovel', 929999999); /* (...) */ INSERT INTO Ficha3.DEPARTAMENTO (id_departamento, designacao) VALUES (1, 'Departamento de Informatica'); /* (...) */ INSERT INTO Ficha3.DOCENTE (id_docente, nome, categoria, departamento) VALUES (1, 'Jose Machado', 'Professor Associado com Agregacao', 1); INSERT INTO Ficha3.DOCENTE (id_docente, nome, categoria, departamento) VALUES (2, 'Marisa Esteves', 'Assistente Convidada', 1); INSERT INTO Ficha3.DOCENTE (id_docente, nome, categoria, departamento) VALUES (3, 'Antonio dos Santos', 'Professor Catedratico', 1); /* (...) */ INSERT INTO Ficha3.CURSO (id_curso, designacao, ciclo_estudos, grau, n_alunos_inscritos, diretor) VALUES (1, 'Mestrado Integrado em Engenharia Biomedica', 1, 'Mestre', null, 3); /* (...) */ INSERT INTO Ficha3.ALUNO_CURSO (id_aluno, id_curso, data_inicio, data_fim, n_ucs_realizadas, n_ects, media_atual) VALUES (1, 1, '2017-09-17', null, null, null, null); /* (...) */ INSERT INTO Ficha3.UC (id_uc, designacao, escolaridade, ano_letivo, semestre, curso, responsavel) VALUES (1, 'Bases de Dados Clinicas e de Gestao Hospitalar', 3, 2018, 2, 1, 1); /* (...) */ INSERT INTO Ficha3.DOCENTE_UC (id_docente, id_uc, tipo, n_horas_semanais) VALUES (1, 1, 'Aulas Teoricas', 2); INSERT INTO Ficha3.DOCENTE_UC (id_docente, id_uc, tipo, n_horas_semanais) VALUES (2, 1, 'Aulas Teorico-Praticas', 4); /* (...) */ INSERT INTO Ficha3.ALUNO_UC (id_aluno, id_UC, data_inscricao, data_realizacao, nota_final) VALUES (1, 1, '2018-02-04', null, null); /* (...) */
true
84c68eb2856f17540a26489f68f6574c129ad418
SQL
NTXpro/NTXbases_de_datos
/DatabaseNTXpro/ERP/Stored Procedures/Procs1/Usp_Sel_Cuenta_Inactivo.sql
UTF-8
372
3.265625
3
[]
no_license
 CREATE PROC [ERP].[Usp_Sel_Cuenta_Inactivo] @IdEmpresa INT AS BEGIN SELECT C.ID, C.Nombre, E.Nombre AS NombreBanco, PC.CuentaContable, PC.Nombre AS NombrePlanCuenta FROM ERP.Cuenta C LEFT JOIN ERP.Entidad E ON E.ID = C.IdEntidad LEFT JOIN ERP.PlanCuenta PC ON PC.ID = C.IdPlanCuenta WHERE C.Flag = 0 AND C.IdEmpresa = @IdEmpresa END
true
3a2aa0b9953de3b9f8c590634f44bd22858513be
SQL
henrique-tavares/IFB-Banco-de-Dados-1
/Lista 2 MER/02/02.sql
UTF-8
4,464
3.8125
4
[ "MIT" ]
permissive
create table enderecos ( cep numeric(8) primary key, rua varchar(30), bairro varchar(30), numero int, complemento varchar(50) ); create table faculdades ( codigo int primary key auto_increment, nome varchar(50) not null, localizacao varchar(50) not null, fone numeric(13) not null ); create table funcionarios ( codigo int primary key auto_increment, nome varchar(30) not null, cpf numeric(11) not null, endereco_cep numeric(8) not null, cidade varchar(30) not null, data_nascimento date not null, data_admissao date not null, sexo char(1) not null, faculdade_cod int not null, foreign key (endereco_cep) references enderecos (cep), foreign key (faculdade_cod) references faculdades (codigo) ); create table fones ( funcionario_cod int not null, fone numeric(13) not null, primary key (funcionario_cod, fone), foreign key (funcionario_cod) references funcionarios (codigo) ); create table dependentes ( funcionario_cod int not null, nome varchar(30) not null, data_nascimento date not null, parentesco varchar(30) not null, sexo char(1) not null, primary key ( funcionario_cod, nome, data_nascimento, parentesco, sexo ), foreign key (funcionario_cod) references funcionarios (codigo) ); create table administrativo ( funcionario_cod int primary key, cargo varchar(30) not null, salario decimal(8,2) not null, foreign key (funcionario_cod) references funcionarios (codigo) ); create table professores ( funcionario_cod int primary key, titulacao varchar(30) not null, salario_por_hora decimal(8,2) not null, area varchar(30) not null, administrativo_cod int not null, foreign key (funcionario_cod) references funcionarios (codigo), foreign key (administrativo_cod) references administrativo (funcionario_cod) ); create table disciplinas ( codigo int primary key auto_increment, nome varchar(50) not null unique, ementa text not null, conteudo_programatico text not null, carga_horaria int not null ); create table turmas ( professor_cod int not null, disciplina_cod int not null, semestre int not null, ano int not null, horario varchar(256) not null, primary key ( professor_cod, disciplina_cod, semestre, ano, horario ), foreign key (professor_cod) references professores (funcionario_cod), foreign key (disciplina_cod) references disciplinas (codigo) ); create table diretores ( professor_cod int not null, faculdade_cod int not null, data_posse date not null, data_termino date not null, primary key (professor_cod, faculdade_cod, data_posse, data_termino), foreign key (professor_cod) references professores (funcionario_cod), foreign key (faculdade_cod) references faculdades (codigo) ); create table cursos ( codigo int primary key auto_increment, nome varchar(30) not null, ano_criacao int not null, duracao int not null, ano_reconhecimento int not null, faculdade_cod int not null, foreign key (faculdade_cod) references faculdades (codigo) ); create table coordenador ( professor_cod int not null, faculdade_cod int not null, data_posse date not null, data_termino date not null, primary key (professor_cod, faculdade_cod, data_posse, data_termino), foreign key (professor_cod) references professores (funcionario_cod), foreign key (faculdade_cod) references faculdades (codigo) ); create table curriculos ( curso_cod int not null, disciplina_cod int not null, ano int not null, primary key (curso_cod, disciplina_cod, ano), foreign key (curso_cod) references cursos (codigo), foreign key (disciplina_cod) references disciplinas (codigo) ); create table alunos ( ra numeric(15) primary key, nome varchar(30) not null, endereco varchar(50) not null, data_nascimento date not null, sexo char(1) not null, fone numeric(13) not null, curso_cod int not null, foreign key (curso_cod) references cursos (codigo) ); create table matriculas ( aluno_ra numeric(15) not null, turma_professor int not null, turma_disciplina int not null, turma_semestre int not null, turma_ano int not null, turma_horario varchar(256) not null, nota int, frequencia int, primary key ( aluno_ra, turma_professor, turma_disciplina, turma_semestre, turma_ano, turma_horario ), foreign key (aluno_ra) references alunos (ra), foreign key ( turma_professor, turma_disciplina, turma_semestre, turma_ano, turma_horario ) references turmas ( professor_cod, disciplina_cod, semestre, ano, horario ) );
true
b916eb455a359f83e31af9f29fd5ae2fe48c6fea
SQL
JoaoPrata/NeuroPsi
/3ªEntrega/NeuroPsiDB.sql
UTF-8
6,084
3.5
4
[]
no_license
create table Location (locId int auto_increment primary key, coords point); create table User (userId int auto_increment primary key, name varchar (30), sex enum('M', 'F'), email varchar (30), birthdate date, user_locId int, foreign key (user_locId) references Location (locId)); create table Patient (patientId int auto_increment primary key, patient_userId int, foreign key (patient_userId) references User (userId)); create table Neuropsi (neuroId int auto_increment primary key, neuro_userId int, foreign key (neuro_userId) references User (userId)); create table File (fileId int auto_increment primary key, creationDate date, log varchar (500), file_patientId int unique, foreign key (file_patientId) references Patient (patientId)); create table Attribution (attribId int auto_increment primary key, attrib_fileId int, attrib_neuroId int, foreign key (attrib_fileId) references File (fileId), foreign key (attrib_neuroId) references Neuropsi (neuroId)); create table Route (routeId int auto_increment primary key, waypoints longtext, time float, distance float, route_locId int, foreign key (route_locId) references Location (locId)); create table Test (testId int auto_increment primary key, creationDate date, testTime int, test_routeId int, foreign key (test_routeId) references Route (routeId)); create table TestType (testTypeId int auto_increment primary key, typeName varchar(50)); create table TestType_Attribution (typeAttribId int auto_increment primary key, attrib_testId int, attrib_typeId int, foreign key (attrib_testId) references Test (testId), foreign key (attrib_typeId) references TestType (testTypeId)); create table Reschedule (reschedId int auto_increment primary key, resched_testId int, resched_newTestId int unique, foreign key (resched_testId) references Test (testId), foreign key (resched_newTestId) references Test (testId)); create table Evaluation (evalId int auto_increment primary key, assignedDate date, evalState enum('Scheduled', 'Completed', 'Filed', 'Rescheduled', 'Canceled') default 'Scheduled', eval_attribId int, eval_testId int, foreign key (eval_attribId) references Attribution (attribId), foreign key (eval_testId) references Test (testId)); create table Draw (drawId int auto_increment primary key, imgPath varchar(500), dropdownCheck boolean, imgWidth int, imgHeight int, imgPosX int, imgPosY int, imgTime int, draw_testId int, draw_drawId int, foreign key (draw_testId) references Test (testId), foreign key (draw_drawId) references Draw (drawId)); create table DrawResult (drawResultId int auto_increment primary key, rec longtext, completedDate date, comment varchar(500), drawResult_drawId int, foreign key (drawResult_drawId) references Draw (drawId)); create table SavedTest (savedTestId int auto_increment primary key, savedTest_neuroId int, savedTest_testId int, foreign key (savedTest_neuroId) references Neuropsi (neuroId), foreign key (savedTest_testId) references Test (testId)); create table Template (tempId int auto_increment primary key, temp_testId int, foreign key (temp_testId) references Test (testId)); insert into Location (coords) values (point(-9.157689, 38.779941)); insert into User (name, sex, email, birthdate, user_locId) values ("Diego Santos Rocha", "M", "dsr@gmail.com", '1941-09-09', 1); insert into Patient (patient_userId) values (1); insert into File (creationDate, file_patientId) values (CURRENT_DATE(), 1); insert into Location (coords) values (point(-9.10697, 38.770611)); insert into User (name, sex, email, birthdate, user_locId) values ("Lucas Souza Gomes", "M", "lsg@gmail.com", '1988-12-24', 2); insert into Patient (patient_userId) values (2); insert into File (creationDate, file_patientId) values (CURRENT_DATE(), 2); insert into Location (coords) values (point(-9.165965, 38.672674)); insert into User (name, sex, email, birthdate, user_locId) values ("Luís Melo Rocha", "M", "lmr@gmail.com", '1967-12-25', 3); insert into Neuropsi (neuro_userId) values (3); insert into Location (coords) values (point(-9.131448, 38.720356)); insert into User (name, sex, email, birthdate, user_locId) values ("Clara Barbosa Almeida", "F", "cba@gmail.com", '1980-10-12', 4); insert into Neuropsi (neuro_userId) values (4); insert into Attribution (attrib_fileId, attrib_neuroId) values (1, 1); insert into Attribution (attrib_fileId, attrib_neuroId) values (2, 2); insert into Attribution (attrib_fileId, attrib_neuroId) values (1, 2); insert into Attribution (attrib_fileId, attrib_neuroId) values (2, 1); insert into Route (route_locId) values (1); insert into Route (route_locId) values (2); insert into Route (route_locId) values (3); insert into Route (route_locId) values (4); insert into TestType (typeName) values ("Draw"); insert into TestType (typeName) values ("Digit"); insert into Test (creationDate, testTime) values (CURRENT_DATE(), 30); insert into Test (creationDate, testTime) values (CURRENT_DATE(), 40); insert into Test (creationDate, testTime) values (CURRENT_DATE(), 60); insert into Test (creationDate, testTime) values (CURRENT_DATE(), 60); insert into TestType_Attribution (attrib_testId, attrib_typeId) values (1, 1); insert into TestType_Attribution (attrib_testId, attrib_typeId) values (2, 1); insert into TestType_Attribution (attrib_testId, attrib_typeId) values (3, 2); insert into TestType_Attribution (attrib_testId, attrib_typeId) values (4, 1); insert into TestType_Attribution (attrib_testId, attrib_typeId) values (4, 2); insert into Evaluation (assignedDate, eval_attribId, eval_testId) values (CURRENT_DATE(), 1, 1); insert into Evaluation (assignedDate, eval_attribId, eval_testId) values (CURRENT_DATE(), 1, 2); insert into Evaluation (assignedDate, eval_attribId, eval_testId) values (CURRENT_DATE(), 1, 3); insert into Evaluation (assignedDate, eval_attribId, eval_testId) values (CURRENT_DATE(), 4, 4); insert into Draw (imgPath, imgWidth, draw_testId) values ("test", 200, 1); insert into Draw (imgPath, imgWidth, draw_drawId) values ("test", 400, 1); insert into Draw (imgPath, imgWidth, draw_drawId) values ("test", 600, 2); insert into Draw (imgPath, imgWidth, draw_testId) values ("test", 800, 1);
true
ff3525e6a040f54969dafd4333b3a7375ca83db7
SQL
LabKey/onprcEHRModules
/extscheduler/resources/queries/extscheduler/PMIC_getFolderInfo.sql
UTF-8
195
3.203125
3
[]
no_license
SELECT r.Id, r.name as resourceid, r.color, r.room, r.bldg, r.Container, c.name as FolderName FROM Resources r, core.Containers c Where c.EntityId = r.container And c.name like 'PMIC Scheduler'
true
49c215b3abdeeaaa98bebbc0b42245edfd34ee41
SQL
anhtuta/LilianaPlayer
/LilianaPlayer/src/main/resources/db/migration/V1__init.sql
UTF-8
1,355
3.734375
4
[]
no_license
CREATE TABLE `liliana_player`.`song` ( `id` INT NOT NULL AUTO_INCREMENT, `title` VARCHAR(100) NULL, `artist` VARCHAR(100) NULL, `listens` INT NULL DEFAULT 0, `file_path` VARCHAR(500) NULL, PRIMARY KEY (`id`)); ALTER TABLE `liliana_player`.`song` ADD COLUMN `album` VARCHAR(100) NULL AFTER `artist`; ALTER TABLE `liliana_player`.`song` ADD COLUMN `type` VARCHAR(100) NULL AFTER `album`; ALTER TABLE `liliana_player`.`song` CHANGE COLUMN `file_path` `file_name` VARCHAR(500) NULL DEFAULT NULL; CREATE TABLE `user` ( `id` INT NOT NULL AUTO_INCREMENT, `username` VARCHAR(45) NOT NULL, `name` VARCHAR(200) NOT NULL, `password` VARCHAR(100) NOT NULL, PRIMARY KEY (`id`, `username`)); CREATE TABLE `role` ( `id` INT NOT NULL AUTO_INCREMENT, `name` VARCHAR(45) NULL, PRIMARY KEY (`id`)); CREATE TABLE `user_role` ( `id` INT NOT NULL AUTO_INCREMENT, `user_id` INT NOT NULL, `role_id` INT NOT NULL, PRIMARY KEY (`id`), INDEX `fk_user_role_user_id_idx` (`user_id` ASC), INDEX `fk_user_role_role_id_idx` (`role_id` ASC), CONSTRAINT `fk_user_role_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_user_role_role_id` FOREIGN KEY (`role_id`) REFERENCES `role` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION);
true
4b7e3a792558d7d521c2317c2471a4cd0ee838b1
SQL
LJChao3473/Trackr
/vagrant/db/trackr.sql
UTF-8
3,581
4
4
[]
no_license
drop database if exists Trackr; create database Trackr; use Trackr; create table `user` ( id int primary key auto_increment, fname varchar(20) not null, lname varchar(20) not null, email varchar(50) not null, `password` varchar(32) not null ); create table to_do_folder ( id int primary key auto_increment, user_id int not null, `name` varchar(20) not null, foreign key (user_id) references `user` (id) on delete cascade ); create table contact ( id int primary key auto_increment, user_id int not null, fname varchar(20) not null, lname varchar(20) not null, icon varchar(50), street varchar(50), zip_code int, city varchar(20), country varchar(20), email varchar(50), telephone_no int not null, foreign key (user_id) references `user` (id) on delete cascade ); create table task ( id int primary key auto_increment, folder_id int not null, `name` varchar(20) not null, `description` varchar(200), `date` date not null, `time` time, important boolean, done boolean default 0, foreign key (folder_id) references to_do_folder (id) on delete cascade ); create table challenge ( id int primary key auto_increment, folder_id int not null, `name` varchar(20) not null, `description` varchar(200), foreign key (folder_id) references to_do_folder (id) on delete cascade ); create table daily_challenge( id int primary key auto_increment, challenge_id int not null, `date` date not null, done boolean default false, foreign key (challenge_id) references challenge (id) on delete cascade ); create table contact_task ( task_id int not null, contact_id int not null, foreign key (task_id) references task (id) on delete cascade, foreign key (contact_id) references contact (id) on delete cascade ); create table mood ( id int primary key auto_increment, user_id int not null, mood enum('Happy','Tired','Angry','Sad','Calm') not null, `description` varchar(200), `date` date, foreign key (user_id) references `user` (id) on delete cascade ); create table financial ( id int primary key auto_increment, user_id int not null, total int not null, total_expenses int not null, total_income int not null, `month` int not null, `year` int not null, foreign key (user_id) references `user` (id) on delete cascade ); create table `transaction` ( id int primary key auto_increment, financial_id int not null, `name` varchar(20) not null, `type` enum('income', 'expenses') not null, quantity int not null, `date` date not null, foreign key (financial_id) references financial (id) on delete cascade ); create table scheduler ( id int primary key auto_increment, user_id int not null, `day` enum('monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday') not null, `name` varchar(20) not null, initial_time time, end_time time, foreign key (user_id) references `user` (id) on delete cascade ); create table `schedule` ( id int primary key auto_increment, scheduler_id int not null, `name` varchar(20) not null, `time` time, foreign key (scheduler_id) references scheduler (id) on delete cascade ); create table schedule_task ( id int primary key auto_increment, schedule_id int not null, `date` date, done boolean, foreign key (schedule_id) references `schedule` (id) on delete cascade );
true
949c8521978b149211375f942b92813bf9934ffc
SQL
Imm0bilus/InterestingStuff
/INF Übungen/INF_Views.sql
UTF-8
2,228
4.0625
4
[]
no_license
USE bikelbs4; -- ÜBUNG 1 -- CREATE VIEW Übung1 AS SELECT a.AuftrNr AS Auftragsnummer ,a.Datum ,k.Vorname AS Kunde_Vorname ,k.Nachname AS Kunde_Nachname ,p.Vorname AS Bearbeiter_Vorname ,p.Nachname AS Bearbeiter_Nachname ,SUM(a.AuftrNr) AS Summe FROM auftrag a INNER JOIN kunde k ON k.Kundnr = a.Kundnr INNER JOIN personal p ON p.Persnr = a.Persnr; -- Diese View kann nicht für ein UPDATE verwendet werden, da auf mehrere Tabellen zugegriffen wird. -- ÜBUNG 2 -- CREATE VIEW VPersonal AS SELECT p.Persnr ,p.Vorname ,p.Nachname ,p.GebDatum ,p.Vorgesetzt ,p.BerufsBez ,a.Strasse ,a.Hausnummer ,o.PLZ ,o.Ort FROM personal p INNER JOIN adresse a ON a.ID = p.adresse_ID INNER JOIN ort o ON o.PLZ = a.ort_PLZ WHERE p.Vorgesetzt IS NOT NULL; -- ÜBUNG 3 -- CREATE VIEW VAuftragsposten AS SELECT ap.PosNr, ap.Anzahl, ap.Gesamtpreis, ap.Gesamtpreis/ap.Anzahl AS Einzelpreis ,a.Anr, a.Bezeichnung, a.Netto, a.Farbe, a.Mass, a.Einheit, a.Typ ,auf.AuftrNr, auf.Datum ,k.Kundnr, k.Vorname AS Kunde_Vorname, k.Nachname AS Kunde_Nachname, k.Sperre ,ad.Strasse AS Kunde_Straße, ad.Hausnummer AS Kunde_Hausnummer ,o.PLZ AS Kunde_PLZ, o.Ort AS Kunde_Ort ,l.Land AS Kunde_Land ,p.Persnr, p.Vorname AS Personal_Vorname, p.Nachname AS Personal_Nachname, p.GebDatum, p.Vorgesetzt, p.Gehalt, p.Beurteilung, p.BerufsBez ,ad2.Strasse AS Personal_Straße, ad2.Hausnummer AS Personal_Hausnummer ,o2.PLZ AS Personal_PLZ, o2.Ort AS Personal_Ort ,l2.Land AS Personal_Land FROM auftragsposten ap INNER JOIN artikel a ON a.Anr = ap.Artnr INNER JOIN auftrag auf ON auf.AuftrNr = ap.AuftrNr INNER JOIN kunde k ON k.Kundnr = auf.AuftrNr INNER JOIN adresse ad ON ad.ID = k.adresse_ID INNER JOIN ort o ON o.PLZ = ad.ort_PLZ INNER JOIN land l ON l.Laendercode = o.land_Laendercode INNER JOIN personal p ON p.Persnr = auf.Persnr INNER JOIN adresse ad2 ON ad2.ID = p.adresse_ID INNER JOIN ort o2 ON o2.PLZ = ad2.ort_PLZ INNER JOIN land l2 ON l2.Laendercode = o2.land_Laendercode; -- Diese Sicht ist (sofern man die Berechtigung dazu hat) mit dem Keyword ALTER änderbar.
true
8706003df48a52c969a572c538125d91e5d18425
SQL
ksjtop03/voicek
/PPAS/조회/FUNCTION_조회.sql
UTF-8
948
3.125
3
[]
no_license
/* ---------------------------------------------------------------------------------------------------- FUNCTION 조회 ---------------------------------------------------------------------------------------------------- */ select pg_get_functiondef(p.oid) as src from pg_proc p join pg_namespace n on p.pronamespace = n.oid where n.nspname<>'pg_catalog' and n.nspname<>'information_schema' and p.proname in ('FUNCTION명'); ex) select pg_get_functiondef(p.oid) as src from pg_proc p join pg_namespace n on p.pronamespace = n.oid where n.nspname<>'pg_catalog' and n.nspname<>'information_schema' and p.proname in ('if_kos_cont_bas_ins'); -- FUNCTION 권한 확인 select grantor, grantee , specific_schema, specific_name, routine_schema , routine_name , privilege_type from information_schema.routine_privileges where routine_schema = 'familybox' and routine_name like '%imd_push_queue01%';
true
b692a8495b28d30df8f0be69470264970c1080fb
SQL
ardelingga/Aplikasi-Absensi-Pegawai-QRCode
/absensi.sql
UTF-8
11,727
3
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.0.2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Feb 10, 2018 at 08:32 AM -- Server version: 5.6.20 -- PHP Version: 5.5.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: `absensi` -- -- -------------------------------------------------------- -- -- Table structure for table `data_kehadiran` -- CREATE TABLE `data_kehadiran` ( `id` bigint(20) NOT NULL, `waktu` datetime NOT NULL, `id_personal` bigint(20) NOT NULL, `ket` varchar(255) NOT NULL, `tipe` enum('masuk','pulang') NOT NULL, `telat_menit` bigint(20) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `data_kehadiran` -- INSERT INTO `data_kehadiran` (`id`, `waktu`, `id_personal`, `ket`, `tipe`, `telat_menit`) VALUES (2025, '2017-11-22 06:31:00', 3, 'manual', 'masuk', 0), (2027, '2012-08-02 06:47:00', 12, 'AutoQRC', 'masuk', 0), (2028, '2017-12-06 06:30:00', 12, 'AutoQRC', 'masuk', 0), (2029, '2017-11-24 06:30:00', 2, 'AutoQRC', 'masuk', 0), (2030, '2017-11-24 15:00:00', 2, 'AutoQRC', 'pulang', 0), (2031, '2017-11-25 07:15:00', 2, 'AutoQRC', 'masuk', 15), (2032, '2017-11-25 14:30:00', 2, 'AutoQRC', 'pulang', 0); -- -------------------------------------------------------- -- -- Table structure for table `data_pengguna` -- CREATE TABLE `data_pengguna` ( `id` bigint(20) NOT NULL, `uname` varchar(255) NOT NULL, `upass` varchar(255) NOT NULL, `level` varchar(255) NOT NULL, `aktif` enum('Y','T') NOT NULL, `nama` varchar(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `data_pengguna` -- INSERT INTO `data_pengguna` (`id`, `uname`, `upass`, `level`, `aktif`, `nama`) VALUES (1, 'admin', '21232f297a57a5a743894a0e4a801fc3', 'admin', 'Y', 'Nafi Sulhikam'), (2, 'lingga', '458d0f67bec87022f05530adf3c4c64a', 'admin', 'Y', 'Ardelingga Pramesta Kusuma'); -- -------------------------------------------------------- -- -- Table structure for table `m_departemen` -- CREATE TABLE `m_departemen` ( `id` bigint(20) NOT NULL, `nama_departemen` varchar(255) NOT NULL, `keterangan` varchar(255) NOT NULL, `aktif` enum('y','t') NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `m_departemen` -- INSERT INTO `m_departemen` (`id`, `nama_departemen`, `keterangan`, `aktif`) VALUES (1, 'Guru Tidak Tetap', 'Personal', 'y'), (2, 'Guru Tetap', 'Tetap', 'y'), (3, 'Pimpinan', 'Kepala Sekolah ', 'y'), (4, 'Staf Tata Usaha', 'TU', 'y'); -- -------------------------------------------------------- -- -- Table structure for table `m_personal` -- CREATE TABLE `m_personal` ( `id` bigint(20) NOT NULL, `kode_personal` varchar(255) NOT NULL, `nama` varchar(255) NOT NULL, `alamat` varchar(255) NOT NULL, `no_hp` varchar(15) NOT NULL, `aktif` enum('y','t') NOT NULL, `id_departemen` bigint(20) NOT NULL, `imei` varchar(20) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `m_personal` -- INSERT INTO `m_personal` (`id`, `kode_personal`, `nama`, `alamat`, `no_hp`, `aktif`, `id_departemen`, `imei`) VALUES (1, '1516002', 'Puspita Fauziyah, S.kom.', 'Desa Munjul Kec. Astanajapura Kab. Cirebon', '087745651234', 'y', 1, '121302'), (2, '1216001', 'Alvi Jazilah, S.pd.i', 'Desa Cipejeuh Kulon Kec. Astanajapura Kab.Cirebon', '083167896513', 'y', 2, '121301'), (3, '1216003', 'Ahmad Akbar, S. pd.i.', 'Desa Kanci Kec. Astanajapura Kab. Cirebon', '085215642345', 'y', 2, '121303'), (4, '1216004', 'Sahroni, S. si.', 'Desa Kanci Kec. Astanajapura Kab. Cirebon', '083167852132', 'y', 2, '121304'), (5, '1216004', 'Besus Abdurrokhman', 'Desa Munjul Kec. Astanajapura Kab. Cirebon', '087745234545', 'y', 2, '121305'), (6, '1216005', 'Khodijah, S.pd.i.', 'Desa Munjul Kec. Astanajapura Kab. Cirebon', '085797144345', 'y', 1, '121306'), (7, '1216006', 'Khidir, S. kom.', 'Desa Kepongpongan Kec. Talun Kab. Cirebon', '085745292412', 'y', 3, '121311'), (8, '1216007', 'Bahrul hayat S. kom.', 'Desa Munjul Kec. Astanajapura Kab. Cirebon', '08654567855566', 'y', 2, '121307'), (9, '1216008', 'Iin Inayah Hafid, S. pd.', 'Desa Cipejeuh Kulon Kec. Astanajapura Kab.Cirebon', '0877243633221', 'y', 2, '121308'), (10, '1216009', 'Syamsul Arifin ', 'Desa Munjul Kec. Astanajapura Kab. Cirebon', '083156678444', 'y', 4, '121309'), (11, '1216010', 'Ismi Azizah', 'Desa Munjul Kec. Astanajapura Kab. Cirebon', '089155872434', 'y', 4, '121310'), (12, '15160028', 'Ardelingga Pramesta Kusuma', 'Desa Sumbakeling Kec. Pancalang Kab. Kuningan', '087847146981', 'y', 2, '355308064800103'); -- -------------------------------------------------------- -- -- Table structure for table `m_set_priode` -- CREATE TABLE `m_set_priode` ( `id` bigint(20) NOT NULL, `nama_priode` varchar(255) NOT NULL, `tgl_mulai` date NOT NULL, `tgl_akhir` date NOT NULL, `aktif` enum('y','t') NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `m_set_priode` -- INSERT INTO `m_set_priode` (`id`, `nama_priode`, `tgl_mulai`, `tgl_akhir`, `aktif`) VALUES (3, 'Tahun Ajaran 2017-2018', '2017-07-03', '2018-07-02', 'y'), (4, 'Tahun Ajaran 2018 - 2019', '2018-01-22', '2019-01-22', 'y'); -- -------------------------------------------------------- -- -- Table structure for table `m_set_waktu` -- CREATE TABLE `m_set_waktu` ( `id` bigint(20) NOT NULL, `nama_seting` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_mysql500_ci NOT NULL, `jam_mulai_abs` time NOT NULL, `jam_masuk` time NOT NULL, `jam_pulang` time NOT NULL, `jam_batas_pulang` time NOT NULL, `jam_batas_masuk` time NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `m_set_waktu` -- INSERT INTO `m_set_waktu` (`id`, `nama_seting`, `jam_mulai_abs`, `jam_masuk`, `jam_pulang`, `jam_batas_pulang`, `jam_batas_masuk`) VALUES (2, 'Standar', '06:30:00', '07:00:00', '12:40:00', '15:00:00', '07:30:00'), (3, 'Pengayaan / Ekstrakulikuler', '13:45:00', '14:00:00', '15:00:00', '15:30:00', '14:15:00'), (4, 'Tata Usaha', '06:00:00', '06:30:00', '15:00:00', '15:30:00', '07:30:00'), (5, 'Pimpinan', '07:00:00', '07:30:00', '14:00:00', '14:30:00', '08:00:00'); -- -------------------------------------------------------- -- -- Table structure for table `opsi_umum` -- CREATE TABLE `opsi_umum` ( `id` int(11) NOT NULL, `opsi_key` varchar(255) NOT NULL, `opsi_val` varchar(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `opsi_umum` -- INSERT INTO `opsi_umum` (`id`, `opsi_key`, `opsi_val`) VALUES (1, 'qrcode_kode', 'b258ba8b478e63407cb3886a2ddbb112122d7c35'); -- -------------------------------------------------------- -- -- Table structure for table `tabel_set_abs` -- CREATE TABLE `tabel_set_abs` ( `id` bigint(20) NOT NULL, `nama_set_abs` varchar(255) NOT NULL, `id_departemen` bigint(20) NOT NULL, `id_waktu` bigint(20) NOT NULL, `id_priode` bigint(20) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `tabel_set_abs` -- INSERT INTO `tabel_set_abs` (`id`, `nama_set_abs`, `id_departemen`, `id_waktu`, `id_priode`) VALUES (1, 'Guru Tetap - Standar (2017-2018)', 2, 2, 3), (2, 'pimpinan', 3, 5, 3); -- -------------------------------------------------------- -- -- Table structure for table `tabel_trans_abs` -- CREATE TABLE `tabel_trans_abs` ( `id` bigint(20) NOT NULL DEFAULT '0', `id_personal` bigint(20) NOT NULL, `tgl_abs` date NOT NULL, `waktu_abs` varchar(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `tb_coba` -- CREATE TABLE `tb_coba` ( `id` int(11) NOT NULL, `nama` varchar(30) NOT NULL, `kelas` varchar(9) NOT NULL, `alamat` varchar(50) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `tb_coba` -- INSERT INTO `tb_coba` (`id`, `nama`, `kelas`, `alamat`) VALUES (1, 'Ardelingga Pramesta Kusuma', 'VII', 'Kuningan'); -- -- Indexes for dumped tables -- -- -- Indexes for table `data_kehadiran` -- ALTER TABLE `data_kehadiran` ADD PRIMARY KEY (`id`), ADD KEY `id_personal` (`id_personal`); -- -- Indexes for table `data_pengguna` -- ALTER TABLE `data_pengguna` ADD PRIMARY KEY (`id`); -- -- Indexes for table `m_departemen` -- ALTER TABLE `m_departemen` ADD PRIMARY KEY (`id`); -- -- Indexes for table `m_personal` -- ALTER TABLE `m_personal` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `imei` (`imei`), ADD KEY `id_departemen` (`id_departemen`); -- -- Indexes for table `m_set_priode` -- ALTER TABLE `m_set_priode` ADD PRIMARY KEY (`id`); -- -- Indexes for table `m_set_waktu` -- ALTER TABLE `m_set_waktu` ADD PRIMARY KEY (`id`); -- -- Indexes for table `opsi_umum` -- ALTER TABLE `opsi_umum` ADD PRIMARY KEY (`id`); -- -- Indexes for table `tabel_set_abs` -- ALTER TABLE `tabel_set_abs` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `id_departemen_2` (`id_departemen`,`id_priode`), ADD KEY `id_departemen` (`id_departemen`), ADD KEY `id_waktu` (`id_waktu`), ADD KEY `id_priode` (`id_priode`); -- -- Indexes for table `tabel_trans_abs` -- ALTER TABLE `tabel_trans_abs` ADD PRIMARY KEY (`id`), ADD KEY `id_personal` (`id_personal`); -- -- Indexes for table `tb_coba` -- ALTER TABLE `tb_coba` ADD PRIMARY KEY (`id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `data_kehadiran` -- ALTER TABLE `data_kehadiran` MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2033; -- -- AUTO_INCREMENT for table `data_pengguna` -- ALTER TABLE `data_pengguna` MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT for table `m_departemen` -- ALTER TABLE `m_departemen` MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT for table `m_personal` -- ALTER TABLE `m_personal` MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13; -- -- AUTO_INCREMENT for table `m_set_priode` -- ALTER TABLE `m_set_priode` MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT for table `m_set_waktu` -- ALTER TABLE `m_set_waktu` MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; -- -- AUTO_INCREMENT for table `opsi_umum` -- ALTER TABLE `opsi_umum` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `tabel_set_abs` -- ALTER TABLE `tabel_set_abs` MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT for table `tb_coba` -- ALTER TABLE `tb_coba` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- Constraints for dumped tables -- -- -- Constraints for table `data_kehadiran` -- ALTER TABLE `data_kehadiran` ADD CONSTRAINT `data_kehadiran_ibfk_1` FOREIGN KEY (`id_personal`) REFERENCES `m_personal` (`id`); -- -- Constraints for table `m_personal` -- ALTER TABLE `m_personal` ADD CONSTRAINT `m_personal_ibfk_1` FOREIGN KEY (`id_departemen`) REFERENCES `m_departemen` (`id`); -- -- Constraints for table `tabel_set_abs` -- ALTER TABLE `tabel_set_abs` ADD CONSTRAINT `tabel_set_abs_ibfk_4` FOREIGN KEY (`id_departemen`) REFERENCES `m_departemen` (`id`), ADD CONSTRAINT `tabel_set_abs_ibfk_5` FOREIGN KEY (`id_waktu`) REFERENCES `m_set_waktu` (`id`), ADD CONSTRAINT `tabel_set_abs_ibfk_6` FOREIGN KEY (`id_priode`) REFERENCES `m_set_priode` (`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
017cdae828bfdbbadff7553d77248af5795ed6d8
SQL
sonali-sohoni/u-develop-it
/db/schema.sql
UTF-8
705
3.6875
4
[]
no_license
use election; drop table if exists parties; create table parties( id integer auto_increment primary key, name varchar(50) not null, description text ); drop table if exists candidates; create table candidates ( id INTEGER AUTO_INCREMENT PRIMARY KEY, first_name VARCHAR(30) NOT NULL, last_name VARCHAR(30) NOT NULL, party_id integer , industry_connected BOOLEAN NOT NULL constraint fk_party foreign key (party_id) references parties(id)) on delete set null ); drop table if exists voters; create table voters( id integer auto_increment primary key, first_name varchar(30) not null, last_name varchar(30) not null, email varchar(50) not null, created_at datetime default CURRENT_TIMESTAMP );
true
f1484a6c48a67e6e311044223bbec60598061dc9
SQL
oracle/oracle-db-tools
/ords/Parameters/parameters_rest.sql
UTF-8
5,737
3.421875
3
[ "MIT" ]
permissive
-- Generated by Oracle SQL Developer REST Data Services 17.4.0.355.2349 -- Exported REST Definitions from ORDS Schema Version 17.4.1.353.06.48 -- Schema: HR Date: Fri Jan 19 11:46:40 EST 2018 -- BEGIN ORDS.DEFINE_MODULE( p_module_name => 'parameters', -- the name of RESTFul Service Module that will be used to organize our example services p_base_path => '/parameters/', -- how to address the module off of the base /ords URI p_items_per_page => 25, -- the default number of items to return on a request for all module services p_status => 'PUBLISHED', -- PUBLISHED = LIVE or ON p_comments => NULL); ORDS.DEFINE_TEMPLATE( p_module_name => 'parameters', p_pattern => 'headers', -- the pattern we want to publish HANDLERS for, so /ords/hr/parameters/headers p_priority => 0, p_etag_type => 'HASH', p_etag_query => NULL, p_comments => NULL); ORDS.DEFINE_HANDLER( p_module_name => 'parameters', p_pattern => 'headers', p_method => 'GET', -- you can have a GET, PUT, POST, or DELETE handler. Each will have a SQL or PLSQL block p_source_type => 'json/collection', -- we are returning data as json p_items_per_page => 25, p_mimes_allowed => '', p_comments => NULL, p_source => 'select * from parameters where id = :id' -- p_source, this is the SQL block executed when you hit /ords/hr/parameters/headers via GET ); ORDS.DEFINE_PARAMETER( p_module_name => 'parameters', p_pattern => 'headers', p_method => 'GET', p_name => 'id', -- the name of the HTTP HEADER parameter p_bind_variable_name => 'id', -- how to address it in the SQL block, e.g. :id p_source_type => 'HEADER', p_param_type => 'INT', p_access_method => 'IN', -- it's coming IN, the only valid option for a GET request p_comments => NULL); ORDS.DEFINE_HANDLER( p_module_name => 'parameters', p_pattern => 'headers', p_method => 'POST', -- using POST so we can use a HTTP RESPONSE p_source_type => 'plsql/block', p_items_per_page => 0, p_mimes_allowed => '', p_comments => NULL, p_source => 'declare how_many integer; begin select count(*) into how_many from parameters; :total := how_many; :message := ''There are '' || how_many || '' records in the parameters table.''; end;' ); ORDS.DEFINE_PARAMETER( p_module_name => 'parameters', p_pattern => 'headers', p_method => 'POST', p_name => 'count', p_bind_variable_name => 'total', p_source_type => 'HEADER', -- paramter being assigned for the RESPONSE HEADER p_param_type => 'INT', -- it's a number p_access_method => 'OUT', -- it's only going OUT p_comments => NULL); ORDS.DEFINE_PARAMETER( p_module_name => 'parameters', p_pattern => 'headers', p_method => 'POST', p_name => 'message', p_bind_variable_name => 'message', p_source_type => 'RESPONSE', -- the HTTP response body p_param_type => 'STRING', -- we'll return text p_access_method => 'OUT', p_comments => NULL); ORDS.DEFINE_TEMPLATE( p_module_name => 'parameters', p_pattern => 'headers-classic', p_priority => 0, p_etag_type => 'HASH', p_etag_query => NULL, p_comments => NULL); ORDS.DEFINE_HANDLER( p_module_name => 'parameters', p_pattern => 'headers-classic', -- nothing special here, no need to define any parameters p_method => 'GET', -- ORDS will build a parameter on the fly when passed via the URL p_source_type => 'json/collection', p_items_per_page => 25, p_mimes_allowed => '', p_comments => NULL, p_source => 'select * from parameters where id = :id' -- will return 0 records unless user includes ?id=value on the URI of the GET request ); ORDS.DEFINE_TEMPLATE( p_module_name => 'parameters', p_pattern => 'headers/:id', -- the parameter is built into the pattern, no need to declare p_priority => 0, p_etag_type => 'HASH', p_etag_query => NULL, p_comments => NULL); ORDS.DEFINE_HANDLER( p_module_name => 'parameters', p_pattern => 'headers/:id', p_method => 'GET', p_source_type => 'json/collection', p_items_per_page => 25, p_mimes_allowed => '', p_comments => NULL, p_source => 'select * from parameters where id = :id' -- the bind must match the URI pattern ); ORDS.DEFINE_TEMPLATE( p_module_name => 'parameters', p_pattern => 'headers/:words/:age', -- we now have two, separated by a /, they are assigned positionally p_priority => 0, p_etag_type => 'HASH', p_etag_query => NULL, p_comments => NULL); ORDS.DEFINE_HANDLER( p_module_name => 'parameters', p_pattern => 'headers/:words/:age', p_method => 'GET', p_source_type => 'json/collection', p_items_per_page => 25, p_mimes_allowed => '', p_comments => NULL, p_source => 'SELECT * FROM parameters WHERE age =:age AND words =:words' ); COMMIT; END;
true
798215ad5b2c429a5b32ed7f64a2008c300c29ac
SQL
mebelousov/antlr_psql
/src/test/resources/sql/explain/29c92098.sql
UTF-8
180
2.625
3
[ "MIT" ]
permissive
-- file:groupingsets.sql ln:282 expect:true explain (costs off) select a, b, grouping(a,b), sum(v), count(*), max(v) from gstest1 group by grouping sets ((a),(b)) order by 3,1,2
true
91923d2e5aa08e59d79a699175899e6adf6d630c
SQL
kabocha23/Algorithms
/satascratch/noOrderCustomers.sql
UTF-8
485
4.3125
4
[]
no_license
-- No Order Customers -- Find customers who didn't place orders from 2019-02-01 to 2019-03-01. Output customer's first name. WITH feb_orders AS ( SELECT id, first_name, co.* FROM customers c LEFT JOIN ( SELECT cust_id, order_date FROM orders WHERE order_date BETWEEN '2019-02-01' AND '2019-03-01' ) co ON c.id = co.cust_id ) SELECT first_name FROM feb_orders WHERE order_date IS NULL ;
true
8c315f5ca7ba6f4f854f00df313b79cc2823ac7f
SQL
AVER343/pgsql
/sql/patient.sql
UTF-8
409
3.203125
3
[]
no_license
CREATE TABLE patients( id SERIAL PRIMARY KEY, username VARCHAR(64) NOT NULL UNIQUE, "firstName" VARCHAR(32) NOT NULL, "lastName" VARCHAR(32) NOT NULL, age INTEGER NOT NULL , "dateOfBirth" TIMESTAMP, "registeredDate" TIMESTAMP DEFAULT CURRENT_TIMESTAMP , gender VARCHAR(6) NOT NULL, "homeAddress" VARCHAR(255) NOT NULL , CHECK (gender IN ('Male', 'Female', 'Others')) )
true
26d58ba55816485cad6f091ecc9467d9b05a963f
SQL
georgi-vasilev/Database-Basics-MS-SQL-Server-May-2020-SoftUni
/Exam Preparation Part Two/09. User per Employee.sql
UTF-8
293
3.84375
4
[]
no_license
USE [Service] SELECT CONCAT([FirstName], ' ' ,[LastName]) AS [FullName], COUNT(DISTINCT UserId) AS [UsersCount] FROM Reports AS r RIGHT JOIN Employees AS e ON e.[Id] = r.[EmployeeId] GROUP BY r.[EmployeeId], e.[FirstName], e.[LastName] ORDER BY [UsersCount] DESC, [FullName] ASC
true
d03da80bc42fdb06e03efd331a4f2e3e5368038a
SQL
chenlwh/springintegration
/springbootstart/src/main/resources/Script-2.sql
GB18030
3,929
3.84375
4
[]
no_license
select to_char(t1.expire_date, 'yyyy-mm-dd') as date, sum(-t1.amount) amount, '' classify from release_data t1 where t1.expire_date>=current_date-30 and t1.expire_date<=current_date+30 group by t1.expire_date union all select to_char(t2.release_date, 'yyyy-mm-dd') as date, sum(t2.amount) amount, '' classify from release_data t2 where t2.release_date>=current_date-30 and t2.release_date<=current_date+30 group by t2.release_date union all select to_char(tt.day, 'yyyy-mm-dd') as date, 0 amout, '' classify from (select generate_series(cast(to_char(current_date-30, 'yyyy-mm') || '-01' as date), cast(cast(to_char(current_date+30, 'yyyy-mm') || '-01' as timestamp) + '1 MONTH' + '-1 d' as date), '1 d') as day) as tt where tt.day not in ( select distinct t.date from (select t1.expire_date date from release_data t1 where t1.expire_date>=current_date-30 and t1.expire_date<=current_date+30 union select t2.release_date date from release_data t2 where t2.release_date>=current_date-30 and t2.release_date<=current_date+30 ) t) order by date; select to_char(tt.day, 'yyyy-mm-dd') as orderDate from (select generate_series(cast(to_char(to_date('2018-07-11', 'YYYY-MM'), 'yyyy-mm') || '-01' as date), cast( cast(to_char(to_date('2018-08-12', 'YYYY-MM'), 'yyyy-mm') || '-01' as timestamp) + '-1 d' as date), '1 d') as day) as tt order by orderDate; select cast(cast(to_char(current_date, 'yyyy-mm') || '-01' as timestamp) + '1 MONTH' + '-1 d' as date) select cast(cast(to_char(current_date+30, 'yyyy-mm') || '-01' as timestamp) + '1 MONTH' + '-1 d' as date) select -t11.amount, t11.date from (select t1.expire_date date, t1.amount from release_data t1 where t1.expire_date>=current_date-30 and t1.expire_date<=current_date+30) t11 where t11.date not in (select t2.release_date date from release_data t2 where t2.release_date>=current_date-30 and t2.release_date<=current_date+30) union all select t22.amount, t22.date from (select t2.release_date date, t2.amount from release_data t2 where t2.release_date>=current_date-30 and t2.release_date<=current_date+30) t22 where t22.date not in (select t1.expire_date date from release_data t1 where t1.expire_date>=current_date-30 and t1.expire_date<=current_date+30) union all select t22.amount-t11.amount, t22.date from (select t1.expire_date date, t1.amount from release_data t1 where t1.expire_date>=current_date-30 and t1.expire_date<=current_date+30) t11 inner join (select t2.release_date date, t2.amount from release_data t2 where t2.release_date>=current_date-30 and t2.release_date<=current_date+30) t22 on t11.date = t22.date order by date desc select -t11.amount, t11.date from (select t1.expire_date date, t1.amount from release_data t1 where t1.expire_date>=current_date and t1.expire_date<=current_date+30) t11 where t11.date not in (select t2.release_date date from release_data t2 where t2.release_date>=current_date-30 and t2.release_date<=current_date+30 and t2.expire_date>=current_date) union all select t22.amount, t22.date from (select t2.release_date date, t2.amount from release_data t2 where t2.release_date>=current_date-30 and t2.release_date<=current_date+30 and t2.expire_date>=current_date) t22 where t22.date not in (select t1.expire_date date from release_data t1 where t1.expire_date>=current_date and t1.expire_date<=current_date+30) union all select t22.amount-t11.amount, t22.date from (select t1.expire_date date, t1.amount from release_data t1 where t1.expire_date>=current_date and t1.expire_date<=current_date+30) t11 inner join (select t2.release_date date, t2.amount from release_data t2 where t2.release_date>=current_date-30 and t2.release_date<=current_date+30 and t2.expire_date>=current_date) t22 on t11.date = t22.date order by date desc
true
415db0e19fa593366a75abc9d567e7c8e7fec650
SQL
W4nn4Die/practica-mysql
/3Constraints.sql
UTF-8
721
3.515625
4
[]
no_license
CREATE TABLE users ( userid INT IDENTITY NOT NULL, usermail VARCHAR(100) NOT NULL, userpass BINARY(16) NOT NULL, username VARCHAR(50) NOT NULL, userrol VARCHAR NOT NULL DEFAULT 'user', PRIMARY KEY (userid) ); CREATE TABLE hosting ( idhosting INT NOT NULL, hostingplan INT NOT NULL CHECK (hostingplan <> 0), hostingprice INT NOT NULL, hostinglocation INT NOT NULL, PRIMARY KEY (idhosting) ); CREATE TABLE users_has_hosting ( serverpay DATE NOT NULL DEFAULT NOW(), userid INT NOT NULL, idhosting INT NOT NULL, PRIMARY KEY (userid, idhosting), FOREIGN KEY (userid) REFERENCES users(userid), FOREIGN KEY (idhosting) REFERENCES hosting(idhosting) ON DELETE CASCADE ON UPDATE CASCADE );
true
33c5b5256ac57a584e58d59034587f3cf51523f6
SQL
krishnamohankaruturi/secret
/aart-web-dependencies/db/other/US18780_StudentRosterChanges.sql
UTF-8
1,509
3
3
[]
no_license
-- Resetting student tracker and inactivating students tests for the student :000721026 UPDATE studentsresponses SET activeflag = false, modifieduser = (SELECT id FROM aartuser WHERE username = 'cetesysadmin'), modifieddate = now() WHERE studentstestsid IN (13815603,13830039); UPDATE studentstestsections SET activeflag = false, modifieduser = (SELECT id FROM aartuser WHERE username = 'cetesysadmin'), modifieddate = now() WHERE studentstestid IN (13815603,13830039); UPDATE studentstests SET activeflag = false, modifieduser = (SELECT id FROM aartuser WHERE username = 'cetesysadmin'), modifieddate = now() WHERE id in (13815603,13830039); UPDATE testsession SET activeflag = false, modifieduser = (SELECT id FROM aartuser WHERE username = 'cetesysadmin'), modifieddate = now() WHERE id IN (3284170, 3283611); UPDATE studenttrackerband SET activeflag = false, modifieddate = now(), modifieduser = (SELECT id FROM aartuser WHERE username = 'cetesysadmin') WHERE studenttrackerid = (327484) AND testsessionid in (3284170, 3283611) AND source = 'ST'; INSERT INTO domainaudithistory (source, objecttype, objectid, createduserid, createddate, action, objectbeforevalues, objectaftervalues) values('SCRIPT', 'STUDENTSTESTS', 1091977, 12, now(), 'REST_STUDENT_TRACKER', ('{"StudentId": 1091977, "activeflag": true}')::JSON, ('{"Reason": "As per US18780, inactivated the students tests and reseted the studenttracker band "}')::JSON);
true
f03d83aa4c555da27bb5905d95841b66cf10cabe
SQL
BiserHristov/SoftUni
/05. C# DataBase/01. MS SQL/05. Subqueries and JOINs/Homework_Joins/15. Continents and Currencies.sql
UTF-8
372
4.0625
4
[ "MIT" ]
permissive
SELECT ContinentCode, CurrencyCode, CurrencyUsage FROM ( SELECT ContinentCode, CurrencyCode, COUNT(CurrencyCode) AS CurrencyUsage, DENSE_RANK() OVER (PARTITION BY ContinentCode ORDER BY COUNT(CurrencyCode) DESC) AS Ranked FROM Countries GROUP BY ContinentCode,CurrencyCode ) AS k WHERE CurrencyUsage>1 AND k.Ranked=1 ORDER BY k.ContinentCode
true
2e0167a88334f447c742db1b7a559755fe0b5751
SQL
kojhliang/BaaSV1.0
/explorer.sql
UTF-8
11,455
3.234375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50622 Source Host : localhost:3306 Source Database : explorer_lmh Target Server Type : MYSQL Target Server Version : 50622 File Encoding : 65001 Date: 2017-11-03 16:26:19 */ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for channel -- ---------------------------- DROP TABLE IF EXISTS `channel`; CREATE TABLE `channel` ( `pk_Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '管道ID', `channelName` varchar(255) DEFAULT NULL COMMENT '管道名', `joinPeers` text COMMENT '加入管道的节点列表,形如 组织名.peer名, 组织名.peer名 的格式', `includeOrgs` text COMMENT '包含的组织列表', `createTime` datetime DEFAULT NULL COMMENT '创建时间', `isOk` tinyint(4) DEFAULT NULL, PRIMARY KEY (`pk_Id`) ) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8 COMMENT='管道表'; -- ---------------------------- -- Records of channel -- ---------------------------- INSERT INTO `channel` VALUES ('38', 'mychannel', 'org1.peer1;org1.peer2', 'org1', '2017-10-31 11:34:51', '1'); INSERT INTO `channel` VALUES ('39', 'kkchannel', 'org2.peer2;org2.peer1', 'org2', '2017-10-31 11:37:32', '1'); -- ---------------------------- -- Table structure for channel_org -- ---------------------------- DROP TABLE IF EXISTS `channel_org`; CREATE TABLE `channel_org` ( `channelId` int(11) NOT NULL COMMENT '管道ID', `orgId` int(11) NOT NULL COMMENT '组织ID', PRIMARY KEY (`channelId`,`orgId`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='管道和组织的关系表'; -- ---------------------------- -- Records of channel_org -- ---------------------------- INSERT INTO `channel_org` VALUES ('38', '32'); INSERT INTO `channel_org` VALUES ('39', '33'); -- ---------------------------- -- Table structure for channel_peernode -- ---------------------------- DROP TABLE IF EXISTS `channel_peernode`; CREATE TABLE `channel_peernode` ( `channelId` int(11) NOT NULL COMMENT '管道ID', `peernodeID` int(11) NOT NULL COMMENT 'peernode节点ID', PRIMARY KEY (`channelId`,`peernodeID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='管道和peer节点的关系表'; -- ---------------------------- -- Records of channel_peernode -- ---------------------------- INSERT INTO `channel_peernode` VALUES ('38', '23'); INSERT INTO `channel_peernode` VALUES ('38', '24'); INSERT INTO `channel_peernode` VALUES ('39', '21'); INSERT INTO `channel_peernode` VALUES ('39', '22'); -- ---------------------------- -- Table structure for deploychaincode -- ---------------------------- DROP TABLE IF EXISTS `deploychaincode`; CREATE TABLE `deploychaincode` ( `pk_Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '实例ID', `ChaincodeName` varchar(255) DEFAULT NULL COMMENT '合约名,即新版本的实例名', `ChaincodeType` varchar(255) DEFAULT NULL COMMENT '合约类型,分平台 和用户上传', `channelId` int(11) DEFAULT NULL COMMENT '安装的管道ID(新增的字段)', `version` varchar(255) DEFAULT NULL COMMENT '版本号(新增的字段)', `installPeers` text COMMENT '安装的peer节点列表(新增的字段)', `fk_uploadchaincode_Id` int(11) DEFAULT NULL COMMENT '用户上传或平台自带的智能合约代码ID', `Params` text COMMENT '初始化参数', `endorsePolicy` text COMMENT '背书策略(新增的字段)', `ChaincodeId` varchar(255) DEFAULT NULL COMMENT '部署智能合约成功后的智能合约实例ID', `Description` text COMMENT '描述', `Status` varchar(255) DEFAULT '0' COMMENT '0为未安装,未初始化,1为已经初始化,2为已安装,已初始化,可升级', PRIMARY KEY (`pk_Id`) ) ENGINE=InnoDB AUTO_INCREMENT=74 DEFAULT CHARSET=utf8 COMMENT='部署的智能合约表,实际上是实例表,先产生实例,然后通过安装,初始化或者升级产生智能合约ID'; -- ---------------------------- -- Records of deploychaincode -- ---------------------------- INSERT INTO `deploychaincode` VALUES ('65', 'qwe1', null, '32', '1', '21,22,23,24', '2', '1', 'undefined', null, null, '2'); INSERT INTO `deploychaincode` VALUES ('66', 'asd45', null, '33', '1', '22', '2', 'a', 'undefined', null, null, '2'); INSERT INTO `deploychaincode` VALUES ('67', 'zx789', null, '34', '2222', '21,21', '2', 'a', '', null, null, '2'); INSERT INTO `deploychaincode` VALUES ('68', 'asd12yy', null, '35', '11', '21,24', '2', 'zxc', 'undefined', null, null, '2'); INSERT INTO `deploychaincode` VALUES ('69', 'zxc12312312', null, '36', '123', '23,21', '2', 'a', 'undefined', null, null, '1'); INSERT INTO `deploychaincode` VALUES ('70', 'fdg123', null, '37', '11', '21', '2', 'd', 'undefined', null, null, '2'); INSERT INTO `deploychaincode` VALUES ('71', 'testChannel', null, '32', '1', '23,24', '2', 'x', 'undefined', null, null, '2'); INSERT INTO `deploychaincode` VALUES ('72', 'test1', null, '38', 'v1.0', '23,24', '2', 'd', 'undefined', null, null, '2'); INSERT INTO `deploychaincode` VALUES ('73', 'test2', null, '39', 'v1.0', '21,22', '2', 'c', 'undefined', null, null, '2'); -- ---------------------------- -- Table structure for log -- ---------------------------- DROP TABLE IF EXISTS `log`; CREATE TABLE `log` ( `pk_Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '日志ID', `operation` varchar(50) DEFAULT NULL COMMENT '操作类型:分add_channel,edit_channel,invoke,install,Instantiate,upgrade', `params` text COMMENT '输入参数', `transactionId` varchar(255) DEFAULT NULL COMMENT '事务记录ID', `chaincodeId` varchar(255) DEFAULT NULL COMMENT '智能合约ID', `userName` varchar(255) DEFAULT NULL COMMENT '操作的用户名', `createTime` datetime DEFAULT NULL COMMENT '产生的时间', `channelId` varchar(255) DEFAULT NULL, PRIMARY KEY (`pk_Id`) ) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8 COMMENT='日志表'; -- ---------------------------- -- Records of log -- ---------------------------- INSERT INTO `log` VALUES ('21', '创建管道', '', '', '', '', '2017-10-24 10:41:20', 'mychannel'); INSERT INTO `log` VALUES ('22', '部署合约', '(mycc1:v0,init,a,100,b,200)', 'a029e7d2f3c58413c9c46cc878f2c24c5a37a3438f3610985559fc3d5e0cf246', 'mycc1:v0', '', '2017-10-24 10:41:36', 'mychannel'); INSERT INTO `log` VALUES ('23', '执行合约', '(a,b,10)', 'a0b76af587459b770965df49b161fafd7e312f49d78a4b1add83ab154449e5e9', 'mycc1:v0', '', '2017-10-24 10:43:03', 'mychannel'); INSERT INTO `log` VALUES ('24', '执行合约', '(a,b,10)', 'd59dd38f24bada7e6314dc28cf5982962ac0a5c8399eb57e49bd0f7ee2fc18cd', 'mycc1:v0', '', '2017-10-24 10:43:07', 'mychannel'); INSERT INTO `log` VALUES ('25', '升级合约', '(mycc1:v1,init,a,300,b,500)', '16a7373391248e270993e36aa7831d940dc81a8934313c7bb13781e7e2f7a620', 'mycc1:v1', '', '2017-10-24 10:43:10', 'mychannel'); INSERT INTO `log` VALUES ('26', '创建管道', '', '', '', '', '2017-10-24 10:47:37', 'mmchannel'); INSERT INTO `log` VALUES ('27', '部署合约', '(mycc1:v0,init,a,100,b,200)', 'e46e2794212c84aaf327184faad0bca4f393dc0c4a85c1f01e0109f7d311f01e', 'mycc1:v0', '', '2017-10-24 10:47:53', 'mmchannel'); INSERT INTO `log` VALUES ('28', '执行合约', '(a,b,10)', '315a39afbb3e8813e359952884875684599f54360401b50c4408d6d03a5ed77c', 'mycc1:v0', '', '2017-10-24 10:48:05', 'mmchannel'); INSERT INTO `log` VALUES ('29', '执行合约', '(a,b,10)', 'f2e023607bcb4014e48445e7fd1d62e83b5bff28d15b44d0eee0bace37308972', 'mycc1:v0', '', '2017-10-24 10:48:09', 'mmchannel'); INSERT INTO `log` VALUES ('30', '升级合约', '(mycc1:v1,init,a,300,b,500)', '407426cdcd87c1e759ba5bfe9e11fac6cd328d1f15633fe630ddd732d721cb36', 'mycc1:v1', '', '2017-10-24 10:48:12', 'mmchannel'); INSERT INTO `log` VALUES ('31', '创建管道', '', '', '', '', '2017-10-24 10:59:58', 'kkchannel'); INSERT INTO `log` VALUES ('32', '创建管道', '', '', '', '', '2017-10-24 21:35:39', 'ggchannel'); -- ---------------------------- -- Table structure for org -- ---------------------------- DROP TABLE IF EXISTS `org`; CREATE TABLE `org` ( `pk_Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '组织ID', `orgName` varchar(255) NOT NULL COMMENT '组织名', `includePeers` text COMMENT '包含的peer节点列表', `peerNum` int(11) DEFAULT NULL COMMENT '包含的节点数(方便前台显示)', PRIMARY KEY (`pk_Id`,`orgName`), UNIQUE KEY `orgName` (`orgName`) ) ENGINE=InnoDB AUTO_INCREMENT=36 DEFAULT CHARSET=utf8 COMMENT='组织表'; -- ---------------------------- -- Records of org -- ---------------------------- INSERT INTO `org` VALUES ('32', 'org1', null, null); INSERT INTO `org` VALUES ('33', 'org2', null, null); -- ---------------------------- -- Table structure for peernode -- ---------------------------- DROP TABLE IF EXISTS `peernode`; CREATE TABLE `peernode` ( `pk_Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '节点ID', `PeerName` varchar(255) DEFAULT NULL COMMENT '节点名', `Ip` varchar(255) DEFAULT NULL COMMENT 'peer容器Ip', `Online` tinyint(1) DEFAULT NULL COMMENT '是否在线,1为在线,0为离线', `ContainerId` varchar(255) DEFAULT NULL COMMENT '容器ID', `fk_org_Id` int(11) DEFAULT NULL COMMENT '所属组织ID(新增字段)', `PeerId` varchar(255) DEFAULT NULL, PRIMARY KEY (`pk_Id`) ) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8 COMMENT='peer节点表'; -- ---------------------------- -- Records of peernode -- ---------------------------- INSERT INTO `peernode` VALUES ('21', 'peer1.org2.example.com', '172.17.16.77', '1', 'f5b228454ad4454d4f4deb22f012dd2ff3c6874d08e1992b67fc1468ee266f6d', '33', 'peer2'); INSERT INTO `peernode` VALUES ('22', 'peer0.org2.example.com', '172.17.16.77', '1', 'bc78b971122d854b225563fb4ca26f48ba5f1cdd6b1b0453ba2d49753cb9f438', '33', 'peer1'); INSERT INTO `peernode` VALUES ('23', 'peer0.org1.example.com', '172.17.16.77', '1', '3e3a0aaa13ffe278fec23b97eabd5050926de0196204ef4e2fc092f807700b6f', '32', 'peer1'); INSERT INTO `peernode` VALUES ('24', 'peer1.org1.example.com', '172.17.16.77', '1', '808b3ec73e1c0c6f2fc23c7d1cf50b10827191c803fffa7dd17ab1125176eb49', '32', 'peer2'); -- ---------------------------- -- Table structure for uploadchaincode -- ---------------------------- DROP TABLE IF EXISTS `uploadchaincode`; CREATE TABLE `uploadchaincode` ( `pk_Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '用户上传或平台自带的智能合约代码ID', `name` varchar(255) DEFAULT NULL COMMENT '合约名字', `MainPath` varchar(255) DEFAULT NULL COMMENT '主函数路径', `UploadPath` varchar(255) DEFAULT NULL COMMENT '上传路径', `ChaincodeType` varchar(255) DEFAULT NULL COMMENT '智能合约类型:有example2,map,userUpload', `Description` varchar(255) DEFAULT NULL COMMENT '描述', PRIMARY KEY (`pk_Id`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='用户上传或者平台自带的智能合约代码表'; -- ---------------------------- -- Records of uploadchaincode -- ---------------------------- INSERT INTO `uploadchaincode` VALUES ('1', '转账示例', 'github.com/chaincode_example02', '', 'example2', '初始化两个用户的账户和余额,实现相互转账'); INSERT INTO `uploadchaincode` VALUES ('2', '通用数据存储', 'github.com/map', '/opt/fabric-0.6/unzip/map', 'map', '实现key value形式的通用数据存储'); INSERT INTO `uploadchaincode` VALUES ('3', 'qwe123', 'user_chaincode', '/usr/local/unzip/1508916518', 'userUpload', '123123');
true
a1de1acc1d340ca229cc8525c877a3c8cb0fcd1d
SQL
radtek/abs3
/sql/mmfo/bars/Table/fm_partner_tmp.sql
UTF-8
2,352
2.90625
3
[]
no_license
PROMPT ===================================================================================== PROMPT *** Run *** ========== Scripts /Sql/BARS/Table/FM_PARTNER_TMP.sql =========*** Run ** PROMPT ===================================================================================== PROMPT *** ALTER_POLICY_INFO to FM_PARTNER_TMP *** BEGIN execute immediate 'begin bpa.alter_policy_info(''FM_PARTNER_TMP'', ''CENTER'' , ''C'', ''C'', ''C'', null); bpa.alter_policy_info(''FM_PARTNER_TMP'', ''FILIAL'' , ''F'', ''F'', ''F'', null); bpa.alter_policy_info(''FM_PARTNER_TMP'', ''WHOLE'' , ''C'', ''C'', ''C'', null); null; end; '; END; / PROMPT *** Create table FM_PARTNER_TMP *** begin execute immediate ' CREATE GLOBAL TEMPORARY TABLE BARS.FM_PARTNER_TMP ( ID_A VARCHAR2(14), ID_B VARCHAR2(14), CNT NUMBER, REF NUMBER ) ON COMMIT DELETE ROWS '; exception when others then if sqlcode=-955 then null; else raise; end if; end; / PROMPT *** ALTER_POLICIES to FM_PARTNER_TMP *** exec bpa.alter_policies('FM_PARTNER_TMP'); COMMENT ON TABLE BARS.FM_PARTNER_TMP IS ''; COMMENT ON COLUMN BARS.FM_PARTNER_TMP.ID_A IS ''; COMMENT ON COLUMN BARS.FM_PARTNER_TMP.ID_B IS ''; COMMENT ON COLUMN BARS.FM_PARTNER_TMP.CNT IS ''; COMMENT ON COLUMN BARS.FM_PARTNER_TMP.REF IS ''; PROMPT *** Create grants FM_PARTNER_TMP *** grant SELECT on FM_PARTNER_TMP to BARSREADER_ROLE; grant SELECT on FM_PARTNER_TMP to BARS_ACCESS_DEFROLE; grant SELECT on FM_PARTNER_TMP to BARS_DM; grant SELECT on FM_PARTNER_TMP to START1; grant SELECT on FM_PARTNER_TMP to UPLD; PROMPT ===================================================================================== PROMPT *** End *** ========== Scripts /Sql/BARS/Table/FM_PARTNER_TMP.sql =========*** End ** PROMPT =====================================================================================
true
599bef271eca3d221d401da57b2c554abaa0934b
SQL
EdwinkC/Student_Management
/student_management.sql
UTF-8
4,312
3.0625
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : mysql Source Server Type : MySQL Source Server Version : 50721 Source Host : localhost:3306 Source Schema : student_management Target Server Type : MySQL Target Server Version : 50721 File Encoding : 65001 Date: 22/08/2018 21:16:00 */ SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for login -- ---------------------------- DROP TABLE IF EXISTS `login`; CREATE TABLE `login` ( `userId` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `password` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `position` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, PRIMARY KEY (`userId`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of login -- ---------------------------- INSERT INTO `login` VALUES ('admin', 'admin', 'root'); INSERT INTO `login` VALUES ('user', 'user', 'student'); -- ---------------------------- -- Table structure for student -- ---------------------------- DROP TABLE IF EXISTS `student`; CREATE TABLE `student` ( `stuId` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `stuName` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `stuSex` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `stuAge` int(255) NULL DEFAULT NULL, `stuJg` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `stuZy` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `classId` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `stuSourse` decimal(5, 2) NULL DEFAULT NULL, PRIMARY KEY (`stuId`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of student -- ---------------------------- INSERT INTO `student` VALUES ('0702318', '杨明辉', '男', 25, '四川', '软件工程', '07020302', 519.35); INSERT INTO `student` VALUES ('0703225', '任烈华·', '男', 23, '广东', '物理', '07030202', 507.50); INSERT INTO `student` VALUES ('0704111', '刘文雨', '女', 22, '浙江', '建筑设计', '07040101', 516.00); INSERT INTO `student` VALUES ('0802105', '易素敏', '女', 20, '陕西', '自动控制', '08020101', 562.50); INSERT INTO `student` VALUES ('0802535', '黄新海', '男', 21, '山西', '生物化学', '08020501', 543.50); INSERT INTO `student` VALUES ('2018001', '小明', '男', 20, '山东', '物理', '08020001', 600.25); INSERT INTO `student` VALUES ('2018003', '小黄', '女', 21, '山西', '地理', '08020002', 687.85); INSERT INTO `student` VALUES ('2018004', '小海', '女', 22, '浙江', '物理', '08020001', 578.20); INSERT INTO `student` VALUES ('2018005', '小新', '女', 18, '福建', '化学', '08020003', 456.74); INSERT INTO `student` VALUES ('2018006', '小李', '女', 21, '广东', '电子信息', '08010001', 568.45); INSERT INTO `student` VALUES ('2018007', '小马', '女', 20, '广西', '物联网', '08010002', 453.25); INSERT INTO `student` VALUES ('2018008', '赵鹏飞', '男', 20, '山东', '软件工程', '2016001', 750.85); INSERT INTO `student` VALUES ('2018009', '黄少童', '男', 20, '山东', '软件工程', '2016001', 751.00); INSERT INTO `student` VALUES ('2018010', '秦始皇', '男', 20, '西安', '软件工程', '2016001', 700.00); INSERT INTO `student` VALUES ('2018011', '木乃伊', '女', 20, '西安', '考古学', '2016002', 462.02); INSERT INTO `student` VALUES ('2018012', '海绵宝宝', '男', 10, '北京', '动画', '2016003', 561.00); INSERT INTO `student` VALUES ('2018013', '爱迪生', '男', 20, '山东', '软件工程', '2016001', 710.00); INSERT INTO `student` VALUES ('2018014', '爱因斯坦', '男', 20, '西安', '软件工程', '2016001', 760.00); INSERT INTO `student` VALUES ('2018015', '蒙娜丽莎', '女', 20, '上海', '考古学', '2016002', 562.02); INSERT INTO `student` VALUES ('2018016', '派大星', '男', 10, '北京', '动画', '2016003', 451.00); SET FOREIGN_KEY_CHECKS = 1;
true
5e4837f4565f445fad28f24f59f6ca8f44f1f230
SQL
ganareynara/liburbareng
/liburbareng.sql
UTF-8
2,380
3.0625
3
[ "CC-BY-4.0", "CC-BY-3.0" ]
permissive
/* SQLyog Ultimate v12.5.1 (64 bit) MySQL - 10.4.11-MariaDB : Database - liburbareng ********************************************************************* */ /*!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*/`liburbareng` /*!40100 DEFAULT CHARACTER SET utf8mb4 */; USE `liburbareng`; /*Table structure for table `customer` */ DROP TABLE IF EXISTS `customer`; CREATE TABLE `customer` ( `id` int(4) NOT NULL AUTO_INCREMENT, `nim` varchar(20) NOT NULL, `nama` varchar(30) NOT NULL, `jenkel` varchar(10) NOT NULL, `tgl_lhr` date NOT NULL, `alamat` varchar(30) NOT NULL, `email` varchar(30) DEFAULT NULL, `no_tlp` varchar(15) NOT NULL, `jurusan` varchar(20) DEFAULT NULL, `angkatan` varchar(4) DEFAULT NULL, `username` varchar(20) NOT NULL, `password` varchar(20) NOT NULL, `level` varchar(5) DEFAULT NULL, PRIMARY KEY (`id`,`nim`) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4; /*Data for the table `customer` */ insert into `customer`(`id`,`nim`,`nama`,`jenkel`,`tgl_lhr`,`alamat`,`email`,`no_tlp`,`jurusan`,`angkatan`,`username`,`password`,`level`) values (3,'A12.2017.05849','Gana Aditya Reynara','Laki','2020-05-01','Boja','gana@gmail.com','1123242454','SI','2017','gana','gana','cust'), (4,'A12.2017.05910','Cator Ilham Pratama','Laki','2020-05-01','Kudos','cator@kudus.com','087321421231','TI','2017','cator','cator','cust'), (5,'A12.2017.05840','Anabella Dhara','Perempuan','2020-05-27','Ngaliyan','abel@gmail.com','09832432681','SI','2017','abel','abel','cust'); /*Table structure for table `order` */ DROP TABLE IF EXISTS `order`; CREATE TABLE `order` ( `paket` varchar(15) NOT NULL, `username` varchar(30) NOT NULL, `pilpaket` varchar(1) NOT NULL, `tgl_brgkt` date NOT NULL, `duduk` varchar(10) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; /*Data for the table `order` */ /*!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
fd54a3edbcaa25108c4608195487e3a739e81d92
SQL
Tempta36/westos
/_installation/mysql.sql
UTF-8
320
2.984375
3
[]
no_license
CREATE TABLE users( user_id int(11) NOT NULL AUTO_INCREMENT, user_name varchar(64) COLLATE utf8_unicode_ci NOT NULL, user_password_hash varchar(255) COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (user_id), UNIQUE KEY (user_name) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='user data';
true
3677e29869f8b2c11f4bbbd4f24c1c093c02480a
SQL
teamvanguard/vanguard
/database.setup/database.sql
UTF-8
1,998
3.71875
4
[]
no_license
-- Run these commands in SQL -- First create the Database CREATE DATABASE vanguard; -- To create the users table CREATE TABLE "users" ( "id" serial primary key, "username" varchar(60) UNIQUE, "password" varchar(100), "name" varchar(50), "student_id" integer UNIQUE, "pic" varchar(300), "pts" integer DEFAULT 0, "lifetime_pts" integer DEFAULT 0, "role" integer DEFAULT 4, "email" varchar(60) UNIQUE, "employee_id" integer UNIQUE ); -- To create the items table CREATE TABLE "items" ( "id" serial PRIMARY KEY, "item_name" character varying(60) NOT NULL, "item_description" varchar(180) NOT NULL, "pts_value" integer NOT NULL, "item_image" varchar(300), "qty" integer DEFAULT(0), "school_community" Boolean NOT NULL, "last_edit_user_id" integer references "users" ON DELETE SET NULL ); -- To create the challenges table CREATE TABLE "challenges" ( "id" serial primary key, "challenge_name" character varying(60) NOT NULL, "description" varchar(180), "start_date" varchar(60) NOT NULL, "end_date" varchar(60) NOT NULL, "pts_value" integer NOT NULL, "teacher_id" integer references "users" ON DELETE CASCADE ); -- To create the transactions table CREATE TABLE transactions ( "id" serial primary key, "student_id" integer REFERENCES "users" ON DELETE CASCADE NOT NULL, "pts" integer NOT NULL, "employee_id" integer REFERENCES "users" ON DELETE SET NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "item_id" integer REFERENCES "items" ON DELETE SET NULL, "challenge_id" integer REFERENCES "challenges" ON DELETE SET NULL, "type" varchar(10) NOT NULL ); -- To create the student_challenge table CREATE TABLE student_challenge ( "id" serial primary key, "student_id" integer REFERENCES "users" ON DELETE CASCADE NOT NULL, "challenge_id" integer REFERENCES "challenges" ON DELETE CASCADE NOT NULL, "pass" boolean DEFAULT 'true' NOT NULL, "timestamp" timestamp with time zone NOT NULL ); --Your database is ready
true
b9c9512d9041853fb1d7dc6fbfd8bdb73fb4bc61
SQL
thangduong3010/PL-SQL
/Practice/declare_NestedTables.sql
UTF-8
365
2.640625
3
[]
no_license
SET SERVEROUTPUT ON DECLARE TYPE location_type IS TABLE OF hr.locations.city%TYPE; offices location_type; BEGIN offices := location_type ('Bombay', 'Tokyo', 'Singapore', 'Oxford'); FOR i IN 1 .. offices.COUNT () LOOP DBMS_OUTPUT.put_line (offices (i)); END LOOP; END;
true
c4cb4bd716a2a887b95b8c50ab06a5f934624bcb
SQL
larslunddk/APLLU_TestVSTS_GIT
/SQL/DemkoTests/LP_20080609_ULCertificateView.SQL
UTF-8
2,139
3.0625
3
[]
no_license
SELECT bmssa.PROJCERTIFICATE.CERTIFICATEID, bmssa.PROJTABLE.ENDDATE AS Cert_DateOfIssue, dbo.PROJINVOICETABLE.COUNTRYID AS Customer_location_Country, dbo.COUNTRY.REGIONCODE AS Customer_Region, 'DK' AS CO_Location, bmssa.PROJCERTIFICATE.CERTTYPE AS Certificate_Type, dbo.PROJDECISIONLINK.DECISIONID AS Standard_Series, dbo.INVENTTABLE.ITEMGROUPID AS Category, 'UL Demko' AS PoW_Office, dbo.CUSTTABLE.NAME AS Customer_name, bmssa.PROJTABLE.ORA_INDUSTRICODE AS Industry, '' AS Comments FROM dbo.PROJDECISIONLINK INNER JOIN dbo.INVENTTABLE ON dbo.PROJDECISIONLINK.ITEMIDREADONLY = dbo.INVENTTABLE.ITEMID AND dbo.PROJDECISIONLINK.DATAAREAID = dbo.INVENTTABLE.DATAAREAID INNER JOIN bmssa.PROJTABLE INNER JOIN dbo.CUSTTABLE ON bmssa.PROJTABLE.CUSTACCOUNT = dbo.CUSTTABLE.ACCOUNTNUM AND bmssa.PROJTABLE.DATAAREAID = dbo.CUSTTABLE.DATAAREAID INNER JOIN bmssa.PROJCERTIFICATE ON bmssa.PROJTABLE.PROJID = bmssa.PROJCERTIFICATE.PROJID AND bmssa.PROJTABLE.DATAAREAID = bmssa.PROJCERTIFICATE.DATAAREAID INNER JOIN dbo.PROJINVOICETABLE ON bmssa.PROJTABLE.DATAAREAID = dbo.PROJINVOICETABLE.DATAAREAID AND bmssa.PROJTABLE.PROJINVOICEPROJID = dbo.PROJINVOICETABLE.PROJINVOICEPROJID ON dbo.PROJDECISIONLINK.PROJID = bmssa.PROJTABLE.PROJID AND dbo.PROJDECISIONLINK.DATAAREAID = bmssa.PROJTABLE.DATAAREAID INNER JOIN dbo.COUNTRY ON dbo.PROJINVOICETABLE.COUNTRYID = dbo.COUNTRY.COUNTRYID AND dbo.PROJINVOICETABLE.DATAAREAID = dbo.COUNTRY.DATAAREAID WHERE (bmssa.PROJTABLE.DATAAREAID = 'dat') AND (dbo.PROJDECISIONLINK.LINENUM = 1) GROUP BY bmssa.PROJCERTIFICATE.CERTIFICATEID, bmssa.PROJTABLE.PROJID, bmssa.PROJTABLE.NAME, bmssa.PROJTABLE.CUSTACCOUNT, dbo.PROJDECISIONLINK.DECISIONID, bmssa.PROJCERTIFICATE.CERTTYPE, bmssa.PROJCERTIFICATE.PROJCERT_ENECGRCODE, bmssa.PROJTABLE.ENDDATE, dbo.PROJINVOICETABLE.COUNTRYID, dbo.CUSTTABLE.NAME, bmssa.PROJTABLE.ORA_INDUSTRICODE, dbo.INVENTTABLE.ITEMGROUPID, dbo.COUNTRY.REGIONCODE
true
99a2451941c36c15ae8e8fc245ecc4ac10251927
SQL
ucabogm/prob-poly-DSH
/SQL_queries/150_medication_stop_query.sql
UTF-8
3,498
4.09375
4
[]
no_license
# get a table of all rows of medication 150 in the therapy table CREATE TABLE oliver.therapy_150_single_row AS SELECT * FROM 17_205R_Providencia.therapy WHERE bnfcode = 150; # get a list of patients that recieve medication 150 at some point in their therapy CREATE TABLE oliver.patids_150 AS SELECT DISTINCT patid FROM oliver.therapy_150_single_row; # add indexing in on eventdate in therapy_single_row ALTER TABLE `oliver`.`therapy_150_single_row` ADD INDEX `eventdate_idx` (`eventdate` ASC); # get dates of first and last instances of 150 coded in the therapy data for this group of patients CREATE TABLE oliver.eventdates_150 AS SELECT patid, max(eventdate) AS max_eventdate_150, min(eventdate) AS min_eventdate_150 FROM oliver.therapy_150_single_row GROUP BY patid; # get date of last entry in therapy table for this list of patients CREATE TABLE oliver.enddate_150 AS SELECT t.patid, max(t.eventdate) AS max_eventdate FROM 17_205R_Providencia.therapy AS t INNER JOIN oliver.eventdates_150 AS s ON s.patid=t.patid GROUP BY t.patid; # join the eventdates and enddate tables and create a new flag: # 1 if last date of data entry more than 84 days after last date of medication 150 # 0 if last date of medication 150 is within 84 days of last data entry CREATE TABLE oliver.flags_150 AS SELECT t.patid, s.min_eventdate_150, IF(s.max_eventdate_150 - INTERVAL 6 MONTH < s.min_eventdate_150, s.min_eventdate_150, s.max_eventdate_150 - INTERVAL 6 MONTH) AS max_eventdate_150_less_6_month, s.max_eventdate_150, t.max_eventdate, IF(t.max_eventdate > (s.max_eventdate_150 + INTERVAL 84 DAY), 1, 0) AS stopped_in_data FROM oliver.enddate_150 AS t INNER JOIN oliver.eventdates_150 AS s ON s.patid=t.patid; ################################################################################################################# # this code is going straight in to command prompt on idhs server # need clinical data from last instance of 150 to 84 days after AS clinical_150_max_84_after # need clinical data from prior to 84 days after last instance of 150 to start AS clinical_150 # need therapy data for 84 days prior to first instance of 150 AS therapy_150_min_84_before # need therapy data for 84 days prior to 6 months before the last instance of 150 AS therapy_150_max_6_mnth_84_before # need flags data AS flags_150 # need patient data AS patient_150 SELECT s.* FROM oliver.flags_150 AS t LEFT JOIN 17_205R_Providencia.clinical AS s ON t.patid=s.patid WHERE s.eventdate BETWEEN t.max_eventdate_150 AND t.max_eventdate_150 + INTERVAL 84 DAY INTO OUTFILE '/data/mysql-files/clinical_150_max_84_after.txt'; SELECT s.* FROM oliver.flags_150 AS t LEFT JOIN 17_205R_Providencia.clinical AS s ON t.patid=s.patid WHERE s.eventdate <= t.max_eventdate_150 + INTERVAL 84 DAY INTO OUTFILE '/data/mysql-files/clinical_150.txt'; SELECT s.* FROM oliver.flags_150 AS t LEFT JOIN 17_205R_Providencia.therapy AS s ON t.patid=s.patid WHERE s.eventdate BETWEEN t.min_eventdate_150 - INTERVAL 84 DAY AND t.min_eventdate_150 INTO OUTFILE '/data/mysql-files/therapy_150_min_84_before.txt'; SELECT s.* FROM oliver.flags_150 AS t LEFT JOIN 17_205R_Providencia.therapy AS s ON t.patid=s.patid WHERE s.eventdate BETWEEN t.max_eventdate_150_less_6_month - INTERVAL 84 DAY AND t.max_eventdate_150_less_6_month INTO OUTFILE '/data/mysql-files/therapy_150_max_6_mnth_84_before.txt'; SELECT * FROM 17_205R_Providencia.patient WHERE patid IN (SELECT patid FROM oliver.flags_150)
true
0f1087f815386a410b63a9a73a2ed1bf3af31683
SQL
nicolash0125/SuperAndes
/docs/ScriptsRequerimientos/RFC1.sql
UTF-8
204
2.671875
3
[]
no_license
--SELECT * FROM CLIENTE; SELECT sucursal, sum(total) FROM venta WHERE fechaventa BETWEEN TO_DATE('2018/9/12','yyyy/mm/dd') AND TO_DATE('2018/12/12','yyyy/mm/dd') GROUP BY sucursal; commit; rollback;
true
64a92f381b2381e501a4ed7052be62db23c5f877
SQL
danielrogersenable/advent-of-code-2020
/2020-Day24-1.sql
UTF-8
23,987
2.65625
3
[]
no_license
IF OBJECT_ID('tempdb.dbo.#Input', 'U') IS NOT NULL BEGIN DROP TABLE #Input END CREATE TABLE #Input ( InputRowId bigint not null IDENTITY(1,1), DirectionRow nvarchar(max) ) --INSERT INTO #Input --VALUES --('sesenwnenenewseeswwswswwnenewsewsw'), --('neeenesenwnwwswnenewnwwsewnenwseswesw'), --('seswneswswsenwwnwse'), --('nwnwneseeswswnenewneswwnewseswneseene'), --('swweswneswnenwsewnwneneseenw'), --('eesenwseswswnenwswnwnwsewwnwsene'), --('sewnenenenesenwsewnenwwwse'), --('wenwwweseeeweswwwnwwe'), --('wsweesenenewnwwnwsenewsenwwsesesenwne'), --('neeswseenwwswnwswswnw'), --('nenwswwsewswnenenewsenwsenwnesesenew'), --('enewnwewneswsewnwswenweswnenwsenwsw'), --('sweneswneswneneenwnewenewwneswswnese'), --('swwesenesewenwneswnwwneseswwne'), --('enesenwswwswneneswsenwnewswseenwsese'), --('wnwnesenesenenwwnenwsewesewsesesew'), --('nenewswnwewswnenesenwnesewesw'), --('eneswnwswnwsenenwnwnwwseeswneewsenese'), --('neswnwewnwnwseenwseesewsenwsweewe'), --('wseweeenwnesenwwwswnew'); INSERT INTO #Input VALUES ('nenwwwnwsenwneswnwnwnwnwnw'), ('senwwneeneeneneneenenesweneswenenene'), ('newnwnwnwnwnwnwesenwenenwenwnwnwwnwsw'), ('wswnesewwwnwwnewswswnesw'), ('wnwwwwswwwwswwswswwswnesweww'), ('esenwneswseeseseseneseeweseseseseswse'), ('neseesweenweeeewwswee'), ('senwnesewnwwsenenwsewwewswwnwwswew'), ('nwesesewswnwnwsenw'), ('nwnenewnwnwwsenwnwswnwwnww'), ('eeseeeeweneeeseneweneeeeeee'), ('nwweeeeeeeswnwneneneeesenenese'), ('wewwwwwwwwswnwnewswwwwseww'), ('sweneenwswswneewswnwnwneeneneswnew'), ('swsenewwsenesewseneswsenwseneswsesenee'), ('nenwnenwneswsenenenenenewnwne'), ('wwwwwwwwwew'), ('nenenenwnesenwnenesewswnenenenwne'), ('seeswnwsewwnweswneswswseseseseseswsw'), ('swswwenwnweswwseneneewsenwwwe'), ('eeneneenewneeewneeseneneeeneene'), ('nenweenwenenenenesenesenee'), ('eswweeswsenenwnwnwwseswwnwnwneenene'), ('nwswnenwnwneenenwnwneweneswneneenwnene'), ('newneneneeneneneneseenenenenewnwnewne'), ('swwwswwswwwwwwswneww'), ('swnwsenwsewnwnwneeswneeswneneswwnesene'), ('neneneenenwneeswswnenenenenene'), ('wnwswnwsenwnenwnwwnwewnwwnwwnwnwnww'), ('seswnwwesenwwnwneswwnwweenwnwenw'), ('wseseseseseseseseseewesenwseese'), ('seesesesesenwesesweneseweeesesesw'), ('ewnewnesenwswnesenwwsenenwenenenenew'), ('eeenenenenenwneneneswneneneenee'), ('seeeseeneeeseseseseseeeswe'), ('seswseseswneswseswswswswswseswswswse'), ('newwwwwswwswsenenewwwsenwswwww'), ('nenenenwnenwswenenenenenene'), ('nwnwnwnwnwnwnwsenwwwnwnwnwnwnwnwnwnesw'), ('seenewnwnenesewnenesweeneeneneesw'), ('nenewswenwnwnwwnewnwseneneneswenwswsene'), ('nwseesenwnenewnwswswsesenesewsesesesw'), ('sewseseeseseswseswse'), ('wswwswswsweswswswswsenwswneneseswswse'), ('eeeweneseeeeeeneneeweeneee'), ('enesweenwweneneeeseeeeneenewe'), ('wwenwnenwnwswsenwnenwwwnwweswww'), ('nenwenwnwnwnwnwneswnwnwswnwnwnwsenwnwnw'), ('nenwewneeneseswswesw'), ('nwswenwseswswswswsewswswswseseseneswsese'), ('nwswsesesenewsweswsweseswnesew'), ('nwnwnwneneenenwnenenewnenwsenwnenenwnew'), ('nwewwwswswswwwsenwwesweswswswnew'), ('sweseneswswswseswseswseswseswnwswswnwsw'), ('sweswenewneneneneneseneneeenenwnene'), ('swswswswswswswswnwswswswswswswswseeswnwse'), ('swseswenwseseseseswswsesewswseswswsese'), ('enwwwwwseenwewwwnwwwnwwwww'), ('wwswwwwwnwwwwwnenw'), ('eeswenwseeesenweeneeswseseeeese'), ('sweenwwneneenene'), ('enweswseeseeeeeeenweeeseee'), ('wswwwswsweswswswswnewwwsw'), ('nenwswnewnenwnwnwsewnenesenenenenenenw'), ('swwneweseswswswswswwswswneswswswnesw'), ('nenwnenwnwnwnenwnwsenenwnwnwnwnenwnw'), ('wnenenewneenenenwseneneneseneswwe'), ('wseenwnenwneswseneneenwneswnenwswnew'), ('enwwenenenesewsweneswseswsewnenewsw'), ('eweeeeeseneeseswsesenwswsenwweee'), ('seseeeenwseeeseenwseeeeeeee'), ('nwnwneneenenenenwnwnwnwnwnwneneswswnenw'), ('seeeseseseswnwseseneswnwseseswnenwsesee'), ('swswswswswswswswswswswswseewswswswswne'), ('wswwwswwswnwwsew'), ('wwnwwnewwwwswsewwwwwwnwseww'), ('enwnwswewneneseswnenenwswnwnwenwsenenene'), ('seseesesewneswnwsewswenwseneswwsesee'), ('swseswswswsenwswswswswswseswseswnw'), ('seseseswseeseseeseswnwnewseeesesese'), ('nwnenenwnewsewnwswenenwenenene'), ('ewwsesenwneneeesweeeneneeneenenew'), ('swswwneeneswswswswnwswsw'), ('neswswwwswnewwseneswnewwnwweswsew'), ('nwnenewwswnwwwwwesewweswwwsesw'), ('enweewwseeneeseneseenweseneee'), ('weswneeneseneenwnwswweeeneeswwe'), ('enweneeeseseeseww'), ('nenwswnenwnwnwswnwnwenwnenwnwsenenwnenene'), ('wweswseesenwsesenwe'), ('neswnwswnwneneenene'), ('nwnenenewnwswenenwenwnenwnwnenenwnenw'), ('eneneewswnwwseswneswsewnenwwswnewwse'), ('nwsesweeneeweseseseseseenesesesee'), ('seeseseseeeewsenwsesesenwseesesese'), ('neneswnenenwneneeneneneswnwnenenwnenenene'), ('seseswwsesenesesesesesesesesesesenesesese'), ('seneswesenesewneweseseneseseweeesee'), ('eeswswswseesenwsenwnweeeneeneesesw'), ('eeeseeseseesesenwseseseseeseenwnw'), ('swnwswswenwswsewneswseseswwswseswnwe'), ('nwneeenenewsenene'), ('nesesenwneseswseswswwnwseswswseswseseswsw'), ('sesenesewnesesesesesewseseseseesesesw'), ('wnesewsewseseswnwswswsenwswwneswnenewne'), ('eeseeeeeeseesweeeeeenwe'), ('neswsewnwneswwsewneeseswsee'), ('neswseseenenwswneneenwenweneneswew'), ('eeeeswseeeeeenweeeeewene'), ('nwwnwnwnwnwnwnwnwnwnenwswnwnwnw'), ('weeeesewseswsenwnwnwneswnwwnwnwne'), ('weneswswewewswseswswswswwnenwswnesw'), ('nwewnwenwnwnenwnwnwswnenenwnwnwnwnwnw'), ('swswswseswneeswswswwswwswswswswswswswsw'), ('sesewswenwsesewsesewnwnesesesenenwne'), ('eeeeseesweenweseeeneesweee'), ('newswsewnenwnwsewsenw'), ('wswnewwwsewsewwwwswwwsewwnenw'), ('seenwnwnwesenewseeswsew'), ('nenwwwwnwnwnwwsewwnwnwwwwwsenew'), ('eseeeeeeeeneeneeeeeeewseew'), ('nwneweeswnwnenenwweeweswseswene'), ('swswwwswneswswswswswseswsweswswnwswswswsw'), ('nwswesenweeenwsenweewnweseswneee'), ('swswseseswswnwswswswswswswseswswnwseswe'), ('wenewnwwwewwswwweesw'), ('wswswswwwswwnewswswneswseswwwswswsw'), ('nwswwesewsesewnenenwswwwwwwww'), ('eeneswnwseeeeenwweneneswnwswne'), ('wwwswwwnwwewwwnwwwwweswww'), ('sesenwseseseeseswnwsesewsesesenesesese'), ('seseswnwswswswswsesweswswnwswswswseswswsw'), ('enwseseswwseneseeneeseneseewseseew'), ('nwsenwnwnwnewnenwwseswnwsenwww'), ('ewneeeneweeenenweeneeeswenene'), ('swswswswwswneeswesesewneswswnwnewswsw'), ('sewseswnewseneswwnw'), ('wwnwnenenwnweeneneneenwnenenesw'), ('eseeneneneeswnweswesewsewneswwnene'), ('nwnwwnwnwnwnwwnwenwnwswnwnwswnwwnwe'), ('nwsenwseswwewnenwnewnwnwsenesenwnwnw'), ('newswenwseweswwswswswswswneswnwsesww'), ('swwswswseswwswnwsweswnenewwswswswsw'), ('neneneeswneneewneneneeneeeneswenenw'), ('eneeneneeeseweeneene'), ('swseswseseswwneseseswswsweswseseseswsw'), ('eeseeeseeeneseeeeeswseee'), ('eswnwswwswsenwseswswwswseswswneeswsenwsw'), ('swwnwnwswwseswwswwswenewswswwwswsw'), ('seseswseswseneseneeseswseswsesewswswsw'), ('nenenenenenwneswnwnwene'), ('wwwswneweswswwwseswswneswswswswwsw'), ('wswwswneneswwswwsenwnenesewwwswse'), ('nwewwwwwnwnwnwenwsenwnwwnweswswsw'), ('seseeeeeeseseswsenwsenwewseseese'), ('seenwsewseseseseeseseswseswseswsesenw'), ('nwswewwseneneseswseswnwswsenwsenwswnw'), ('swswswswswswneswnweswswswswnwswswswwsesw'), ('eeseeeseseswseweeesenwseeeeese'), ('wnwwwwwwwwwwenwnw'), ('eseseseseswswwneneseneeeswenesesee'), ('swneswnwnewwneeneseseneneneewnenenw'), ('weeeeeenweeeewswneeeeeese'), ('eeenwsweneneesweneneeeeeeee'), ('sewwewwswnwwswswesw'), ('newswneneneneeneeswnew'), ('nenenwnwwseswnenwnwnenwnenwseswneewnenw'), ('nenwnwwnwnwnwsenwnwwnwnwnwnwsenwnwnwnw'), ('wwnwnwwswwwnwwnwnwneewnwnwwsenw'), ('sweswswwneneswesesenwsenwwswseswsesesese'), ('wseseswseseseseseseseesenenwseseswwnwse'), ('wnwnwswwnwnwwnenwwnwwseenwwwwnwsew'), ('wenwseeseseswenwnweeeswneseesese'), ('eenenwewewneneneeswe'), ('swswseswswswnwseeswnwswswsenwswswsenesenw'), ('nwwnwseewnesweeeeeseeeeeeswee'), ('neneswnenenenenenenwenwwseswnenee'), ('swswswewswwwswnewsewswswsw'), ('nwnwwnwnwnwnweeswsenwnwnwnw'), ('swseseswneseswseswseseseseswseswsesw'), ('swsewsenwswswseseswswswswsweseswswswnw'), ('sesenwnwnwnenwnwnwnwnwnwnwnwnwnwnwnwnww'), ('swnesweswswswswswnwwwswswswswwswwsesw'), ('seeeeeeseeseeesweeswnweseswnwenw'), ('neesweeeweeewneeeseneeee'), ('nwwsenenwsenenwwnwnenwwnwnwnwsenenwnenene'), ('seseeseeseeseeneenwseweneswwnwse'), ('sewseseseseseesesesewseseseswseenesese'), ('wnwnesenwwwnenwwneswswwnenwwwwwsw'), ('nwneenenenenenwneseneseneneneswnenwnene'), ('wnenwseewwwwwwnenwswwwswnwwnese'), ('eneewwwsewwnenwnwwnewswnwswsese'), ('sweseswseeneswnenwneseesewewnwwse'), ('eeneeenewweeseseseseseeseseseeee'), ('wnwwnwnwnwwwwsewnwwenwnwnwwwnwne'), ('nwnwnwnwnwnwnwnesewnwnwnwnwnwnwewnwnwnwsw'), ('nenwwneeenenwnwnenwnwwswnenenesenenwne'), ('ewneeneeseweenweeeseeenweenesw'), ('enwweeseesweenwnesweweeeee'), ('seeeseseswseseswswsesewseweswsenwswsene'), ('eneeweeeeeeseswseeeeswenwee'), ('swswnwseswswsenwnwnwewwswswswwnwswese'), ('esenwnwseeeswswenwnwseneenwsenwswsene'), ('nwnwwnwnwnwnwnwsenwnwww'), ('swsesenwseseneswswesesesesenwseseseswsese'), ('eseswswseenwseseseseseseswwse'), ('wneenwnwnwnwnwnenenwswswnenwnesenenwsw'), ('seseeseneeseeseeeswneeswsee'), ('wswwswnewswnwweneseewwwnwwwww'), ('nwwwwwwnewwswwwwweeswnwwsw'), ('sewwwewwseewnewswwwnwnewnww'), ('weseseseneswesenwsesenwswseseswswsenene'), ('nwewnwswnwnenwnwwwnwwweewseswnww'), ('nenenwswwnwswnwnwsenwwnenwwenwnwsew'), ('wseeeseseseeeneseseseswseenwseee'), ('sesesesesesewseseeseseseseesesesenwse'), ('swseeseeeseeeeseswseweenwnwneee'), ('nweswnenwswnwnwweneswswnwsenwnweswnwnenw'), ('newwsewnwnwnwnwnw'), ('wwwswwswwwswwwswwnweswwswwe'), ('wswneswneseseseswsesesenwseseeswnwswsesesw'), ('nwnweneseesesweeneneeneswnewwnew'), ('enwnwwnwnwnwnwnwnwnwnwnenwwnwsesenenwnw'), ('nwwnwwnwwnwnewnwnwsenwnwwesenwnwswnw'), ('neenwewewesweneweeeseswnwee'), ('nwneseseseesweeeeeseweesesesee'), ('nwswenwswnwnwnwnwnwnesenenwswnenwsenwnw'), ('wwwwwswsewenwwwswnesenwwnwwnw'), ('wneswnwnwwwwwnewsewwwwww'), ('swnenenewswwsenwseseswnwseseswseseeseswe'), ('wewwwnwwseewwnwwnenwnwwwww'), ('swwwwwwwwwwnewwwweewww'), ('eeeneeewseweseeeeeeeewe'), ('wnwnwnwnenenenenenenwnesenwnw'), ('nenwswwnwsweneeseweneesw'), ('nenenewnewneeneneeneeneneneene'), ('seseseeseseseenwseenwseseeeseeesww'), ('nenwwsenwsewsewnwnwnwnwwnwnw'), ('seneeseseseseweeeeweseswse'), ('wswswswsweseseswsenwsese'), ('wnewnweenewsewswnwsenwwswswnwnwnese'), ('wwsenenwnewwwwwwswwse'), ('nenwswswswsewseseenwnwsweswswswsenwe'), ('wnwseeswseenwwnenweseswswswswnesww'), ('nenewneneeneseswnenesewnwnesenenenenwnwnw'), ('wenwnenesenwnenewnenenewnenesenenenwne'), ('swswnwswswswseswswswswswswswswswnwseswe'), ('sesesesesesesesesesenwseeseswsewsenenese'), ('wnwwweewwwewwswwwwwwwne'), ('weenwseeeeweswwneesewwwene'), ('wwswwwwwwwwwnwwwnwwnew'), ('swswseswswswnewswsewnenewswswswwwwsww'), ('wewwwnesenwswenwwswwwenweswnewsw'), ('eneneseneswnwneseneswneswenenenwneswwnwne'), ('eneseeneneneeweneneneneneneene'), ('swsewnwewseeneseeswseweenwne'), ('sesenwwseeswswseseseswsweswseswswswswsw'), ('neneeneneneneneneneneneswneswnwneneneene'), ('seseesesenwsesesesesesesesese'), ('neneenwnenwnwnwnewnwenenwnenwseneneswnw'), ('neeweeewneeeeeeeeeseeesee'), ('nwwwswswnwewnwnwwwnwewnwe'), ('wwwwwnewwswwwwse'), ('seswneneenewwnenenenenwnenesenenesewne'), ('wsesenwnwswneeswswseseswsweseenwswnwsw'), ('wseseneneswnenenwwnenwnwnwnewnwnwnwsenw'), ('seseseseswseseseseneswsesesesesenwsesese'), ('eeswswswnwseswsewnwswnwswnwswe'), ('wswswesewswweswswswwnwnwnesw'), ('neeneeneeewnewseeneseeneneeeee'), ('seesenwnesenwseseseseneswsesesenwsesesesw'), ('neswswwsenwseseseseswseseneseswnwwswnese'), ('nenesenwneneenenenewnwnenenwnwnenenenew'), ('wwswswwswnwswwswwswwwswseswsw'), ('wnwsesenewsewwswswnwsweswswenewswnesw'), ('eeeseswneesweenweenw'), ('senwswenesewnesenwswswweswswswseswnee'), ('wnwwwsewnwnwwswnenww'), ('neneneswswnenenenenweswneswneenenenenwne'), ('seseseseseenwsesee'), ('nwnwneneswenwwwsenewnesenewseswwse'), ('neswseweewenwewwwnenwsenesesesee'), ('wsewnenewewwwswswnwswwwewnwwwsw'), ('nweeeseweswseseewneeeseeenenwe'), ('wswnwenwenwwnenwswseswenwwnwnwesenwne'), ('seneswswneseseseswwseseseseseseseseseswse'), ('ewnweseseseseneeesewneewsweeneese'), ('seneneneneneneewnenewsenenewwsesew'), ('wwnwswwswsesweswwwwwswswswswnesw'), ('nwswnwswnwnwnwenenwnwnenwwnwnwenwnwnw'), ('seeneseeeeneneeneneneweneeenwnwe'), ('nenesewnwnwnwseswsenwnwsweswwwsenenwne'), ('seseseeweeeseseeeneseneseseesesesw'), ('nwneeneneneeseneeeneneenenewnesenee'), ('sesenwneswseswswswenenwswnwswswswswswsw'), ('nwwwnwnwsenwwwnwnwwnwwnwnwewnwsw'), ('nenenwseneswnenesenenenenwnenenenenwnwwne'), ('swswswswwweswwwswneswswwwswswswsw'), ('swswwswswwswnwswneseswswnewswwseseswswsw'), ('nwsenwswsweseseseseseseenwseswswseswsesesw'), ('ewnwswswneneswneseneeswswwnwseneswne'), ('wwwwwsewwwwsewneewnwwwww'), ('sewneswseseswnweeseeeeeseeneesewse'), ('seswneswswwswswseneswse'), ('nwneswnwnwnwnwnwnwnwnwenenwne'), ('wwewwwwwwwnwweseswswwwwnwsw'), ('eeswseneenweeenwnweeseeeenenwsw'), ('swswwwnwwswnwwwewweswewnwnwsewsw'), ('nwwsenwnwnwwnwwwnewesesw'), ('wwwnewnewwwnwwsenwsewwwwwww'), ('swsewswswseswsewseeneswseneswseswswswsw'), ('nwnenwnwnwnenwsenwnwenwnwnwswswnwnwwnwnwnw'), ('sweeswnewwwnwnweseneswsewnesewswnw'), ('swneseseeswseneswnwsw'), ('swweswnewswswwwswseneswnwwswnwsesesw'), ('eenwnwnenenewswswnwneenwnenwnwswnwne'), ('eseseseseeseswseeseseseneseeseseenwew'), ('swsweeneswswswnwwswswswwswwnwswsweswsw'), ('swsweswseswseswnwsesenewnenwswneswswswsw'), ('seswsesenweseseeeseenwseee'), ('seseeseeneeseseswsenweseewsesesesee'), ('swnwnwnewnesenenwnenesenwnwnwwneneenwnw'), ('seswswsesenwswseseseneswseseweenwswsw'), ('wnwnwnwnwnwnwwwnwwnenwnwnwsw'), ('nwnwswnesenwneewnwnwnwnweneseneeww'), ('seswwswneswswseswswswneseswswswswswswsw'), ('newwnwsesenwnenenwnenenwwenwsenenwswnwe'), ('eenewneseesweenwneesenwwsenweese'), ('seewswwwnwwseswswwnwswenenewnew'), ('seseseseseeewnenwee'), ('eeeeswwneneweneewenenweewe'), ('wsenenwswenenwesenwneswsenesenwneswnw'), ('nwnenenenenenenenwneswnwnenewswnwenee'), ('newswseseenweesenweswsewwseeenenw'), ('swsenenwnwnesewwwnwwwnwwsewnewnww'), ('neneneneneneneenenwnenwweneswnenewne'), ('swswseenwwsweswswswswswswewenwswwsw'), ('neeeeneneenewnewneneneseeenene'), ('senwnesenwseswswsesesesenesewwswseseswne'), ('wwsenewswewnwwwwwwnwwwswswswww'), ('eswwwwnenweweswewwwswnwnwsww'), ('nenwnwwnwnwsenwnenwnwsenwwnwnwnwnwnwesw'), ('eneseeneeneeseeneneeewnewneee'), ('eenenwnwneneneeswnweswseeenwneeesw'), ('senwseswswswnenwnwswwseesweeseswswsw'), ('swwnewswsenwwwwwwwnwsenwnwwnewnew'), ('nwnwnwnwnwnwseswnwnwnwnwnenwnenwnwnwnwnw'), ('swnwwswsenwnwwnwnwwnwenenwnwsenwnenwne'), ('nenenwnenewewnenwneeeeswswneese'), ('eeneeneeneneneeesweenwneneeswee'), ('swseswswnwseswseseseswswseswswswswneswsw'), ('wwewwwenwewnewwswwwswnwww'), ('wwnenwwsenwnwnwwwnwwwwwenwnwnww'), ('nwnenenenwnwneenenwnenwwsenwwnwnwnwnene'), ('swswsweswwwwswwwwwwsw'), ('eeneeeneswenenweenenene'), ('eseeswnwswneeeseenwsewseeeenwnwe'), ('seseseseseswsesesenesesesesewwwseesee'), ('esweeseseseseeenwsesesenweeeswe'), ('wwnewwenwnwsewswwnwnwwnwwwnww'), ('nenenesenenenenenenewnwnenewenenenene'), ('nweeeseeseweeenwnwsweeeeee'), ('senwnwnwnwwswnwenwnwwnwnwnwenwneswnw'), ('nwnwswnenenwnwsewsenwswsewsewnwnenenwnene'), ('wneewwwsenwewnwnwesewewnwwwsw'), ('swswneswswswwenwwseswseswnwswswseswswse'), ('swwswswswswswneswseswswswwswswneswsww'), ('wwseswswswswneswswswswswswswswswnwsww'), ('newwwsenewswswswwsw'), ('neneenenweneneneeneneenwneneswseswne'), ('eeesesesesesewseseenew'), ('weweneswsweeenenwewneeswseenene'), ('swnewneneseeeeweneeenwnenwweswsw'), ('seswsenwseesesenwseswsesesese'), ('eeweeseeeeeeneeee'), ('nwnwnesenenenenewnenwnwnwwene'), ('neseswswseeswseswswswseseneswnwseswsesw'), ('nwnwenwnwwwwnweweewwsewswswwnwe'), ('nesesenwewenwseseeseswseswseneeese'), ('ewnwwsenewenwwweewwnwwnwwnw'), ('nesewnwnwnwswwwswnwwnwsenwnwwnwnenewnw'), ('sewsesesewswseseneesesesesese'), ('newnwnwsesenenenwsenenwwwnwsenwnesenwnwse'), ('esesenwesesenweseseseseseswswseesesese'), ('sewwwswswneswwnewwsweewwwwnwsww'), ('swsewwwswwwswnwwnwwwwwewwww'), ('nenwswneneneneenwneewnesesenenenenenee'), ('nwnwnwnwneswsenwnwnwnwnwnwnwwnwenwnwnwnwnw'), ('eeeeesweeeeewseeeneneeswe'), ('nwnwnwnesesewnwnwnwwnwsenwwnwwnwnwnwne'), ('nenwneeneneewneeneeneneneswneeee'), ('seneswneneeswswswseseswseseseenwwswsesw'), ('swnesweswseswsenwsenwewswsenwnesenwse'), ('seseseeswsesesesewsesesenesesesenwsenesese'), ('wnwnenwnwwnwwwwnwseewwnwwewsew'), ('nwnwwnwnwnwwnwenwnwwnwnwnwnwnww'), ('sewsenwnenwnewnwnwnenwnwnwnwwnenwnwenw'), ('nwewwnesewwwwwsenwwwnwnwwwwsww'), ('swnwswswwswswsesewswswwwewnwswswsw'), ('swseneseseseswseswseswwswseswsesw'), ('swwnwwswnwnenwnwnwewsewewwnwwnw'), ('nwnwwnwnwwwwnwsesewnwnwnwnw'), ('wwnwwwenwnwseswwenwnwnwnwenwnwnwnw'), ('nwnwnenwnwwnwnwneesenwwnenenenwseswne'), ('swneenwswwsenwseswswswsenweseswneswseswse'), ('swsweswsewsweneswswswsenwseswsese'), ('eseeswnweeeseeeseswneesesesesesee'), ('nweswwewswnwewnwwnewsenwswwwwnw'), ('nwnenenwswneeeswewseneswneswseeenw'), ('wnwwswwnwnwswenenwwenwwnwnw'), ('eeeeneeeswnweeswenweeneeene'), ('swseeeweswnwneewwswnwswswesenwswnw'), ('seseswsesweseswsewswesesenwseseswsesw'), ('wnwwwnwnwwsenwnwnwnwnwnwwwwnenw'), ('wswnwwwwswwewswseswwwwneneseswww'), ('neseeeneenenwnweswene'), ('wwwwwwwwnewwwwswnwesewwe'), ('swnesewenesesewneweswnwswenw'), ('wsweeenwseswenwsenenweenwsee'), ('neneenwnwnwsenesenenenenenwnewsenwseswnesw'), ('wnwnwnwswnenenenwneneneneneenwsenenenenw'), ('swswswswswseneswswswswswwswswswswswnesw'), ('sewnenwneneneenenenwnwnwwnwnenenenenwne'), ('swwnwswewswswnwswneswswwswswswwsesw'), ('wseenwseesewseesesesene'), ('wsenweweeneeeneeneewseeeenee'), ('wswswwwswswwswswsweswwswnewswewsw'), ('wnewwwwnwseweswwswwwswwswwww'), ('wnwswnwseswswwswwwewewwswnew'), ('senweeeeeeewsweneeneeeeee'), ('sweeseeseeneswenwenenwnwenesenenwsw'), ('seenweseseseseseseseseseseesenewneswsese'), ('ewnweneeseeneeeeeneeeneenee'), ('nenwwsenwenwswnesewnwnenenesewswnene'), ('sewseswswswseseswswsenwseseswsesesesene'), ('nesenenwswswseswsenwneswswswseewwsew'), ('wnwnwnwnwwseeneneeswnewenwnwnwsenwne'), ('neneeneneswwneeenwneenee'), ('esenwenewneeweneneesesweesewe'), ('nenwnwnwnenenwnwnwnesenwnewnw'), ('nwenwswenwnwnwnwswenwsenwnwnwnwwnenwwnw'), ('wnenesenenenwnesenwnwnenenesenene'), ('eseeeeseewenenewnwsweeneenwee'), ('swswnewneseswseswwseneneneneswwswneswne'), ('enwenwwwswnwsenewe'), ('enwwswwseswwww'), ('nwnwswswnenwnenwnenwnwnwsenenenenenenenenwe'), ('wswwneswsenwnwnewwsweew'), ('seswseseseseeesesenweesesewesesenwe'), ('newswswswnenenwnwenenenwsenenwswnwwe'), ('nwneneeeneneneeswwenenenweeesesene'), ('wneneneseeneneeswwneneneswnenenenenene'), ('nwneeneneewneneneneneneneneswnenene'), ('nwnwneswnenwenewenenwnenewnwnesenene'), ('nwnenwenwswsenesesenwseneenwnwnwwnwsw'), ('swneweswswwwwswwwweseseneeww'), ('nwwnenesesenenenenenwnenwnewneneenene'), ('sesenwswseseseseseswenwseswswseswsesese'), ('newneeneneeweseneewneneneweeee'), ('newnwwswswwwswswwewesewwwwwnw'), ('nenwenenenewnwnenwnenwsenenenewnwnenwne'), ('nwnenwsenwnenwnwnwnwnenwnenenesenewnwnene'), ('wnweswnwneenwwwsenwnwsenwenwsenesesw'), ('enesenesenwwsweswneneswnenesenewswswnww'), ('nwnenwnesenwnenenenwnenenwseswnwnwnewnwnw'), ('nwswseneseseseswseseswswsesewnwswseseesw'), ('nwnwnwnwnwwsenwnwnwsenesesewnw'), ('neneneeneneeneneneenewnenenesenenenesw'), ('wsenenenwnenwnwnwwnenwnwsenwneenwnenww'), ('swwsenewneswseswnewww'), ('wswnwswswseswswswsweseneneseeswswnesew'), ('seneenenewswneneneenenenenenenenenene'), ('wnwnwnwsewesenwwwnewwwesww'), ('newswsewweenwewwnwswneeenwnwswnw'), ('neneneeswneneneneeeenene'), ('nwswwsenwwnwnwnweenwnwwewnwnwswnwne'), ('nwnwnenwneeeenesewnwswswsenwnwnwwnw'), ('ewnwneswseneeneenweneseesenenenww'), ('nwnenenwnwenwnwnesewnenewnwswneseenene'), ('neeweneneeneeneenenewneeeneneswse'), ('nwneswnwseseswswesewnwwswswswneesewe'), ('swswneswswsenwwswswwswswnwswswswswese'), ('swswneswswenewsweneswwwswnwse'), ('eeeeseeeeeeseewenese'), ('wewwwseswwwswwwwnwewnwwwww'), ('senwnwnwnwnwnenwwnenwswnwnwnenwnwnenwnwnw'), ('wwwsenwwswwweweswneswnwswwsww'), ('newwwwewwwwwwwewwwwwwse'), ('eeneeeeeweneneeeeeneweee'), ('seseswneseswnewsewseseseneseneseseswsew'), ('seeswswseswswswswseswswswseswswwswnwse'), ('sesewwseseseseseseneseseseesesesenwsese'), ('swewnwnenewswwewseswesenenwnwwnwwnw'), ('swenwseswwwswswwswswwwwenwnewsw'), ('swsesenwesesesenesesenesenwsew'), ('swwswswwnwswwwswewswwnwswewwwe'), ('wswseeneswesewneswswwsewenew'), ('swwsewnwwewwswwwnwwswswsw'), ('enweeeseneeeeneeeeee'), ('sweeeseeswenwenweeeeeeeeeee'), ('sewnwnwswswseeswsweswswsweswswswswsenesw'), ('swwswwswswwswwneswwswswsw'), ('seswnewneenesenwnesenwweneeneswew'), ('wnwesenwsenenweseseseswsesenesewswsene'), ('swwwwswwsewswwwneswwww'), ('wswwwswwswswewwwswwwewswwsw'), ('esewswswswswswswnewswswneswswnwswseswsw'), ('nwsenwnwnesenenenenewnwnwnenenwnenenenene'), ('swneneeneeseswnwneswwwneneenenenenenw'), ('swswswswwnwsweswswswswswesenwswswnesw'), ('eswswswwwswswnwweswswswwnweswswswnw'), ('seneneneeeneeneewswneeeenenenee'), ('swswswswsesweswswswnewswswswswswswnesw'), ('nwswnwewswwswwnwwneweenwnewnwe'), ('newseneswewnwseswnesesenwswneswswswse'), ('swwwwnwwewenenwwseww'), ('swsewneswseseseseseswnwsesesewenenwese'), ('sewsesweewseneeeseeseeeweee'), ('eeeewneseeeeeeswneeesweswne'), ('nenenwsewsenesesenwwwsenenwnwseneswnenww'), ('eeseesesesesewsesesesese'), ('newneenenwnesweseneneenenene'), ('swswnwweswneseseswnwswseswseseswswswse'), ('nwswwnwsenweseswswseswswswsw'), ('nwwnwnwwnwwnwnesewnesewsenewnwwswnw'), ('swnenwwnenenenenweseswsenenwenewnwswe'), ('nwnewnwseseswsewwneswneseseeswsesesenwse'), ('nwwnwwswnwnenwnwnwnwwsenwenwnwnwnwsw'), ('seeseeesenwweeeneweseee'), ('nwwwwwwsewwwswnewwwwwwww'), ('nwnwnwwwnwwwsewwneswnweewwsww'), ('esenwnenewnenenwnenenwnenweeseesenese'), ('wnenenenenenenwneenenenesenenenenenenew'), ('eswneeneeeneeneswnenenwneeeeenee'), ('wswseswsenewswwnwswwwswswwwswnesw'), ('swswsesesenewswneseseswswwneswswsw'), ('sesewswsenwswneenenenweswee'), ('seswswswswswswswneseswnwewswseswswswsw'), ('sesenwseseswswseswswsweseswswsenwsesesw'), ('eswswswseswnwswswswswseseswswswnesewsesw'), ('enenweeneweneneeeesweenenesene'), ('esenenwneswsenweswwwnwnenwnwnwwnwwnw'), ('swswesewswswswnwnwswwswswswweswswwsw'), ('seeseseseseneenwsesewnesenesewsesew'), ('eseswseseeswesenweenenweeseeeese'), ('senwnwswwwwwwseseneswsewswswneswnw'), ('esenwwwseswseseneenwe'), ('swneswseseswseswneneswwswswswseswswswnwsw'), ('swwwneswwswswswswneswesw'), ('nweeeneseseeeeeenenweeenwesw'), ('nesenwswnenwnwnwnwsenwneenenwnenenwnenw'), ('neeeeeswneesewnenenwe'), ('swsesesesesesesesenesewsesesese'); WITH SpaceSplit_CTE AS ( SELECT InputRowId, REPLACE( REPLACE( REPLACE( REPLACE( REPLACE( REPLACE( DirectionRow , 'sw', 'sw ') , 'se', 'se ') , 'nw', 'nw ') , 'ne', 'ne ') , 'e', 'e ') , 'w', 'w ') AS SplitDirectionROw FROM #Input ), Directions_CTE AS ( SELECT InputRowId, LTRIM(RTRIM(value)) as Direction FROM SpaceSplit_CTE CROSS APPLY STRING_SPLIT(SplitDirectionRow, ' ') WHERE LTRIM(RTRIM(value)) != '' ), DirectionCount_CTE AS ( SELECT InputRowId, Direction, COUNT(*) as DirectionCount FROM Directions_CTE GROUP BY InputRowId, Direction ), GroupedDirectionCount_CTE AS ( SELECT DISTINCT InputRowId, COALESCE((SELECT DirectionCount FROM DirectionCount_CTE WHERE Direction = 'e' AND InputRowId = DC.InputRowId), 0) AS E, COALESCE((SELECT DirectionCount FROM DirectionCount_CTE WHERE Direction = 'ne' AND InputRowId = DC.InputRowId), 0) AS NE, COALESCE((SELECT DirectionCount FROM DirectionCount_CTE WHERE Direction = 'se' AND InputRowId = DC.InputRowId), 0) AS SE, COALESCE((SELECT DirectionCount FROM DirectionCount_CTE WHERE Direction = 'w' AND InputRowId = DC.InputRowId), 0) AS W, COALESCE((SELECT DirectionCount FROM DirectionCount_CTE WHERE Direction = 'nw' AND InputRowId = DC.InputRowId), 0) AS NW, COALESCE((SELECT DirectionCount FROM DirectionCount_CTE WHERE Direction = 'sw' AND InputRowId = DC.InputRowId), 0) AS SW FROM DirectionCount_CTE DC ), AffectedTiles_CTE AS ( SELECT InputRowId, E + SE - W - NW AS TotalE, NE - SE + NW - SW As TotalNE FROM GroupedDirectionCount_CTE ), GroupedAffectedTiles_CTE AS ( SELECT TotalE, TotalNE, COUNT(*) AS Totals FROM AffectedTiles_CTE GROUP BY TotalE, TotalNE ) SELECT COUNT(*) FROM GroupedAffectedTiles_CTE WHERE Totals % 2 = 1
true
1f361b32a247af42c9c748097482573aaddab29d
SQL
ramirezra/gowebapp
/06/6.13/setup.sql
UTF-8
396
3.375
3
[]
no_license
drop table posts cascade if exists; drop table comments if exists; create table posts ( id serial primary key, content text, author varchar(255) ); create table comments ( id serial primary key, content text, author varchar(255), post_id integer references posts(id) ); GRANT USAGE, SELECT ON SEQUENCE posts_id_seq TO gwp; GRANT USAGE, SELECT ON SEQUENCE comments_id_seq TO gwp;
true
d7090822fa3494baad31f88ad0f31247fa798024
SQL
dzonint/NotesNT
/notesnt.sql
UTF-8
499
3.46875
3
[]
no_license
CREATE TABLE authors ( authorid INT NOT NULL AUTO_INCREMENT, username VARCHAR(20) NOT NULL, password VARCHAR(255) NOT NULL, email VARCHAR(80) NOT NULL, registrationdate DATETIME DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY(authorid) ); CREATE TABLE notes ( noteid INT NOT NULL AUTO_INCREMENT, authorid INT NOT NULL, postdate DATETIME DEFAULT CURRENT_TIMESTAMP, note TEXT NOT NULL, PRIMARY KEY(noteid), FOREIGN KEY(authorid) REFERENCES authors(authorid) );
true
82ed0dce48264db5c25e2ad7a38d28beba10d303
SQL
rubenavila9/VETERINARIA-SQL
/insercion registros.sql
UTF-8
1,042
2.9375
3
[]
no_license
insert into CLIENTE values (123242424, 'Ruben','Avila','barrio cuba', '09686389390','ruben@gmail.com'), (128883913, 'deiby','vera','barrio altamira', '0938173823','deiby@gmail.com'), (113233142, 'ricardo','lugo','barrio cuba', '09839281992','ricardo@gmail.com'), (131313313, 'ariel','zambrano','barrio cuba', '0917389283','ariel@gmail.com'), select * from CLIENTE; insert into PACIENTE values (1, 'benji','perro','cocker', 'masculino','3 años','ninguna','rabia',123242424), (2, 'pelussa','perro','mestiza', 'femenino','2 años','ninguna','rabia',128883913), (3, 'roco','perro','labrador', 'masculino','1 años','ninguna','rabia',113233142), (4, 'misi','gato','persa', 'masculino','6 años','ninguna','rabia',123242424) select * from PACIENTE; insert into PESO values (1,'10/8/2020','10kg'), (2,'4/8/2020','5kg'), (3,'5/8/2020','6kg'), (4,'9/8/2020','3kg'), select * from PESO; insert into VACUNA values (1,'10/8/2020','parasitaria','20/10/2020'), (2,'12/8/2020','rabia','18/10/2020'), (3,'16/8/2020','vitaminas','5/10/2020'), (4,'20/8/2020','parasitaria','3/10/2020'), select * from VACUNA;
true
06fe5689d6e3885e2a8ad186fecc5f9ab7f9aae7
SQL
htamakos/oracle_samples
/partition/partitioning_enhancement_oracle_11g/sigle_partition_transportable/create_partition.sql
UTF-8
837
3.59375
4
[]
no_license
CREATE TABLE transport_test_tab ( id NUMBER NOT NULL, code VARCHAR2(10) NOT NULL, description VARCHAR2(50), created_date DATE, CONSTRAINT transport_test_pk PRIMARY KEY (id) ) PARTITION BY RANGE (created_date) ( PARTITION part_2017 VALUES LESS THAN (TO_DATE('01-JAN-2018', 'DD-MON-YYYY')) TABLESPACE transport_test_ts_1, PARTITION part_2008 VALUES LESS THAN (TO_DATE('01-JAN-2019', 'DD-MON-YYYY')) TABLESPACE transport_test_ts_2 ); INSERT INTO transport_test_tab VALUES (1, 'ONE', '1 ONE', SYSDATE); INSERT INTO transport_test_tab VALUES (2, 'TWO', '2 TWO', SYSDATE); INSERT INTO transport_test_tab VALUES (3, 'THREE', '3 THREE', ADD_MONTHS(SYSDATE, 12)); INSERT INTO transport_test_tab VALUES (4, 'FOUR', '4 FOUR', ADD_MONTHS(SYSDATE, 12)); COMMIT; EXEC DBMS_STATS.gather_table_stats(USER, 'TRANSPORT_TEST_TAB');
true
6197d2cafdff325c0a1f76691bfef84631ff0783
SQL
inasafe/inasafe-fba
/fixtures/schema/03_external_module/00_tables/00_census_kemendagri.sql
UTF-8
1,388
3.09375
3
[ "MIT" ]
permissive
-- Table structure taken from ArcGIS REST API of GIS Dukcapil Kemendagri Indonesia: -- source: https://gis.dukcapil.kemendagri.go.id/peta/ -- ArcGIS REST API Endpoint: https://gis.dukcapil.kemendagri.go.id/arcgis/rest/services/Data_Baru_26092017/MapServer/ create table if not exists census_kemendagri ( objectid bigint not null, no_prop double precision, no_kab double precision, no_kec double precision, no_kel double precision, kode_desa_ varchar(25), nama_prop_ varchar(40), nama_kab_s varchar(40) not null, nama_kec_s varchar(40) not null, nama_kel_s varchar(40) not null, jumlah_pen double precision, jumlah_kk double precision, pria double precision, wanita double precision, u0 double precision, u5 double precision, u10 double precision, u15 double precision, u20 double precision, u25 double precision, u30 double precision, u35 double precision, u40 double precision, u45 double precision, u50 double precision, u55 double precision, u60 double precision, u65 double precision, u70 double precision, u75 double precision, p01_belum_ double precision, constraint census_kemendagri_pk primary key (nama_kab_s, nama_kec_s, nama_kel_s) ); create unique index if not exists census_kemendagri_objectid_uindex on census_kemendagri (objectid);
true
61c2bc7c7c247309caa0ab15e5c0b401f2d42b34
SQL
radtek/abs3
/sql/mmfo/bars/View/v_ins_limits.sql
UTF-8
1,215
2.875
3
[]
no_license
PROMPT ===================================================================================== PROMPT *** Run *** ========== Scripts /Sql/BARS/View/V_INS_LIMITS.sql =========*** Run *** = PROMPT ===================================================================================== PROMPT *** Create view V_INS_LIMITS *** CREATE OR REPLACE FORCE VIEW BARS.V_INS_LIMITS ("LIMIT_ID", "NAME", "SUM_VALUE", "PERC_VALUE") AS select l.id as limit_id, l.name, l.sum_value, l.perc_value from ins_limits l order by l.id; PROMPT *** Create grants V_INS_LIMITS *** grant SELECT on V_INS_LIMITS to BARSREADER_ROLE; grant SELECT on V_INS_LIMITS to BARS_ACCESS_DEFROLE; grant SELECT on V_INS_LIMITS to UPLD; PROMPT ===================================================================================== PROMPT *** End *** ========== Scripts /Sql/BARS/View/V_INS_LIMITS.sql =========*** End *** = PROMPT =====================================================================================
true
eb452fddf0ce7b88dcd648d72103fb91aeb4db2f
SQL
floperrier/projet-docker
/dump/db.sql
UTF-8
941
3.015625
3
[]
no_license
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 */; CREATE TABLE `users` ( `id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, `prenom` varchar(50) NOT NULL, `nom` varchar(50) NOT NULL, `email` varchar(50) NOT NULL, `mdp` varchar(100) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO `users` (`prenom`, `nom`, `email`, `mdp`) VALUES ("William","Jambon","william@gmail.com",SHA2("bonjour",256)), ("Marc","Mark","marc@gmail.com",SHA2("salut",256)), ("John","Hallidon","john@gmail.com",SHA2("hola",256)); /*!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
c6fcfc52a33c4c4e8dc1f346b7c0131d99043676
SQL
radtek/abs3
/sql/mmfo/bars/Table/cck_cusseg.sql
WINDOWS-1251
3,602
3.109375
3
[]
no_license
PROMPT ===================================================================================== PROMPT *** Run *** ========== Scripts /Sql/BARS/Table/CCK_CUSSEG.sql =========*** Run *** == PROMPT ===================================================================================== PROMPT *** ALTER_POLICY_INFO to CCK_CUSSEG *** BEGIN execute immediate 'begin bpa.alter_policy_info(''CCK_CUSSEG'', ''CENTER'' , ''C'', ''C'', ''C'', null); bpa.alter_policy_info(''CCK_CUSSEG'', ''WHOLE'' , ''C'', ''C'', ''C'', null); null; end; '; END; / PROMPT *** Create table CCK_CUSSEG *** begin execute immediate ' CREATE TABLE BARS.CCK_CUSSEG ( CUSSEG_ID NUMBER, CUSSEG_NAME VARCHAR2(70) ) SEGMENT CREATION IMMEDIATE PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING TABLESPACE BRSSMLD '; exception when others then if sqlcode=-955 then null; else raise; end if; end; / PROMPT *** ALTER_POLICIES to CCK_CUSSEG *** exec bpa.alter_policies('CCK_CUSSEG'); COMMENT ON TABLE BARS.CCK_CUSSEG IS ' 볺'; COMMENT ON COLUMN BARS.CCK_CUSSEG.CUSSEG_ID IS ' '; COMMENT ON COLUMN BARS.CCK_CUSSEG.CUSSEG_NAME IS ' '; PROMPT *** Create constraint PK_CCKCUSSEG *** begin execute immediate ' ALTER TABLE BARS.CCK_CUSSEG ADD CONSTRAINT PK_CCKCUSSEG PRIMARY KEY (CUSSEG_ID) USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS TABLESPACE BRSDYND ENABLE'; exception when others then if sqlcode=-2260 or sqlcode=-2261 or sqlcode=-2264 or sqlcode=-2275 or sqlcode=-1442 then null; else raise; end if; end; / PROMPT *** Create constraint CC_CCCUSSEGID_NN *** begin execute immediate ' ALTER TABLE BARS.CCK_CUSSEG MODIFY (CUSSEG_ID CONSTRAINT CC_CCCUSSEGID_NN NOT NULL ENABLE)'; exception when others then if sqlcode=-2260 or sqlcode=-2261 or sqlcode=-2264 or sqlcode=-2275 or sqlcode=-1442 then null; else raise; end if; end; / PROMPT *** Create index PK_CCKCUSSEG *** begin execute immediate ' CREATE UNIQUE INDEX BARS.PK_CCKCUSSEG ON BARS.CCK_CUSSEG (CUSSEG_ID) PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS TABLESPACE BRSDYND '; exception when others then if sqlcode=-955 then null; else raise; end if; end; / PROMPT *** Create grants CCK_CUSSEG *** grant DELETE,INSERT,SELECT,UPDATE on CCK_CUSSEG to BARSDWH_ACCESS_USER; grant SELECT on CCK_CUSSEG to BARSREADER_ROLE; grant SELECT on CCK_CUSSEG to BARSUPL; grant DELETE,INSERT,SELECT,UPDATE on CCK_CUSSEG to BARS_ACCESS_DEFROLE; grant SELECT on CCK_CUSSEG to BARS_DM; grant DELETE,INSERT,SELECT,UPDATE on CCK_CUSSEG to RCC_DEAL; grant SELECT on CCK_CUSSEG to UPLD; PROMPT ===================================================================================== PROMPT *** End *** ========== Scripts /Sql/BARS/Table/CCK_CUSSEG.sql =========*** End *** == PROMPT =====================================================================================
true
ff2a24937cf9a1d0e0dddd193f256df88eaeb926
SQL
batego/db_fintra
/fintra/public/Tables/ex_ofertas_consi.sql
UTF-8
900
2.84375
3
[]
no_license
-- Table: ex_ofertas_consi -- DROP TABLE ex_ofertas_consi; CREATE TABLE ex_ofertas_consi ( id_solicitud character varying(15) NOT NULL, id_consideracion integer NOT NULL DEFAULT nextval('ofertas_consi_id_consideracion_seq'::regclass), reg_status character varying(1) NOT NULL DEFAULT ' '::character varying, last_update timestamp without time zone NOT NULL DEFAULT now(), user_update character varying(10) NOT NULL DEFAULT ' '::character varying, creation_date timestamp without time zone NOT NULL DEFAULT now(), creation_user character varying(10) NOT NULL DEFAULT ' '::character varying, num_consideracion character varying(3) NOT NULL, dstrct character varying(4) NOT NULL DEFAULT ''::character varying ) WITH ( OIDS=FALSE ); ALTER TABLE ex_ofertas_consi OWNER TO postgres; GRANT ALL ON TABLE ex_ofertas_consi TO postgres; GRANT SELECT ON TABLE ex_ofertas_consi TO msoto;
true
fe6a5e940c50cf696947c3ea9e119a4065909fbb
SQL
nikolovkiril/SoftUni
/SQL/Databases MS SQL-Server/MSSQL Server Retake Exam - 11 August 2020/08. Customers by Criteria.sql
UTF-8
277
3.84375
4
[]
no_license
SELECT cu.FirstName, cu.Age, cu.PhoneNumber FROM Customers AS cu JOIN Countries AS co ON co.Id = cu.CountryId WHERE (cu.FirstName LIKE '%an%' AND cu.Age >= 21 ) OR (RIGHT(cu.PhoneNumber , 2) = '38' AND co.Name NOT LIKE 'Greece') ORDER BY cu.FirstName , cu.Age DESC
true
f25b1702229994cfbee397738c155efe3e32c619
SQL
lyrasis/postgres-util-ansible-role
/files/db_autovacuum_running.sql
UTF-8
411
2.75
3
[ "CC0-1.0" ]
permissive
/* * Displays the databases in which autovacuum is running and for how long * https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.PostgreSQL.CommonDBATasks.html#Appendix.PostgreSQL.CommonDBATasks.Autovacuum.AutovacuumRunning */ SELECT datname, usename, pid, waiting, current_timestamp - xact_start AS xact_runtime, query FROM pg_stat_activity WHERE upper(query) LIKE '%VACUUM%' ORDER BY xact_start;
true
358c4162dbc79d813956dce9bade9ecaf3d192d0
SQL
phahok/scripts_sql
/consulta nfe oficinas.sql
UTF-8
1,592
3.203125
3
[]
no_license
use sigma select * from drlingerie.dbo.faturamento a left join entradas b on b.chave_nfe=a.chave_nfe where a.emissao between '20170801' and '20170831' and a.NOME_CLIFOR='sigma condominio' and a.NATUREZA_SAIDA ='130.01' and b.CHAVE_NFE is null select * from drlingerie.dbo.faturamento a join entradas b on b.chave_nfe=a.chave_nfe where a.emissao between '20170801' and '20170831' and a.NOME_CLIFOR='sigma condominio' and a.NATUREZA_SAIDA ='130.01' and a.VALOR_TOTAL<>b.VALOR_TOTAL select sum(a.VALOR_TOTAL),sum(b.VALOR_TOTAL) from drlingerie.dbo.faturamento a join entradas b on b.chave_nfe=a.chave_nfe where a.emissao between '20170801' and '20170831' and a.NOME_CLIFOR='sigma condominio' and a.NATUREZA_SAIDA ='130.01' and a.VALOR_TOTAL<>b.VALOR_TOTAL select sum(valor_item) from entradas_item where nf_entrada='0049554' and serie_nf_entrada='56' and NAO_SOMA_VALOR=0 select sum(VALOR_CONTABIL) from LF_REGISTRO_ENTRADA_ITEM where nf_entrada='0049554' and serie_nf_entrada='56' and ID_IMPOSTO=1 begin tran update a set a.id_excecao_imposto=10 --select A.* from ENTRADAS_ITEM a join entradas b on b.NF_ENTRADA=a.NF_ENTRADA and b.SERIE_NF_ENTRADA=a.SERIE_NF_ENTRADA where INDICADOR_CFOP=10 and NAO_SOMA_VALOR=0 and b.FILIAL='SIGMA CONDOMINIO' AND A.ID_EXCECAO_IMPOSTO=46 commit select * from entradas where nf_entrada='0050323' and serie_nf_entrada='56' select * from entradas_item where nf_entrada='0050323' and serie_nf_entrada='56' select * from entradas_item where nf_entrada='0051604' and serie_nf_entrada='56' EXEC LX_GERA_IMPOSTOS_ENTRADA 'D.R. LINGERIE','0051604','56',1,1,1
true
0a22bcbcefeaaeb8c63cc22274f9f45c902fb631
SQL
takagotch/rails1
/super/binary/InstantRails-1.7-win/InstantRails/rails_apps/typo-2.6.0/db/schema.mysql.sql
UTF-8
4,722
3.4375
3
[ "MIT" ]
permissive
CREATE TABLE `users` ( `id` int(11) NOT NULL auto_increment, `login` varchar(80) default NULL, `password` varchar(40) default NULL, `name` varchar(80) default NULL, `email` varchar(80) default NULL, PRIMARY KEY (`id`), UNIQUE KEY `login` (`login`) ) TYPE=MyISAM; CREATE TABLE `articles` ( `id` int(11) NOT NULL auto_increment, `title` varchar(255) default NULL, `author` varchar(255) default NULL, `body` text, `body_html` text, `extended` text, `extended_html` text, `excerpt` text, `keywords` varchar(255) default NULL, `allow_comments` tinyint(1) default NULL, `allow_pings` tinyint(1) default NULL, `published` tinyint(1) NOT NULL default '1', `text_filter` varchar(20) default NULL, `user_id` int(11) default NULL, `created_at` datetime default NULL, `updated_at` datetime default NULL, `permalink` varchar(255) default NULL, `guid` varchar(255) default NULL, PRIMARY KEY (`id`), KEY `articles_permalink_index` (`permalink`) ) TYPE=MyISAM; CREATE TABLE `articles_categories` ( `article_id` int(11) default NULL, `category_id` int(11) default NULL, `is_primary` tinyint(1) NOT NULL default '0' ) TYPE=MyISAM; CREATE TABLE `blacklist_patterns` ( `id` int(11) NOT NULL auto_increment, `type` varchar(15) default NULL, `pattern` varchar(255) default NULL, PRIMARY KEY (`id`) ) TYPE=MyISAM; CREATE TABLE `page_caches` ( `id` int(11) NOT NULL auto_increment, `name` varchar(255) NOT NULL, PRIMARY KEY (`id`), KEY `name` (`name`) ) TYPE=MyISAM; CREATE TABLE `pages` ( `id` int(11) NOT NULL auto_increment, `name` varchar(255) default NULL, `title` varchar(255) default NULL, `body` text, `body_html` text, `text_filter` varchar(20) default NULL, `user_id` int(11) default NULL, `created_at` datetime default NULL, `updated_at` datetime default NULL, PRIMARY KEY (`id`) ) TYPE=MyISAM; CREATE TABLE `categories` ( `id` int(11) NOT NULL auto_increment, `name` varchar(255) default NULL, `position` int(11) NOT NULL default '0', `permalink` varchar(255) default NULL, PRIMARY KEY (`id`), KEY `categories_permalink_index` (`permalink`) ) TYPE=MyISAM; CREATE TABLE `comments` ( `id` int(11) NOT NULL auto_increment, `article_id` int(11) default NULL, `author` varchar(255) default NULL, `email` varchar(255) default NULL, `url` varchar(255) default NULL, `ip` varchar(15) default NULL, `body` text, `body_html` text, `created_at` datetime default NULL, `updated_at` datetime default NULL, PRIMARY KEY (`id`), KEY `article_id` (`article_id`) ) TYPE=MyISAM; CREATE TABLE `pings` ( `id` int(11) NOT NULL auto_increment, `article_id` int(11) default NULL, `url` varchar(255) default NULL, `created_at` datetime default NULL, PRIMARY KEY (`id`), KEY `article_id` (`article_id`) ) TYPE=MyISAM; CREATE TABLE `resources` ( `id` int(11) NOT NULL auto_increment, `size` int(11) default NULL, `filename` varchar(255) default NULL, `mime` varchar(255) default NULL, `created_at` datetime default NULL, `updated_at` datetime default NULL, PRIMARY KEY (`id`) ) TYPE=MyISAM; CREATE TABLE `sessions` ( `id` int(11) unsigned NOT NULL auto_increment, `sessid` varchar(32) default NULL, `data` text, `updated_at` datetime default NULL, PRIMARY KEY (`id`), UNIQUE KEY `sessid` (`sessid`) ) TYPE=MyISAM; CREATE TABLE `settings` ( `id` int(11) NOT NULL auto_increment, `name` varchar(255) default NULL, `value` varchar(255) default NULL, PRIMARY KEY (`id`) ) TYPE=MyISAM; CREATE TABLE `sidebars` ( `id` int(11) unsigned NOT NULL auto_increment, `controller` varchar(32) default NULL, `active_position` int(11), `active_config` text, `staged_position` int(11), `staged_config` text, `updated_at` datetime default NULL, PRIMARY KEY (`id`) ) TYPE=MyISAM; insert into sidebars (id,controller,active_position,staged_position) values (1,'category',0,0); insert into sidebars (id,controller,active_position,staged_position) values (2,'static',1,1); insert into sidebars (id,controller,active_position,staged_position) values (3,'xml',2,2); CREATE TABLE `trackbacks` ( `id` int(11) NOT NULL auto_increment, `article_id` int(11) default NULL, `category_id` int(11) default NULL, `blog_name` varchar(255) default NULL, `title` varchar(255) default NULL, `excerpt` varchar(255) default NULL, `url` varchar(255) default NULL, `ip` varchar(15) default NULL, `created_at` datetime default NULL, `updated_at` datetime default NULL, PRIMARY KEY (`id`), KEY `article_id` (`article_id`) ) TYPE=MyISAM; CREATE TABLE `schema_info` ( `version` int(11) default NULL ) TYPE=MyISAM; INSERT into `schema_info` VALUES (9);
true
f43e5123a91be2b45f7fd5d7cc9da187ba9e5bf0
SQL
kioyong/spring-mysql-azure-demo
/src/main/resources/template/mysql_script_test.sql
UTF-8
1,375
3.78125
4
[]
no_license
create database IF NOT EXISTS test DEFAULT CHARACTER SET utf8; show databases; use test; create table person ( id varchar(25), first_name varchar(25), last_name varchar(25) ); create table car ( id varchar(25), person_id varchar(25), car_name varchar(25) ); drop table car; alter table person add column age int(3); select * from person where first_name like '%yon%'; select id, first_name from person p where p.id = '1'; select person0_.id as id1_1_, person0_.age as age2_1_, person0_.first_name as first_na3_1_, person0_.last_name as last_nam4_1_ from person person0_ order by person0_.id desc limit 2; select person0_.id as id1_1_, person0_.age as age2_1_, person0_.first_name as first_na3_1_, person0_.last_name as last_nam4_1_ from person person0_ order by person0_.id asc limit 2; insert into person (id, first_name, last_name) values ('1', 'yong', 'liang'); insert into person (id, first_name, last_name) values ('2', 'yingwen', 'tan'); insert into car (id, person_id, car_name) values ('1001', '1', 'QQ'); insert into car (id, person_id, car_name) values ('1002', '2', 'Audi'); insert into car (id, person_id, car_name) values ('1003', '2', 'BWM'); update person set age=18 where id = '1'; show tables; # drop table person;
true
f1e8b58b6a0af7fc82caeed8603eea44b8bf21a2
SQL
thn99/webCalendar
/database/calendar.sql
UTF-8
1,832
3.40625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: 10-Mar-2019 às 00:07 -- Versão do servidor: 10.1.37-MariaDB -- versão do PHP: 7.2.12 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: `calendar` -- -- -------------------------------------------------------- -- -- Estrutura da tabela `events` -- CREATE TABLE `events` ( `id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `title` varchar(100) DEFAULT NULL, `color` varchar(100) DEFAULT NULL, `initialday` datetime DEFAULT NULL, `endday` datetime DEFAULT NULL, `description` varchar(50) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Estrutura da tabela `users` -- CREATE TABLE `users` ( `id` int(11) NOT NULL, `username` varchar(100) NOT NULL, `email` varchar(100) NOT NULL, `password` varchar(100) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Indexes for dumped tables -- -- -- Indexes for table `events` -- ALTER TABLE `events` ADD PRIMARY KEY (`id`), ADD KEY `fk_userEvent` (`user_id`); -- -- Indexes for table `users` -- ALTER TABLE `users` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `email` (`email`); -- -- Limitadores para a tabela `events` -- ALTER TABLE `events` ADD CONSTRAINT `fk_userEvent` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`); 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
7502d64d1b95ef9d7864d1162264576d224f3995
SQL
kousuketk/sql_practice
/Easy/182_DuplicateEmails.sql
UTF-8
399
3.03125
3
[]
no_license
-- 同じテーブルの同じ重複するものを選ぶから、同じテーブルを見て同じものを出力するだけdistinct select distinct P1.Email from Person P1, Person P2 where P1.Email = P2.Email and P1.Id != P2.Id; -- 答えみたら天才がいた -- こういうやり方もあるみたい, 保守性は微妙だけど select Email from Person group by Email having count(*) > 1
true
898e10a443d45c37b38d598947da1d6ba8e05f36
SQL
Isur/isomorphic-react-app
/prisma/migrations/20210129220828_init/migration.sql
UTF-8
502
3.84375
4
[ "MIT" ]
permissive
-- CreateTable CREATE TABLE "User" ( "id" TEXT NOT NULL, "username" TEXT NOT NULL, "email" TEXT NOT NULL, "createdDate" TIMESTAMP(3) NOT NULL, "password" TEXT NOT NULL, PRIMARY KEY ("id") ); -- CreateTable CREATE TABLE "Session" ( "id" TEXT NOT NULL, "userId" TEXT NOT NULL, "expiryTime" TIMESTAMP(3) NOT NULL, PRIMARY KEY ("id") ); -- AddForeignKey ALTER TABLE "Session" ADD FOREIGN KEY("userId")REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
true
174933e1ed1e71e20d20a238f14eadcd9ac23c52
SQL
rohitjain01/get2015
/Web/Case Study Phase IV/dbscripts/20151022.sql
UTF-8
1,156
3.09375
3
[]
no_license
CREATE DATABASE Vehicle_Management; USE Vehicle_Management; CREATE TABLE Vehicle( vehicle_id INT AUTO_INCREMENT, created_by VARCHAR(10) NOT NULL, created_time timestamp NOT NULL, make VARCHAR(20) NOT NULL, model VARCHAR(20) NOT NULL, engine_cc INT NOT NULL, fuel_capacity INT NOT NULL, milage INT NOT NULL, price REAL NOT NULL, roadTax REAL NOT NULL, PRIMARY KEY(vehicle_id) ); CREATE TABLE Car( id INT AUTO_INCREMENT, ac VARCHAR(10) NOT NULL, powersteering VARCHAR(10) NOT NULL, accessorykit VARCHAR(10) NOT NULL, vehicle_id INT NOT NULL, PRIMARY KEY(id), FOREIGN KEY (vehicle_id) REFERENCES Vehicle(vehicle_id) ON DELETE CASCADE ); CREATE TABLE Bike( id INT AUTO_INCREMENT, selfstart VARCHAR(10) NOT NULL, helmetprice REAL NOT NULL, vehicle_id INT, PRIMARY KEY(id), FOREIGN KEY (vehicle_id) REFERENCES Vehicle(vehicle_id) ON DELETE CASCADE ); ALTER TABLE Car AUTO_INCREMENT = 1001; ALTER TABLE Bike AUTO_INCREMENT = 10001; CREATE TABLE Admin( email VARCHAR(40), name VARCHAR(40), password VARCHAR(20), contact VARCHAR(20), address VARCHAR(100) ); Insert INTO Admin VALUES('rohit.jain@metacube.com','Rohit','1234','(+91)7665131070','Alwar(Rajasthan)-321607');
true
5181ae4787a2d0aa054ab55bb94240aa45b05df4
SQL
lixinpingfriend/zhiban
/WEB-INF/action/project/dutyjoin/searchDutyUser/query-base.sql
UTF-8
432
3.171875
3
[]
no_license
select d.tuid,d.user_id,d.plan_date from pm_duty d where (to_timestamp(to_char(d.plan_date,'yyyy-MM-dd')||d.begin_date||' 00','yyyy-MM-dd HH24:mi:ss')-15/24/60)<=to_timestamp('${def:timestamp}','yyyy-MM-dd HH24:mi:ss:ff') and to_timestamp(to_char(d.plan_date,'yyyy-MM-dd')||d.end_date||' 00','yyyy-MM-dd HH24:mi:ss')>=to_timestamp('${def:timestamp}','yyyy-MM-dd HH24:mi:ss:ff') and d.user_id!=${fld:user_id} and rownum=1
true
7befe191faaa568a3768ccf86216cfedcd8f3f6e
SQL
shakir337/Automobiles-
/Auto/autoerp.sql
UTF-8
6,219
3.09375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 14, 2018 at 05:21 PM -- Server version: 10.1.32-MariaDB -- PHP Version: 7.1.17 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: `autoerp` -- -- -------------------------------------------------------- -- -- Table structure for table `client` -- CREATE TABLE `client` ( `client_id` varchar(10) NOT NULL, `c_name` varchar(30) NOT NULL, `c_no` int(10) NOT NULL, `pass` varchar(10) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `client` -- INSERT INTO `client` (`client_id`, `c_name`, `c_no`, `pass`) VALUES ('1', 'shakir', 1234567890, '12345'); -- -------------------------------------------------------- -- -- Table structure for table `cust_req` -- CREATE TABLE `cust_req` ( `req_id` int(10) NOT NULL, `sp_id` int(10) NOT NULL, `quantity` int(10) NOT NULL, `date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `status` varchar(10) NOT NULL, `client_id` varchar(10) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `cust_req` -- INSERT INTO `cust_req` (`req_id`, `sp_id`, `quantity`, `date`, `status`, `client_id`) VALUES (1, 2, 100, '2018-09-14 19:34:55', 'confirmed', '1'); -- -------------------------------------------------------- -- -- Table structure for table `manager` -- CREATE TABLE `manager` ( `m_name` varchar(20) NOT NULL, `u_name` varchar(20) NOT NULL, `pass` varchar(10) NOT NULL, `contact` bigint(10) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `manager` -- INSERT INTO `manager` (`m_name`, `u_name`, `pass`, `contact`) VALUES ('sahil', 'sahil', '12345', 1234567890); -- -------------------------------------------------------- -- -- Table structure for table `material` -- CREATE TABLE `material` ( `m_id` varchar(10) NOT NULL, `m_name` varchar(20) NOT NULL, `avail` int(10) NOT NULL, `price` int(10) NOT NULL, `supp_id` varchar(20) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `material_req` -- CREATE TABLE `material_req` ( `req_id` varchar(10) NOT NULL, `m_id` varchar(20) NOT NULL, `quantity` int(10) NOT NULL, `status` varchar(10) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `payment` -- CREATE TABLE `payment` ( `pay_id` int(10) NOT NULL, `amt` bigint(20) NOT NULL, `client_id` varchar(10) NOT NULL, `date` datetime NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `sp_part` -- CREATE TABLE `sp_part` ( `sp_id` int(10) NOT NULL, `sp_name` varchar(30) NOT NULL, `price` int(10) NOT NULL, `avail` int(10) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sp_part` -- INSERT INTO `sp_part` (`sp_id`, `sp_name`, `price`, `avail`) VALUES (2, 'gearbox', 10000, 100); -- -------------------------------------------------------- -- -- Table structure for table `supplier` -- CREATE TABLE `supplier` ( `supp_id` varchar(20) NOT NULL, `c_name` varchar(20) NOT NULL, `pass` varchar(10) NOT NULL, `c_no` int(10) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `supplier` -- INSERT INTO `supplier` (`supp_id`, `c_name`, `pass`, `c_no`) VALUES ('1', 'yusuf', '12345', 1234567890); -- -- Indexes for dumped tables -- -- -- Indexes for table `client` -- ALTER TABLE `client` ADD PRIMARY KEY (`client_id`); -- -- Indexes for table `cust_req` -- ALTER TABLE `cust_req` ADD PRIMARY KEY (`req_id`), ADD KEY `sp_id` (`sp_id`), ADD KEY `client_id` (`client_id`); -- -- Indexes for table `manager` -- ALTER TABLE `manager` ADD PRIMARY KEY (`u_name`); -- -- Indexes for table `material` -- ALTER TABLE `material` ADD PRIMARY KEY (`m_id`), ADD KEY `supp_id` (`supp_id`); -- -- Indexes for table `material_req` -- ALTER TABLE `material_req` ADD PRIMARY KEY (`req_id`), ADD KEY `m_id` (`m_id`); -- -- Indexes for table `payment` -- ALTER TABLE `payment` ADD PRIMARY KEY (`pay_id`), ADD KEY `client_id` (`client_id`); -- -- Indexes for table `sp_part` -- ALTER TABLE `sp_part` ADD PRIMARY KEY (`sp_id`); -- -- Indexes for table `supplier` -- ALTER TABLE `supplier` ADD PRIMARY KEY (`supp_id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `cust_req` -- ALTER TABLE `cust_req` MODIFY `req_id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `payment` -- ALTER TABLE `payment` MODIFY `pay_id` int(10) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `sp_part` -- ALTER TABLE `sp_part` MODIFY `sp_id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- Constraints for dumped tables -- -- -- Constraints for table `cust_req` -- ALTER TABLE `cust_req` ADD CONSTRAINT `cust_req_ibfk_1` FOREIGN KEY (`sp_id`) REFERENCES `sp_part` (`sp_id`), ADD CONSTRAINT `cust_req_ibfk_2` FOREIGN KEY (`client_id`) REFERENCES `client` (`client_id`); -- -- Constraints for table `material` -- ALTER TABLE `material` ADD CONSTRAINT `material_ibfk_1` FOREIGN KEY (`supp_id`) REFERENCES `supplier` (`supp_id`); -- -- Constraints for table `material_req` -- ALTER TABLE `material_req` ADD CONSTRAINT `material_req_ibfk_1` FOREIGN KEY (`m_id`) REFERENCES `material` (`m_id`); -- -- Constraints for table `payment` -- ALTER TABLE `payment` ADD CONSTRAINT `payment_ibfk_1` FOREIGN KEY (`client_id`) REFERENCES `client` (`client_id`); 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
d4d4681977d5ddea8d94d9aae1105abad9b6db80
SQL
ybg345/sql-hands-on
/SQL-Zoo/3_SELECT from Nobel/12_SELECT from Nobel_Apostrophe.sql
UTF-8
133
2.65625
3
[]
no_license
/* Problem Statement: Find all details of the prize won by EUGENE O'NEILL. */ -- Solution: SELECT * FROM nobel WHERE winner = 'EUGENE O\'NEILL';
true
9bb73b5281adbcbbfa61bbf0ec567d71ab4c9865
SQL
lexiehansen/employee-tracker
/db/seed.sql
UTF-8
601
3.203125
3
[]
no_license
USE employees_db; INSERT INTO department (department_name) VALUES ("Sales"), ("HR"), ("Finance"), ("Engineering"), ("Operations"); INSERT INTO roles (title, salary, department_id) VALUES ("Sales Agent", 40000 , 1), ("HR Coordinator", 60000, 2), ("Accountant", 100000, 3), ("Lead Engineer", 150000 , 4), ("Lead Developer", 120000, 5), ("Manager", 100000, 5); INSERT INTO employee (first_name, last_name, roles_id, manager_id) VALUES ("John", "Seller", 1, 5), ("Jane", "Resource", 2, 5), ("Jessica", "Money", 3, 5), ("Jack", "Smart", 4, 5), ("Jerry", "Dev", 5, 5), ("Janine", "Boss", 5, 2);
true
58a8228c0d438b7d89600f7a969168e5d1a8978f
SQL
d-Soyam/EcommerceApplicationUsingPHP
/Database/shopping.sql
UTF-8
8,565
3.046875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.5.2.2 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Dec 31, 2014 at 05:24 AM -- Server version: 5.5.27 -- PHP Version: 5.4.7 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: `shopping` -- -- -------------------------------------------------------- -- -- Table structure for table `admin_master` -- CREATE TABLE IF NOT EXISTS `admin_master` ( `AdminId` int(11) NOT NULL AUTO_INCREMENT, `UserName` varchar(20) NOT NULL, `Password` varchar(20) NOT NULL, PRIMARY KEY (`AdminId`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; -- -- Dumping data for table `admin_master` -- INSERT INTO `admin_master` (`AdminId`, `UserName`, `Password`) VALUES (1, 'ftzc', 'ftzc'), (4, 'zsb', 'zsb'); -- -------------------------------------------------------- -- -- Table structure for table `category_master` -- CREATE TABLE IF NOT EXISTS `category_master` ( `CategoryId` int(11) NOT NULL AUTO_INCREMENT, `CategoryName` varchar(30) NOT NULL, `Image` varchar(100) NOT NULL, PRIMARY KEY (`CategoryId`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=11 ; -- -- Dumping data for table `category_master` -- INSERT INTO `category_master` (`CategoryId`, `CategoryName`, `Image`) VALUES (1, 'Shirt', 'shirt.jpg'), (2, 'T-Shirts', 'images.jpg'), (3, 'Polo-Shirt', 'polo.jpg'), (4, 'Panjabi', 'panjabi.jpg'), (5, 'Jeans', 'Jeans.jpg'), (6, 'Bleasure', 'asd.jpg'), (7, 'Salwar_Kameez', '3.jpg'), (8, 'Sharee', 'sharee1.jpg'); -- -------------------------------------------------------- -- -- Table structure for table `customer_registration` -- CREATE TABLE IF NOT EXISTS `customer_registration` ( `CustomerId` int(11) NOT NULL AUTO_INCREMENT, `CustomerName` varchar(50) NOT NULL, `Address` varchar(100) NOT NULL, `City` varchar(20) NOT NULL, `Email` varchar(50) NOT NULL, `Mobile` bigint(10) NOT NULL, `Gender` varchar(10) NOT NULL, `BirthDate` date NOT NULL, `UserName` varchar(20) NOT NULL, `Password` varchar(20) NOT NULL, `Card` varchar(20) NOT NULL, `CardNm` varchar(15) NOT NULL, `Trans` int(6) NOT NULL, PRIMARY KEY (`CustomerId`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=9 ; -- -- Dumping data for table `customer_registration` -- INSERT INTO `customer_registration` (`CustomerId`, `CustomerName`, `Address`, `City`, `Email`, `Mobile`, `Gender`, `BirthDate`, `UserName`, `Password`, `Card`, `CardNm`, `Trans`) VALUES (2, 'Fatema-Tuz-Zuhora', '1344/A', 'Dhaka', 'ftzc@gmail.com', 1916293975, 'Female', '1992-09-10', 'champa', 'champa', 'Credit Card', 'DBBL12345678909', 123456), (3, 'Rakibur Rahman Bhuiyan', '1236/B', 'Dhaka', 'rakib@gmail.com', 1681651638, 'Male', '1994-12-03', 'rakib', 'rakib', 'Credit Card', 'DBBL11223344556', 123456), (4, 'Zakia Shultana Bhuiyan', '1121/A', 'Chittagong', 'zsb@gmail.com', 1234567890, 'Female', '1998-11-19', 'zsb', 'zsb', 'Master Card', 'MASTER123456789', 112233), (5, 'Mim', '1236/C', 'Dhaka', 'mim@gmail.com', 1912345678, 'Female', '2014-12-03', 'mim', 'mim', 'VISA Card', 'VISA12345678908', 123456), (6, 'Shakil', 'Jatrabari', 'Dhaka', 'shakil@gmail.com', 1711234567, 'Male', '2014-12-10', 'shakil', 'shakil', 'Credit Card', 'DBBL33345678987', 223344), (7, 'Sumon', 'Dhanmondhi', 'Dhaka', 'sumon@gmail.com', 1671433597, 'Male', '2014-12-30', 'sumon', 'sumon', 'VISA Card', 'VISA11223344556', 234567); -- -------------------------------------------------------- -- -- Table structure for table `feedback_master` -- CREATE TABLE IF NOT EXISTS `feedback_master` ( `FeedbackId` int(11) NOT NULL AUTO_INCREMENT, `CustomerId` int(11) NOT NULL, `Feedback` varchar(200) NOT NULL, `Date` date NOT NULL, PRIMARY KEY (`FeedbackId`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; -- -- Dumping data for table `feedback_master` -- INSERT INTO `feedback_master` (`FeedbackId`, `CustomerId`, `Feedback`, `Date`) VALUES (2, 2, 'Good', '2014-12-08'), (3, 4, 'Good!', '2014-12-30'); -- -------------------------------------------------------- -- -- Table structure for table `item_master` -- CREATE TABLE IF NOT EXISTS `item_master` ( `ItemId` int(11) NOT NULL AUTO_INCREMENT, `CategoryId` int(11) NOT NULL, `ItemName` varchar(200) NOT NULL, `Description` varchar(200) NOT NULL, `Color` varchar(50) NOT NULL, `Fabric` varchar(50) NOT NULL, `V_A` varchar(50) NOT NULL, `Quantity` int(10) NOT NULL, `Image` varchar(100) NOT NULL, `Price` float NOT NULL, `Discount` float NOT NULL, `Total` float NOT NULL, PRIMARY KEY (`ItemId`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=12 ; -- -- Dumping data for table `item_master` -- INSERT INTO `item_master` (`ItemId`, `CategoryId`, `ItemName`, `Description`, `Color`, `Fabric`, `V_A`, `Quantity`, `Image`, `Price`, `Discount`, `Total`) VALUES (1, 5, 'Denim Jeans', 'Nice Look Boot Cut', 'Blue', 'Jeans', 'Steech', 10, 'Jeans.jpg', 1200, 100, 1100), (2, 2, 'Sport T-Shirts', 'Cool Sport T-Shirts', 'White', 'Cotton', 'Black Print', 10, 'images.jpg', 600, 100, 500), (3, 3, 'Polo-Shirt', 'Casual Polo Shirts', 'Red', 'Cotton', 'Whole Red', 5, 'polo.jpg', 600, 100, 500), (4, 6, 'Black Bleasure', 'Nice', 'Black', 'Wool', 'Whole Black', 4, 'slider3.jpg', 2000, 200, 1800), (5, 1, 'Casual shirt', 'Casual', 'Off Black', 'Cotton', 'Steech', 5, 'shirt.jpg', 1200, 100, 1100), (6, 4, 'Casual Panjabi', 'Casual', 'Black', 'Cotton', 'Hand Embroidery', 0, 'pan_ca5.jpg', 1200, 50, 1150), (7, 4, 'Long Panjabi', 'Super', 'Gray', 'Cotton', 'Hand Embroidery', 6, 'pan_ca4.jpg', 1800, 0, 1800), (8, 7, 'Coral Green Semi Dressy', 'Embroidery around the neckline comes in a set', 'Green', 'Cotton', 'Hand Embroidery', 0, 'dress3.jpg', 2000, 0, 2000), (9, 7, 'Trendy Embroidered Kameez', 'Tribal pattern hand embroidered on the yoke', 'Light Shed Green', 'Silk', 'Churidar', 6, 'dress4.jpg', 2200, 100, 2100), (10, 7, 'Anarkoli', 'Super', 'Cream', 'Silk', 'Long', 5, '6.jpg', 3000, 0, 3000), (11, 8, 'Black Sharee', 'New', 'Black', 'Silk', 'Steech', 8, 'sharee1.jpg', 2000, 0, 2000); -- -------------------------------------------------------- -- -- Table structure for table `offer_master` -- CREATE TABLE IF NOT EXISTS `offer_master` ( `OfferId` int(11) NOT NULL AUTO_INCREMENT, `Offer` varchar(50) NOT NULL, `Detail` varchar(200) NOT NULL, PRIMARY KEY (`OfferId`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; -- -- Dumping data for table `offer_master` -- INSERT INTO `offer_master` (`OfferId`, `Offer`, `Detail`) VALUES (1, 'New Year Offer', '10% discount from all items.'), (2, 'Coupon Draw', 'Buy more than 2000/- and get a coupon which hopefully lucky for you.'); -- -------------------------------------------------------- -- -- Table structure for table `shopping_cart` -- CREATE TABLE IF NOT EXISTS `shopping_cart` ( `CartId` int(11) NOT NULL AUTO_INCREMENT, `CustomerId` int(11) NOT NULL, `ItemName` varchar(50) NOT NULL, `Quantity` int(11) NOT NULL, `Size` varchar(20) NOT NULL, `Price` float NOT NULL, `Total` float NOT NULL, PRIMARY KEY (`CartId`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; -- -- Dumping data for table `shopping_cart` -- INSERT INTO `shopping_cart` (`CartId`, `CustomerId`, `ItemName`, `Quantity`, `Size`, `Price`, `Total`) VALUES (3, 3, 'Black Bleasure', 1, 'Medium', 1800, 1800), (4, 3, 'Denim Jeans', 1, 'Extra Large', 1100, 1100); -- -------------------------------------------------------- -- -- Table structure for table `shopping_cart_final` -- CREATE TABLE IF NOT EXISTS `shopping_cart_final` ( `CartId` int(11) NOT NULL AUTO_INCREMENT, `CustomerId` int(11) NOT NULL, `ItemName` varchar(50) NOT NULL, `Size` varchar(20) NOT NULL, `Quantity` int(11) NOT NULL, `Price` float NOT NULL, `Total` float NOT NULL, PRIMARY KEY (`CartId`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=31 ; -- -- Dumping data for table `shopping_cart_final` -- INSERT INTO `shopping_cart_final` (`CartId`, `CustomerId`, `ItemName`, `Size`, `Quantity`, `Price`, `Total`) VALUES (1, 2, 'Sport T-Shirts', 'Large', 1, 500, 500), (2, 2, 'Coral Green Semi Dressy', 'Medium', 2, 2000, 4000), (30, 5, 'Sport T-Shirts', '1', 0, 500, 500); /*!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
7d1927c18deeb4fbd6628066b3b1ad0a913c8d95
SQL
hepitk/bird-forum-tsoha
/schema.sql
UTF-8
703
3.1875
3
[]
no_license
CREATE TABLE users ( id SERIAL PRIMARY KEY, username TEXT UNIQUE, password TEXT ); CREATE TABLE categories ( id SERIAL PRIMARY KEY, name TEXT ); CREATE TABLE threads ( id SERIAL PRIMARY KEY, category_id INTEGER REFERENCES categories, user_id INTEGER REFERENCES users, content TEXT ); CREATE TABLE messages ( id SERIAL PRIMARY KEY, content TEXT, thread_id INTEGER REFERENCES threads, user_id INTEGER REFERENCES users, sent_at TIMESTAMP ); INSERT INTO categories (name) values ('Parrots'); INSERT INTO categories (name) values ('Ioras'); INSERT INTO categories (name) values ('Storks'); INSERT INTO categories (name) values ('Shorebirds');
true