text stringlengths 6 9.38M |
|---|
insert into repository (url, name, namespace) values('url1', 'name1', 'namespace1');
insert into repository (url, name, namespace) values('url2', 'name2', 'namespace2');
insert into package_versions (version_id, repository_url, ref, erl_version) values('version_id1', 'url1', '1.0.0', '18');
insert into package_versions (version_id, repository_url, ref, erl_version) values('version_id2', 'url1', '1.0.0', '20');
insert into package_versions (version_id, repository_url, ref, erl_version) values('version_id3', 'url1', '1.0.1', '18');
insert into package_versions (version_id, repository_url, ref, erl_version) values('version_id4', 'url2', '1.0.0', '18');
insert into builds (build_id, package_version_id, result, message, artifact_path, created_date)
values('build_id1', 'version_id1', 'true', 'artifact', 'path1', now());
insert into builds (build_id, package_version_id, result, message, artifact_path, created_date)
values('build_id2', 'version_id1', 'true', 'artifact', 'path2', now());
insert into builds (build_id, package_version_id, result, message, artifact_path, created_date)
values('build_id3', 'version_id2', 'true', 'artifact', 'path3', now());
insert into builds (build_id, package_version_id, result, message, artifact_path, created_date)
values('build_id4', 'version_id2', 'true', 'artifact', 'path4', now());
insert into builds (build_id, package_version_id, result, message, artifact_path, created_date)
values('build_id5', 'version_id3', 'true', 'artifact', 'path5', now());
insert into builds (build_id, package_version_id, result, message, artifact_path, created_date)
values('build_id6', 'version_id4', 'true', 'artifact', 'path6', now()); |
-- Yêu cầu 13: Hiển thị thông tin các Dịch vụ đi kèm được sử dụng nhiều nhất bởi các
-- Khách hàng đã đặt phòng. (Lưu ý là có thể có nhiều dịch vụ có số lần sử
-- dụng nhiều như nhau).
select HDCT.idDichVuDiKem,tenDichVuDiKem,max(HDCT.soLuong)
from dichvudikem DVDK
inner join hopdongchitiet HDCT on DVDK.idDichVuDiKem = HDCT.idDichVuDiKem
group by HDCT.idDichVuDiKem
order by soLuong desc
limit 3;
|
-- must be empty
select se.study_id, c.studyid, se.id as surveyexecution_id, r.id as result_id
from surveyexecution se
left join questionnaire_result r on se.id = r.surveyexecution_id
left join questionnaire_configuration c on r.configuration_id = c.id
where se.study_id != c.studyid
order by surveyexecution_id
;
-- must be empty
select se.study_id, c.studyid, r.*, c.*
from surveyexecution se
left join itm_result r on se.id = r.surveyexecution_id
left join itm_configuration c on r.configuration_id = c.id
where se.study_id != c.studyid
;
-- must be empty
select se.study_id, c.studyid, r.*, c.*
from surveyexecution se
left join rrt_result r on se.id = r.surveyexecution_id
left join rrt_configuration c on r.configuration_id = c.id
where se.study_id != c.studyid
;
-- show all results for a given surveyexecution
select *
from surveyexecution se
left join
(
select r.*,'Q' as t from questionnaire_result r
union
select r.*,'I' as t from itm_result r
union
select r.*,'R' as t from rrt_result r
) a on a.surveyexecution_id = se.id
left join
(select id,position,studyid from questionnaire_configuration
union
select id,position,studyid from itm_configuration
union
select id,position,studyid from rrt_configuration
) b on a.configuration_id = b.id
where se.id in (211991)
; |
/*Database Football*/
create table config (
name varchar(255) not null,
`group` varchar(255) not null,
type varchar(255) not null,
value varchar(255) not null,
primary key (name)
);
create table fee (
id bigint not null auto_increment,
created datetime,
modified datetime,
month integer,
payment_date datetime,
price double precision,
status bit default 0,
year integer,
created_by bigint,
member_id bigint,
modified_by bigint,
primary key (id)
);
create table member (
id bigint not null auto_increment,
active bit default 1,
address varchar(255),
created datetime,
email varchar(255),
first_name varchar(255),
last_name varchar(255),
modified datetime,
phone varchar(255),
created_by bigint,
modified_by bigint,
primary key (id)
);
create table menu (
id bigint not null auto_increment,
active boolean,
created datetime,
modified datetime,
name varchar(256) not null,
`order` int default 0,
type varchar(255),
url varchar(255) not null,
created_by bigint,
modified_by bigint,
parent_id bigint,
primary key (id)
);
create table role (
id integer not null auto_increment,
description varchar(255),
name varchar(255) not null,
primary key (id)
);
create table user (
id bigint not null auto_increment,
active bit default 1,
address varchar(255),
created datetime,
email varchar(255),
first_name varchar(255),
last_name varchar(255),
modified datetime,
name varchar(255) not null,
password varchar(255) not null,
phone varchar(255),
created_by bigint,
modified_by bigint,
role_id integer,
primary key (id)
);
alter table user
add constraint UK_gj2fy3dcix7ph7k8684gka40c unique (name);
alter table fee
add index FK_4d2vy3192t6pecuswxoeblm5l (created_by),
add constraint FK_4d2vy3192t6pecuswxoeblm5l
foreign key (created_by)
references user (id);
alter table fee
add index FK_1h8ou6mpywii929ofoe0s6okw (member_id),
add constraint FK_1h8ou6mpywii929ofoe0s6okw
foreign key (member_id)
references member (id);
alter table fee
add index FK_dlk5v1e3pqx0yr14vvhc78tx0 (modified_by),
add constraint FK_dlk5v1e3pqx0yr14vvhc78tx0
foreign key (modified_by)
references user (id);
alter table member
add index FK_p5ka85xkrjy1w0vy0euvsy885 (created_by),
add constraint FK_p5ka85xkrjy1w0vy0euvsy885
foreign key (created_by)
references user (id);
alter table member
add index FK_3gppkx7nkefl77xbtbcsk013s (modified_by),
add constraint FK_3gppkx7nkefl77xbtbcsk013s
foreign key (modified_by)
references user (id);
alter table menu
add index FK_8tmyofr4tx36krqc3alfc4u5h (created_by),
add constraint FK_8tmyofr4tx36krqc3alfc4u5h
foreign key (created_by)
references user (id);
alter table menu
add index FK_6lqw2h1can7rfvvqos2iuxniq (modified_by),
add constraint FK_6lqw2h1can7rfvvqos2iuxniq
foreign key (modified_by)
references user (id);
alter table menu
add index FK_98a0njtu1xt51ul6g3v0ptj8b (parent_id),
add constraint FK_98a0njtu1xt51ul6g3v0ptj8b
foreign key (parent_id)
references menu (id);
alter table user
add index FK_90va3gtpnkq1jr6lbb2048dfi (created_by),
add constraint FK_90va3gtpnkq1jr6lbb2048dfi
foreign key (created_by)
references user (id);
alter table user
add index FK_b3gh5m8csda04qssow1d6537v (modified_by),
add constraint FK_b3gh5m8csda04qssow1d6537v
foreign key (modified_by)
references user (id);
alter table user
add index FK_qleu8ddawkdltal07p8e6hgva (role_id),
add constraint FK_qleu8ddawkdltal07p8e6hgva
foreign key (role_id)
references role (id);
INSERT INTO `role`(`id`, `name`) VALUES (1,'ROLE_ADMIN');
-- password: 123456
INSERT INTO `user` (`id`, `address`, `email`, `name`, `password`, `active`, `role_id`) VALUES
(1, ' ', '', 'obiz', 'e10adc3949ba59abbe56e057f20f883e', b'1', 1);
INSERT INTO `config` (`name`, `group`, `type`, `value`) VALUES ('DEFAULT_PRICE_FEE', '', 'Double', '100000')
/*20141226*/
UPDATE `fee` SET `payment_date` = Null, `price`=null WHERE `status`=0;
create table `group` (
id bigint not null auto_increment,
created datetime,
modified datetime,
name varchar(255),
status bit default 1,
created_by bigint,
modified_by bigint,
primary key (id)
);
ALTER TABLE `member` ADD `group_id` BIGINT NULL ;
alter table member
add index FK_41chea60j1aya89jb1csv6ggs (group_id),
add constraint FK_41chea60j1aya89jb1csv6ggs
foreign key (group_id)
references `group` (id);
alter table `group`
add index FK_gqlwhlalmpu41ibcgk13wybl1 (created_by),
add constraint FK_gqlwhlalmpu41ibcgk13wybl1
foreign key (created_by)
references user (id);
alter table `group`
add index FK_n7tihy6t4yqajcxmcureg3h3h (modified_by),
add constraint FK_n7tihy6t4yqajcxmcureg3h3h
foreign key (modified_by)
references user (id);
/*20150105*/
/*create table spend (
id bigint not null auto_increment,
bought_date datetime,
created datetime,
modified datetime,
month integer,
note varchar(255),
price double precision,
status bit default 0,
year integer,
created_by bigint,
modified_by bigint,
primary key (id)
);
alter table spend
add index FK_gu085nl564t3s83cvhyndwgyw (created_by),
add constraint FK_gu085nl564t3s83cvhyndwgyw
foreign key (created_by)
references user (id);
alter table spend
add index FK_8g69mj3hp6rmlijfc949cbubj (modified_by),
add constraint FK_8g69mj3hp6rmlijfc949cbubj
foreign key (modified_by)
references user (id);
INSERT INTO `config` (`name`, `group`, `type`, `value`) VALUES ('DEFAULT_PRICE_SPEND', '', 'Double', '200000');
/*20150106*/
RENAME TABLE `spend` TO `expense`;
UPDATE `config` SET `name` = 'DEFAULT_PRICE_EXPENSE' WHERE `name` = 'DEFAULT_PRICE_SPEND';
alter table expense
add index FK_1udg2p4wcl9c141glrqy87oip (created_by),
add constraint FK_1udg2p4wcl9c141glrqy87oip
foreign key (created_by)
references user (id);
alter table expense
add index FK_f138ckkbq1kacwamh3i27r8eg (modified_by),
add constraint FK_f138ckkbq1kacwamh3i27r8eg
foreign key (modified_by)
references user (id);
ALTER TABLE expense DROP INDEX FK_8g69mj3hp6rmlijfc949cbubj;
ALTER TABLE expense DROP INDEX FK_gu085nl564t3s83cvhyndwgyw;*/
/*20150106*/
create table expense (
id bigint not null auto_increment,
bought_date datetime,
created datetime,
modified datetime,
month integer,
note varchar(255),
price double precision,
status bit default 0,
year integer,
created_by bigint,
modified_by bigint,
primary key (id)
);
alter table expense
add index FK_1udg2p4wcl9c141glrqy87oip (created_by),
add constraint FK_1udg2p4wcl9c141glrqy87oip
foreign key (created_by)
references user (id);
alter table expense
add index FK_f138ckkbq1kacwamh3i27r8eg (modified_by),
add constraint FK_f138ckkbq1kacwamh3i27r8eg
foreign key (modified_by)
references user (id);
INSERT INTO `config` (`name`, `group`, `type`, `value`) VALUES ('DEFAULT_PRICE_EXPENSE', '', 'Double', '200000');
|
/*
Navicat MySQL Data Transfer
Source Server : centos
Source Server Version : 50723
Source Host : 39.108.90.113:3306
Source Database : classtable
Target Server Type : MYSQL
Target Server Version : 50723
File Encoding : 65001
Date: 2018-09-18 20:51:14
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for 1504011
-- ----------------------------
DROP TABLE IF EXISTS `1504011`;
CREATE TABLE `1504011` (
`ctid` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`shour` int(255) DEFAULT NULL,
`stime` int(11) DEFAULT NULL,
`etime` int(11) DEFAULT NULL,
`week` int(255) DEFAULT NULL,
`sweek` int(255) DEFAULT NULL,
`eweek` int(255) DEFAULT NULL,
`place` varchar(255) DEFAULT NULL,
`teacher` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ctid`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of 1504011
-- ----------------------------
INSERT INTO `1504011` VALUES ('1', 'Oracle数据库', '8', '1', '2', '1', '7', '14', '36-105', '刘登胜');
INSERT INTO `1504011` VALUES ('2', '就业指导', '10', '3', '4', '1', '1', '6', '36-105', '方淑颖');
INSERT INTO `1504011` VALUES ('3', ' Android智能终端与移动应用开发', '14', '5', '6', '1', '1', '8', '36-105', '王立新');
INSERT INTO `1504011` VALUES ('4', '计算方法', '10', '3', '4', '2', '3', '14', '35-408', '李旭');
INSERT INTO `1504011` VALUES ('5', '数学建模', '8', '1', '2', '3', '1', '8', '35-212', '张林松/段宝彬');
INSERT INTO `1504011` VALUES ('6', 'Android智能终端与移动应用开发', '10', '3', '4', '3', '3', '10', '36-408', '孙欣欣');
INSERT INTO `1504011` VALUES ('7', 'Oracle数据库', '14', '5', '6', '3', '7', '14', '36-201', '刘登胜');
INSERT INTO `1504011` VALUES ('8', 'Oracle数据库', '8', '1', '2', '4', '9', '16', '36-401', '刘登胜');
INSERT INTO `1504011` VALUES ('9', ' Android智能终端与移动应用开发', '10', '3', '4', '4', '3', '10', '36-408', '孙欣欣');
INSERT INTO `1504011` VALUES ('10', '计算方法', '10', '3', '4', '5', '3', '14', '35-408', '李旭');
INSERT INTO `1504011` VALUES ('11', '数学建模', '14', '5', '6', '5', '1', '8', '35-212', '张林松/段宝彬');
INSERT INTO `1504011` VALUES ('12', ' Android智能终端与移动应用开发', '16', '7', '8', '5', '1', '8', '36-201', '王立新');
-- ----------------------------
-- Table structure for 1504012
-- ----------------------------
DROP TABLE IF EXISTS `1504012`;
CREATE TABLE `1504012` (
`ctid` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`shour` int(255) DEFAULT NULL,
`stime` int(11) DEFAULT NULL,
`etime` int(11) DEFAULT NULL,
`week` int(255) DEFAULT NULL,
`sweek` int(255) DEFAULT NULL,
`eweek` int(255) DEFAULT NULL,
`place` varchar(255) DEFAULT NULL,
`teacher` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ctid`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of 1504012
-- ----------------------------
INSERT INTO `1504012` VALUES ('1', 'Oracle数据库', '8', '1', '2', '1', '7', '14', '36-105', '刘登胜');
INSERT INTO `1504012` VALUES ('2', '就业指导', '10', '3', '4', '1', '1', '6', '36-105', '方淑颖');
INSERT INTO `1504012` VALUES ('3', ' Android智能终端与移动应用开发', '16', '7', '8', '1', '1', '8', '36-105', '王立新');
INSERT INTO `1504012` VALUES ('4', 'Android智能终端与移动应用开发', '8', '1', '2', '2', '3', '10', '36-408', '孙欣欣');
INSERT INTO `1504012` VALUES ('5', '计算方法', '10', '3', '4', '2', '3', '14', '35-408', '李旭');
INSERT INTO `1504012` VALUES ('6', '数学建模', '8', '1', '2', '3', '1', '8', '35-212', '张林松/段宝彬');
INSERT INTO `1504012` VALUES ('7', 'Oracle数据库', '14', '5', '6', '3', '7', '14', '36-201', '刘登胜');
INSERT INTO `1504012` VALUES ('8', 'Oracle数据库', '10', '3', '4', '4', '9', '16', '36-401', '刘登胜');
INSERT INTO `1504012` VALUES ('9', 'Android智能终端与移动应用开发', '8', '1', '2', '5', '3', '10', '36-408', '孙欣欣');
INSERT INTO `1504012` VALUES ('10', '计算方法 ', '10', '3', '4', '5', '3', '14', '35-408', '李旭');
INSERT INTO `1504012` VALUES ('11', '数学建模', '14', '5', '6', '5', '1', '8', '35-212', '张林松/段宝彬');
INSERT INTO `1504012` VALUES ('12', 'Android智能终端与移动应用开发', '16', '7', '8', '5', '1', '8', '36-201', '王立新');
-- ----------------------------
-- Table structure for 1504031
-- ----------------------------
DROP TABLE IF EXISTS `1504031`;
CREATE TABLE `1504031` (
`ctid` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`shour` int(255) DEFAULT NULL,
`stime` int(11) DEFAULT NULL,
`etime` int(11) DEFAULT NULL,
`week` int(255) DEFAULT NULL,
`sweek` int(255) DEFAULT NULL,
`eweek` int(255) DEFAULT NULL,
`place` varchar(255) DEFAULT NULL,
`teacher` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ctid`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of 1504031
-- ----------------------------
INSERT INTO `1504031` VALUES ('1', '科技文献检索', '10', '3', '4', '1', '1', '6', '35-212', '刘原');
INSERT INTO `1504031` VALUES ('2', ' Android移动应用开发', '14', '5', '6', '1', '1', '8', '36-210', '王立新');
INSERT INTO `1504031` VALUES ('3', '科技文献检索', '8', '1', '2', '2', '5', '6', '35-609', '刘原');
INSERT INTO `1504031` VALUES ('4', 'Oracle数据库', '10', '3', '4', '2', '1', '8', '36-210', '吴晓璇');
INSERT INTO `1504031` VALUES ('5', ' Android移动应用开发', '10', '5', '6', '2', '3', '10', '36-510', '王立新');
INSERT INTO `1504031` VALUES ('6', '数据安全与存储', '8', '1', '2', '3', '2', '9', '36-2jt', '谢奇爱');
INSERT INTO `1504031` VALUES ('7', ' 就业指导', '10', '3', '4', '3', '6', '8', '36-2jt', '王桂云');
INSERT INTO `1504031` VALUES ('8', ' 网络项目管理', '10', '3', '4', '3', '9', '14', '36-2jt', '陈华超');
INSERT INTO `1504031` VALUES ('9', ' Android移动应用开发', '14', '5', '6', '3', '1', '8', '36-210', '王立新');
INSERT INTO `1504031` VALUES ('10', ' Oracle数据库', '10', '3', '4', '4', '1', '8', '36-210', '吴晓璇');
INSERT INTO `1504031` VALUES ('11', ' 数据安全与存储', '14', '5', '6', '4', '1', '8', '36-210', '吴晓璇');
INSERT INTO `1504031` VALUES ('12', '数据安全与存储', '8', '1', '2', '5', '2', '9', '36-2jt', '谢奇爱');
INSERT INTO `1504031` VALUES ('13', ' 网络项目管理', '10', '3', '4', '5', '11', '14', '36-3jt', '陈华超');
INSERT INTO `1504031` VALUES ('14', '就业指导', '10', '3', '4', '5', '6', '8', '36-2jt', '王桂云');
INSERT INTO `1504031` VALUES ('15', 'Oracle数据库', '14', '5', '6', '5', '3', '10', '36-503', '吴晓璇');
INSERT INTO `1504031` VALUES ('16', '网络项目管理', '10', '3', '4', '1', '9', '14', '36-3jt', '陈华超');
-- ----------------------------
-- Table structure for 1504032
-- ----------------------------
DROP TABLE IF EXISTS `1504032`;
CREATE TABLE `1504032` (
`ctid` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`shour` int(255) DEFAULT NULL,
`stime` int(11) DEFAULT NULL,
`etime` int(11) DEFAULT NULL,
`week` int(255) DEFAULT NULL,
`sweek` int(255) DEFAULT NULL,
`eweek` int(255) DEFAULT NULL,
`place` varchar(255) DEFAULT NULL,
`teacher` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ctid`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of 1504032
-- ----------------------------
INSERT INTO `1504032` VALUES ('1', '科技文献检索', '8', '1', '2', '1', '5', '6', '35-609', '刘原');
INSERT INTO `1504032` VALUES ('2', '科技文献检索', '10', '3', '4', '1', '1', '6', '35-212', '刘原');
INSERT INTO `1504032` VALUES ('3', '网络项目管理', '10', '3', '4', '1', '9', '14', '36-3jt', '陈华超');
INSERT INTO `1504032` VALUES ('4', 'Android移动应用开发', '14', '5', '6', '1', '1', '8', '36-210', '王立新');
INSERT INTO `1504032` VALUES ('5', ' Oracle数据库', '10', '3', '4', '2', '1', '8', '36-210', '吴晓璇');
INSERT INTO `1504032` VALUES ('6', ' Android移动应用开发', '16', '7', '8', '2', '3', '10', '36-510', '王立新');
INSERT INTO `1504032` VALUES ('7', '数据安全与存储', '8', '1', '2', '3', '2', '9', '36-2jt', '谢奇爱');
INSERT INTO `1504032` VALUES ('8', ' 就业指导', '10', '3', '4', '3', '6', '8', '36-2jt', '王桂云');
INSERT INTO `1504032` VALUES ('9', '网络项目管理', '10', '3', '4', '3', '9', '14', '36-3jt', '陈华超');
INSERT INTO `1504032` VALUES ('10', ' Android移动应用开发', '14', '5', '6', '3', '1', '8', '36-210', '王立新');
INSERT INTO `1504032` VALUES ('11', 'Oracle数据库', '16', '7', '8', '3', '3', '10', '36-503', '吴晓璇');
INSERT INTO `1504032` VALUES ('12', 'Oracle数据库', '10', '3', '4', '4', '1', '8', '36-210', '吴晓璇');
INSERT INTO `1504032` VALUES ('13', '数据安全与存储', '8', '1', '2', '5', '2', '9', '36-2jt', '谢奇爱');
INSERT INTO `1504032` VALUES ('14', '网络项目管理', '10', '3', '4', '5', '11', '14', '36-3jt', '陈华超');
INSERT INTO `1504032` VALUES ('15', ' 就业指导', '10', '3', '4', '5', '6', '8', '36-2jt', '王桂云');
INSERT INTO `1504032` VALUES ('16', ' 数据安全与存储', '14', '5', '6', '5', '4', '11', '36-501', '谢奇爱');
-- ----------------------------
-- Table structure for 1504091
-- ----------------------------
DROP TABLE IF EXISTS `1504091`;
CREATE TABLE `1504091` (
`ctid` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`shour` int(255) DEFAULT NULL,
`stime` int(11) DEFAULT NULL,
`etime` int(11) DEFAULT NULL,
`week` int(255) DEFAULT NULL,
`sweek` int(255) DEFAULT NULL,
`eweek` int(255) DEFAULT NULL,
`place` varchar(255) DEFAULT NULL,
`teacher` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ctid`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of 1504091
-- ----------------------------
INSERT INTO `1504091` VALUES ('1', ' 就业指导', '10', '3', '4', '1', '1', '6', '36-210', '谢琛');
INSERT INTO `1504091` VALUES ('2', '人机交互的软件工程方法', '10', '3', '4', '1', '13', '18', '36-210', '杨彬');
INSERT INTO `1504091` VALUES ('3', '人机交互的软件工程方法', '14', '5', '6', '1', '15', '18', '36-606', '杨彬');
INSERT INTO `1504091` VALUES ('4', '数据挖掘', '8', '1', '2', '2', '1', '8', '36-210', '张新');
INSERT INTO `1504091` VALUES ('5', ' 人工智能技术', '8', '1', '2', '3', '1', '8', '36-210', '张琛');
INSERT INTO `1504091` VALUES ('6', '人机交互的软件工程方法', '10', '3', '4', '3', '13', '17', '36-210', '杨彬');
INSERT INTO `1504091` VALUES ('7', '人工智能技术', '10', '3', '4', '3', '7', '8', '36-610', '张琛');
INSERT INTO `1504091` VALUES ('8', '数据挖掘', '10', '3', '4', '4', '1', '8', '36-105', '张新');
INSERT INTO `1504091` VALUES ('9', '数据挖掘', '14', '5', '6', '4', '3', '10', '36-610', '张新');
INSERT INTO `1504091` VALUES ('10', '人机交互的软件工程方法', '8', '1', '2', '5', '13', '17', '36-210', '杨彬');
INSERT INTO `1504091` VALUES ('11', '人工智能技术', '8', '1', '2', '5', '3', '8', '36-610', '谢琛');
INSERT INTO `1504091` VALUES ('12', '人工智能技术', '10', '3', '4', '5', '1', '8', '36-210', '谢琛');
INSERT INTO `1504091` VALUES ('13', '人机交互的软件工程方法', '14', '5', '6', '5', '15', '18', '36-606', '杨彬');
-- ----------------------------
-- Table structure for 1504092
-- ----------------------------
DROP TABLE IF EXISTS `1504092`;
CREATE TABLE `1504092` (
`ctid` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`shour` int(255) DEFAULT NULL,
`stime` int(11) DEFAULT NULL,
`etime` int(11) DEFAULT NULL,
`week` int(255) DEFAULT NULL,
`sweek` int(255) DEFAULT NULL,
`eweek` int(255) DEFAULT NULL,
`place` varchar(255) DEFAULT NULL,
`teacher` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ctid`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of 1504092
-- ----------------------------
INSERT INTO `1504092` VALUES ('1', '人机交互的软件工程方法', '8', '1', '2', '1', '15', '18', '36-606', '杨彬');
INSERT INTO `1504092` VALUES ('2', '就业指导', '10', '3', '4', '1', '1', '6', '36-210', '谢琛');
INSERT INTO `1504092` VALUES ('3', '人机交互的软件工程方法', '10', '3', '4', '1', '13', '18', '36-210', '杨彬');
INSERT INTO `1504092` VALUES ('4', '数据挖掘', '8', '1', '2', '2', '1', '8', '36-210', '张新');
INSERT INTO `1504092` VALUES ('5', '数据挖掘', '10', '3', '4', '2', '3', '10', '36-610', '张新');
INSERT INTO `1504092` VALUES ('6', '人工智能技术', '8', '1', '2', '3', '1', '8', '36-210', '张琛');
INSERT INTO `1504092` VALUES ('7', '人机交互的软件工程方法', '8', '1', '2', '3', '15', '18', '36-606', '杨彬');
INSERT INTO `1504092` VALUES ('8', '人机交互的软件工程方法', '10', '3', '4', '3', '13', '17', '36-210', '杨彬');
INSERT INTO `1504092` VALUES ('9', '人工智能技术', '14', '5', '6', '3', '3', '8', '36-606', '张琛');
INSERT INTO `1504092` VALUES ('10', '数据挖掘', '10', '3', '4', '4', '1', '8', '36-105', '张新');
INSERT INTO `1504092` VALUES ('11', '人机交互的软件工程方法', '8', '1', '2', '5', '13', '17', '36-210', '杨彬');
INSERT INTO `1504092` VALUES ('12', '人工智能技术', '10', '3', '4', '5', '1', '8', '36-210', '张琛');
INSERT INTO `1504092` VALUES ('13', '人工智能技术', '14', '5', '6', '5', '7', '8', '36-610', '张琛');
-- ----------------------------
-- Table structure for 1604011
-- ----------------------------
DROP TABLE IF EXISTS `1604011`;
CREATE TABLE `1604011` (
`ctid` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`shour` int(255) DEFAULT NULL,
`stime` int(11) DEFAULT NULL,
`etime` int(11) DEFAULT NULL,
`week` int(255) DEFAULT NULL,
`sweek` int(255) DEFAULT NULL,
`eweek` int(255) DEFAULT NULL,
`place` varchar(255) DEFAULT NULL,
`teacher` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ctid`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of 1604011
-- ----------------------------
INSERT INTO `1604011` VALUES ('1', '创业基础', '8', '1', '2', '1', '13', '15', '36-201', '马保卫');
INSERT INTO `1604011` VALUES ('2', '微型计算机原理与接口技术', '8', '1', '2', '1', '3', '11', '36-210', '张向东');
INSERT INTO `1604011` VALUES ('3', '计算机网络基础', '10', '3', '4', '1', '3', '13', '35-203', '马婷婷');
INSERT INTO `1604011` VALUES ('4', '面向对象程序设计', '14', '5', '6', '1', '5', '14', '36-401', '赵志鹰');
INSERT INTO `1604011` VALUES ('5', '面向对象程序设计', '18', '9', '10', '1', '3', '9', '35-403', '赵志鹰');
INSERT INTO `1604011` VALUES ('6', '操作系统原理', '8', '1', '2', '2', '3', '13', '36-3JT', '张琛');
INSERT INTO `1604011` VALUES ('7', '微型计算机原理与接口技术', '10', '3', '4', '2', '8', '15', '36-403', '高玲玲');
INSERT INTO `1604011` VALUES ('8', '面向对象程序设计', '14', '5', '6', '2', '11', '14', '36-401', '赵志鹰');
INSERT INTO `1604011` VALUES ('9', '数据库原理与应用', '8', '1', '2', '3', '3', '10', '36-105', '刘登胜');
INSERT INTO `1604011` VALUES ('10', '微型计算机原理与接口技术', '10', '3', '4', '3', '3', '11', '36-210', '张向东');
INSERT INTO `1604011` VALUES ('11', '微型计算机原理与接口技术', '14', '5', '6', '3', '13', '14', '36-403', '高玲玲');
INSERT INTO `1604011` VALUES ('12', '计算机网络基础', '14', '5', '6', '3', '3', '12', '35-203', '马婷婷');
INSERT INTO `1604011` VALUES ('13', '数据库原理与应用', '16', '7', '8', '3', '10', '15', '36-408', '刘登胜');
INSERT INTO `1604011` VALUES ('14', ' 面向对象程序设计', '16', '7', '8', '3', '3', '9', '35-403', '赵志鹰');
INSERT INTO `1604011` VALUES ('15', '计算机网络基础', '10', '3', '3', '4', '14', '14', '36-403', '马婷婷');
INSERT INTO `1604011` VALUES ('16', '操作系统原理', '10', '3', '4', '4', '3', '13', '36-3JT', '张琛');
INSERT INTO `1604011` VALUES ('17', '计算机网络基础', '14', '5', '6', '4', '11', '13', '36-403', '马婷婷');
INSERT INTO `1604011` VALUES ('18', '数据库原理与应用', '14', '5', '6', '4', '6', '9', '36-401', '刘登胜');
INSERT INTO `1604011` VALUES ('19', '操作系统原理', '16', '7', '8', '4', '9', '14', '36-408', '张琛');
INSERT INTO `1604011` VALUES ('20', '数据库原理与应用', '8', '1', '2', '5', '3', '11', '36-210', '刘登胜');
INSERT INTO `1604011` VALUES ('21', '数据库原理与应用', '10', '3', '3', '5', '11', '11', '36-210', '刘登胜');
INSERT INTO `1604011` VALUES ('22', ' 微型计算机原理与接口技术', '14', '5', '6', '5', '3', '12', '36-210', '张向东');
INSERT INTO `1604011` VALUES ('23', '创业基础', '14', '5', '6', '5', '13', '16', '36-105', '马保卫');
-- ----------------------------
-- Table structure for 1604012
-- ----------------------------
DROP TABLE IF EXISTS `1604012`;
CREATE TABLE `1604012` (
`ctid` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`shour` int(255) DEFAULT NULL,
`stime` int(11) DEFAULT NULL,
`etime` int(11) DEFAULT NULL,
`week` int(255) DEFAULT NULL,
`sweek` int(255) DEFAULT NULL,
`eweek` int(255) DEFAULT NULL,
`place` varchar(255) DEFAULT NULL,
`teacher` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ctid`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of 1604012
-- ----------------------------
INSERT INTO `1604012` VALUES ('1', '创业基础', '8', '1', '2', '1', '13', '15', '36-201', '马保卫');
INSERT INTO `1604012` VALUES ('2', '微型计算机原理与接口技术', '8', '1', '2', '1', '3', '11', '36-210', '张向东');
INSERT INTO `1604012` VALUES ('3', '计算机网络基础', '10', '3', '4', '1', '3', '13', '35-203', '马婷婷');
INSERT INTO `1604012` VALUES ('4', '计算机网络基础', '14', '5', '6', '1', '11', '14', '36-403', '马婷婷');
INSERT INTO `1604012` VALUES ('5', '面向对象程序设计', '16', '7', '8', '1', '5', '14', '36-401', '赵志鹰');
INSERT INTO `1604012` VALUES ('6', '面向对象程序设计', '18', '9', '10', '1', '3', '9', '35-403', '赵志鹰');
INSERT INTO `1604012` VALUES ('7', '操作系统原理', '8', '1', '2', '2', '3', '13', '36-3JT', '张琛');
INSERT INTO `1604012` VALUES ('8', '面向对象程序设计', '16', '7', '8', '2', '11', '14', '36-408', '赵志鹰');
INSERT INTO `1604012` VALUES ('9', '数据库原理与应用', '8', '1', '2', '3', '11', '15', '36-508', '刘登胜');
INSERT INTO `1604012` VALUES ('10', '数据库原理与应用', '8', '1', '1', '3', '16', '16', '36-508', '刘登胜');
INSERT INTO `1604012` VALUES ('11', '数据库原理与应用', '8', '1', '2', '3', '3', '10', '36-105', '刘登胜');
INSERT INTO `1604012` VALUES ('12', '微型计算机原理与接口技术', '10', '3', '4', '3', '13', '15', '36-403', '高玲玲');
INSERT INTO `1604012` VALUES ('13', '微型计算机原理与接口技术', '10', '3', '4', '3', '3', '11', '36-210', '张向东');
INSERT INTO `1604012` VALUES ('14', '计算机网络基础', '14', '5', '6', '3', '3', '12', '35-203', '马婷婷');
INSERT INTO `1604012` VALUES ('15', '面向对象程序设计', '16', '7', '8', '3', '3', '9', '35-403', '赵志鹰');
INSERT INTO `1604012` VALUES ('16', '操作系统原理', '10', '3', '4', '4', '3', '13', '36-3JT', '张琛');
INSERT INTO `1604012` VALUES ('17', '操作系统原理', '14', '5', '6', '4', '9', '14', '36-408', '张琛');
INSERT INTO `1604012` VALUES ('18', '微型计算机原理与接口技术', '16', '7', '8', '4', '8', '15', '36-403', '高玲玲');
INSERT INTO `1604012` VALUES ('19', '数据库原理与应用', '8', '1', '2', '5', '3', '11', '36-210', '刘登胜');
INSERT INTO `1604012` VALUES ('20', '数据库原理与应用', '10', '3', '3', '5', '11', '11', '36-210', '刘登胜');
INSERT INTO `1604012` VALUES ('21', '数据库原理与应用', '10', '3', '4', '5', '6', '10', '36-508', '刘登胜');
INSERT INTO `1604012` VALUES ('22', '微型计算机原理与接口技术', '14', '5', '6', '5', '3', '12', '36-210', '张向东');
INSERT INTO `1604012` VALUES ('23', '创业基础', '14', '5', '6', '5', '13', '16', '36-105', '马保卫');
-- ----------------------------
-- Table structure for 1604031
-- ----------------------------
DROP TABLE IF EXISTS `1604031`;
CREATE TABLE `1604031` (
`ctid` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`shour` int(255) DEFAULT NULL,
`stime` int(11) DEFAULT NULL,
`etime` int(11) DEFAULT NULL,
`week` int(255) DEFAULT NULL,
`sweek` int(255) DEFAULT NULL,
`eweek` int(255) DEFAULT NULL,
`place` varchar(255) DEFAULT NULL,
`teacher` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ctid`)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of 1604031
-- ----------------------------
INSERT INTO `1604031` VALUES ('1', '网络协议编程', '10', '3', '4', '1', '1', '7', '36-3JT', '吴晓璇');
INSERT INTO `1604031` VALUES ('2', '物联网概论', '10', '3', '4', '1', '10', '16', '41-2JT', '胡松华');
INSERT INTO `1604031` VALUES ('3', '操作系统原理', '14', '5', '6', '1', '1', '11', '36-3JT', '吴志泽');
INSERT INTO `1604031` VALUES ('4', '网络操作系统', '16', '7', '8', '1', '10', '15', '36-3JT', '郭昌建');
INSERT INTO `1604031` VALUES ('5', '网络协议编程', '16', '7', '8', '1', '3', '9', '36-508', '吴晓璇');
INSERT INTO `1604031` VALUES ('6', 'JAVA语言基础', '8', '1', '2', '2', '1', '8', '36-105', '吴晓琴');
INSERT INTO `1604031` VALUES ('7', '数据库原理与应用', '8', '1', '2', '2', '10', '18', '36-2JT', '李正茂');
INSERT INTO `1604031` VALUES ('8', '数据库原理与应用', '10', '3', '4', '2', '16', '16', '36-501', '李正茂');
INSERT INTO `1604031` VALUES ('9', 'JAVA语言基础', '10', '3', '4', '2', '3', '8', '36-503', '吴晓琴');
INSERT INTO `1604031` VALUES ('10', '计算机组成原理', '14', '5', '6', '2', '1', '11', '36-210', '张向东');
INSERT INTO `1604031` VALUES ('11', '创业基础', '8', '1', '2', '3', '10', '16', '35-212', '陈玲');
INSERT INTO `1604031` VALUES ('12', '网络操作系统', '10', '3', '4', '3', '16', '16', '41-2JT', '郭昌建');
INSERT INTO `1604031` VALUES ('13', '数据库原理与应用', '10', '3', '4', '3', '17', '18', '36-506', '李正茂');
INSERT INTO `1604031` VALUES ('14', '网络操作系统', '16', '7', '8', '3', '11', '18', '36-508', '郭昌建');
INSERT INTO `1604031` VALUES ('15', '计算机组成原理', '8', '2', '2', '4', '1', '10', '36-210', '张向东');
INSERT INTO `1604031` VALUES ('16', '物联网概论', '10', '3', '4', '4', '10', '16', '41-2JT', '胡松华');
INSERT INTO `1604031` VALUES ('17', '网络协议编程', '14', '5', '6', '4', '1', '7', '36-3JT', '吴晓璇');
INSERT INTO `1604031` VALUES ('18', '网络操作系统', '14', '5', '6', '4', '10', '15', '36-3JT', '郭昌建');
INSERT INTO `1604031` VALUES ('19', 'JAVA语言基础', '8', '1', '2', '5', '1', '7', '36-105', '吴晓琴');
INSERT INTO `1604031` VALUES ('20', '数据库原理与应用', '8', '1', '2', '5', '10', '18', '36-2JT', '李正茂');
INSERT INTO `1604031` VALUES ('21', '数据库原理与应用', '10', '3', '4', '5', '12', '18', '36-506', '李正茂');
INSERT INTO `1604031` VALUES ('22', 'JAVA语言基础', '10', '3', '4', '5', '3', '9', '36-503', '吴晓琴');
INSERT INTO `1604031` VALUES ('23', '操作系统原理', '14', '5', '6', '5', '1', '11', '36-3JT', '吴志泽');
INSERT INTO `1604031` VALUES ('24', '物联网概论', '14', '5', '6', '5', '12', '18', '36-510', '胡松华');
INSERT INTO `1604031` VALUES ('25', '操作系统原理', '16', '7', '8', '5', '3', '8', '36-506', '吴志泽');
-- ----------------------------
-- Table structure for 1604032
-- ----------------------------
DROP TABLE IF EXISTS `1604032`;
CREATE TABLE `1604032` (
`ctid` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`shour` int(255) DEFAULT NULL,
`stime` int(11) DEFAULT NULL,
`etime` int(11) DEFAULT NULL,
`week` int(255) DEFAULT NULL,
`sweek` int(255) DEFAULT NULL,
`eweek` int(255) DEFAULT NULL,
`place` varchar(255) DEFAULT NULL,
`teacher` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ctid`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of 1604032
-- ----------------------------
INSERT INTO `1604032` VALUES ('1', '网络协议编程', '10', '3', '4', '1', '1', '7', '36-3JT', '吴晓璇');
INSERT INTO `1604032` VALUES ('2', '物联网概论', '10', '3', '4', '1', '10', '16', '41-2JT', '胡松华');
INSERT INTO `1604032` VALUES ('3', '操作系统原理', '14', '5', '6', '1', '1', '11', '36-3JT', '吴志泽');
INSERT INTO `1604032` VALUES ('4', '网络操作系统', '16', '7', '8', '1', '10', '15', '36-3JT', '郭昌建');
INSERT INTO `1604032` VALUES ('5', '操作系统原理', '16', '7', '8', '1', '3', '8', '36-506', '吴志泽');
INSERT INTO `1604032` VALUES ('6', 'JAVA语言基础', '8', '1', '2', '2', '1', '8', '36-105', '吴晓琴');
INSERT INTO `1604032` VALUES ('7', '数据库原理与应用', '8', '1', '2', '2', '10', '18', '36-2JT', '李正茂');
INSERT INTO `1604032` VALUES ('8', '计算机组成原理', '14', '5', '6', '2', '1', '11', '36-210', '张向东');
INSERT INTO `1604032` VALUES ('9', '创业基础', '8', '1', '2', '3', '10', '16', '35-212', '陈玲');
INSERT INTO `1604032` VALUES ('10', '网络操作系统', '10', '3', '4', '3', '16', '16', '41-2JT', '郭昌建');
INSERT INTO `1604032` VALUES ('11', '数据库原理与应用', '14', '5', '6', '3', '16', '18', '36-506', '李正茂');
INSERT INTO `1604032` VALUES ('12', '计算机组成原理', '8', '1', '2', '4', '1', '10', '36-210', '张向东');
INSERT INTO `1604032` VALUES ('13', '物联网概论', '10', '3', '4', '4', '10', '16', '41-2JT', '胡松华');
INSERT INTO `1604032` VALUES ('14', 'JAVA语言基础', '10', '3', '4', '4', '3', '9', '36-503', '吴晓琴');
INSERT INTO `1604032` VALUES ('15', '网络协议编程', '14', '5', '6', '4', '1', '7', '36-3JT', '吴晓璇');
INSERT INTO `1604032` VALUES ('16', '网络操作系统', '14', '5', '6', '4', '10', '15', '36-3Jt', '郭昌建');
INSERT INTO `1604032` VALUES ('17', '网络操作系统', '16', '7', '8', '4', '11', '18', '36-508', '郭昌建');
INSERT INTO `1604032` VALUES ('18', '网络协议编程', '16', '7', '8', '4', '3', '9', '36-508', '吴晓璇');
INSERT INTO `1604032` VALUES ('19', 'JAVA语言基础', '8', '1', '2', '4', '1', '7', '36-105', '吴晓琴');
INSERT INTO `1604032` VALUES ('20', '数据库原理与应用', '8', '1', '2', '5', '10', '18', '36-2JT', '李正茂');
INSERT INTO `1604032` VALUES ('21', '物联网概论', '10', '3', '4', '5', '12', '18', '36-510', '胡松华');
INSERT INTO `1604032` VALUES ('22', '操作系统原理', '14', '5', '6', '5', '1', '11', '36-3JT', '吴志泽');
INSERT INTO `1604032` VALUES ('23', '数据库原理与应用', '14', '5', '6', '5', '12', '18', '36-506', '李正茂');
INSERT INTO `1604032` VALUES ('24', 'JAVA语言基础', '16', '7', '8', '5', '3', '8', '36-503', '吴晓琴');
INSERT INTO `1604032` VALUES ('25', null, null, null, null, null, null, null, null, null);
INSERT INTO `1604032` VALUES ('26', null, null, null, null, null, null, null, null, null);
-- ----------------------------
-- Table structure for 160409
-- ----------------------------
DROP TABLE IF EXISTS `160409`;
CREATE TABLE `160409` (
`ctid` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`shour` int(255) DEFAULT NULL,
`stime` int(11) DEFAULT NULL,
`etime` int(11) DEFAULT NULL,
`week` int(255) DEFAULT NULL,
`sweek` int(255) DEFAULT NULL,
`eweek` int(255) DEFAULT NULL,
`place` varchar(255) DEFAULT NULL,
`teacher` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ctid`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of 160409
-- ----------------------------
INSERT INTO `160409` VALUES ('1', 'JavaEE技术', '8', '1', '2', '1', '12', '17', '36-610', '夏竹青');
INSERT INTO `160409` VALUES ('2', '软件分析与设计', '8', '1', '2', '1', '3', '11', '35-203', '张家锐');
INSERT INTO `160409` VALUES ('3', '操作系统', '10', '3', '4', '1', '13', '18', '36-606', '崔海莉');
INSERT INTO `160409` VALUES ('4', '计算机组成与结构', '14', '5', '6', '1', '15', '16', '36-401', '刘洁群');
INSERT INTO `160409` VALUES ('5', '计算方法', '14', '5', '6', '1', '3', '14', '36-1JT', '谢进');
INSERT INTO `160409` VALUES ('6', '计算机组成与结构', '16', '7', '8', '1', '15', '16', '36-401', '刘洁群');
INSERT INTO `160409` VALUES ('7', '软件分析与设计', '16', '7', '8', '1', '4', '12', '36-608', '张家锐');
INSERT INTO `160409` VALUES ('8', 'JavaEE技术', '8', '1', '2', '2', '11', '18', '36-201', '许强');
INSERT INTO `160409` VALUES ('9', '操作系统', '10', '3', '4', '2', '8', '18', '35-412', '屠菁');
INSERT INTO `160409` VALUES ('10', '计算方法', '8', '1', '2', '3', '3', '14', '36-1JT', '谢进');
INSERT INTO `160409` VALUES ('11', '计算机组成与结构', '14', '5', '6', '3', '3', '16', '35-409', '张向东');
INSERT INTO `160409` VALUES ('12', '软件分析与设计', '16', '7', '8', '3', '3', '11', '36-210', '张家锐');
INSERT INTO `160409` VALUES ('13', 'JavaEE技术', '8', '1', '2', '4', '12', '18', '36-610', '夏竹青');
INSERT INTO `160409` VALUES ('14', '软件分析与设计', '8', '1', '2', '4', '4', '11', '36-608', '张家锐');
INSERT INTO `160409` VALUES ('15', 'JavaEE技术', '10', '3', '4', '4', '11', '17', '35-203', '许强');
INSERT INTO `160409` VALUES ('16', '计算机组成与结构', '14', '5', '6', '4', '12', '14', '36-401', '刘洁群');
INSERT INTO `160409` VALUES ('17', '操作系统', '16', '7', '8', '4', '8', '18', '36-201', '屠菁');
INSERT INTO `160409` VALUES ('18', '计算机组成与结构', '8', '1', '2', '5', '3', '16', '36-201', '张向东');
INSERT INTO `160409` VALUES ('19', '科技文献检索', '14', '5', '6', '5', '3', '8', '35-203', '刘原');
INSERT INTO `160409` VALUES ('20', '科技文献检索', '16', '7', '8', '5', '7', '8', '35-612', '刘原');
-- ----------------------------
-- Table structure for 1604091
-- ----------------------------
DROP TABLE IF EXISTS `1604091`;
CREATE TABLE `1604091` (
`ctid` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`shour` int(255) DEFAULT NULL,
`stime` int(11) DEFAULT NULL,
`etime` int(11) DEFAULT NULL,
`week` int(255) DEFAULT NULL,
`sweek` int(255) DEFAULT NULL,
`eweek` int(255) DEFAULT NULL,
`place` varchar(255) DEFAULT NULL,
`teacher` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ctid`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of 1604091
-- ----------------------------
INSERT INTO `1604091` VALUES ('1', '操作系统', '8', '1', '2', '1', '8', '18', '36-204', '屠菁');
INSERT INTO `1604091` VALUES ('2', 'JavaEE技术', '10', '3', '4', '1', '11', '18', '36-204', '许强');
INSERT INTO `1604091` VALUES ('3', '计算方法', '14', '5', '6', '1', '3', '14', '36-1JT', '谢进');
INSERT INTO `1604091` VALUES ('4', '计算机组成与结构', '16', '7', '8', '1', '3', '16', '36-210', '张向东');
INSERT INTO `1604091` VALUES ('5', '操作系统', '8', '1', '2', '2', '13', '18', '36-606', '崔海莉');
INSERT INTO `1604091` VALUES ('6', '软件分析与设计', '10', '3', '4', '2', '3', '11', '36-204', '张家锐');
INSERT INTO `1604091` VALUES ('7', '计算方法', '8', '1', '2', '3', '3', '14', '36-1-JT', '谢进');
INSERT INTO `1604091` VALUES ('8', '操作系统', '10', '3', '4', '3', '8', '18', '36-204', '屠菁');
INSERT INTO `1604091` VALUES ('9', '计算机组成与结构', '14', '5', '6', '3', '12', '16', '36-401', '刘洁群');
INSERT INTO `1604091` VALUES ('10', '软件分析与设计', '14', '5', '6', '3', '4', '11', '36-608', '张家锐');
INSERT INTO `1604091` VALUES ('11', '计算机组成与结构', '16', '7', '8', '3', '15', '16', '36-401', '刘洁群');
INSERT INTO `1604091` VALUES ('12', 'JavaEE技术', '8', '1', '2', '4', '11', '17', '36-204', '许强');
INSERT INTO `1604091` VALUES ('13', '计算机组成与结构', '10', '3', '4', '4', '3', '16', '36-204', '张向东');
INSERT INTO `1604091` VALUES ('14', 'JavaEE技术', '14', '5', '6', '4', '12', '18', '36-610', '夏竹青');
INSERT INTO `1604091` VALUES ('15', '软件分析与设计', '14', '5', '6', '4', '3', '11', '36-204', '张家锐');
INSERT INTO `1604091` VALUES ('16', '软件分析与设计', '16', '7', '8', '4', '4', '12', '36-608', '张家锐');
INSERT INTO `1604091` VALUES ('17', 'JavaEE技术', '8', '1', '2', '5', '12', '17', '36-610', '夏竹青');
INSERT INTO `1604091` VALUES ('18', '科技文献检索', '8', '1', '2', '5', '7', '8', '35-612', '刘原');
INSERT INTO `1604091` VALUES ('19', '科技文献检索', '10', '3', '4', '5', '3', '8', '36-204', '刘原');
-- ----------------------------
-- Table structure for 1604092
-- ----------------------------
DROP TABLE IF EXISTS `1604092`;
CREATE TABLE `1604092` (
`ctid` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`shour` int(255) DEFAULT NULL,
`stime` int(11) DEFAULT NULL,
`etime` int(11) DEFAULT NULL,
`week` int(255) DEFAULT NULL,
`sweek` int(255) DEFAULT NULL,
`eweek` int(255) DEFAULT NULL,
`place` varchar(255) DEFAULT NULL,
`teacher` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ctid`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of 1604092
-- ----------------------------
INSERT INTO `1604092` VALUES ('1', '计算机组成与结构', '8', '1', '2', '1', '15', '16', '36-401', '刘洁群');
INSERT INTO `1604092` VALUES ('2', '软件分析与设计', '8', '1', '2', '1', '3', '11', '35-203', '张家锐');
INSERT INTO `1604092` VALUES ('3', '计算机组成与结构', '10', '3', '4', '1', '15', '16', '36-401', '刘洁群');
INSERT INTO `1604092` VALUES ('4', '软件分析与设计', '10', '3', '4', '1', '4', '12', '36-608', '张家锐');
INSERT INTO `1604092` VALUES ('5', '计算方法', '14', '5', '6', '1', '3', '14', '36-1JT', '谢进');
INSERT INTO `1604092` VALUES ('6', 'JavaEE技术', '8', '1', '2', '2', '11', '18', '36-201', '许强');
INSERT INTO `1604092` VALUES ('7', '操作系统', '10', '3', '4', '2', '8', '18', '35-412', '屠菁');
INSERT INTO `1604092` VALUES ('8', '操作系统', '16', '7', '8', '2', '13', '18', '36-608', '崔海莉');
INSERT INTO `1604092` VALUES ('9', '计算方法', '8', '1', '2', '3', '3', '14', '36-1JT', '谢进');
INSERT INTO `1604092` VALUES ('10', 'JavaEE技术', '10', '3', '4', '3', '12', '18', '36-610', '夏竹青');
INSERT INTO `1604092` VALUES ('11', '软件分析与设计', '10', '3', '4', '3', '4', '11', '36-608', '张家锐');
INSERT INTO `1604092` VALUES ('12', '计算机组成与结构', '14', '5', '6', '3', '3', '16', '35-409', '张向东');
INSERT INTO `1604092` VALUES ('13', '软件分析与设计', '16', '7', '8', '3', '3', '11', '36-210', '张家锐');
INSERT INTO `1604092` VALUES ('14', 'JavaEE技术', '10', '3', '4', '4', '11', '17', '35-203', '许强');
INSERT INTO `1604092` VALUES ('15', '科技文献检索', '10', '3', '4', '4', '7', '8', '35-612', '刘原');
INSERT INTO `1604092` VALUES ('16', '操作系统', '16', '5', '6', '4', '8', '18', '36-201', '屠菁');
INSERT INTO `1604092` VALUES ('17', '计算机组成与结构', '8', '1', '2', '5', '3', '16', '36-201', '张向东');
INSERT INTO `1604092` VALUES ('18', '计算机组成与结构', '10', '3', '4', '5', '12', '14', '36-401', '刘洁群');
INSERT INTO `1604092` VALUES ('19', 'JavaEE技术', '14', '5', '6', '5', '12', '17', '36-610', '夏竹青');
INSERT INTO `1604092` VALUES ('20', '科技文献检索', '14', '5', '6', '5', '3', '8', '35-203', '刘原');
-- ----------------------------
-- Table structure for 1604093
-- ----------------------------
DROP TABLE IF EXISTS `1604093`;
CREATE TABLE `1604093` (
`ctid` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`shour` int(255) DEFAULT NULL,
`stime` int(11) DEFAULT NULL,
`etime` int(11) DEFAULT NULL,
`week` int(255) DEFAULT NULL,
`sweek` int(255) DEFAULT NULL,
`eweek` int(255) DEFAULT NULL,
`place` varchar(255) DEFAULT NULL,
`teacher` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ctid`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of 1604093
-- ----------------------------
INSERT INTO `1604093` VALUES ('1', 'JavaEE技术', '8', '1', '2', '1', '12', '17', '36-610', '夏竹青');
INSERT INTO `1604093` VALUES ('2', '软件分析与设计', '8', '1', '2', '1', '3', '11', '35-203', '张家锐');
INSERT INTO `1604093` VALUES ('3', '操作系统', '10', '3', '4', '1', '13', '18', '36-606', '崔海莉');
INSERT INTO `1604093` VALUES ('4', '计算机组成与结构', '14', '5', '6', '1', '15', '16', '36-401', '刘洁群');
INSERT INTO `1604093` VALUES ('5', '计算方法', '14', '5', '6', '1', '3', '14', '36-1JT', '谢进');
INSERT INTO `1604093` VALUES ('6', '计算机组成与结构', '16', '7', '8', '1', '15', '16', '36-401', '刘洁群');
INSERT INTO `1604093` VALUES ('7', '软件分析与设计', '16', '7', '8', '1', '4', '12', '36-608', '张家锐');
INSERT INTO `1604093` VALUES ('8', 'JavaEE技术', '8', '1', '2', '2', '11', '18', '36-201', '许强');
INSERT INTO `1604093` VALUES ('9', '操作系统', '10', '3', '4', '2', '8', '18', '35-412', '屠菁');
INSERT INTO `1604093` VALUES ('10', '计算方法', '8', '1', '2', '3', '3', '14', '36-1JT', '谢进');
INSERT INTO `1604093` VALUES ('11', '计算机组成与结构', '14', '5', '6', '3', '3', '16', '35-409', '张向东');
INSERT INTO `1604093` VALUES ('12', '软件分析与设计', '16', '7', '8', '3', '3', '11', '36-210', '张家锐');
INSERT INTO `1604093` VALUES ('13', 'JavaEE技术', '8', '1', '2', '4', '12', '18', '36-610', '夏竹青');
INSERT INTO `1604093` VALUES ('14', '软件分析与设计', '8', '1', '2', '4', '4', '11', '36-608', '张家锐');
INSERT INTO `1604093` VALUES ('15', 'JavaEE技术', '10', '3', '4', '4', '11', '17', '35-203', '许强');
INSERT INTO `1604093` VALUES ('16', '计算机组成与结构', '14', '5', '6', '4', '12', '14', '36-401', '刘洁群');
INSERT INTO `1604093` VALUES ('17', '操作系统', '16', '7', '8', '4', '8', '18', '36-201', '屠菁');
INSERT INTO `1604093` VALUES ('18', '计算机组成与结构', '8', '1', '2', '5', '3', '16', '36-201', '张向东');
INSERT INTO `1604093` VALUES ('19', '科技文献检索', '14', '5', '6', '5', '3', '8', '35-203', '刘原');
INSERT INTO `1604093` VALUES ('20', '科技文献检索', '16', '7', '8', '5', '7', '8', '35-612', '刘原');
-- ----------------------------
-- Table structure for 1604101
-- ----------------------------
DROP TABLE IF EXISTS `1604101`;
CREATE TABLE `1604101` (
`ctid` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`shour` int(255) DEFAULT NULL,
`stime` int(11) DEFAULT NULL,
`etime` int(11) DEFAULT NULL,
`week` int(255) DEFAULT NULL,
`sweek` int(255) DEFAULT NULL,
`eweek` int(255) DEFAULT NULL,
`place` varchar(255) DEFAULT NULL,
`teacher` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ctid`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of 1604101
-- ----------------------------
INSERT INTO `1604101` VALUES ('1', '信息与网络安全', '8', '1', '2', '1', '3', '10', '36-206', '汪彩梅');
INSERT INTO `1604101` VALUES ('2', '息与网络安全', '14', '5', '6', '1', '6', '11', '36-501', '汪彩梅');
INSERT INTO `1604101` VALUES ('3', '信息与网络安全', '16', '7', '8', '1', '6', '11', '36-501', '汪彩梅');
INSERT INTO `1604101` VALUES ('4', 'Web应用系统开发', '8', '1', '2', '2', '9', '15', '36-206', '王骏');
INSERT INTO `1604101` VALUES ('5', 'Web应用系统开发', '10', '3', '4', '2', '10', '16', '36-503', '王骏');
INSERT INTO `1604101` VALUES ('6', '网络系统管理', '14', '5', '6', '2', '6', '12', '35-204', '陈华超');
INSERT INTO `1604101` VALUES ('7', '网络系统管理', '16', '7', '8', '2', '8', '14', '36-501', '陈华超');
INSERT INTO `1604101` VALUES ('8', '高级网络技术', '8', '1', '2', '3', '6', '12', '36-206', '陈华超');
INSERT INTO `1604101` VALUES ('9', '信息与网络安全', '10', '3', '4', '3', '3', '10', '35-204', '汪彩梅');
INSERT INTO `1604101` VALUES ('10', '高级网络技术', '14', '5', '6', '3', '8', '13', '36-506', '陈华超');
INSERT INTO `1604101` VALUES ('11', '高级网络技术', '16', '7', '8', '3', '13', '13', '36-506', '陈华超');
INSERT INTO `1604101` VALUES ('12', '网络系统管理', '8', '1', '2', '4', '6', '12', '35-204', '陈华超');
INSERT INTO `1604101` VALUES ('13', 'Web应用系统开发', '10', '3', '4', '4', '9', '15', '36-206', '王骏');
INSERT INTO `1604101` VALUES ('14', 'Web应用系统开发', '10', '3', '4', '5', '10', '16', '36-503', '王骏');
INSERT INTO `1604101` VALUES ('15', '高级网络技术', '16', '7', '8', '5', '6', '12', '35-204', '陈华超');
-- ----------------------------
-- Table structure for 1704011
-- ----------------------------
DROP TABLE IF EXISTS `1704011`;
CREATE TABLE `1704011` (
`ctid` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`shour` int(255) DEFAULT NULL,
`stime` int(11) DEFAULT NULL,
`etime` int(11) DEFAULT NULL,
`week` int(255) DEFAULT NULL,
`sweek` int(255) DEFAULT NULL,
`eweek` int(255) DEFAULT NULL,
`place` varchar(255) DEFAULT NULL,
`teacher` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ctid`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of 1704011
-- ----------------------------
INSERT INTO `1704011` VALUES ('1', '数字电子技术试验', '8', '1', '2', '1', '11', '18', '42-501', '董海燕');
INSERT INTO `1704011` VALUES ('2', '数字逻辑', '14', '5', '6', '1', '3', '16', '36-105', '龙夏');
INSERT INTO `1704011` VALUES ('3', '大学物理B', '16', '7', '8', '1', '3', '16', '35-406', '盛建军');
INSERT INTO `1704011` VALUES ('4', '面向对象程序设计(A教学班)', '14', '5', '6', '2', '5', '18', '36-408', '吴瀛');
INSERT INTO `1704011` VALUES ('5', '离散数学', '10', '3', '4', '2', '3', '16', '36-105', '胡萍');
INSERT INTO `1704011` VALUES ('7', '大学物理B', '10', '3', '4', '3', '3', '16', '35-406', '盛建军');
INSERT INTO `1704011` VALUES ('8', '数字逻辑', '14', '5', '6', '3', '3', '16', '36-105', '龙夏');
INSERT INTO `1704011` VALUES ('9', '大学物理B', '14', '5', '6', '4', '15', '18', '37-604', '王向川');
INSERT INTO `1704011` VALUES ('10', '离散数学', '14', '5', '6', '4', '3', '14', '36-105', '胡萍');
INSERT INTO `1704011` VALUES ('11', '大学物理B', '16', '7', '8', '4', '15', '18', '37-604', '王向川');
INSERT INTO `1704011` VALUES ('12', '面向对象程序设计', '18', '9', '10', '2', '3', '16', '36-201', '吴瀛');
INSERT INTO `1704011` VALUES ('13', '离散数学', '8', '1', '2', '5', '15', '16', '36-105', '胡萍');
INSERT INTO `1704011` VALUES ('14', '离散数学', '10', '3', '4', '5', '13', '16', '36-408', '张琛');
INSERT INTO `1704011` VALUES ('15', '离散数学', '10', '3', '4', '5', '3', '6', '36-105', '胡萍');
INSERT INTO `1704011` VALUES ('16', '中国近现代史纲要', '14', '5', '6', '5', '3', '19', '35-401', '蔡传斌');
-- ----------------------------
-- Table structure for 1704012
-- ----------------------------
DROP TABLE IF EXISTS `1704012`;
CREATE TABLE `1704012` (
`ctid` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`shour` int(255) DEFAULT NULL,
`stime` int(11) DEFAULT NULL,
`etime` int(11) DEFAULT NULL,
`week` int(255) DEFAULT NULL,
`sweek` int(255) DEFAULT NULL,
`eweek` int(255) DEFAULT NULL,
`place` varchar(255) DEFAULT NULL,
`teacher` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ctid`)
) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of 1704012
-- ----------------------------
INSERT INTO `1704012` VALUES ('1', '数字电子技术试验', '10', '3', '4', '1', '11', '18', '42-501', '董海燕');
INSERT INTO `1704012` VALUES ('2', '数字逻辑', '14', '5', '6', '1', '3', '16', '36-105', '龙夏');
INSERT INTO `1704012` VALUES ('3', '大学物理B', '16', '7', '8', '1', '3', '16', '35-406', '盛建军');
INSERT INTO `1704012` VALUES ('4', '离散数学', '10', '3', '4', '2', '3', '16', '36-105', '胡萍');
INSERT INTO `1704012` VALUES ('5', '面向对象程序设计', '16', '7', '8', '2', '5', '16', '36-606', '吴瀛');
INSERT INTO `1704012` VALUES ('6', '大学物理B', '10', '3', '4', '3', '3', '16', '35-406', '盛建军');
INSERT INTO `1704012` VALUES ('7', '数字逻辑', '14', '5', '6', '3', '3', '16', '36-105', '龙夏');
INSERT INTO `1704012` VALUES ('8', '离散数学', '8', '1', '2', '4', '13', '16', '36-408', '张琛');
INSERT INTO `1704012` VALUES ('9', '面向对象程序设计', '10', '3', '4', '4', '13', '16', '36-408', '吴瀛');
INSERT INTO `1704012` VALUES ('10', '大学物理B', '14', '5', '6', '4', '15', '18', '37-601', '程玮');
INSERT INTO `1704012` VALUES ('11', '离散数学', '14', '5', '6', '4', '3', '14', '36-105', '胡萍');
INSERT INTO `1704012` VALUES ('12', '大学物理B', '16', '7', '8', '4', '15', '18', '37-601', '程玮');
INSERT INTO `1704012` VALUES ('13', '面向对象程序设计', '18', '9', '10', '2', '3', '16', '36-201', '吴瀛');
INSERT INTO `1704012` VALUES ('14', '离散数学', '8', '1', '2', '5', '15', '16', '36-105', '胡萍');
INSERT INTO `1704012` VALUES ('15', '离散数学', '10', '3', '4', '5', '3', '6', '36-105', '胡萍');
INSERT INTO `1704012` VALUES ('16', '中国近现代史纲要', '14', '5', '6', '5', '3', '19', '35-401', '蔡传斌');
INSERT INTO `1704012` VALUES ('33', '面向对象程序设计', '16', '7', '8', '2', '17', '18', '36机房', '吴瀛');
-- ----------------------------
-- Table structure for 1704031
-- ----------------------------
DROP TABLE IF EXISTS `1704031`;
CREATE TABLE `1704031` (
`ctid` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`shour` int(255) DEFAULT NULL,
`stime` int(11) DEFAULT NULL,
`etime` int(11) DEFAULT NULL,
`week` int(255) DEFAULT NULL,
`sweek` int(255) DEFAULT NULL,
`eweek` int(255) DEFAULT NULL,
`place` varchar(255) DEFAULT NULL,
`teacher` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ctid`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of 1704031
-- ----------------------------
INSERT INTO `1704031` VALUES ('1', '大学物理B', '8', '1', '2', '1', '3', '16', '35-204', '盛建军');
INSERT INTO `1704031` VALUES ('2', '数字逻辑', '10', '3', '4', '1', '15', '18', '36-3JT', '肖连军');
INSERT INTO `1704031` VALUES ('3', '数据结构与算法', '10', '3', '4', '1', '3', '14', '36-503', '吕刚');
INSERT INTO `1704031` VALUES ('4', '计算机网络基础', '14', '5', '6', '1', '9', '18', '35-212', '陈艳平');
INSERT INTO `1704031` VALUES ('5', '数据结构与算法', '16', '7', '8', '1', '1', '16', '41-2JT', '吕刚');
INSERT INTO `1704031` VALUES ('6', '工程应用数学D', '8', '1', '2', '2', '1', '12', '37-2JT', '丁雁清');
INSERT INTO `1704031` VALUES ('7', '大学英语Ⅲ', '10', '3', '4', '2', '1', '12', '35-204', '王玉芳');
INSERT INTO `1704031` VALUES ('8', '数字电子技术实验', '10', '3', '4', '2', '13', '16', '42-501', '董海燕');
INSERT INTO `1704031` VALUES ('9', '计算机网络基础', '10', '3', '4', '2', '18', '18', '36-204', '陈艳平');
INSERT INTO `1704031` VALUES ('10', '大学物理B', '8', '1', '2', '3', '3', '16', '35-204', '盛建军');
INSERT INTO `1704031` VALUES ('11', '数据结构与算法', '10', '3', '4', '3', '3', '14', '36-503', '吕刚');
INSERT INTO `1704031` VALUES ('12', '大学英语Ⅲ', '14', '5', '6', '3', '1', '16', '35-504', '王玉芳');
INSERT INTO `1704031` VALUES ('13', '数字逻辑', '16', '7', '8', '3', '9', '18', '41-2JT', '肖连军');
INSERT INTO `1704031` VALUES ('14', '数据结构与算法', '8', '1', '2', '4', '1', '16', '41-2JT', '吕刚');
INSERT INTO `1704031` VALUES ('15', '工程应用数学D', '10', '3', '4', '4', '1', '12', '37-2JT', '丁雁清');
INSERT INTO `1704031` VALUES ('16', '大学物理B', '14', '5', '6', '4', '2', '4', '37-605', '徐琳');
INSERT INTO `1704031` VALUES ('17', '大学物理B', '16', '7', '8', '4', '2', '4', '37-605', '徐琳');
INSERT INTO `1704031` VALUES ('18', '大学物理B', '14', '5', '6', '4', '6', '6', '37-605', '徐琳');
INSERT INTO `1704031` VALUES ('19', '大学物理B', '16', '7', '8', '4', '6', '6', '37-605', '徐琳');
INSERT INTO `1704031` VALUES ('20', '数字逻辑', '8', '1', '2', '5', '9', '18', '41-2JT', '肖连军');
INSERT INTO `1704031` VALUES ('21', '计算机网络基础', '10', '3', '4', '5', '12', '18', '36-508', '陈艳平');
INSERT INTO `1704031` VALUES ('22', '计算机网络基础', '14', '5', '6', '5', '9', '18', '35-212', '陈艳平');
INSERT INTO `1704031` VALUES ('23', '中国近现代史纲要', '16', '7', '8', '5', '3', '19', '36-1JT', '蔡传斌');
-- ----------------------------
-- Table structure for 1704081
-- ----------------------------
DROP TABLE IF EXISTS `1704081`;
CREATE TABLE `1704081` (
`ctid` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`shour` int(255) DEFAULT NULL,
`stime` int(11) DEFAULT NULL,
`etime` int(11) DEFAULT NULL,
`week` int(255) DEFAULT NULL,
`sweek` int(255) DEFAULT NULL,
`eweek` int(255) DEFAULT NULL,
`place` varchar(255) DEFAULT NULL,
`teacher` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ctid`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of 1704081
-- ----------------------------
INSERT INTO `1704081` VALUES ('1', '计算机专业英语', '10', '3', '4', '1', '3', '9', '35-204', '孙成贵');
INSERT INTO `1704081` VALUES ('2', '单片机原理与应用', '14', '5', '6', '1', '4', '10', '36-408', '肖连军');
INSERT INTO `1704081` VALUES ('3', '单片机原理与应用', '16', '7', '8', '1', '3', '9', '36-204', '肖连军');
INSERT INTO `1704081` VALUES ('4', 'Web应用系统开发', '8', '1', '2', '2', '3', '9', '35-204', '张弛');
INSERT INTO `1704081` VALUES ('5', 'Android嵌入式软件开发', '10', '3', '4', '2', '4', '10', '36-408', '孙欣欣');
INSERT INTO `1704081` VALUES ('6', 'Web应用系统开发', '10', '3', '4', '3', '4', '10', '36-401', '张弛');
INSERT INTO `1704081` VALUES ('7', 'Android嵌入式软件开发', '16', '7', '8', '3', '3', '9', '36-204', '王立新');
INSERT INTO `1704081` VALUES ('8', 'Web应用系统开发', '10', '3', '4', '4', '3', '9', '35-204', '张弛');
INSERT INTO `1704081` VALUES ('9', '计算机专业英语', '14', '5', '6', '4', '3', '9', '35-204', '孙成贵');
INSERT INTO `1704081` VALUES ('10', '单片机原理与应用', '16', '7', '8', '4', '3', '9', '36-204', '肖连军');
INSERT INTO `1704081` VALUES ('11', 'Android嵌入式软件开发', '14', '5', '6', '5', '3', '9', '36-204', '王立新');
-- ----------------------------
-- Table structure for 1704091
-- ----------------------------
DROP TABLE IF EXISTS `1704091`;
CREATE TABLE `1704091` (
`ctid` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`shour` int(255) DEFAULT NULL,
`stime` int(11) DEFAULT NULL,
`etime` int(11) DEFAULT NULL,
`week` int(255) DEFAULT NULL,
`sweek` int(255) DEFAULT NULL,
`eweek` int(255) DEFAULT NULL,
`place` varchar(255) DEFAULT NULL,
`teacher` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ctid`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of 1704091
-- ----------------------------
INSERT INTO `1704091` VALUES ('1', '离散结构', '8', '1', '2', '1', '3', '18', '35-406', '华珊珊');
INSERT INTO `1704091` VALUES ('2', '离散结构', '10', '3', '4', '1', '15', '18', '36-403', '华珊珊');
INSERT INTO `1704091` VALUES ('3', '大学物理B', '14', '5', '6', '1', '3', '16', '35-401', '盛建军');
INSERT INTO `1704091` VALUES ('4', '电路与数字系统I', '14', '5', '6', '2', '3', '18', '35-212', '吴剑威');
INSERT INTO `1704091` VALUES ('5', '数据结构与算法', '10', '3', '4', '2', '3', '18', '36-3JT', '李红');
INSERT INTO `1704091` VALUES ('6', '电路与模拟电子技术实验', '10', '3', '4', '3', '9', '16', '42-505', '杨特育/董海燕');
INSERT INTO `1704091` VALUES ('7', '大学物理B', '14', '7', '8', '3', '3', '16', '35-401', '盛建军');
INSERT INTO `1704091` VALUES ('8', '大学物理B', '8', '1', '2', '4', '11', '14', '37-602', '孙赟');
INSERT INTO `1704091` VALUES ('9', '大学物理B', '10', '3', '4', '4', '11', '14', '37-602', '孙赟');
INSERT INTO `1704091` VALUES ('10', '电路与数字系统I', '14', '5', '6', '4', '3', '18', '35-212', '吴剑威');
INSERT INTO `1704091` VALUES ('11', '离散结构', '8', '1', '2', '5', '3', '18', '35-403', '华珊珊');
INSERT INTO `1704091` VALUES ('12', '数据结构与算法', '10', '3', '4', '5', '4', '10', '36-606', '李红');
INSERT INTO `1704091` VALUES ('13', '数据结构与算法', '10', '3', '4', '5', '12', '13', '36-606', '李红');
INSERT INTO `1704091` VALUES ('14', '数据结构与算法', '10', '3', '4', '5', '15', '17', '36-606', '李红');
INSERT INTO `1704091` VALUES ('15', '数据结构与算法', '14', '5', '6', '5', '3', '18', '36-201', '李红');
INSERT INTO `1704091` VALUES ('16', '中国近现代史纲要', '16', '7', '8', '5', '3', '19', '36-1JT', '蔡传斌');
-- ----------------------------
-- Table structure for 1704092
-- ----------------------------
DROP TABLE IF EXISTS `1704092`;
CREATE TABLE `1704092` (
`ctid` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`shour` int(255) DEFAULT NULL,
`stime` int(11) DEFAULT NULL,
`etime` int(11) DEFAULT NULL,
`week` int(255) DEFAULT NULL,
`sweek` int(255) DEFAULT NULL,
`eweek` int(255) DEFAULT NULL,
`place` varchar(255) DEFAULT NULL,
`teacher` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ctid`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of 1704092
-- ----------------------------
INSERT INTO `1704092` VALUES ('1', '离散结构', '8', '1', '2', '1', '3', '18', '35-406', '华珊珊');
INSERT INTO `1704092` VALUES ('2', '数据结构与算法', '10', '3', '4', '1', '4', '10', '36-508', '李红');
INSERT INTO `1704092` VALUES ('3', '大学物理B', '14', '5', '6', '1', '3', '16', '35-401', '盛建军');
INSERT INTO `1704092` VALUES ('4', '电路与数字系统I', '16', '7', '8', '1', '3', '18', '35-409', '刘振华');
INSERT INTO `1704092` VALUES ('5', '数据结构与算法', '10', '3', '4', '1', '12', '13', '36-508', '李红');
INSERT INTO `1704092` VALUES ('6', '数据结构与算法', '10', '3', '4', '1', '15', '17', '36-508', '李红');
INSERT INTO `1704092` VALUES ('7', '数据结构与算法', '10', '3', '4', '2', '3', '18', '36-3JT', '李红');
INSERT INTO `1704092` VALUES ('8', '电路与模拟电子技术实验', '8', '1', '2', '3', '9', '16', '42-505', '董海燕/杨特育');
INSERT INTO `1704092` VALUES ('9', '大学物理B', '14', '5', '6', '3', '3', '16', '35-401', '盛建军');
INSERT INTO `1704092` VALUES ('10', '大学物理B', '8', '1', '2', '4', '11', '14', '37-603', '朱守金');
INSERT INTO `1704092` VALUES ('11', '大学物理B', '10', '3', '4', '4', '11', '14', '37-603', '朱守金');
INSERT INTO `1704092` VALUES ('12', '电路与数字系统I', '14', '5', '6', '2', '3', '18', '35-212', '吴剑威');
INSERT INTO `1704092` VALUES ('13', '离散结构', '8', '1', '2', '5', '3', '18', '35-403', '华珊珊');
INSERT INTO `1704092` VALUES ('14', '离散结构', '10', '3', '4', '5', '15', '18', '36-603', '华珊珊');
INSERT INTO `1704092` VALUES ('15', '数据结构与算法', '10', '3', '4', '1', '3', '18', '36-201', '李红');
INSERT INTO `1704092` VALUES ('16', '中国近现代史纲要', '16', '7', '8', '5', '3', '19', '36-1JT', '蔡传斌');
-- ----------------------------
-- Table structure for 1704101
-- ----------------------------
DROP TABLE IF EXISTS `1704101`;
CREATE TABLE `1704101` (
`ctid` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`shour` int(255) DEFAULT NULL,
`stime` int(11) DEFAULT NULL,
`etime` int(11) DEFAULT NULL,
`week` int(255) DEFAULT NULL,
`sweek` int(255) DEFAULT NULL,
`eweek` int(255) DEFAULT NULL,
`place` varchar(255) DEFAULT NULL,
`teacher` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ctid`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of 1704101
-- ----------------------------
INSERT INTO `1704101` VALUES ('1', '韩语强化(精读)', '8', '1', '2', '1', '1', '18', '36-202', '袁梦夏');
INSERT INTO `1704101` VALUES ('2', '计算机网络基础', '10', '3', '4', '1', '10', '18', '36-105', '郭昌建');
INSERT INTO `1704101` VALUES ('3', '计算机网络基础', '14', '5', '6', '1', '11', '17', '36-508', '郭昌建');
INSERT INTO `1704101` VALUES ('4', '计算机网络基础', '16', '7', '8', '1', '9', '9', '35-403', '郭昌建');
INSERT INTO `1704101` VALUES ('5', '韩语强化(精读)', '8', '1', '2', '2', '1', '18', '36-202', '袁梦夏');
INSERT INTO `1704101` VALUES ('6', ' 韩语强化(听力口语)', '10', '3', '4', '2', '1', '18', '36-202', '尹憙桢');
INSERT INTO `1704101` VALUES ('7', '韩语强化(精读)', '8', '1', '2', '3', '1', '18', '36-202', '娄蔷薇');
INSERT INTO `1704101` VALUES ('8', '韩语强化(听力口语', '10', '3', '4', '3', '1', '18', '36-202', '尹憙桢');
INSERT INTO `1704101` VALUES ('9', '韩语强化(阅读与写作)', '14', '5', '6', '3', '1', '18', '36-202', '沈萍');
INSERT INTO `1704101` VALUES ('10', '程序设计语言I', '16', '7', '8', '3', '1', '11', '36-1JT', '章义刚');
INSERT INTO `1704101` VALUES ('11', '韩语强化(精读)', '8', '1', '2', '4', '1', '18', '36-202', '娄蔷薇');
INSERT INTO `1704101` VALUES ('12', '韩语强化(阅读与写作)', '10', '3', '4', '4', '1', '18', '36-202', '沈萍');
INSERT INTO `1704101` VALUES ('13', '程序设计语言I◇(A教学班)', '14', '5', '6', '4', '3', '10', '36-506', '章义刚');
INSERT INTO `1704101` VALUES ('14', '程序设计语言I', '14', '5', '5', '4', '11', '11', '36-506', '章义刚');
INSERT INTO `1704101` VALUES ('15', '程序设计语言I', '8', '1', '2', '5', '3', '11', '36-506', '章义刚');
INSERT INTO `1704101` VALUES ('16', '程序设计语言I', '10', '3', '4', '5', '1', '10', '36-1JT', '章义刚');
INSERT INTO `1704101` VALUES ('17', '计算机网络基础', '14', '5', '6', '5', '9', '18', '35-203', '郭昌建');
INSERT INTO `1704101` VALUES ('18', '计算机网络基础', '16', '7', '8', '5', '18', '18', '36-105', '郭昌建');
-- ----------------------------
-- Table structure for 1704102
-- ----------------------------
DROP TABLE IF EXISTS `1704102`;
CREATE TABLE `1704102` (
`ctid` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`shour` int(255) DEFAULT NULL,
`stime` int(11) DEFAULT NULL,
`etime` int(11) DEFAULT NULL,
`week` int(255) DEFAULT NULL,
`sweek` int(255) DEFAULT NULL,
`eweek` int(255) DEFAULT NULL,
`place` varchar(255) DEFAULT NULL,
`teacher` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ctid`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of 1704102
-- ----------------------------
INSERT INTO `1704102` VALUES ('1', '韩语强化(精读)', '8', '1', '2', '1', '10', '18', '36-106', '娄蔷薇');
INSERT INTO `1704102` VALUES ('2', '韩语强化(精读)', '10', '3', '4', '1', '1', '9', '36-106', '徐佳');
INSERT INTO `1704102` VALUES ('3', '计算机网络基础', '10', '3', '4', '1', '10', '18', '36-105', '郭昌建');
INSERT INTO `1704102` VALUES ('4', '韩语强化(听力口语)', '14', '5', '6', '1', '1', '18', '36-106', '罗允善');
INSERT INTO `1704102` VALUES ('5', '计算机网络基础', '16', '7', '8', '1', '9', '9', '35-403', '郭昌建');
INSERT INTO `1704102` VALUES ('6', '韩语强化(精读)', '8', '1', '2', '2', '10', '18', '36-106', '娄蔷薇');
INSERT INTO `1704102` VALUES ('7', '韩语强化(精读)', '10', '3', '4', '2', '1', '9', '36-106', '徐佳');
INSERT INTO `1704102` VALUES ('8', '计算机网络基础', '10', '3', '4', '2', '11', '17', '36-508', '郭昌建');
INSERT INTO `1704102` VALUES ('9', '程序设计语言I', '16', '7', '8', '2', '3', '10', '36-506', '芮辰');
INSERT INTO `1704102` VALUES ('10', '程序设计语言I', '16', '7', '7', '2', '11', '11', '36-506', '芮辰');
INSERT INTO `1704102` VALUES ('11', '韩语强化(阅读与写作)', '8', '1', '2', '3', '1', '18', '36-106', '张海卿');
INSERT INTO `1704102` VALUES ('12', '韩语强化(精读)', '10', '3', '4', '3', '1', '9', '36-106', '徐佳');
INSERT INTO `1704102` VALUES ('13', '韩语强化(精读)', '10', '3', '4', '3', '10', '18', '36-106', '娄蔷薇');
INSERT INTO `1704102` VALUES ('14', '韩语强化(听力口语)', '14', '5', '6', '3', '1', '18', '36-106', '罗允善');
INSERT INTO `1704102` VALUES ('15', '程序设计语言I', '16', '7', '8', '3', '1', '11', '36-1JT', '章义刚');
INSERT INTO `1704102` VALUES ('16', '韩语强化(阅读与写作)', '8', '1', '2', '4', '1', '18', '36-106', '张海卿');
INSERT INTO `1704102` VALUES ('17', '程序设计语言I', '10', '3', '4', '4', '3', '11', '36-506', '芮辰');
INSERT INTO `1704102` VALUES ('18', '韩语强化(精读)', '8', '1', '2', '5', '1', '9', '36-106', '徐佳');
INSERT INTO `1704102` VALUES ('19', '韩语强化(精读)', '8', '1', '2', '5', '10', '18', '36-106', '娄蔷薇');
INSERT INTO `1704102` VALUES ('20', '程序设计语言I', '10', '3', '4', '5', '1', '10', '36-1JT', '章义刚');
INSERT INTO `1704102` VALUES ('21', '计算机网络基础', '14', '5', '6', '5', '9', '18', '35-203', '郭昌建');
INSERT INTO `1704102` VALUES ('22', '计算机网络基础', '16', '7', '8', '5', '18', '18', '36-105', '郭昌建');
-- ----------------------------
-- Table structure for 1704111
-- ----------------------------
DROP TABLE IF EXISTS `1704111`;
CREATE TABLE `1704111` (
`ctid` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`shour` int(255) DEFAULT NULL,
`stime` int(11) DEFAULT NULL,
`etime` int(11) DEFAULT NULL,
`week` int(255) DEFAULT NULL,
`sweek` int(255) DEFAULT NULL,
`eweek` int(255) DEFAULT NULL,
`place` varchar(255) DEFAULT NULL,
`teacher` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ctid`)
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of 1704111
-- ----------------------------
INSERT INTO `1704111` VALUES ('1', '德语强化 3A', '8', '1', '2', '1', '1', '4', '16-303', '刘小瑀');
INSERT INTO `1704111` VALUES ('2', '德语强化 3A', '8', '1', '2', '1', '6', '18', '16-303', '刘小瑀');
INSERT INTO `1704111` VALUES ('3', '德语强化 3C', '10', '3', '4', '1', '1', '4', '16-303', '刘小瑀');
INSERT INTO `1704111` VALUES ('4', '德语强化 3C', '10', '3', '4', '1', '6', '18', '16-303', '刘小瑀');
INSERT INTO `1704111` VALUES ('5', '德语强化 3B', '14', '5', '6', '1', '1', '4', '16-303', 'Josef Witte');
INSERT INTO `1704111` VALUES ('6', '德语强化 3B', '14', '5', '6', '1', '6', '18', '16-303', 'Josef Witte');
INSERT INTO `1704111` VALUES ('7', '工程应用数学C(2+3)', '8', '1', '2', '2', '1', '12', '5-105', '康素玲');
INSERT INTO `1704111` VALUES ('8', '德语强化 3A', '10', '3', '4', '2', '1', '4', '16-303', '刘小瑀');
INSERT INTO `1704111` VALUES ('9', '德语强化 3A', '10', '3', '4', '2', '6', '18', '16-303', '刘小瑀');
INSERT INTO `1704111` VALUES ('10', '德语强化 3B', '14', '5', '6', '2', '1', '4', '16-303', 'Josef Witte');
INSERT INTO `1704111` VALUES ('11', '德语强化 3B', '14', '5', '6', '2', '6', '18', '16-303', 'Josef Witte');
INSERT INTO `1704111` VALUES ('12', '德语强化 3C', '8', '1', '2', '3', '16', '18', '16-303', '刘小瑀');
INSERT INTO `1704111` VALUES ('13', '大学物理B', '8', '1', '2', '3', '2', '4', '37-610', '夏传鸿');
INSERT INTO `1704111` VALUES ('14', '德语强化 3A', '8', '1', '2', '3', '6', '8', '16-303', '刘小瑀');
INSERT INTO `1704111` VALUES ('15', '德语强化 3B', '8', '1', '2', '3', '9', '11', '16-303', 'Josef Witte');
INSERT INTO `1704111` VALUES ('16', '大学物理B', '10', '3', '4', '3', '2', '4', '37-610', '夏传鸿');
INSERT INTO `1704111` VALUES ('17', '德语强化 3C', '14', '5', '6', '3', '1', '4', '16-103', '刘小瑀');
INSERT INTO `1704111` VALUES ('18', '大学物理B', '16', '7', '8', '3', '1', '14', '1-103', '傅强');
INSERT INTO `1704111` VALUES ('19', '德语强化 3C', '14', '5', '6', '3', '6', '18', '16-303', '刘小瑀');
INSERT INTO `1704111` VALUES ('20', '中国近现代史纲要', '18', '9', '10', '2', '1', '6', '36-1JT', '姜从山');
INSERT INTO `1704111` VALUES ('21', '工程应用数学C', '8', '1', '2', '4', '1', '12', '5-105', '康素玲');
INSERT INTO `1704111` VALUES ('22', '德语强化 3A', '10', '3', '4', '4', '1', '4', '16-303', '刘小瑀');
INSERT INTO `1704111` VALUES ('23', '德语强化 3B', '14', '5', '6', '4', '1', '4', '36-204', 'Josef Witte');
INSERT INTO `1704111` VALUES ('24', '电工电子基础I', '18', '9', '10', '4', '3', '16', '36-204', '孔春华');
INSERT INTO `1704111` VALUES ('25', '德语强化 3A', '10', '3', '4', '4', '6', '18', '16-303', '刘小瑀');
INSERT INTO `1704111` VALUES ('26', '德语强化 3B', '14', '5', '6', '4', '6', '18', '16-303', 'Josef Witte');
INSERT INTO `1704111` VALUES ('27', '大学物理B', '8', '1', '2', '5', '1', '14', '1-103', '傅强');
INSERT INTO `1704111` VALUES ('28', '德语强化 3C', '10', '3', '4', '5', '1', '4', '16-303', '刘小瑀');
INSERT INTO `1704111` VALUES ('29', '德语强化 3C', '10', '3', '4', '5', '6', '18', '16-303', '刘小瑀');
INSERT INTO `1704111` VALUES ('30', '电工电子基础I', '10', '3', '4', '6', '3', '16', '36-204', '孔春华');
-- ----------------------------
-- Table structure for 1804011
-- ----------------------------
DROP TABLE IF EXISTS `1804011`;
CREATE TABLE `1804011` (
`ctid` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`shour` int(255) DEFAULT NULL,
`stime` int(11) DEFAULT NULL,
`etime` int(11) DEFAULT NULL,
`week` int(255) DEFAULT NULL,
`sweek` int(255) DEFAULT NULL,
`eweek` int(255) DEFAULT NULL,
`place` varchar(255) DEFAULT NULL,
`teacher` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ctid`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of 1804011
-- ----------------------------
INSERT INTO `1804011` VALUES ('1', '大学英语Ⅰ模块', '8', '1', '2', '1', '6', '18', '35-508', '汪武');
INSERT INTO `1804011` VALUES ('2', '工程应用数学C', '10', '3', '4', '1', '6', '17', '37-3jt', '王玉');
INSERT INTO `1804011` VALUES ('3', '大学生职业生涯规划', '14', '5', '6', '1', '16', '18', '35-203', '方淑颖');
INSERT INTO `1804011` VALUES ('4', '专业导论', '14', '5', '6', '1', '6', '9', '35-203', '何立新/项响琴/刘登胜/高玲玲/夏光峰');
INSERT INTO `1804011` VALUES ('5', '程序设计语言Ⅰ', '8', '1', '2', '2', '9', '17', '36-403', '杨超');
INSERT INTO `1804011` VALUES ('6', '工程应用数学A', '10', '3', '4', '2', '6', '19', '35-203', '刘国旗');
INSERT INTO `1804011` VALUES ('7', '思想道德修养与法律基础', '14', '5', '6', '2', '6', '16', '35-203', '王霞');
INSERT INTO `1804011` VALUES ('8', '计算机基础实践', '16', '7', '8', '2', '6', '15', '36-403', '庞京玉');
INSERT INTO `1804011` VALUES ('9', '大学生职业生涯规划', '8', '1', '2', '3', '16', '18', '35-203', '方淑颖');
INSERT INTO `1804011` VALUES ('10', '工程应用数学A', '10', '3', '4', '3', '6', '18', '35-203', '刘国旗');
INSERT INTO `1804011` VALUES ('11', '程序设计语言Ⅰ', '14', '5', '6', '3', '6', '15', '36-3jt', '项响琴');
INSERT INTO `1804011` VALUES ('12', '专业导论', '16', '7', '8', '3', '6', '8', '35-203', '何立新/项响琴/刘登胜/高玲玲/夏光峰');
INSERT INTO `1804011` VALUES ('13', '计算机基础实践', '8', '1', '2', '4', '6', '16', '36-403', '庞京玉');
INSERT INTO `1804011` VALUES ('14', '工程应用数学C', '10', '3', '4', '4', '6', '17', '37-3jt', '王玉');
INSERT INTO `1804011` VALUES ('15', '大学英语Ⅰ模块', '14', '5', '6', '4', '6', '18', '35-508', '汪武');
INSERT INTO `1804011` VALUES ('16', '大学生心理健康教育', '16', '7', '8', '4', '13', '19', '35-203', '孙启原');
INSERT INTO `1804011` VALUES ('17', '程序设计语言Ⅰ', '8', '1', '2', '5', '6', '16', '36-3jt', '项响琴');
INSERT INTO `1804011` VALUES ('18', '工程应用数学A', '10', '3', '4', '5', '6', '18', '35-203', '刘国旗');
INSERT INTO `1804011` VALUES ('19', '思想道德修养与法律基础', '14', '5', '6', '5', '6', '16', '37-2jt', '王霞');
INSERT INTO `1804011` VALUES ('20', '程序设计语言Ⅰ', '16', '7', '8', '5', '9', '16', '36-401', '杨超');
INSERT INTO `1804011` VALUES ('21', '大学英语Ⅰ模块', '8', '1', '2', '3', '6', '14', '36-201', '汪武');
-- ----------------------------
-- Table structure for 1804012
-- ----------------------------
DROP TABLE IF EXISTS `1804012`;
CREATE TABLE `1804012` (
`ctid` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`shour` int(255) DEFAULT NULL,
`stime` int(11) DEFAULT NULL,
`etime` int(11) DEFAULT NULL,
`week` int(255) DEFAULT NULL,
`sweek` int(255) DEFAULT NULL,
`eweek` int(255) DEFAULT NULL,
`place` varchar(255) DEFAULT NULL,
`teacher` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ctid`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of 1804012
-- ----------------------------
INSERT INTO `1804012` VALUES ('1', '程序设计语言Ⅰ', '8', '1', '2', '1', '9', '14', '36-403', '杨超');
INSERT INTO `1804012` VALUES ('2', '工程应用数学C', '10', '3', '4', '1', '6', '17', '37-3jt', '王玉');
INSERT INTO `1804012` VALUES ('3', ' 大学生职业生涯规划', '14', '5', '6', '1', '16', '18', '35-203', '方淑颖');
INSERT INTO `1804012` VALUES ('4', '专业导论', '14', '5', '6', '1', '6', '9', '35-203', '何立新/项响琴/刘登胜/高玲玲/夏光峰');
INSERT INTO `1804012` VALUES ('5', '大学英语Ⅰ模块', '8', '1', '2', '2', '6', '18', '35-510', '汪武');
INSERT INTO `1804012` VALUES ('6', '工程应用数学A', '10', '3', '4', '2', '6', '19', '35-203', '刘国旗');
INSERT INTO `1804012` VALUES ('7', '思想道德修养与法律基础', '14', '5', '6', '2', '6', '16', '35-206', '金丽');
INSERT INTO `1804012` VALUES ('8', '程序设计语言Ⅰ', '16', '7', '8', '2', '9', '16', '36-401', '杨超');
INSERT INTO `1804012` VALUES ('9', '大学生职业生涯规划', '8', '1', '2', '3', '16', '18', '35-203', '方淑颖');
INSERT INTO `1804012` VALUES ('10', '大学英语Ⅰ模块', '8', '1', '2', '3', '6', '14', '36-201', '汪武');
INSERT INTO `1804012` VALUES ('11', '工程应用数学A', '10', '3', '4', '3', '6', '18', '35-203', '刘国旗');
INSERT INTO `1804012` VALUES ('12', '程序设计语言Ⅰ', '14', '5', '6', '3', '6', '15', '36-3jt', '项响琴');
INSERT INTO `1804012` VALUES ('13', '专业导论', '16', '7', '8', '3', '6', '8', '35-203', '何立新/项响琴/刘登胜/高玲玲/夏光峰');
INSERT INTO `1804012` VALUES ('14', '大学英语Ⅰ模块', '8', '1', '2', '4', '6', '18', '35-508', '汪武');
INSERT INTO `1804012` VALUES ('15', '工程应用数学C', '10', '3', '4', '4', '6', '17', '37-3jt', '王玉');
INSERT INTO `1804012` VALUES ('16', '计算机基础实践', '14', '5', '6', '4', '6', '16', '36-508', '庞京玉');
INSERT INTO `1804012` VALUES ('17', '大学生心理健康教育', '16', '7', '8', '4', '13', '19', '35-203', '孙启原');
INSERT INTO `1804012` VALUES ('18', '程序设计语言Ⅰ', '8', '1', '2', '5', '6', '16', '36-3jt', '项响琴');
INSERT INTO `1804012` VALUES ('19', '工程应用数学A', '10', '3', '4', '5', '6', '18', '35-203', '刘国旗');
INSERT INTO `1804012` VALUES ('20', ' 思想道德修养与法律基础', '14', '5', '6', '5', '6', '16', '35-409', '金丽');
INSERT INTO `1804012` VALUES ('21', '计算机基础实践', '16', '7', '8', '5', '6', '15', '36-508', '庞京玉');
-- ----------------------------
-- Table structure for 1804031
-- ----------------------------
DROP TABLE IF EXISTS `1804031`;
CREATE TABLE `1804031` (
`ctid` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`shour` int(255) DEFAULT NULL,
`stime` int(11) DEFAULT NULL,
`etime` int(11) DEFAULT NULL,
`week` int(255) DEFAULT NULL,
`sweek` int(255) DEFAULT NULL,
`eweek` int(255) DEFAULT NULL,
`place` varchar(255) DEFAULT NULL,
`teacher` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ctid`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of 1804031
-- ----------------------------
INSERT INTO `1804031` VALUES ('1', '计算机基础实践', '8', '1', '2', '1', '15', '19', '36-506', '沈亦军');
INSERT INTO `1804031` VALUES ('2', '专业导论', '8', '1', '2', '1', '6', '8', '36-3jt', '郭昌建');
INSERT INTO `1804031` VALUES ('3', '工程应用数学C', '10', '3', '4', '1', '6', '17', '37-3jt', '王玉');
INSERT INTO `1804031` VALUES ('4', '大学英语Ⅰ模块', '14', '5', '6', '1', '6', '18', '35-503', '汪武');
INSERT INTO `1804031` VALUES ('5', '工程应用数学A', '16', '7', '8', '1', '6', '19', '36-201', '魏先彪');
INSERT INTO `1804031` VALUES ('6', '计算机基础实践', '8', '1', '2', '2', '9', '19', '36-506', '沈亦军');
INSERT INTO `1804031` VALUES ('7', '大学英语Ⅰ模块', '10', '3', '4', '2', '6', '18', '35-509', '汪武');
INSERT INTO `1804031` VALUES ('8', '思想道德修养与法律基础', '14', '5', '6', '2', '6', '16', '35-203', '王霞');
INSERT INTO `1804031` VALUES ('9', '专业导论', '8', '1', '2', '3', '6', '8', '36-3jt', '郭昌建');
INSERT INTO `1804031` VALUES ('10', '大学生职业生涯规划', '10', '3', '4', '3', '17', '19', '36-3jt', '王桂云');
INSERT INTO `1804031` VALUES ('11', '大学英语Ⅰ模块', '10', '3', '4', '3', '6', '14', '36-201', '汪武');
INSERT INTO `1804031` VALUES ('12', '程序设计语言I', '14', '5', '6', '3', '9', '19', '36-2jt', '周艳玲');
INSERT INTO `1804031` VALUES ('13', '工程应用数学A', '16', '7', '8', '3', '6', '18', '36-201', '魏先彪');
INSERT INTO `1804031` VALUES ('14', '计算机基础实践', '8', '1', '2', '4', '15', '19', '36-506', '沈亦军');
INSERT INTO `1804031` VALUES ('15', '工程应用数学C', '10', '3', '4', '4', '6', '17', '37-3jt', '王玉');
INSERT INTO `1804031` VALUES ('16', '程序设计语言I', '16', '7', '8', '4', '13', '18', '36-503', '周艳玲');
INSERT INTO `1804031` VALUES ('17', '程序设计语言I', '16', '7', '7', '4', '19', '19', '36-503', '周艳玲');
INSERT INTO `1804031` VALUES ('18', '大学生心理健康教育', '16', '7', '8', '4', '6', '12', '36-3jt', '谢琛');
INSERT INTO `1804031` VALUES ('19', '程序设计语言I', '10', '3', '4', '5', '12', '12', '36-501', '周艳玲');
INSERT INTO `1804031` VALUES ('20', '程序设计语言I', '10', '3', '4', '5', '9', '11', '36-2jt', '周艳玲');
INSERT INTO `1804031` VALUES ('21', ' 大学生职业生涯规划', '14', '5', '6', '5', '17', '19', '36-3jt', '王桂云');
INSERT INTO `1804031` VALUES ('22', '思想道德修养与法律基础', '14', '5', '6', '5', '6', '16', '37-2jt', '王霞');
INSERT INTO `1804031` VALUES ('23', '程序设计语言I', '16', '7', '8', '5', '10', '19', '36-503', '周艳玲');
INSERT INTO `1804031` VALUES ('24', '专业导论', '16', '7', '8', '5', '8', '8', '36-3jt', '郭昌建');
INSERT INTO `1804031` VALUES ('25', '工程应用数学A', '10', '3', '4', '6', '6', '18', '36-201', '魏先彪');
INSERT INTO `1804031` VALUES ('26', '程序设计语言I', '10', '3', '4', '5', '13', '19', '36-2jt', '周艳玲');
-- ----------------------------
-- Table structure for 1804032
-- ----------------------------
DROP TABLE IF EXISTS `1804032`;
CREATE TABLE `1804032` (
`ctid` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`shour` int(255) DEFAULT NULL,
`stime` int(11) DEFAULT NULL,
`etime` int(11) DEFAULT NULL,
`week` int(255) DEFAULT NULL,
`sweek` int(255) DEFAULT NULL,
`eweek` int(255) DEFAULT NULL,
`place` varchar(255) DEFAULT NULL,
`teacher` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ctid`)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of 1804032
-- ----------------------------
INSERT INTO `1804032` VALUES ('1', '专业导论', '8', '1', '2', '1', '6', '8', '36-3jt', '郭昌建');
INSERT INTO `1804032` VALUES ('2', '大学英语Ⅰ模块', '10', '3', '4', '1', '6', '18', '35-508', '汪武');
INSERT INTO `1804032` VALUES ('3', '程序设计语言I', '14', '5', '6', '1', '10', '19', '36-503', '周艳玲');
INSERT INTO `1804032` VALUES ('4', '工程应用数学A', '16', '7', '8', '1', '6', '19', '36-101', '魏先彪');
INSERT INTO `1804032` VALUES ('5', '工程应用数学C', '8', '1', '2', '2', '6', '17', '35-101', '数理待定');
INSERT INTO `1804032` VALUES ('6', '计算机基础实践', '10', '3', '4', '2', '9', '19', '36-506', '沈亦军');
INSERT INTO `1804032` VALUES ('7', '思想道德修养与法律基础', '14', '5', '6', '2', '6', '16', '35-203', '王霞');
INSERT INTO `1804032` VALUES ('8', '计算机基础实践', '8', '1', '2', '3', '15', '19', '36-506', '沈亦军');
INSERT INTO `1804032` VALUES ('9', '专业导论', '8', '1', '2', '3', '6', '8', '36-3jt', '郭昌建');
INSERT INTO `1804032` VALUES ('10', '大学生职业生涯规划', '10', '3', '4', '3', '17', '19', '36-3jt', '王桂云');
INSERT INTO `1804032` VALUES ('11', '大学英语Ⅰ模块', '10', '3', '4', '3', '6', '14', '36-201', '汪武');
INSERT INTO `1804032` VALUES ('12', '程序设计语言I', '14', '5', '6', '3', '9', '19', '36-2jt', '周艳玲');
INSERT INTO `1804032` VALUES ('13', '工程应用数学A', '16', '7', '8', '3', '6', '18', '36-201', '魏先彪');
INSERT INTO `1804032` VALUES ('14', '大学英语Ⅰ模块', '10', '3', '4', '4', '6', '18', '35-508', '汪武');
INSERT INTO `1804032` VALUES ('15', '程序设计语言I', '14', '5', '6', '4', '12', '18', '36-503', '周艳玲');
INSERT INTO `1804032` VALUES ('16', '程序设计语言I', '14', '5', '5', '4', '19', '19', '36-503', '周艳玲');
INSERT INTO `1804032` VALUES ('17', '计算机基础实践', '16', '7', '8', '4', '15', '19', '36-506', '沈亦军');
INSERT INTO `1804032` VALUES ('18', '大学生心理健康教育', '16', '7', '8', '4', '6', '12', '36-3jt', '谢琛');
INSERT INTO `1804032` VALUES ('19', '工程应用数学C', '8', '1', '2', '5', '6', '17', '35101', '数理待定');
INSERT INTO `1804032` VALUES ('20', '程序设计语言I', '10', '3', '4', '5', '9', '11', '36-2jt', '周艳玲');
INSERT INTO `1804032` VALUES ('21', '大学生职业生涯规划', '14', '5', '6', '5', '17', '19', '36-3jt', '王桂云');
INSERT INTO `1804032` VALUES ('22', '思想道德修养与法律基础', '14', '5', '6', '5', '6', '16', '37-2jt', '王霞');
INSERT INTO `1804032` VALUES ('23', '专业导论', '16', '7', '8', '5', '8', '8', '36-3jt', '郭昌建');
INSERT INTO `1804032` VALUES ('24', '工程应用数学A', '10', '3', '4', '6', '6', '18', '36-201', '魏先彪');
INSERT INTO `1804032` VALUES ('25', '程序设计语言I', '10', '3', '4', '5', '13', '19', '36-2jt', '周艳玲');
-- ----------------------------
-- Table structure for 1804081
-- ----------------------------
DROP TABLE IF EXISTS `1804081`;
CREATE TABLE `1804081` (
`ctid` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`shour` int(255) DEFAULT NULL,
`stime` int(11) DEFAULT NULL,
`etime` int(11) DEFAULT NULL,
`week` int(255) DEFAULT NULL,
`sweek` int(255) DEFAULT NULL,
`eweek` int(255) DEFAULT NULL,
`place` varchar(255) DEFAULT NULL,
`teacher` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ctid`)
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of 1804081
-- ----------------------------
INSERT INTO `1804081` VALUES ('1', '数字电子技术试验', '8', '1', '2', '1', '10', '17', '42-401', '孙承善');
INSERT INTO `1804081` VALUES ('2', '数字逻辑', '8', '1', '2', '1', '2', '7', '36-204', '吴剑威');
INSERT INTO `1804081` VALUES ('3', '数据库原理与应用', '10', '3', '4', '1', '10', null, '36-401', '刘登胜');
INSERT INTO `1804081` VALUES ('4', '数字逻辑', '10', '3', '4', '1', '11', '13', '35-212', '吴剑威');
INSERT INTO `1804081` VALUES ('5', '数字逻辑', '10', '3', '4', '1', '9', '9', '36-210', '吴剑威');
INSERT INTO `1804081` VALUES ('6', ' 离散数学', '14', '5', '6', '1', '2', '15', '36-204', '邹乐');
INSERT INTO `1804081` VALUES ('7', '数据库原理与应用', '16', '7', '8', '1', '9', '17', '35-204', '刘登胜');
INSERT INTO `1804081` VALUES ('8', '数据库原理与应用', '9', '2', '2', '2', '18', '18', '36-401', '刘登胜');
INSERT INTO `1804081` VALUES ('9', '数据结构与算法', '8', '1', '2', '2', '2', '17', '36-204', '程知');
INSERT INTO `1804081` VALUES ('10', '数据库原理与应用', '10', '3', '4', '2', '18', '18', '36-401', '刘登胜');
INSERT INTO `1804081` VALUES ('11', '计算机网络基础', '10', '3', '4', '2', '2', '11', '36-206', '马婷婷');
INSERT INTO `1804081` VALUES ('12', '程序设计语言Ⅱ', '16', '7', '8', '2', '2', '10', '35-204', '邵安贤');
INSERT INTO `1804081` VALUES ('13', '计算机网络基础', '8', '1', '2', '3', '10', '10', '36-403', '马婷婷');
INSERT INTO `1804081` VALUES ('14', '数据结构与算法', '8', '1', '2', '3', '3', '7', '36-408', '程知');
INSERT INTO `1804081` VALUES ('15', '计算机网络基础', '10', '3', '4', '3', '10', '11', '35-204', '马婷婷');
INSERT INTO `1804081` VALUES ('16', '计算机网络基础', '10', '3', '4', '3', '12', '12', '36-204', '马婷婷');
INSERT INTO `1804081` VALUES ('17', '离散数学', '14', '5', '6', '3', '2', '15', '35-204', '邹乐');
INSERT INTO `1804081` VALUES ('18', '数字逻辑', '16', '7', '8', '3', '2', '9', '35-204', '吴剑威');
INSERT INTO `1804081` VALUES ('19', '程序设计语言Ⅱ', '8', '1', '2', '4', '4', '10', '36-408', '吴剑威');
INSERT INTO `1804081` VALUES ('20', '大学英语Ⅰ', '10', '3', '4', '4', '3', '15', '35-507', '王玉芳');
INSERT INTO `1804081` VALUES ('21', '程序设计语言Ⅱ', '14', '5', '5', '4', '10', '10', '35-204', '邵安贤');
INSERT INTO `1804081` VALUES ('22', '数据库原理与应用', '14', '5', '6', '4', '11', '11', '36-401', '刘登胜');
INSERT INTO `1804081` VALUES ('23', '程序设计语言Ⅱ', '14', '5', '6', '4', '2', '9', '36-210', '邵安贤');
INSERT INTO `1804081` VALUES ('24', '计算机网络基础', '16', '7', '8', '4', '2', '11', '35-204', '马婷婷');
INSERT INTO `1804081` VALUES ('25', '数据结构与算法', '8', '1', '2', '5', '2', '17', '35-204', '程知');
INSERT INTO `1804081` VALUES ('26', '数据库原理与应用', '10', '3', '4', '5', '12', '18', '36-403', '刘登胜');
INSERT INTO `1804081` VALUES ('27', '大学英语Ⅰ', '14', '5', '6', '5', '3', '13', '35-204', '王玉芳');
INSERT INTO `1804081` VALUES ('28', '数据库原理与应用', '16', '7', '8', '5', '9', '16', '36-201', '王玉芳');
INSERT INTO `1804081` VALUES ('29', '数据结构与算法', '8', '1', '2', '3', '11', '17', '36-403', '马婷婷');
INSERT INTO `1804081` VALUES ('30', '计算机网络基础', '10', '3', '4', '3', '8', '8', '36-403', '马婷婷');
INSERT INTO `1804081` VALUES ('31', '数字逻辑', '16', '7', '8', '3', '11', '13', '35-201', '吴剑威');
INSERT INTO `1804081` VALUES ('32', '大学英语Ⅰ', '10', '3', '3', '4', '16', '16', '35-507', '王玉芳');
-- ----------------------------
-- Table structure for 1804091
-- ----------------------------
DROP TABLE IF EXISTS `1804091`;
CREATE TABLE `1804091` (
`ctid` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`shour` int(255) DEFAULT NULL,
`stime` int(11) DEFAULT NULL,
`etime` int(11) DEFAULT NULL,
`week` int(255) DEFAULT NULL,
`sweek` int(255) DEFAULT NULL,
`eweek` int(255) DEFAULT NULL,
`place` varchar(255) DEFAULT NULL,
`teacher` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ctid`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of 1804091
-- ----------------------------
INSERT INTO `1804091` VALUES ('1', '大学生职业生涯规划', '8', '1', '2', '1', '17', '19', '35-204', '方淑颖');
INSERT INTO `1804091` VALUES ('2', '面向过程程序设计', '10', '3', '4', '1', '10', '19', '35-204', '陈圣兵');
INSERT INTO `1804091` VALUES ('3', '大学英语Ⅰ模块', '14', '5', '6', '1', '6', '18', '35-504', '陈永进');
INSERT INTO `1804091` VALUES ('4', '面向过程程序设计', '16', '7', '8', '1', '13', '18', '36-606', '陈圣兵');
INSERT INTO `1804091` VALUES ('5', '工程应用数学C', '8', '1', '2', '2', '6', '17', '35-203', '牛欣');
INSERT INTO `1804091` VALUES ('6', '工程应用数学A', '10', '3', '4', '2', '6', '19', '35-212', '张林松');
INSERT INTO `1804091` VALUES ('7', '思想道德修养与法律基础', '16', '7', '8', '2', '6', '16', '35-212', '王霞');
INSERT INTO `1804091` VALUES ('8', '专业导论', '8', '1', '2', '3', '6', '8', '36-204', '陈圣兵');
INSERT INTO `1804091` VALUES ('9', '面向过程程序设计', '8', '1', '2', '3', '9', '19', '36-204', '陈圣兵');
INSERT INTO `1804091` VALUES ('10', '工程应用数学A', '10', '3', '4', '3', '6', '18', '35-212', '张林松');
INSERT INTO `1804091` VALUES ('11', '大学英语Ⅰ模块', '14', '5', '6', '3', '6', '14', '36-204', '陈永进');
INSERT INTO `1804091` VALUES ('12', '计算机基础实践', '16', '7', '8', '3', '13', '19', '36-610', '庞京玉');
INSERT INTO `1804091` VALUES ('13', '大学生心理健康教育', '16', '7', '8', '3', '6', '12', '36-3jt', '张浩');
INSERT INTO `1804091` VALUES ('14', '工程应用数学C', '8', '1', '2', '4', '6', '17', '35-203', '牛欣');
INSERT INTO `1804091` VALUES ('15', '面向过程程序设计', '10', '3', '4', '4', '11', '19', '36-606', '陈圣兵');
INSERT INTO `1804091` VALUES ('16', ' 大学生职业生涯规划', '14', '5', '6', '4', '17', '19', '35-204', '方淑颖');
INSERT INTO `1804091` VALUES ('17', '计算机基础实践', '16', '7', '8', '4', '7', '19', '36-610', '庞京玉');
INSERT INTO `1804091` VALUES ('18', '计算机基础实践', '8', '1', '2', '5', '12', null, '36-608', '庞京玉');
INSERT INTO `1804091` VALUES ('19', '面向过程程序设计', '8', '1', '2', '5', '17', '18', '36-606', '陈圣兵');
INSERT INTO `1804091` VALUES ('20', '工程应用数学A', '10', '3', '4', '5', '6', '18', '35-212', '张林松');
INSERT INTO `1804091` VALUES ('21', ' 大学英语Ⅰ模块', '14', '5', '6', '5', '6', '18', '35-504', '陈永进');
INSERT INTO `1804091` VALUES ('22', ' 思想道德修养与法律基础', '16', '7', '8', '5', '6', '16', '37-3jt', '王霞');
INSERT INTO `1804091` VALUES ('23', '专业导论', '10', '3', '4', '1', '6', '9', '36-204', '陈圣兵');
-- ----------------------------
-- Table structure for 1804092
-- ----------------------------
DROP TABLE IF EXISTS `1804092`;
CREATE TABLE `1804092` (
`ctid` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`shour` int(255) DEFAULT NULL,
`stime` int(11) DEFAULT NULL,
`etime` int(11) DEFAULT NULL,
`week` int(255) DEFAULT NULL,
`sweek` int(255) DEFAULT NULL,
`eweek` int(255) DEFAULT NULL,
`place` varchar(255) DEFAULT NULL,
`teacher` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ctid`)
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of 1804092
-- ----------------------------
INSERT INTO `1804092` VALUES ('1', '大学英语Ⅰ模块', '10', '3', '4', '1', '6', '18', '35-504', '施永鹏');
INSERT INTO `1804092` VALUES ('2', '面向过程程序设计', '14', '5', '6', '1', '9', '19', '36-210', '陈圣兵');
INSERT INTO `1804092` VALUES ('3', '计算机基础实践', '16', '7', '8', '1', '7', '19', '36-210', '庞京玉');
INSERT INTO `1804092` VALUES ('4', '面向过程程序设计', '8', '1', '2', '2', '18', null, '36-610', '陈圣兵');
INSERT INTO `1804092` VALUES ('5', '工程应用数学C', '8', '1', '2', '2', '6', '17', '36-608', '牛欣');
INSERT INTO `1804092` VALUES ('6', '工程应用数学A', '10', '3', '4', '2', '6', '19', '35-203', '张林松');
INSERT INTO `1804092` VALUES ('7', '面向过程程序设计', '16', '7', '8', '2', '17', null, '35-212', '陈圣兵');
INSERT INTO `1804092` VALUES ('8', '思想道德修养与法律基础', '16', '7', '8', '2', '6', '16', '36-606', '王霞');
INSERT INTO `1804092` VALUES ('9', ' 大学英语Ⅰ模块', '8', '1', '2', '3', '6', '18', '35-212', '施永鹏');
INSERT INTO `1804092` VALUES ('10', '工程应用数学A', '10', '3', '4', '3', '6', '18', '35-504', '张林松');
INSERT INTO `1804092` VALUES ('11', '大学生职业生涯规划', '14', '5', '6', '3', '10', null, '35-212', '方淑颖');
INSERT INTO `1804092` VALUES ('12', '面向过程程序设计', '14', '5', '6', '3', '11', '19', '36-210', '陈圣兵');
INSERT INTO `1804092` VALUES ('13', '专业导论', '14', '5', '6', '3', '6', '9', '36-606', '陈圣兵');
INSERT INTO `1804092` VALUES ('14', '大学生心理健康教育', '16', '7', '8', '3', '6', '12', '35-212', '张浩');
INSERT INTO `1804092` VALUES ('15', '工程应用数学C', '8', '1', '2', '4', '6', '17', '36-3jt', '牛欣');
INSERT INTO `1804092` VALUES ('16', '面向过程程序设计', '14', '5', '6', '4', '10', '19', '35-203', '陈圣兵');
INSERT INTO `1804092` VALUES ('17', '大学生职业生涯规划', '14', '5', '6', '4', '7', '9', '36-210', '方淑颖');
INSERT INTO `1804092` VALUES ('18', '面向过程程序设计', '16', '7', '8', '4', '13', '18', '35-203', '陈圣兵');
INSERT INTO `1804092` VALUES ('19', '大学英语Ⅰ模块', '8', '1', '2', '5', '6', '14', '36-606', '施永鹏');
INSERT INTO `1804092` VALUES ('20', '工程应用数学A', '10', '3', '4', '5', '6', '18', '35-203', '张林松');
INSERT INTO `1804092` VALUES ('21', '计算机基础实践', '14', '5', '6', '5', '12', '19', '35-212', '庞京玉');
INSERT INTO `1804092` VALUES ('22', '专业导论', '14', '5', '6', '5', '6', '8', '36-105', '陈圣兵');
INSERT INTO `1804092` VALUES ('23', '大学生职业生涯规划', '14', '5', '6', '5', '9', '10', '36-105', '方淑颖');
INSERT INTO `1804092` VALUES ('24', '思想道德修养与法律基础', '16', '7', '8', '5', '6', '16', '37-2jt', '王霞');
-- ----------------------------
-- Table structure for 1804093
-- ----------------------------
DROP TABLE IF EXISTS `1804093`;
CREATE TABLE `1804093` (
`ctid` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`shour` int(255) DEFAULT NULL,
`stime` int(11) DEFAULT NULL,
`etime` int(11) DEFAULT NULL,
`week` int(255) DEFAULT NULL,
`sweek` int(255) DEFAULT NULL,
`eweek` int(255) DEFAULT NULL,
`place` varchar(255) DEFAULT NULL,
`teacher` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ctid`)
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of 1804093
-- ----------------------------
INSERT INTO `1804093` VALUES ('1', '大学英语Ⅰ模块', '8', '1', '2', '1', '6', '18', '35-504', '施永鹏');
INSERT INTO `1804093` VALUES ('2', '面向过程程序设计', '14', '5', '6', '1', '9', '19', '36-210', '陈圣兵');
INSERT INTO `1804093` VALUES ('3', '工程应用数学C', '8', '1', '2', '2', '6', '17', '35-203', '牛欣');
INSERT INTO `1804093` VALUES ('4', '工程应用数学A', '10', '3', '4', '2', '6', '19', '35-212', '张林松');
INSERT INTO `1804093` VALUES ('5', '思想道德修养与法律基础', '16', '7', '8', '2', '6', '16', '35-212', '王霞');
INSERT INTO `1804093` VALUES ('6', '计算机基础实践', '8', '1', '3', '3', '7', '19', '36-610', '庞京玉');
INSERT INTO `1804093` VALUES ('7', '工程应用数学A', '10', '3', '4', '3', '6', '18', '35-212', '张林松');
INSERT INTO `1804093` VALUES ('8', '学生职业生涯规划', '14', '5', '6', '3', '10', '10', '36-210', '方淑颖');
INSERT INTO `1804093` VALUES ('9', '计算机基础实践', '14', '5', '6', '3', '12', '19', '36-210', '庞京玉');
INSERT INTO `1804093` VALUES ('10', '专业导论', '14', '5', '6', '3', '6', '9', '35-212', '陈圣兵');
INSERT INTO `1804093` VALUES ('11', '面向过程程序设计', '16', '7', '8', '3', '13', '18', '36-606', '陈圣兵');
INSERT INTO `1804093` VALUES ('12', ' 大学生心理健康教育', '16', '7', '8', '3', '6', '12', '36-3jt', '张浩');
INSERT INTO `1804093` VALUES ('13', '工程应用数学C', '8', '1', '2', '4', '6', '17', '35-203', '牛欣');
INSERT INTO `1804093` VALUES ('14', '大学英语Ⅰ模块', '10', '3', '4', '4', '6', '18', '35-504', '施永鹏');
INSERT INTO `1804093` VALUES ('15', '面向过程程序设计', '14', '5', '6', '4', '10', '19', '36-210', '陈圣兵');
INSERT INTO `1804093` VALUES ('16', '大学生职业生涯规划', '14', '5', '6', '4', '7', '9', '35-203', '方淑颖');
INSERT INTO `1804093` VALUES ('17', '大学英语Ⅰ模块', '8', '1', '2', '5', '6', '14', '35-203', '施永鹏');
INSERT INTO `1804093` VALUES ('18', '工程应用数学A', '10', '3', '4', '5', '6', '18', '35-212', '张林松');
INSERT INTO `1804093` VALUES ('19', '面向过程程序设计', '14', '5', '6', '5', '11', '19', '36-608', '陈圣兵');
INSERT INTO `1804093` VALUES ('20', '专业导论', '14', '5', '6', '5', '6', '8', '36-105', '陈圣兵');
INSERT INTO `1804093` VALUES ('21', '大学生职业生涯规划', '14', '5', '6', '5', '9', '10', '36-105', '方淑颖');
INSERT INTO `1804093` VALUES ('22', '面向过程程序设计', '16', '7', '8', '5', '17', '18', '36-606', '陈圣兵');
INSERT INTO `1804093` VALUES ('23', '面向过程程序设计', '16', '7', '8', '5', '19', '19', '36-606', '陈圣兵');
INSERT INTO `1804093` VALUES ('24', '思想道德修养与法律基础', '16', '7', '8', '5', '6', '16', '37-2jt', '王霞');
-- ----------------------------
-- Table structure for 1804101
-- ----------------------------
DROP TABLE IF EXISTS `1804101`;
CREATE TABLE `1804101` (
`ctid` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`shour` int(255) DEFAULT NULL,
`stime` int(11) DEFAULT NULL,
`etime` int(11) DEFAULT NULL,
`week` int(255) DEFAULT NULL,
`sweek` int(255) DEFAULT NULL,
`eweek` int(255) DEFAULT NULL,
`place` varchar(255) DEFAULT NULL,
`teacher` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ctid`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of 1804101
-- ----------------------------
INSERT INTO `1804101` VALUES ('1', '高等数学(1.5+1.5)', '8', '1', '2', '1', '6', '19', '35-212', '刘艳');
INSERT INTO `1804101` VALUES ('2', '韩语初级(听力口语)', '10', '3', '4', '1', '6', '17', '36-201', '尹嘉桢');
INSERT INTO `1804101` VALUES ('3', ' 韩语初级(精读)', '14', '5', '6', '1', '6', '17', '36-201', '袁梦夏');
INSERT INTO `1804101` VALUES ('4', '韩语初级(听力口语)', '16', '7', '8', '1', '6', '17', '36-201', '尹嘉桢');
INSERT INTO `1804101` VALUES ('5', '高等数学(1.5+1.5)', '8', '1', '2', '2', '6', '17', '35-212', '刘艳');
INSERT INTO `1804101` VALUES ('6', '韩语初级(精读)', '10', '3', '4', '2', '6', '19', '36-201', '袁梦夏');
INSERT INTO `1804101` VALUES ('7', '韩语初级(听力口语)', '14', '5', '6', '2', '6', '17', '36-201', '尹嘉桢');
INSERT INTO `1804101` VALUES ('8', '思想道德修养与法律基础', '18', '9', '10', '2', '6', '13', '35-105', '王霞');
INSERT INTO `1804101` VALUES ('9', '韩语初级(听力口语)', '8', '1', '2', '3', '6', '17', '36-201', '尹嘉桢');
INSERT INTO `1804101` VALUES ('10', '韩语初级(精读)', '10', '3', '4', '3', '6', '17', '36-201', '袁梦夏');
INSERT INTO `1804101` VALUES ('11', '高等数学(1.5+1.5)', '8', '1', '2', '4', '6', '19', '35-212', '刘艳');
INSERT INTO `1804101` VALUES ('12', '韩语初级(听力口语)', '10', '3', '4', '4', '6', '17', '36-201', '尹嘉桢');
INSERT INTO `1804101` VALUES ('13', '韩语初级(精读)', '14', '5', '6', '4', '6', '17', '36-201', '袁梦夏');
INSERT INTO `1804101` VALUES ('14', ' 高等数学(1.5+1.5)', '8', '1', '2', '5', '14', '19', '35-212', '刘艳');
INSERT INTO `1804101` VALUES ('15', '大学生心理健康教育', '8', '1', '2', '5', '6', '12', '36-1jt', '孙启原');
-- ----------------------------
-- Table structure for 1804102
-- ----------------------------
DROP TABLE IF EXISTS `1804102`;
CREATE TABLE `1804102` (
`ctid` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`shour` int(255) DEFAULT NULL,
`stime` int(11) DEFAULT NULL,
`etime` int(11) DEFAULT NULL,
`week` int(255) DEFAULT NULL,
`sweek` int(255) DEFAULT NULL,
`eweek` int(255) DEFAULT NULL,
`place` varchar(255) DEFAULT NULL,
`teacher` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ctid`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of 1804102
-- ----------------------------
INSERT INTO `1804102` VALUES ('1', '高等数学(1.5+1.5)', '8', '1', '2', '1', '6', '19', '35-212', '刘艳');
INSERT INTO `1804102` VALUES ('2', ' 韩语初级(听力口语)', '10', '3', '4', '1', '6', '17', '36-208', '罗允善');
INSERT INTO `1804102` VALUES ('3', '韩语初级(精读)', '14', '5', '6', '1', '6', '17', '36-208', '曹昊');
INSERT INTO `1804102` VALUES ('4', ' 高等数学(1.5+1.5)', '8', '1', '2', '2', '6', '19', '35-212', '刘艳');
INSERT INTO `1804102` VALUES ('5', '韩语初级', '10', '3', '4', '2', '6', '17', '36-208', '罗允善');
INSERT INTO `1804102` VALUES ('6', '思想道德修养与法律基础', '18', '9', '10', '2', '6', '13', '35-105', '王霞');
INSERT INTO `1804102` VALUES ('7', '韩语初级(听力口语)', '8', '1', '2', '3', '6', '17', '36-208', '罗允善');
INSERT INTO `1804102` VALUES ('8', '韩语初级(精读)', '10', '3', '4', '3', '6', '17', '36-208', '曹善');
INSERT INTO `1804102` VALUES ('9', '韩语初级(精读)', '14', '5', '6', '3', '6', '17', '36-208', '曹善');
INSERT INTO `1804102` VALUES ('10', '高等数学(1.5+1.5)', '8', '1', '2', '4', '6', '19', '35-212', '刘艳');
INSERT INTO `1804102` VALUES ('11', '韩语初级(精读)', '10', '3', '4', '4', '6', '17', '36-208', '曹昊');
INSERT INTO `1804102` VALUES ('12', ' 韩语初级(听力口语)', '14', '5', '6', '4', '6', '17', '36-208', '罗允善');
INSERT INTO `1804102` VALUES ('13', '高等数学(1.5+1.5)', '8', '1', '2', '5', '14', '19', '35-212', '刘艳');
INSERT INTO `1804102` VALUES ('14', '大学生心理健康教育', '8', '1', '2', '5', '6', '12', '36-1jt', '孙启原');
INSERT INTO `1804102` VALUES ('20', '韩语初级(听力口语)', '10', '3', '4', '5', '6', '17', '36-208', '罗允善');
INSERT INTO `1804102` VALUES ('21', '韩语初级(精读)', '14', '5', '6', '5', '6', '17', '36-208', '曹昊');
-- ----------------------------
-- Table structure for 1804111
-- ----------------------------
DROP TABLE IF EXISTS `1804111`;
CREATE TABLE `1804111` (
`ctid` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`shour` int(255) DEFAULT NULL,
`stime` int(11) DEFAULT NULL,
`etime` int(11) DEFAULT NULL,
`week` int(255) DEFAULT NULL,
`sweek` int(255) DEFAULT NULL,
`eweek` int(255) DEFAULT NULL,
`place` varchar(255) DEFAULT NULL,
`teacher` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ctid`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of 1804111
-- ----------------------------
INSERT INTO `1804111` VALUES ('1', '德语强化', '8', '1', '2', '1', '6', '18', '16-217', '陈雪莹');
INSERT INTO `1804111` VALUES ('2', '德语强化', '10', '3', '4', '1', '6', '18', '16-217', '张炜');
INSERT INTO `1804111` VALUES ('3', '工程应用数学A', '14', '5', '6', '1', '6', '19', '3-105', '朱玉扬');
INSERT INTO `1804111` VALUES ('4', '德语强化', '8', '1', '2', '2', '6', '18', '16-217', '陈雪莹');
INSERT INTO `1804111` VALUES ('5', '德语强化', '10', '3', '4', '2', '6', '18', '16-217', '陈雪莹');
INSERT INTO `1804111` VALUES ('6', '工程应用数学A', '14', '5', '6', '2', '6', '18', '3-105', '朱玉扬');
INSERT INTO `1804111` VALUES ('7', '德语强化', '8', '1', '2', '3', '6', '18', '16-217', '陈雪莹');
INSERT INTO `1804111` VALUES ('8', '德语强化', '10', '3', '4', '3', '6', '18', '16-217', '陈炜');
INSERT INTO `1804111` VALUES ('9', '德语强化', '8', '1', '2', '4', '6', '18', '16-217', 'Werner');
INSERT INTO `1804111` VALUES ('10', '德语强化', '10', '3', '4', '4', '6', '18', '16-217', '陈雪莹');
INSERT INTO `1804111` VALUES ('11', '思想道德修养与法律基础', '18', '9', '10', '2', '6', '13', '36-2jt', '王能引');
INSERT INTO `1804111` VALUES ('12', '德语强化', '16', '7', '8', '1', '6', '18', '16-217', 'Werner');
INSERT INTO `1804111` VALUES ('13', '德语强化', '16', '7', '8', '2', '10', '11', '16-217', 'Werner');
INSERT INTO `1804111` VALUES ('14', '信息技术', '16', '7', '8', '3', '7', '15', '36-403', '熊锐');
INSERT INTO `1804111` VALUES ('15', '工程应用数学A', '14', '5', '6', '4', '6', '18', '3-105', '朱玉扬');
INSERT INTO `1804111` VALUES ('16', '大学生心理健康教育', '16', '7', '8', '4', '6', '12', '36-3jt', '谢堔');
INSERT INTO `1804111` VALUES ('17', '德语强化', '8', '1', '2', '5', '12', '12', '16-217', '陈雪莹');
INSERT INTO `1804111` VALUES ('18', '德语强化', '8', '1', '2', '5', '13', '14', '16-217', '张炜');
INSERT INTO `1804111` VALUES ('19', '德语强化', '8', '1', '2', '5', '6', '8', '16-217', '陈雪莹');
INSERT INTO `1804111` VALUES ('20', '德语强化', '8', '1', '2', '5', '9', '9', '16-217', '陈雪莹');
INSERT INTO `1804111` VALUES ('21', '信息技术', '14', '5', '6', '5', '16', '16', '36-403', '熊锐');
INSERT INTO `1804111` VALUES ('22', '信息技术', '16', '7', '8', '5', '16', '16', '36-403', '熊锐');
-- ----------------------------
-- Table structure for ClassIndex
-- ----------------------------
DROP TABLE IF EXISTS `ClassIndex`;
CREATE TABLE `ClassIndex` (
`classNU` varchar(255) NOT NULL,
`classCN` varchar(255) NOT NULL,
PRIMARY KEY (`classNU`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of ClassIndex
-- ----------------------------
INSERT INTO `ClassIndex` VALUES ('1504011', '15计算机科学与技术1');
INSERT INTO `ClassIndex` VALUES ('1504012', '15计算机科学与技术2');
INSERT INTO `ClassIndex` VALUES ('1504031', '15网络工程1');
INSERT INTO `ClassIndex` VALUES ('1504032', '15网络工程2');
INSERT INTO `ClassIndex` VALUES ('1504091', '15软件工程1');
INSERT INTO `ClassIndex` VALUES ('1504092', '15软件工程2');
INSERT INTO `ClassIndex` VALUES ('1604011', '16计科1');
INSERT INTO `ClassIndex` VALUES ('1604012', '16计科2');
INSERT INTO `ClassIndex` VALUES ('1604031', '16网络工程1');
INSERT INTO `ClassIndex` VALUES ('1604032', '16网络工程2');
INSERT INTO `ClassIndex` VALUES ('1604091', '16软件工程1');
INSERT INTO `ClassIndex` VALUES ('1604092', '16软件工程2');
INSERT INTO `ClassIndex` VALUES ('1604093', '16软件工程3');
INSERT INTO `ClassIndex` VALUES ('1604101', '16信息安全与管理1');
INSERT INTO `ClassIndex` VALUES ('1704011', '17计科1');
INSERT INTO `ClassIndex` VALUES ('1704012', '17计科2');
INSERT INTO `ClassIndex` VALUES ('1704031', '17网络工程');
INSERT INTO `ClassIndex` VALUES ('1704081', '17计科专升本');
INSERT INTO `ClassIndex` VALUES ('1704091', '17软件工程1');
INSERT INTO `ClassIndex` VALUES ('1704092', '17软件工程2');
INSERT INTO `ClassIndex` VALUES ('1704101', '17信息安全与管理1');
INSERT INTO `ClassIndex` VALUES ('1704102', '17信息安全与管理2');
INSERT INTO `ClassIndex` VALUES ('1704111', '17计科2+3');
INSERT INTO `ClassIndex` VALUES ('1804011', '18计科1');
INSERT INTO `ClassIndex` VALUES ('1804012', '18计科2');
INSERT INTO `ClassIndex` VALUES ('1804031', '18网络工程1');
INSERT INTO `ClassIndex` VALUES ('1804032', '18网络工程2');
INSERT INTO `ClassIndex` VALUES ('1804081', '18计科专升本');
INSERT INTO `ClassIndex` VALUES ('1804091', '18软件工程1');
INSERT INTO `ClassIndex` VALUES ('1804092', '18软件工程2');
INSERT INTO `ClassIndex` VALUES ('1804093', '18软件工程3');
INSERT INTO `ClassIndex` VALUES ('1804101', '18信息安全与管理1');
INSERT INTO `ClassIndex` VALUES ('1804102', '18信息安全与管理2');
INSERT INTO `ClassIndex` VALUES ('1804111', '18计科2+3');
-- ----------------------------
-- Table structure for RegisteredLog
-- ----------------------------
DROP TABLE IF EXISTS `RegisteredLog`;
CREATE TABLE `RegisteredLog` (
`stuID` int(11) NOT NULL,
`regTime` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of RegisteredLog
-- ----------------------------
INSERT INTO `RegisteredLog` VALUES ('1604092040', '2018-09-17 14:02:15');
INSERT INTO `RegisteredLog` VALUES ('1604093017', '2018-09-17 13:28:42');
INSERT INTO `RegisteredLog` VALUES ('1604093038', '2018-09-17 13:33:18');
INSERT INTO `RegisteredLog` VALUES ('1604093017', '2018-09-17 22:03:59');
INSERT INTO `RegisteredLog` VALUES ('1604093014', '2018-09-17 22:08:09');
INSERT INTO `RegisteredLog` VALUES ('1704011031', '2018-09-18 08:54:53');
INSERT INTO `RegisteredLog` VALUES ('1704011031', '2018-09-18 08:55:22');
INSERT INTO `RegisteredLog` VALUES ('1604092009', '2018-09-18 08:59:48');
INSERT INTO `RegisteredLog` VALUES ('1704011039', '2018-09-18 09:08:40');
INSERT INTO `RegisteredLog` VALUES ('1704031045', '2018-09-18 13:56:19');
INSERT INTO `RegisteredLog` VALUES ('1704031017', '2018-09-18 13:57:03');
-- ----------------------------
-- Table structure for stuUser
-- ----------------------------
DROP TABLE IF EXISTS `stuUser`;
CREATE TABLE `stuUser` (
`stuID` int(11) NOT NULL,
`stuName` varchar(255) NOT NULL,
`stuClass` varchar(255) NOT NULL,
`stuOpenID` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of stuUser
-- ----------------------------
INSERT INTO `stuUser` VALUES ('1604092040', '章诚', '1604092', 'oCXY51VzdhXBLhEUwdNwkl57G4_o');
INSERT INTO `stuUser` VALUES ('1604093038', '吴慧珠', '1604093', 'oCXY51Zfu_VXXIwpLgc1V2V5xUUw');
INSERT INTO `stuUser` VALUES ('1604093017', '泽鑫', '1604093', 'oCXY51fO-sUyP-sQQLXbBlcxLR28');
INSERT INTO `stuUser` VALUES ('1604093014', '赵世光', '1604093', 'oCXY51fib0TxeCOmwhWPNqO7vjGU');
INSERT INTO `stuUser` VALUES ('1704011031', '孙强', '1704011', 'oCXY51SyAAgPhsV1bho_Locwcd78');
INSERT INTO `stuUser` VALUES ('1604092009', '刘学坤', '1604092', 'oCXY51Z0hesntyXJJ-rQaV7oXKsw');
INSERT INTO `stuUser` VALUES ('1704011039', '李欣桐', '1704011', 'oCXY51bPj5AUrQHzxbi2jc-xHiSI');
INSERT INTO `stuUser` VALUES ('1704031045', '廖珺毓', '1704031', 'oCXY51b8h0UlvJT-P0G-twr3PB04');
INSERT INTO `stuUser` VALUES ('1704031017', '郑禹明', '1704031', 'oCXY51XQGb388M6eARWKdml6tEBc');
|
CREATE TABLE `ssb`.`Trucking Streaming IOT App`.`speed_events_json` (
`eventTime` VARCHAR(2147483647),
`eventTimeLong` BIGINT,
`eventSource` VARCHAR(2147483647),
`truckId` BIGINT,
`driverId` BIGINT,
`driverName` VARCHAR(2147483647),
`routeId` BIGINT,
`route` VARCHAR(2147483647),
`speed` BIGINT,
`eventTimestamp` TIMESTAMP(3) METADATA FROM 'timestamp',
WATERMARK FOR `eventTimestamp` AS `eventTimestamp` - INTERVAL '3' SECOND
) COMMENT 'speed_events_json'
WITH (
'properties.bootstrap.servers' = '${kafka.brokers}',
'properties.sasl.jaas.config' = 'org.apache.kafka.common.security.plain.PlainLoginModule required username="${kafka.service.user}" password="${kafka.service.password}";',
'properties.auto.offset.reset' = 'earliest',
'connector' = 'kafka',
'properties.request.timeout.ms' = '120000',
'properties.transaction.timeout.ms' = '900000',
'properties.sasl.mechanism' = 'PLAIN',
'format' = 'json',
'topic' = 'syndicate-speed-event-json',
'properties.security.protocol' = 'SASL_SSL',
'scan.startup.mode' = 'earliest-offset'
) |
drop database weather;
create database weather default character set utf8;
use weather;
create table forecast
(
countryId int auto_increment primary key,
countries varchar(15)
);
create table liveweather
(
countryId int,
Wx varchar(30),
MaxT int,
MinT int,
CI varchar(20),
PoP int
);
create table twoday
(
countryId int,
Wx varchar (15),
WxV int,
T int,
CI varchar(20),
PoP int,
`Time` datetime,
`date` date
);
create table sevendays
(
countryId int,
fTime datetime,
Wx varchar (15),
WxV int,
T varchar(20),
CI varchar(20),
Wind varchar(20),
Hum varchar(20)
);
create table rainview
(
stationId varchar(20),
`site` varchar(20),
city varchar(20),
Rain float(6,2),
Rain24 float(8,2)
);
insert into forecast (countries) values ('嘉義縣'),('新北市'),('嘉義市'),('新竹縣'),('新竹市'),('臺北市'),('臺南市'),('宜蘭縣'),('苗栗縣'),('雲林縣'),('花蓮縣'),('臺中市'),('臺東縣'),('桃園市'),('南投縣'),('高雄市'),('金門縣'),('屏東縣'),('基隆市'),('澎湖縣'),('彰化縣'),('連江縣'); |
Use [001]
SELECT *
FROM dbo.ARSHTTBL
WHERE ORD_NO = (362292)
|
-- Creating tables for 6 CSV files
-- Departments table; "dept_no","dept_name"
CREATE TABLE Departments(
dept_no varchar not null,
dept_name varchar not null,
primary key(dept_no)
);
SELECT *
FROM Departments;
-- Titles table; title_id,title
CREATE TABLE Titles (
title_id varchar not null,
title varchar not null,
primary key(title_id)
);
SELECT *
FROM titles;
-- Employees table; emp_no,emp_title_id,birth_date,first_name,last_name,sex,hire_date
-- Foreign key is a column in this table that exists in another table as well
--https://www.postgresqltutorial.com/postgresql-foreign-key/
CREATE TABLE Employees (
emp_no int not null,
emp_title_id varchar not null,
birth_date date not null,
first_name varchar not null,
last_name varchar not null,
sex varchar,
hire_date date not null,
primary key(emp_no),
foreign key(emp_title_id) references titles(title_id)
);
SELECT *
FROM Employees;
-- Department Manager table dept_no,emp_no
CREATE TABLE DepartmentManager (
dept_no varchar not null,
emp_no int not null,
primary key(dept_no, emp_no),
foreign key(dept_no) references Departments(dept_no),
foreign key(emp_no) references Employees(emp_no)
);
SELECT *
FROM DepartmentManager;
-- Salaries table emp_no,salary
CREATE TABLE Salaries (
emp_no int not null,
salary int not null,
primary key(emp_no, salary),
foreign key(emp_no) references Employees(emp_no)
);
SELECT *
FROM Salaries;
-- Salaries table emp_no,salary
DROP TABLE dept_employees
CREATE TABLE dept_employees (
emp_no int not null,
dept_no varchar not null,
primary key(emp_no, dept_no),
foreign key(emp_no) references Employees(emp_no),
foreign key(dept_no) references departments (dept_no)
);
SELECT *
FROM dept_employees;
|
drop table tb_boletim;
create table if not exists tb_boletim(
idBoletim integer primary key not null,
idAluno integer,
idDisciplina integer,
constraint idAlunoPFK foreign key (idAluno) references tb_aluno (idAluno),
constraint idDisciplinaPFK foreign key (idDisciplina) references tb_disciplina (idDisciplina),
Nota_1 double not null,
Nota_2 double not null,
Nota_3 double not null,
Nota_4 double not null,
soma_Nota double not null,
Resultado varchar(15) not null
);
insert into tb_boletim (idBoletim, idAluno, idDisciplina, Nota_1, Nota_2, Nota_3, Nota_4) values (1,3,6,5,1,8,10);
insert into tb_boletim (idBoletim, idAluno, idDisciplina, Nota_1, Nota_2, Nota_3, Nota_4) values (2,1,4,6,9,10,5);
insert into tb_boletim (idBoletim, idAluno, idDisciplina, Nota_1, Nota_2, Nota_3, Nota_4) values (3,7,10,5,10,7,4);
insert into tb_boletim (idBoletim, idAluno, idDisciplina, Nota_1, Nota_2, Nota_3, Nota_4) values (4,2,5,1,8,3,7);
insert into tb_boletim (idBoletim, idAluno, idDisciplina, Nota_1, Nota_2, Nota_3, Nota_4) values (5,4,7,6,9,5,2);
insert into tb_boletim (idBoletim, idAluno, idDisciplina, Nota_1, Nota_2, Nota_3, Nota_4) values (6,6,9,7,1,5,6);
insert into tb_boletim (idBoletim, idAluno, idDisciplina, Nota_1, Nota_2, Nota_3, Nota_4) values (7,5,8,5,6,9,4);
insert into tb_boletim (idBoletim, idAluno, idDisciplina, Nota_1, Nota_2, Nota_3, Nota_4) values (8,8,1,8,7,8,9);
insert into tb_boletim (idBoletim, idAluno, idDisciplina, Nota_1, Nota_2, Nota_3, Nota_4) values (9,10,2,10,10,7,3);
insert into tb_boletim (idBoletim, idAluno, idDisciplina, Nota_1, Nota_2, Nota_3, Nota_4) values (10,9,3,7,6,3,10); |
-- CreateTable
CREATE TABLE "User" (
"id" TEXT NOT NULL,
"pair_id" TEXT NOT NULL,
"team_id" TEXT NOT NULL,
"user_name" TEXT NOT NULL,
"email" TEXT NOT NULL,
"status" INTEGER NOT NULL,
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updated_at" TIMESTAMP(3) NOT NULL,
PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "UserIssue" (
"id" TEXT NOT NULL,
"user_id" TEXT NOT NULL,
"issue_id" TEXT NOT NULL,
"progress" INTEGER NOT NULL,
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updated_at" TIMESTAMP(3) NOT NULL,
PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "Issue" (
"id" TEXT NOT NULL,
"issue_name" TEXT NOT NULL,
"issue_group" INTEGER NOT NULL,
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updated_at" TIMESTAMP(3) NOT NULL,
PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "Pair" (
"id" TEXT NOT NULL,
"pair_name" TEXT NOT NULL,
"belong" BOOLEAN NOT NULL,
"team_id" TEXT NOT NULL,
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updated_at" TIMESTAMP(3) NOT NULL,
PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "Team" (
"id" TEXT NOT NULL,
"team_name" INTEGER NOT NULL,
"belong" BOOLEAN NOT NULL,
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updated_at" TIMESTAMP(3) NOT NULL,
PRIMARY KEY ("id")
);
-- CreateIndex
CREATE UNIQUE INDEX "User.email_unique" ON "User"("email");
-- CreateIndex
CREATE UNIQUE INDEX "Pair.pair_name_unique" ON "Pair"("pair_name");
-- CreateIndex
CREATE UNIQUE INDEX "Team.team_name_unique" ON "Team"("team_name");
-- AddForeignKey
ALTER TABLE "User" ADD FOREIGN KEY ("pair_id") REFERENCES "Pair"("id") ON DELETE CASCADE ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "User" ADD FOREIGN KEY ("team_id") REFERENCES "Team"("id") ON DELETE CASCADE ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "UserIssue" ADD FOREIGN KEY ("user_id") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "UserIssue" ADD FOREIGN KEY ("issue_id") REFERENCES "Issue"("id") ON DELETE CASCADE ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "Pair" ADD FOREIGN KEY ("team_id") REFERENCES "Team"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
-- phpMyAdmin SQL Dump
-- version 3.5.1
-- http://www.phpmyadmin.net
--
-- Хост: 127.0.0.1
-- Время создания: Дек 26 2013 г., 11:43
-- Версия сервера: 5.5.25
-- Версия PHP: 5.3.13
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 */;
--
-- База данных: `moto`
--
-- --------------------------------------------------------
--
-- Структура таблицы `categories`
--
CREATE TABLE IF NOT EXISTS `categories` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL,
`cat_id` varchar(100) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;
--
-- Дамп данных таблицы `categories`
--
INSERT INTO `categories` (`id`, `name`, `cat_id`) VALUES
(1, 'Мотоциклы', 'moto'),
(2, 'Запчасти', 'parts');
-- --------------------------------------------------------
--
-- Структура таблицы `orders`
--
CREATE TABLE IF NOT EXISTS `orders` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`product` varchar(100) NOT NULL,
`prod_id` int(11) NOT NULL,
`price` decimal(8,2) NOT NULL,
`qty` varchar(10) NOT NULL,
`name` varchar(100) NOT NULL,
`s_name` varchar(100) NOT NULL,
`address` varchar(100) NOT NULL,
`post_index` varchar(100) NOT NULL,
`e-mail` varchar(100) NOT NULL,
`date` date NOT NULL,
`time` time NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Структура таблицы `products`
--
CREATE TABLE IF NOT EXISTS `products` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(100) NOT NULL,
`description` text NOT NULL,
`price` decimal(8,2) NOT NULL,
`image` varchar(100) NOT NULL,
`category` varchar(100) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=9 ;
--
-- Дамп данных таблицы `products`
--
INSERT INTO `products` (`id`, `title`, `description`, `price`, `image`, `category`) VALUES
(1, 'Asus X501U (темно-синий)', 'Процессор: AMD E2 1800\r\nЕмкость HDD (Гб): 320\r\nРазмер экрана: 15.6\r\nВидеокарта: AMD Radeon HD 7340\r\nОС: Microsoft Windows 8', '13.00', '1.png', 'notebook'),
(2, 'Acer Aspire E1-571G-53234G50Mnks (черный) ', 'Процессор: Intel® Core™ i5 3230M\r\nЕмкость HDD (Гб): 500\r\nРазмер экрана: 15.6\r\nВидеокарта: NVIDIA GeForce 710M\r\nОС: Microsoft Windows 8', '17.00', '2.png', 'notebook'),
(3, 'Lenovo IdeaPad G500 (черный металлик)', 'Процессор: Intel® Pentium® 2020M\r\nЕмкость HDD (Гб): 320\r\nРазмер экрана: 15.6\r\nВидеокарта: Intel GMA HD\r\nОС: DOS', '11.00', '3.png', 'notebook'),
(4, 'Apple MacBook Air 13 Mid 2013 (MD760RU/A) ', 'Процессор: Intel® Core™ i5\r\nРазмер экрана: 13.3\r\nВидеокарта: Intel GMA HD 5000\r\nОС: Mac OS X', '41.00', '4.png', 'notebook'),
(5, 'Apple iMac ME086RU/A', 'Процессор: Intel® Core™ i5\r\nРазмер экрана (дюйм): 21.5\r\nВидеокарта: Intel Iris Pro Graphics\r\nОС: Mac OS X', '52.00', '5.png', 'pc'),
(6, 'Apple iMac MD094RU/A', 'Процессор: Intel® Core™ i5\r\nРазмер экрана (дюйм): 21.5\r\nВидеокарта: NVIDIA GeForce GT 650M\r\nОС: Mac OS X', '56.00', '6.png', 'pc'),
(7, 'MSI Wind Top AP1612-023XRU (черный) ', 'Процессор: Intel® Celeron® B830\r\nРазмер экрана (дюйм): 15.6\r\nСенсорный дисплей: да\r\nВидеокарта: Intel GMA HD\r\nОС: DOS', '13.00', '7.png', 'pc'),
(8, 'MSI Wind Top AE2410G-233 (черный) ', 'Процессор: Intel® Core™ i5 2450M\r\nРазмер экрана (дюйм): 23.6\r\nВидеокарта: NVIDIA GeForce GT 630M\r\nОС: Microsoft Windows 7 Home Premium', '32.00', '8.png', 'pc');
/*!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 */;
|
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50525
Source Host : localhost:3306
Source Database : courseman
Target Server Type : MYSQL
Target Server Version : 50525
File Encoding : 65001
Date: 2014-04-23 22:43:55
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `course`
-- ----------------------------
DROP TABLE IF EXISTS `course`;
CREATE TABLE `course` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`course_code` varchar(20) NOT NULL COMMENT '课程编号',
`course_name` varchar(50) NOT NULL COMMENT '课程名称',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of course
-- ----------------------------
INSERT INTO `course` VALUES ('1', 'zj01', '数据结构');
INSERT INTO `course` VALUES ('2', 'zj02', '离散数学');
-- ----------------------------
-- Table structure for `student`
-- ----------------------------
DROP TABLE IF EXISTS `student`;
CREATE TABLE `student` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(10) NOT NULL,
`gender` char(1) NOT NULL,
`major` varchar(20) NOT NULL,
`grade` char(4) NOT NULL,
`supervisor_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of student
-- ----------------------------
INSERT INTO `student` VALUES ('1', '陈一斌', '男', '计算机科学与技术', '2011', null);
INSERT INTO `student` VALUES ('6', '李林', '男', '计算机科学与技术', '2011', '1');
INSERT INTO `student` VALUES ('7', '王芳', '女', '计算机科学与技术', '2011', '2');
INSERT INTO `student` VALUES ('11', '方灵', '女', '电子信息工程', '2012', '1');
INSERT INTO `student` VALUES ('12', '马洋', '男', '计算机科学与技术', '2013', null);
-- ----------------------------
-- Table structure for `student_course`
-- ----------------------------
DROP TABLE IF EXISTS `student_course`;
CREATE TABLE `student_course` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`student_id` int(11) NOT NULL COMMENT '选课学生id',
`course_id` int(11) NOT NULL COMMENT '所选课程的id',
PRIMARY KEY (`id`),
KEY `student_id` (`student_id`),
KEY `course_id` (`course_id`),
CONSTRAINT `student_course_ibfk_2` FOREIGN KEY (`course_id`) REFERENCES `course` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of student_course
-- ----------------------------
INSERT INTO `student_course` VALUES ('2', '6', '1');
INSERT INTO `student_course` VALUES ('3', '7', '1');
INSERT INTO `student_course` VALUES ('11', '7', '2');
-- ----------------------------
-- Table structure for `teacher`
-- ----------------------------
DROP TABLE IF EXISTS `teacher`;
CREATE TABLE `teacher` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(10) NOT NULL,
`gender` char(1) NOT NULL,
`research_area` varchar(20) NOT NULL,
`title` varchar(6) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of teacher
-- ----------------------------
INSERT INTO `teacher` VALUES ('1', '张伟', '男', '软件工程', '讲师');
INSERT INTO `teacher` VALUES ('2', '陈义', '男', '网络工程', '副教授');
INSERT INTO `teacher` VALUES ('3', '马均', '男', '多媒体技术', '副教授');
INSERT INTO `teacher` VALUES ('4', '卢亮', '男', '软件工程', '讲师');
|
IF OBJECT_ID('Cities', 'U') IS NOT NULL drop table Cities;
CREATE TABLE Cities (
ID int identity(1,1) NOT NULL primary key,
Name nvarchar(150) NOT NULL
)
;
IF OBJECT_ID('DoctorPharmacies', 'U') IS NOT NULL drop table DoctorPharmacies;
CREATE TABLE DoctorPharmacies (
ID int identity(1,1) NOT NULL primary key,
DoctorID bigint DEFAULT 0,
DoctorName nvarchar(150),
PharmacyID bigint DEFAULT 0,
PharmacyName nvarchar(150)
)
;
IF OBJECT_ID('Specialties', 'U') IS NOT NULL drop table Specialties;
CREATE TABLE Specialties (
ID int identity(1,1) NOT NULL primary key,
Name nvarchar(100) NOT NULL
)
;
IF OBJECT_ID('DoctorSpecialties', 'U') IS NOT NULL drop table DoctorSpecialties;
CREATE TABLE DoctorSpecialties (
ID int identity(1,1) NOT NULL primary key,
--UID GUID,
DoctorID int default 0,
SpecialtyID int default 0
)
;
IF OBJECT_ID('Doctors', 'U') IS NOT NULL drop table Doctors;
CREATE TABLE Doctors (
ID int identity(1,1) NOT NULL primary key,
ref int default 0,
Name nvarchar(150),
city nvarchar(150),
zipcode nvarchar(10),
road nvarchar(150),
type int default 0,
externalid nvarchar(50),
score_ref_1 nvarchar(10),
score_ref_2 nvarchar(10),
specialty nvarchar(150),
distance numeric(10,3) default 0
)
;
IF OBJECT_ID('Pharmacies', 'U') IS NOT NULL drop table Pharmacies;
CREATE TABLE Pharmacies (
ID int identity(1,1) NOT NULL primary key,
refid int DEFAULT 0 NOT NULL UNIQUE,
name nvarchar(150),
rep nvarchar(150),
med nvarchar(150),
city nvarchar(150),
zipcode nvarchar(10),
road nvarchar(150),
type nvarchar(50) DEFAULT 0,
externalid nvarchar(50),
vatid nvarchar(20),
med_DATETIME DATETIME,
med_att_pre_lrp nvarchar(30),
med_lrp nvarchar(30),
med_avene nvarchar(30),
med_frezyderm nvarchar(30),
med_att_lrp nvarchar(30),
med_suggestion nvarchar(30),
med_comment nvarchar(500),
rep_DATETIME1 DATETIME,
rep_DATETIME2 DATETIME,
rep_DATETIME3 DATETIME,
rep_lrp nvarchar(30),
rep_avene nvarchar(30),
rep_frezyderm nvarchar(30),
rep_dermoadvisor nvarchar(30),
rep_classification nvarchar(30),
rep_status nvarchar(30),
rep_comment nvarchar(500),
rep_annual_turnover numeric(18,0) default 0,
rep_firstordervalue numeric(18,0) default 0,
rep_annual_visit_freq int default 0,
rep_ta_visit nvarchar(30),
active int default 1,
)
;
IF OBJECT_ID('PharmacyMedRep', 'U') IS NOT NULL drop table PharmacyMedRep;
CREATE TABLE PharmacyMedRep (
ID int identity(1,1) NOT NULL primary key,
PharmacyID int default 0,
PharmacyName nvarchar(150),
MedID int default 0,
MedName nvarchar(150),
RepID int default 0,
RepName nvarchar(150)
)
;
IF OBJECT_ID('Users', 'U') IS NOT NULL drop table Users;
CREATE TABLE Users (
ID int identity(1,1) NOT NULL primary key,
UserName nvarchar(20) NOT NULL,
Pwd nvarchar(20),
Email nvarchar(50),
Name nvarchar(50),
RoleType int DEFAULT 0
)
--alter table pharmacies alter column med_comment nvarchar(500)
--alter table pharmacies alter column rep_comment nvarchar(500)
--ftp://lrpdistribution.eu.xelixis.net |
select us.FirstName+' '+us.LastName as Cutter,
count(distinct d.FilingId) As FilingNumber,
count(distinct d.DocumentId) as DocNumber
From GlobalDocumentData..Document as d
Left Join LogData..DocumentOperationTracking As dot
on dot.DocumentId=d.DocumentId
Join SupportData..UserSearch as us
on us.UserId=dot.UserId
where dot.ActionType=1
--And dot.UserId in (10794,11684,11779,14181,14784,15299,15319,16502,16656,16688,17049,17128,17183,17288,17655,17735,18130,18483)
And d.CreationDate between '2014-10-6' and '2014-10-10'
And d.Scope=1
And d.FilingId>0
And d.Format<>'PDF'
And d.Status<>3
group by us.FirstName+' '+us.LastName
order by DocNumber desc
|
-- https://data36.com/sql-interview-questions-tech-screening-data-analysts/
-- Question 2
create table event_log
(
user_id varchar,
event_date_time varchar
);
INSERT INTO event_log (user_id, event_date_time) VALUES ('7494212','1535308431');
INSERT INTO event_log (user_id, event_date_time) VALUES ('7494212','1535308432');
INSERT INTO event_log (user_id, event_date_time) VALUES ('7494212','1535308433');
INSERT INTO event_log (user_id, event_date_time) VALUES ('7494212','1535308434');
INSERT INTO event_log (user_id, event_date_time) VALUES ('1475185','1535308445');
INSERT INTO event_log (user_id, event_date_time) VALUES ('1475185','1535308446');
INSERT INTO event_log (user_id, event_date_time) VALUES ('6946725','1535308477');
INSERT INTO event_log (user_id, event_date_time) VALUES ('6946725','1535308478');
INSERT INTO event_log (user_id, event_date_time) VALUES ('6946725','1535308479');
INSERT INTO event_log (user_id, event_date_time) VALUES ('6946725','1535308470');
INSERT INTO event_log (user_id, event_date_time) VALUES ('6946725','15353084711');
INSERT INTO event_log (user_id, event_date_time) VALUES ('6946725','15353084712');
INSERT INTO event_log (user_id, event_date_time) VALUES ('7494213','1535308431');
INSERT INTO event_log (user_id, event_date_time) VALUES ('7494213','1535308432');
INSERT INTO event_log (user_id, event_date_time) VALUES ('7494213','1535308433');
INSERT INTO event_log (user_id, event_date_time) VALUES ('7494213','1535308434');
SELECT * FROM
(SELECT user_id, COUNT(event_date_time) AS image_per_user
FROM event_log
GROUP BY user_id) AS image_per_user
WHERE image_per_user < 5 AND image_per_user > 3;
-- 7494212 4
-- 7494213 4
SELECT COUNT(*) FROM
(SELECT user_id, COUNT(event_date_time) AS image_per_user
FROM event_log
GROUP BY user_id) AS image_per_user
WHERE image_per_user < 5 AND image_per_user > 3;
-- 2 |
INSERT INTO RNACOMPETE (ID,NAME,SPECIES,IUPAC) VALUES
('RNCMPT00168','RBFOX1','Homo_sapiens','WGCAUGM')
,('RNCMPT00001','A1CF','Homo_sapiens','WUAAUUR')
,('RNCMPT00123','A2BP1','Drosophila_melanogaster','UGCAUG')
,('RNCMPT00265','An_0265','Aspergillus_nidulans','ACCYMA')
,('RNCMPT00002','ANKHD1','Homo_sapiens','AGACGWW')
,('RNCMPT00003','ARET','Drosophila_melanogaster','UKUKUGU')
,('RNCMPT00114','ARET','Drosophila_melanogaster','UKUKUGU')
,('RNCMPT00270','ARET','Drosophila_melanogaster','UKUGUGU')
,('RNCMPT00180','ASD-1','Caenorhabditis_elegans','WGCAUGH')
,('RNCMPT00284','At_0284','Arabidopsis_thaliana','DGWGUGD')
;
INSERT INTO RNACOMPETE (ID,NAME,SPECIES,IUPAC) VALUES
('RNCMPT00134','B52','Drosophila_melanogaster','GGASGRV')
,('RNCMPT00122','BRU-3','Drosophila_melanogaster','KUGKUGU')
,('RNCMPT00004','BRUNOL4','Homo_sapiens','KGUGUKK')
,('RNCMPT00166','BRUNOL5','Homo_sapiens','UGUGUKK')
,('RNCMPT00187','BRUNOL6','Homo_sapiens','UGUGDKG')
,('RNCMPT00287','An_0287','Aspergillus_nidulans','UACUAMK')
,('RNCMPT00129','CG11360','Drosophila_melanogaster','GAGUDW')
,('RNCMPT00006','CG14718','Drosophila_melanogaster','CAGAKB')
,('RNCMPT00131','CG17838','Drosophila_melanogaster','BAAAUUD')
,('RNCMPT00147','CG2931','Drosophila_melanogaster','DACUAAG')
;
INSERT INTO RNACOMPETE (ID,NAME,SPECIES,IUPAC) VALUES
('RNCMPT00007','CG2950','Drosophila_melanogaster','CRACGAV')
,('RNCMPT00009','CG33714','Drosophila_melanogaster','BBGCGUG')
,('RNCMPT00010','CG5213','Drosophila_melanogaster','URCUUU')
,('RNCMPT00146','CG7804','Drosophila_melanogaster','WGKRUGR')
,('RNCMPT00144','CG7903','Drosophila_melanogaster','HWUGCGR')
,('RNCMPT00008','CNOT4','Drosophila_melanogaster','ASACAHW')
,('RNCMPT00156','CNOT4','Homo_sapiens','GACAGA')
,('RNCMPT00012','CPEB2','Homo_sapiens','CHUUUUU')
,('RNCMPT00158','CPEB4','Homo_sapiens','UUUUUU')
,('RNCMPT00133','CPO','Drosophila_melanogaster','WGCACA')
;
INSERT INTO RNACOMPETE (ID,NAME,SPECIES,IUPAC) VALUES
('RNCMPT00249','Pr_0249','Phytophthora_ramorum','UUGCACD')
,('RNCMPT00013','DAZAP1','Homo_sapiens','UAGKWWR')
,('RNCMPT00262','Ot_0262','Ostreococcus_tauri','UUUUUUK')
,('RNCMPT00263','Ot_0263','Ostreococcus_tauri','AGAACRD')
,('RNCMPT00206','Pp_0206','Physcomitrella_patens','RACCUW')
,('RNCMPT00278','Nv_0278','Nematostella_vectensis','AGAYASA')
,('RNCMPT00273','EIF-2ALPHA','Drosophila_melanogaster','WGCAUG')
,('RNCMPT00121','ELAV','Drosophila_melanogaster','UUUDKUU')
,('RNCMPT00149','ENOX1','Homo_sapiens','HRKACAG')
,('RNCMPT00283','Rbm38','Danio_rerio','KWGUGUG')
;
INSERT INTO RNACOMPETE (ID,NAME,SPECIES,IUPAC) VALUES
('RNCMPT00288','HNRNPR','Gallus_gallus','MMAAAWY')
,('RNCMPT00291','A1CF','Gallus_gallus','DUAAUUV')
,('RNCMPT00279','RBM47','Gallus_gallus','GAUGAW')
,('RNCMPT00285','Rbm24','Tetraodon_nigroviridis','WGUGUG')
,('RNCMPT00289','Hnrnpr','Xenopus_tropicalis','MAAAAAG')
,('RNCMPT00280','Rbm47','Xenopus_tropicalis','GAUGAWH')
,('RNCMPT00282','Rbm42','Xenopus_tropicalis','WACUAC')
,('RNCMPT00281','Syncrip','Xenopus_tropicalis','MAAAWWD')
,('RNCMPT00150','ESRP2','Homo_sapiens','UGGGRAD')
,('RNCMPT00261','Ng_0261','Naegleria_gruberi','RDUUUUG')
;
INSERT INTO RNACOMPETE (ID,NAME,SPECIES,IUPAC) VALUES
('RNCMPT00036','LIN28A','Homo_sapiens','HGGAGWA')
,('RNCMPT00162','LIN28A','Homo_sapiens','YGGAGGR')
,('RNCMPT00212','Lm_0212','Leishmania_major','CAUUUU')
,('RNCMPT00223','Lm_0223','Leishmania_major','KUWCACG')
,('RNCMPT00254','Lm_0254','Leishmania_major','HGAACGM')
,('RNCMPT00255','Lm_0255','Leishmania_major','AAAMAAA')
,('RNCMPT00234','MAL13P1.35','Plasmodium_falciparum','RWUACAC')
,('RNCMPT00197','MAL8P1.40','Plasmodium_falciparum','WUACAUR')
,('RNCMPT00037','MATR3','Homo_sapiens','MAUCUUR')
,('RNCMPT00038','MBNL1','Homo_sapiens','GCUUGC')
;
INSERT INTO RNACOMPETE (ID,NAME,SPECIES,IUPAC) VALUES
('RNCMPT00181','MEC-8','Caenorhabditis_elegans','DWGCACA')
,('RNCMPT00039','MEX-5','Caenorhabditis_elegans','UAAUAW')
,('RNCMPT00140','MOD','Drosophila_melanogaster','ADUGGAA')
,('RNCMPT00041','MSI1','Homo_sapiens','UAGUWRG')
,('RNCMPT00176','MSI1','Homo_sapiens','UAGKWRG')
,('RNCMPT00099','MSI','Drosophila_melanogaster','AGUAGKD')
,('RNCMPT00040','MSI','Drosophila_melanogaster','WGUAGKD')
,('RNCMPT00100','MSI','Drosophila_melanogaster','AGUAGGD')
,('RNCMPT00137','MUB','Drosophila_melanogaster','WACCCKW')
,('RNCMPT00042','Nab2p','Saccharomyces_cerevisiae','AAAAAAR')
;
INSERT INTO RNACOMPETE (ID,NAME,SPECIES,IUPAC) VALUES
('RNCMPT00238','NCU02404','Neurospora_crassa','GGWGGAD')
,('RNCMPT00209','NCU08034','Neurospora_crassa','WGCACA')
,('RNCMPT00126','ORB2','Drosophila_melanogaster','KUUUKKK')
,('RNCMPT00155','PABPC1','Homo_sapiens','ARAAAAM')
,('RNCMPT00153','PABPC3','Homo_sapiens','RAAAACM')
,('RNCMPT00043','PABPC4','Homo_sapiens','AAAAAAR')
,('RNCMPT00171','PABPC5','Homo_sapiens','AGAAADU')
,('RNCMPT00139','PABP','Drosophila_melanogaster','GAAAAHV')
,('RNCMPT00157','PABPN1','Homo_sapiens','ARAAGA')
,('RNCMPT00011','PAPI','Drosophila_melanogaster','KGUKUGU')
;
INSERT INTO RNACOMPETE (ID,NAME,SPECIES,IUPAC) VALUES
('RNCMPT00186','PCBP1','Homo_sapiens','CCWWHCC')
,('RNCMPT00239','PCBP1','Mus_musculus','CYUUCC')
,('RNCMPT00246','Pcbp2','Danio_rerio','WWUCCC')
,('RNCMPT00044','PCBP2','Homo_sapiens','CCYYCCH')
,('RNCMPT00215','PCBP3','Mus_musculus','UUUYCC')
,('RNCMPT00199','PF10_0068','Plasmodium_falciparum','GGWGGA')
,('RNCMPT00240','PF10_0214','Plasmodium_falciparum','WUWCCGA')
,('RNCMPT00200','PF13_0315','Plasmodium_falciparum','KURCAUD')
,('RNCMPT00235','PFF0320c','Plasmodium_falciparum','ACUAAWC')
,('RNCMPT00202','PFI1435w','Plasmodium_falciparum','UKUUUUK')
;
INSERT INTO RNACOMPETE (ID,NAME,SPECIES,IUPAC) VALUES
('RNCMPT00203','PFI1695c','Plasmodium_falciparum','CYWKCAC')
,('RNCMPT00045','PPRC1','Homo_sapiens','SSGCGCS')
,('RNCMPT00177','SFPQ','Homo_sapiens','KURRUKK')
,('RNCMPT00269','PTBP1','Homo_sapiens','HYUUUYU')
,('RNCMPT00268','PTBP1','Homo_sapiens','HYUUUYU')
,('RNCMPT00141','PUF68','Drosophila_melanogaster','UAWDRGR')
,('RNCMPT00101','PUM','Drosophila_melanogaster','UGUAMAK')
,('RNCMPT00102','PUM','Drosophila_melanogaster','UGUAYAK')
,('RNCMPT00103','PUM','Drosophila_melanogaster','UGUAMRK')
,('RNCMPT00143','SNRNP70K','Drosophila_melanogaster','AUCAHG')
;
INSERT INTO RNACOMPETE (ID,NAME,SPECIES,IUPAC) VALUES
('RNCMPT00071','SNRPA','Homo_sapiens','WUGCACR')
,('RNCMPT00272','SRP54','Drosophila_melanogaster','KKRGG')
,('RNCMPT00072','SRSF2','Homo_sapiens','GGAGWD')
,('RNCMPT00073','SRSF7','Homo_sapiens','ACGACG')
,('RNCMPT00067','SRSF9','Homo_sapiens','KGRWGSM')
,('RNCMPT00074','SRSF9','Homo_sapiens','AKGAVMR')
,('RNCMPT00075','STAR-PAP','Homo_sapiens','MRAUACU')
,('RNCMPT00179','SUP-12','Caenorhabditis_elegans','WGUGUGD')
,('RNCMPT00182','SUP-26','Caenorhabditis_elegans','AUAUWWR')
,('RNCMPT00119','SXL','Drosophila_melanogaster','UUUUUUU')
;
INSERT INTO RNACOMPETE (ID,NAME,SPECIES,IUPAC) VALUES
('RNCMPT00076','TARDBP','Homo_sapiens','GAAUGD')
,('RNCMPT00251','Tb_0251','Trypanosoma_brucei','HUUCACR')
,('RNCMPT00252','Tb_0252','Trypanosoma_brucei','WGUAGRW')
,('RNCMPT00230','Tb_0230','Trypanosoma_brucei','GAAGGD')
,('RNCMPT00216','Tb_0216','Trypanosoma_brucei','CAUWGUD')
,('RNCMPT00217','Tb_0217','Trypanosoma_brucei','CUKUUKY')
,('RNCMPT00218','Tb_0218','Trypanosoma_brucei','DUUAUH')
,('RNCMPT00219','Tb_0219','Trypanosoma_brucei','UAUACU')
,('RNCMPT00220','Tb_0220','Trypanosoma_brucei','CUUUCU')
,('RNCMPT00253','Tb_0253','Trypanosoma_brucei','ARAAANA')
;
INSERT INTO RNACOMPETE (ID,NAME,SPECIES,IUPAC) VALUES
('RNCMPT00225','Tp_0225','Thalassiosira_pseudonana','HACRCGC')
,('RNCMPT00077','TIA1','Homo_sapiens','UUUUUBK')
,('RNCMPT00165','TIA1','Homo_sapiens','WUUUUUB')
,('RNCMPT00256','TIAR-1','Caenorhabditis_elegans','UUUUUU')
,('RNCMPT00005','TIAR-3','Caenorhabditis_elegans','HUUUUUU')
,('RNCMPT00078','TRA2','Drosophila_melanogaster','VAAGAA')
,('RNCMPT00257','Tv_0257','Trichomonas_vaginalis','ADAAAAR')
,('RNCMPT00258','Tv_0258','Trichomonas_vaginalis','UKUUUGD')
,('RNCMPT00259','Tv_0259','Trichomonas_vaginalis','AYCAUGD')
,('RNCMPT00226','Tv_0226','Trichomonas_vaginalis','CAAUAA')
;
INSERT INTO RNACOMPETE (ID,NAME,SPECIES,IUPAC) VALUES
('RNCMPT00236','Tv_0236','Trichomonas_vaginalis','YUUUUUK')
,('RNCMPT00079','U2AF2','Homo_sapiens','UUUUUYC')
,('RNCMPT00080','U2AF50','Drosophila_melanogaster','UUUUUYY')
,('RNCMPT00081','UNC-75','Caenorhabditis_elegans','UGUUGUD')
,('RNCMPT00111','Vts1p','Saccharomyces_cerevisiae','GCUGGCS')
,('RNCMPT00082','Vts1p','Saccharomyces_cerevisiae','GCUGGYS')
,('RNCMPT00116','YBX1','Homo_sapiens','AACAUCD')
,('RNCMPT00083','YBX1','Homo_sapiens','AACAUC')
,('RNCMPT00084','YBX2','Homo_sapiens','AACAWCD')
,('RNCMPT00085','ZC3H10','Homo_sapiens','SSAGCGM')
;
INSERT INTO RNACOMPETE (ID,NAME,SPECIES,IUPAC) VALUES
('RNCMPT00086','ZC3H14','Homo_sapiens','UUUDUUU')
,('RNCMPT00087','ZCRB1','Homo_sapiens','GRHUUAA')
,('RNCMPT00164','ZNF638','Homo_sapiens','BGUUSKU')
,('RNCMPT00046','PUM','Drosophila_melanogaster','UGUAHAK')
,('RNCMPT00047','QKI','Homo_sapiens','ACUAACV')
,('RNCMPT00104','PUM','Drosophila_melanogaster','UGUAMAK')
,('RNCMPT00105','PUM','Drosophila_melanogaster','UGUAWDU')
,('RNCMPT00142','QKR58E-1','Drosophila_melanogaster','AUAAUWM')
,('RNCMPT00159','RALY','Homo_sapiens','UUUUUUB')
,('RNCMPT00184','RBM24','Homo_sapiens','WGWGUGD')
;
INSERT INTO RNACOMPETE (ID,NAME,SPECIES,IUPAC) VALUES
('RNCMPT00049','RBM28','Homo_sapiens','GWGUAGD')
,('RNCMPT00051','RBM38','Mus_musculus','KKGUGUK')
,('RNCMPT00050','RBM3','Homo_sapiens','RADACKA')
,('RNCMPT00053','RBM41','Homo_sapiens','WUACWUK')
,('RNCMPT00151','RBM42','Homo_sapiens','AACUAMG')
,('RNCMPT00248','Rbm4.3','Danio_rerio','ACGRCG')
,('RNCMPT00241','RBM45','Homo_sapiens','GACGAMV')
,('RNCMPT00054','RBM46','Homo_sapiens','RAUSAWD')
,('RNCMPT00113','RBM4','Homo_sapiens','GCGCGSG')
,('RNCMPT00052','RBM4','Homo_sapiens','GCGCGSS')
;
INSERT INTO RNACOMPETE (ID,NAME,SPECIES,IUPAC) VALUES
('RNCMPT00154','RBM5','Homo_sapiens','SAAGGRG')
,('RNCMPT00055','RBM5','Homo_sapiens','GARGGWR')
,('RNCMPT00170','RBM6','Homo_sapiens','HAUCCAR')
,('RNCMPT00056','RBM8A','Homo_sapiens','RYGCGCB')
,('RNCMPT00152','RBMS1','Homo_sapiens','KAUAUAS')
,('RNCMPT00173','RBMS3','Homo_sapiens','HAUAUA')
,('RNCMPT00057','RBMS3','Homo_sapiens','MUAUAKM')
,('RNCMPT00058','RBP1','Drosophila_melanogaster','WCAACRR')
,('RNCMPT00127','RBP1-LIKE','Drosophila_melanogaster','AUCADCR')
,('RNCMPT00132','RBP9','Drosophila_melanogaster','UUDDGUU')
;
INSERT INTO RNACOMPETE (ID,NAME,SPECIES,IUPAC) VALUES
('RNCMPT00059','REF2','Drosophila_melanogaster','AGAAGRM')
,('RNCMPT00138','RIN','Drosophila_melanogaster','RRWUGAW')
,('RNCMPT00060','RNP4F','Drosophila_melanogaster','AGAKARR')
,('RNCMPT00205','RO3G_00049','Rhizopus_oryzae','RGGGGAA')
,('RNCMPT00148','ROX8','Drosophila_melanogaster','MYAUUUU')
,('RNCMPT00061','RSF1','Drosophila_melanogaster','ACGACGV')
,('RNCMPT00063','SAMD4A','Homo_sapiens','GCKGGHM')
,('RNCMPT00064','SART3','Homo_sapiens','ARAAAAM')
,('RNCMPT00065','SF1','Drosophila_melanogaster','ACUAAYV')
,('RNCMPT00066','SF2','Drosophila_melanogaster','DGGAGGA')
;
INSERT INTO RNACOMPETE (ID,NAME,SPECIES,IUPAC) VALUES
('RNCMPT00106','SRSF1','Homo_sapiens','GRAGGA')
,('RNCMPT00109','SRSF1','Homo_sapiens','GGASGRV')
,('RNCMPT00107','SRSF1','Homo_sapiens','GGAGGA')
,('RNCMPT00108','SRSF1','Homo_sapiens','GGASGRV')
,('RNCMPT00110','SRSF1','Homo_sapiens','AGGASM')
,('RNCMPT00163','SRSF1','Homo_sapiens','GGRGGAV')
,('RNCMPT00224','Sf3b4','Danio_rerio','CAAAAG')
,('RNCMPT00174','SHEP','Drosophila_melanogaster','WAUWUWD')
,('RNCMPT00175','SHEP','Drosophila_melanogaster','WUAUWWA')
,('RNCMPT00068','SHEP','Drosophila_melanogaster','AUAUUWD')
;
INSERT INTO RNACOMPETE (ID,NAME,SPECIES,IUPAC) VALUES
('RNCMPT00069','SM','Drosophila_melanogaster','ABACACV')
,('RNCMPT00232','Smp_067420','Schistosoma_mansoni','DWWUUUU')
,('RNCMPT00145','SNF','Drosophila_melanogaster','UWGCAC')
,('RNCMPT00070','SNRNP70','Homo_sapiens','RWUCAAG')
,('RNCMPT00237','Pp_0237','Physcomitrella_patens','WUGGAG')
,('RNCMPT00183','ETR-1','Caenorhabditis_elegans','KKUDUGU')
,('RNCMPT00014','EXC-7','Caenorhabditis_elegans','YUDRGUU')
,('RNCMPT00015','FMR1','Drosophila_melanogaster','AHGGACR')
,('RNCMPT00016','FMR1','Homo_sapiens','KGACARG')
,('RNCMPT00120','FNE','Drosophila_melanogaster','UUKDGUU')
;
INSERT INTO RNACOMPETE (ID,NAME,SPECIES,IUPAC) VALUES
('RNCMPT00017','FOX-1','Caenorhabditis_elegans','WGCAUGM')
,('RNCMPT00018','FUS','Homo_sapiens','CGCGC')
,('RNCMPT00088','SRSF10','Homo_sapiens','ARAGRRR')
,('RNCMPT00089','SRSF10','Homo_sapiens','AGAGARR')
,('RNCMPT00090','SRSF10','Homo_sapiens','AGAGAVV')
,('RNCMPT00019','SRSF10','Homo_sapiens','AGAGAVM')
,('RNCMPT00161','FXR1','Homo_sapiens','AYGACR')
,('RNCMPT00020','FXR2','Homo_sapiens','DGACRRR')
,('RNCMPT00021','G3BP2','Homo_sapiens','AGGAUDR')
,('RNCMPT00229','Pp_0229','Physcomitrella_patens','UGUUUUD')
;
INSERT INTO RNACOMPETE (ID,NAME,SPECIES,IUPAC) VALUES
('RNCMPT00228','Pp_0228','Physcomitrella_patens','YUUUUUU')
,('RNCMPT00022','HNRNPA1','Homo_sapiens','DUAGGGW')
,('RNCMPT00023','HNRNPA1L2','Homo_sapiens','DUAGGGW')
,('RNCMPT00024','HNRNPA2B1','Homo_sapiens','DUAGGGW')
,('RNCMPT00245','HNRNPAB','Tetraodon_nigroviridis','WRGWUAG')
,('RNCMPT00025','HNRNPC','Homo_sapiens','HUUUUUK')
,('RNCMPT00167','HNRNPCL1','Homo_sapiens','HUUUUUK')
,('RNCMPT00160','HNRNPH2','Homo_sapiens','GGGAGGG')
,('RNCMPT00026','HNRNPK','Homo_sapiens','CCAWMCC')
,('RNCMPT00091','HNRNPL','Homo_sapiens','ACACRAV')
;
INSERT INTO RNACOMPETE (ID,NAME,SPECIES,IUPAC) VALUES
('RNCMPT00027','HNRNPL','Homo_sapiens','AMAYAMA')
,('RNCMPT00178','HNRPLL','Homo_sapiens','RCAHACA')
,('RNCMPT00118','HOW','Drosophila_melanogaster','ACUAACV')
,('RNCMPT00093','HRB27C','Drosophila_melanogaster','UAGGWUA')
,('RNCMPT00028','HRB27C','Drosophila_melanogaster','UAGGWWA')
,('RNCMPT00029','HRB87F','Drosophila_melanogaster','GGUAGGG')
,('RNCMPT00095','HRB98DE','Drosophila_melanogaster','GGUAGGG')
,('RNCMPT00096','HRB98DE','Drosophila_melanogaster','RGUAGGG')
,('RNCMPT00094','HRB98DE','Drosophila_melanogaster','GKUAGGK')
,('RNCMPT00031','Hrp1p','Saccharomyces_cerevisiae','UAYRUAV')
;
INSERT INTO RNACOMPETE (ID,NAME,SPECIES,IUPAC) VALUES
('RNCMPT00112','HuR','Homo_sapiens','UUWGUUU')
,('RNCMPT00117','HuR','Homo_sapiens','UUURKUU')
,('RNCMPT00274','HuR','Homo_sapiens','UUUUUUK')
,('RNCMPT00032','HuR','Homo_sapiens','UUDUUUU')
,('RNCMPT00136','HuR','Homo_sapiens','UUKRUUU')
,('RNCMPT00033','IGF2BP2','Homo_sapiens','VMAHWCA')
,('RNCMPT00172','IGF2BP3','Homo_sapiens','AMAHWCA')
,('RNCMPT00169','KHDRBS1','Homo_sapiens','AUAAAAV')
,('RNCMPT00062','KHDRBS1','Mus_musculus','UAAAAVV')
,('RNCMPT00185','KHDRBS2','Homo_sapiens','RAUAAAM')
;
INSERT INTO RNACOMPETE (ID,NAME,SPECIES,IUPAC) VALUES
('RNCMPT00034','KHDRBS3','Homo_sapiens','AUAAAV')
,('RNCMPT00035','LARK','Drosophila_melanogaster','DCGCGCG')
,('RNCMPT00097','LARK','Drosophila_melanogaster','DCGCGCG')
,('RNCMPT00124','LARK','Drosophila_melanogaster','SGCGCG')
; |
-- To create new database, run MySQL client:
-- mysql -u root -p
-- Then in MySQL client command line, type the following (replace <password> with password string):
-- create schema blog;
-- grant all privileges on blog.* to blog@localhost identified by '<password>';
-- quit
-- Then, in shell command line, type:
-- mysql -uroot -p<password> blog < schema.mysql.sql
set names 'utf8';
-- Post
CREATE TABLE IF NOT EXISTS `post` (
`id` int(11) PRIMARY KEY AUTO_INCREMENT, -- Unique ID
`title` text NOT NULL, -- Title
`content` text, -- Text description
`tags` text, -- Comma-separated list of tags
`status` int(11) NOT NULL, -- Status
`date_created` timestamp NOT NULL, -- Publication date
`date_modified` timestamp NOT NULL, -- Publication date
FULLTEXT KEY `title_key` (`title`),
FULLTEXT KEY `content_key` (`content`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='utf8_general_ci';
-- Comment
CREATE TABLE IF NOT EXISTS `comment` (
`id` int(11) PRIMARY KEY AUTO_INCREMENT, -- Unique ID
`comment` text, -- Text description
`username` timestamp NOT NULL, -- User's name who created the post
`status` int(11) NOT NULL, -- Status
`date_created` timestamp NOT NULL -- Publication date
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='utf8_general_ci';
-- Tag
CREATE TABLE IF NOT EXISTS `tag` (
`id` int(11) PRIMARY KEY AUTO_INCREMENT, -- Unique ID
`name` VARCHAR(128), -- Tag name
`frequency` INTEGER DEFAULT 1 -- Frequency
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='utf8_general_ci';
|
ALTER TABLE `boyo_gameserver`
ADD COLUMN `Get_Character_URL` varchar(300) NOT NULL AFTER `label`; |
CREATE PROCEDURE sp_view_receivedso(@VENDORID nvarchar(15),
@FROMDATE datetime,
@TODATE datetime)
AS
Select SOAbstractReceived.VendorID, Vendors.Vendor_Name, SOAbstractReceived.SONumber,
SOAbstractReceived.SODate, Value, Status, DocumentID from SOAbstractReceived, Vendors
where Vendors.VendorID = SOAbstractReceived.VendorID
and Vendors.VendorID like @VENDORID
and (SOAbstractReceived.SODate between @FROMDATE and @TODATE)
order by Vendors.Vendor_Name, SOAbstractReceived.SODate
|
/*
结算中心-出运状态
*/
delimiter $
drop procedure if exists Proc_Settlements_LastShipmentStatus $
create procedure Proc_Settlements_LastShipmentStatus(sInvoiceNO varchar(255))
begin
Update Settlements set ShipmentStatus=ifnull((Select ShipmentStatus From Shipments
Where InvoiceNo=sInvoiceNO Limit 0,1),'') Where InvoiceNO=sInvoiceNO;
end $
delimiter ; |
SET @emailtemplateId = (SELECT id from email_template where email_key = "Referral_Assign_to_staff");
UPDATE `email_template_lang`
SET
`body` = '
<html>
<head>
<style>
body {
background: none repeat scroll 0 0 #f4f4f4;
}
table {
padding: 21px;
width: 799px;
font-family: helvetica,arial,verdana,san-serif;
font-size:13px;
color:#333;
}
</style>
</head>
<body>
<table cellpadding="10" style="background:#eeeeee;" cellspacing="0">
<tbody>
<tr style="background:#fff;border-collapse:collapse;"><td>Hi $$current_assignee_first_name$$,</td></tr>
<tr style="background:#fff;border-collapse:collapse;"><td>$$creator_first_name$$ $$creator_last_name$$ has assigned you a new referral for $$student_first_name$$ $$student_last_name$$ in Mapworks. Please sign in to your account to view and take action on this referral.</td></tr>
<tr style="background:#fff;border-collapse:collapse;"><td>Best Regards,</td></tr>
<tr style="background:#fff;border-collapse:collapse;"><td>Skyfactor Mapworks Team.</td></tr>
<tr style="background:#fff;border-collapse:collapse;"><td><img width="307" height = "89" alt="Skyfactor Mapworks Logo" src="$$Skyfactor_Mapworks_logo$$"/><br/></td></tr>
<tr style="background:#fff;border-collapse:collapse;"><td>This email confirmation is an auto-generated message. Replies to automated messages are not monitored.</td></tr>
</tbody>
</table>
</body>
</html>'
WHERE
`email_template_id` = @emailtemplateId; |
/*
Personal Project SQL: Melvin Cruise Line
Melvin Lieu
*/
-- Use my database
USE km_lieumelvin;
/*
Drop Tables Stored Procedure
*/
DELIMITER $$
DROP PROCEDURE IF EXISTS SP_DROP_TABLES$$
CREATE PROCEDURE SP_DROP_TABLES ()
BEGIN
/*
Drop Tables so the database starts fresh
*/
DROP TABLE IF EXISTS STAFF;
DROP TABLE IF EXISTS CERTIFICATION;
DROP TABLE IF EXISTS DEPARTMENT;
DROP TABLE IF EXISTS CUSTOMERTRIPS;
DROP TABLE IF EXISTS TRIP;
DROP TABLE IF EXISTS ROUTE;
DROP TABLE IF EXISTS CUSTOMER;
DROP TABLE IF EXISTS EMPLOYEE;
DROP TABLE IF EXISTS SHIP;
END$$
DELIMITER ;
/*
Create Tables Stored Procedure
*/
DELIMITER $$
DROP PROCEDURE IF EXISTS SP_CREATE_TABLES$$
CREATE PROCEDURE SP_CREATE_TABLES ()
BEGIN
/*
Create Tables
*/
-- Create the SHIP table
CREATE TABLE IF NOT EXISTS SHIP (
SHIP_ID INT AUTO_INCREMENT PRIMARY KEY,
SHIP_NAME VARCHAR (30) NOT NULL);
-- Create the EMPLOYEE table
CREATE TABLE IF NOT EXISTS EMPLOYEE (
EMPLOYEE_ID INT AUTO_INCREMENT PRIMARY KEY,
EMPLOYEE_FIRST_NAME VARCHAR (30) NOT NULL,
EMPLOYEE_LAST_NAME VARCHAR (30) NOT NULL);
-- Create the CUSTOMER table
CREATE TABLE IF NOT EXISTS CUSTOMER (
CUSTOMER_ID INT AUTO_INCREMENT PRIMARY KEY,
CUSTOMER_FIRST_NAME VARCHAR (30) NOT NULL,
CUSTOMER_LAST_NAME VARCHAR (30) NOT NULL,
CUSTOMER_BDAY DATE NOT NULL,
CUSTOMER_ORIGIN VARCHAR (30) NOT NULL,
CUSTOMER_EMAIL VARCHAR (50) NOT NULL);
-- Create the ROUTE table
CREATE TABLE IF NOT EXISTS ROUTE (
ROUTE_ID INT AUTO_INCREMENT PRIMARY KEY,
ROUTE_DEPARTURE VARCHAR (20) NOT NULL,
ROUTE_ARRIVAL VARCHAR (20) NOT NULL);
-- Create the TRIP table
CREATE TABLE IF NOT EXISTS TRIP (
TRIP_ID INT AUTO_INCREMENT PRIMARY KEY,
ROUTE_ID INT NOT NULL,
SHIP_ID INT NOT NULL,
TRIP_DATE DATE NOT NULL,
FOREIGN KEY (ROUTE_ID) REFERENCES ROUTE(ROUTE_ID),
FOREIGN KEY (SHIP_ID) REFERENCES SHIP(SHIP_ID));
-- Create the CUSTOMERTRIPS table
CREATE TABLE IF NOT EXISTS CUSTOMERTRIPS (
TRIP_ID INT,
CUSTOMER_ID INT,
FOREIGN KEY (TRIP_ID) REFERENCES TRIP(TRIP_ID),
FOREIGN KEY (CUSTOMER_ID) REFERENCES CUSTOMER(CUSTOMER_ID),
PRIMARY KEY (TRIP_ID, CUSTOMER_ID));
-- Create the DEPARTMENT table
CREATE TABLE IF NOT EXISTS DEPARTMENT (
DEPARTMENT_ID INT AUTO_INCREMENT PRIMARY KEY,
DEPARTMENT_NAME VARCHAR (20) NOT NULL);
-- Create the CERTIFICATION table
CREATE TABLE IF NOT EXISTS CERTIFICATION (
DEPARTMENT_ID INT,
EMPLOYEE_ID INT,
CERTIFICATION_DATE DATE NOT NULL,
FOREIGN KEY (DEPARTMENT_ID) REFERENCES DEPARTMENT(DEPARTMENT_ID),
FOREIGN KEY (EMPLOYEE_ID) REFERENCES EMPLOYEE(EMPLOYEE_ID),
PRIMARY KEY (DEPARTMENT_ID, EMPLOYEE_ID));
-- Create the STAFF table
CREATE TABLE IF NOT EXISTS STAFF (
TRIP_ID INT,
EMPLOYEE_ID INT,
DEPARTMENT_ID INT,
FOREIGN KEY (TRIP_ID) REFERENCES TRIP(TRIP_ID),
FOREIGN KEY (EMPLOYEE_ID) REFERENCES EMPLOYEE(EMPLOYEE_ID),
PRIMARY KEY (TRIP_ID, EMPLOYEE_ID));
END$$
DELIMITER;
/*
Stored Procedures
*/
DELIMITER $$
-- Create/Replace a Procedure called SP_CUSTOMER_ADD that adds a customer if they do not exist
DROP PROCEDURE IF EXISTS SP_CUSTOMER_ADD$$
CREATE PROCEDURE SP_CUSTOMER_ADD (IN C_FIRST_NAME VARCHAR(30),IN C_LAST_NAME VARCHAR(30), IN C_BDAY DATE, IN C_ORIGIN VARCHAR(30), IN C_EMAIL VARCHAR(50))
BEGIN
INSERT INTO CUSTOMER (CUSTOMER_FIRST_NAME, CUSTOMER_LAST_NAME, CUSTOMER_BDAY, CUSTOMER_ORIGIN, CUSTOMER_EMAIL)
SELECT C_FIRST_NAME, C_LAST_NAME, C_BDAY, C_ORIGIN, C_EMAIL
WHERE
NOT EXISTS (SELECT CUSTOMER_ID FROM CUSTOMER WHERE CUSTOMER_FIRST_NAME = C_FIRST_NAME AND CUSTOMER_LAST_NAME = C_LAST_NAME);
END$$
-- Create/Replace a Procedure called SP_SHIP_ADD that adds a ship if it does not exist
DROP PROCEDURE IF EXISTS SP_SHIP_ADD$$
CREATE PROCEDURE SP_SHIP_ADD (IN S_NAME VARCHAR(30))
BEGIN
INSERT INTO SHIP (SHIP_NAME)
SELECT S_NAME
WHERE
NOT EXISTS (SELECT SHIP_ID FROM SHIP WHERE SHIP_NAME = S_NAME);
END$$
-- Create/Replace a Procedure called SP_ROUTE_ADD that adds a route if it does not exist
DROP PROCEDURE IF EXISTS SP_ROUTE_ADD$$
CREATE PROCEDURE SP_ROUTE_ADD (IN R_DEPARTURE VARCHAR(20), IN R_ARRIVAL VARCHAR(20))
BEGIN
INSERT INTO ROUTE (ROUTE_DEPARTURE, ROUTE_ARRIVAL)
SELECT R_DEPARTURE, R_ARRIVAL
WHERE
NOT EXISTS (SELECT ROUTE_ID FROM ROUTE WHERE ROUTE_DEPARTURE = R_DEPARTURE AND ROUTE_ARRIVAL = R_ARRIVAL);
END$$
-- Create/Replace a Procedure called SP_DEPARTMENT_ADD that adds a department if it does not exist
DROP PROCEDURE IF EXISTS SP_DEPARTMENT_ADD$$
CREATE PROCEDURE SP_DEPARTMENT_ADD (IN D_NAME VARCHAR(20))
BEGIN
INSERT INTO DEPARTMENT (DEPARTMENT_NAME)
SELECT D_NAME
WHERE
NOT EXISTS (SELECT DEPARTMENT_ID FROM DEPARTMENT WHERE DEPARTMENT_NAME = D_NAME);
END$$
-- Create/Replace a Procedure called SP_TRIP_ADD that adds a trip if it does not exist
DROP PROCEDURE IF EXISTS SP_TRIP_ADD$$
CREATE PROCEDURE SP_TRIP_ADD (IN R_DEPARTURE VARCHAR(20), IN R_ARRIVAL VARCHAR(20), S_NAME VARCHAR(30), T_DATE DATE)
BEGIN
SET @R_ID = 0;
SET @S_ID = 0;
SELECT ROUTE_ID INTO @R_ID
FROM ROUTE
WHERE (ROUTE_DEPARTURE = R_DEPARTURE) AND (ROUTE_ARRIVAL = R_ARRIVAL);
SELECT SHIP_ID INTO @S_ID
FROM SHIP
WHERE (SHIP_NAME = S_NAME);
INSERT INTO TRIP (ROUTE_ID, SHIP_ID, TRIP_DATE)
SELECT @R_ID, @S_ID, T_DATE
WHERE
T_DATE > CURDATE() AND NOT EXISTS (SELECT ROUTE_ID FROM TRIP WHERE ROUTE_ID = @R_ID AND SHIP_ID = @S_ID AND TRIP_DATE = T_DATE);
END$$
-- Create/Replace a Procedure called SP_CERTIFICATION_ADD that adds a certification to an employee if it does not exist
-- Error produced if employee first/last names or department name does not already exist in database.
DROP PROCEDURE IF EXISTS SP_CERTIFICATION_ADD$$
CREATE PROCEDURE SP_CERTIFICATION_ADD (IN E_FIRST_NAME VARCHAR(30), IN E_LAST_NAME VARCHAR(30), IN D_NAME VARCHAR(20))
BEGIN
SET @D_ID = 0;
SET @E_ID = 0;
SELECT DEPARTMENT_ID INTO @D_ID
FROM DEPARTMENT
WHERE DEPARTMENT_NAME = D_NAME;
SELECT EMPLOYEE_ID INTO @E_ID
FROM EMPLOYEE
WHERE EMPLOYEE_FIRST_NAME = E_FIRST_NAME AND EMPLOYEE_LAST_NAME = E_LAST_NAME;
INSERT INTO CERTIFICATION (DEPARTMENT_ID, EMPLOYEE_ID, CERTIFICATION_DATE)
SELECT @D_ID, @E_ID, CURDATE()
WHERE
NOT EXISTS (SELECT DEPARTMENT_ID FROM CERTIFICATION WHERE DEPARTMENT_ID = @D_ID AND EMPLOYEE_ID = @E_ID);
END$$
-- Create/Replace a Procedure called SP_EMPLOYEE_ADD that adds an employee if they do not exist
DROP PROCEDURE IF EXISTS SP_EMPLOYEE_ADD$$
CREATE PROCEDURE SP_EMPLOYEE_ADD (IN E_FIRST_NAME VARCHAR(30), IN E_LAST_NAME VARCHAR(30))
BEGIN
INSERT INTO EMPLOYEE (EMPLOYEE_FIRST_NAME, EMPLOYEE_LAST_NAME)
SELECT E_FIRST_NAME, E_LAST_NAME
WHERE
NOT EXISTS (SELECT EMPLOYEE_ID FROM EMPLOYEE WHERE EMPLOYEE_FIRST_NAME = E_FIRST_NAME AND EMPLOYEE_LAST_NAME = E_LAST_NAME);
END$$
-- Create/Replace a Procedure called SP_STAFF_ADD that adds an employee to the staff for a trip if they do not exist.
-- Error produced if input ship name, departure/arrival names, trip date, or employee first/last names do not already exist in database.
-- Error produced if employee tries to work under more than 1 department during a certain trip.
DROP PROCEDURE IF EXISTS SP_STAFF_ADD$$
CREATE PROCEDURE SP_STAFF_ADD (IN S_NAME VARCHAR(30), IN R_DEPARTURE VARCHAR(20), IN R_ARRIVAL VARCHAR(20), IN T_DATE DATE,
IN D_NAME VARCHAR(20), IN E_FIRST_NAME VARCHAR(30), IN E_LAST_NAME VARCHAR(30))
BEGIN
SET @T_ID = 0;
SET @E_ID = 0;
SET @D_ID = 0;
SELECT TRIP_ID INTO @T_ID
FROM TRIP
WHERE (TRIP.SHIP_ID = (SELECT SHIP_ID FROM SHIP WHERE SHIP_NAME = S_NAME)) AND (TRIP.ROUTE_ID = (SELECT ROUTE_ID FROM ROUTE WHERE ROUTE_DEPARTURE = R_DEPARTURE AND ROUTE_ARRIVAL = R_ARRIVAL));
SELECT EMPLOYEE_ID INTO @E_ID
FROM EMPLOYEE
WHERE (EMPLOYEE_FIRST_NAME = E_FIRST_NAME AND EMPLOYEE_LAST_NAME = E_LAST_NAME);
SELECT DEPARTMENT_ID INTO @D_ID
FROM DEPARTMENT
WHERE (DEPARTMENT_NAME = D_NAME);
INSERT INTO STAFF (TRIP_ID, EMPLOYEE_ID, DEPARTMENT_ID)
SELECT @T_ID, @E_ID, @D_ID
WHERE
NOT EXISTS (SELECT EMPLOYEE_ID FROM STAFF WHERE EMPLOYEE_ID = @E_ID AND TRIP_ID = @T_ID);
END$$
-- Create/Replace a Procedure called SP_CUSTOMERTRIPS_ADD that adds a trip for a customer if it does not exist
-- Error produced if customer information does not already exist in database, customer information is incorrect, or if route departure/arrival do not exist, or trip date is incorrect.
DROP PROCEDURE IF EXISTS SP_CUSTOMERTRIPS_ADD$$
CREATE PROCEDURE SP_CUSTOMERTRIPS_ADD (IN C_FIRST_NAME VARCHAR(30),IN C_LAST_NAME VARCHAR(30), IN C_BDAY DATE, IN C_ORIGIN VARCHAR(30), IN C_EMAIL VARCHAR(50),
IN R_DEPARTURE VARCHAR(20), IN R_ARRIVAL VARCHAR(20), IN T_DATE DATE)
BEGIN
SET @C_ID = 0;
SET @T_ID = 0;
SELECT CUSTOMER_ID INTO @C_ID
FROM CUSTOMER
WHERE (CUSTOMER_FIRST_NAME = C_FIRST_NAME AND CUSTOMER_LAST_NAME = C_LAST_NAME AND CUSTOMER_BDAY = C_BDAY AND CUSTOMER_ORIGIN = C_ORIGIN AND CUSTOMER_EMAIL = C_EMAIL);
SELECT TRIP_ID INTO @T_ID
FROM TRIP
WHERE (ROUTE_ID = (SELECT ROUTE_ID FROM ROUTE WHERE ROUTE_DEPARTURE = R_DEPARTURE AND ROUTE_ARRIVAL = R_ARRIVAL)) AND (TRIP_DATE = T_DATE);
INSERT INTO CUSTOMERTRIPS (CUSTOMER_ID, TRIP_ID)
SELECT @C_ID, @T_ID
WHERE
NOT EXISTS (SELECT CUSTOMER_ID FROM CUSTOMERTRIPS WHERE CUSTOMER_ID = @C_ID AND TRIP_ID = @T_ID);
END$$
DELIMITER ;
/*
Insert Data Stored Procedure
*/
DELIMITER $$
DROP PROCEDURE IF EXISTS SP_POPULATE_DATA$$
CREATE PROCEDURE SP_POPULATE_DATA ()
BEGIN
-- Add ships: Athena and Evelynn
CALL SP_SHIP_ADD ('Athena');
CALL SP_SHIP_ADD ('Evelynn');
-- Add routes: (San Diego to Seattle) and (San Francisco to Anchorage) and (Anchorage to Honolulu)
CALL SP_ROUTE_ADD ('San Diego', 'Seattle');
CALL SP_ROUTE_ADD ('San Francisco', 'Anchorage');
CALL SP_ROUTE_ADD ('Anchorage', 'Honolulu');
-- Add trips: (San Diego to Seattle) on 2021-05-18 and (San Francisco to Anchorage) on 2021-05-19 and (Anchorage to Honolulu) on 2021-05-25
CALL SP_TRIP_ADD ('San Diego', 'Seattle', 'Athena', '2021-06-18');
CALL SP_TRIP_ADD ('San Francisco', 'Anchorage', 'Evelynn', '2021-06-19');
CALL SP_TRIP_ADD ('Anchorage', 'Honolulu', 'Evelynn', '2021-06-25');
-- Add departments: Kitchen, Cabin, Deck, Performance, Fitness and Beauty, Control Room, and Emergency
CALL SP_DEPARTMENT_ADD ('Kitchen');
CALL SP_DEPARTMENT_ADD ('Cabin');
CALL SP_DEPARTMENT_ADD ('Deck');
CALL SP_DEPARTMENT_ADD ('Performance');
CALL SP_DEPARTMENT_ADD ('Fitness and Beauty');
CALL SP_DEPARTMENT_ADD ('Control Room');
CALL SP_DEPARTMENT_ADD ('Emergency');
-- Add employees: Sarah Hartley, Matthew Manacio, Melvin Lieu, Richard Bankhead, Masako Wada, Kevan Elias, Sean Yamamoto, Ayaka Kudou, Zen Miyashiro, Mike Uyema, Kainoa Scott, and Ichigo Kurosaki
CALL SP_EMPLOYEE_ADD ('Sarah', 'Hartley');
CALL SP_EMPLOYEE_ADD ('Matthew', 'Manacio');
CALL SP_EMPLOYEE_ADD ('Melvin', 'Lieu');
CALL SP_EMPLOYEE_ADD ('Richard', 'Bankhead');
CALL SP_EMPLOYEE_ADD ('Masako', 'Wada');
CALL SP_EMPLOYEE_ADD ('Kevan', 'Elias');
CALL SP_EMPLOYEE_ADD ('Sean', 'Yamamoto');
CALL SP_EMPLOYEE_ADD ('Ayaka', 'Kudou');
CALL SP_EMPLOYEE_ADD ('Zen', 'Miyashiro');
CALL SP_EMPLOYEE_ADD ('Mike', 'Uyema');
CALL SP_EMPLOYEE_ADD ('Kainoa', 'Scott');
CALL SP_EMPLOYEE_ADD ('Ichigo', 'Kurosaki');
-- Add customers: Ryo Tashiro, Ohana Takashima, Amos Jun, Rachel Sterling, Daisy Chang, Aaron Wallen, and Katherine Wallen
CALL SP_CUSTOMER_ADD ('Ryo', 'Tashiro', '2000-01-21', 'Japan', 'ryotashiro999@gmail.com');
CALL SP_CUSTOMER_ADD ('Ohana', 'Takashima', '1978-07-06', 'Japan', 'ohanatakashima77@gmail.com');
CALL SP_CUSTOMER_ADD ('Amos', 'Jun', '2000-02-13', 'Korea', 'amosjjjun@hotmail.com');
CALL SP_CUSTOMER_ADD ('Rachel', 'Sterling', '1999-05-26', 'US', 'rachelisthebomb@gmail.com');
CALL SP_CUSTOMER_ADD ('Daisy', 'Chang', '1995-08-03', 'UK', 'daizzychang777@yahoo.com');
CALL SP_CUSTOMER_ADD ('Aaron', 'Wallen', '1982-07-16', 'US', 'awallen@gmail.com');
CALL SP_CUSTOMER_ADD ('Katherine', 'Wallen', '1988-10-08', 'US', 'kwallen@gmail.com');
-- Add customer trips
CALL SP_CUSTOMERTRIPS_ADD ('Ryo', 'Tashiro', '2000-01-21', 'Japan', 'ryotashiro999@gmail.com', 'San Diego', 'Seattle', '2021-06-18');
CALL SP_CUSTOMERTRIPS_ADD ('Katherine', 'Wallen', '1988-10-08', 'US', 'kwallen@gmail.com', 'San Diego', 'Seattle', '2021-06-18');
CALL SP_CUSTOMERTRIPS_ADD ('Aaron', 'Wallen', '1982-07-16', 'US', 'awallen@gmail.com', 'San Diego', 'Seattle', '2021-06-18');
CALL SP_CUSTOMERTRIPS_ADD ('Ohana', 'Takashima', '1978-07-06', 'Japan', 'ohanatakashima77@gmail.com', 'San Francisco', 'Anchorage', '2021-06-19');
CALL SP_CUSTOMERTRIPS_ADD ('Amos', 'Jun', '2000-02-13', 'Korea', 'amosjjjun@hotmail.com', 'San Francisco', 'Anchorage', '2021-06-19');
CALL SP_CUSTOMERTRIPS_ADD ('Ohana', 'Takashima', '1978-07-06', 'Japan', 'ohanatakashima77@gmail.com', 'Anchorage', 'Honolulu', '2021-06-25');
CALL SP_CUSTOMERTRIPS_ADD ('Rachel', 'Sterling', '1999-05-26', 'US', 'rachelisthebomb@gmail.com', 'Anchorage', 'Honolulu', '2021-06-25');
CALL SP_CUSTOMERTRIPS_ADD ('Daisy', 'Chang', '1995-08-03', 'UK', 'daizzychang777@yahoo.com', 'Anchorage', 'Honolulu', '2021-06-25');
-- Add certifications for employees
CALL SP_CERTIFICATION_ADD ('Sarah', 'Hartley', 'Control Room');
CALL SP_CERTIFICATION_ADD ('Matthew', 'Manacio', 'Kitchen');
CALL SP_CERTIFICATION_ADD ('Melvin', 'Lieu', 'Kitchen');
CALL SP_CERTIFICATION_ADD ('Richard', 'Bankhead', 'Performance');
CALL SP_CERTIFICATION_ADD ('Masako', 'Wada', 'Performance');
CALL SP_CERTIFICATION_ADD ('Kevan', 'Elias', 'Deck');
CALL SP_CERTIFICATION_ADD ('Sean', 'Yamamoto', 'Fitness and Beauty');
CALL SP_CERTIFICATION_ADD ('Zen', 'Miyashiro', 'Control Room');
CALL SP_CERTIFICATION_ADD ('Mike', 'Uyema', 'Control Room');
CALL SP_CERTIFICATION_ADD ('Kainoa', 'Scott', 'Deck');
CALL SP_CERTIFICATION_ADD ('Kainoa', 'Scott', 'Cabin');
CALL SP_CERTIFICATION_ADD ('Ichigo', 'Kurosaki', 'Cabin');
-- Add staff: Determines which employees will be working under which department for certain trips
CALL SP_STAFF_ADD ('Athena', 'San Diego', 'Seattle', '2021-06-18', 'Control Room', 'Sarah', 'Hartley');
CALL SP_STAFF_ADD ('Athena', 'San Diego', 'Seattle', '2021-06-18', 'Kitchen', 'Matthew', 'Manacio');
CALL SP_STAFF_ADD ('Athena', 'San Diego', 'Seattle', '2021-06-18', 'Performance', 'Richard', 'Bankhead');
CALL SP_STAFF_ADD ('Athena', 'San Diego', 'Seattle', '2021-06-18', 'Deck', 'Kevan', 'Elias');
CALL SP_STAFF_ADD ('Athena', 'San Diego', 'Seattle', '2021-06-18', 'Fitness and Beauty', 'Sean', 'Yamamoto');
CALL SP_STAFF_ADD ('Athena', 'San Diego', 'Seattle', '2021-06-18', 'Control Room', 'Zen', 'Miyashiro');
CALL SP_STAFF_ADD ('Athena', 'San Diego', 'Seattle', '2021-06-18', 'Cabin', 'Ichigo', 'Kurosaki');
CALL SP_STAFF_ADD ('Evelynn', 'San Francisco', 'Anchorage', '2021-06-19', 'Kitchen', 'Melvin', 'Lieu');
CALL SP_STAFF_ADD ('Evelynn', 'San Francisco', 'Anchorage', '2021-06-19', 'Performance', 'Masako', 'Wada');
CALL SP_STAFF_ADD ('Evelynn', 'San Francisco', 'Anchorage', '2021-06-19', 'Control Room', 'Mike', 'Uyema');
CALL SP_STAFF_ADD ('Evelynn', 'San Francisco', 'Anchorage', '2021-06-19', 'Deck', 'Kainoa', 'Scott');
CALL SP_STAFF_ADD ('Evelynn', 'Anchorage', 'Honolulu', '2021-06-25', 'Kitchen', 'Melvin', 'Lieu');
CALL SP_STAFF_ADD ('Evelynn', 'Anchorage', 'Honolulu', '2021-06-25', 'Control Room', 'Mike', 'Uyema');
CALL SP_STAFF_ADD ('Evelynn', 'Anchorage', 'Honolulu', '2021-06-25', 'Cabin', 'Kainoa', 'Scott');
END$$
DELIMITER ;
/*
Create Views Stored Procedure
*/
DELIMITER $$
DROP PROCEDURE IF EXISTS SP_CREATE_VIEWS$$
CREATE PROCEDURE SP_CREATE_VIEWS()
BEGIN
/*
Create Views
*/
-- View all customers and their trip information
CREATE OR REPLACE VIEW VIEW_CUSTOMERS_ALL AS
SELECT
ROUTE.ROUTE_DEPARTURE, ROUTE.ROUTE_ARRIVAL, TRIP.TRIP_DATE, SHIP.SHIP_NAME, CONCAT(CUSTOMER_FIRST_NAME,', ',CUSTOMER_LAST_NAME) as 'FULLNAME'
FROM CUSTOMERTRIPS
INNER JOIN CUSTOMER ON CUSTOMER.CUSTOMER_ID = CUSTOMERTRIPS.CUSTOMER_ID
INNER JOIN TRIP ON TRIP.TRIP_ID = CUSTOMERTRIPS.TRIP_ID
INNER JOIN SHIP ON SHIP.SHIP_ID = TRIP.SHIP_ID
INNER JOIN ROUTE ON ROUTE.ROUTE_ID = TRIP.ROUTE_ID;
-- View Employees and their employement information
CREATE OR REPLACE VIEW VIEW_EMPLOYEES_ALL AS
SELECT
DEPARTMENT.DEPARTMENT_NAME, CERTIFICATION.CERTIFICATION_DATE, CONCAT(EMPLOYEE_FIRST_NAME, ', ', EMPLOYEE_LAST_NAME) AS 'FULLNAME'
FROM CERTIFICATION
INNER JOIN DEPARTMENT ON DEPARTMENT.DEPARTMENT_ID = CERTIFICATION.DEPARTMENT_ID
INNER JOIN EMPLOYEE ON EMPLOYEE.EMPLOYEE_ID = CERTIFICATION.EMPLOYEE_ID;
-- View which employees are working in which department on each trip
CREATE OR REPLACE VIEW VIEW_STAFF_ALL AS
SELECT
ROUTE.ROUTE_DEPARTURE, ROUTE.ROUTE_ARRIVAL, TRIP.TRIP_DATE, DEPARTMENT.DEPARTMENT_NAME, CONCAT(EMPLOYEE_FIRST_NAME, ', ', EMPLOYEE_LAST_NAME) AS 'FULLNAME'
FROM STAFF
INNER JOIN TRIP ON TRIP.TRIP_ID = STAFF.TRIP_ID
INNER JOIN ROUTE ON ROUTE.ROUTE_ID = TRIP.ROUTE_ID
INNER JOIN DEPARTMENT ON DEPARTMENT.DEPARTMENT_ID = STAFF.DEPARTMENT_ID
INNER JOIN EMPLOYEE ON EMPLOYEE.EMPLOYEE_ID = STAFF.EMPLOYEE_ID;
-- View all trips and their information
CREATE OR REPLACE VIEW VIEW_TRIP_ALL AS
SELECT
TRIP.TRIP_DATE, SHIP.SHIP_NAME, ROUTE.ROUTE_DEPARTURE, ROUTE.ROUTE_ARRIVAL
FROM TRIP
INNER JOIN SHIP ON SHIP.SHIP_ID = TRIP.SHIP_ID
INNER JOIN ROUTE ON ROUTE.ROUTE_ID = TRIP.ROUTE_ID;
-- Which of the customers will be on the trip from San Diego to Seattle?
CREATE OR REPLACE VIEW VIEW_CUSTOMERS_SANDIEGOTOSEATTLE AS
SELECT CUSTOMER.CUSTOMER_FIRST_NAME AS 'First Name', CUSTOMER.CUSTOMER_LAST_NAME AS 'Last Name'
FROM CUSTOMER
INNER JOIN CUSTOMERTRIPS ON CUSTOMERTRIPS.CUSTOMER_ID = CUSTOMER.CUSTOMER_ID
INNER JOIN TRIP ON TRIP.TRIP_ID = CUSTOMERTRIPS.TRIP_ID
INNER JOIN ROUTE ON ROUTE.ROUTE_ID = TRIP.ROUTE_ID
WHERE ROUTE.ROUTE_DEPARTURE = 'San Diego' AND ROUTE.ROUTE_ARRIVAL = 'Seattle';
-- What is the number of customers that will be sailing from Anchorage to Honolulu?
CREATE OR REPLACE VIEW VIEW_CUSTOMERSTOTAL_ANCHORAGETOHONOLULU AS
SELECT COUNT(CUSTOMER.CUSTOMER_ID) AS 'Total from Anchorage to Honolulu'
FROM CUSTOMER
INNER JOIN CUSTOMERTRIPS ON CUSTOMERTRIPS.CUSTOMER_ID = CUSTOMER.CUSTOMER_ID
INNER JOIN TRIP ON TRIP.TRIP_ID = CUSTOMERTRIPS.TRIP_ID
INNER JOIN ROUTE ON ROUTE.ROUTE_ID = TRIP.ROUTE_ID
WHERE ROUTE.ROUTE_DEPARTURE = 'Anchorage' AND ROUTE.ROUTE_ARRIVAL = 'Honolulu';
-- What is the number of trips Daisy Chang is not going to be on?
CREATE OR REPLACE VIEW VIEW_TOTALTRIPS_WITHOUTDAISYCHANG AS
SELECT (MAX(TRIP.TRIP_ID) - COUNT(TRIP.TRIP_ID)) AS 'Number of Trips without Daisy Chang'
FROM CUSTOMER
INNER JOIN CUSTOMERTRIPS ON CUSTOMERTRIPS.CUSTOMER_ID = CUSTOMER.CUSTOMER_ID
INNER JOIN TRIP ON TRIP.TRIP_ID = CUSTOMERTRIPS.TRIP_ID
WHERE CUSTOMER.CUSTOMER_FIRST_NAME = 'Daisy' AND CUSTOMER.CUSTOMER_LAST_NAME = 'Chang';
-- Which departments do not have any staff on any of the trips? Using left outer join
CREATE OR REPLACE VIEW VIEW_NOSTAFF_DEPARTMENTS AS
SELECT DEPARTMENT_NAME AS 'Department', TRIP.TRIP_DATE AS 'Trip date'
FROM DEPARTMENT
LEFT OUTER JOIN STAFF ON STAFF.DEPARTMENT_ID = DEPARTMENT.DEPARTMENT_ID
LEFT OUTER JOIN TRIP ON TRIP.TRIP_ID = STAFF.TRIP_ID;
-- What is the number of ships that will be sailing before 2021-05-24?
CREATE OR REPLACE VIEW VIEW_TOTALSHIPSSAIL_BEFOREDATE AS
SELECT COUNT(SHIP.SHIP_ID) AS "Number of Ships"
FROM SHIP
INNER JOIN TRIP ON TRIP.SHIP_ID = SHIP.SHIP_ID
WHERE TRIP.TRIP_DATE < '2021-06-24';
-- How many employees are certified to work in the PERFORMANCE department?
CREATE OR REPLACE VIEW VIEW_EMPLOYEECERTIFIED_PERFORMANCE AS
SELECT COUNT(CERTIFICATION.EMPLOYEE_ID)
FROM CERTIFICATION
INNER JOIN DEPARTMENT ON DEPARTMENT.DEPARTMENT_ID = CERTIFICATION.DEPARTMENT_ID
WHERE DEPARTMENT.DEPARTMENT_NAME = 'Performance';
END$$
DELIMITER ;
/*
Create Datas Stored Procedure
*/
DELIMITER $$
DROP PROCEDURE IF EXISTS SP_CREATE_DATA$$
CREATE PROCEDURE SP_CREATE_DATA()
BEGIN
CALL SP_DROP_TABLES();
CALL SP_CREATE_TABLES();
CALL SP_CREATE_VIEWS();
CALL SP_POPULATE_DATA();
END$$
DELIMITER ;
/*
Show result Stored Procedure
*/
DELIMITER $$
DROP PROCEDURE IF EXISTS SP_SHOW_RESULT$$
CREATE PROCEDURE SP_SHOW_RESULT()
BEGIN
/* Commented out VIEWS are tables containing all information of CUSTOMERS, EMPLOYEES, STAFF, and TRIPS
SELECT * FROM VIEW_CUSTOMERS_ALL;
SELECT * FROM VIEW_EMPLOYEES_ALL;
SELECT * FROM VIEW_STAFF_ALL;
SELECT * FROM VIEW_TRIP_ALL;
*/
SELECT * FROM VIEW_CUSTOMERS_SANDIEGOTOSEATTLE;
SELECT * FROM VIEW_CUSTOMERSTOTAL_ANCHORAGETOHONOLULU;
SELECT * FROM VIEW_TOTALTRIPS_WITHOUTDAISYCHANG;
SELECT * FROM VIEW_NOSTAFF_DEPARTMENTS;
SELECT * FROM VIEW_TOTALSHIPSSAIL_BEFOREDATE;
SELECT * FROM VIEW_EMPLOYEECERTIFIED_PERFORMANCE;
END$$
DELIMITER ;
CALL SP_CREATE_DATA();
CALL SP_SHOW_RESULT();
|
--DATE2STOCK is needed
--*******************************************
drop procedure GENERATE_PROFIT_DATA;
create procedure GENERATE_PROFIT_DATA() as
dateVar timestamp;
endDate timestamp;
cost decimal(21,6);
income decimal(21,6);
begin
drop table PROFIT_DATA;
create column table PROFIT_DATA(
"Date" timestamp,
"Profit" decimal(21,6)
);
dateVar = to_timestamp('2011-01-01', 'YYYY-MM-DD');
endDate = to_timestamp('2017-03-31', 'YYYY-MM-DD');
while dateVar <= endDate do
select ifnull(O1."Quantity" * O1."Price", 0) into cost from DATE2STOCK DS left outer join OPOR O0 on O0."DocDate" = DS."Date" left outer join POR1 O1 on O0."DocEntry" = O1."DocEntry" where DS."Date" = dateVar;
select ifnull(O1."Quantity" * O1."Price", 0) into income from DATE2STOCK DS left outer join ORDR O0 on O0."DocDate" = DS."Date" left outer join RDR1 O1 on O0."DocEntry" = O1."DocEntry" where DS."Date" = dateVar;
insert into PROFIT_DATA values (dateVar, income - cost);
dateVar = ADD_DAYS(dateVar, 1);
end while;
end;
--*******************************************
drop procedure GENERATE_PROFIT_TRAIN_DATA;
create procedure GENERATE_PROFIT_TRAIN_DATA() as
startDate timestamp;
todayDate timestamp;
targetDate timestamp;
oneSeasonLater timestamp;
endDate timestamp;
stockQuantity decimal(21,6);
purchasePrice decimal(21,6);
purchaseQuantity decimal(21,6);
comments decimal(21,6);
customer int;
salePrice decimal(21,6);
saleQuantity decimal(21,6);
profit decimal(21,6);
begin
drop table PROFIT_TRAIN_DATA;
create column table PROFIT_TRAIN_DATA(
"TodayDate" timestamp,
"StockQuantity" decimal(21,6),
"PurchasePrice" decimal(21,6),
"PurchaseQuantity" decimal(21,6),
"Comments" decimal(21,6),
"SalePrice" decimal(21,6),
"SaleQuantity" decimal(21,6),
"TargetDate" timestamp,
"Profit" decimal(21,6)
);
startDate = to_timestamp('2011-01-01', 'YYYY-MM-DD');
todayDate = startDate;
endDate = to_timestamp('2017-03-31', 'YYYY-MM-DD');
while todayDate <= endDate do
if todayDate = startDate then
stockQuantity = 0;
else
select "StockQuantity" into stockQuantity from DATE2STOCK where "Date" = ADD_DAYS(todayDate, -1);
end if;
select ifnull(O1."Price", 0) into purchasePrice from DATE2STOCK DS left outer join OPOR O0 on O0."DocDate" = DS."Date" left outer join POR1 O1 on O0."DocEntry" = O1."DocEntry" where DS."Date" = todayDate;
select ifnull(O1."Quantity", 0) into purchaseQuantity from DATE2STOCK DS left outer join OPOR O0 on O0."DocDate" = DS."Date" left outer join POR1 O1 on O0."DocEntry" = O1."DocEntry" where DS."Date" = todayDate;
select ifnull(TO_DECIMAL("Comments", 21, 6), 0) into comments from DATE2STOCK DS left outer join ORDR O0 on O0."DocDate" = DS."Date" where DS."Date" = todayDate;
select ifnull(O1."Price", 0) into salePrice from DATE2STOCK DS left outer join ORDR O0 on O0."DocDate" = DS."Date" left outer join RDR1 O1 on O0."DocEntry" = O1."DocEntry" where DS."Date" = todayDate;
select ifnull(O1."Quantity", 0) into saleQuantity from DATE2STOCK DS left outer join ORDR O0 on O0."DocDate" = DS."Date" left outer join RDR1 O1 on O0."DocEntry" = O1."DocEntry" where DS."Date" = todayDate;
targetDate = todayDate;
oneSeasonLater = ADD_MONTHS(todayDate, 3);
while targetDate <= oneSeasonLater and targetDate <= endDate do
select sum("Profit") into profit from PROFIT_DATA where "Date" >= todayDate and "Date" <= targetDate;
insert into PROFIT_TRAIN_DATA values (todayDate, stockQuantity, purchasePrice, purchaseQuantity, comments, salePrice, saleQuantity, targetDate, profit);
targetDate = ADD_DAYS(targetDate, 1);
end while;
todayDate = ADD_DAYS(todayDate, 1);
end while;
end;
--*******************************************
select
YEAR("TodayDate") "TodayYear",
MONTH("TodayDate") "TodayMonth",
DAYOFMONTH("TodayDate") "TodayDay",
WEEKDAY("TodayDate") "TodayWeekDay",
"StockQuantity",
"PurchasePrice",
"PurchaseQuantity",
"Comments",
"SalePrice",
"SaleQuantity",
YEAR("TargetDate") "TargetYear",
MONTH("TargetDate") "TargetMonth",
DAYOFMONTH("TargetDate") "TargetDay",
WEEKDAY("TargetDate") "TargetWeekDay",
DAYS_BETWEEN("TodayDate", "TargetDate") "Duration",
"Profit"
from HACKATHON6.PROFIT_TRAIN_DATA
order by "TodayDate", "TargetDate"; |
/**
* Copyright 2023 LinkedIn Corporation. All rights reserved.
* Licensed under the BSD-2 Clause license.
* See LICENSE in the project root for license information.
*/
{% macro spark__generate_incremental_script(coral_response, table_names, output_table) -%}
-- Compiled lines of spark scala code to be executed, separated by \n delimiter
{% set spark_scala = '' %}
-- Ex.
-- sql: SELECT * FROM db.t1 UNION SELECT * FROM db.t2
-- table_names: ['db.t1', 'db.t2']
--
-- incremental_maintenance_sql: SELECT * FROM db_t1_delta UNION SELECT * FROM db_t2_delta
-- underscore_delimited_table_names: ['db_t1', 'db_t2']
-- incremental_table_names: ['db_t1_delta', 'db_t2_delta']
{% set incremental_maintenance_sql = coral_response['incremental_maintenance_sql'] %}
{% set underscore_delimited_table_names = coral_response['underscore_delimited_table_names'] %}
{% set incremental_table_names = coral_response['incremental_table_names'] %}
-- Generate Iceberg incremental table scan code for each target table
-- Namespace variable used to persist changes beyond loop scope
{% set ns = namespace(generated_sql='') %}
{% for source_table in table_names %}
-- Timestamps are currently hard-coded to be the latest two timestamps; this
-- logic will change to use Jasper in the future
{% set snapshot_id_retrieval_code =
'val snapshot_df = spark.read.format("iceberg").load("' ~ source_table ~ '.snapshots")\n'
~ 'snapshot_df.createOrReplaceTempView("snapshot_temp_table")\n'
~ 'val snap_ids = spark.sql("SELECT snapshot_id FROM snapshot_temp_table ORDER BY committed_at DESC LIMIT 2")\n'
~ 'val start_snapshot_id = snap_ids.collect()(1)(0).toString\n'
~ 'val end_snapshot_id = snap_ids.collect()(0)(0).toString\n'
%}
-- Time travel to get original table before additions
{% set original_df_creation_code =
'val df = spark.read.format("iceberg").option("snapshot-id", start_snapshot_id).load("' ~ source_table ~ '")\n'
~ 'df.createOrReplaceTempView("' ~ underscore_delimited_table_names[loop.index0] ~ '")\n'
%}
-- Grab additions to table
{% set delta_df_creation_code =
'val df = spark.read.format("iceberg").option("start-snapshot-id", start_snapshot_id).option("end-snapshot-id", end_snapshot_id).load("' ~ source_table ~ '")\n'
~ 'df.createOrReplaceTempView("' ~ incremental_table_names[loop.index0] ~ '")\n'
%}
{% set ns.generated_sql = ns.generated_sql ~ snapshot_id_retrieval_code ~ original_df_creation_code ~ delta_df_creation_code %}
{% endfor %}
{% set spark_scala = spark_scala ~ ns.generated_sql %}
-- Generate code to execute the incremental query based on incremental table scans generated above
{% set incremental_to_spark_scala =
'val query_response = spark.sql("' ~ incremental_maintenance_sql.strip() ~ '")\n'
%}
{% set spark_scala = spark_scala ~ incremental_to_spark_scala %}
-- Insert incremental output into table
{% set table_update_sql =
'query_response.write.mode("append").saveAsTable("' ~ output_table ~ '")\n'
%}
{% set spark_scala = spark_scala ~ table_update_sql %}
{{ return(spark_scala) }}
{%- endmacro %}
|
create or replace view v1_hdcs020 as
select b."JSDE303",b."DE022",b."JSDE329",b."DE281",b."JSDE336",b."JSDE332",b."HDDE132",b."DE181",
case when c.JSDE940='1' then '还款成功' when c.JSDE940='9' then '还款失败' when c.JSDE940='' then '' end jsde940,
decode(c.JSDE940,'1','',c.JSDE901) as jsde901
from hdcs019 b, hdcs020 c
where b.hdde254=c.hdde254(+);
|
# 1. 테이블 생성
CREATE TABLE `weatherhistory` (
`id` int NOT NULL AUTO_INCREMENT primary key,
`date` timestamp NOT NULL,
`weather`varchar(8) NOT NULL,
`temperatures` decimal(3, 1) NOT NULL,
`precipitation`decimal(4, 1) NOT NULL,
`microDust`varchar(3) NOT NULL,
`windSpeed`decimal(4, 1) NOT NULL,
`createdAt`timestamp DEFAULT CURRENT_TIMESTAMP,
`updatedAt`timestamp DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
# 2. 데이터 입력
INSERT INTO `weatherhistory` (`date`, `weather`, `temperatures`, `precipitation`, `microDust`, `windSpeed`, `createdAt`, `updatedAt`)
VALUES ('2015-07-01', '비', 21.9, 83.5, '보통', 2.9, now(), now()),
('2015-07-02', '비', 22.6, 59.5, '보통', 2.5, now(), now()),
('2015-07-03', '흐림', 27.4, 0.0, '좋음', 2.9, now(), now()),
('2015-07-04', '맑음', 27.3, 0.0, '좋음', 6.1, now(), now()),
('2015-07-05', '구름조금', 25.3, 0.0, '나쁨', 4.3, now(), now()),
('2015-07-06', '맑음', 23.9, 0.0, '나쁨', 6.5, now(), now()),
('2015-07-07', '맑음', 23.7, 0.0, '좋음', 5.8, now(), now()),
('2015-07-08', '흐림', 23.3, 0.0, '좋음', 5.4, now(), now()),
('2015-07-09', '비', 20.8, 14.0, '보통', 4.0, now(), now()),
('2015-07-10', '비', 23.7, 16.5, '보통', 2.5, now(), now()),
('2015-07-11', '비', 26.8, 3.0, '좋음', 4.7, now(), now()),
('2015-07-12', '비', 26.6, 1.0, '나쁨', 5.4, now(), now()),
('2015-07-13', '구름조금', 27.3, 0.0, '최악', 6.5, now(), now()),
('2015-07-14', '맑음', 27.9, 0.0, '보통', 6.8, now(), now());
# 3. 가장 높은 기온
SELECT `date`, `weather`, `temperatures` FROM `weatherhistory`
ORDER BY `temperatures`DESC LIMIT 1;
### 4. 날씨 카운트
SELECT `weather`, count(*) as count FROM `weatherhistory`
GROUP BY `weather` ORDER BY count DESC;
# 5. 미세먼지와 강수량
SELECT `microDust`, AVG(precipitation) as precipitation FROM `weatherhistory`
GROUP BY `microDust` HAVING precipitation > 0;
### 6. 미세먼지 와 풍속
* 미세먼지 상태 별로 평균 풍속을 구하고 평균 풍속이 높은 순으로 출력하세요.
* 단, 평균 풍속이 4.0km/h 이상인 정보만 출력 하세요.
* 출력 컬럼은 아래 출력 예시를 참조하세요.
SELECT `microDust`, AVG(windSpeed) as windSpeed FROM `weatherhistory`
GROUP BY `microDust` HAVING windSpeed > 4.0 ORDER BY windSpeed DESC;
|
-- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jun 13, 2017 at 04:31 PM
-- Server version: 5.5.54-0ubuntu0.14.04.1
-- PHP Version: 5.5.9-1ubuntu4.21
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: `restaurant`
--
-- --------------------------------------------------------
--
-- Table structure for table `categories`
--
CREATE TABLE IF NOT EXISTS `categories` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `client`
--
CREATE TABLE IF NOT EXISTS `client` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`userId` int(11) NOT NULL,
`address` varchar(255) NOT NULL,
`phone` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`fidelity` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `deliverer`
--
CREATE TABLE IF NOT EXISTS `deliverer` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`userId` int(11) NOT NULL,
`phone` varchar(255) NOT NULL,
`avaliability` tinyint(1) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `ingredients`
--
CREATE TABLE IF NOT EXISTS `ingredients` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`stock` int(11) NOT NULL,
`price` int(11) NOT NULL,
`expiration date` date NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `meal`
--
CREATE TABLE IF NOT EXISTS `meal` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`price` int(11) NOT NULL,
`category` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `menu`
--
CREATE TABLE IF NOT EXISTS `menu` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`starter` int(11) NOT NULL,
`mainCourse` int(11) NOT NULL,
`desert` int(11) NOT NULL,
`price` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `order`
--
CREATE TABLE IF NOT EXISTS `order` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`numOrder` int(11) NOT NULL,
`clientId` int(11) NOT NULL,
`status` int(1) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `orderContent`
--
CREATE TABLE IF NOT EXISTS `orderContent` (
`orderId` int(11) NOT NULL,
`itemId` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `orders`
--
CREATE TABLE IF NOT EXISTS `orders` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`numOrder` int(11) NOT NULL,
`clientId` int(11) NOT NULL,
`status` int(1) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `receipes`
--
CREATE TABLE IF NOT EXISTS `receipes` (
`ingredient` int(11) NOT NULL,
`meal` int(11) NOT NULL,
`quantity` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `reservation`
--
CREATE TABLE IF NOT EXISTS `reservation` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`client` int(11) NOT NULL,
`table` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `table`
--
CREATE TABLE IF NOT EXISTS `table` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`numTable` int(11) NOT NULL,
`capacity` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `user`
--
CREATE TABLE IF NOT EXISTS `user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`pseudo` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`fistName` varchar(255) NOT NULL,
`familyName` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `worker`
--
CREATE TABLE IF NOT EXISTS `worker` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`userId` int(11) NOT NULL,
`job` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
--HSQL datatypes different.
CREATE TABLE TWEET (ID BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, MESSAGE LONGVARCHAR, TIME timestamp default CURRENT_TIMESTAMP);
|
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 30, 2021 at 06:40 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `asset_ms`
--
-- --------------------------------------------------------
--
-- Table structure for table `assets`
--
CREATE TABLE `assets` (
`id` int(11) NOT NULL,
`names` varchar(140) NOT NULL,
`state` varchar(140) NOT NULL,
`description` varchar(255) NOT NULL,
`code` varchar(70) NOT NULL,
`serial_number` varchar(70) NOT NULL,
`type` varchar(70) NOT NULL,
`dept_id` int(11) DEFAULT NULL,
`registered_on` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `assets`
--
INSERT INTO `assets` (`id`, `names`, `state`, `description`, `code`, `serial_number`, `type`, `dept_id`, `registered_on`) VALUES
(1, ' VGA', ' ssd', ' double VGA used tosddsfsfs', '5YIT-2000', ' 2YMATE', ' COMPUTER ACCESSORY', 1, '2021-01-29 19:29:57'),
(2, ' PROJECTOR', ' SA', ' 3D', '5YIT-2000', ' 2YMATE', ' COMPUTER ACCESSORY', 1, '2021-01-29 19:30:00'),
(4, 'RTETRETEET', 'WER', 'WRW', 'FDS', 'DSF', 'DSD', 1, '2021-01-29 21:09:40'),
(5, 'dfs', 'sfs', 'sf', 'sf', 'sfs', 'sfs', 2, '2021-01-29 21:34:50');
-- --------------------------------------------------------
--
-- Table structure for table `asset_movement`
--
CREATE TABLE `asset_movement` (
`id` int(11) NOT NULL,
`student_id` int(11) DEFAULT NULL,
`asset_id` int(11) DEFAULT NULL,
`booked_on` datetime DEFAULT NULL,
`submitted_on` datetime DEFAULT NULL,
`location` varchar(40) DEFAULT NULL,
`status` varchar(30) DEFAULT NULL,
`quantity` datetime DEFAULT NULL,
`registered_on` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `asset_movement`
--
INSERT INTO `asset_movement` (`id`, `student_id`, `asset_id`, `booked_on`, `submitted_on`, `location`, `status`, `quantity`, `registered_on`) VALUES
(1, 1, 1, '2020-11-11 00:00:00', '2021-01-20 00:00:00', 'KWA GATUZA', ' Available', '0000-00-00 00:00:00', '2021-01-29 19:39:17'),
(2, 1, 1, '2020-11-11 21:21:12', '2021-01-20 12:12:12', 'FACEBOOK HALL', ' Available', '0000-00-00 00:00:00', '2021-01-29 19:42:17'),
(3, 1, 1, '2020-11-11 00:00:00', '2021-01-20 00:00:00', 'KWA GATUZA', ' Available', '0000-00-00 00:00:00', '2021-01-29 19:42:18'),
(4, 1, 1, '2020-11-11 21:21:12', '2021-01-20 12:12:12', 'LIBRARY-CAMP KIGALI', ' Available', '0000-00-00 00:00:00', '2021-01-29 19:44:34'),
(5, 2, 2, '2021-01-02 02:29:12', '2021-01-02 02:59:12', 'MU GATENGA', NULL, '0000-00-00 00:00:00', '2021-01-29 22:02:10'),
(6, 1, 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'KN12 av2, 3rd Floor', NULL, '0000-00-00 00:00:00', '2021-01-29 22:04:12'),
(7, 4, 4, '2021-01-02 02:29:12', '2021-01-02 02:59:12', 'MU GATENGA', 'taken', '0000-00-00 00:00:00', '2021-01-29 22:05:49');
-- --------------------------------------------------------
--
-- Table structure for table `classes`
--
CREATE TABLE `classes` (
`id` int(11) NOT NULL,
`name` varchar(100) DEFAULT NULL,
`academic_year` varchar(20) DEFAULT NULL,
`registered_on` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `classes`
--
INSERT INTO `classes` (`id`, `name`, `academic_year`, `registered_on`) VALUES
(1, 'Year II IS', '2019-2020', '2021-01-29 18:24:38'),
(2, 'Updated...!!!!', '2020-2021', '2021-01-29 18:24:47'),
(3, 'Year II IT', '2020-2021', '2021-01-29 18:25:49'),
(4, 'year one Material', '2019-2020', '2021-01-29 18:32:01'),
(6, 'S1B', '2010', '2021-01-29 22:11:12');
-- --------------------------------------------------------
--
-- Table structure for table `department`
--
CREATE TABLE `department` (
`id` int(11) NOT NULL,
`acronym` varchar(100) DEFAULT NULL,
`names` varchar(255) DEFAULT NULL,
`location` varchar(100) DEFAULT NULL,
`registered_on` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `department`
--
INSERT INTO `department` (`id`, `acronym`, `names`, `location`, `registered_on`) VALUES
(1, 'IT', 'Information Technology', ' SABE', '2021-01-29 18:44:52'),
(2, 'CST ENG', 'CONSTRUCTION ENGINEERING', ' MUHABURA', '2021-01-29 18:45:02'),
(4, 'CST ENG', 'CONSTRUCTION ENGINEERING', ' MUHABURA', '2021-01-29 18:47:00'),
(5, 'BIT', 'BUSINESS IN INFOMATION TECHNOLOGY', 'MUHABURA BLOCK', '2021-01-29 22:17:00');
-- --------------------------------------------------------
--
-- Table structure for table `employee`
--
CREATE TABLE `employee` (
`id` int(11) NOT NULL,
`firstname` varchar(200) DEFAULT NULL,
`lastname` varchar(200) DEFAULT NULL,
`email` varchar(100) DEFAULT NULL,
`phone` varchar(50) DEFAULT NULL,
`role` int(11) DEFAULT NULL,
`password` varchar(255) DEFAULT NULL,
`dept_id` int(11) DEFAULT NULL,
`registered_on` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `employee`
--
INSERT INTO `employee` (`id`, `firstname`, `lastname`, `email`, `phone`, `role`, `password`, `dept_id`, `registered_on`) VALUES
(1, ' MUHIRE ', 'KJOHON', 'muhire@muhire.com', '0788332245', 0, '$2y$10$v2HXr0gZYseA7KyR5U2DUOn82o62khn1M4tBDK4jmS56uW84Rle1W', 1, '2021-01-29 19:09:20'),
(2, ' BYIRINGIRO', 'EMMANUEL', 'manunudi@muhire.com', '0788332245', 1, '$2y$10$VXemQD4Q3q59mvC7hBYh2.P2XNVSil4hEy3pAsYtHDPnEWoXC.S8e', 1, '2021-01-29 19:11:10'),
(3, ' MUHIRE ', 'KJOHON', 'muhire@muhire.com', '0788332245', 1, '$2y$10$pJ9sD9C/gB/uxHU2us/dxOaeuLVFuO0a7mtT.oycLuPyR6f0tgjDO', 1, '2021-01-29 19:13:07'),
(4, ' MUHIRE ', 'KJOHON', 'muhire@muhire.com', '0788332245', 1, '$2y$10$bWAdRfT7R8V/vp4JRYNFBOsfj2B1iy9wB.8y3E0CN.jxay3GaQLj.', 1, '2021-01-29 19:51:19'),
(5, ' MUHIRE ', 'KJOHON', 'muhire@muhire.com', '0788332245', 1, '$2y$10$0L4lTRsK9aUNZ0nxJdxvve1S3HBHhVhkapIIahW4AK3GMzWqp0Tau', 1, '2021-01-29 19:53:03'),
(6, ' MUHIRE ', 'KJOHON', 'muhire@muhire.com', '0788332245', 1, '$2y$10$FDmu40Xhgclq1EVQW7FDwOmuimybb5N90Qm/ZwJ.vgJvFr/9mSvpO', 1, '2021-01-29 19:53:04'),
(7, ' MUHIRE ', 'KJOHON', 'muhire@muhire.com', '0788332245', 1, '$2y$10$WhbVoT0hqwx4v62SeoYUQuVFEKNqLmHXYPfrqgK.GgWjZkMLxaVYS', 1, '2021-01-29 19:53:25'),
(8, 'CYUBAHIRO', 'Theotime', 'omar@omar.com', '0782343423', 0, '$2y$10$66pxGUgBrqEZ/Qasn7RK5OYMDmFISusIkeMxUY3//Qxz.oKsq.clm', 5, '2021-01-29 22:26:56');
-- --------------------------------------------------------
--
-- Table structure for table `student`
--
CREATE TABLE `student` (
`id` int(11) NOT NULL,
`firstname` varchar(250) DEFAULT NULL,
`lastname` varchar(250) DEFAULT NULL,
`reg_number` varchar(150) DEFAULT NULL,
`email` varchar(100) DEFAULT NULL,
`password` varchar(150) DEFAULT NULL,
`dept_id` int(11) DEFAULT NULL,
`class_id` int(11) DEFAULT NULL,
`registered_on` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `student`
--
INSERT INTO `student` (`id`, `firstname`, `lastname`, `reg_number`, `email`, `password`, `dept_id`, `class_id`, `registered_on`) VALUES
(1, 'MUSANGWA ', ' PASCAL', '219007056', 'pascal@ur.rw', '123', 1, 1, '2021-01-29 18:54:57'),
(2, 'NTURANYENABANGA', 'RABAN', '219007056', 'pascal@ur.rw', '123', 1, 1, '2021-01-29 18:55:02'),
(4, 'MUSANGWA ', ' PASCAL', '219007056', 'pascal@ur.rw', '123', 1, 1, '2021-01-29 18:55:27'),
(6, 'asdadsadasd', 'sdfsfd', 'sfds', 'shyaka@shyaka.com', '$2y$10$BdU5w4fTsth39DdpUAQQHOG97sfzQ0VwnU6idpLyBS8N9n6wfVaIW', 5, 2, '2021-01-29 22:36:57');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `assets`
--
ALTER TABLE `assets`
ADD PRIMARY KEY (`id`),
ADD KEY `dpt_fk` (`dept_id`);
--
-- Indexes for table `asset_movement`
--
ALTER TABLE `asset_movement`
ADD PRIMARY KEY (`id`),
ADD KEY `std_fk` (`student_id`),
ADD KEY `asset_fk` (`asset_id`);
--
-- Indexes for table `classes`
--
ALTER TABLE `classes`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `department`
--
ALTER TABLE `department`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `employee`
--
ALTER TABLE `employee`
ADD PRIMARY KEY (`id`),
ADD KEY `dept_fk` (`dept_id`);
--
-- Indexes for table `student`
--
ALTER TABLE `student`
ADD PRIMARY KEY (`id`),
ADD KEY `fk2` (`dept_id`),
ADD KEY `class_dk` (`class_id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `assets`
--
ALTER TABLE `assets`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `asset_movement`
--
ALTER TABLE `asset_movement`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
--
-- AUTO_INCREMENT for table `classes`
--
ALTER TABLE `classes`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT for table `department`
--
ALTER TABLE `department`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `employee`
--
ALTER TABLE `employee`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
--
-- AUTO_INCREMENT for table `student`
--
ALTER TABLE `student`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `assets`
--
ALTER TABLE `assets`
ADD CONSTRAINT `dpt_fk` FOREIGN KEY (`dept_id`) REFERENCES `department` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `asset_movement`
--
ALTER TABLE `asset_movement`
ADD CONSTRAINT `asset_fk` FOREIGN KEY (`asset_id`) REFERENCES `assets` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `std_fk` FOREIGN KEY (`student_id`) REFERENCES `student` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `employee`
--
ALTER TABLE `employee`
ADD CONSTRAINT `dept_fk` FOREIGN KEY (`dept_id`) REFERENCES `department` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `student`
--
ALTER TABLE `student`
ADD CONSTRAINT `class_dk` FOREIGN KEY (`class_id`) REFERENCES `classes` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `fk2` FOREIGN KEY (`dept_id`) REFERENCES `department` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
/* alter table AGGR_USAGE_DEFINITIONS_REF diable constraint xyz */
delete AGGR_USAGE_DEFINITIONS_REF where
aggr_usage_id = 2;
insert into AGGR_USAGE_DEFINITIONS_REF (
aggr_usage_id,
aggr_usage_type,
aggr_usage_level,
aggr_threshold_quantum,
def_order,
active_dt,
inactive_dt,
create_dt,
is_default,
is_internal )
values (
2,
1,
1,
1,
1,
to_date('Jan 1 2001 01:52:00PM','Mon DD YYYY HH:MI:SSPM'),
to_date('Jan 10 2001 01:52:00PM','Mon DD YYYY HH:MI:SSPM'),
SYSDATE,
0,
0 );
/* alter trigger xyz disable; */
/* alter trigger xyz disable; */
delete AGGR_USAGE_RESTRICTIONS where
AGGR_USAGE_ID in ( 2 );
insert into AGGR_USAGE_RESTRICTIONS
(AGGR_USAGE_ID, RESTRICTION_TYPE, RESTRICTED_ID, IS_EXCLUSION)
values
( 2, 8, 2, 0 );
insert into AGGR_USAGE_RESTRICTIONS
(AGGR_USAGE_ID, RESTRICTION_TYPE, RESTRICTED_ID, IS_EXCLUSION)
values
( 2, 8, 3, 0 );
quit;
|
create or replace view v_zfdzh_5201_th as
select 0 as sel,
a.msgid,
a.bussid,
b.voucherno,
b.evstatus,
b.voucherid,
b.errorinfo,
a.styear
from ev_send a, ev_send_detail b
where /*a.styear = 2016
and*/ a.vtcode = '5201'
and a.msgstatus = 5
and a.msgid = b.msgid
and b.evstatus in (4, 6)-- 被退回的凭证
and nvl(b.discardbs, 0) = 0 -- 未处理
order by b.voucherno;
|
Create Procedure sp_Insert_ItemsReceivedDetail (@PartyID int,
@ForumCode Varchar(255),
@Product_Code Varchar(20),
@ProductName Varchar(255),
@Description Varchar(255),
@PurchasePrice Decimal(18,6),
@SalePrice Decimal(18,6),
@MRP Decimal(18,6),
@StockNorm Decimal(18,6),
@MOQ Decimal(18,6),
@TrackBatches Int,
@ConversionFactor Decimal(18,6),
@SaleID Int,
@StockistMargin Decimal(18,6),
@RetailerMargin Decimal(18,6),
@CompanyMargin Decimal(18,6),
@ReportingUnit Decimal(18,6),
@TrackPKD Int,
@VirtualTrackBatches Int,
@ManufacturerCode Varchar(255),
@ManufacturerName Varchar(255),
@BrandName Varchar(255),
@UOM Varchar(255),
@ConversionUnit Varchar(255),
@ReportingUOM Varchar(255),
@SoldAs Varchar(255),
@CategoryName Varchar(255),
@CategoryDesc Varchar(255),
@TrackInventory Int,
@PriceOption Int,
@STDesc Varchar(255),
@STLST Decimal(18,6),
@STCST Decimal(18,6),
@PTDesc Varchar(255),
@PTLST Decimal(18,6),
@PTCST Decimal(18,6),
@CategoryPropCount Int,
@ItemPropCount Int,
@CreationDate Datetime,
@ModifiedDate Datetime,
@Active Int,
@PTS Decimal(18,6),
@PTR Decimal(18,6),
@ECP Decimal(18,6),
@CompanyPrice Decimal(18,6),
@PurchasedAt Int,
@CatParent Varchar(255),
@HYPERLINK Varchar(256)='',
@VAT Int = 0,
@COLLECTTAXSUFFERED Int = 0,
@STLSTApplicableOn Int = 1,
@STLSTPartOff Decimal(18,6) = 100,
@STCSTApplicableOn Int = 1,
@STCSTPartOff Decimal(18,6) = 100,
@PTLSTApplicableOn Int = 1,
@PTLSTPartOff Decimal(18,6) = 100,
@PTCSTApplicableOn Int = 1,
@PTCSTPartOff Decimal(18,6) = 100,
@AdhocAmount Decimal(18,6) = 0,
@Taxinclusive int = 0,
@TaxinclusiveRate Decimal(18,6) = 0,
@CaseUOM nvarchar(255) = '',
@CaseConversion Decimal(18,6)= 0
)
As
Insert into ItemsReceivedDetail (PartyID, ForumCode, Product_Code, ProductName,
Description, PurchasePrice, SalePrice, MRP, StockNorm, MinOrderQty, Track_Batches,
ConversionFactor, SaleID, StockistMargin, RetailerMargin, CompanyMargin, ReportingUnit,
TrackPKD, Virtual_Track_Batches, ManufacturerCode, ManufacturerName, BrandName,
UOM, ConversionUnit, ReportingUOM, SoldAs, CategoryName, CategoryDesc,
TrackInventory, PriceOption, STDesc, STLST, STCST, PTDesc, PTLST, PTCST,
CategoryPropCount, ItemPropCount, CreationDate, ModifiedDate, PTS, PTR, ECP,
CompanyPrice, PurchasedAt, ParentCategory, Active, HYPERLINK, VAT, COLLECTTAXSUFFERED,
STLSTApplicableOn, STLSTPartOff, STCSTApplicableOn, STCSTPartOff,
PTLSTApplicableOn, PTLSTPartOff, PTCSTApplicableOn, PTCSTPartOff, AdhocAmount,
Taxinclusive,TaxinclusiveRate, Case_UOM, Case_Conversion)
Values
(@PartyID, @ForumCode, @Product_Code, @ProductName, @Description, @PurchasePrice,
@SalePrice, @MRP, @StockNorm, @MOQ, @TrackBatches,@ConversionFactor, @SaleID,
@StockistMargin, @RetailerMargin, @CompanyMargin, @ReportingUnit, @TrackPKD,
@VirtualTrackBatches, @ManufacturerCode, @ManufacturerName, @BrandName, @UOM,
@ConversionUnit, @ReportingUOM, @SoldAs, @CategoryName, @CategoryDesc,
@TrackInventory, @PriceOption, @STDesc, @STLST, @STCST, @PTDesc,
@PTLST, @PTCST, @CategoryPropCount, @ItemPropCount, @CreationDate, @ModifiedDate, @PTS,
@PTR, @ECP, @CompanyPrice, @PurchasedAt, @CatParent, @Active, @HYPERLINK, @VAT, @COLLECTTAXSUFFERED,
@STLSTApplicableOn, @STLSTPartOff, @STCSTApplicableOn, @STCSTPartOff,
@PTLSTApplicableOn, @PTLSTPartOff, @PTCSTApplicableOn, @PTCSTPartOff, @AdhocAmount,
@Taxinclusive,@TaxinclusiveRate, @CaseUOM, @CaseConversion)
Select @@Identity
|
/*
Get Goals and SLA in one table across all products
*/
-- SELECT * FROM "AO_54307E_TIMEMETRIC";
SELECT
vp."NAME" as "Portal Name",
tm."NAME" as "SLA Name",
g."JQL_QUERY",
cal."NAME" as "Calendar",
g."TARGET_DURATION"/1000/3600 as "Duration in h"
FROM
"AO_54307E_GOAL" g,
"AO_54307E_TIMEMETRIC" tm,
"AO_54307E_VIEWPORT" vp,
"AO_7A2604_CALENDAR" cal
WHERE
g."CALENDAR_ID" = cal."ID"
and g."TIME_METRIC_ID" = tm."ID"
and tm."SERVICE_DESK_ID" = vp."ID"
;
1000/3600 as "Duration in h"
FROM
"AO_54307E_GOAL" g,
"AO_54307E_TIMEMETRIC" tm,
"AO_54307E_VIEWPORT" vp,
"AO_7A2604_CALENDAR" cal
WHERE
g."CALENDAR_ID" = cal."ID"
and g."TIME_METRIC_ID" = tm."ID"
and tm."SERVICE_DESK_ID" = vp."ID"
;
|
DROP TABLE IF EXISTS user_role;
CREATE TABLE user_role(
userId int NOT NULL COMMENT '用户id',
roleId int NOT NULL COMMENT '角色id'
)DEFAULT CHARSET=utf8;
INSERT INTO user_role(userId,roleId)VALUES (1,1);
INSERT INTO user_role(userId,roleId)VALUES (1,3);
INSERT INTO user_role(userId,roleId)VALUES (2,1);
INSERT INTO user_role(userId,roleId)VALUES (3,1);
INSERT INTO user_role(userId,roleId)VALUES (4,1);
INSERT INTO user_role(userId,roleId)VALUES (5,1);
|
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50617
Source Host : localhost:3306
Source Database : test
Target Server Type : MYSQL
Target Server Version : 50617
File Encoding : 65001
Date: 2016-12-19 11:42:18
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for sys_authorities
-- ----------------------------
DROP TABLE IF EXISTS `sys_authorities`;
CREATE TABLE `sys_authorities` (
`id` bigint(20) NOT NULL,
`authority_mark` varchar(255) DEFAULT NULL,
`authority_name` varchar(255) DEFAULT NULL,
`enable` tinyint(1) NOT NULL,
`message` varchar(255) DEFAULT NULL,
`module_id` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of sys_authorities
-- ----------------------------
INSERT INTO `sys_authorities` VALUES ('1', 'createorder', '创建采购订单', '1', ' ', '1');
INSERT INTO `sys_authorities` VALUES ('2', 'auditorder', '审核采购订单', '1', ' ', '2');
-- ----------------------------
-- Table structure for sys_authorities_resources
-- ----------------------------
DROP TABLE IF EXISTS `sys_authorities_resources`;
CREATE TABLE `sys_authorities_resources` (
`authority_id` bigint(20) NOT NULL,
`resource_id` bigint(20) NOT NULL,
KEY `FK_c70f2qag35ebmw5nhs3qr3xbx` (`resource_id`),
KEY `FK_7n0wf51c7kbsfvtr19qy5p7nx` (`authority_id`),
CONSTRAINT `FK_7n0wf51c7kbsfvtr19qy5p7nx` FOREIGN KEY (`authority_id`) REFERENCES `sys_authorities` (`id`),
CONSTRAINT `FK_c70f2qag35ebmw5nhs3qr3xbx` FOREIGN KEY (`resource_id`) REFERENCES `sys_resources` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of sys_authorities_resources
-- ----------------------------
INSERT INTO `sys_authorities_resources` VALUES ('1', '1');
INSERT INTO `sys_authorities_resources` VALUES ('2', '2');
-- ----------------------------
-- Table structure for sys_resources
-- ----------------------------
DROP TABLE IF EXISTS `sys_resources`;
CREATE TABLE `sys_resources` (
`id` bigint(20) NOT NULL,
`enable` int(11) DEFAULT NULL,
`module_id` varchar(255) DEFAULT NULL,
`resource_name` varchar(255) DEFAULT NULL,
`resource_path` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of sys_resources
-- ----------------------------
INSERT INTO `sys_resources` VALUES ('1', '1', '1', '创建采购订单', '/createOrder');
INSERT INTO `sys_resources` VALUES ('2', '1', '2', '审批采购订单', '/auditOrder');
-- ----------------------------
-- Table structure for sys_roles
-- ----------------------------
DROP TABLE IF EXISTS `sys_roles`;
CREATE TABLE `sys_roles` (
`id` bigint(20) NOT NULL,
`enable` int(11) DEFAULT NULL,
`module_id` varchar(255) DEFAULT NULL,
`role_name` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of sys_roles
-- ----------------------------
INSERT INTO `sys_roles` VALUES ('1', '1', '1', 'cgy');
INSERT INTO `sys_roles` VALUES ('2', '1', '2', 'cgjl');
-- ----------------------------
-- Table structure for sys_roles_authorities
-- ----------------------------
DROP TABLE IF EXISTS `sys_roles_authorities`;
CREATE TABLE `sys_roles_authorities` (
`role_id` bigint(20) NOT NULL,
`authority_id` bigint(20) NOT NULL,
KEY `FK_dkh9l7rjxrfg486vytc4wbx4x` (`authority_id`),
KEY `FK_ef555l3uejwmxhxt0fjbl4bdu` (`role_id`),
CONSTRAINT `FK_ef555l3uejwmxhxt0fjbl4bdu` FOREIGN KEY (`role_id`) REFERENCES `sys_roles` (`id`),
CONSTRAINT `FK_dkh9l7rjxrfg486vytc4wbx4x` FOREIGN KEY (`authority_id`) REFERENCES `sys_authorities` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of sys_roles_authorities
-- ----------------------------
INSERT INTO `sys_roles_authorities` VALUES ('1', '1');
INSERT INTO `sys_roles_authorities` VALUES ('2', '2');
-- ----------------------------
-- Table structure for sys_users
-- ----------------------------
DROP TABLE IF EXISTS `sys_users`;
CREATE TABLE `sys_users` (
`id` bigint(20) NOT NULL,
`account_non_expired` tinyint(1) NOT NULL,
`account_non_locked` tinyint(1) NOT NULL,
`credentials_non_expired` tinyint(1) NOT NULL,
`dt_create` datetime DEFAULT NULL,
`enabled` tinyint(1) NOT NULL,
`password` varchar(255) DEFAULT NULL,
`username` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of sys_users
-- ----------------------------
INSERT INTO `sys_users` VALUES ('1', '1', '1', '1', '2016-12-19 11:28:49', '1', 'user1', 'user1');
INSERT INTO `sys_users` VALUES ('2', '1', '1', '1', '2016-12-19 11:29:16', '1', 'user2', 'user2');
-- ----------------------------
-- Table structure for sys_users_roles
-- ----------------------------
DROP TABLE IF EXISTS `sys_users_roles`;
CREATE TABLE `sys_users_roles` (
`user_id` bigint(20) NOT NULL,
`role_id` bigint(20) NOT NULL,
KEY `FK_laitchy0659so1fu7j7841p3s` (`role_id`),
KEY `FK_2hdponpg7247h0udx3fmyg0p2` (`user_id`),
CONSTRAINT `FK_2hdponpg7247h0udx3fmyg0p2` FOREIGN KEY (`user_id`) REFERENCES `sys_users` (`id`),
CONSTRAINT `FK_laitchy0659so1fu7j7841p3s` FOREIGN KEY (`role_id`) REFERENCES `sys_roles` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of sys_users_roles
-- ----------------------------
INSERT INTO `sys_users_roles` VALUES ('1', '1');
INSERT INTO `sys_users_roles` VALUES ('2', '2');
|
BEGIN TRANSACTION;
CREATE TABLE `subjects` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`subject` TEXT,
`code` TEXT,
`level_id` INTEGER,
`ebacc` TEXT,
`tm` INTEGER,
`ks2_prior` TEXT,
FOREIGN KEY(`level_id`) REFERENCES levels(id)
);
CREATE TABLE "students_temporal" (
`upn` TEXT NOT NULL,
`date_id` INTEGER NOT NULL,
`year` INTEGER,
`form` TEXT,
`pp` INTEGER,
PRIMARY KEY(upn,date_id),
FOREIGN KEY(`upn`) REFERENCES students_permanent ( upn ),
FOREIGN KEY(`date_id`) REFERENCES dates(id)
);
CREATE TABLE "students_permanent" (
`upn` TEXT NOT NULL UNIQUE,
`surname` TEXT NOT NULL,
`forename` TEXT NOT NULL,
`eal` INTEGER,
`gender` TEXT NOT NULL,
`ethnicity` TEXT,
`sen_status` TEXT,
`sen_need` TEXT,
`sen_info` TEXT,
`sen_strat` TEXT,
`sen_access` TEXT,
`sen_iep` INTEGER,
`ks2_aps` REAL,
`ks2_band` TEXT,
`ks2_en` TEXT,
`ks2_ma` TEXT,
`ks2_av` TEXT,
`ks2_re` TEXT,
`ks2_wr` INTEGER,
`ks2_gps` TEXT,
PRIMARY KEY(upn)
);
CREATE TABLE "student_results" (
`upn` TEXT,
`resultset_id` INTEGER,
`subject_id` INTEGER,
`grade_id` INTEGER,
`effort` INTEGER,
PRIMARY KEY(upn,resultset_id,subject_id,grade_id),
FOREIGN KEY(`upn`) REFERENCES students_permanent ( upn ),
FOREIGN KEY(`resultset_id`) REFERENCES resultsets ( id ),
FOREIGN KEY(`subject_id`) REFERENCES subjects ( id ),
FOREIGN KEY(`grade_id`) REFERENCES grades ( id )
);
CREATE TABLE "student_classes" (
`upn` TEXT,
`date_id` INTEGER,
`subject_id` INTEGER,
`class` TEXT,
`teacher` TEXT,
PRIMARY KEY(upn,date_id,subject_id),
FOREIGN KEY(`upn`) REFERENCES students ( upn ),
FOREIGN KEY(`date_id`) REFERENCES dates ( id ),
FOREIGN KEY(`subject_id`) REFERENCES subjects ( id )
);
CREATE TABLE `school_years` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`year` TEXT
);
CREATE TABLE "resultsets" (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`resultset` TEXT UNIQUE,
`date` TEXT,
`is_exam` INTEGER,
`list` INTEGER
);
CREATE TABLE "news" (
`date` TEXT,
`comment` TEXT
);
CREATE TABLE `nat_years` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`year` TEXT NOT NULL UNIQUE
);
CREATE TABLE "nat_tms" (
`subject_id` INTEGER,
`ks2` TEXT,
`grade` TEXT,
`probability` REAL,
PRIMARY KEY(subject_id,ks2,grade),
FOREIGN KEY(`subject_id`) REFERENCES nat_tm_subjects ( id )
);
CREATE TABLE "nat_tm_subjects" (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`year_id` INTEGER,
`subject` TEXT,
`level_id` INTEGER,
FOREIGN KEY(`year_id`) REFERENCES nat_years ( id ),
FOREIGN KEY(`level_id`) REFERENCES levels(id)
);
CREATE TABLE "nat_progress8" (
`year_id` INTEGER,
`ks2` TEXT,
`att8` REAL,
`english` REAL,
`maths` REAL,
`ebacc` REAL,
`other` REAL,
PRIMARY KEY(year_id,ks2),
FOREIGN KEY(`year_id`) REFERENCES nat_years ( id )
);
CREATE TABLE `levels` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`level` TEXT,
`is_gcse` INTEGER,
`keystage` INTEGER);
CREATE TABLE `grades` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`level_id` INTEGER,
`grade` TEXT,
`points` INTEGER,
`att8` REAL,
`l1_pass` INTEGER,
`l2_pass` INTEGER,
FOREIGN KEY(`level_id`) REFERENCES levels(id)
);
CREATE TABLE `dates` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`date` TEXT UNIQUE,
`list` INTEGER,
`year_id` INTEGER,
FOREIGN KEY(`year_id`) REFERENCES school_years(id)
);
CREATE TABLE `config` (
`key` TEXT UNIQUE,
`value` TEXT,
PRIMARY KEY(key)
);
CREATE TABLE "attendance_weeks" (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`year_id` INTEGER,
`week_start` TEXT UNIQUE,
FOREIGN KEY(`year_id`) REFERENCES school_years ( id )
);
CREATE TABLE "attendance_weekly" (
`upn` TEXT,
`week_id` INTEGER,
`att_week` REAL,
`poss_year` INTEGER,
`absence_year` INTEGER,
`unauth_year` INTEGER,
PRIMARY KEY(upn,week_id),
FOREIGN KEY(`upn`) REFERENCES students_permanent ( upn ),
FOREIGN KEY(`week_id`) REFERENCES attendance_weeks ( id )
);
CREATE TABLE "attendance_sessions" (
`upn` TEXT,
`year_id` INTEGER,
`mon_am` INTEGER,
`mon_pm` INTEGER,
`tue_am` INTEGER,
`tue_pm` INTEGER,
`wed_am` INTEGER,
`wed_pm` INTEGER,
`thu_am` INTEGER,
`thu_pm` INTEGER,
`fri_am` INTEGER,
`fri_pm` INTEGER,
PRIMARY KEY(upn,year_id),
FOREIGN KEY(`upn`) REFERENCES students_permanent ( upn ),
FOREIGN KEY(`year_id`) REFERENCES school_years ( id )
);
CREATE VIEW tms AS
SELECT year_id, level_id, subject, ks2, grade, probability
FROM nat_tms
INNER JOIN nat_tm_subjects ON subject_id = nat_tm_subjects.id;
CREATE VIEW students AS
SELECT students_permanent.upn as upn, date_id, surname, forename, year, form, pp, eal, gender, ethnicity,
sen_status, sen_need, sen_info, sen_strat, sen_access, sen_iep, ks2_aps, ks2_band, ks2_en, ks2_ma, ks2_av, ks2_re, ks2_wr, ks2_gps
FROM students_permanent
INNER JOIN students_temporal ON students_permanent.upn = students_temporal.upn
INNER JOIN dates ON students_temporal.date_id = dates.id
WHERE dates.list = 1;
CREATE VIEW results AS
SELECT upn, subject_id, subject, resultset_id as resultset, date, is_exam, list, grade, effort, points
FROM student_results
INNER JOIN grades ON grade_id = grades.id
INNER JOIN subjects ON student_results.subject_id = subjects.id
INNER JOIN resultsets ON student_results.resultset_id = resultsets.id;
CREATE VIEW classlist AS
SELECT date_id, subject_id, class, student_classes.upn
FROM student_classes
INNER JOIN students_permanent ON student_classes.upn = students_permanent.upn
ORDER BY (surname || " " || forename);
CREATE VIEW classes_filter AS
SELECT students_temporal.date_id as date_id, subject_id, class, students_permanent.upn as upn, surname, forename, year, pp, eal, gender, ethnicity,
sen_status, ks2_band
FROM students_permanent
INNER JOIN students_temporal ON students_permanent.upn = students_temporal.upn
INNER JOIN student_classes ON (student_classes.upn = students_permanent.upn AND student_classes.date_id = students_temporal.date_id)
INNER JOIN dates ON students_temporal.date_id = dates.id
WHERE dates.list = 1;
CREATE VIEW classes AS
SELECT upn, date_id, subject_id, subject, class, teacher
FROM student_classes
INNER JOIN subjects ON subject_id = subjects.id;
CREATE VIEW attendance AS
SELECT attendance_weekly.upn as upn, attendance_weeks.year_id, week_start, att_week, poss_year, absence_year, unauth_year, mon_am, mon_pm, tue_am, tue_pm, wed_am, wed_pm, thu_am, thu_pm, fri_am, fri_pm
FROM attendance_weekly
INNER JOIN attendance_weeks ON attendance_weekly.week_id = attendance_weeks.id
INNER JOIN attendance_sessions ON (attendance_weekly.upn = attendance_sessions.upn AND attendance_sessions.year_id = attendance_weeks.year_id)
INNER JOIN school_years ON attendance_weeks.year_id = school_years.id;
COMMIT;
|
SET MODE PostgreSQL;
CREATE TABLE IF NOT EXISTS items (
id int PRIMARY KEY auto_increment,
type VARCHAR,
name VARCHAR,
price INT,
dateSold VARCHAR,
sale BOOLEAN,
capacity INT,
color VARCHAR,
gear INT,
purpose VARCHAR
);
CREATE TABLE IF NOT EXISTS orders (
id int PRIMARY KEY auto_increment,
number VARCHAR
);
CREATE TABLE IF NOT EXISTS items_orders (
id int PRIMARY KEY auto_increment,
itemId INTEGER,
orderId INTEGER
); |
insert into meeting(name) values ('meeting 1'), ('meeting 2'), ('meeting 3'), ('meeting 4');
insert into person(name) values ('person1'), ('person2'), ('person3'), ('person4');
insert into meeting_person(person_id, meeting_id, confirmed) values (1, 1, true), (1, 2, false), (2, 2, true), (3, 3, false);
|
CREATE TABLE compra_viaje (
viaje_id DATE NOT NULL,
guia_id VARCHAR2(32) NOT NULL,
cliente_id VARCHAR2(32) NOT NULL,
cant_pagada NUMBER,
fecha DATE DEFAULT SYSDATE,
descuento_neto NUMBER DEFAULT 0,
CONSTRAINT compra_viaje_pk
PRIMARY KEY (viaje_id, guia_id, cliente_id),
CONSTRAINT cv_viaje_fk FOREIGN KEY (viaje_id)
REFERENCES viaje(fecha_inicio) ON DELETE CASCADE,
CONSTRAINT cv_guia_fk FOREIGN KEY (guia_id)
REFERENCES guia(persona_id) ON DELETE CASCADE,
CONSTRAINT cv_cliente_fk FOREIGN KEY (cliente_id)
REFERENCES cliente(id) ON DELETE CASCADE
);
|
/*
Navicat MySQL Data Transfer
Source Server : locast_3306
Source Server Version : 50624
Source Host : localhost:3306
Source Database : qhgame
Target Server Type : MYSQL
Target Server Version : 50624
File Encoding : 65001
Date: 2017-02-25 01:59:06
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `qhgame_login`
-- ----------------------------
DROP TABLE IF EXISTS `qhgame_login`;
CREATE TABLE `qhgame_login` (
`user_id` int(11) NOT NULL AUTO_INCREMENT,
`user_name` varchar(100) DEFAULT NULL,
`user_pwd` varchar(100) DEFAULT NULL,
`user_money` int(200) DEFAULT NULL,
`user_v` varchar(20) DEFAULT NULL,
`user_title` varchar(100) DEFAULT NULL,
`user_power` int(100) DEFAULT NULL,
`user_combat` int(200) DEFAULT NULL,
`user_chapter` int(200) DEFAULT NULL,
`carid` varchar(100) DEFAULT NULL,
PRIMARY KEY (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=126 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of qhgame_login
-- ----------------------------
INSERT INTO `qhgame_login` VALUES ('98', 'tang', '123456', '36830', null, null, '70', '3060', '1', ',2,6,10,1');
INSERT INTO `qhgame_login` VALUES ('99', '德玛西亚', '123456', '18', null, null, '100', '720', null, ',3');
INSERT INTO `qhgame_login` VALUES ('100', 'tang12', '123456', '12404', null, null, '40', '4133', '1', ',1,2,3,4,5');
INSERT INTO `qhgame_login` VALUES ('101', '你们都是菜鸡', '123456', '40200', null, null, '100', '2121', null, ',4,2,9');
INSERT INTO `qhgame_login` VALUES ('102', '大门五郎', '123456', '7538', null, null, '100', '703', null, ',6');
INSERT INTO `qhgame_login` VALUES ('103', '东丈', '123456', '7538', null, null, '100', '664', null, ',7');
INSERT INTO `qhgame_login` VALUES ('104', '金家潘', '123456', '7538', null, null, '100', '675', null, ',8');
INSERT INTO `qhgame_login` VALUES ('105', 'KING', '123456', '5738', null, null, '100', '667', null, ',9');
INSERT INTO `qhgame_login` VALUES ('106', '克拉克', '123456', '5738', null, null, '100', '687', null, ',10');
INSERT INTO `qhgame_login` VALUES ('107', '拉尔夫', '123456', '5738', null, null, '100', '668', null, ',11');
INSERT INTO `qhgame_login` VALUES ('108', '陈国汉', '123456', '7538', null, null, '100', '712', null, ',5');
INSERT INTO `qhgame_login` VALUES ('109', '莉安娜', '123456', '5738', null, null, '100', '684', null, ',12');
INSERT INTO `qhgame_login` VALUES ('110', '麻宫雅典娜', '123456', '4088', null, null, '100', '637', null, ',13');
INSERT INTO `qhgame_login` VALUES ('111', '玛丽', '123456', '4085', null, null, '100', '619', null, ',14');
INSERT INTO `qhgame_login` VALUES ('112', '特瑞', '123456', '4085', null, null, '100', '669', null, ',15');
INSERT INTO `qhgame_login` VALUES ('113', '镇元斋', '123456', '4081', null, null, '100', '650', null, ',16');
INSERT INTO `qhgame_login` VALUES ('114', '罗伯特', '123456', '2581', null, null, '100', '791', null, ',17');
INSERT INTO `qhgame_login` VALUES ('115', '神乐千鹤', '123456', '2583', null, null, '100', '667', null, ',18');
INSERT INTO `qhgame_login` VALUES ('116', '不知火舞', '123456', '2584', null, null, '100', '1058', null, ',19');
INSERT INTO `qhgame_login` VALUES ('117', '椎拳崇', '123456', '2581', null, null, '100', '1177', null, ',20');
INSERT INTO `qhgame_login` VALUES ('118', '草稚京', '123456', '1088', null, null, '100', '1350', null, ',21');
INSERT INTO `qhgame_login` VALUES ('119', '红丸', '123456', '1088', null, null, '100', '1130', null, ',22');
INSERT INTO `qhgame_login` VALUES ('120', '八神', '123456', '1088', null, null, '100', '1350', null, ',23');
INSERT INTO `qhgame_login` VALUES ('121', '七枷社', '123456', '1088', null, null, '100', '1390', null, ',24');
INSERT INTO `qhgame_login` VALUES ('122', '山崎龙二', '123456', '1088', null, null, '100', '1189', null, ',25');
INSERT INTO `qhgame_login` VALUES ('123', '比利', '123456', '1088', null, null, '100', '1026', null, ',26');
INSERT INTO `qhgame_login` VALUES ('124', '克里斯', '123456', '56888', null, null, '100', '1680', null, ',27');
INSERT INTO `qhgame_login` VALUES ('125', '大蛇', '123456', '8800000', null, null, '100', '11443', null, ',28');
|
UPDATE Usuario SET SENHA = '53aa16ffad92e1f4b211e061e461ca53' WHERE Id_Usuario = 1;
commit; |
--Left Join
SELECT *
FROM [P12-ListOfOrders] as A
LEFT JOIN [P12-OrderBreakdown] as B
ON A.[Order ID] = B.[Order ID]
-- Link: https://www.w3schools.com/sql/sql_join.asp
|
CREATE TABLE `file` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`name` varchar(45) NOT NULL,
`mime_type` varchar(45) NOT NULL,
`file` blob NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `name_UNIQUE` (`name`),
UNIQUE KEY `mime_type_UNIQUE` (`mime_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
CREATE DATABASE fresher_training_management;
USE fresher_training_management;
CREATE TABLE trainee_table(
trainee_id INT,
full_fame VARCHAR(50),
birth_date DATE,
gender VARCHAR(30) CHECK(gender='male' or gender='female' or gender='unknown'),
et_eq INT CHECK(et_eq>=0 and et_eq<=20),
et_gmath INT CHECK(et_gmath>=0 and et_gmath<=20),
et_english INT CHECK(et_english>=0 and et_english<=50),
training_class INT,
evaluation TEXT
);
|
-- 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 zeusco_mundial2018
-- -----------------------------------------------------
DROP SCHEMA IF EXISTS `zeusco_mundial2018` ;
-- -----------------------------------------------------
-- Schema zeusco_mundial2018
-- -----------------------------------------------------
CREATE SCHEMA IF NOT EXISTS `zeusco_mundial2018` DEFAULT CHARACTER SET utf8 ;
USE `zeusco_mundial2018` ;
-- -----------------------------------------------------
-- Table `zeusco_mundial2018`.`empleado`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `zeusco_mundial2018`.`empleado` ;
CREATE TABLE IF NOT EXISTS `zeusco_mundial2018`.`empleado` (
`id` INT NOT NULL AUTO_INCREMENT,
`nombre` VARCHAR(45) NULL DEFAULT NULL,
`email` VARCHAR(45) NULL DEFAULT NULL,
PRIMARY KEY (`id`))
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;
-- -----------------------------------------------------
-- Table `zeusco_mundial2018`.`ronda`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `zeusco_mundial2018`.`ronda` ;
CREATE TABLE IF NOT EXISTS `zeusco_mundial2018`.`ronda` (
`id` INT NOT NULL AUTO_INCREMENT,
`nombre` VARCHAR(45) NULL,
`fecha` DATE NULL,
PRIMARY KEY (`id`))
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `zeusco_mundial2018`.`partido`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `zeusco_mundial2018`.`partido` ;
CREATE TABLE IF NOT EXISTS `zeusco_mundial2018`.`partido` (
`id` INT NOT NULL AUTO_INCREMENT,
`fecha` DATE NULL DEFAULT NULL,
`lugar` VARCHAR(45) NULL DEFAULT NULL,
`equipo1` INT NULL DEFAULT NULL,
`golesEquipo1` INT NULL DEFAULT NULL,
`penalesEquipo1` INT NULL DEFAULT 0,
`equipo2` INT NULL DEFAULT NULL,
`golesEquipo2` INT NULL DEFAULT NULL,
`penalesEquipo2` INT NULL DEFAULT 0,
`editado` BIT NULL DEFAULT 0,
`ronda_id` INT NOT NULL,
PRIMARY KEY (`id`),
INDEX `fk_partido_ronda1_idx` (`ronda_id` ASC),
CONSTRAINT `fk_partido_ronda1`
FOREIGN KEY (`ronda_id`)
REFERENCES `zeusco_mundial2018`.`ronda` (`id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;
-- -----------------------------------------------------
-- Table `zeusco_mundial2018`.`apuesta`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `zeusco_mundial2018`.`apuesta` ;
CREATE TABLE IF NOT EXISTS `zeusco_mundial2018`.`apuesta` (
`id` INT NOT NULL AUTO_INCREMENT,
`equipo1` VARCHAR(45) NULL DEFAULT NULL,
`golesEquipo1` INT NULL DEFAULT NULL,
`equipo2` VARCHAR(45) NULL DEFAULT NULL,
`golesEquipo2` INT NULL DEFAULT NULL,
`Empleado_id` INT NOT NULL,
`partido_id` INT NOT NULL,
PRIMARY KEY (`id`),
INDEX `fk_Apuesta_Empleado1_idx` (`Empleado_id` ASC),
INDEX `fk_apuesta_partido1_idx` (`partido_id` ASC),
CONSTRAINT `fk_Apuesta_Empleado1`
FOREIGN KEY (`Empleado_id`)
REFERENCES `zeusco_mundial2018`.`empleado` (`id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `fk_apuesta_partido1`
FOREIGN KEY (`partido_id`)
REFERENCES `zeusco_mundial2018`.`partido` (`id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;
-- -----------------------------------------------------
-- Table `zeusco_mundial2018`.`grupo`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `zeusco_mundial2018`.`grupo` ;
CREATE TABLE IF NOT EXISTS `zeusco_mundial2018`.`grupo` (
`id` INT NOT NULL AUTO_INCREMENT,
`nombre` VARCHAR(45) NULL DEFAULT NULL,
PRIMARY KEY (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 10
DEFAULT CHARACTER SET = utf8;
-- -----------------------------------------------------
-- Table `zeusco_mundial2018`.`equipo`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `zeusco_mundial2018`.`equipo` ;
CREATE TABLE IF NOT EXISTS `zeusco_mundial2018`.`equipo` (
`id` INT NOT NULL AUTO_INCREMENT,
`nombre` VARCHAR(45) NULL DEFAULT NULL,
`jugados` INT NULL DEFAULT 0,
`ganados` INT NULL DEFAULT 0,
`perdidos` INT NULL DEFAULT 0,
`empatados` INT NULL DEFAULT 0,
`golesFavor` INT NULL DEFAULT 0,
`golesContra` INT NULL DEFAULT 0,
`puntos` INT NULL DEFAULT 0,
`Grupo_id` INT NOT NULL,
PRIMARY KEY (`id`),
INDEX `fk_Equipo_Grupo1_idx` (`Grupo_id` ASC),
CONSTRAINT `fk_Equipo_Grupo1`
FOREIGN KEY (`Grupo_id`)
REFERENCES `zeusco_mundial2018`.`grupo` (`id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;
-- -----------------------------------------------------
-- Table `zeusco_mundial2018`.`login`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `zeusco_mundial2018`.`login` ;
CREATE TABLE IF NOT EXISTS `zeusco_mundial2018`.`login` (
`id` INT NOT NULL AUTO_INCREMENT,
`username` VARCHAR(45) NULL DEFAULT NULL,
`password` VARCHAR(45) NULL DEFAULT NULL,
`rol` VARCHAR(45) NULL DEFAULT NULL,
`Empleado_id` INT NOT NULL,
PRIMARY KEY (`id`, `Empleado_id`),
UNIQUE INDEX `user_UNIQUE` (`username` ASC),
INDEX `fk_User_Empleado1_idx` (`Empleado_id` ASC),
CONSTRAINT `fk_User_Empleado1`
FOREIGN KEY (`Empleado_id`)
REFERENCES `zeusco_mundial2018`.`empleado` (`id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;
-- -----------------------------------------------------
-- Table `zeusco_mundial2018`.`resultado`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `zeusco_mundial2018`.`resultado` ;
CREATE TABLE IF NOT EXISTS `zeusco_mundial2018`.`resultado` (
`id` INT NOT NULL AUTO_INCREMENT,
`partidosExactos` INT NULL,
`partidosGanados` INT NULL,
`partidosEmpatados` INT NULL,
`puntos` INT NULL,
`empleado_id` INT NOT NULL,
PRIMARY KEY (`id`),
INDEX `fk_resultado_empleado1_idx` (`empleado_id` ASC),
UNIQUE INDEX `empleado_id_UNIQUE` (`empleado_id` ASC),
CONSTRAINT `fk_resultado_empleado1`
FOREIGN KEY (`empleado_id`)
REFERENCES `zeusco_mundial2018`.`empleado` (`id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `zeusco_mundial2018`.`equipo_hist`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `zeusco_mundial2018`.`equipo_hist` ;
CREATE TABLE IF NOT EXISTS `zeusco_mundial2018`.`equipo_hist` (
`id` INT NOT NULL AUTO_INCREMENT,
`jugados` INT NULL,
`ganados` INT NULL,
`perdidos` INT NULL,
`empatados` INT NULL,
`golesFavor` INT NULL,
`golesContra` INT NULL,
`puntos` INT NULL,
`equipo_id` INT NULL,
`grupo_id` INT NULL,
`fechaModificacion` DATETIME NULL,
PRIMARY KEY (`id`))
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `zeusco_mundial2018`.`resultado_hist`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `zeusco_mundial2018`.`resultado_hist` ;
CREATE TABLE IF NOT EXISTS `zeusco_mundial2018`.`resultado_hist` (
`id` INT NOT NULL AUTO_INCREMENT,
`partidosExactos` INT NULL,
`partidosGanados` INT NULL,
`partidosEmpatados` INT NULL,
`puntos` INT NULL,
`empleado_id` INT NULL,
`fechaModificacion` DATETIME NULL,
PRIMARY KEY (`id`))
ENGINE = InnoDB;
USE `zeusco_mundial2018`;
DELIMITER $$
USE `zeusco_mundial2018`$$
DROP TRIGGER IF EXISTS `zeusco_mundial2018`.`equipo_AFTER_UPDATE` $$
USE `zeusco_mundial2018`$$
CREATE DEFINER = CURRENT_USER TRIGGER `zeusco_mundial2018`.`equipo_AFTER_UPDATE` AFTER UPDATE ON `equipo` FOR EACH ROW
BEGIN
insert into `zeusco_mundial2018`.`equipo_hist` (`id`,`jugados`,`ganados`,`perdidos`,`empatados`,`golesFavor`,`golesContra`,`puntos`,`equipo_id`,`grupo_id`,`fechaModificacion`) values (null, OLD.jugados, OLD.ganados, OLD.perdidos, OLD.empatados, OLD.golesFavor, OLD.golesContra, OLD.puntos, OLD.id, OLD.grupo_id, now());
END$$
USE `zeusco_mundial2018`$$
DROP TRIGGER IF EXISTS `zeusco_mundial2018`.`resultado_AFTER_UPDATE` $$
USE `zeusco_mundial2018`$$
CREATE DEFINER = CURRENT_USER TRIGGER `zeusco_mundial2018`.`resultado_AFTER_UPDATE` AFTER UPDATE ON `resultado` FOR EACH ROW
BEGIN
insert into `zeusco_mundial2018`.`resultado_hist` (`id`,`partidosExactos`,`partidosGanados`,`partidosEmpatados`,`puntos`,`empleado_id`,`fechaModificacion`) values (null, OLD.partidosExactos, OLD.partidosGanados, OLD.partidosEmpatados, OLD.puntos, OLD.empleado_id, now());
END$$
USE `zeusco_mundial2018`$$
DROP TRIGGER IF EXISTS `zeusco_mundial2018`.`equipo_AFTER_INSERT` $$
USE `zeusco_mundial2018`$$
CREATE DEFINER = CURRENT_USER TRIGGER `zeusco_mundial2018`.`equipo_AFTER_INSERT` AFTER INSERT ON `equipo` FOR EACH ROW
BEGIN
insert into `zeusco_mundial2018`.`equipo_hist` (`id`,`jugados`,`ganados`,`perdidos`,`empatados`,`golesFavor`,`golesContra`,`puntos`,`equipo_id`,`grupo_id`,`fechaModificacion`) values (null, 0, 0, 0, 0, 0, 0, 0, NEW.id, NEW.grupo_id, now() - interval 1 day);
END$$
USE `zeusco_mundial2018`$$
DROP TRIGGER IF EXISTS `zeusco_mundial2018`.`resultado_AFTER_INSERT` $$
USE `zeusco_mundial2018`$$
CREATE DEFINER = CURRENT_USER TRIGGER `zeusco_mundial2018`.`resultado_AFTER_INSERT` AFTER INSERT ON `resultado` FOR EACH ROW
BEGIN
insert into `zeusco_mundial2018`.`resultado_hist` (`id`,`partidosExactos`,`partidosGanados`,`partidosEmpatados`,`puntos`,`empleado_id`,`fechaModificacion`) values (null, 0, 0, 0, 0, new.empleado_id, now() - interval 1 day);
END$$
DELIMITER ;
SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
-- -----------------------------------------------------
-- Data for table `zeusco_mundial2018`.`empleado`
-- -----------------------------------------------------
START TRANSACTION;
USE `zeusco_mundial2018`;
INSERT INTO `zeusco_mundial2018`.`empleado` (`id`, `nombre`, `email`) VALUES (1, 'Administrador', 'admin');
COMMIT;
-- -----------------------------------------------------
-- Data for table `zeusco_mundial2018`.`ronda`
-- -----------------------------------------------------
START TRANSACTION;
USE `zeusco_mundial2018`;
INSERT INTO `zeusco_mundial2018`.`ronda` (`id`, `nombre`, `fecha`) VALUES (1, 'Fase de grupos', '2018-06-14');
INSERT INTO `zeusco_mundial2018`.`ronda` (`id`, `nombre`, `fecha`) VALUES (2, 'Fase de grupos', '2018-06-15');
INSERT INTO `zeusco_mundial2018`.`ronda` (`id`, `nombre`, `fecha`) VALUES (3, 'Fase de grupos', '2018-06-16');
INSERT INTO `zeusco_mundial2018`.`ronda` (`id`, `nombre`, `fecha`) VALUES (4, 'Fase de grupos', '2018-06-17');
INSERT INTO `zeusco_mundial2018`.`ronda` (`id`, `nombre`, `fecha`) VALUES (5, 'Fase de grupos', '2018-06-18');
INSERT INTO `zeusco_mundial2018`.`ronda` (`id`, `nombre`, `fecha`) VALUES (6, 'Fase de grupos', '2018-06-19');
INSERT INTO `zeusco_mundial2018`.`ronda` (`id`, `nombre`, `fecha`) VALUES (7, 'Fase de grupos', '2018-06-20');
INSERT INTO `zeusco_mundial2018`.`ronda` (`id`, `nombre`, `fecha`) VALUES (8, 'Fase de grupos', '2018-06-21');
INSERT INTO `zeusco_mundial2018`.`ronda` (`id`, `nombre`, `fecha`) VALUES (9, 'Fase de grupos', '2018-06-22');
INSERT INTO `zeusco_mundial2018`.`ronda` (`id`, `nombre`, `fecha`) VALUES (10, 'Fase de grupos', '2018-06-23');
INSERT INTO `zeusco_mundial2018`.`ronda` (`id`, `nombre`, `fecha`) VALUES (11, 'Fase de grupos', '2018-06-24');
INSERT INTO `zeusco_mundial2018`.`ronda` (`id`, `nombre`, `fecha`) VALUES (12, 'Fase de grupos', '2018-06-25');
INSERT INTO `zeusco_mundial2018`.`ronda` (`id`, `nombre`, `fecha`) VALUES (13, 'Fase de grupos', '2018-06-26');
INSERT INTO `zeusco_mundial2018`.`ronda` (`id`, `nombre`, `fecha`) VALUES (14, 'Fase de grupos', '2018-06-27');
INSERT INTO `zeusco_mundial2018`.`ronda` (`id`, `nombre`, `fecha`) VALUES (15, 'Fase de grupos', '2018-06-28');
INSERT INTO `zeusco_mundial2018`.`ronda` (`id`, `nombre`, `fecha`) VALUES (16, 'Octavos de final', '2018-06-30');
INSERT INTO `zeusco_mundial2018`.`ronda` (`id`, `nombre`, `fecha`) VALUES (17, 'Octavos de final', '2018-07-01');
INSERT INTO `zeusco_mundial2018`.`ronda` (`id`, `nombre`, `fecha`) VALUES (18, 'Octavos de final', '2018-07-02');
INSERT INTO `zeusco_mundial2018`.`ronda` (`id`, `nombre`, `fecha`) VALUES (19, 'Octavos de final', '2018-07-03');
INSERT INTO `zeusco_mundial2018`.`ronda` (`id`, `nombre`, `fecha`) VALUES (20, 'Cuartos de final', '2018-07-06');
INSERT INTO `zeusco_mundial2018`.`ronda` (`id`, `nombre`, `fecha`) VALUES (21, 'Cuartos de final', '2018-07-07');
INSERT INTO `zeusco_mundial2018`.`ronda` (`id`, `nombre`, `fecha`) VALUES (22, 'Semifinales', '2018-07-10');
INSERT INTO `zeusco_mundial2018`.`ronda` (`id`, `nombre`, `fecha`) VALUES (23, 'Semifinales', '2018-07-11');
INSERT INTO `zeusco_mundial2018`.`ronda` (`id`, `nombre`, `fecha`) VALUES (24, 'Partido por el tercer lugar', '2018-07-14');
INSERT INTO `zeusco_mundial2018`.`ronda` (`id`, `nombre`, `fecha`) VALUES (25, 'Final', '2018-07-15');
COMMIT;
-- -----------------------------------------------------
-- Data for table `zeusco_mundial2018`.`partido`
-- -----------------------------------------------------
START TRANSACTION;
USE `zeusco_mundial2018`;
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (1, '2018-06-14', 'Luzhniki Stadium', 1, NULL, NULL, 2, NULL, NULL, 0, 1);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (2, '2018-06-15', 'Ekaterinburg Arena', 3, NULL, NULL, 4, NULL, NULL, 0, 2);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (3, '2018-06-15', 'Estadio de San Petersburgo', 7, NULL, NULL, 8, NULL, NULL, 0, 2);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (4, '2018-06-15', 'Fisht Stadium', 5, NULL, NULL, 6, NULL, NULL, 0, 2);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (5, '2018-06-16', 'Kazan Arena', 9, NULL, NULL, 10, NULL, NULL, 0, 3);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (6, '2018-06-16', 'Spartak Stadium', 13, NULL, NULL, 14, NULL, NULL, 0, 3);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (7, '2018-06-16', 'Mordovia Arena', 11, NULL, NULL, 12, NULL, NULL, 0, 3);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (8, '2018-06-16', 'Kaliningrad Stadium', 15, NULL, NULL, 16, NULL, NULL, 0, 3);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (9, '2018-06-17', 'Samara Arena', 19, NULL, NULL, 20, NULL, NULL, 0, 4);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (10, '2018-06-17', 'Luzhniki Stadium', 21, NULL, NULL, 22, NULL, NULL, 0, 4);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (11, '2018-06-17', 'Rostov Arena', 17, NULL, NULL, 18, NULL, NULL, 0, 4);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (12, '2018-06-18', 'Nizhny Novgorod Stadium', 23, NULL, NULL, 24, NULL, NULL, 0, 5);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (13, '2018-06-18', 'Fisht Stadium', 25, NULL, NULL, 26, NULL, NULL, 0, 5);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (14, '2018-06-18', 'Volgograd Arena', 27, NULL, NULL, 28, NULL, NULL, 0, 5);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (15, '2018-06-19', 'Mordovia Arena', 31, NULL, NULL, 32, NULL, NULL, 0, 6);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (16, '2018-06-19', 'Spartak Stadium', 29, NULL, NULL, 30, NULL, NULL, 0, 6);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (17, '2018-06-19', 'Estadio de San Petersburgo', 1, NULL, NULL, 3, NULL, NULL, 0, 6);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (18, '2018-06-20', 'Luzhniki Stadium', 5, NULL, NULL, 7, NULL, NULL, 0, 7);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (19, '2018-06-20', 'Rostov Arena', 4, NULL, NULL, 2, NULL, NULL, 0, 7);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (20, '2018-06-20', 'Kazan Arena', 8, NULL, NULL, 6, NULL, NULL, 0, 7);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (21, '2018-06-21', 'Samara Arena', 12, NULL, NULL, 10, NULL, NULL, 0, 8);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (22, '2018-06-21', 'Ekaterinburg Arena', 9, NULL, NULL, 11, NULL, NULL, 0, 8);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (23, '2018-06-21', 'Nizhny Novgorod Stadium', 13, NULL, NULL, 15, NULL, NULL, 0, 8);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (24, '2018-06-22', 'Estadio de San Petersburgo', 17, NULL, NULL, 19, NULL, NULL, 0, 9);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (25, '2018-06-22', 'Volgograd Arena', 16, NULL, NULL, 14, NULL, NULL, 0, 9);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (27, '2018-06-22', 'Kaliningrad Stadium', 20, NULL, NULL, 18, NULL, NULL, 0, 9);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (28, '2018-06-23', 'Spartak Stadium', 25, NULL, NULL, 27, NULL, NULL, 0, 10);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (29, '2018-06-23', 'Rostov Arena', 24, NULL, NULL, 22, NULL, NULL, 0, 10);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (30, '2018-06-23', 'Fisht Stadium', 21, NULL, NULL, 23, NULL, NULL, 0, 10);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (31, '2018-06-24', 'Nizhny Novgorod Stadium', 28, NULL, NULL, 26, NULL, NULL, 0, 11);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (32, '2018-06-24', 'Ekaterinburg Arena', 32, NULL, NULL, 30, NULL, NULL, 0, 11);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (33, '2018-06-24', 'Kazan Arena', 29, NULL, NULL, 31, NULL, NULL, 0, 11);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (34, '2018-06-25', 'Samara Arena', 4, NULL, NULL, 1, NULL, NULL, 0, 12);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (35, '2018-06-25', 'Volgograd Arena', 2, NULL, NULL, 3, NULL, NULL, 0, 12);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (36, '2018-06-25', 'Kaliningrad Stadium', 6, NULL, NULL, 7, NULL, NULL, 0, 12);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (37, '2018-06-25', 'Mordovia Arena', 8, NULL, NULL, 5, NULL, NULL, 0, 12);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (38, '2018-06-26', 'Fisht Stadium', 10, NULL, NULL, 11, NULL, NULL, 0, 13);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (39, '2018-06-26', 'Luzhniki Stadium', 12, NULL, NULL, 9, NULL, NULL, 0, 13);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (40, '2018-06-26', 'Estadio de San Petersburgo', 16, NULL, NULL, 13, NULL, NULL, 0, 13);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (41, '2018-06-26', 'Rostov Arena', 14, NULL, NULL, 15, NULL, NULL, 0, 13);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (42, '2018-06-27', 'Kazan Arena', 24, NULL, NULL, 21, NULL, NULL, 0, 14);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (43, '2018-06-27', 'Ekaterinburg Arena', 22, NULL, NULL, 23, NULL, NULL, 0, 14);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (44, '2018-06-27', 'Spartak Stadium', 20, NULL, NULL, 17, NULL, NULL, 0, 14);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (45, '2018-06-27', 'Nizhny Novgorod Stadium', 18, NULL, NULL, 19, NULL, NULL, 0, 14);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (46, '2018-06-28', 'Volgograd Arena', 32, NULL, NULL, 29, NULL, NULL, 0, 15);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (47, '2018-06-28', 'Samara Arena', 30, NULL, NULL, 31, NULL, NULL, 0, 15);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (48, '2018-06-28', 'Mordovia Arena', 26, NULL, NULL, 27, NULL, NULL, 0, 15);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (49, '2018-06-28', 'Kaliningrad Stadium', 28, NULL, NULL, 25, NULL, NULL, 0, 15);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (50, '2018-06-30', 'Kazan Arena', NULL, NULL, NULL, NULL, NULL, NULL, 0, 16);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (51, '2018-06-30', 'Fisht Stadium', NULL, NULL, NULL, NULL, NULL, NULL, 0, 16);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (52, '2018-07-01', 'Luzhniki Stadium', NULL, NULL, NULL, NULL, NULL, NULL, 0, 17);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (53, '2018-07-01', 'Nizhny Novgorod Stadium', NULL, NULL, NULL, NULL, NULL, NULL, 0, 17);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (54, '2018-07-02', 'Samara Arena', NULL, NULL, NULL, NULL, NULL, NULL, 0, 18);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (55, '2018-07-02', 'Rostov Arena', NULL, NULL, NULL, NULL, NULL, NULL, 0, 18);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (56, '2018-07-03', 'Estadio de San Petersburgo', NULL, NULL, NULL, NULL, NULL, NULL, 0, 19);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (57, '2018-07-03', 'Spartak Stadium', NULL, NULL, NULL, NULL, NULL, NULL, 0, 19);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (58, '2018-07-06', 'Nizhny Novgorod Stadium', NULL, NULL, NULL, NULL, NULL, NULL, 0, 20);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (59, '2018-07-06', 'Kazan Arena', NULL, NULL, NULL, NULL, NULL, NULL, 0, 20);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (60, '2018-07-07', 'Samara Arena', NULL, NULL, NULL, NULL, NULL, NULL, 0, 21);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (61, '2018-07-07', 'Fisht Stadium', NULL, NULL, NULL, NULL, NULL, NULL, 0, 21);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (62, '2018-07-10', 'Estadio de San Petersburgo', NULL, NULL, NULL, NULL, NULL, NULL, 0, 22);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (63, '2018-07-11', 'Luzhniki Stadium', NULL, NULL, NULL, NULL, NULL, NULL, 0, 23);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (64, '2018-07-14', 'Estadio de San Petersburgo', NULL, NULL, NULL, NULL, NULL, NULL, 0, 24);
INSERT INTO `zeusco_mundial2018`.`partido` (`id`, `fecha`, `lugar`, `equipo1`, `golesEquipo1`, `penalesEquipo1`, `equipo2`, `golesEquipo2`, `penalesEquipo2`, `editado`, `ronda_id`) VALUES (65, '2018-07-15', 'Luzhniki Stadium', NULL, NULL, NULL, NULL, NULL, NULL, 0, 25);
COMMIT;
-- -----------------------------------------------------
-- Data for table `zeusco_mundial2018`.`grupo`
-- -----------------------------------------------------
START TRANSACTION;
USE `zeusco_mundial2018`;
INSERT INTO `zeusco_mundial2018`.`grupo` (`id`, `nombre`) VALUES (1, 'A');
INSERT INTO `zeusco_mundial2018`.`grupo` (`id`, `nombre`) VALUES (2, 'B');
INSERT INTO `zeusco_mundial2018`.`grupo` (`id`, `nombre`) VALUES (3, 'C');
INSERT INTO `zeusco_mundial2018`.`grupo` (`id`, `nombre`) VALUES (4, 'D');
INSERT INTO `zeusco_mundial2018`.`grupo` (`id`, `nombre`) VALUES (5, 'E');
INSERT INTO `zeusco_mundial2018`.`grupo` (`id`, `nombre`) VALUES (6, 'F');
INSERT INTO `zeusco_mundial2018`.`grupo` (`id`, `nombre`) VALUES (7, 'G');
INSERT INTO `zeusco_mundial2018`.`grupo` (`id`, `nombre`) VALUES (8, 'H');
COMMIT;
-- -----------------------------------------------------
-- Data for table `zeusco_mundial2018`.`equipo`
-- -----------------------------------------------------
START TRANSACTION;
USE `zeusco_mundial2018`;
INSERT INTO `zeusco_mundial2018`.`equipo` (`id`, `nombre`, `jugados`, `ganados`, `perdidos`, `empatados`, `golesFavor`, `golesContra`, `puntos`, `Grupo_id`) VALUES (1, 'Rusia', 0, 0, 0, 0, 0, 0, 0, 1);
INSERT INTO `zeusco_mundial2018`.`equipo` (`id`, `nombre`, `jugados`, `ganados`, `perdidos`, `empatados`, `golesFavor`, `golesContra`, `puntos`, `Grupo_id`) VALUES (2, 'Arabia Saudí', 0, 0, 0, 0, 0, 0, 0, 1);
INSERT INTO `zeusco_mundial2018`.`equipo` (`id`, `nombre`, `jugados`, `ganados`, `perdidos`, `empatados`, `golesFavor`, `golesContra`, `puntos`, `Grupo_id`) VALUES (3, 'Egipto', 0, 0, 0, 0, 0, 0, 0, 1);
INSERT INTO `zeusco_mundial2018`.`equipo` (`id`, `nombre`, `jugados`, `ganados`, `perdidos`, `empatados`, `golesFavor`, `golesContra`, `puntos`, `Grupo_id`) VALUES (4, 'Uruguay', 0, 0, 0, 0, 0, 0, 0, 1);
INSERT INTO `zeusco_mundial2018`.`equipo` (`id`, `nombre`, `jugados`, `ganados`, `perdidos`, `empatados`, `golesFavor`, `golesContra`, `puntos`, `Grupo_id`) VALUES (5, 'Portugal', 0, 0, 0, 0, 0, 0, 0, 2);
INSERT INTO `zeusco_mundial2018`.`equipo` (`id`, `nombre`, `jugados`, `ganados`, `perdidos`, `empatados`, `golesFavor`, `golesContra`, `puntos`, `Grupo_id`) VALUES (6, 'España', 0, 0, 0, 0, 0, 0, 0, 2);
INSERT INTO `zeusco_mundial2018`.`equipo` (`id`, `nombre`, `jugados`, `ganados`, `perdidos`, `empatados`, `golesFavor`, `golesContra`, `puntos`, `Grupo_id`) VALUES (7, 'Marruecos', 0, 0, 0, 0, 0, 0, 0, 2);
INSERT INTO `zeusco_mundial2018`.`equipo` (`id`, `nombre`, `jugados`, `ganados`, `perdidos`, `empatados`, `golesFavor`, `golesContra`, `puntos`, `Grupo_id`) VALUES (8, 'RI de Irán', 0, 0, 0, 0, 0, 0, 0, 2);
INSERT INTO `zeusco_mundial2018`.`equipo` (`id`, `nombre`, `jugados`, `ganados`, `perdidos`, `empatados`, `golesFavor`, `golesContra`, `puntos`, `Grupo_id`) VALUES (9, 'Francia', 0, 0, 0, 0, 0, 0, 0, 3);
INSERT INTO `zeusco_mundial2018`.`equipo` (`id`, `nombre`, `jugados`, `ganados`, `perdidos`, `empatados`, `golesFavor`, `golesContra`, `puntos`, `Grupo_id`) VALUES (10, 'Australia', 0, 0, 0, 0, 0, 0, 0, 3);
INSERT INTO `zeusco_mundial2018`.`equipo` (`id`, `nombre`, `jugados`, `ganados`, `perdidos`, `empatados`, `golesFavor`, `golesContra`, `puntos`, `Grupo_id`) VALUES (11, 'Perú', 0, 0, 0, 0, 0, 0, 0, 3);
INSERT INTO `zeusco_mundial2018`.`equipo` (`id`, `nombre`, `jugados`, `ganados`, `perdidos`, `empatados`, `golesFavor`, `golesContra`, `puntos`, `Grupo_id`) VALUES (12, 'Dinamarca', 0, 0, 0, 0, 0, 0, 0, 3);
INSERT INTO `zeusco_mundial2018`.`equipo` (`id`, `nombre`, `jugados`, `ganados`, `perdidos`, `empatados`, `golesFavor`, `golesContra`, `puntos`, `Grupo_id`) VALUES (13, 'Argentina', 0, 0, 0, 0, 0, 0, 0, 4);
INSERT INTO `zeusco_mundial2018`.`equipo` (`id`, `nombre`, `jugados`, `ganados`, `perdidos`, `empatados`, `golesFavor`, `golesContra`, `puntos`, `Grupo_id`) VALUES (14, 'Islandia', 0, 0, 0, 0, 0, 0, 0, 4);
INSERT INTO `zeusco_mundial2018`.`equipo` (`id`, `nombre`, `jugados`, `ganados`, `perdidos`, `empatados`, `golesFavor`, `golesContra`, `puntos`, `Grupo_id`) VALUES (15, 'Croacia', 0, 0, 0, 0, 0, 0, 0, 4);
INSERT INTO `zeusco_mundial2018`.`equipo` (`id`, `nombre`, `jugados`, `ganados`, `perdidos`, `empatados`, `golesFavor`, `golesContra`, `puntos`, `Grupo_id`) VALUES (16, 'Nigeria', 0, 0, 0, 0, 0, 0, 0, 4);
INSERT INTO `zeusco_mundial2018`.`equipo` (`id`, `nombre`, `jugados`, `ganados`, `perdidos`, `empatados`, `golesFavor`, `golesContra`, `puntos`, `Grupo_id`) VALUES (17, 'Brasil', 0, 0, 0, 0, 0, 0, 0, 5);
INSERT INTO `zeusco_mundial2018`.`equipo` (`id`, `nombre`, `jugados`, `ganados`, `perdidos`, `empatados`, `golesFavor`, `golesContra`, `puntos`, `Grupo_id`) VALUES (18, 'Suiza', 0, 0, 0, 0, 0, 0, 0, 5);
INSERT INTO `zeusco_mundial2018`.`equipo` (`id`, `nombre`, `jugados`, `ganados`, `perdidos`, `empatados`, `golesFavor`, `golesContra`, `puntos`, `Grupo_id`) VALUES (19, 'Costa Rica', 0, 0, 0, 0, 0, 0, 0, 5);
INSERT INTO `zeusco_mundial2018`.`equipo` (`id`, `nombre`, `jugados`, `ganados`, `perdidos`, `empatados`, `golesFavor`, `golesContra`, `puntos`, `Grupo_id`) VALUES (20, 'Serbia', 0, 0, 0, 0, 0, 0, 0, 5);
INSERT INTO `zeusco_mundial2018`.`equipo` (`id`, `nombre`, `jugados`, `ganados`, `perdidos`, `empatados`, `golesFavor`, `golesContra`, `puntos`, `Grupo_id`) VALUES (21, 'Alemania', 0, 0, 0, 0, 0, 0, 0, 6);
INSERT INTO `zeusco_mundial2018`.`equipo` (`id`, `nombre`, `jugados`, `ganados`, `perdidos`, `empatados`, `golesFavor`, `golesContra`, `puntos`, `Grupo_id`) VALUES (22, 'México', 0, 0, 0, 0, 0, 0, 0, 6);
INSERT INTO `zeusco_mundial2018`.`equipo` (`id`, `nombre`, `jugados`, `ganados`, `perdidos`, `empatados`, `golesFavor`, `golesContra`, `puntos`, `Grupo_id`) VALUES (23, 'Suecia', 0, 0, 0, 0, 0, 0, 0, 6);
INSERT INTO `zeusco_mundial2018`.`equipo` (`id`, `nombre`, `jugados`, `ganados`, `perdidos`, `empatados`, `golesFavor`, `golesContra`, `puntos`, `Grupo_id`) VALUES (24, 'República de Corea', 0, 0, 0, 0, 0, 0, 0, 6);
INSERT INTO `zeusco_mundial2018`.`equipo` (`id`, `nombre`, `jugados`, `ganados`, `perdidos`, `empatados`, `golesFavor`, `golesContra`, `puntos`, `Grupo_id`) VALUES (25, 'Bélgica', 0, 0, 0, 0, 0, 0, 0, 7);
INSERT INTO `zeusco_mundial2018`.`equipo` (`id`, `nombre`, `jugados`, `ganados`, `perdidos`, `empatados`, `golesFavor`, `golesContra`, `puntos`, `Grupo_id`) VALUES (26, 'Panamá', 0, 0, 0, 0, 0, 0, 0, 7);
INSERT INTO `zeusco_mundial2018`.`equipo` (`id`, `nombre`, `jugados`, `ganados`, `perdidos`, `empatados`, `golesFavor`, `golesContra`, `puntos`, `Grupo_id`) VALUES (27, 'Túnez', 0, 0, 0, 0, 0, 0, 0, 7);
INSERT INTO `zeusco_mundial2018`.`equipo` (`id`, `nombre`, `jugados`, `ganados`, `perdidos`, `empatados`, `golesFavor`, `golesContra`, `puntos`, `Grupo_id`) VALUES (28, 'Inglaterra', 0, 0, 0, 0, 0, 0, 0, 7);
INSERT INTO `zeusco_mundial2018`.`equipo` (`id`, `nombre`, `jugados`, `ganados`, `perdidos`, `empatados`, `golesFavor`, `golesContra`, `puntos`, `Grupo_id`) VALUES (29, 'Polonia', 0, 0, 0, 0, 0, 0, 0, 8);
INSERT INTO `zeusco_mundial2018`.`equipo` (`id`, `nombre`, `jugados`, `ganados`, `perdidos`, `empatados`, `golesFavor`, `golesContra`, `puntos`, `Grupo_id`) VALUES (30, 'Senegal', 0, 0, 0, 0, 0, 0, 0, 8);
INSERT INTO `zeusco_mundial2018`.`equipo` (`id`, `nombre`, `jugados`, `ganados`, `perdidos`, `empatados`, `golesFavor`, `golesContra`, `puntos`, `Grupo_id`) VALUES (31, 'Colombia', 0, 0, 0, 0, 0, 0, 0, 8);
INSERT INTO `zeusco_mundial2018`.`equipo` (`id`, `nombre`, `jugados`, `ganados`, `perdidos`, `empatados`, `golesFavor`, `golesContra`, `puntos`, `Grupo_id`) VALUES (32, 'Japón', 0, 0, 0, 0, 0, 0, 0, 8);
COMMIT;
-- -----------------------------------------------------
-- Data for table `zeusco_mundial2018`.`login`
-- -----------------------------------------------------
START TRANSACTION;
USE `zeusco_mundial2018`;
INSERT INTO `zeusco_mundial2018`.`login` (`id`, `username`, `password`, `rol`, `Empleado_id`) VALUES (1, 'admin', 'admin', 'admin', 1);
COMMIT;
|
CREATE TABLE `homebudget`.`expense` (
`id` INT(10) NOT NULL AUTO_INCREMENT,
`category` VARCHAR(45) NULL,
`title` VARCHAR(45) NULL,
`cost` INT(45) NULL,
`date` TIMESTAMP NULL,
PRIMARY KEY (`id`),
UNIQUE INDEX `id_UNIQUE` (`id` ASC)); |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 10-01-2018 a las 17:12:16
-- Versión del servidor: 10.1.16-MariaDB
-- Versión de PHP: 7.0.9
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 */;
--
-- Base de datos: `diseno1`
--
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `actvos`
--
CREATE TABLE `actvos` (
`codigo_activo` varchar(16) NOT NULL,
`codigo_tipo` varchar(13) NOT NULL,
`codigo_proveedor` int(11) NOT NULL,
`codigo_detalle` int(11) NOT NULL,
`codigo_administrador` varchar(20) NOT NULL,
`fecha_adquicision` date DEFAULT NULL,
`precio` double DEFAULT NULL,
`estado` int(11) DEFAULT NULL,
`foto` longblob,
`observacion` text
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Volcado de datos para la tabla `actvos`
--
INSERT INTO `actvos` (`codigo_activo`, `codigo_tipo`, `codigo_proveedor`, `codigo_detalle`, `codigo_administrador`, `fecha_adquicision`, `precio`, `estado`, `foto`, `observacion`) VALUES
('CEJ-001-001-0001', 'CEJ-001-001', 1, 1, 'admin01', '0000-00-00', 10, 1, '', '1'),
('CEJ-001-001-0002', 'CEJ-001-001', 1, 2, 'admin01', '0000-00-00', 10, 1, '', '1'),
('CEJ-001-001-0003', 'CEJ-001-001', 1, 3, 'admin01', '0000-00-00', 10, 1, '', '1'),
('CEJ-001-001-0004', 'CEJ-001-001', 1, 4, 'admin01', '0000-00-00', 10, 1, '', '1');
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `administradores`
--
CREATE TABLE `administradores` (
`codigo_administrador` varchar(15) NOT NULL,
`pasword` varchar(255) DEFAULT NULL,
`nivel` int(11) DEFAULT NULL,
`nombre` varchar(25) DEFAULT NULL,
`email` varchar(35) DEFAULT NULL,
`fecha` varchar(35) DEFAULT NULL,
`apellido` varchar(25) DEFAULT NULL,
`sexo` tinyint(1) DEFAULT NULL,
`dui` varchar(11) DEFAULT NULL,
`foto` longblob,
`estado` int(11) DEFAULT NULL,
`observacion` varchar(150) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Volcado de datos para la tabla `administradores`
--
INSERT INTO `administradores` (`codigo_administrador`, `pasword`, `nivel`, `nombre`, `email`, `fecha`, `apellido`, `sexo`, `dui`, `foto`, `estado`, `observacion`) VALUES
('admin01', '$2y$10$xC2qfFYxPbsLPtyNjO/rHuahk6Mc20G3sY3OaJxmvbI8asoQHAgg6', 0, 'Carlos', 'cartorres.95@gmail.com', '1995-11-17', 'Torres', NULL, NULL, NULL, 1, NULL);
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `autores`
--
CREATE TABLE `autores` (
`codigo_autor` int(11) NOT NULL,
`nombre` varchar(25) DEFAULT NULL,
`apellido` varchar(25) DEFAULT NULL,
`nacimiento` date DEFAULT NULL,
`biografia` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT=' ';
--
-- Volcado de datos para la tabla `autores`
--
INSERT INTO `autores` (`codigo_autor`, `nombre`, `apellido`, `nacimiento`, `biografia`) VALUES
(1, 'Alfredo', 'Espino', '1900-01-08', 'MAPA_WEB_4.0.pdf'),
(2, 'Miguel Angel', 'Espino', '1902-12-17', 'mysql.pdf'),
(3, 'Alberto', 'Masferrer', '1868-07-24', 'Practica Evaluada.pdf'),
(4, 'Salvador Salazar', 'Arrue', '1870-01-19', 'mysql.pdf'),
(5, 'Hugo', 'Aguirre', '1943-01-19', 'portal[1]');
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `bitacora`
--
CREATE TABLE `bitacora` (
`codigo_bitacora` int(11) NOT NULL,
`codigo_administrador` varchar(15) NOT NULL,
`accion` varchar(1000) DEFAULT NULL,
`fecha` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Volcado de datos para la tabla `bitacora`
--
INSERT INTO `bitacora` (`codigo_bitacora`, `codigo_administrador`, `accion`, `fecha`) VALUES
(1, 'admin01', 'El administrador admin01(Carlos Torres) inició sesión', '2018-01-01 12:37:41'),
(2, 'admin01', 'El administrador admin01(Carlos Torres) inició sesión', '2018-01-01 12:39:52'),
(3, 'admin01', 'El administrador admin01(Carlos Torres) inició sesión', '2018-01-01 04:03:22'),
(4, 'admin01', 'El administrador admin01 cerró sesión', '2018-01-01 04:03:25'),
(5, 'admin01', 'El administrador admin01(Carlos Torres) inició sesión', '2018-01-01 04:04:34'),
(6, 'admin01', 'El administrador admin01 cerró sesión', '2018-01-01 04:04:37'),
(7, 'admin01', 'El administrador admin01(Carlos Torres) inició sesión', '2018-01-01 04:15:11'),
(8, 'admin01', 'El administrador admin01(Carlos Torres) inició sesión', '2018-01-01 07:18:05'),
(9, 'admin01', 'Se registro la siguiente institucion: indi', '2018-01-01 07:18:43'),
(10, 'admin01', 'El administrador admin01(Carlos Torres) inició sesión', '2018-01-03 02:47:55'),
(11, 'admin01', 'Se registro la siguiente institucion: karol', '2018-01-03 02:48:15'),
(12, 'admin01', 'Se registro la siguiente institucion: fdhdh', '2018-01-03 02:49:52'),
(13, 'admin01', 'Se registro la siguiente institucion: fdgbdfg', '2018-01-03 02:50:32'),
(14, 'admin01', 'Se registro la siguiente institucion: kjbjb', '2018-01-03 02:52:36'),
(15, 'admin01', 'Se registro la siguiente institucion: jkiuuiiuhi', '2018-01-03 02:53:05'),
(16, 'admin01', 'Se registro la siguiente institucion: dfvvdfvdfvd', '2018-01-03 02:53:39'),
(17, 'admin01', 'Se registro la siguiente institucion: sdcsdcsdc', '2018-01-03 02:54:49'),
(18, 'admin01', 'Se registro la siguiente institucion: vdv dvdvd', '2018-01-03 02:55:02'),
(19, 'admin01', 'Se registro la siguiente institucion: otra mas', '2018-01-03 02:58:00'),
(20, 'admin01', 'Se registro la siguiente institucion: dfvdfvdfvdf', '2018-01-03 02:59:11'),
(21, 'admin01', 'Se registro la siguiente institucion: 111111', '2018-01-03 02:59:54'),
(22, 'admin01', 'Se registro la siguiente institucion: dcvdfvdfv', '2018-01-03 03:00:25'),
(23, 'admin01', 'Se registro la siguiente institucion: wqeqweqweq', '2018-01-03 03:01:16'),
(24, 'admin01', 'Se registro la siguiente institucion: aaaaaaaaaaaaaa', '2018-01-03 03:08:40'),
(25, 'admin01', 'se inserto al usuario sdfsdfsdf iuiuihuh', '2018-01-03 03:11:09'),
(26, 'admin01', 'Se registro la siguiente institucion: kkkkkkk', '2018-01-03 03:11:18'),
(27, 'admin01', 'Se registro la siguiente institucion: bbbbbbbbjjnjnj', '2018-01-03 03:13:16'),
(28, 'admin01', 'Se registro la siguiente institucion: uuuuuuuuuuuuuu', '2018-01-03 03:17:49'),
(29, 'admin01', 'Se registro la siguiente institucion: qqqqqqqqqqqqqqqq', '2018-01-03 03:18:03'),
(30, 'admin01', 'se dio de baja al usuario sdfsdfsdf iuiuihuh por el siguiente motivo: xk si se medio la pinch gna', '2018-01-03 03:18:27'),
(31, 'admin01', 'Se registro a la editorial Oceano', '2018-01-04 02:14:18'),
(32, 'admin01', 'se registro al autor Alfredo Espino', '2018-01-04 02:16:06'),
(33, 'admin01', 'se hizo el registro de 4 libros con el Titulo de Jicaras Tristes', '2018-01-04 02:19:16'),
(34, 'admin01', 'Se editaron los datos del libro Jicaras Tristes', '2018-01-04 02:19:56'),
(35, 'admin01', 'se actualizaron los datos del Autor Alfredo Espino', '2018-01-04 03:12:58'),
(36, 'admin01', 'se registro al autor Miguel Angel Espino', '2018-01-04 03:15:04'),
(37, 'admin01', 'se registro al autor Alberto Masferrer', '2018-01-04 03:16:53'),
(38, 'admin01', 'se actualizaron los datos del Autor Miguel Angel Espino', '2018-01-04 03:17:22'),
(39, 'admin01', 'el usuario sdfsdfsdf iuiuihuh presto los siguientes libros Jicaras Tristes(CEJ-002-890-JI-0001-0001) Jicaras Tristes(CEJ-002-890-JI-0001-0002)', '2018-01-05 11:03:46'),
(40, 'admin01', 'se dio de baja al libro Jicaras Tristes(CEJ-002-890-JI-0001-0001)por el siguiente motivo: Danado', '2018-01-05 11:38:47'),
(41, 'admin01', 'se dio de baja al libro Jicaras Tristes(CEJ-002-890-JI-0001-0003)por el siguiente motivo: mojado', '2018-01-05 03:22:37'),
(42, 'admin01', 'se registro al autor Salvador Salazar Arrue', '2018-01-05 03:33:39'),
(43, 'admin01', 'se hizo el registro de 4 libros con el Titulo de Cuento de Barros', '2018-01-05 03:35:11'),
(44, 'admin01', 'se dio de baja al libro Cuento de Barros(CEJ-002-390-CU-0001-0003)por el siguiente motivo: probando', '2018-01-05 03:35:36'),
(45, 'admin01', 'El administrador admin01(Carlos Torres) inició sesión', '2018-01-06 02:17:51'),
(46, 'admin01', 'se dio de baja al libro Cuento de Barros(CEJ-002-390-CU-0001-0004)por el siguiente motivo: Extraviado', '2018-01-06 03:15:11'),
(47, 'admin01', 'se dio de baja al libro Cuento de Barros(CEJ-002-390-CU-0001-0002)por el siguiente motivo: undefined', '2018-01-06 03:22:17'),
(48, 'admin01', 'se dio de baja al libro Cuento de Barros(CEJ-002-390-CU-0001-0001)por el siguiente motivo: undefined', '2018-01-06 03:30:15'),
(49, 'admin01', 'se dio de baja al libro Jicaras Tristes(CEJ-002-890-JI-0001-0001)por el siguiente motivo: undefined', '2018-01-06 03:41:45'),
(50, 'admin01', 'se dio de baja al libro Cuento de Barros(CEJ-002-390-CU-0001-0002)por el siguiente motivo: undefined', '2018-01-06 03:43:44'),
(51, 'admin01', 'se dio de baja al libro Jicaras Tristes(CEJ-002-890-JI-0001-0002)por el siguiente motivo: undefined', '2018-01-06 03:50:57'),
(52, 'admin01', 'se dio de baja al libro Jicaras Tristes(CEJ-002-890-JI-0001-0004)por el siguiente motivo: undefined', '2018-01-06 03:51:16'),
(53, 'admin01', 'se dio de baja al libro Cuento de Barros(CEJ-002-390-CU-0001-0004)por el siguiente motivo: undefined', '2018-01-06 03:51:26'),
(54, 'admin01', 'se dio de baja al libro Jicaras Tristes(CEJ-002-890-JI-0001-0003)por el siguiente motivo: undefined', '2018-01-06 03:52:24'),
(55, 'admin01', 'se dio de baja al libro Jicaras Tristes(CEJ-002-890-JI-0001-0004)por el siguiente motivo: Dañado', '2018-01-06 03:53:57'),
(56, 'admin01', 'se dio de baja al libro Cuento de Barros(CEJ-002-390-CU-0001-0003)por el siguiente motivo: undefined', '2018-01-06 04:02:36'),
(57, 'admin01', 'se dio de baja al libro Cuento de Barros(CEJ-002-390-CU-0001-0002)por el siguiente motivo: undefined', '2018-01-06 04:03:19'),
(58, 'admin01', 'se dio de baja al libro Jicaras Tristes(CEJ-002-890-JI-0001-0002)por el siguiente motivo: undefined', '2018-01-06 04:04:04'),
(59, 'admin01', 'se dio de baja al libro Cuento de Barros(CEJ-002-390-CU-0001-0001)por el siguiente motivo: undefined', '2018-01-06 04:04:35'),
(60, 'admin01', 'se dio de baja al libro Cuento de Barros(CEJ-002-390-CU-0001-0001)por el siguiente motivo: undefined', '2018-01-06 05:03:59'),
(61, 'admin01', 'se dio de baja al libro Jicaras Tristes(CEJ-002-890-JI-0001-0001)por el siguiente motivo: undefined', '2018-01-06 05:04:32'),
(62, 'admin01', 'se dio de baja al libro Cuento de Barros(CEJ-002-390-CU-0001-0002)por el siguiente motivo: undefined', '2018-01-06 05:06:19'),
(63, 'admin01', 'se dio de baja al libro Jicaras Tristes(CEJ-002-890-JI-0001-0003)por el siguiente motivo: otro', '2018-01-06 05:07:28'),
(64, 'admin01', 'se dio de baja al libro Cuento de Barros(CEJ-002-390-CU-0001-0002)por el siguiente motivo: donado', '2018-01-06 05:09:48'),
(65, 'admin01', 'se dio de baja al libro Jicaras Tristes(CEJ-002-890-JI-0001-0002)por el siguiente motivo: Dañado', '2018-01-06 05:10:05'),
(66, 'admin01', 'se dio de baja al libro Cuento de Barros(CEJ-002-390-CU-0001-0004)por el siguiente motivo: Extraviado', '2018-01-06 05:10:14'),
(67, 'admin01', 'El administrador admin01(Carlos Torres) inició sesión', '2018-01-07 08:43:24'),
(68, 'admin01', 'se dio de baja al libro Cuento de Barros(CEJ-002-390-CU-0001-0003)por el siguiente motivo: Dañado', '2018-01-07 08:47:02'),
(69, 'admin01', 'se dio de baja al libro Cuento de Barros(CEJ-002-390-CU-0001-0001)por el siguiente motivo: Extraviado', '2018-01-07 08:47:12'),
(70, 'admin01', 'El administrador admin01(Carlos Torres) inició sesión', '2018-01-08 09:37:39'),
(71, 'admin01', 'se hizo el registro de 3 libros con el Titulo de Biografias', '2018-01-08 10:13:43'),
(72, 'admin01', 'se hizo el registro de 3 libros con el Titulo de Biografias', '2018-01-08 10:13:45'),
(73, 'admin01', 'se hizo el registro de 3 libros con el Titulo de Biografias', '2018-01-08 10:13:45'),
(74, 'admin01', 'se hizo el registro de 3 libros con el Titulo de Biografias', '2018-01-08 10:13:45'),
(75, 'admin01', 'Se registro la siguiente institucion: jklkmlkjknjknj', '2018-01-08 10:18:50'),
(76, 'admin01', 'se hizo el registro de 3 libros con el Titulo de Biografias', '2018-01-08 10:22:41'),
(77, 'admin01', 'se hizo el registro de 3 libros con el Titulo de Papirusa', '2018-01-08 10:24:57'),
(78, 'admin01', 'se hizo el registro de 2 libros con el Titulo de otro libro', '2018-01-08 10:27:49'),
(79, 'admin01', 'se registro al autor Hugo Aguirre', '2018-01-08 10:31:28'),
(80, 'admin01', 'Se registro a la editorial Harday Electric ', '2018-01-08 10:32:14'),
(81, 'admin01', 'el usuario sdfsdfsdf iuiuihuh finalizo su prestamo, con la siguiente observación: null', '2018-01-08 10:52:43'),
(82, 'admin01', 'el usuario sdfsdfsdf iuiuihuh finalizo su prestamo, con la siguiente observación: null', '2018-01-08 10:57:43'),
(83, 'admin01', 'el usuario sdfsdfsdf iuiuihuh finalizo su prestamo, con la siguiente observación: null', '2018-01-08 10:58:38'),
(84, 'admin01', 'el usuario sdfsdfsdf iuiuihuh finalizo su prestamo, con la siguiente observación: null', '2018-01-08 11:05:40'),
(85, 'admin01', 'el usuario sdfsdfsdf iuiuihuh finalizo su prestamo, con la siguiente observación: null', '2018-01-08 11:08:12'),
(86, 'admin01', 'el usuario sdfsdfsdf iuiuihuh finalizo su prestamo, con la siguiente observación: null', '2018-01-08 11:09:50'),
(87, 'admin01', 'el usuario sdfsdfsdf iuiuihuh finalizo su prestamo, con la siguiente observación: null', '2018-01-08 11:11:13'),
(88, 'admin01', 'el usuario sdfsdfsdf iuiuihuh finalizo su prestamo, con la siguiente observación: null', '2018-01-08 11:11:55'),
(89, 'admin01', 'el usuario sdfsdfsdf iuiuihuh finalizo su prestamo, con la siguiente observación: null', '2018-01-08 11:14:02'),
(90, 'admin01', 'el usuario sdfsdfsdf iuiuihuh finalizo su prestamo, con la siguiente observación: null', '2018-01-08 11:17:23'),
(91, 'admin01', 'el usuario sdfsdfsdf iuiuihuh finalizo su prestamo, con la siguiente observación: null', '2018-01-08 11:19:00'),
(92, 'admin01', 'el usuario sdfsdfsdf iuiuihuh finalizo su prestamo, con la siguiente observación: null', '2018-01-08 11:19:38'),
(93, 'admin01', 'se dio de baja al libro Biografias(CEJ-002-010-BI-0001-0006)por el siguiente motivo: ', '2018-01-08 11:30:57'),
(94, 'admin01', 'el usuario sdfsdfsdf iuiuihuh finalizo su prestamo, con la siguiente observación: ', '2018-01-08 11:34:22'),
(95, 'admin01', 'el usuario sdfsdfsdf iuiuihuh finalizo su prestamo, con la siguiente observación: null', '2018-01-08 11:34:54'),
(96, 'admin01', 'el usuario sdfsdfsdf iuiuihuh finalizo su prestamo, con la siguiente observación: Sin Problemas', '2018-01-08 11:36:14'),
(97, 'admin01', 'el usuario sdfsdfsdf iuiuihuh presto los siguientes libros Biografias(CEJ-002-010-BI-0001-0001) ()', '2018-01-08 03:02:36'),
(98, 'admin01', 'el usuario sdfsdfsdf iuiuihuh presto los siguientes libros Biografias(CEJ-002-010-BI-0001-0002) Papirusa(CEJ-002-890-PA-0001-0002)', '2018-01-08 03:04:43'),
(99, 'admin01', 'el usuario sdfsdfsdf iuiuihuh presto los siguientes libros Jicaras Tristes(CEJ-002-890-JI-0001-0001)', '2018-01-08 03:09:41'),
(100, 'admin01', 'El administrador admin01(Carlos Torres) inició sesión', '2018-01-09 02:15:36'),
(101, 'admin01', 'El administrador admin01(Carlos Torres) inició sesión', '2018-01-10 09:14:50'),
(102, 'admin01', 'El administrador admin01(Carlos Torres) inició sesión', '2018-01-10 09:38:33'),
(103, 'admin01', 'se registro la siguiente tipo de activos: sillas', '2018-01-10 09:43:29'),
(104, 'admin01', 'se registro al siguiente proveedor:sillitas, con dirección san vicente, el salvador y teléfono 2342-0349', '2018-01-10 09:44:12'),
(105, 'admin01', 'se registraron 4 item tipo sillas con las siguientes características: color blancas, marca Sin Marca, dimensiones Sin Dimenciones, sistema operativo Sin Sistema Operativo, Memoria Ram Sin Memoria Ram, Modelo Sin Modelo', '2018-01-10 09:45:49'),
(106, 'admin01', 'se hizo el registro de libros con el Titulo de ', '2018-01-10 10:00:21'),
(107, 'admin01', 'se dio de baja al libro Biografias(CEJ-002-010-BI-0001-0002)por el siguiente motivo: Dañado', '2018-01-10 10:02:30');
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `categoria`
--
CREATE TABLE `categoria` (
`codigo_tipo` varchar(13) NOT NULL,
`nombre` varchar(45) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Volcado de datos para la tabla `categoria`
--
INSERT INTO `categoria` (`codigo_tipo`, `nombre`) VALUES
('CEJ-001-001', 'sillas');
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `detalles`
--
CREATE TABLE `detalles` (
`codigo_detalle` int(11) NOT NULL,
`serie` varchar(50) DEFAULT NULL,
`color` varchar(50) DEFAULT NULL,
`marca` varchar(30) DEFAULT NULL,
`modelo` varchar(30) DEFAULT NULL,
`ram` varchar(30) DEFAULT NULL,
`memoria` varchar(50) DEFAULT NULL,
`sistema` varchar(30) DEFAULT NULL,
`dimensiones` varchar(50) DEFAULT NULL,
`foto` binary(1) DEFAULT NULL,
`otros` text,
`procesador` varchar(45) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Volcado de datos para la tabla `detalles`
--
INSERT INTO `detalles` (`codigo_detalle`, `serie`, `color`, `marca`, `modelo`, `ram`, `memoria`, `sistema`, `dimensiones`, `foto`, `otros`, `procesador`) VALUES
(1, 'Sin Numero de Serie', 'blancas', 'Sin Marca', 'Sin Modelo', 'Sin Memoria Ram', 'Sin Disco Duro', 'Sin Sistema Operativo', 'Sin Dimenciones', NULL, '', 'Sin Procesador'),
(2, 'Sin Numero de Serie', 'blancas', 'Sin Marca', 'Sin Modelo', 'Sin Memoria Ram', 'Sin Disco Duro', 'Sin Sistema Operativo', 'Sin Dimenciones', NULL, '', 'Sin Procesador'),
(3, 'Sin Numero de Serie', 'blancas', 'Sin Marca', 'Sin Modelo', 'Sin Memoria Ram', 'Sin Disco Duro', 'Sin Sistema Operativo', 'Sin Dimenciones', NULL, '', 'Sin Procesador'),
(4, 'Sin Numero de Serie', 'blancas', 'Sin Marca', 'Sin Modelo', 'Sin Memoria Ram', 'Sin Disco Duro', 'Sin Sistema Operativo', 'Sin Dimenciones', NULL, '', 'Sin Procesador');
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `editoriales`
--
CREATE TABLE `editoriales` (
`codigo_editorial` int(11) NOT NULL,
`nombre` varchar(30) DEFAULT NULL,
`direccion` varchar(50) DEFAULT NULL,
`pais` varchar(10) DEFAULT NULL,
`email` varchar(15) DEFAULT NULL,
`telefono` varchar(15) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Volcado de datos para la tabla `editoriales`
--
INSERT INTO `editoriales` (`codigo_editorial`, `nombre`, `direccion`, `pais`, `email`, `telefono`) VALUES
(1, 'Oceano', 'San Salvador, El Salvador', NULL, 'oceano@correo.c', '2939-8999'),
(2, 'Harday Electric ', 'San Vicente, El Salvador', NULL, 'harday@gmail.co', '4829-3298');
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `encargado_mantenimiento`
--
CREATE TABLE `encargado_mantenimiento` (
`codigo_emantenimiento` int(11) NOT NULL,
`nombre` varchar(25) DEFAULT NULL,
`telefono` varchar(10) DEFAULT NULL,
`correo` varchar(35) DEFAULT NULL,
`direccion` varchar(150) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `institucion`
--
CREATE TABLE `institucion` (
`codigo_institucion` int(11) NOT NULL,
`nombre` varchar(100) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Volcado de datos para la tabla `institucion`
--
INSERT INTO `institucion` (`codigo_institucion`, `nombre`) VALUES
(1, 'Sin Institucion'),
(2, 'Instituto Nacional Dr. Sarbelio Navarrete'),
(3, 'Universidad Nacional de El Salvador'),
(4, 'Centro escolar Presbitero Norberto Marroquí'),
(5, 'Centro Escolar Guadalupe Cárcamo');
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `libros`
--
CREATE TABLE `libros` (
`codigo_libro` varchar(45) NOT NULL,
`editoriales_codigo` int(11) NOT NULL,
`titulo` varchar(50) DEFAULT NULL,
`estado` varchar(25) DEFAULT NULL,
`fecha_publicacion` date DEFAULT NULL,
`foto` longblob,
`motivo` text
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Volcado de datos para la tabla `libros`
--
INSERT INTO `libros` (`codigo_libro`, `editoriales_codigo`, `titulo`, `estado`, `fecha_publicacion`, `foto`, `motivo`) VALUES
('CEJ-002-010-BI-0001-0001', 1, 'Biografias', '0', '2018-01-07', 0x313035393030305f797567696f682d77616c6c7061706572732d77616c6c7061706572732d636176655f3139323078313230305f682e6a7067, ''),
('CEJ-002-010-BI-0001-0002', 1, 'Biografias', '1', '2018-01-07', 0x313035393030305f797567696f682d77616c6c7061706572732d77616c6c7061706572732d636176655f3139323078313230305f682e6a7067, 'Dañado'),
('CEJ-002-010-BI-0001-0003', 1, 'Biografias', '0', '2018-01-07', 0x313035393030305f797567696f682d77616c6c7061706572732d77616c6c7061706572732d636176655f3139323078313230305f682e6a7067, ''),
('CEJ-002-010-BI-0001-0004', 1, 'Biografias', '0', '2018-01-07', 0x313035393030305f797567696f682d77616c6c7061706572732d77616c6c7061706572732d636176655f3139323078313230305f682e6a7067, ''),
('CEJ-002-010-BI-0001-0005', 1, 'Biografias', '0', '2018-01-07', 0x313035393030305f797567696f682d77616c6c7061706572732d77616c6c7061706572732d636176655f3139323078313230305f682e6a7067, ''),
('CEJ-002-010-BI-0001-0006', 1, 'Biografias', '0', '2018-01-07', 0x313035393030305f797567696f682d77616c6c7061706572732d77616c6c7061706572732d636176655f3139323078313230305f682e6a7067, ''),
('CEJ-002-010-BI-0001-0007', 1, 'Biografias', '0', '2018-01-07', 0x313035393030305f797567696f682d77616c6c7061706572732d77616c6c7061706572732d636176655f3139323078313230305f682e6a7067, ''),
('CEJ-002-010-BI-0001-0008', 1, 'Biografias', '0', '2018-01-07', 0x313035393030305f797567696f682d77616c6c7061706572732d77616c6c7061706572732d636176655f3139323078313230305f682e6a7067, ''),
('CEJ-002-010-BI-0001-0009', 1, 'Biografias', '0', '2018-01-07', 0x313035393030305f797567696f682d77616c6c7061706572732d77616c6c7061706572732d636176655f3139323078313230305f682e6a7067, ''),
('CEJ-002-010-BI-0001-0010', 1, 'Biografias', '0', '2018-01-07', 0x313035393030305f797567696f682d77616c6c7061706572732d77616c6c7061706572732d636176655f3139323078313230305f682e6a7067, ''),
('CEJ-002-010-BI-0001-0011', 1, 'Biografias', '0', '2018-01-07', 0x313035393030305f797567696f682d77616c6c7061706572732d77616c6c7061706572732d636176655f3139323078313230305f682e6a7067, ''),
('CEJ-002-010-BI-0001-0012', 1, 'Biografias', '0', '2018-01-07', 0x313035393030305f797567696f682d77616c6c7061706572732d77616c6c7061706572732d636176655f3139323078313230305f682e6a7067, ''),
('CEJ-002-010-BI-0001-0013', 1, 'Biografias', '0', '2018-01-07', 0x313035393030305f797567696f682d77616c6c7061706572732d77616c6c7061706572732d636176655f3139323078313230305f682e6a7067, ''),
('CEJ-002-010-BI-0001-0014', 1, 'Biografias', '0', '2018-01-07', 0x313035393030305f797567696f682d77616c6c7061706572732d77616c6c7061706572732d636176655f3139323078313230305f682e6a7067, ''),
('CEJ-002-010-BI-0001-0015', 1, 'Biografias', '0', '2018-01-07', 0x313035393030305f797567696f682d77616c6c7061706572732d77616c6c7061706572732d636176655f3139323078313230305f682e6a7067, ''),
('CEJ-002-390-CU-0001-0001', 1, 'Cuento de Barros', '0', '2018-01-05', 0x30302e6a7067, ''),
('CEJ-002-390-CU-0001-0002', 1, 'Cuento de Barros', '0', '2018-01-05', 0x30302e6a7067, ''),
('CEJ-002-390-CU-0001-0003', 1, 'Cuento de Barros', '0', '2018-01-05', 0x30302e6a7067, ''),
('CEJ-002-390-CU-0001-0004', 1, 'Cuento de Barros', '0', '2018-01-05', 0x30302e6a7067, ''),
('CEJ-002-890-JI-0001-0001', 1, 'Jicaras Tristes', '0', '2001-01-04', 0x457370696e6f32303030312e6a7067, ''),
('CEJ-002-890-JI-0001-0002', 1, 'Jicaras Tristes', '0', '2001-01-04', 0x457370696e6f32303030312e6a7067, ''),
('CEJ-002-890-JI-0001-0003', 1, 'Jicaras Tristes', '0', '2001-01-04', 0x457370696e6f32303030312e6a7067, ''),
('CEJ-002-890-JI-0001-0004', 1, 'Jicaras Tristes', '0', '2001-01-04', 0x457370696e6f32303030312e6a7067, ''),
('CEJ-002-890-PA-0001-0001', 1, 'Papirusa', '0', '2018-01-01', 0x436170747572612064652070616e74616c6c61202831292e706e67, ''),
('CEJ-002-890-PA-0001-0002', 1, 'Papirusa', '0', '2018-01-01', 0x436170747572612064652070616e74616c6c61202831292e706e67, ''),
('CEJ-002-890-PA-0001-0003', 1, 'Papirusa', '0', '2018-01-01', 0x436170747572612064652070616e74616c6c61202831292e706e67, ''),
('CEJ-002-980-OT-0001-0001', 1, 'otro libro', '0', '2018-01-01', 0x436170747572612064652070616e74616c6c61202838292e706e67, NULL),
('CEJ-002-980-OT-0001-0002', 1, 'otro libro', '0', '2018-01-01', 0x436170747572612064652070616e74616c6c61202838292e706e67, NULL);
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `mantenimientos`
--
CREATE TABLE `mantenimientos` (
`codigo_mantenimiento` int(11) NOT NULL,
`codigo_activo` varchar(16) DEFAULT NULL,
`fecha` date DEFAULT NULL,
`descripcion` text,
`costo` double DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `movimiento_actvos`
--
CREATE TABLE `movimiento_actvos` (
`codigo_activo` varchar(16) NOT NULL,
`codigo_pactivo` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `movimiento_actvos_mant`
--
CREATE TABLE `movimiento_actvos_mant` (
`codigo_activo` varchar(16) NOT NULL,
`codigo_mantenimiento` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `movimiento_autores`
--
CREATE TABLE `movimiento_autores` (
`codigo_libro` varchar(45) NOT NULL,
`codigo_autor` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Volcado de datos para la tabla `movimiento_autores`
--
INSERT INTO `movimiento_autores` (`codigo_libro`, `codigo_autor`) VALUES
('CEJ-002-890-JI-0001-0001', 1),
('CEJ-002-890-JI-0001-0002', 1),
('CEJ-002-890-JI-0001-0003', 1),
('CEJ-002-890-JI-0001-0004', 1),
('CEJ-002-390-CU-0001-0001', 4),
('CEJ-002-390-CU-0001-0002', 4),
('CEJ-002-390-CU-0001-0003', 4),
('CEJ-002-390-CU-0001-0004', 4),
('CEJ-002-010-BI-0001-0001', 3),
('CEJ-002-010-BI-0001-0002', 3),
('CEJ-002-010-BI-0001-0003', 3),
('CEJ-002-010-BI-0001-0004', 3),
('CEJ-002-010-BI-0001-0005', 3),
('CEJ-002-010-BI-0001-0006', 3),
('CEJ-002-010-BI-0001-0007', 3),
('CEJ-002-010-BI-0001-0008', 3),
('CEJ-002-010-BI-0001-0009', 3),
('CEJ-002-010-BI-0001-0010', 3),
('CEJ-002-010-BI-0001-0011', 3),
('CEJ-002-010-BI-0001-0012', 3),
('CEJ-002-010-BI-0001-0013', 3),
('CEJ-002-010-BI-0001-0014', 3),
('CEJ-002-010-BI-0001-0015', 3),
('CEJ-002-890-PA-0001-0001', 2),
('CEJ-002-890-PA-0001-0001', 4),
('CEJ-002-890-PA-0001-0002', 2),
('CEJ-002-890-PA-0001-0002', 4),
('CEJ-002-890-PA-0001-0003', 2),
('CEJ-002-890-PA-0001-0003', 4),
('CEJ-002-980-OT-0001-0001', 1),
('CEJ-002-980-OT-0001-0002', 1);
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `movimiento_libros`
--
CREATE TABLE `movimiento_libros` (
`codigo_libro` varchar(45) NOT NULL,
`codigo_plibro` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Volcado de datos para la tabla `movimiento_libros`
--
INSERT INTO `movimiento_libros` (`codigo_libro`, `codigo_plibro`) VALUES
('CEJ-002-890-JI-0001-0001', 1),
('CEJ-002-890-JI-0001-0002', 1),
('CEJ-002-010-BI-0001-0001', 2),
('CEJ-002-010-BI-0001-0002', 3),
('CEJ-002-890-PA-0001-0002', 3),
('CEJ-002-890-JI-0001-0001', 4);
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `movimiento_mantenimientos`
--
CREATE TABLE `movimiento_mantenimientos` (
`codigo_emantenimiento` int(11) NOT NULL,
`codigo_mantenimiento` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `prestamo_activos`
--
CREATE TABLE `prestamo_activos` (
`codigo_pactivo` int(11) NOT NULL,
`usuarios_codigo` varchar(45) NOT NULL,
`observacion` text,
`fecha_salida` datetime DEFAULT NULL,
`fecha_devolucion` date DEFAULT NULL,
`estado` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `prestamo_libros`
--
CREATE TABLE `prestamo_libros` (
`codigo_plibro` int(11) NOT NULL,
`codigo_usuario` varchar(15) NOT NULL,
`observaciones` varchar(100) DEFAULT NULL,
`fecha_devolucion` date DEFAULT NULL,
`fecha_salida` datetime DEFAULT NULL,
`estado` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Volcado de datos para la tabla `prestamo_libros`
--
INSERT INTO `prestamo_libros` (`codigo_plibro`, `codigo_usuario`, `observaciones`, `fecha_devolucion`, `fecha_salida`, `estado`) VALUES
(1, 'SI17-1', 'Sin Problemas', '2018-01-18', '2018-01-05 00:00:00', 1),
(2, 'SI17-1', NULL, '2018-01-19', '2018-01-08 00:00:00', 0),
(3, 'SI17-1', NULL, '2018-01-27', '2018-01-08 00:00:00', 0),
(4, 'SI17-1', NULL, '2018-01-13', '2018-01-08 00:00:00', 0);
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `proveedores`
--
CREATE TABLE `proveedores` (
`codigo_proveedor` int(11) NOT NULL,
`nombre` varchar(40) DEFAULT NULL,
`apellido` varchar(40) DEFAULT NULL,
`direccion` varchar(150) DEFAULT NULL,
`telefono` varchar(15) DEFAULT NULL,
`correo` varchar(35) DEFAULT NULL,
`fax` varchar(30) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Volcado de datos para la tabla `proveedores`
--
INSERT INTO `proveedores` (`codigo_proveedor`, `nombre`, `apellido`, `direccion`, `telefono`, `correo`, `fax`) VALUES
(1, 'sillitas', NULL, 'san vicente, el salvador', '2342-0349', 'sdjfsdjk@fjdnj.com', 'Sin Fax');
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `recuperacion`
--
CREATE TABLE `recuperacion` (
`idrecuperacion` int(11) NOT NULL,
`codigo_administrador` varchar(15) NOT NULL,
`url_secreta` varchar(255) NOT NULL,
`fecha` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `usuarios`
--
CREATE TABLE `usuarios` (
`codigo_usuario` varchar(15) NOT NULL,
`codigo_institucion` int(11) NOT NULL,
`nombre` varchar(25) DEFAULT NULL,
`apellido` varchar(25) DEFAULT NULL,
`telefono` varchar(10) DEFAULT NULL,
`correo` varchar(35) DEFAULT NULL,
`direccion` varchar(100) DEFAULT NULL,
`foto` longblob,
`sexo` varchar(10) DEFAULT NULL,
`estado` int(11) DEFAULT NULL,
`motivo_eliminacion` varchar(150) DEFAULT NULL,
`observaciones` varchar(150) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Volcado de datos para la tabla `usuarios`
--
INSERT INTO `usuarios` (`codigo_usuario`, `codigo_institucion`, `nombre`, `apellido`, `telefono`, `correo`, `direccion`, `foto`, `sexo`, `estado`, `observaciones`) VALUES
('SI17-1', 1, 'sdfsdfsdf', 'iuiuihuh', '2342-3442', 'huihi@djcc.co', 'iuihuihuihi', 0x3030302e6a7067, 'Masculino', 0, 'xk si se medio la pinch gna');
--
-- Índices para tablas volcadas
--
--
-- Indices de la tabla `actvos`
--
ALTER TABLE `actvos`
ADD PRIMARY KEY (`codigo_activo`),
ADD KEY `fk_actvos_proveedores1_idx` (`codigo_proveedor`),
ADD KEY `fk_actvos_detalles1_idx` (`codigo_detalle`),
ADD KEY `fk_actvos_tipo_activo1_idx` (`codigo_tipo`),
ADD KEY `fk_actvos_administradores1_idx` (`codigo_administrador`);
--
-- Indices de la tabla `administradores`
--
ALTER TABLE `administradores`
ADD PRIMARY KEY (`codigo_administrador`);
--
-- Indices de la tabla `autores`
--
ALTER TABLE `autores`
ADD PRIMARY KEY (`codigo_autor`);
--
-- Indices de la tabla `bitacora`
--
ALTER TABLE `bitacora`
ADD PRIMARY KEY (`codigo_bitacora`),
ADD KEY `fk_bitacora_administradores1_idx` (`codigo_administrador`);
--
-- Indices de la tabla `categoria`
--
ALTER TABLE `categoria`
ADD PRIMARY KEY (`codigo_tipo`);
--
-- Indices de la tabla `detalles`
--
ALTER TABLE `detalles`
ADD PRIMARY KEY (`codigo_detalle`);
--
-- Indices de la tabla `editoriales`
--
ALTER TABLE `editoriales`
ADD PRIMARY KEY (`codigo_editorial`);
--
-- Indices de la tabla `encargado_mantenimiento`
--
ALTER TABLE `encargado_mantenimiento`
ADD PRIMARY KEY (`codigo_emantenimiento`);
--
-- Indices de la tabla `institucion`
--
ALTER TABLE `institucion`
ADD PRIMARY KEY (`codigo_institucion`);
--
-- Indices de la tabla `libros`
--
ALTER TABLE `libros`
ADD PRIMARY KEY (`codigo_libro`),
ADD KEY `fk_libros_editoriales1_idx` (`editoriales_codigo`);
--
-- Indices de la tabla `mantenimientos`
--
ALTER TABLE `mantenimientos`
ADD PRIMARY KEY (`codigo_mantenimiento`),
ADD KEY `fk_mantenimientos_actvos1_idx` (`codigo_mantenimiento`) USING BTREE,
ADD KEY `fk_mant_act` (`codigo_activo`);
--
-- Indices de la tabla `movimiento_actvos`
--
ALTER TABLE `movimiento_actvos`
ADD KEY `fk_prestamo_activos_has_actvos_actvos1_idx` (`codigo_activo`),
ADD KEY `fk_prestamo_activos_has_actvos_prestamo_activos1_idx` (`codigo_pactivo`);
--
-- Indices de la tabla `movimiento_actvos_mant`
--
ALTER TABLE `movimiento_actvos_mant`
ADD KEY `fk_mantenimientos_mantenimiento_has_actvos_actvos2_idx` (`codigo_activo`),
ADD KEY `fk_actvos_has_mantenimientos_actvos2_idx` (`codigo_mantenimiento`);
--
-- Indices de la tabla `movimiento_autores`
--
ALTER TABLE `movimiento_autores`
ADD KEY `fk_libros_has_autores_autores1_idx` (`codigo_autor`),
ADD KEY `fk_libros_has_autores_libros1_idx` (`codigo_libro`);
--
-- Indices de la tabla `movimiento_libros`
--
ALTER TABLE `movimiento_libros`
ADD KEY `fk_libros_has_prestamo_libros_prestamo_libros1_idx` (`codigo_plibro`),
ADD KEY `fk_libros_has_prestamo_libros_libros1_idx` (`codigo_libro`);
--
-- Indices de la tabla `movimiento_mantenimientos`
--
ALTER TABLE `movimiento_mantenimientos`
ADD KEY `fk_encargado_mantenimiento_has_mantenimientos_mantenimiento_idx` (`codigo_mantenimiento`),
ADD KEY `fk_encargado_mantenimiento_has_mantenimientos_encargado_man_idx` (`codigo_emantenimiento`);
--
-- Indices de la tabla `prestamo_activos`
--
ALTER TABLE `prestamo_activos`
ADD PRIMARY KEY (`codigo_pactivo`),
ADD KEY `fk_prestamo_activos_usuarios1_idx` (`usuarios_codigo`);
--
-- Indices de la tabla `prestamo_libros`
--
ALTER TABLE `prestamo_libros`
ADD PRIMARY KEY (`codigo_plibro`),
ADD KEY `fk_prestamo_libros_usuarios1_idx` (`codigo_usuario`);
--
-- Indices de la tabla `proveedores`
--
ALTER TABLE `proveedores`
ADD PRIMARY KEY (`codigo_proveedor`);
--
-- Indices de la tabla `recuperacion`
--
ALTER TABLE `recuperacion`
ADD PRIMARY KEY (`idrecuperacion`),
ADD KEY `fk_recuperacion` (`codigo_administrador`);
--
-- Indices de la tabla `usuarios`
--
ALTER TABLE `usuarios`
ADD PRIMARY KEY (`codigo_usuario`),
ADD KEY `fk_usuarios_institucion1_idx` (`codigo_institucion`);
--
-- AUTO_INCREMENT de las tablas volcadas
--
--
-- AUTO_INCREMENT de la tabla `autores`
--
ALTER TABLE `autores`
MODIFY `codigo_autor` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT de la tabla `bitacora`
--
ALTER TABLE `bitacora`
MODIFY `codigo_bitacora` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=108;
--
-- AUTO_INCREMENT de la tabla `detalles`
--
ALTER TABLE `detalles`
MODIFY `codigo_detalle` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT de la tabla `editoriales`
--
ALTER TABLE `editoriales`
MODIFY `codigo_editorial` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT de la tabla `encargado_mantenimiento`
--
ALTER TABLE `encargado_mantenimiento`
MODIFY `codigo_emantenimiento` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT de la tabla `institucion`
--
ALTER TABLE `institucion`
MODIFY `codigo_institucion` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21;
--
-- AUTO_INCREMENT de la tabla `mantenimientos`
--
ALTER TABLE `mantenimientos`
MODIFY `codigo_mantenimiento` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT de la tabla `prestamo_activos`
--
ALTER TABLE `prestamo_activos`
MODIFY `codigo_pactivo` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT de la tabla `prestamo_libros`
--
ALTER TABLE `prestamo_libros`
MODIFY `codigo_plibro` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT de la tabla `proveedores`
--
ALTER TABLE `proveedores`
MODIFY `codigo_proveedor` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT de la tabla `recuperacion`
--
ALTER TABLE `recuperacion`
MODIFY `idrecuperacion` int(11) NOT NULL AUTO_INCREMENT;
--
-- Restricciones para tablas volcadas
--
--
-- Filtros para la tabla `actvos`
--
ALTER TABLE `actvos`
ADD CONSTRAINT `fk_act_adm` FOREIGN KEY (`codigo_administrador`) REFERENCES `administradores` (`codigo_administrador`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `fk_act_det` FOREIGN KEY (`codigo_detalle`) REFERENCES `detalles` (`codigo_detalle`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `fk_act_prov` FOREIGN KEY (`codigo_proveedor`) REFERENCES `proveedores` (`codigo_proveedor`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `fk_act_tipo` FOREIGN KEY (`codigo_tipo`) REFERENCES `categoria` (`codigo_tipo`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Filtros para la tabla `bitacora`
--
ALTER TABLE `bitacora`
ADD CONSTRAINT `fk_adm_bit` FOREIGN KEY (`codigo_administrador`) REFERENCES `administradores` (`codigo_administrador`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Filtros para la tabla `libros`
--
ALTER TABLE `libros`
ADD CONSTRAINT `fk_edit` FOREIGN KEY (`editoriales_codigo`) REFERENCES `editoriales` (`codigo_editorial`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Filtros para la tabla `mantenimientos`
--
ALTER TABLE `mantenimientos`
ADD CONSTRAINT `fk_mant_act` FOREIGN KEY (`codigo_activo`) REFERENCES `actvos` (`codigo_activo`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Filtros para la tabla `movimiento_actvos`
--
ALTER TABLE `movimiento_actvos`
ADD CONSTRAINT `fk_p_act` FOREIGN KEY (`codigo_activo`) REFERENCES `actvos` (`codigo_activo`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `fk_p_act2` FOREIGN KEY (`codigo_pactivo`) REFERENCES `prestamo_activos` (`codigo_pactivo`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Filtros para la tabla `movimiento_actvos_mant`
--
ALTER TABLE `movimiento_actvos_mant`
ADD CONSTRAINT `fk_mov_act` FOREIGN KEY (`codigo_activo`) REFERENCES `actvos` (`codigo_activo`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `fk_mov_mant` FOREIGN KEY (`codigo_mantenimiento`) REFERENCES `mantenimientos` (`codigo_mantenimiento`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Filtros para la tabla `movimiento_autores`
--
ALTER TABLE `movimiento_autores`
ADD CONSTRAINT `fk_mov_autores` FOREIGN KEY (`codigo_libro`) REFERENCES `libros` (`codigo_libro`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `fk_mov_autores2` FOREIGN KEY (`codigo_autor`) REFERENCES `autores` (`codigo_autor`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Filtros para la tabla `movimiento_libros`
--
ALTER TABLE `movimiento_libros`
ADD CONSTRAINT `fk_lib` FOREIGN KEY (`codigo_libro`) REFERENCES `libros` (`codigo_libro`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `fk_p_lib` FOREIGN KEY (`codigo_plibro`) REFERENCES `prestamo_libros` (`codigo_plibro`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Filtros para la tabla `movimiento_mantenimientos`
--
ALTER TABLE `movimiento_mantenimientos`
ADD CONSTRAINT `fk_mov_emant` FOREIGN KEY (`codigo_emantenimiento`) REFERENCES `encargado_mantenimiento` (`codigo_emantenimiento`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `fk_mov_mant_en` FOREIGN KEY (`codigo_mantenimiento`) REFERENCES `mantenimientos` (`codigo_mantenimiento`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Filtros para la tabla `prestamo_activos`
--
ALTER TABLE `prestamo_activos`
ADD CONSTRAINT `fk_p_user_act` FOREIGN KEY (`usuarios_codigo`) REFERENCES `usuarios` (`codigo_usuario`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Filtros para la tabla `prestamo_libros`
--
ALTER TABLE `prestamo_libros`
ADD CONSTRAINT `fk_p_user` FOREIGN KEY (`codigo_usuario`) REFERENCES `usuarios` (`codigo_usuario`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Filtros para la tabla `recuperacion`
--
ALTER TABLE `recuperacion`
ADD CONSTRAINT `fk_recuperacion` FOREIGN KEY (`codigo_administrador`) REFERENCES `administradores` (`codigo_administrador`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Filtros para la tabla `usuarios`
--
ALTER TABLE `usuarios`
ADD CONSTRAINT `fk_inst` FOREIGN KEY (`codigo_institucion`) REFERENCES `institucion` (`codigo_institucion`) ON DELETE CASCADE ON UPDATE CASCADE;
/*!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 */;
|
drop table if exists campaign_detail;
create table campaign_detail
(candidate_name text,
race text,
website text,
phone text,
total double precision,
grassroots double precision,
instate double precision,
committee_names text,
filer_id integer);
copy campaign_detail from '/home/ubuntu/gitforks/backend/campaign_detail_dump.csv'
WITH CSV HEADER QUOTE as '"'; |
select user_id from users where login = :login AND password = :password; |
Outer joins and cross joins |
--4 placeholders. See comments.
with data as (
SELECT
p.PlayerID,
GamerTag,
avg(Score) as averageScore,
count(GamerTag) as gamesPlayed,
to_char(GameTimestamp,'YYYY-MM') as GameMonth
FROM Participation p
inner join Players pl on p.PlayerID = pl.PlayerID
inner join Games g on p.GameUUID = g.GameUUID
where to_char(GameTimestamp,'YYYY-MM') in ('2019-09','2019-10') --This month, and Last month
and (
g.GameName in ('Team','3 Teams','4 Teams', 'Colour Ranked','Individual')
or g.GameName in ('Standard - Solo', 'Standard - Team','Standard [3 Team] (10)','Standard [3 Team] (15)','Standard 2 Team',
'Standard 3 Team','Standard 4 Team','Standard Individual','Standard Multi team','- Standard [2 Team] (15))')
)
and g.ArenaName = 'Funstation Ltd, Edinburgh, Scotland' --target arena
GROUP BY p.PlayerID, pl.GamerTag, to_char(GameTimestamp,'YYYY-MM')
)
select d1.PlayerID, d1.GamerTag, cast(d1.averageScore as int),d1.gamesPlayed, round(cast(d1.averageScore -d2.averageScore as numeric),2) as changeInScore
from data d1 left join data d2 on d1.PlayerID = d2.PlayerID and d1.GameMonth != d2.GameMonth
where d1.GameMonth = '2019-10' --this month
order by averageScore desc;
|
DROP TABLE vsd.MakerspaceUpdates
CREATE TABLE vsd.MakerspaceUpdates (
OfficeCode varchar(4) NOT NULL,
--RID INT NOT NULL,
Seq int DEFAULT 0,
Updated DATETIME DEFAULT GETDATE()
)
--DROP TRIGGER vsd.MakerspaceUpdatesTrigger
/* Holy crap, this actually works... just not for deletes */
CREATE TRIGGER vsd.MakerspaceUpdatesTrigger ON vsd.MakerspaceBookingTimes
AFTER INSERT, UPDATE AS
BEGIN
IF NOT EXISTS (SELECT ty.OfficeCode FROM vsd.MakerspaceUpdates u
JOIN inserted i ON i.TID=i.TID
JOIN vsd.MakerspaceBookingResources r ON i.RID=r.RID
JOIN vsd.MakerspaceBookingResourceTypes ty ON ty.TypeID=r.TypeID
AND ty.OfficeCode=u.OfficeCode)
INSERT INTO vsd.MakerspaceUpdates (OfficeCode) VALUES(
(SELECT ty.OfficeCOde FROM inserted i
JOIN vsd.MakerspaceBookingResources r ON i.RID=r.RID
JOIN vsd.MakerspaceBookingResourceTypes ty ON ty.TypeID=r.TypeID)
);
UPDATE vsd.MakerspaceUpdates SET Seq=Seq+1, Updated = GETDATE()
FROM vsd.MakerspaceUpdates u
JOIN inserted i ON i.TID=i.TID
JOIN vsd.MakerspaceBookingResources r ON i.RID=r.RID
JOIN vsd.MakerspaceBookingResourceTypes ty ON ty.TypeID=r.TypeID
AND ty.OfficeCode=u.OfficeCode
END
--DROP TRIGGER vsd.MakerspaceDeleteTrigger
CREATE TRIGGER vsd.MakerspaceDeleteTrigger ON vsd.MakerspaceBookingTimes
AFTER DELETE AS
BEGIN
IF NOT EXISTS (SELECT ty.OfficeCode FROM vsd.MakerspaceUpdates u
JOIN deleted d ON d.TID=d.TID
JOIN vsd.MakerspaceBookingResources r ON d.RID=r.RID
JOIN vsd.MakerspaceBookingResourceTypes ty ON ty.TypeID=r.TypeID
AND ty.OfficeCode=u.OfficeCode)
INSERT INTO vsd.MakerspaceUpdates (OfficeCode) VALUES(
(SELECT ty.OfficeCOde FROM deleted d
JOIN vsd.MakerspaceBookingResources r ON d.RID=r.RID
JOIN vsd.MakerspaceBookingResourceTypes ty ON ty.TypeID=r.TypeID)
);
UPDATE vsd.MakerspaceUpdates SET Seq=Seq+1, Updated = GETDATE()
FROM vsd.MakerspaceUpdates u
JOIN deleted d ON d.TID=d.TID
JOIN vsd.MakerspaceBookingResources r ON d.RID=r.RID
JOIN vsd.MakerspaceBookingResourceTypes ty ON ty.TypeID=r.TypeID
AND ty.OfficeCode=u.OfficeCode
/* DELETE t FROM vsd.MakerspaceBookingTimes t
JOIN deleted d ON d.TID=t.TID
WHERE t.TID=d.TID
*/
END
SELECT * FROM vsd.MakerspaceUpdates WHERE OfficeCode='MNP'
SELECT * FROM vsd.MakerspaceBlockedTimes
CREATE TRIGGER vsd.MakerspaceBlockedUpdatesTrigger ON vsd.MakerspaceBlockedTimes
AFTER INSERT, UPDATE AS
BEGIN
IF NOT EXISTS (SELECT i.OfficeCode FROM vsd.MakerspaceUpdates u
JOIN inserted i ON i.OfficeCode=u.OfficeCode
AND i.OfficeCode=u.OfficeCode)
INSERT INTO vsd.MakerspaceUpdates (OfficeCode) VALUES((SELECT OfficeCode FROM inserted));
UPDATE vsd.MakerspaceUpdates SET Seq=Seq+1, Updated = GETDATE()
FROM vsd.MakerspaceUpdates u
JOIN inserted i ON i.OfficeCode=u.OfficeCode
AND i.OfficeCode=u.OfficeCode
END
CREATE TRIGGER vsd.MakerspaceBlockedDeleteTrigger ON vsd.MakerspaceBlockedTimes
AFTER DELETE AS
BEGIN
IF NOT EXISTS (SELECT d.OfficeCode FROM vsd.MakerspaceUpdates u
JOIN deleted d ON d.OfficeCode=u.OfficeCode
AND d.OfficeCode=u.OfficeCode)
INSERT INTO vsd.MakerspaceUpdates (OfficeCode) VALUES((SELECT OfficeCode FROM inserted));
UPDATE vsd.MakerspaceUpdates SET Seq=Seq+1, Updated = GETDATE()
FROM vsd.MakerspaceUpdates u
JOIN deleted d ON d.OfficeCode=u.OfficeCode
AND d.OfficeCode=u.OfficeCode
END
--JDL: 2019-12-06 added suppport for multiple certs in makerspace booking resources
CREATE TABLE vsd.MakerspaceBookingResourcesCerts (
RID INT FOREIGN KEY REFERENCES vsd.MakerspaceBookingResources(RID),
MCID INT FOREIGN KEY REFERENCES vsd.MakerCerts(MCID),
ModifiedBy varchar(30) NOT NULL,
Modified DATETIME NOT NULL
)
ALTER TABLE vsd.MakerspaceBookingResources ADD RequireCerts bit NULL |
INSERT INTO public.career(name, degree,status)
VALUES
('Administración de Empresas', 'Diplomado',true),
('Ciencias Policiales', 'Bachillerato',true),
('Maestría Profesional en Derechos Humanos', 'Maestría',true),
('Doctorado en Derecho', 'Doctorado',true);
INSERT INTO public.center(name,status)
VALUES
('ITCR',true),
('UCR',true),
('UNA',false);
INSERT INTO public.associated_career(id_center, name,status)
VALUES
(1, 'Ingeniería en Computación',true),
(1, 'Ingeniería en Electrónica',true),
(2, 'Filosofía',true),
(2, 'Periodismo',true),
(3, 'Veterinaria',false),
(3, 'Letras',true);
INSERT INTO public.network(name, network_type,status)
VALUES
('Municipalidad Heredia', 'Municipalidad',true),
('Municipalidad Santa Ana', 'Municipalidad',true),
('ONU', 'ONG',true),
('OMS', 'ONG',true),
('DanzaTEC', 'Grupo Artístico',false);
INSERT INTO public.investigation_unit(name,description,status)
VALUES
('Laboratorio de computación','Lab dedicado a programación',true),
('Laboratorio de física','Lab dedicado a la física',true),
('Centro de enseñanza','Facultad dedicada a la investigación de mejores prácticas de docencia',true);
-----------------------------------------------------------------------
--Avanzado
INSERT INTO public.person(dni, name, lastname1, lastname2, born_dates, status, phone_number, email,person_type)
VALUES ('116920331', 'Gabriel', 'Solórzano', 'Chanto', '1997-10-31', true, '+506 87062905', 'g.solorzano97@hotmail.com','Estudiante');
INSERT INTO public.student(dni, id_district, marital_status, campus_code, profile, address, nationality, emergency_contact)
VALUES ('116920331', 40406, 'Soltero', '1', 'Avanzado', 'San Bosco de Santa Bárbara', 'CR', '85858522');
INSERT INTO public.person_x_career(dni, career_code)
VALUES ('116920331', 1);
INSERT INTO public.person_x_language(dni, id_language)
VALUES ('116920331', 149);
INSERT INTO public.person_x_associated_career(dni, id_associated_career)
VALUES ('116920331', 1);
INSERT INTO public.person_x_network(dni, id_network)
VALUES ('116920331', 1);
-----------------------------------------------------------------------
--Básico
INSERT INTO public.person(dni, name, lastname1, lastname2, born_dates, status,phone_number,email, person_type)
VALUES ('411111111', 'Benjamin', 'Pavard', 'Ruíz', '1987-10-31', true,'+506 89988755','pavard@bayern.com', 'Estudiante');
INSERT INTO public.student(dni, id_district, marital_status, campus_code, profile, address, nationality, emergency_contact)
VALUES ('411111111', 0, 'Casado', '2', 'Básico', 'Lille', 'FR', '89562345');
INSERT INTO public.person_x_career(dni, career_code)
VALUES ('411111111', 2);
----------------------------------------------------------------------------
--Investigador
INSERT INTO public.person(dni, name, lastname1, lastname2, born_dates, status,phone_number,email,person_type)
VALUES ('402430534', 'Albert', 'Solís', 'Ruíz', '1987-10-31', true,'+506 89988755','zz@rm.com','Investigador');
INSERT INTO public.researcher(dni, id_inv_unit)
VALUES ('402430534',1);
----------------------------------------------------------------------------
--Proyecto
INSERT INTO public.project(id_inv_unit, name, code_manage, project_type)
VALUES (1, 'Proyecto de desarrollo de la ProRed', 'PR001', 'Estudiantes');
INSERT INTO public.project(id_inv_unit, name, code_manage, project_type)
VALUES (1, 'Proyecto de investigación de Mantos Aquiferos', 'PR002', 'Investigadores');
----------------------------------------------------------------------------
--Tipo Actividad
INSERT INTO public.acti_type(name,status)
VALUES
('Taller',true);
----------------------------------------------------------------------------
--Actividad
INSERT INTO public.activity(name, id_acti_type, id_project)
values ('Taller de computación',1,1);
INSERT INTO public.activity(name, id_acti_type, id_project)
values ('Taller de arte',1,null);
----------------------------------------------------------------------------
--Personas x Actividad
INSERT INTO public.person_x_activity(dni, id_activity)
values
('116920331',1),
('402430534',1);
-- Personas x Proyecto
INSERT INTO public.person_x_project(dni , id_project, role )
values
('116920331' , 1 , 'Investigador'),
('402430534' , 1 , 'Investigador'),
('411111111' , 2 , 'Co Investigador');
-- Period
INSERT INTO public.period(name)
values
('II Semestre 2020'),
('I Semestre 2021');
-- Gantt
INSERT INTO public.gantt(rel_code , id_period)
values
(1,1),
(2,2);
--Gantt Task
INSERT INTO public.gantt_task(id_gantt, task_name, description, start_date, end_date)
values
(1, 'Primera tarea Gantt1', 'Descripción', '2020-02-02' , '2020-02-03'),
(2 ,'Primera tarea Gantt2', 'Descripción2' , '2020-02-06', '2020-02-09'),
(2 ,'Primera tarea Gantt2', 'Descripción2' , '2020-02-06', '2020-02-09');
INSERT INTO public.financial_item(date_created, amount, type, id_project, id_activity, dni, code_unit, code_subunit)
values
('2020-02-02', 72000.5, 'Independiente', null, null, '116920331', 60109, 1),
('2020-03-02', 2222.5, 'Proyecto', 1, null, '116920331', 60109, 1),
('2020-07-02', 123123.5, 'Proyecto', 2, null, '411111111', 60109, 2),
('2020-04-02', 34234.5, 'Actividad', null, 1, '116920331', 60109, 2),
('2020-07-02', 12123.5, 'Proyecto', 2, null, '411111111', 60109, 3),
('2020-04-02', 666666.5, 'Actividad', 2, null, '116920331', 60109, 3),
('2020-04-02', 666666.5, 'Actividad', null, 1, '116920331', 60109, 3),
('2020-04-02', 666666.5, 'Actividad', null, 1, '116920331', 60109, 3),
('2020-04-02', 666666.5, 'Actividad', null, 1, '116920331', 60109, 3),
('2020-04-02', 666666.5, 'Actividad', 2, null, '116920331', 60109, 3),
('2020-04-02', 666666.5, 'Actividad', 1, null, '116920331', 60109, 3),
('2020-04-02', 34334.5, 'Actividad', null, 1, '116920331', 60109, 4);
INSERT INTO public.user (name,lastname1,lastname2,email,password,status)
VALUES
('ProRed','ProRed','ProRed','prored@uned.ac.cr','$2b$10$4zGIZUxqY6RCXHr.WqTpnuVjK2yI0kNdCIhUHPa/W7AnM6BsSwMXW',true), --Prored2020
('Jair','Cordero','Barona','corderojair@hotmail.com','$2b$10$lr9S9h9EKeU5Em6bcxVJD.8My6zEyIGqXH.SgDzhqN3LZKFYxzSy.',true); |
CREATE TABLE `role` (
`id` INT NOT NULL AUTO_INCREMENT,
`title` varchar(50) NOT NULL,
PRIMARY KEY (`id`)
);
CREATE TABLE `category` (
`id` INT NOT NULL AUTO_INCREMENT,
`title` varchar(100) NOT NULL,
`parent` INT NOT NULL,
PRIMARY KEY (`id`),
FOREIGN KEY (`parent`) REFERENCES `category`(`id`)
);
CREATE TABLE `manufactor` (
`id` INT NOT NULL AUTO_INCREMENT,
`title` varchar(100) NOT NULL,
PRIMARY KEY (`id`)
);
CREATE TABLE `product` (
`id` INT NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL,
`quantity` INT NOT NULL,
`price` INT NOT NULL,
`manufactor` INT NOT NULL,
`category` INT NOT NULL,
PRIMARY KEY (`id`),
FOREIGN KEY (`manufactor`) REFERENCES `manufactor`(`id`),
FOREIGN KEY (`category`) REFERENCES `category`(`id`)
);
CREATE TABLE `user` (
`id` INT NOT NULL AUTO_INCREMENT,
`login` varchar(50) NOT NULL UNIQUE,
`password` varchar(25) NOT NULL,
`phone` INT(35) NOT NULL,
`address` varchar(100) NOT NULL,
`role` INT NOT NULL,
PRIMARY KEY (`id`),
FOREIGN KEY (`role`) REFERENCES `role`(`id`)
);
CREATE TABLE `status` (
`id` INT NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL,
PRIMARY KEY (`id`)
);
CREATE TABLE `payment` (
`id` INT NOT NULL AUTO_INCREMENT,
`method` varchar(50) NOT NULL,
PRIMARY KEY (`id`)
);
CREATE TABLE `address` (
`id` INT NOT NULL AUTO_INCREMENT,
`country` varchar(50) NOT NULL,
`city` varchar(50) NOT NULL,
`street` varchar(50) NOT NULL,
`house` INT NOT NULL,
`apartment` INT NOT NULL,
PRIMARY KEY (`id`)
);
CREATE TABLE `order` (
`id` INT NOT NULL AUTO_INCREMENT,
`status` INT NOT NULL,
`address` INT NOT NULL,
`payment` INT NOT NULL,
`price` INT NOT NULL,
PRIMARY KEY (`id`),
FOREIGN KEY (`status`) REFERENCES `status`(`id`),
FOREIGN KEY (`address`) REFERENCES `address`(`id`),
FOREIGN KEY (`payment`) REFERENCES `payment`(`id`)
);
CREATE TABLE `order_item` (
`id` INT NOT NULL AUTO_INCREMENT,
`order_id` INT NOT NULL,
`product` INT NOT NULL,
`quantity` INT NOT NULL,
`price` INT NOT NULL,
PRIMARY KEY (`id`),
FOREIGN KEY (`order_id`) REFERENCES `order`(`id`),
FOREIGN KEY (`product`) REFERENCES `product`(`id`)
);
CREATE TABLE `cart` (
`id` INT NOT NULL AUTO_INCREMENT,
`user` INT NOT NULL,
`price` INT NOT NULL,
PRIMARY KEY (`id`),
FOREIGN KEY (`user`) REFERENCES `user`(`id`)
);
CREATE TABLE `cart_item` (
`id` INT NOT NULL AUTO_INCREMENT,
`cart_id` INT NOT NULL,
`product` INT NOT NULL,
`quantity` INT NOT NULL,
`price` INT NOT NULL,
PRIMARY KEY (`id`),
FOREIGN KEY (`cart_id`) REFERENCES `cart`(`id`),
FOREIGN KEY (`product`) REFERENCES `product`(`id`)
);
CREATE TABLE `billing` (
`id` INT NOT NULL AUTO_INCREMENT,
`user_id` INT NOT NULL,
`address` INT NOT NULL,
PRIMARY KEY (`id`),
FOREIGN KEY (`user_id`) REFERENCES `user`(`id`),
FOREIGN KEY (`address`) REFERENCES `address`(`id`)
); |
SELECT ST_Envelope(ST_Union(geom)) FROM regiao |
USE psdb;
SELECT * FROM psdb.employees WHERE psdb.employees.first_name LIKE '%arvi%';
|
set schema 'transparencia';
create sequence acordos_id_seq
increment 1
minvalue 1
maxvalue 9223372036854775807
start 1
cache 1;
create table acordos(
id integer default nextval('acordos_id_seq'),
situacao character varying(100),
numero character varying(50),
anousu integer,
data_assinatura date,
contratado character varying(40),
data_inicio date,
data_fim date,
objeto text,
instituicao_id integer,
comissao character varying(100),
lei character varying(60),
grupo character varying(100),
quantidade_renovacao numeric(20,2),
unidade_tempo_renovacao integer,
numero_processo character varying(60),
peridodo_comercial boolean,
quantidade_vigencia numeric(20,2),
unidade_tempo_vigencia integer,
constraint acordos_id_pk primary key(id),
constraint acordos_instituicao_id_fk foreign key(instituicao_id) references instituicoes(id)
);
create sequence acordo_aditamentos_id_seq
increment 1
minvalue 1
maxvalue 9223372036854775807
start 1
cache 1;
create table acordo_aditamentos(
id integer default nextval('acordo_aditamentos_id_seq'),
acordo_id integer,
posicao_tipo character varying(50),
numero integer,
situacao character varying(100),
data date,
emergencial boolean,
observacao text,
numero_aditamento character varying(20),
constraint acordo_aditamentos_id_pk primary key(id),
constraint acordo_aditamentos_acordo_fk foreign key(acordo_id) references acordos
);
create sequence acordo_aditamento_itens_id_seq
increment 1
minvalue 1
maxvalue 9223372036854775807
start 1
cache 1;
create table acordo_aditamento_itens(
id integer default nextval('acordo_aditamento_itens_id_seq'),
acordo_aditamento_id integer,
material character varying(80),
quantidade integer,
valor_unitario numeric(20,2),
valor_total numeric(20,2),
elemento integer,
ordem integer,
unidade character varying(80),
resumo text,
tipo_controle integer,
constraint acordo_aditamento_itens_id_pk primary key(id),
constraint acordo_aditamento_itens_acordo_aditamentos_fk foreign key(acordo_aditamento_id) references acordo_aditamentos
);
create sequence acordo_documentos_id_seq
increment 1
minvalue 1
maxvalue 9223372036854775807
start 1
cache 1;
create table acordo_documentos(
id integer default nextval('acordo_documentos_id_seq'),
acordo_id integer,
nome text,
descricao character varying(300),
arquivo oid,
constraint acordo_documentos_id_pk primary key(id),
constraint acordo_documentos_acordos_fk foreign key(acordo_id) references acordos
);
create sequence acordo_empenhos_id_seq
increment 1
minvalue 1
maxvalue 9223372036854775807
start 1
cache 1;
create table acordo_empenhos(
id integer default nextval('acordo_empenhos_id_seq'),
acordo_id integer,
empenho_id integer,
constraint acordo_empenhos_id_pk primary key(id),
constraint acordo_empenhos_acordos_fk foreign key(acordo_id) references acordos,
constraint acordo_empenhos_empenhos_fk foreign key(empenho_id) references empenhos
); |
drop table PERSONS if exists;
create table PERSONS (
USERID bigint generated by default as identity,
USERNAME varchar(25),
PASSWORD varchar(100),
ROLE varchar(100),
AMOUNT int,
primary key (USERID)
);
insert into PERSONS (AMOUNT,USERID,PASSWORD,USERNAME,ROLE) values (100,1,'07925a35bc8f61d428955f56d3d5a5a383166f3dc36c587bdb2a3872a6421031903f843ca03efe3f', 'admin', 'ROLE_USER,ROLE_ADMIN');
insert into PERSONS (AMOUNT,USERID,PASSWORD,USERNAME,ROLE) values (500,2,'912e04f2492c43a9124de1d5841c12b8854683458a77593eda0cf545b326897f229594ae7ea00730', 'user', 'ROLE_USER');
insert into PERSONS (AMOUNT,USERID,PASSWORD,USERNAME,ROLE) values (0,3,'4020de0fc7e6b816764f5f5999fe3d76db70d8240419d27b2b48d4e2d4b9ef2aae3dde31594c7c92', 'foo', 'ROLE_SOMEBODY');
drop table TASKS if exists;
create table TASKS (
ID bigint generated by default as identity,
TYPE varchar(10),
WHAT varchar(255),
WHO varchar(25),
WHEN date,
PERSON_USERID bigint,
PRICE int,
primary key (ID)
);
insert into TASKS (PRICE,TYPE,WHEN,WHAT,WHO,PERSON_USERID) values (10,'BUY', '2017-08-12', 'Some food', 'user',1);
insert into TASKS (PRICE,TYPE,WHEN,WHAT,WHO,PERSON_USERID) values (111,'TASK', '2018-08-15', 'Do homework', 'user',1);
insert into TASKS (PRICE,TYPE,WHEN,WHAT,WHO,PERSON_USERID) values (15,'BUY', '2016-02-10', 'Bread', 'admin',2);
insert into TASKS (PRICE,TYPE,WHEN,WHAT,WHO,PERSON_USERID) values (175,'TASK', '2015-03-09', 'Cook the meal', 'admin',2);
ALTER TABLE TASKS
ADD FOREIGN KEY (PERSON_USERID)
REFERENCES PERSONS(USERID);
|
(1,'siteurl','http://atestsite.dev','yes'),
's:41:"http://atestsite.dev/wp-content/something";'
's:41:"http://atestsite.dev/wp-content/something";'
's:41:"http://atestsite.dev/wp-content/something";'
's:44:"http://atestsite.dev/wp-content/something123";'
# A simple replacement to add to the replacement count.
http://atestsite.dev |
-- phpMyAdmin SQL Dump
-- version 3.5.3
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 07, 2012 at 10:39 PM
-- Server version: 5.5.8
-- PHP Version: 5.3.5
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: `filocity2`
--
-- --------------------------------------------------------
--
-- Table structure for table `alarms`
--
DROP TABLE IF EXISTS `alarms`;
CREATE TABLE IF NOT EXISTS `alarms` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`type` smallint(2) NOT NULL COMMENT '0 - Email1 - Text2 - Site Notice',
`created` datetime NOT NULL,
`modified` datetime NOT NULL,
`user_id` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `calendars`
--
DROP TABLE IF EXISTS `calendars`;
CREATE TABLE IF NOT EXISTS `calendars` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`name` varchar(45) DEFAULT NULL,
`created` datetime NOT NULL,
`modified` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;
--
-- Dumping data for table `calendars`
--
INSERT INTO `calendars` (`id`, `user_id`, `name`, `created`, `modified`) VALUES
(1, 1, 'Test calendar 1', '2012-10-26 22:32:16', '2012-10-26 22:32:19'),
(2, 1, 'Test Calendar 2', '2012-10-26 22:32:16', '2012-10-26 22:32:16'),
(3, 2, 'Calendar 1', '2012-10-26 22:32:16', '2012-10-26 22:32:16'),
(4, 2, 'Calendar 2', '2012-10-26 22:32:16', '2012-10-26 22:32:16');
-- --------------------------------------------------------
--
-- Table structure for table `calendar_adds`
--
DROP TABLE IF EXISTS `calendar_adds`;
CREATE TABLE IF NOT EXISTS `calendar_adds` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`user_add` int(11) NOT NULL,
`created` datetime NOT NULL,
`modified` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=36 ;
--
-- Dumping data for table `calendar_adds`
--
INSERT INTO `calendar_adds` (`id`, `user_id`, `user_add`, `created`, `modified`) VALUES
(34, 1, 2, '2012-11-06 10:10:01', '2012-11-06 10:10:01'),
(35, 1, 3, '2012-11-06 10:10:03', '2012-11-06 10:10:03');
-- --------------------------------------------------------
--
-- Table structure for table `calendar_events`
--
DROP TABLE IF EXISTS `calendar_events`;
CREATE TABLE IF NOT EXISTS `calendar_events` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`calendar_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`title` text NOT NULL,
`description` text,
`date_start` datetime NOT NULL,
`date_end` datetime NOT NULL,
`timezone` varchar(45) NOT NULL,
`is_all_day` tinyint(1) NOT NULL DEFAULT '0',
`is_repeat` tinyint(1) NOT NULL DEFAULT '0',
`location` text,
`color` varchar(6) DEFAULT NULL,
`availability` tinyint(2) NOT NULL DEFAULT '0' COMMENT '0 -> Available, 1 -> Busy',
`privacy` tinyint(2) NOT NULL DEFAULT '0' COMMENT '0-> Default, 1 -> Public, 2 -> Private',
`created` datetime NOT NULL,
`modified` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=45 ;
--
-- Dumping data for table `calendar_events`
--
INSERT INTO `calendar_events` (`id`, `calendar_id`, `user_id`, `title`, `description`, `date_start`, `date_end`, `timezone`, `is_all_day`, `is_repeat`, `location`, `color`, `availability`, `privacy`, `created`, `modified`) VALUES
(3, 2, 2, 'Event 1', 'have some description....', '2012-10-05 19:30:00', '2012-10-07 19:30:00', '', 0, 0, 'in Boston....', 'A3BBFE', 0, 0, '2012-10-05 19:31:03', '2012-10-06 19:31:03'),
(4, 3, 2, 'Event 3', 'have some description....', '2012-10-11 19:30:00', '2012-10-16 19:30:00', '', 0, 0, 'some where....', '3BD6DC', 0, 0, '2012-10-11 19:31:13', '2012-10-11 19:31:13'),
(5, 4, 1, 'Event 4', 'have some description....', '2012-11-08 19:30:00', '2012-10-14 19:30:00', '', 0, 0, 'in USA......', '74E8BE', 0, 0, '2012-10-12 19:31:17', '2012-10-12 19:31:17'),
(6, 4, 3, 'Event 6', 'have some description....', '2012-10-18 19:30:00', '2012-10-26 19:30:00', '', 0, 0, 'in Market of NYC....', '4BB842', 0, 0, '2012-10-18 19:31:22', '2012-10-18 19:31:22'),
(7, 3, 2, 'Event 7', 'have some description....', '2012-10-20 19:30:00', '2012-10-30 19:30:00', '', 0, 0, 'location belongs to earth..', 'FCD74E', 0, 0, '2012-10-20 19:31:26', '2012-10-22 19:31:26'),
(8, 3, 1, 'Event 8', 'have some description....', '2012-11-08 19:30:00', '2012-10-31 19:30:00', '', 0, 0, 'Bermuda Triangle....', 'FFB871', 0, 0, '2012-10-19 19:31:30', '2012-10-25 19:31:30'),
(9, 2, 2, 'Event 9', 'have some description....', '2012-10-25 19:30:00', '2012-10-30 19:30:00', '', 0, 0, 'Dead Sea...', 'FF8678', 0, 0, '2012-10-25 19:31:34', '2012-10-26 19:31:34'),
(10, 2, 1, 'Event 10', 'have some description....', '2012-11-08 19:30:00', '2012-11-05 19:30:00', '', 0, 0, 'location.........', 'DE1D1D', 0, 0, '2012-10-17 19:31:38', '2012-10-25 19:31:38'),
(11, 1, 3, 'My Event 3', 'have some description....', '2012-10-21 19:33:00', '2012-10-29 19:33:00', '', 0, 0, 'California....', 'DBAAFF', 0, 0, '2012-10-21 19:34:03', '2012-10-21 19:34:03'),
(12, 3, 3, 'My Event 5', 'have some description....', '2012-10-13 19:34:00', '2012-10-26 19:34:00', '', 0, 0, 'some where........', 'E1E1E1', 0, 0, '2012-10-13 19:34:58', '2012-10-13 19:34:58'),
(13, 4, 1, 'test event added by abdullah', 'have some description....', '2012-11-09 19:36:00', '2012-11-17 19:36:00', '', 0, 0, 'some location...........', 'E1E1E1', 0, 0, '2012-10-26 19:36:45', '2012-10-26 19:36:45'),
(14, 2, 2, 'Abullah''s test event', 'have some description....', '2012-10-26 19:41:00', '2012-11-02 19:41:00', '', 0, 0, NULL, 'CCCCCC', 0, 0, '2012-10-26 19:41:21', '2012-10-26 19:41:21'),
(15, 1, 1, 'some event', NULL, '2012-11-09 13:07:00', '2012-10-27 13:07:00', '', 0, 0, 'some location...........', NULL, 0, 0, '2012-10-27 13:07:39', '2012-10-27 13:07:39'),
(17, 1, 1, 'the new event', 'some des...........', '2012-11-09 05:20:09', '2012-09-30 00:00:00', '', 0, 0, 'some location...........', NULL, 0, 0, '2012-10-27 13:33:17', '2012-10-27 13:33:17'),
(18, 1, 2, 'aabbbcccdddeee', 'some des...........', '2012-09-30 00:00:00', '2012-09-30 00:00:00', '', 0, 0, 'some location...........', NULL, 0, 0, '2012-10-27 13:38:45', '2012-10-27 13:38:45'),
(19, 1, 2, 'yyyy... new event', 'some des...........', '2012-09-30 00:00:00', '2012-09-30 00:00:00', '', 0, 0, 'some location...........', NULL, 0, 0, '2012-10-27 13:42:16', '2012-10-27 13:42:16'),
(20, 1, 2, 'rerender after new event add', 'some des...........', '2012-09-30 00:00:00', '2012-09-30 00:00:00', '', 0, 0, 'some location...........', NULL, 0, 0, '2012-10-27 13:46:00', '2012-10-27 13:46:00'),
(21, 1, 3, 'added another new event', 'some des...........', '2012-10-01 00:00:00', '2012-10-01 00:00:00', '', 0, 0, 'some location...........', NULL, 0, 0, '2012-10-27 13:47:37', '2012-10-27 13:47:37'),
(22, 4, 3, 'wow!! this work event', 'some des...........', '2012-10-01 00:00:00', '2012-10-01 00:00:00', '', 0, 0, 'some location...........', NULL, 0, 0, '2012-10-27 13:48:15', '2012-10-27 13:48:15'),
(23, 1, 3, 'sfdasfdasfdasf', 'some des...........', '2012-10-01 00:00:00', '2012-10-01 00:00:00', '', 0, 0, 'some location...........', NULL, 0, 0, '2012-10-27 13:48:28', '2012-10-27 13:48:28'),
(24, 1, 3, 'another event', 'some des...........', '2012-10-02 00:00:00', '2012-10-02 00:00:00', '', 0, 0, 'some location...........', NULL, 0, 0, '2012-10-27 13:49:20', '2012-10-27 13:49:20'),
(25, 1, 1, 'Add new event and update cal', 'some des...........', '2012-11-10 05:20:14', '2012-10-02 00:00:00', '', 0, 0, 'some loc...........', NULL, 0, 0, '2012-10-27 13:54:28', '2012-10-27 13:54:28'),
(26, 1, 1, 'added', 'some des...........', '2012-10-12 03:18:25', '2012-10-12 00:00:00', '', 0, 0, 'some location...........', NULL, 0, 0, '2012-10-27 13:58:37', '2012-10-27 13:58:37'),
(27, 1, 1, 'last add', 'some des...........', '2012-10-03 00:00:00', '2012-10-05 00:00:00', '', 0, 0, 'some location...........', '5181EF', 0, 0, '2012-10-27 14:00:12', '2012-10-28 13:09:54'),
(28, 1, 1, 'Latest add', 'some des...........', '2012-10-03 00:00:00', '2012-10-03 00:00:00', '', 0, 0, 'some location...........', NULL, 0, 0, '2012-10-27 14:00:33', '2012-10-27 14:00:33'),
(29, 1, 1, 'I add this', 'some des...........', '2012-10-17 00:00:00', '2012-10-17 00:00:00', '', 0, 0, 'some location...........', NULL, 0, 0, '2012-10-27 14:02:00', '2012-10-27 14:02:00'),
(31, 1, 1, 'gimme a title', 'some des...........', '2012-09-30 16:57:40', '2012-09-30 16:57:40', '', 0, 0, 'some location...........', NULL, 0, 0, '2012-10-28 06:57:47', '2012-10-28 06:57:47'),
(32, 1, 1, 'Going to vacation', 'some description about my next vacation tour to village', '2012-10-08 17:12:58', '2012-10-12 05:12:00', '', 0, 0, 'some location...........', '74E8BE', 1, 1, '2012-10-28 07:13:44', '2012-10-28 13:37:20'),
(33, 1, 1, 'some event and fun', 'some description....', '2012-10-01 20:58:18', '2012-10-01 09:58:00', '', 1, 1, 'somewhere in earth', 'A8A6FF', 0, 1, '2012-10-28 10:59:00', '2012-10-28 10:59:00'),
(36, 1, 1, 'test', NULL, '2012-11-20 20:52:33', '2012-11-23 08:52:33', '', 0, 0, NULL, NULL, 0, 0, '2012-11-06 09:52:40', '2012-11-06 09:52:44'),
(37, 2, 1, 'another test', NULL, '2012-11-26 20:52:45', '2012-12-05 08:52:45', '', 0, 0, NULL, NULL, 0, 0, '2012-11-06 09:52:54', '2012-11-06 09:52:57'),
(38, 2, 1, 'testing event', NULL, '2012-11-05 20:52:58', '2012-11-14 08:52:58', '', 0, 0, NULL, NULL, 0, 0, '2012-11-06 09:53:07', '2012-11-06 09:53:10'),
(39, 2, 2, 'test', NULL, '2012-10-28 21:07:17', '2012-10-31 09:07:17', '', 0, 0, NULL, NULL, 0, 0, '2012-11-06 10:07:21', '2012-11-06 10:07:23'),
(40, 1, 2, 'another test', '', '2012-11-06 09:07:24', '2012-11-19 09:07:24', '', 1, 1, 'NY', '4BB842', 0, 1, '2012-11-06 10:07:40', '2012-11-06 10:07:46'),
(41, 1, 2, 'another test 1', '', '2012-11-27 21:07:46', '2012-12-05 09:07:46', '', 1, 1, 'NY', '3BD6DC', 0, 1, '2012-11-06 10:07:56', '2012-11-06 10:08:00'),
(42, 1, 3, 'testing', 'some des.........', '2012-11-05 21:08:16', '2012-11-20 09:08:16', '', 1, 1, 'NY', '3BD6DC', 0, 1, '2012-11-06 10:08:35', '2012-11-06 10:08:38'),
(43, 3, 3, 'testing 1', 'some des 1.........', '2012-11-27 21:08:39', '2012-12-04 09:08:39', '', 1, 1, 'NYC', 'DBAAFF', 0, 0, '2012-11-06 10:08:53', '2012-11-06 10:08:56'),
(44, 1, 1, 'a simple title', 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry''s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.', '2012-11-08 02:00:58', '2012-11-14 03:00:00', '', 1, 1, 'NYC', '3BD6DC', 0, 1, '2012-11-07 15:01:46', '2012-11-07 15:03:53');
-- --------------------------------------------------------
--
-- Table structure for table `calendar_shares`
--
DROP TABLE IF EXISTS `calendar_shares`;
CREATE TABLE IF NOT EXISTS `calendar_shares` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`requester` int(11) NOT NULL COMMENT 'The person REQUESTING the user share.',
`acceptor` int(11) NOT NULL COMMENT 'The person who needs to ACCEPT of REJECT share. If share is rejected [ do something cool ].',
`approved` tinyint(1) NOT NULL COMMENT '0 - Waiting (NO ACCESS)\n1 - Approved\n',
`created` datetime NOT NULL,
`modified` datetime NOT NULL,
`calendar_id` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='map of users who share calendars' AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `comments`
--
DROP TABLE IF EXISTS `comments`;
CREATE TABLE IF NOT EXISTS `comments` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`project_id` int(11) DEFAULT NULL,
`task_id` int(11) DEFAULT NULL,
`created` datetime NOT NULL,
`comment` text NOT NULL,
`modified` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='This table stores all comments across the site.' AUTO_INCREMENT=14 ;
--
-- Dumping data for table `comments`
--
INSERT INTO `comments` (`id`, `user_id`, `project_id`, `task_id`, `created`, `comment`, `modified`) VALUES
(1, 1, 1, 1, '2012-10-19 21:01:23', 'This is comment 1', '2012-10-19 21:01:23'),
(2, 1, 1, 1, '2012-10-19 21:01:31', 'This is comment 2', '2012-10-19 21:01:31'),
(3, 1, 1, 1, '2012-10-19 21:02:09', 'Comment 3', '2012-10-19 21:02:09'),
(4, 1, 1, 1, '2012-10-19 21:02:15', 'Comment 4', '2012-10-19 21:02:15'),
(5, 1, 1, 1, '2012-10-19 21:02:24', 'This is big comment 5', '2012-10-19 21:02:24'),
(6, 2, 1, 1, '2012-10-19 21:02:34', 'Comment 6', '2012-10-19 21:02:34'),
(7, 2, 1, 1, '2012-10-19 21:02:41', 'Comment 7', '2012-10-19 21:02:41'),
(8, 3, 1, 1, '2012-10-19 21:02:47', 'Comment 8', '2012-10-19 21:02:47'),
(9, 3, 1, 1, '2012-10-19 21:02:53', 'Comment 9', '2012-10-19 21:02:53'),
(10, 1, 2, 2, '2012-10-19 21:03:06', 'Comment 1', '2012-10-19 21:03:06'),
(11, 1, 2, 1, '2012-10-19 21:03:22', 'Comment 2\r\n', '2012-10-19 21:03:22'),
(12, 2, 3, 1, '2012-10-19 21:03:38', 'Comment 1', '2012-10-19 21:03:38'),
(13, 3, 3, 2, '2012-10-19 21:03:49', 'Comment 5', '2012-10-19 21:03:49');
-- --------------------------------------------------------
--
-- Table structure for table `companies`
--
DROP TABLE IF EXISTS `companies`;
CREATE TABLE IF NOT EXISTS `companies` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`package_id` int(11) NOT NULL,
`name` varchar(200) NOT NULL,
`created` datetime NOT NULL,
`modified` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=11 ;
--
-- Dumping data for table `companies`
--
INSERT INTO `companies` (`id`, `package_id`, `name`, `created`, `modified`) VALUES
(1, 1, 'ABCoder', '2012-10-12 19:58:06', '2012-10-12 19:58:06'),
(2, 1, 'Filocity', '2012-10-12 19:58:12', '2012-10-12 19:58:12'),
(3, 2, 'Codereliable', '2012-10-12 19:58:22', '2012-10-12 19:58:22'),
(4, 1, 'Company 1', '2012-10-12 19:59:08', '2012-10-12 19:59:08'),
(5, 2, 'Company 2', '2012-10-12 19:59:14', '2012-10-12 19:59:14'),
(6, 2, 'Company 3', '2012-10-12 19:59:22', '2012-10-12 19:59:22'),
(7, 3, 'Company 4', '2012-10-12 20:00:10', '2012-10-12 20:00:10'),
(8, 3, 'Company 5', '2012-10-12 20:00:16', '2012-10-12 20:00:16'),
(9, 3, 'Company 6', '2012-10-12 20:00:23', '2012-10-12 20:00:23'),
(10, 1, 'Company 7', '2012-10-12 20:00:29', '2012-10-12 20:00:29');
-- --------------------------------------------------------
--
-- Table structure for table `documents`
--
DROP TABLE IF EXISTS `documents`;
CREATE TABLE IF NOT EXISTS `documents` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(45) NOT NULL COMMENT 'Friendly name of the file.',
`content` longblob,
`ext` varchar(10) DEFAULT NULL,
`type` varchar(100) DEFAULT NULL,
`size` varchar(100) DEFAULT NULL,
`user_id` varchar(45) NOT NULL COMMENT 'ID of the user that added the file.',
`folder_id` int(11) NOT NULL COMMENT 'This is the ID of the folder that this file goes within.',
`status` tinyint(2) DEFAULT '1' COMMENT '0 - Disabled (access denied to all users).1 - Enabled to those with ownership rights.',
`created` datetime NOT NULL,
`modified` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=81 ;
-- --------------------------------------------------------
--
-- Table structure for table `folders`
--
DROP TABLE IF EXISTS `folders`;
CREATE TABLE IF NOT EXISTS `folders` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`parent_id` smallint(6) DEFAULT NULL,
`created` datetime NOT NULL,
`name` varchar(45) NOT NULL,
`user_id` smallint(6) NOT NULL,
`modified` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=22 ;
--
-- Dumping data for table `folders`
--
INSERT INTO `folders` (`id`, `parent_id`, `created`, `name`, `user_id`, `modified`) VALUES
(1, 0, '0000-00-00 00:00:00', 'My Categories 1', 1, '0000-00-00 00:00:00'),
(2, 1, '0000-00-00 00:00:00', 'Fun', 1, '0000-00-00 00:00:00'),
(3, 2, '0000-00-00 00:00:00', 'Sport', 1, '0000-00-00 00:00:00'),
(4, 3, '0000-00-00 00:00:00', 'Surfing', 1, '0000-00-00 00:00:00'),
(5, 3, '0000-00-00 00:00:00', 'Extreme knitting', 1, '0000-00-00 00:00:00'),
(6, 2, '0000-00-00 00:00:00', 'Friends', 1, '0000-00-00 00:00:00'),
(7, 6, '0000-00-00 00:00:00', 'Gerald', 1, '0000-00-00 00:00:00'),
(8, 6, '0000-00-00 00:00:00', 'Gwendolyn', 1, '0000-00-00 00:00:00'),
(9, 1, '0000-00-00 00:00:00', 'Work', 1, '0000-00-00 00:00:00'),
(10, 9, '0000-00-00 00:00:00', 'Reports', 1, '0000-00-00 00:00:00'),
(11, 10, '0000-00-00 00:00:00', 'Annual', 1, '0000-00-00 00:00:00'),
(12, 10, '0000-00-00 00:00:00', 'Status', 1, '0000-00-00 00:00:00'),
(13, 9, '0000-00-00 00:00:00', 'Trips', 1, '0000-00-00 00:00:00'),
(14, 10, '0000-00-00 00:00:00', 'National', 1, '2012-10-29 17:42:16'),
(15, 13, '0000-00-00 00:00:00', 'International', 1, '0000-00-00 00:00:00'),
(19, 0, '0000-00-00 00:00:00', 'My Categories 2', 1, '0000-00-00 00:00:00'),
(20, 19, '0000-00-00 00:00:00', 'Fun 2', 1, '0000-00-00 00:00:00'),
(21, 20, '0000-00-00 00:00:00', 'Sport 2', 1, '0000-00-00 00:00:00');
-- --------------------------------------------------------
--
-- Table structure for table `logs`
--
DROP TABLE IF EXISTS `logs`;
CREATE TABLE IF NOT EXISTS `logs` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`created` datetime NOT NULL,
`modified` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=55 ;
--
-- Dumping data for table `logs`
--
INSERT INTO `logs` (`id`, `user_id`, `created`, `modified`) VALUES
(1, 1, '2012-10-13 14:23:17', '2012-10-13 14:23:17'),
(2, 1, '2012-10-13 14:23:20', '2012-10-13 14:23:20'),
(3, 2, '2012-10-13 14:24:20', '2012-10-13 14:24:20'),
(4, 3, '2012-10-13 14:24:29', '2012-10-13 14:24:29'),
(5, 2, '2012-10-13 14:24:54', '2012-10-13 14:24:54'),
(6, 1, '2012-10-13 18:25:46', '2012-10-13 18:25:46'),
(7, 1, '2012-10-14 17:02:40', '2012-10-14 17:02:40'),
(8, 1, '2012-10-16 19:13:31', '2012-10-16 19:13:31'),
(9, 1, '2012-10-17 15:33:51', '2012-10-17 15:33:51'),
(10, 1, '2012-10-19 00:31:24', '2012-10-19 00:31:24'),
(11, 1, '2012-10-19 00:32:03', '2012-10-19 00:32:03'),
(12, 1, '2012-10-19 07:26:54', '2012-10-19 07:26:54'),
(13, 1, '2012-10-19 08:30:47', '2012-10-19 08:30:47'),
(14, 1, '2012-10-19 16:47:16', '2012-10-19 16:47:16'),
(15, 1, '2012-10-19 13:02:16', '2012-10-19 13:02:16'),
(16, 1, '2012-10-19 14:13:09', '2012-10-19 14:13:09'),
(17, 1, '2012-10-19 14:21:00', '2012-10-19 14:21:00'),
(18, 1, '2012-10-19 20:44:29', '2012-10-19 20:44:29'),
(19, 1, '2012-10-19 15:26:50', '2012-10-19 15:26:50'),
(20, 1, '2012-10-20 00:19:01', '2012-10-20 00:19:01'),
(21, 1, '2012-10-21 18:25:19', '2012-10-21 18:25:19'),
(22, 1, '2012-10-22 12:27:39', '2012-10-22 12:27:39'),
(23, 1, '2012-10-25 21:27:01', '2012-10-25 21:27:01'),
(24, 1, '2012-10-26 05:26:32', '2012-10-26 05:26:32'),
(25, 1, '2012-10-26 17:41:07', '2012-10-26 17:41:07'),
(26, 1, '2012-10-26 18:37:06', '2012-10-26 18:37:06'),
(27, 1, '2012-10-26 21:31:51', '2012-10-26 21:31:51'),
(28, 1, '2012-10-27 01:32:15', '2012-10-27 01:32:15'),
(29, 1, '2012-10-28 01:49:00', '2012-10-28 01:49:00'),
(30, 1, '2012-10-28 05:41:14', '2012-10-28 05:41:14'),
(31, 1, '2012-10-28 05:48:45', '2012-10-28 05:48:45'),
(32, 1, '2012-10-28 10:34:34', '2012-10-28 10:34:34'),
(33, 1, '2012-10-29 13:51:15', '2012-10-29 13:51:15'),
(34, 1, '2012-10-29 18:35:04', '2012-10-29 18:35:04'),
(35, 1, '2012-10-30 08:32:37', '2012-10-30 08:32:37'),
(36, 1, '2012-10-30 10:00:47', '2012-10-30 10:00:47'),
(37, 1, '2012-10-30 10:27:17', '2012-10-30 10:27:17'),
(38, 1, '2012-10-30 11:54:24', '2012-10-30 11:54:24'),
(39, 1, '2012-11-01 22:21:06', '2012-11-01 22:21:06'),
(40, 1, '2012-11-03 15:45:28', '2012-11-03 15:45:28'),
(41, 1, '2012-11-05 09:13:56', '2012-11-05 09:13:56'),
(42, 1, '2012-11-05 13:12:22', '2012-11-05 13:12:22'),
(43, 3, '2012-11-06 09:52:15', '2012-11-06 09:52:15'),
(44, 1, '2012-11-06 09:52:28', '2012-11-06 09:52:28'),
(45, 2, '2012-11-06 10:07:13', '2012-11-06 10:07:13'),
(46, 3, '2012-11-06 10:08:13', '2012-11-06 10:08:13'),
(47, 1, '2012-11-06 10:09:06', '2012-11-06 10:09:06'),
(48, 1, '2012-11-06 23:49:47', '2012-11-06 23:49:47'),
(49, 1, '2012-11-07 01:51:19', '2012-11-07 01:51:19'),
(50, 1, '2012-11-07 02:16:09', '2012-11-07 02:16:09'),
(51, 1, '2012-11-07 02:23:01', '2012-11-07 02:23:01'),
(52, 1, '2012-11-07 10:11:07', '2012-11-07 10:11:07'),
(53, 1, '2012-11-07 12:55:42', '2012-11-07 12:55:42'),
(54, 1, '2012-11-07 14:14:22', '2012-11-07 14:14:22');
-- --------------------------------------------------------
--
-- Table structure for table `notices`
--
DROP TABLE IF EXISTS `notices`;
CREATE TABLE IF NOT EXISTS `notices` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL COMMENT 'The ID of the user who has committed the action.',
`notice_type` tinyint(2) NOT NULL COMMENT '0 - New1 - Updated2 - Shared Accessed3 - Comment4 - Deleted',
`itemid` int(11) DEFAULT NULL COMMENT 'Like file_id or folder_id, project_id, etc. Whatever has been updated.',
`item_type` varchar(100) NOT NULL,
`description` text COMMENT 'Optional, some notice_type''s will use this.',
`created` datetime NOT NULL,
`modified` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ;
--
-- Dumping data for table `notices`
--
INSERT INTO `notices` (`id`, `user_id`, `notice_type`, `itemid`, `item_type`, `description`, `created`, `modified`) VALUES
(1, 1, 0, 1, 'file', 'abdulla added a file named test.docs', '2012-10-13 20:22:57', '2012-10-13 20:26:00'),
(2, 1, 0, 2, 'file', 'added new file named test2.pdf', '2012-10-13 20:23:33', '2012-10-13 20:26:06'),
(3, 1, 1, 3, 'project', 'abdullah assigned a new project', '2012-10-12 20:25:13', '2012-10-12 20:25:13'),
(4, 1, 2, 4, 'project', 'another project finished by abdullah', '2012-10-12 20:26:56', '2012-10-12 20:26:56'),
(5, 1, 3, 7, 'file', 'added', '2012-10-14 17:03:26', '2012-10-14 17:03:26'),
(6, 1, 3, 8, 'file', 'adddddd', '2012-10-14 17:03:43', '2012-10-14 17:03:43'),
(7, 1, 4, 6, 'project', 'adddd', '2012-10-14 17:04:14', '2012-10-14 17:04:14');
-- --------------------------------------------------------
--
-- Table structure for table `packages`
--
DROP TABLE IF EXISTS `packages`;
CREATE TABLE IF NOT EXISTS `packages` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(250) NOT NULL,
`price` float NOT NULL,
`storage` int(11) NOT NULL,
`max_member` int(11) NOT NULL,
`created` datetime NOT NULL,
`modified` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;
--
-- Dumping data for table `packages`
--
INSERT INTO `packages` (`id`, `name`, `price`, `storage`, `max_member`, `created`, `modified`) VALUES
(1, 'Package 1', 250, 250, 20, '2012-10-12 19:54:14', '2012-10-12 19:54:14'),
(2, 'Package 2', 50, 50, 10, '2012-10-12 19:54:26', '2012-10-12 19:54:26'),
(3, 'Package 4', 10, 10, 5, '2012-10-12 19:57:15', '2012-10-12 19:57:15'),
(4, 'Package 3', 5, 5, 3, '2012-10-12 19:57:28', '2012-10-12 19:57:28');
-- --------------------------------------------------------
--
-- Table structure for table `projects`
--
DROP TABLE IF EXISTS `projects`;
CREATE TABLE IF NOT EXISTS `projects` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`name` text NOT NULL COMMENT 'Name of project.',
`date_due` date DEFAULT NULL COMMENT 'Date that project is due (optional).',
`created` datetime NOT NULL,
`modified` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;
--
-- Dumping data for table `projects`
--
INSERT INTO `projects` (`id`, `user_id`, `name`, `date_due`, `created`, `modified`) VALUES
(1, 1, 'Project 1', '2012-11-01', '2012-10-19 16:51:32', '2012-10-19 16:51:32'),
(2, 1, 'Project 2', '2012-12-01', '2012-10-19 16:52:04', '2012-10-19 16:52:04'),
(3, 1, 'Project 3', '2012-12-15', '2012-10-19 16:52:38', '2012-10-19 16:52:38'),
(4, 1, 'Project 4', '2012-11-15', '2012-10-19 16:52:54', '2012-10-19 16:52:54');
-- --------------------------------------------------------
--
-- Table structure for table `projects_users`
--
DROP TABLE IF EXISTS `projects_users`;
CREATE TABLE IF NOT EXISTS `projects_users` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`project_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`title` text,
`created` datetime NOT NULL,
`modified` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='This table links members to projects. If there are 10 membe' AUTO_INCREMENT=7 ;
--
-- Dumping data for table `projects_users`
--
INSERT INTO `projects_users` (`id`, `project_id`, `user_id`, `title`, `created`, `modified`) VALUES
(1, 1, 2, 'Member 1 to Project 1', '2012-10-19 16:55:05', '2012-10-19 16:55:05'),
(2, 1, 3, 'Member 2 to Project 1', '2012-10-19 16:55:29', '2012-10-19 17:00:07'),
(3, 2, 3, 'Member 1 to Project 2', '2012-10-19 16:55:54', '2012-10-19 16:55:54'),
(4, 2, 2, 'Member 2 to Project 2', '2012-10-19 16:59:03', '2012-10-19 16:59:10'),
(5, 3, 2, 'Member 1 to Project 3', '2012-10-19 16:59:25', '2012-10-19 16:59:39'),
(6, 3, 3, 'Member 2 to Project 3', '2012-10-19 16:59:51', '2012-10-19 16:59:51');
-- --------------------------------------------------------
--
-- Table structure for table `shares`
--
DROP TABLE IF EXISTS `shares`;
CREATE TABLE IF NOT EXISTS `shares` (
`shares_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'This should NOT be used.',
`user1_id` smallint(6) NOT NULL COMMENT 'This is the original user who is sharing the document with another user. In other words, user1 shares the document with user2.\n\nAlso, user1 can share a document with a group. \n\nA single row cannot share with a user and group on the same row. \n\nEach share should be stored on a separate row. So if you want to share a file with 100 people, that means there are 100 rows in this table.',
`user2_id` smallint(6) DEFAULT NULL COMMENT 'This is the original user who is sharing the document with another user. In other words, user1 shares the document with user2.\n\nAlso, user1 can share a document with a group. \n\nA single row cannot share with a user and group on the same row. \n\nEach share should be stored on a separate row. So if you want to share a file with 100 people, that means there are 100 rows in this table.',
`group_id` smallint(6) DEFAULT NULL COMMENT 'This is the group that the item is being shared with.',
`type` smallint(6) NOT NULL COMMENT 'This field is used to help select the correct item to share. There are 2 types of shares:\n\n0 - Folder\n1 - File\n\nNote: This may change over time.\n',
`date_create` datetime DEFAULT NULL,
`is_viewed` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'If the person who has been shared with (not the original sharer) sees the item, this field should be updated to 1.\n\n0 - not viewed item\n1 - viewed item',
`item_id` int(11) DEFAULT NULL COMMENT 'The id of the item. This works together with the type to create the correct mapping to the item.\n\nitem can be referenced by:\n\n"item_type" . "-" . "item_id"',
PRIMARY KEY (`shares_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `subtasks`
--
DROP TABLE IF EXISTS `subtasks`;
CREATE TABLE IF NOT EXISTS `subtasks` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`task_id` int(11) NOT NULL,
`description` text NOT NULL,
`created` datetime NOT NULL,
`modified` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;
--
-- Dumping data for table `subtasks`
--
INSERT INTO `subtasks` (`id`, `task_id`, `description`, `created`, `modified`) VALUES
(1, 1, 'Subtask 1', '2012-10-16 00:00:00', '2012-10-16 00:00:00'),
(2, 1, 'Subtask 2', '2012-10-18 00:00:00', '2012-10-18 00:00:00');
-- --------------------------------------------------------
--
-- Table structure for table `tasks`
--
DROP TABLE IF EXISTS `tasks`;
CREATE TABLE IF NOT EXISTS `tasks` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`project_id` int(11) NOT NULL,
`title` text NOT NULL,
`description` text,
`requesterid` int(11) NOT NULL,
`ownerid` int(11) NOT NULL,
`date_due` datetime DEFAULT NULL,
`status` int(2) DEFAULT '1',
`task_type` int(2) DEFAULT NULL,
`points` smallint(6) DEFAULT NULL,
`star` tinyint(1) DEFAULT NULL,
`created` datetime NOT NULL,
`user_id` int(11) NOT NULL,
`modified` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;
--
-- Dumping data for table `tasks`
--
INSERT INTO `tasks` (`id`, `project_id`, `title`, `description`, `requesterid`, `ownerid`, `date_due`, `status`, `task_type`, `points`, `star`, `created`, `user_id`, `modified`) VALUES
(1, 1, 'Sample', 'Sample', 3, 2, NULL, 3, 1, 1, 1, '0000-00-00 00:00:00', 1, NULL),
(2, 2, 'BSample', 'BSample', 3, 3, NULL, 2, 2, 3, 2, '0000-00-00 00:00:00', 1, NULL);
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
DROP TABLE IF EXISTS `users`;
CREATE TABLE IF NOT EXISTS `users` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`first_name` varchar(45) NOT NULL,
`last_name` varchar(45) NOT NULL,
`email` varchar(45) NOT NULL,
`password` varchar(45) NOT NULL,
`department` varchar(100) NOT NULL,
`state` varchar(30) NOT NULL,
`zip` varchar(50) NOT NULL,
`country` varchar(20) NOT NULL,
`title` varchar(100) NOT NULL,
`position` varchar(150) NOT NULL,
`city` varchar(20) NOT NULL,
`created` datetime NOT NULL,
`modified` datetime DEFAULT NULL,
`status` tinyint(1) NOT NULL DEFAULT '0',
`role` tinyint(4) NOT NULL DEFAULT '1',
`trial_end` date NOT NULL,
`company_id` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`id`, `first_name`, `last_name`, `email`, `password`, `department`, `state`, `zip`, `country`, `title`, `position`, `city`, `created`, `modified`, `status`, `role`, `trial_end`, `company_id`) VALUES
(1, 'Abdullah', 'Yousuf', 'test@test.com', 'c0fea0b2a66813d431a7e946cf23eb5a5d35b51a', 'Web develop', 'Khulna', '9100', 'Bangladesh', 'The title', 'CTO', 'Khulna', '2012-10-12 19:52:54', '2012-10-12 19:52:54', 0, 1, '2012-11-12', 1),
(2, 'Test', 'lasttest', 'test1@test1.com', 'c0fea0b2a66813d431a7e946cf23eb5a5d35b51a', 'dep. Test', 'state test', '0000', 'coutry test', 'title test', 'pos test', 'city test', '2012-10-12 20:02:39', '2012-10-12 20:02:39', 0, 1, '2012-12-12', 1),
(3, 'Another', 'User', 'test2@test2.com', 'c0fea0b2a66813d431a7e946cf23eb5a5d35b51a', 'dep. Test', 'state test', '0000', 'coutry test', 'The title', 'pos test.test', 'dfdasfasdfasdf', '2012-10-12 20:07:54', '2012-10-12 20:07:54', 0, 1, '2012-12-12', 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 */;
|
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 24 Jul 2020 pada 01.19
-- Versi server: 10.4.11-MariaDB
-- Versi PHP: 7.4.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `penjadwalanpkl`
--
-- --------------------------------------------------------
--
-- Struktur dari tabel `tbl_kampus`
--
CREATE TABLE `tbl_kampus` (
`id_kampus` int(20) NOT NULL,
`nama_kampus` varchar(30) NOT NULL,
`kota_kampus` varchar(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data untuk tabel `tbl_kampus`
--
INSERT INTO `tbl_kampus` (`id_kampus`, `nama_kampus`, `kota_kampus`) VALUES
(4132, 'UIN', 'MALANG');
-- --------------------------------------------------------
--
-- Struktur dari tabel `tbl_keahlian`
--
CREATE TABLE `tbl_keahlian` (
`id_keahlian` int(11) NOT NULL,
`nama_keahlian` varchar(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data untuk tabel `tbl_keahlian`
--
INSERT INTO `tbl_keahlian` (`id_keahlian`, `nama_keahlian`) VALUES
(1, 'animasi'),
(2, 'frontand'),
(3, 'apps');
-- --------------------------------------------------------
--
-- Struktur dari tabel `tbl_keahlianmahasiswa`
--
CREATE TABLE `tbl_keahlianmahasiswa` (
`id_keahlianmahasiswa` int(11) NOT NULL,
`id_mahasiswa` int(11) NOT NULL,
`id_keahlian` int(11) NOT NULL,
`nilai` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data untuk tabel `tbl_keahlianmahasiswa`
--
INSERT INTO `tbl_keahlianmahasiswa` (`id_keahlianmahasiswa`, `id_mahasiswa`, `id_keahlian`, `nilai`) VALUES
(1, 54135, 1, 133),
(2, 54135, 3, 677),
(3, 54135, 2, 78);
-- --------------------------------------------------------
--
-- Struktur dari tabel `tbl_mahasiswa`
--
CREATE TABLE `tbl_mahasiswa` (
`id_mahasiswa` int(20) NOT NULL,
`id_kampus` int(20) NOT NULL,
`nama_lengkapmahasiswa` varchar(50) NOT NULL,
`nama_panggilanmahasiswa` varchar(20) NOT NULL,
`NIM` int(15) NOT NULL,
`tgl_mulai` date NOT NULL,
`tgl_selesai` date NOT NULL,
`jurusan_mahasiswa` varchar(30) NOT NULL,
`file_fotomahasiswa` text NOT NULL,
`nama_kelompok` varchar(30) NOT NULL,
`no_hp` int(15) NOT NULL,
`email` varchar(30) NOT NULL,
`instagram` varchar(30) NOT NULL,
`file_cv` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data untuk tabel `tbl_mahasiswa`
--
INSERT INTO `tbl_mahasiswa` (`id_mahasiswa`, `id_kampus`, `nama_lengkapmahasiswa`, `nama_panggilanmahasiswa`, `NIM`, `tgl_mulai`, `tgl_selesai`, `jurusan_mahasiswa`, `file_fotomahasiswa`, `nama_kelompok`, `no_hp`, `email`, `instagram`, `file_cv`) VALUES
(54135, 4132, 'larasati', 'sasa', 1567, '2020-07-08', '2020-07-31', 'TI', '', 'asiap', 4136, 'abcde', 'aaa', '');
--
-- Indexes for dumped tables
--
--
-- Indeks untuk tabel `tbl_kampus`
--
ALTER TABLE `tbl_kampus`
ADD PRIMARY KEY (`id_kampus`);
--
-- Indeks untuk tabel `tbl_keahlian`
--
ALTER TABLE `tbl_keahlian`
ADD PRIMARY KEY (`id_keahlian`);
--
-- Indeks untuk tabel `tbl_keahlianmahasiswa`
--
ALTER TABLE `tbl_keahlianmahasiswa`
ADD PRIMARY KEY (`id_keahlianmahasiswa`),
ADD KEY `id_keahlian_4` (`id_keahlian`),
ADD KEY `id_mahasiswa_2` (`id_mahasiswa`);
--
-- Indeks untuk tabel `tbl_mahasiswa`
--
ALTER TABLE `tbl_mahasiswa`
ADD PRIMARY KEY (`id_mahasiswa`),
ADD KEY `id_kampus_2` (`id_kampus`);
--
-- AUTO_INCREMENT untuk tabel yang dibuang
--
--
-- AUTO_INCREMENT untuk tabel `tbl_kampus`
--
ALTER TABLE `tbl_kampus`
MODIFY `id_kampus` int(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4133;
--
-- AUTO_INCREMENT untuk tabel `tbl_keahlian`
--
ALTER TABLE `tbl_keahlian`
MODIFY `id_keahlian` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT untuk tabel `tbl_keahlianmahasiswa`
--
ALTER TABLE `tbl_keahlianmahasiswa`
MODIFY `id_keahlianmahasiswa` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT untuk tabel `tbl_mahasiswa`
--
ALTER TABLE `tbl_mahasiswa`
MODIFY `id_mahasiswa` int(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=54136;
--
-- Ketidakleluasaan untuk tabel pelimpahan (Dumped Tables)
--
--
-- Ketidakleluasaan untuk tabel `tbl_keahlianmahasiswa`
--
ALTER TABLE `tbl_keahlianmahasiswa`
ADD CONSTRAINT `tbl_keahlianmahasiswa_ibfk_2` FOREIGN KEY (`id_mahasiswa`) REFERENCES `tbl_mahasiswa` (`id_mahasiswa`),
ADD CONSTRAINT `tbl_keahlianmahasiswa_ibfk_3` FOREIGN KEY (`id_keahlian`) REFERENCES `tbl_keahlian` (`id_keahlian`);
--
-- Ketidakleluasaan untuk tabel `tbl_mahasiswa`
--
ALTER TABLE `tbl_mahasiswa`
ADD CONSTRAINT `tbl_mahasiswa_ibfk_1` FOREIGN KEY (`id_kampus`) REFERENCES `tbl_kampus` (`id_kampus`);
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 */;
|
INSERT INTO users_events_relations (
user_id,
event_id
) VALUES
(
1,
1
)
|
--
-- Title: Audit tables
-- Database: PostgreSql
-- Since: V3.2 Schema 3002
-- Author: Pavel Yurkevich
--
-- Please contact support@alfresco.com if you need assistance with the upgrade.
--
CREATE SEQUENCE alf_audit_model_seq START WITH 1 INCREMENT BY 1;
CREATE TABLE alf_audit_model
(
id INT8 NOT NULL,
content_data_id INT8 NOT NULL,
content_crc INT8 NOT NULL,
CONSTRAINT fk_alf_aud_mod_cd FOREIGN KEY (content_data_id) REFERENCES alf_content_data (id),
PRIMARY KEY (id)
);
CREATE UNIQUE INDEX idx_alf_aud_mod_cr ON alf_audit_model(content_crc);
CREATE INDEX fk_alf_aud_mod_cd ON alf_audit_model(content_data_id);
CREATE SEQUENCE alf_audit_app_seq START WITH 1 INCREMENT BY 1;
CREATE TABLE alf_audit_app
(
id INT8 NOT NULL,
version INT4 NOT NULL,
app_name_id INT8 NOT NULL CONSTRAINT idx_alf_aud_app_an UNIQUE,
audit_model_id INT8 NOT NULL,
disabled_paths_id INT8 NOT NULL,
CONSTRAINT fk_alf_aud_app_an FOREIGN KEY (app_name_id) REFERENCES alf_prop_value (id),
CONSTRAINT fk_alf_aud_app_mod FOREIGN KEY (audit_model_id) REFERENCES alf_audit_model (id) ON DELETE CASCADE,
CONSTRAINT fk_alf_aud_app_dis FOREIGN KEY (disabled_paths_id) REFERENCES alf_prop_root (id),
PRIMARY KEY (id)
);
CREATE INDEX fk_alf_aud_app_mod ON alf_audit_app(audit_model_id);
CREATE INDEX fk_alf_aud_app_dis ON alf_audit_app(disabled_paths_id);
CREATE SEQUENCE alf_audit_entry_seq START WITH 1 INCREMENT BY 1;
CREATE TABLE alf_audit_entry
(
id INT8 NOT NULL,
audit_app_id INT8 NOT NULL,
audit_time INT8 NOT NULL,
audit_user_id INT8 NULL,
audit_values_id INT8 NULL,
CONSTRAINT fk_alf_aud_ent_app FOREIGN KEY (audit_app_id) REFERENCES alf_audit_app (id) ON DELETE CASCADE,
CONSTRAINT fk_alf_aud_ent_use FOREIGN KEY (audit_user_id) REFERENCES alf_prop_value (id),
CONSTRAINT fk_alf_aud_ent_pro FOREIGN KEY (audit_values_id) REFERENCES alf_prop_root (id),
PRIMARY KEY (id)
);
CREATE INDEX idx_alf_aud_ent_tm ON alf_audit_entry(audit_time);
CREATE INDEX fk_alf_aud_ent_app ON alf_audit_entry(audit_app_id);
CREATE INDEX fk_alf_aud_ent_use ON alf_audit_entry(audit_user_id);
CREATE INDEX fk_alf_aud_ent_pro ON alf_audit_entry(audit_values_id);
--
-- Record script finish
--
DELETE FROM alf_applied_patch WHERE id = 'patch.db-V3.2-AuditTables';
INSERT INTO alf_applied_patch
(id, description, fixes_from_schema, fixes_to_schema, applied_to_schema, target_schema, applied_on_date, applied_to_server, was_executed, succeeded, report)
VALUES
(
'patch.db-V3.2-AuditTables', 'Manually executed script upgrade V3.2: Audit Tables',
0, 3001, -1, 3002, null, 'UNKOWN', TRUE, TRUE, 'Script completed'
); |
create table if not exists adresse
(
id int auto_increment
primary key,
numero varchar(255) not null,
voie varchar(255) not null,
code_poste varchar(255) not null,
ville varchar(255) not null
)
engine=InnoDB collate=utf8mb4_unicode_ci;
create table if not exists categorie
(
id int auto_increment
primary key,
nom varchar(50) not null,
description longtext null,
slug varchar(255) null,
created_at datetime not null,
updated_at datetime null
)
engine=InnoDB collate=utf8mb4_unicode_ci;
create table if not exists doctrine_migration_versions
(
version varchar(191) not null
primary key,
executed_at datetime null,
execution_time int null
)
engine=InnoDB collate=utf8_unicode_ci;
create table if not exists marque
(
id int auto_increment
primary key,
nom varchar(50) not null,
slug varchar(255) null,
created_at datetime not null,
updated_at datetime null,
constraint UNIQ_5A6F91CE6C6E55B5
unique (nom)
)
engine=InnoDB collate=utf8mb4_unicode_ci;
create table if not exists produit
(
id int auto_increment
primary key,
marque_id int not null,
categorie_id int not null,
nom varchar(50) not null,
prix double not null,
dispo tinyint(1) not null,
description longtext not null,
webcam tinyint(1) not null,
cpu varchar(255) not null,
ram varchar(255) not null,
vga varchar(255) not null,
taille varchar(255) not null,
disque_dur varchar(255) not null,
image_name varchar(255) not null,
slug varchar(255) null,
created_at datetime not null,
updated_at datetime null,
constraint FK_29A5EC274827B9B2
foreign key (marque_id) references marque (id),
constraint FK_29A5EC27BCF5E72D
foreign key (categorie_id) references categorie (id)
)
engine=InnoDB collate=utf8mb4_unicode_ci;
create table if not exists piece_jointe
(
id int auto_increment
primary key,
produit_id int null,
image_name varchar(255) not null,
updated_at datetime not null,
created_at datetime not null,
slug varchar(255) null,
constraint FK_AB5111D4F347EFB
foreign key (produit_id) references produit (id)
)
engine=InnoDB collate=utf8mb4_unicode_ci;
create index IDX_AB5111D4F347EFB
on piece_jointe (produit_id);
create index IDX_29A5EC274827B9B2
on produit (marque_id);
create index IDX_29A5EC27BCF5E72D
on produit (categorie_id);
create table if not exists user
(
id int auto_increment
primary key,
email varchar(180) not null,
roles longtext not null comment '(DC2Type:json)',
prenom varchar(50) not null,
password varchar(255) not null,
nom varchar(255) not null,
nom_complet varchar(255) not null,
created_at datetime not null,
updated_at datetime null,
constraint UNIQ_8D93D649E7927C74
unique (email)
)
engine=InnoDB collate=utf8mb4_unicode_ci;
create table if not exists commande
(
id int auto_increment
primary key,
client_id int not null,
adresse_id int not null,
numero varchar(255) not null,
total double not null,
date_commande date not null,
create_at datetime not null,
update_at datetime null,
constraint FK_6EEAA67D19EB6921
foreign key (client_id) references user (id),
constraint FK_6EEAA67D4DE7DC5C
foreign key (adresse_id) references adresse (id)
)
engine=InnoDB collate=utf8mb4_unicode_ci;
create index IDX_6EEAA67D19EB6921
on commande (client_id);
create index IDX_6EEAA67D4DE7DC5C
on commande (adresse_id);
create table if not exists commentaire
(
id int auto_increment
primary key,
client_id int not null,
produit_id int not null,
contenu longtext not null,
note smallint not null,
constraint FK_67F068BC19EB6921
foreign key (client_id) references user (id),
constraint FK_67F068BCF347EFB
foreign key (produit_id) references produit (id)
)
engine=InnoDB collate=utf8mb4_unicode_ci;
create index IDX_67F068BC19EB6921
on commentaire (client_id);
create index IDX_67F068BCF347EFB
on commentaire (produit_id);
create table if not exists ligne_commande
(
id int auto_increment
primary key,
commande_id int not null,
produit_id int not null,
quantite smallint not null,
prix_unitaire double not null,
constraint FK_3170B74B82EA2E54
foreign key (commande_id) references commande (id),
constraint FK_3170B74BF347EFB
foreign key (produit_id) references produit (id)
)
engine=InnoDB collate=utf8mb4_unicode_ci;
create index IDX_3170B74B82EA2E54
on ligne_commande (commande_id);
create index IDX_3170B74BF347EFB
on ligne_commande (produit_id);
|
DROP DATABASE IF EXISTS chinemacenter;
CREATE DATABASE IF NOT EXISTS chinemacenter;
USE chinemacenter;
CREATE TABLE IF NOT EXISTS users
(
id_user int NOT NULL AUTO_INCREMENT,
name VARCHAR(100) NOT NULL,
lastname VARCHAR(100) NOT NULL,
email VARCHAR(100) NOT NULL UNIQUE,
password VARCHAR(100) NOT NULL,
rol int DEFAULT 0,
estado int DEFAULT 1,
token VARCHAR(100),
CONSTRAINT PK_USERS PRIMARY KEY (id_user),
CONSTRAINT UQ_USERS UNIQUE (email)
)ENGINE=InnoDB DEFAULT CHARSET=utf8;
#INSERT INTO users (name, lastname, email, password, rol) VALUES ('Erick', 'Ziegler' 'erick.ziegler@gmail.com','1990');
select * from users;
INSERT INTO users (name, email, password, rol) VALUES ('admin', 'admin@chinemacenter.com','1234',1);
INSERT INTO users (name, email, password) VALUES ('user', 'user@chinemacenter.com','1234');
CREATE TABLE cines
(
id_cine int NOT NULL AUTO_INCREMENT,
nombre varchar(50) NOT NULL,
direccion varchar(50) NOT NULL,
estado int DEFAULT 1,
CONSTRAINT PK_CINES PRIMARY KEY (id_cine)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO cines ( nombre, direccion) VALUES ('tato', 'lalala');
INSERT INTO cines ( nombre, direccion) VALUES ('pepe', 'tututu');
CREATE TABLE salas (
id_sala int NOT NULL AUTO_INCREMENT,
id_cine int NOT NULL,
nombre varchar(50) NOT NULL,
capacidad int DEFAULT 1,
precio float DEFAULT 0,
estado int DEFAULT 1,
CONSTRAINT PK_SALAS PRIMARY KEY (id_sala),
CONSTRAINT FK_SALAS FOREIGN KEY (id_cine) REFERENCES cines(id_cine)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO salas
( id_cine, nombre, capacidad, precio)
VALUES
(1, 'paco', 500, 233),
(1, 'manolo', 300, 150);
CREATE TABLE funciones (
id_funcion int NOT NULL AUTO_INCREMENT,
id_sala int NOT NULL,
id_pelicula int NOT NULL,
fecha_inicio DATE,
fecha_fin DATE,
hora_inicio TIME,
hora_fin TIME,
lunes BOOLEAN DEFAULT 0,
martes BOOLEAN DEFAULT 0,
miercoles BOOLEAN DEFAULT 0,
jueves BOOLEAN DEFAULT 0,
viernes BOOLEAN DEFAULT 0,
sabado BOOLEAN DEFAULT 0,
domingo BOOLEAN DEFAULT 0,
estado int DEFAULT 1,
estreno BOOLEAN DEFAULT 1,
CONSTRAINT PK_SALAS PRIMARY KEY (id_funcion),
CONSTRAINT FK_FUNCIONES FOREIGN KEY (id_sala) REFERENCES salas(id_sala)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
select * from funciones;
DROP procedure IF EXISTS `SP_FUN_GET_ALL`;
DELIMITER $$
CREATE PROCEDURE SP_FUN_GET_ALL()
BEGIN
SELECT
f.id_funcion,
f.id_sala,
f.id_pelicula,
f.fecha_inicio,
f.fecha_fin,
f.hora_inicio,
f.hora_fin,
f.lunes,
f.martes,
f.miercoles,
f.jueves,
f.viernes,
f.sabado,
f.domingo,
f.estreno,
c.nombre AS nombre_cine,
s.nombre AS nombre_sala,
p.nombre AS nombre_pelicula,
p.poster,
p.foto,
p.comentario
FROM funciones f
INNER JOIN salas s ON s.id_sala = f.id_sala
INNER JOIN peliculas p ON p.id_pelicula = f.id_pelicula
INNER JOIN cines c ON c.id_cine = s.id_cine
WHERE f.estado = 1 ORDER BY f.id_funcion DESC;
END$$
DELIMITER ;
DROP procedure IF EXISTS `SP_FUN_GET_X_ID`;
DELIMITER $$
CREATE PROCEDURE SP_FUN_GET_X_ID(IN id INT)
BEGIN
SELECT
f.id_funcion,
f.id_sala,
f.id_pelicula,
f.fecha_inicio,
f.fecha_fin,
f.hora_inicio,
f.hora_fin,
f.lunes,
f.martes,
f.miercoles,
f.jueves,
f.viernes,
f.sabado,
f.domingo,
f.estreno,
c.nombre AS nombre_cine,
s.nombre AS nombre_sala,
p.nombre AS nombre_pelicula,
p.poster,
p.foto,
p.comentario
FROM funciones f
INNER JOIN salas s ON s.id_sala = f.id_sala
INNER JOIN peliculas p ON p.id_pelicula = f.id_pelicula
INNER JOIN cines c ON c.id_cine = s.id_cine
WHERE f.estado = 1 AND f.id_funcion = id ORDER BY f.id_funcion DESC;
END$$
DELIMITER ;
DROP procedure IF EXISTS `SP_FUN_DELETE`;
DELIMITER $$
CREATE PROCEDURE SP_FUN_DELETE(IN id INT)
BEGIN
UPDATE funciones f SET estado=0 WHERE f.id_funcion= id;
END$$
DELIMITER ;
DROP procedure IF EXISTS `SP_FUN_EDIT`;
DELIMITER $$
CREATE PROCEDURE SP_FUN_EDIT(IN
idFuncion INT,
fechaInicio DATE,
fechaFin DATE,
horaInicio TIME,
horaFin TIME,
lunes BOOLEAN,
martes BOOLEAN,
miercoles BOOLEAN,
jueves BOOLEAN,
viernes BOOLEAN,
sabado BOOLEAN,
domingo BOOLEAN)
BEGIN
UPDATE funciones f
SET
f.fecha_inicio = fechaInicio,
f.fecha_fin = fechaFin,
f.hora_inicio = horaInicio,
f.hora_fin = horaFin,
f.lunes = lunes,
f.martes = martes,
f.miercoles = miercoles,
f.jueves = jueves,
f.viernes = viernes,
f.sabado = sabado,
f.domingo = domingo
WHERE f.id_funcion= idFuncion;
END$$
DELIMITER ;
CREATE TABLE peliculas (
id_pelicula int NOT NULL,
nombre varchar(90) NOT NULL,
comentario varchar(250),
poster varchar(90),
foto varchar(90),
fecha_salida DATE,
duracion int,
CONSTRAINT PK_PELICULAS PRIMARY KEY (id_pelicula)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
select * from peliculas;
DROP procedure IF EXISTS `SP_PELI_ADD`;
DELIMITER $$
CREATE PROCEDURE SP_PELI_ADD(IN idPelicula int,
nombre varchar(90),
comentario varchar(250),
poster varchar(90),
foto varchar(90),
fechaSalida DATE,
duracion int)
BEGIN
INSERT INTO peliculas
(peliculas.id_pelicula, peliculas.nombre, peliculas.comentario, peliculas.poster, peliculas.foto ,peliculas.fecha_salida, peliculas.duracion)
VALUES
(idPelicula, nombre, comentario, poster, foto ,fechaSalida, duracion);
END$$
DELIMITER ;
CREATE TABLE compras (
id_funcion int NOT NULL AUTO_INCREMENT,
fecha_compra DATE,
fecha_funcion DATE,
id_usuario int,
cantidad int,
CONSTRAINT PK_COMPRAS PRIMARY KEY (id_funcion),
CONSTRAINT FK_COMPRAS FOREIGN KEY (id_funcion) REFERENCES funciones(id_funcion)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
UPDATE funciones f SET estreno=0 WHERE f.id_funcion= 4;
|
Create Procedure mERP_SP_InsertAbstractConfig (@ID int, @Flag int)
As
Update CA Set Flag = @Flag
from tbl_mERP_ConfigAbstract CA Inner join tbl_mERP_RecConfigAbstract RCA
On CA.Screenname = RCA.MenuName
Where RCA.ID = @ID
update tbl_mERP_RecConfigAbstract set Status = Status | 32 Where ID = @ID
|
INSERT INTO InterpretacionGRAMEtapa1 (idParteDelCuerpo, idBacteria, idAntibiotico, mensaje)
SELECT
(SELECT dp.idParteDelCuerpo FROM DatosDelPaciente dp),
g.idBacteria,
31 AS idAntibiotico,
'Germen intrinsecamente resistente a Colistina, Tigeciclina e Imipenem'
FROM
(
SELECT distinct
idBacteria
FROM
GRAM
WHERE
tipoGRAM = '-' AND
idBacteria IN (30,31,34)
) g ;
/*
ETAPA 2
*/
/*
2. Serratia, Enterobacter, Citrobacter, Aeromonas, Morganella, Proteus vulgaris, Proteus penneri, Acinetobacter y Providencia:
• Cuando la infección es en:
o Sistema nervioso central: Ciprofloxacino, Meropenem, Imipenem (excepto si es Proteus, Providencia y Morganella)
o Boca y senos paranasales: Ciprofloxacino, Ertapenem, Tigeciclina (excepto si es Providencia, Morganella y cualquiera de los Proteus)
o Pulmones: Ciprofloxacino, Imipenem (excepto si es Proteus, Providencia y Morganella), Meropenem
o Tejidos blandos: Ciprofloxacino, Tigeciclina (excepto si es Providencia, Morganella y cualquiera de los Proteus), Imipenem (excepto si es Proteus, Providencia y Morganella), Meropenem
o Hueso: Igual a tejidos blandos, pero Rifampicina o Minociclina (si hay material de osteosíntesis o prótesis, y se demuestra sensibilidad a estos antibioticos)
o Abdomen: Ciprofloxacino (considerar adicionar Metronidazol para cubrir anaerobios), Tigeciclina (excepto si es Providencia, Morganella y cualquiera de los Proteus), Ertapenem, Imipenem (excepto si es Proteus, Providencia y Morganella), Meropenem
o Tracto genitourinario: Ertapenem, Ciprofloxacino, Fosfomycin (pielonefritis: 3gm cada 3 dias por 7 dosis y cistitis 3 gm dosis unica), Nitrofurantoin (solo cistitis)
o Próstata: Ciprofloxacino, Fosfomycin (3gm cada 3 dias por 7 dosis), Imipenem (excepto si es Proteus, Providencia y Morganella), Meropenem
o Sangre: Imipenem (excepto si es Proteus, Providencia y Morganella), Meropenem, Ciprofloxacino (considerar adicionar Amikacina durante 3 dias si la función renal lo permite)
*/
INSERT INTO InterpretacionGRAMEtapa2 (idParteDelCuerpo, idBacteria, idAntibiotico, idAsignacion, mensaje)
SELECT
a2.idParteDelCuerpo,
g1.idBacteria,
6 as idAntibiotico,
a2.id,
a2.comentariosTratamiento
FROM
(
SELECT DISTINCT
g.idBacteria
FROM
GRAM g
WHERE
g.tipoGRAM = '-' AND
g.idBacteria IN (26,30,31,34)
) g1,
(
SELECT
dp1.idParteDelCuerpo,
a.id,
a.comentariosTratamiento
FROM
(SELECT idParteDelCuerpo FROM DatosDelPaciente WHERE esAlergicoAPenicilina = 0) dp1,
Asignaciones a
WHERE
(dp1.idParteDelCuerpo = 0 AND a.id IN (36,40)) OR
(dp1.idParteDelCuerpo = 1 AND a.id IN (36,37)) OR
(dp1.idParteDelCuerpo = 2 AND a.id IN (36,40)) OR
(dp1.idParteDelCuerpo = 3 AND a.id IN (47,37,40)) OR
(dp1.idParteDelCuerpo = 4 AND a.id IN (37,36,18,21)) OR
(dp1.idParteDelCuerpo = 5 AND a.id IN (36,40)) OR
(dp1.idParteDelCuerpo = 6 AND a.id IN (36,22,40)) OR
(dp1.idParteDelCuerpo = 7 AND a.id IN (36,40)) OR
(dp1.idParteDelCuerpo = 8 AND a.id IN (40,48))
) a2;
/*
• Cuando es resistente (es decir > o =) a algún antibiótico dentro de las opciones mencionadas, entonces ese antibiótico no puede aparecer dentro de las opciones
*/
DELETE FROM InterpretacionGRAMEtapa2 WHERE idAsignacion IN (
SELECT
a.idAsignacion
FROM
GRAM g
INNER JOIN asignacionAntibiotico a
ON (a.idAntibiotico = g.idAntibiotico)
WHERE
g.tipoGRAM = '-' AND
g.idBacteria IN (26,30,31,34) AND
g.operador IN ('>=') AND
a.idAntibiotico > 1
);
|
SELECT toTypeName((1,)), (1,);
SET enable_debug_queries = 1;
ANALYZE SELECT (1,)
|
-- 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='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';
-- -----------------------------------------------------
-- Schema hospital_db
-- -----------------------------------------------------
-- -----------------------------------------------------
-- Schema hospital_db
-- -----------------------------------------------------
CREATE SCHEMA IF NOT EXISTS `hospital_db` DEFAULT CHARACTER SET utf8 ;
USE `hospital_db` ;
-- -----------------------------------------------------
-- Table `hospital_db`.`users`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hospital_db`.`users` (
`id_users` INT NOT NULL AUTO_INCREMENT,
`last_name` VARCHAR(20) NOT NULL,
`first_name` VARCHAR(20) NOT NULL,
`patronymic` VARCHAR(20) NOT NULL,
`date_of_birth` DATE NOT NULL,
`login` VARCHAR(20) NOT NULL,
`password` VARCHAR(20) NOT NULL,
`email` VARCHAR(30) NOT NULL,
PRIMARY KEY (`id_users`))
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `hospital_db`.`patient`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hospital_db`.`patient` (
`id_patient` INT NOT NULL AUTO_INCREMENT,
`address` VARCHAR(50) NULL,
`phone_number` INT(20) NULL,
`users_id` INT NOT NULL,
PRIMARY KEY (`id_patient`),
INDEX `fk_patient_users_idx` (`users_id` ASC) VISIBLE,
CONSTRAINT `fk_patient_users`
FOREIGN KEY (`users_id`)
REFERENCES `hospital_db`.`users` (`id_users`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `hospital_db`.`personal`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hospital_db`.`personal` (
`id_personal` INT NOT NULL AUTO_INCREMENT,
`specialization` VARCHAR(30) NOT NULL,
`personal_role` VARCHAR(10) NOT NULL,
`users_id` INT NOT NULL,
INDEX `fk_table1_users1_idx` (`users_id` ASC) VISIBLE,
PRIMARY KEY (`id_personal`),
CONSTRAINT `fk_table1_users1`
FOREIGN KEY (`users_id`)
REFERENCES `hospital_db`.`users` (`id_users`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `hospital_db`.`reception`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hospital_db`.`reception` (
`id_reception` INT NOT NULL AUTO_INCREMENT,
`patient_id` INT NOT NULL,
`reception_date` DATE NOT NULL,
`preliminary_diagnosis` VARCHAR(30) NOT NULL,
`discharge_date` DATE NULL,
`final_diagnosis` VARCHAR(30) NULL,
`personal_id` INT NOT NULL,
PRIMARY KEY (`id_reception`),
INDEX `fk_reception_patient1_idx` (`patient_id` ASC) VISIBLE,
INDEX `fk_reception_personal1_idx` (`personal_id` ASC) VISIBLE,
CONSTRAINT `fk_reception_patient1`
FOREIGN KEY (`patient_id`)
REFERENCES `hospital_db`.`patient` (`id_patient`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `fk_reception_personal1`
FOREIGN KEY (`personal_id`)
REFERENCES `hospital_db`.`personal` (`id_personal`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `hospital_db`.`prescription`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hospital_db`.`prescription` (
`id_prescription` INT NOT NULL AUTO_INCREMENT,
`name_prescription` VARCHAR(20) NOT NULL,
`type_prescription` VARCHAR(10) NOT NULL,
`description` VARCHAR(255) NULL,
`personal_id` INT NOT NULL,
PRIMARY KEY (`id_prescription`),
INDEX `fk_prescription_personal1_idx` (`personal_id` ASC) VISIBLE,
CONSTRAINT `fk_prescription_personal1`
FOREIGN KEY (`personal_id`)
REFERENCES `hospital_db`.`personal` (`id_personal`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `hospital_db`.`reception_and_prescription`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hospital_db`.`reception_and_prescription` (
`reception_id` INT NOT NULL,
`prescription_id` INT NOT NULL,
PRIMARY KEY (`reception_id`, `prescription_id`),
INDEX `fk_reception_has_prescription_prescription1_idx` (`prescription_id` ASC) VISIBLE,
INDEX `fk_reception_has_prescription_reception1_idx` (`reception_id` ASC) VISIBLE,
CONSTRAINT `fk_reception_has_prescription_reception1`
FOREIGN KEY (`reception_id`)
REFERENCES `hospital_db`.`reception` (`id_reception`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `fk_reception_has_prescription_prescription1`
FOREIGN KEY (`prescription_id`)
REFERENCES `hospital_db`.`prescription` (`id_prescription`)
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;
|
-- 1378. 使用唯一标识码替换员工ID
-- Employees 表:
--
-- +---------------+---------+
-- | Column Name | Type |
-- +---------------+---------+
-- | id | int |
-- | name | varchar |
-- +---------------+---------+
-- id 是这张表的主键。
-- 这张表的每一行分别代表了某公司其中一位员工的名字和 ID 。
--
--
-- EmployeeUNI 表:
--
-- +---------------+---------+
-- | Column Name | Type |
-- +---------------+---------+
-- | id | int |
-- | unique_id | int |
-- +---------------+---------+
-- (id, unique_id) 是这张表的主键。
-- 这张表的每一行包含了该公司某位员工的 ID 和他的唯一标识码(unique ID)。
--
--
-- 写一段SQL查询来展示每位用户的 唯一标识码(unique ID );如果某位员工没有唯一标识码,使用 null 填充即可。
--
-- 你可以以 任意 顺序返回结果表。
--
-- 查询结果的格式如下例所示:
--
-- Employees table:
-- +----+----------+
-- | id | name |
-- +----+----------+
-- | 1 | Alice |
-- | 7 | Bob |
-- | 11 | Meir |
-- | 90 | Winston |
-- | 3 | Jonathan |
-- +----+----------+
--
-- EmployeeUNI table:
-- +----+-----------+
-- | id | unique_id |
-- +----+-----------+
-- | 3 | 1 |
-- | 11 | 2 |
-- | 90 | 3 |
-- +----+-----------+
--
-- EmployeeUNI table:
-- +-----------+----------+
-- | unique_id | name |
-- +-----------+----------+
-- | null | Alice |
-- | null | Bob |
-- | 2 | Meir |
-- | 3 | Winston |
-- | 1 | Jonathan |
-- +-----------+----------+
--
-- Alice and Bob 没有唯一标识码, 因此我们使用 null 替代。
-- Meir 的唯一标识码是 2 。
-- Winston 的唯一标识码是 3 。
-- Jonathan 唯一标识码是 1 。
--
-- 来源:力扣(LeetCode)
-- 链接:https://leetcode-cn.com/problems/replace-employee-id-with-the-unique-identifier
-- 著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。
SELECT
eu.unique_id,
e.NAME
FROM
Employees AS e
LEFT JOIN EmployeeUNI AS eu ON e.id = eu.id; |
INSERT INTO user (username,email,display_name,password,state)
VALUES ('lmc-user', 'lmc-user@github.com', 'Zfc-User', 'lmc-user',1);
INSERT INTO user (username,email,display_name,password,state)
VALUES ('lmc-user2', 'lmc-user2@github.com', 'Zfc-User2', 'lmc-user2',1);
INSERT INTO user (username,email,display_name,password,state)
VALUES ('lmc-user3', 'lmc-user@trash-mail.com', 'Zfc-User3', 'lmc-user3',1);
|
DROP TABLE errorlog;
CREATE TABLE errorlog
(
id NUMBER,
log_code VARCHAR2(9),
time DATE NOT NULL,
log_message VARCHAR2(2000) NOT NULL,
package_name varchar(50) not null,
CONSTRAINT error_logs_pk PRIMARY KEY (id)
);
DROP SEQUENCE seq_09_errorlog_id;
CREATE SEQUENCE seq_09_errorlog_id
MINVALUE 1
MAXVALUE 9999999
INCREMENT BY 1
START WITH 1
NOCYCLE; |
INSERT INTO `Products`(
`Products_ID`, `Product_name`, `Product_price`, `Product_description`, `Products_left_in_stock`)
VALUES (
0, 'Mercedes GP winner', 999.99,
'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis,',
999);
INSERT INTO `Products`(
`Products_ID`, `Product_name`, `Product_price`, `Product_description`, `Products_left_in_stock`)
VALUES (
1, 'Renault', 548.15,
'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis,',
999);
INSERT INTO `Products`(
`Products_ID`, `Product_name`, `Product_price`, `Product_description`, `Products_left_in_stock`)
VALUES (
2, 'Ferrari', 345.69,
'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis,',
999);
/*INSERT INTO `Customer`(
`Customer_ID`, `First_name`, `Last_name`, `Username`, `Email`, `Password`)
VALUES (
0, 'test', 'test', 'test', 'a@gmail.com', '123');
INSERT INTO `Order_details` (
`Order_details_ID`, `Customer_ID`, `status`, `date`, `name`)
VALUES (
0, 0, 'pending', date('2020-11-29'), 'test List');
INSERT INTO `Ordered_products_list` (
`ordered_products_list_ID`, `Product_ID`, `Order_details_ID`, `Amount_ordered`)
VALUES (0, 0, 0, 1);*/ |
/*==============================================================*/
/* SET group_concat_max_len=102400;
/*==============================================================*/
/*==============================================================*/
/* codes below generated by PowerDesigner */
/*==============================================================*/
drop table if exists GMAccount;
/*==============================================================*/
/* Table: GMAccount */
/*==============================================================*/
create table GMAccount
(
id bigint(20) not null auto_increment,
username char(64),
password char(40),
privilege char(10),
primary key (id),
unique key AK_Key_username (username)
)
auto_increment = 10000
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_unicode_ci; |
CREATE TABLE car
(
id uuid NOT NULL,
name varchar(255) NOT NULL,
brand varchar(255) NOT NULL,
model varchar(255) NOT NULL,
manufacturing_date DATE NOT NULL,
average_city_consumption NUMERIC(19, 3) NOT NULL,
average_highway_consumption NUMERIC(19, 3) NOT NULL,
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
CONSTRAINT car_pkey PRIMARY KEY (id)
); |
USE TelerikAcademy
UPDATE Users
SET FullName = 'Warren Buffett'
WHERE UserId = 1;
UPDATE Groups
SET Name = 'Professional Gaming'
WHERE Name LIKE '%Gaming'; |
--Travel Groups from School Level Summary Assessments
With
TG as (
Select Distinct
sec.section_id,
Case When --Elementary Schools or Middle Schools
(st.local_site_id = 'KME' or st.local_site_id = 'KSPA' or st.local_site_id = 'KMCP')
Then split_part(h.house_name, ' - ', 2)
Else --High Schools
tbl.timeblock_name
End as s_group
From matviews.ss_cube cube
Inner Join public.students s ON cube.student_id = s.student_id
Inner Join public.sections sec ON cube.section_id = sec.section_id
Left Join public.houses h on h.house_id = sec.house_id
Inner Join public.sites st on st.site_id = cube.site_id
Inner Join public.section_timeblock_aff sta on sta.section_id = sec.section_id
Inner Join public.timeblocks tbl on tbl.timeblock_id = sta.timeblock_id
Where
cube.academic_year = 2016
and
Case When --Elementary Schools or Middle Schools
(st.local_site_id = 'KME' or st.local_site_id = 'KSPA' or st.local_site_id = 'KMCP')
Then split_part(h.house_name, ' - ', 2)
Else --High Schools
tbl.timeblock_name
End is not Null),
---------Most Recent Friday Assessment
MostRecent as (
Select ass.assessment_id, ass.title, code_scope_id, code_subject_area_id, administered_at, deleted_at, user_id
From dna_assessments.assessments ass
Where
ass.deleted_at is null and
(ass.administered_at BETWEEN current_date - 9 AND current_date - 2)
)
-------------------------------------------------------------------------------Assessment Query
Select
--Assessment Information (Ass)
ass.assessment_id as Ass_ID,
sps.code_translation as Ass_Scope,
--Assessment Type
Case When position('Interim' in replace(ass.title, ' ', '')) > 0 Then
'Interim'
When position('Mid-Module' in replace(ass.title, ' ', '')) > 0 Then
'Mid-Module'
When position('End-Module' in replace(ass.title, ' ', '')) > 0 Then
'End-Module'
When position('FSA' in replace(ass.title, ' ', '')) > 0 Then
'FSA'
Else Null End as ass_type,
ass.administered_at as Ass_AssignDate,
stuass.date_taken as Ass_DateTaken,
ass.title as Ass_Name,
--Unit Number
Case When position('Interim' in replace(ass.title, ' ', '')) > 0 Then
'Unit'||' '||substr(replace(ass.title, ' ', ''),position('Interim' in replace(ass.title, ' ', ''))+7,1)
When position('FSA' in replace(ass.title, ' ', '')) > 0 Then
'Unit'||' '||substr(replace(ass.title, ' ', ''),position('FSA' in replace(ass.title, ' ', ''))+3,1)
When position('Mid-Module' in replace(ass.title, ' ', '')) > 0 Then
'Unit'||' '||substr(replace(ass.title, ' ', ''),position('Mid-Module' in replace(ass.title, ' ', ''))+10,1)
When position('End-Modlue' in replace(ass.title, ' ', '')) > 0 Then
'Unit'||' '||substr(replace(ass.title, ' ', ''),position('End-Module' in replace(ass.title, ' ', ''))+10,1)
Else Null End as ass_unitnumtxt,
Case When position('Interim' in replace(ass.title, ' ', '')) > 0 Then
substr(replace(ass.title, ' ', ''),position('Interim' in replace(ass.title, ' ', ''))+7,1)
When position('FSA' in replace(ass.title, ' ', '')) > 0 Then
substr(replace(ass.title, ' ', ''),position('FSA' in replace(ass.title, ' ', ''))+3,1)
When position('Mid-Module' in replace(ass.title, ' ', '')) > 0 Then
substr(replace(ass.title, ' ', ''),position('Mid-Module' in replace(ass.title, ' ', ''))+10,1)
When position('End-Modlue' in replace(ass.title, ' ', '')) > 0 Then
substr(replace(ass.title, ' ', ''),position('End-Module' in replace(ass.title, ' ', ''))+10,1)
Else Null End as ass_unitnumnum,
--Assessment Number
Case When position('FSA' in replace(ass.title, ' ', '')) > 0 Then
'FSA'||' '||substr(replace(ass.title, ' ', ''),position('FSA' in replace(ass.title, ' ', ''))+5,1)
When position('Interim' in replace(ass.title, ' ', '')) > 0 Then
'Interim'||' '||substr(replace(ass.title, ' ', ''),position('Interim' in replace(ass.title, ' ', ''))+7,1)
When position('Mid-Module' in replace(ass.title, ' ', '')) > 0 Then
'Mid'||' '||substr(replace(ass.title, ' ', ''),position('Mid-Module' in replace(ass.title, ' ', ''))+10,1)
When position('End-Module' in replace(ass.title, ' ', '')) > 0 Then
'End'||' '||substr(replace(ass.title, ' ', ''),position('End-Module' in replace(ass.title, ' ', ''))+10,1)
Else Null End as ass_numtxt,
Case When position('FSA' in replace(ass.title, ' ', '')) > 0 Then
substr(replace(ass.title, ' ', ''),position('FSA' in replace(ass.title, ' ', ''))+5,1)
When position('Interim' in replace(ass.title, ' ', '')) > 0 Then
'Interim'
When position('Mid-Module' in replace(ass.title, ' ', '')) > 0 Then
substr(replace(ass.title, ' ', ''),position('Mid-Module' in replace(ass.title, ' ', ''))+10,1)
When position('End-Module' in replace(ass.title, ' ', '')) > 0 Then
substr(replace(ass.title, ' ', ''),position('End-Module' in replace(ass.title, ' ', ''))+10,1)
Else Null End as ass_numnum,
--Student Info (Stu)
Case When gl.grade_level_id >= 10 Then 'HS' When gl.grade_level_id >= 6 Then 'MS' Else 'ES' End as stu_sitelevel,
st.local_site_id as Stu_Site,
s.local_student_id as Stu_ID,
s.last_name||', '||s.first_name as Stu_FullName,
gl.short_name as Stu_Grade,
Case When pd.code_key is Null Then 'GenEd' Else 'IEP' End as Stu_IEP,
ep.code_translation as Stu_ELL,
--Enrollment Information Fields (Enr)
dept.department_name as Enr_Department,
c.school_course_id as Enr_CourseNumb,
c.long_name as Enr_CourseName,
tg.s_group as Enr_Period,
Case When sta.custom_code LIKE '%MA%' Then 'Math'
WHEN sta.custom_code LIKE '%LA%' THEN 'Phonics'
End as enr_altcourse,
u.last_name||', '||u.first_name as Enr_TeacherLastFirst,
u.last_name as Enr_TeacherLast,
u.username as Enr_TeacherID,
--Standard Info
sta.custom_code as Ass_stacode,
substr(sta.custom_code,6,1000) as Ass_stacodetrim,
sta.description as Ass_Standard_Text,
sc.number_of_questions as Ass_Total_Qs,
--Score (Sc)
round(sc.points) as Sc_Sta_RawScore,
sc.percent_correct as Sc_Sta_PCTScore,
sc.performance_band_level as Sc_Sta_PBand,
sco.performance_band_level as Sc_Overall_PBand
From dna_assessments.agg_student_responses_standard sc
inner join MostRecent ass ON ass.assessment_id = sc.assessment_id
inner join standards.standards sta on sta.standard_id = sc.standard_id
inner join dna_assessments.students_assessments stuass on stuass.student_id = sc.student_id and stuass.assessment_id = ass.assessment_id
Left Join codes.dna_scopes sps on sps.code_id = ass.code_scope_id
Left Join codes.dna_subject_areas sub on sub.code_id = ass.code_subject_area_id
inner join public.students s on s.student_id = sc.student_id
inner join dna_assessments.agg_student_responses sco on sco.student_id = sc.student_id and sco.assessment_id = sc.assessment_id
--Filters
Left Join public.student_Specialed pss on pss.student_id = s.student_id
Left Join codes.primary_disability pd on pd.code_id = pss.primary_disability
Left Join codes.english_proficiency ep on cast(ep.code_id as integer) = s.english_proficiency
--enrollment information
Inner Join matviews.ss_cube cube on cube.student_id = sc.student_id
Inner Join public.grade_levels gl on gl.grade_level_id = cube.grade_level_id
Inner Join public.courses c on c.course_id = cube.course_id
Inner Join public.departments dept on dept.department_id = c.department_id
Inner Join public.section_timeblock_aff secper on secper.section_id = cube.section_id
Inner Join public.sections sec on sec.section_id = secper.section_id
Inner Join public.sites st on st.site_id = cube.site_id
Inner Join public.users u on u.user_id = cube.user_id
Inner Join public.section_teacher_aff sectea on sectea.section_id = cube.section_id and sectea.user_id = cube.user_id
Inner Join tg on tg.section_id = cube.section_id
Inner Join MostRecent on MostRecent.assessment_id = ass.assessment_id
Where
ass.deleted_at is null and --sps.code_translation = 'KIPP CO Tracking' and
cube.leave_date >= stuass.date_taken and cube.entry_date <= stuass.date_taken And
sectea.primary_teacher = TRUE and
Case When st.local_site_id = 'KME'
Then dept.department_name = 'HRoom/Adv'
Else dept.department_name <> 'HRoom/Adv' and ass.user_id = u.user_id End
and st.local_site_id = 'KME'
Order by ass.assessment_id, s.student_id |
declare
v_sql varchar(50);
v_sid varchar(20);
v_ref sys_refcursor;
begin
for v_ref in (select distinct ''''||t2.sid ||','|| t2.serial# ||'''' as v_sid from v$locked_object t1,v$session t2 where t1.session_id=t2.sid ) loop
v_sql := 'ALTER SYSTEM KILL SESSION ' || v_ref.v_sid ;
execute immediate v_sql;
dbms_output.put_line(v_sql);
end loop;
exception
when others then
dbms_output.put_line(SQLCODE || ' ' || SQLERRM);
end;
/
|
CREATE TABLE IF NOT EXISTS bridge_upload2_<dateSuffix> (
uploadId CHAR(36) ENCODE LZO NOT NULL,
uploadDate DATE ENCODE RAW ,
filename VARCHAR(500) ENCODE LZO ,
contentLength INT ENCODE DELTA32K ,
contentMd5 VARCHAR(50) ENCODE LZO ,
contentType VARCHAR(50) ENCODE BYTEDICT ,
healthCode CHAR(36) ENCODE RAW NOT NULL,
status VARCHAR(50) ENCODE BYTEDICT
) SORTKEY (uploadDate, healthCode);
|
CREATE DATABASE IF NOT EXISTS `photo-blog`
CHARACTER SET `utf8`
COLLATE `utf8_general_ci`;
CREATE TABLE `photo-blog`.`customer` (
`id` INT NOT NULL AUTO_INCREMENT,
`email` VARCHAR(255) NOT NULL,
`password` VARCHAR(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE = InnoDB;
|
-- Client_Id 和 Driver_Id 是 Users 表中 Users_Id 的外键
-- Banned 表示这个用户是否被禁止
-- 查出 2013年10月1日 至 2013年10月3日 期间非禁止用户的取消率
select a.*,
round(sum(case when a.status <> 'completed' then 1 else 0 end)/count(*), 2)
from trips a
left join users b on a.Client_Id = b.Users_Id
where
a.Request_at between '2013-10-01' and '2013-10-03'
and
b.Banned = 'No'
group by a.Request_at
select * from trips
select * from users
Create table If Not Exists Trips (Id int, Client_Id int, Driver_Id int, City_Id int, Status ENUM('completed', 'cancelled_by_driver', 'cancelled_by_client'), Request_at varchar(50));
Create table If Not Exists Users (Users_Id int, Banned varchar(50), Role ENUM('client', 'driver', 'partner'));
Truncate table Trips;
insert into Trips (Id, Client_Id, Driver_Id, City_Id, Status, Request_at) values ('1', '1', '10', '1', 'completed', '2013-10-01');
insert into Trips (Id, Client_Id, Driver_Id, City_Id, Status, Request_at) values ('2', '2', '11', '1', 'cancelled_by_driver', '2013-10-01');
insert into Trips (Id, Client_Id, Driver_Id, City_Id, Status, Request_at) values ('3', '3', '12', '6', 'completed', '2013-10-01');
insert into Trips (Id, Client_Id, Driver_Id, City_Id, Status, Request_at) values ('4', '4', '13', '6', 'cancelled_by_client', '2013-10-01');
insert into Trips (Id, Client_Id, Driver_Id, City_Id, Status, Request_at) values ('5', '1', '10', '1', 'completed', '2013-10-02');
insert into Trips (Id, Client_Id, Driver_Id, City_Id, Status, Request_at) values ('6', '2', '11', '6', 'completed', '2013-10-02');
insert into Trips (Id, Client_Id, Driver_Id, City_Id, Status, Request_at) values ('7', '3', '12', '6', 'completed', '2013-10-02');
insert into Trips (Id, Client_Id, Driver_Id, City_Id, Status, Request_at) values ('8', '2', '12', '12', 'completed', '2013-10-03');
insert into Trips (Id, Client_Id, Driver_Id, City_Id, Status, Request_at) values ('9', '3', '10', '12', 'completed', '2013-10-03');
insert into Trips (Id, Client_Id, Driver_Id, City_Id, Status, Request_at) values ('10', '4', '13', '12', 'cancelled_by_driver', '2013-10-03');
Truncate table Users;
insert into Users (Users_Id, Banned, Role) values ('1', 'No', 'client');
insert into Users (Users_Id, Banned, Role) values ('2', 'Yes', 'client');
insert into Users (Users_Id, Banned, Role) values ('3', 'No', 'client');
insert into Users (Users_Id, Banned, Role) values ('4', 'No', 'client');
insert into Users (Users_Id, Banned, Role) values ('10', 'No', 'driver');
insert into Users (Users_Id, Banned, Role) values ('11', 'No', 'driver');
insert into Users (Users_Id, Banned, Role) values ('12', 'No', 'driver');
insert into Users (Users_Id, Banned, Role) values ('13', 'No', 'driver'); |
bz007hd,bz007hd_1,bz008hd,bz008hd_1
bz031,bz032表内公式
bz016 报表公式
bz017 公式明细
bz018公式条件
bz019主键
bz038公式附加主键
select * from v_bz007 where czde004=2 and de011=2013 order by rptbhmc
select * from bz016
delete from bz016 where czde103=20130000000195;
insert into bz016
select 2013*10000000000 + bc_hd_comm.GetMaxID('BZ016',1) ,
20130000000195,czde111,czde140,de046,czde142,jsde901,
de022,czde137||hdde019,czde011,czde148,czde146,czde147,czde149
from bz016 WHERE czde103=20130000000054 --2013*10000000000+
select czde137,substr(hdde019,1,14),a.* from bz016 a where czde103=20130000000195
select * from bz017 where czde137 in (select czde137 from bz016 where czde103=20130000000054)
delete from bz017 where czde137 in (select czde137 from bz016 where czde103=20130000000195);
insert into bz017
select czde138,(select bz016.czde137 from bz016 where substr(bz016.hdde019,1,14)=bz017.czde137 and bz016.czde103=20130000000195),
czde014,czde143,czde132,czde116,czde103,czde108,jsde902,jsde903,hdde020
from bz017 where czde137 in (select czde137 from bz016 where czde103=20130000000054)
select * from bz018 where czde137 in (select czde137 from bz016 where czde103=20130000000054)
select * from bz019 where czde137 in (select czde137 from bz016 where czde103=20130000000054)
delete from bz019 where czde137 in (select czde137 from bz016 where czde103=20130000000195);
insert into bz019
select czde151,(select bz016.czde137 from bz016 where substr(bz016.hdde019,1,14)=bz019.czde137 and bz016.czde103=20130000000195),
case czde103 when '20130000000054' then '20130000000195' else to_char(czde103) end ,czde116,czde136,czde135
from bz019 where czde137 in (select czde137 from bz016 where czde103=20130000000054)
select * from bz038 where czde137 in (select czde137 from bz016 where czde103=20130000000054)
select * from bz019 where czde137 in (select czde137 from bz016 where czde103=20130000000195)
insert into bz019 select 2,czde137,czde103,'C2',CZDE136,CZDE135 FROM bz019 where czde137 in (select czde137 from bz016 where czde103=20130000000195)
|
CREATE TABLE ROOM (
ID NUMBER,
CONSTRAINT ROOM_PK PRIMARY KEY(ID),
NUMBER_OF_GUESTS NUMBER NOT NULL,
CHECK (NUMBER_OF_GUESTS >= 1),
PRICE NUMBER(*, 2),
BREAKFAST_INCLUDED NUMBER(1) DEFAULT 0,
CHECK (BREAKFAST_INCLUDED BETWEEN 0 AND 1),
PETS_ALLOWED NUMBER(1) DEFAULT 0,
CHECK (PETS_ALLOWED BETWEEN 0 AND 1),
DATE_AVAILABLE_FROM TIMESTAMP,
HOTEL_ID NUMBER NOT NULL,
CONSTRAINT HOTEL_FK FOREIGN KEY(HOTEL_ID) REFERENCES HOTEL(ID)
); |
-- Add repository groups
with repo_latest as (
select sub.repo_id,
sub.repo_name
from (
select repo_id,
dup_repo_name as repo_name,
row_number() over (partition by repo_id order by created_at desc, id desc) as row_num
from
gha_events
) sub
where
sub.row_num = 1
)
update
gha_repos r
set
alias = (
select rl.repo_name
from
repo_latest rl
where
rl.repo_id = r.id
)
where
r.name like '%_/_%'
and r.name not like '%/%/%'
;
update gha_repos set repo_group = alias;
update gha_repos set repo_group = 'fluentd' where name in ('fluentd', 'fluent/fluentd');
update gha_repos set repo_group = 'fluent-logger-ruby' where name in ('fluent-logger-ruby', 'fluent/fluent-logger-ruby');
update gha_repos set repo_group = 'fluent-plugin-scribe' where name in ('fluent-plugin-scribe', 'fluent/fluent-plugin-scribe');
update gha_repos set repo_group = 'fluent-plugin-mongo' where name in ('fluent-plugin-mongo', 'fluent/fluent-plugin-mongo');
update gha_repos set repo_group = 'fluent-plugin-s3' where name in ('fluent-plugin-s3', 'fluent/fluent-plugin-s3');
update gha_repos set repo_group = 'fluent-plugin-msgpack-rpc' where name in ('fluent-plugin-msgpack-rpc', 'fluent/fluent-plugin-msgpack-rpc');
update gha_repos set repo_group = 'fluent-logger-python' where name in ('fluent-logger-python', 'fluent/fluent-logger-python');
update gha_repos set repo_group = 'fluent-logger-java' where name in ('fluent-logger-java', 'fluent/fluent-logger-java');
update gha_repos set repo_group = 'fluent-logger-php' where name in ('fluent-logger-php', 'fluent/fluent-logger-php');
update gha_repos set repo_group = 'website' where name in ('website', 'fluent/website');
update gha_repos set repo_group = 'fluent-logger-perl' where name in ('fluent-logger-perl', 'fluent/fluent-logger-perl');
update gha_repos set repo_group = 'fluent-plugin-hoop' where name in ('fluent-plugin-hoop', 'fluent/fluent-plugin-hoop');
update gha_repos set repo_group = 'fluent-logger-d' where name in ('fluent-logger-d', 'fluent/fluent-logger-d');
update gha_repos set repo_group = 'fluent-plugins' where name in ('fluent-plugins', 'fluent/fluent-plugins');
update gha_repos set repo_group = 'fluent-plugin-flume' where name in ('fluent-plugin-flume', 'fluent/fluent-plugin-flume');
update gha_repos set repo_group = 'fluent-plugin-webhdfs' where name in ('fluent-plugin-webhdfs', 'fluent/fluent-plugin-webhdfs');
update gha_repos set repo_group = 'fluent-plugin-sql' where name in ('fluent-plugin-sql', 'fluent/fluent-plugin-sql');
update gha_repos set repo_group = 'nginx-fluentd-module' where name in ('nginx-fluentd-module', 'fluent/nginx-fluentd-module');
update gha_repos set repo_group = 'fluentd-docs' where name in ('fluentd-docs', 'fluent/fluentd-docs');
update gha_repos set repo_group = 'fluent-logger-node' where name in ('fluent-logger-node', 'fluent/fluent-logger-node');
update gha_repos set repo_group = 'fluentd-benchmark' where name in ('fluentd-benchmark', 'fluent/fluentd-benchmark');
update gha_repos set repo_group = 'fluent-plugin-rewrite-tag-filter' where name in ('fluent-plugin-rewrite-tag-filter', 'fluent/fluent-plugin-rewrite-tag-filter');
update gha_repos set repo_group = 'serverengine' where name in ('serverengine', 'fluent/serverengine');
update gha_repos set repo_group = 'fluent-logger-ocaml' where name in ('fluent-logger-ocaml', 'fluent/fluent-logger-ocaml');
update gha_repos set repo_group = 'fluentd-ui' where name in ('fluentd-ui', 'fluent/fluentd-ui');
update gha_repos set repo_group = 'NLog.Targets.Fluentd' where name in ('NLog.Targets.Fluentd', 'fluent/NLog.Targets.Fluentd');
update gha_repos set repo_group = 'fluentd-forwarder' where name in ('fluentd-forwarder', 'fluent/fluentd-forwarder');
update gha_repos set repo_group = 'fluent-bit' where name in ('fluent/fluent-bit', 'fluent-bit');
update gha_repos set repo_group = 'fluent-logger-scala' where name in ('fluent/fluent-logger-scala', 'fluent-logger-scala');
update gha_repos set repo_group = 'fluent-bit-demo' where name in ('fluent/fluent-bit-demo', 'fluent-bit-demo');
update gha_repos set repo_group = 'fluent-logger-erlang' where name in ('fluent/fluent-logger-erlang', 'fluent-logger-erlang');
update gha_repos set repo_group = 'data-collection' where name in ('fluent/data-collection', 'data-collection');
update gha_repos set repo_group = 'fluent-logger-golang' where name in ('fluent/fluent-logger-golang', 'fluent-logger-golang');
update gha_repos set repo_group = 'fluentd-docker-image' where name in ('fluent/fluentd-docker-image', 'fluentd-docker-image');
update gha_repos set repo_group = 'fluent-bit-website' where name in ('fluent/fluent-bit-website', 'fluent-bit-website');
update gha_repos set repo_group = 'fluentbit-dashboard' where name in ('fluent/fluentbit-dashboard', 'fluentbit-dashboard');
update gha_repos set repo_group = 'fluentd-website' where name in ('fluent/fluentd-website', 'fluentd-website');
update gha_repos set repo_group = 'fluentbit-website-v2' where name in ('fluent/fluentbit-website-v2', 'fluentbit-website-v2');
update gha_repos set repo_group = 'fluent-bit-docs' where name in ('fluent/fluent-bit-docs', 'fluent-bit-docs');
update gha_repos set repo_group = 'fluent-bit-go' where name in ('fluent/fluent-bit-go', 'fluent-bit-go');
update gha_repos set repo_group = 'fluent-bit-docker-image' where name in ('fluent/fluent-bit-docker-image', 'fluent-bit-docker-image');
update gha_repos set repo_group = 'fluentd-kubernetes-daemonset' where name in ('fluent/fluentd-kubernetes-daemonset', 'fluentd-kubernetes-daemonset');
update gha_repos set repo_group = 'fluentd-docs-kubernetes' where name in ('fluent/fluentd-docs-kubernetes', 'fluentd-docs-kubernetes');
update gha_repos set repo_group = 'fluent-bit-kubernetes-logging' where name in ('fluent/fluent-bit-kubernetes-logging', 'fluent-bit-kubernetes-logging');
update gha_repos set repo_group = 'fluent-bit-docker-image' where name in ('fluent/fluent-bit-docker-image', 'fluent-bit-docker-image');
update gha_repos set repo_group = 'fluent-bit-packaging' where name in ('fluent/fluent-bit-packaging', 'fluent-bit-packaging');
update gha_repos set repo_group = 'fluent-bit-test' where name in ('fluent/fluent-bit-test', 'fluent-bit-test');
update gha_repos set repo_group = 'kafka-connect-fluentd' where name in ('fluent/kafka-connect-fluentd', 'kafka-connect-fluentd');
update gha_repos set repo_group = 'fluent-bit-kubernetes-logging' where name in ('fluent/fluent-bit-kubernetes-logging', 'fluent-bit-kubernetes-logging');
update gha_repos set repo_group = 'fluentd-docs-gitbook' where name in ('fluent/fluentd-docs-gitbook', 'fluentd-docs-gitbook');
update gha_repos set repo_group = 'fluent-bit-tutorials' where name in ('fluent/fluent-bit-tutorials', 'fluent-bit-tutorials');
update gha_repos set repo_group = 'fluent.github.com' where name in ('fluent/fluent.github.com', 'fluent.github.com');
update gha_repos set repo_group = 'fluent-bit-docs-stream-processing' where name in ('fluent/fluent-bit-docs-stream-processing', 'fluent-bit-docs-stream-processing');
update gha_repos set repo_group = 'fluent-bit-plugin' where name in ('fluent/fluent-bit-plugin', 'fluent-bit-plugin');
update gha_repos set repo_group = 'fluent-bit-perf' where name in ('fluent/fluent-bit-perf', 'fluent-bit-perf');
update gha_repos set repo_group = 'fluent-bit-docker' where name in ('fluent/fluent-bit-docker', 'fluent-bit-docker');
update gha_repos set repo_group = 'fluent-bit-kubernetes-daemonset' where name in ('fluent/fluent-bit-kubernetes-daemonset', 'fluent-bit-kubernetes-daemonset');
update
gha_repos
set
repo_group = 'Plugins'
where
lower(org_login) in (
'fluent-plugins-nursery'
)
or lower(name) in (
'baritolog/barito-fluent-plugin', 'blacknight95/aws-fluent-plugin-kinesis', 'sumologic/fluentd-kubernetes-sumologic', 'sumologic/fluentd-output-sumologic',
'wallynegima/scenario-manager-plugin', 'aliyun/aliyun-odps-fluentd-plugin', 'awslabs/aws-fluent-plugin-kinesis', 'campanja/fluent-output-router',
'grafana/loki/', 'jdoconnor/fluentd_https_out', 'newrelic/newrelic-fluentd-output', 'roma42427/filter_wms_auth', 'scalyr/scalyr-fluentd',
'sebryu/fluent_plugin_in_websocket', 'tagomoris/fluent-helper-plugin-spec', 'y-ken/fluent-mixin-rewrite-tag-name', 'y-ken/fluent-mixin-type-converter'
)
or lower(name) like '%_/fluent-plugin-%'
or lower(name) like '%_/fluentd-plugin-%'
;
select
repo_group,
count(*) as number_of_repos
from
gha_repos
where
repo_group is not null
group by
repo_group
order by
number_of_repos desc,
repo_group asc;
|
INSERT INTO users
(user_name, user_email, user_password)
VALUES
($1, $2, $3)
RETURNING user_name, user_email; |
/*
Name: Users successfully registered by date
Data source: 4
Created By: Admin
Last Update At: 2016-02-11T20:33:45.006668+00:00
*/
SELECT date, COUNT(*) AS Registrations,
FROM (
SELECT string(STRFTIME_UTC_USEC(DATE(date_time), "%m/%d/%Y")) AS date,
post_prop23
FROM (TABLE_QUERY(djomniture:cipomniture_djmansionglobal,'CONCAT(REPLACE(table_id,"_","-"),"-01") BETWEEN STRFTIME_UTC_USEC("{{startdate}}", "%Y-%m-01") and STRFTIME_UTC_USEC("{{enddate}}", "%Y-%m-31")'))
WHERE
post_prop23 = "User Registration Succeed" /* Counting user registrations */ and post_page_event = "100"
AND DATE(date_time) >= DATE('{{startdate}}')
AND DATE(date_time) <= DATE('{{enddate}}') )L
group by date
|
/*
Navicat MySQL Data Transfer
Source Server : test
Source Server Version : 50624
Source Host : localhost:3306
Source Database : bbs
Target Server Type : MYSQL
Target Server Version : 50624
File Encoding : 65001
Date: 2017-03-14 20:54:03
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for admin
-- ----------------------------
DROP TABLE IF EXISTS `admin`;
CREATE TABLE `admin` (
`admin_id` int(11) NOT NULL AUTO_INCREMENT,
`admin_name` varchar(20) DEFAULT NULL,
`admin_pw` varchar(20) DEFAULT NULL,
`sex` varchar(10) DEFAULT NULL,
`slogan` varchar(255) DEFAULT NULL,
`admin_email` varchar(255) DEFAULT NULL,
`admin_faculty` varchar(255) DEFAULT NULL,
`adminpicture_url` varchar(255) DEFAULT NULL,
`admin_posts` int(11) DEFAULT NULL,
`admin_level` int(11) DEFAULT NULL,
`fan` int(11) DEFAULT NULL,
`issuperadmin` int(11) DEFAULT NULL,
`plate_id` int(11) DEFAULT NULL,
PRIMARY KEY (`admin_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of admin
-- ----------------------------
INSERT INTO `admin` VALUES ('1', 'root', 'root', '男', '我是管理员!', '12756437@163.com', '信息工程学院', 'http://localhost:8080/wzbcbbs/userUpload/images/20161122/1479792029438015947.png', '2', '0', '0', '0', null);
-- ----------------------------
-- Table structure for article
-- ----------------------------
DROP TABLE IF EXISTS `article`;
CREATE TABLE `article` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`pid` int(11) DEFAULT NULL,
`rootid` int(11) DEFAULT NULL,
`title` varchar(255) DEFAULT NULL,
`cont` text,
`pdate` datetime DEFAULT NULL,
`isleaf` int(11) DEFAULT NULL,
`user_id` int(11) DEFAULT NULL,
`plate_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=124 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of article
-- ----------------------------
INSERT INTO `article` VALUES ('1', '0', '1', '蚂蚁大战大象', '蚂蚁大战大象', '2016-12-07 11:14:17', '1', '1', '1');
INSERT INTO `article` VALUES ('2', '1', '1', '大象被打趴下了', '大象被打趴下了', '2016-12-07 11:14:18', '1', '10', '1');
INSERT INTO `article` VALUES ('3', '2', '1', '蚂蚁也不好过', '蚂蚁也不好过', '2016-12-07 11:14:19', '0', '1', '1');
INSERT INTO `article` VALUES ('4', '2', '1', '瞎说', '瞎说', '2016-12-07 11:14:20', '1', '10', '1');
INSERT INTO `article` VALUES ('6', '1', '1', '怎么可能', '怎么可能', '2016-12-07 11:14:22', '1', '1', '1');
INSERT INTO `article` VALUES ('7', '6', '1', '怎么没有可能', '怎么没有可能', '2016-12-07 11:14:23', '0', '1', '1');
INSERT INTO `article` VALUES ('8', '6', '1', '可能性是很大的', '可能性是很大的', '2016-12-07 11:14:24', '0', '1', '1');
INSERT INTO `article` VALUES ('9', '2', '1', '大象进医院了', '大象进医院了', '2016-12-07 11:14:25', '1', '1', '1');
INSERT INTO `article` VALUES ('10', '9', '1', '护士是蚂蚁', '护士是蚂蚁', '2016-12-07 11:14:26', '1', '1', '1');
INSERT INTO `article` VALUES ('11', '0', '11', 'new1', '是范德萨发', '2016-12-07 13:46:23', '1', '1', '2');
INSERT INTO `article` VALUES ('13', '0', '13', 'afdasdfgas', '<p>asdasfagfsdg</p>', '2016-12-07 13:46:40', '0', '1', '3');
INSERT INTO `article` VALUES ('14', '0', '14', 'asdasfagsd', '<p>adgsfgdfhd</p>', '2016-12-07 13:46:45', '0', '1', '4');
INSERT INTO `article` VALUES ('15', '0', '15', 'jkl;k,hjm,', '<p>hgkjlhgjkghjkghjk</p>', '2016-12-07 13:46:49', '0', '1', '5');
INSERT INTO `article` VALUES ('16', '0', '16', 'gvbnmufujh', '<p>khj,hgi,,fjgmfuymfdghjfhgj</p>', '2016-12-07 13:46:56', '0', '1', '6');
INSERT INTO `article` VALUES ('17', '0', '17', 'ghfjgfhjfghj', '<p>ghjgfhjgdfhk,fghkhj</p>', '2016-12-07 13:47:02', '0', '1', '7');
INSERT INTO `article` VALUES ('18', '0', '18', 'gfhjfghjgj', '<p>fghmgfhjfgkfghmf</p>', '2016-12-07 13:47:07', '0', '1', '8');
INSERT INTO `article` VALUES ('19', '0', '19', 'gfhjgfhjf', '<p>hjgmfbbmfghkjgdhj</p>', '2016-12-07 13:47:12', '1', '1', '1');
INSERT INTO `article` VALUES ('94', '1', '1', '123', '<p>123</p>', '2017-01-02 16:14:25', '0', '1', '1');
INSERT INTO `article` VALUES ('95', '1', '1', '111', '<p>111</p>', '2017-01-02 16:18:19', '0', '1', '1');
INSERT INTO `article` VALUES ('96', '1', '1', '111', '<p>111</p>', '2017-01-02 16:20:27', '0', '1', '1');
INSERT INTO `article` VALUES ('98', '1', '1', '123', '<p>123</p>', '2017-01-02 16:33:14', '1', '1', '1');
INSERT INTO `article` VALUES ('99', '0', '99', '123', '<p>123</p>', '2017-01-03 20:36:24', '1', '1', '10');
INSERT INTO `article` VALUES ('100', '99', '99', '123', '<p>123</p>', '2017-01-03 21:18:15', '0', '1', '1');
INSERT INTO `article` VALUES ('101', '4', '1', '111', '<p>111</p>', '2017-01-04 10:55:59', '0', '1', '1');
INSERT INTO `article` VALUES ('102', '11', '11', '111', '<p>111</p>', '2017-01-04 10:57:30', '0', '1', '1');
INSERT INTO `article` VALUES ('103', '11', '11', '123', '<p>123</p>', '2017-01-04 10:58:34', '0', '1', '1');
INSERT INTO `article` VALUES ('104', '11', '11', '123', '<p>123</p>', '2017-01-04 11:00:05', '0', '1', '1');
INSERT INTO `article` VALUES ('105', '11', '11', '123456', '<p>123456</p>', '2017-01-04 11:11:10', '0', '1', '1');
INSERT INTO `article` VALUES ('106', '98', '1', '111', '<p>111</p>', '2017-01-04 16:14:31', '0', '1', '1');
INSERT INTO `article` VALUES ('107', '0', '107', '我来试试新头像', '<p>头像</p>', '2017-01-05 19:04:53', '0', '5', '11');
INSERT INTO `article` VALUES ('108', '0', '108', '123', '12312312', '2017-01-06 16:11:28', '0', '5', '12');
INSERT INTO `article` VALUES ('109', '0', '109', '123', '1231', '2017-01-06 16:12:19', '0', '5', '13');
INSERT INTO `article` VALUES ('110', '0', '110', '123', '123123', '2017-01-06 16:12:33', '0', '5', '14');
INSERT INTO `article` VALUES ('111', '0', '111', '12312', '12312', '2017-01-06 16:13:04', '0', '5', '15');
INSERT INTO `article` VALUES ('112', '0', '112', '实践活动', '123', '2017-01-06 16:13:37', '0', '5', '16');
INSERT INTO `article` VALUES ('113', '0', '113', '见客户给', '1231', '2017-01-06 16:13:40', '0', '5', '17');
INSERT INTO `article` VALUES ('114', '0', '114', '的', '123123', '2017-01-06 16:14:00', '0', '5', '18');
INSERT INTO `article` VALUES ('115', '1', '1', '', '<p><img src=\"http://localhost:8080/wzbcbbs/userUpload/images/20170106/1483690764425049693.jpg\" title=\"1483690764425049693.jpg\" alt=\"v2-87c7f902eb33f0df1e618328e500127a_b.jpg\"/>什么?怎么可能?</p>', '2017-01-06 16:19:35', '0', '5', '1');
INSERT INTO `article` VALUES ('116', '0', '116', '没什么好说的,那就祝你新年大吉吧', '<p><img src=\"http://localhost:8080/wzbcbbs/userUpload/images/20170106/1483691009020028037.jpg\" title=\"1483691009020028037.jpg\" alt=\"p62353815.jpg\" width=\"369\" height=\"356\"/></p>', '2017-01-06 16:23:40', '1', '5', '1');
INSERT INTO `article` VALUES ('117', '116', '116', '', '<p><img src=\"http://localhost:8080/wzbcbbs/userUpload/images/20170106/1483691077319018241.jpg\" title=\"1483691077319018241.jpg\" alt=\"p62356157.jpg\" width=\"376\" height=\"380\"/></p>', '2017-01-06 16:24:46', '0', '1', '1');
INSERT INTO `article` VALUES ('118', '116', '116', '', '<p><img src=\"http://localhost:8080/wzbcbbs/userUpload/images/20170106/1483691319073009486.jpg\" title=\"1483691319073009486.jpg\" alt=\"p62355094.jpg\" width=\"371\" height=\"354\"/></p>', '2017-01-06 16:28:47', '0', '2', '1');
INSERT INTO `article` VALUES ('119', '19', '19', '', '<p>111</p>', '2017-01-06 16:30:27', '0', '5', '1');
INSERT INTO `article` VALUES ('120', '0', '120', ' 阿萨德', '<p>新用户发帖</p>', '2017-01-06 17:26:20', '0', '14', '1');
INSERT INTO `article` VALUES ('121', '0', '121', '再来一贴', '<p>阿萨德阿萨德</p>', '2017-01-06 17:35:31', '1', '14', '1');
INSERT INTO `article` VALUES ('122', '121', '121', '', '<p>回复一下自己!</p>', '2017-01-06 17:35:42', '0', '14', '1');
INSERT INTO `article` VALUES ('123', '0', '123', '阿萨德', '<p>阿萨德水电费<img src=\"http://localhost:8080/wzbcbbs/userUpload/images/20170107/1483759468729047000.jpg\" title=\"1483759468729047000.jpg\" alt=\"demo.jpg\"/></p>', '2017-01-07 11:24:31', '0', '14', '2');
-- ----------------------------
-- Table structure for plate
-- ----------------------------
DROP TABLE IF EXISTS `plate`;
CREATE TABLE `plate` (
`plate_id` int(11) NOT NULL AUTO_INCREMENT,
`plate_name` varchar(100) DEFAULT NULL,
`superadmin_id` int(11) DEFAULT NULL,
`motto_one` varchar(100) DEFAULT NULL,
`motto_two` varchar(100) DEFAULT NULL,
`motto_three` varchar(100) DEFAULT NULL,
`pdate` timestamp NULL DEFAULT NULL,
`plate_picture` varchar(255) DEFAULT NULL,
`plate_cont` varchar(255) DEFAULT NULL,
PRIMARY KEY (`plate_id`)
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of plate
-- ----------------------------
INSERT INTO `plate` VALUES ('1', '国际学院', '1', '国际的', '世界的', '4+1', '2016-12-30 21:36:34', 'http://localhost:8080/wzbcbbs/upload/84875.jpg', '温州商学院国际学院(原温州大学城市学院国际交流中心)成立于2011年,携手国际大学联盟,同全球近百所知名大学,如澳大利亚墨尔本大学、悉尼大学、麦考瑞大学,英国曼切斯特大学、伦敦大学、布鲁内尔大学、利兹大学,美国加州公立大学、詹姆斯曼迪逊大学、麻省大学、威斯康辛大学等架起直桥。');
INSERT INTO `plate` VALUES ('2', '会计学院', '1', '优秀', '专业', '完善', '2017-01-06 15:41:15', 'http://localhost:8080/wzbcbbs/upload/84876.jpg', '温州商学院会计学院建立了一支结构合理,专业素质良好的教师队伍。教学设施完善,拥有ERP实验室、会计手工实验室、会计综合实验室、企业仿真实验室等多个实验室和完善的多媒体教学设施。分院与温州市华明会计师事务所、东瓯会计师事务所、金算盘财务管理有限公司等13家会计师事务所和代理记账公司合作,建立了校外实习基地和企业校内工作室,为学生提供了真实的会计实训环境。');
INSERT INTO `plate` VALUES ('3', '管理学院', '1', '才干', '务实', '士魂', '2017-01-06 15:41:20', 'http://localhost:8080/wzbcbbs/upload/84877.jpg', '温州商学院管理学院的总目标是:培养具有宽阔的国际视野、既有“士”的操守、道德和理想,又要有“商”的才干与务实的管理者。秉承每一位学子都有机会圆梦的育人理念,用“爱”“和”“美”点燃每一位学子的生命之花!士魂商才是每一位学子的追求与渴望!');
INSERT INTO `plate` VALUES ('4', '信息工程学院', '1', '信息', '计算机', '科技', '2017-01-06 15:41:24', 'http://localhost:8080/wzbcbbs/upload/84886.jpg', '温州商学院创办于1985年,下设电子信息工程系、计算机应用工程系和信息管理工程系,现有“计算机科学与技术”、“网络工程”、“电子信息工程”、“电气工程及其自动化”、“信息管理与信息系统”等专业。分院拥有CEAC国家信息化培训考试中心、中国自动化系统工程师资格认证(ASEA)培训中心、中国电子商务协会中小企业推广普及化工程人才培训基地、金蝶ERP认证培训中心、阿里巴巴电子商务应用专员培训中心、百度商务班等。');
INSERT INTO `plate` VALUES ('5', '金融学院', '1', '经济', '投资', '融资', '2017-01-06 15:41:26', 'http://localhost:8080/wzbcbbs/upload/84916.jpg', '温州商学院金融学院为浙江省新型特色建设专业,有专业实验室两个,分别是“金融创新实验室”和“商业银行综合业务实验室”,可以开展证券、期货、期权、黄金、外汇投资分析和模拟交易,以及商业银行综合业务仿真实训、商业银行沙盘模拟实验等。目前,依托金融分院的专业研究机构共有三个,分别是温州融资担保研究中心,温州市社科研究重点基地民间资本与地方金融制度创新研究中心、厦门大学经济学院中国民间金融研究中心温州基地。');
INSERT INTO `plate` VALUES ('6', '外语外贸学院', '1', '外语', '经贸', ' 应用', '2017-01-06 15:41:29', 'http://localhost:8080/wzbcbbs/upload/84892.jpg', '温州商学院外语外贸学院由国际贸易分院及外语分院合并而成,意在相互融合并优势互补。学院现有2个本科专业(国际经济贸易、英语)及2个专科专业(商务英语、国际经济与贸易)。学院注重专业的有机复合,分别培养“国际经贸+英语+二外”“英语+国际经贸+二外”“国际金融与投资+英语+二外”等真正适应社会需求的复合型及应用型人才。');
INSERT INTO `plate` VALUES ('7', '继续教育学院', '1', '成长', '合作', '继续教育', '2017-01-06 15:41:32', 'http://localhost:8080/wzbcbbs/upload/84881.jpg', '温州商学院继续教育学院下设三个中心,分别为:“大学生成长中心”、“国际合作交流中心”、“继续教育发展中心”。');
INSERT INTO `plate` VALUES ('8', '艺术设计学院', '1', '艺术', '绘画', 'Design', '2017-01-06 15:41:34', 'http://localhost:8080/wzbcbbs/upload/84897.jpg', '温州商学院艺术设计分院位于温州茶山高教园区。分院开设艺术设计专业,设有环境艺术设计和数字媒体艺术设计2个专业方向。建有专业专用设计机房,摄影摄像棚,数字视、音频合成编辑室,影视、动画后期制作室,环艺材料、工艺实验样板房,写真喷绘室等基础教学部。');
INSERT INTO `plate` VALUES ('9', '学习交流', '1', '学习', '分享', '心得', '2017-01-06 15:41:37', 'http://localhost:8080/wzbcbbs/upload/84902.jpg', '来呀,我们一起学习吧!');
INSERT INTO `plate` VALUES ('10', '人文艺术', '1', '文学', '艺术', '思考', '2017-01-06 15:41:39', 'http://localhost:8080/wzbcbbs/upload/84907.jpg', '我们一起谈谈吧~');
INSERT INTO `plate` VALUES ('11', '电脑相关', '1', '电脑', '笔记本', '搞机', '2017-01-06 15:41:42', 'http://localhost:8080/wzbcbbs/upload/84908.jpg', '卡巴图吧集聚地~');
INSERT INTO `plate` VALUES ('12', '运动修身', '1', '运动', '健身', '活动', '2017-01-06 15:41:44', 'http://localhost:8080/wzbcbbs/upload/84909.jpg', '让我们的八块腹肌和人鱼线都xiu出来~');
INSERT INTO `plate` VALUES ('13', '社团群体', '1', '社团', '卡巴', '活动', '2017-01-06 15:41:47', 'http://localhost:8080/wzbcbbs/upload/84910.jpg', '快来到社团玩呀~');
INSERT INTO `plate` VALUES ('14', '组织活动', '1', '组织', '学生会', '电脑医院', '2017-01-06 15:41:50', 'http://localhost:8080/wzbcbbs/upload/84911.jpg', '近期组织相关活动通告~');
INSERT INTO `plate` VALUES ('15', '商院草坪', '1', '草坪', '畅聊', '小八卦', '2017-01-06 15:41:54', 'http://localhost:8080/wzbcbbs/upload/84912.jpg', '嘘!最近商学院好像出了点事情!');
INSERT INTO `plate` VALUES ('16', '教学下载', '1', '下载区', '文档', '学习资料', '2017-01-06 15:41:56', 'http://localhost:8080/wzbcbbs/upload/84913.jpg', '请广大同学安秩序下载!');
INSERT INTO `plate` VALUES ('17', '图书馆', '1', '图书', '新到图书', '大热图书', '2017-01-06 15:41:59', 'http://localhost:8080/wzbcbbs/upload/84914.jpg', '呦~客官,我们这里又到了一批好东西~快来看看吧~');
INSERT INTO `plate` VALUES ('18', '闲话商院', '1', '商院', '闲聊', '建议', '2017-01-06 15:42:02', 'http://localhost:8080/wzbcbbs/upload/84915.jpg', '有什么想对商院说的就来吧~');
-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`user_id` int(11) NOT NULL AUTO_INCREMENT,
`user_name` varchar(20) DEFAULT NULL,
`user_pw` varchar(20) DEFAULT NULL,
`sex` varchar(10) DEFAULT NULL,
`slogan` varchar(255) DEFAULT NULL,
`user_email` varchar(255) DEFAULT NULL,
`user_faculty` varchar(255) DEFAULT NULL,
`userpicture_url` varchar(255) DEFAULT NULL,
`user_posts` int(11) DEFAULT NULL,
`user_level` int(11) DEFAULT NULL,
`fan` int(11) DEFAULT NULL,
`isadministrator` int(11) DEFAULT NULL,
PRIMARY KEY (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of user
-- ----------------------------
INSERT INTO `user` VALUES ('2', '满城花祭、谁为谁空守旧梦', 'asd', '男', 'aaa', 'asd', 'asd', 'http://localhost:8080/wzbcbbs/images/headimage/demo.jpg', '0', '0', '0', '1');
INSERT INTO `user` VALUES ('3', '回忆丶旧时光', '111', '男', '略略略', '111', '111', 'http://localhost:8080/wzbcbbs/images/headimage/demo.jpg', '0', '0', '0', '1');
INSERT INTO `user` VALUES ('5', 'Soles', '1', '男', '111', '2', '2', 'http://localhost:8080/wzbcbbs/userHeadimg/4-15012G52133.jpg', '19', '0', '0', '1');
INSERT INTO `user` VALUES ('10', '翔爷无敌', '111111', '男', '这个人很懒,什么都没留下。', '1553856390@qq.com', '111', 'http://localhost:8080/wzbcbbs/images/headimage/demo.jpg', '0', '0', '0', '1');
INSERT INTO `user` VALUES ('11', 'Lily', '666666', '女', '这个人很懒,什么都没留下。', '1553856390@qq.con', '信息工程学院', 'http://127.0.0.1:8080/wzbcbbs/images/headimage/demo.jpg', '0', '0', '0', '1');
INSERT INTO `user` VALUES ('14', '新用户', '111111', '男', '12312323', ' addz@qq.com', 'add阿达', 'http://localhost:8080/wzbcbbs/userHeadimg/4-15012G52133.jpg', '3', '0', '0', '1');
|
DROP TABLE IF EXISTS project; |
SELECT COUNT(*) AS count
FROM categories as CT
INNER JOIN songs as S ON CT.id=S.categoryId
INNER JOIN artistSongs as AST ON S.id=AST.songId
INNER JOIN artists as A ON A.id=AST.artistId
WHERE S.id IS NOT NULL
{fliterSingerId}
{fliterSingerName}
{fliterSingerType}
{fliterAlbumId}
AND S.status = 'active'
|
select name from student;
select name from student where stud_id = 1;
select stud_id, name, email,phone, a.addr_id, street, city, state, zip, country
FROM students s
inner join addresses a
on s.addr_id=a.addr_id;
select stud_id, name, email,phone, a.addr_id, street, city, state, zip, country
FROM students s
left outer join addresses a
on s.addr_id=a.addr_id;
select stud_id, name, email,phone, a.addr_id, street, city, state, zip, country
FROM students s
right outer join addresses a
on s.addr_id=a.addr_id;
select stud_id, name, email,phone, a.addr_id, street, city, state, zip, country
FROM students s
full outer join addresses a
on s.addr_id=a.addr_id;
--findStudentByIdWithAddress--
/*
* student + address join
*/
select stud_id, name, email, dob, phone, a.addr_id, street, city, state, zip, country
FROM students s
left outer join addresses a
on s.addr_id=a.addr_id
where s.stud_id=1;
/*
* student + courses join
*/
select s.stud_id,s.name ,s.email,s.phone,s.dob ,
c.course_id,c.name ,c.description,c.start_date,c.end_date
from students s
join course_enrollment ce
on s.stud_id = ce.stud_id
join courses c
on ce.course_id=c.course_id where s.stud_id=1;
/*
* tutors + courses join
*/
SELECT t.tutor_id, t.name as tutor_name, email,course_id, c.name, description, start_date, end_date
FROM tutors t
join courses c
on t.tutor_id=c.tutor_id;
/*
* tutors + courses outer join
*/
SELECT t.tutor_id, t.name as tutor_name, email,course_id, c.name, description, start_date, end_date
FROM tutors t
left outer join courses c
on t.tutor_id=c.tutor_id;
SELECT t.tutor_id, t.name as tutor_name, email,course_id, c.name, description, start_date, end_date
FROM tutors t
left outer join courses c
on t.tutor_id=c.tutor_id
where t.tutor_id=1;
/*
* tutors + addresses + courses outer join
*/
SELECT t.tutor_id, t.name as tutor_name, email, a.addr_id, street, city, state, zip, country,
course_id, c.name, description, start_date, end_date
FROM tutors t
left outer join addresses a
on t.addr_id=a.addr_id
left outer join courses c on t.tutor_id=c.tutor_id
where t.tutor_id=1;
-- Courses검색
SELECT * FROM COURSES
WHERE TUTOR_ID = 1
AND NAME LIKE '%Quick%'
AND START_DATE >= TO_DATE('2015/05/01');
|
@@autotask_sql_setup
SELECT client_name
, window_name
, jobs_created
, jobs_started
, jobs_completed
, window_start_time at time zone sessiontimezone window_start_time
, window_end_time at time zone sessiontimezone window_end_time
FROM dba_autotask_client_history
--WHERE client_name like '%stats%'
order by client_name, window_end_time
/
|
SET NOCOUNT ON;
SELECT DISTINCT
RTRIM(item.[Style]) ItemSiteCategory4Code,
RTRIM(item.[Style]) [Value],
NULL DateUpdated
FROM [Liberty Mountain$Item] item
WHERE RTRIM(item.[Style]) <> ''
AND item.Blocked <> 1
ORDER BY RTRIM(item.[Style]);
|
create table screeners (
id identity not null primary key,
description varchar(200),
published boolean
);
create table questions (
id identity not null primary key,
screener_id long not null,
prompt varchar(200) not null,
answer_type varchar(20) not null,
foreign key (screener_id) references screeners(id)
);
|
create database hospitalrecordhospitalrecord.accloginhospitalrecord.accloginhospitalrecord.acclogin |
DROP DATABASE IF EXISTS project;
create database project;
show databases;
use project;
show tables;
create table Account(
accountno varchar(15) primary key,
balance int(10)
);
create table user(
userID int primary key,
Name varchar(15),
accountno varchar(15),
Password varchar(30),
Email varchar(35),
dob varchar(12),
foreign key(accountNo) references Account(accountNo)
);
create table Admin(
adminID int primary key,
password varchar(50)
);
create table Transaction(
transactionID int auto_increment primary key,
transactionAmount int,
dateoftransaction varchar(12),
WithdrawAccNo varchar(15),
DepositAccNo varchar(15),
statusOfTrans varchar(10),
foreign key(WithdrawAccNo) references Account(accountNo),
foreign key(DepositAccNo) references Account(accountNo)
);
insert into admin values(123,'123@#');
insert into account values('105824130',1789000);
insert into account values('105344130',1000067);
insert into account values('885824130',1600000);
insert into account values('178824130',1005600);
insert into account values('105825730',1000670);
insert into account values('105524130',1230000);
insert into account values('105824190',1000800);
insert into account values('105826790',1000056);
insert into account values('905824190',1000000);
insert into user values(203,'Tanush','105824130','Tanush@123','19ucs203@lnmiit.ac.in','2001-10-19');
insert into user values(254,'Abhinav','105344130','Abhinav@123','19ucs254@lnmiit.ac.in','2000-12-20');
insert into user values(201,'Garvit','178824130','Garvit@123','19ucs201@lnmiit.ac.in','2001-3-12');
insert into user values(237,'Raghav','885824130','Raghav@123','19ucs237@lnmiit.ac.in','2001-05-11');
insert into user values(238,'Pramod','105825730','Pramod@123','pramod.idbms@lnmiit.ac.in','1985-12-17');
insert into user values(239,'Nirmal','105524130','Nirmal@123','nirmal.ap@lnmiit.ac.in','1985-10-21');
insert into user values(240,'Manish','105826790','Manish@123','manish.lab@lnmiit.ac.in','1989-04-12');
insert into user values(241,'Ram Prakash','105824190','Ram@123','ram.idbms@lnmiit.ac.in','1980-03-29');
insert into user values(200,'Test','905824190','test','test@gmail.com','1980-03-29');
select * from user;
|
--VALOR TOTAL DAS COMANDAS DE CADA FESTA
SELECT
festa.dia AS dia,
festa.tipo AS tipo,
SUM(comanda.valor_total) AS valor_total
FROM (
SELECT
dia,
tipo
FROM
festa) festa
JOIN (
SELECT
dia_festa,
valor_total
FROM
comanda) comanda
ON
comanda.dia_festa = festa.dia
GROUP BY
dia,
tipo
|
UPDATE `Sessions` SET `published` = 1 WHERE `published` IS NULL;
ALTER TABLE `Sessions` MODIFY COLUMN `published` BOOL NOT NULL DEFAULT 1;
|
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Nov 09, 2020 at 12:21 PM
-- Server version: 10.1.9-MariaDB
-- PHP Version: 5.6.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `iridiumdb`
--
-- --------------------------------------------------------
--
-- Table structure for table `irididumtable`
--
CREATE TABLE `irididumtable` (
`OBJECT_NAME` text NOT NULL,
`OBJECT_ID` text NOT NULL,
`CENTER_NAME` text NOT NULL,
`REF_FRAME` text NOT NULL,
`TIME_SYSTEM` text NOT NULL,
`MEAN_ELEMENT_THEORY` text NOT NULL,
`EPOCH` text NOT NULL,
`MEAN_MOTION` decimal(11,0) NOT NULL,
`ECCENTRICITY` decimal(11,0) NOT NULL,
`INCLINATION` decimal(11,0) NOT NULL,
`RA_OF_ASC_NODE` decimal(11,0) NOT NULL,
`ARG_OF_PERICENTER` decimal(11,0) NOT NULL,
`MEAN_ANOMALY` decimal(11,0) NOT NULL,
`EPHEMERIS_TYPE` int(11) NOT NULL,
`CLASSIFICATION_TYPE` text NOT NULL,
`NORAD_CAT_ID` int(11) NOT NULL,
`ELEMENT_SET_NO` int(11) NOT NULL,
`REV_AT_EPOCH` int(11) NOT NULL,
`BSTAR` decimal(10,0) NOT NULL,
`MEAN_MOTION_DOT` decimal(10,0) NOT NULL,
`MEAN_MOTION_DDOT` decimal(10,0) NOT NULL,
`SEMIMAJOR_AXIS` decimal(10,0) NOT NULL,
`PERIOD` decimal(10,0) NOT NULL,
`APOAPSIS` decimal(10,0) NOT NULL,
`OBJECT_TYPE` text NOT NULL,
`RCS_SIZE` text NOT NULL,
`COUNTRY_CODE` text NOT NULL,
`LAUNCH_DATE` date NOT NULL,
`SITE` text NOT NULL,
`DECAY_DATE` date NOT NULL,
`DECAYED` text NOT NULL,
`FILE` int(11) NOT NULL,
`GP_ID` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!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 */;
|
DROP TABLE IF EXISTS books;
CREATE TABLE books (
id SERIAL PRIMARY KEY,
authors VARCHAR (255),
title VARCHAR (255),
isbn VARCHAR (255),
image_url VARCHAR (255),
amount VARCHAR (255),
description VARCHAR,
bookshelf VARCHAR (255)
); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.