blob_id stringlengths 40 40 | language stringclasses 1
value | repo_name stringlengths 5 133 | path stringlengths 3 276 | src_encoding stringclasses 33
values | length_bytes int64 23 9.61M | score float64 2.52 5.28 | int_score int64 3 5 | detected_licenses listlengths 0 44 | license_type stringclasses 2
values | text stringlengths 23 9.43M | download_success bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|
e71f04409cbfe74025e3d111f0bc7742ed229919 | SQL | Krafalski/Flashcard | /db/schema.sql | UTF-8 | 781 | 3.578125 | 4 | [] | no_license | -- database name is flashcards
DROP TABLE IF EXISTS users;
DROP TABLE IF EXISTS cards;
DROP TABLE IF EXISTS session;
-- create db flashcards;
CREATE TABLE users (
id SERIAL UNIQUE PRIMARY KEY,
email VARCHAR (225),
password_digest TEXT,
user_name VARCHAR (50)
);
-- from node-connect-pg-simple https://github.com/voxpelli/node-connect-pg-simple/blob/master/table.sql
CREATE TABLE "session" (
"sid" varchar NOT NULL COLLATE "default",
"sess" json NOT NULL,
"expire" timestamp(6) NOT NULL
)
WITH (OIDS=FALSE);
ALTER TABLE "session" ADD CONSTRAINT "session_pkey" PRIMARY KEY ("sid") NOT DEFERRABLE INITIALLY IMMEDIATE;
CREATE TABLE cards (
id SERIAL UNIQUE PRIMARY KEY,
topic VARCHAR (225),
side_one TEXT,
side_two TEXT,
row_created_ TIMESTAMP WITH TIME ZONE
);
| true |
935b2f9d066a6d95d608315511ab8807762c371e | SQL | vinixiii/2DM-S1-banco-de-dados | /exercicios/modelagens/1.3-clinica/clinica_03_DQL.sql | ISO-8859-1 | 1,072 | 4 | 4 | [] | no_license | USE Clinica;
SELECT * FROM Donos;
SELECT * FROM TiposDePet;
SELECT * FROM Racas;
SELECT * FROM Pets;
SELECT * FROM Veterinarios;
SELECT * FROM Clinicas;
SELECT
IdConsulta,
IdVeterinario,
IdPet,
FORMAT(Valor, 'c', 'pt-br') as Valor,
DataDaConsulta,
Descricao
FROM Consultas;
-- Todos os veterinrios de uma clnica especfica
SELECT
Clinicas.Nome AS Clinica,
Veterinarios.Nome AS [Veterinrio],
CRMV
FROM Clinicas
INNER JOIN Veterinarios
ON Clinicas.IdClinica = Veterinarios.IdClinica
WHERE Clinicas.Nome LIKE '%Dr.Pol';
-- Todas as raas que comeam com a letra 'S'
SELECT * FROM Racas
WHERE Raca LIKE 'P%';
-- Todos os tipos de pet que terminam com a letra 'O'
SELECT * FROM TiposDePet
WHERE Tipo LIKE '%o'
-- Todos os pets e seus respectivos donos
SELECT Donos.Nome AS Dono, Pets.Nome AS Pet FROM Donos
INNER JOIN Pets
ON Donos.IdDono = Pets.IdDono;
-- listar todos os atendimentos mostrando o nome do veterinrio que atendeu, o nome, a raa e o tipo do pet que foi atendido, o nome do dono do pet e o nome da clnica onde o pet foi atendido | true |
b2145718316a0d1d6a4127f3f0863cd8bea38d0d | SQL | williamHardyProjects/TechElevatorWork | /module-2/03_Joins/student-exercise/postgres/joins-exercises.sql | UTF-8 | 8,260 | 3.78125 | 4 | [] | no_license | -- The following queries utilize the "dvdstore" database.
-- 1. All of the films that Nick Stallone has appeared in
-- (30 rows)
SELECT concat(a.first_name, ' ', a.last_name) AS actor_name
, f.*
FROM actor AS a
INNER JOIN film_actor AS fm
ON a.actor_id = fm.actor_id
INNER JOIN film AS f
ON fm.film_id = f.film_id
WHERE first_name = 'NICK'
AND last_name = 'STALLONE';
-- 2. All of the films that Rita Reynolds has appeared in
-- (20 rows)
SELECT CONCAT(a.first_name, ' ', a.last_name) AS actor_name
, f.*
FROM actor AS a
INNER JOIN film_actor AS fm
ON a.actor_id = fm.actor_id
INNER JOIN film AS f
ON fm.film_id = f.film_id
WHERE a.first_name = 'RITA'
AND a.last_name = 'REYNOLDS';
-- 3. All of the films that Judy Dean or River Dean have appeared in
-- (46 rows)
SELECT CONCAT(a.first_name, ' ', a.last_name) AS actor_name
, f.*
FROM actor AS a
INNER JOIN film_actor AS fm
ON a.actor_id = fm.actor_id
INNER JOIN film AS f
ON fm.film_id = f.film_id
WHERE (a.first_name = 'JUDY'
OR a.first_name = 'RIVER')
AND a.last_name = 'DEAN';
-- 4. All of the the ‘Documentary’ films
-- (68 rows)
SELECT c.name AS genre
, f.*
FROM category AS c
INNER JOIN film_category AS fc
ON c.category_id = fc.category_id
INNER JOIN film AS f
ON fc.film_id = f.film_id
WHERE c.name = 'Documentary';
-- 5. All of the ‘Comedy’ films
-- (58 rows)
SELECT c.name AS genre
, f.*
FROM category AS c
INNER JOIN film_category AS fc
ON c.category_id = fc.category_id
INNER JOIN film AS f
ON fc.film_id = f.film_id
WHERE c.name = 'Comedy';
-- 6. All of the ‘Children’ films that are rated ‘G’
-- (10 rows)
SELECT c.name AS genre
, f.*
FROM category AS c
INNER JOIN film_category AS fc
ON c.category_id = fc.category_id
INNER JOIN film AS f
ON fc.film_id = f.film_id
WHERE c.name = 'Children'
AND f.rating = 'G';
-- 7. All of the ‘Family’ films that are rated ‘G’ and are less than 2 hours in length
-- (3 rows)
SELECT c.name AS genre
, f.*
FROM category AS c
INNER JOIN film_category AS fc
ON c.category_id = fc.category_id
INNER JOIN film AS f
ON fc.film_id = f.film_id
WHERE c.name = 'Family'
AND f.length < 120
AND f.rating = 'G';
-- 8. All of the films featuring actor Matthew Leigh that are rated ‘G’
-- (9 rows)
SELECT CONCAT(a.first_name, ' ', a.last_name) AS actor_name
, f.*
FROM actor AS a
INNER JOIN film_actor AS fa
ON a.actor_id = fa.actor_id
INNER JOIN film AS f
ON fa.film_id = f.film_id
WHERE a.first_name = 'MATTHEW'
AND a.last_name = 'LEIGH'
AND f.rating = 'G';
-- 9. All of the ‘Sci-Fi’ films released in 2006
-- (61 rows)
SELECT c.name
, f.*
FROM category AS c
INNER JOIN film_category AS fc
ON c.category_id = fc.category_id
INNER JOIN film AS f
ON fc.film_id = f.film_id
WHERE c.name = 'Sci-Fi'
AND f.release_year = 2006;
-- 10. All of the ‘Action’ films starring Nick Stallone
-- (2 rows)
SELECT CONCAT(a.first_name, ' ', a.last_name) AS actor_name
, c.name AS genre
, f.*
FROM actor AS a
INNER JOIN film_actor AS fa
ON a.actor_id = fa.actor_id
INNER JOIN film AS f
ON fa.film_id = f.film_id
INNER JOIN film_category AS fc
ON f.film_id = fc.film_id
INNER JOIN category AS c
ON fc.category_id = c.category_id
WHERE a.first_name = 'NICK'
AND a.last_name = 'STALLONE'
AND c.name = 'Action';
-- 11. The address of all stores, including street address, city, district, and country
-- (2 rows)
SELECT a.address
, c.city
, a.district
, cy.country
FROM store AS s
INNER JOIN address AS a
ON s.address_id = a.address_id
INNER JOIN city AS c
ON a.city_id = c.city_id
INNER JOIN country AS cy
ON c.country_id = cy.country_id;
-- 12. A list of all stores by ID, the store’s street address, and the name of the store’s manager
-- (2 rows)
SELECT s.store_id
, a.address
, CONCAT(sf.first_name, ' ', sf.last_name) AS manager_name
FROM store AS s
INNER JOIN address AS a
ON s.address_id = a.address_id
INNER JOIN staff AS sf
ON s.manager_staff_id = sf.staff_id;
-- 13. The first and last name of the top ten customers ranked by number of rentals
-- (#1 should be “ELEANOR HUNT” with 46 rentals, #10 should have 39 rentals)
SELECT cr.first_name
, cr.last_name
, COUNT(r.rental_id) AS rental_count
FROM rental AS r
INNER JOIN customer AS cr
ON r.customer_id = cr.customer_id
GROUP BY r.customer_id, cr.first_name, cr.last_name
ORDER BY rental_count DESC
LIMIT 10;
-- 14. The first and last name of the top ten customers ranked by dollars spent
-- (#1 should be “KARL SEAL” with 221.55 spent, #10 should be “ANA BRADLEY” with 174.66 spent)
SELECT CONCAT(c.first_name, ' ', c.last_name)
, sum(p.amount) AS total_payment
FROM payment AS p
INNER JOIN customer AS c
ON p.customer_id = c.customer_id
GROUP BY p.customer_id, c.first_name, c.last_name
ORDER BY total_payment DESC
LIMIT 10;
-- 15. The store ID, street address, total number of rentals, total amount of sales (i.e. payments), and average sale of each store.
-- (NOTE: Keep in mind that an employee may work at multiple stores.)
-- (Store 1 has 7928 total rentals and Store 2 has 8121 total rentals)
SELECT s.store_id
, COUNT(r.rental_id) AS total_rentals
, SUM(p.amount) AS total_sales
, AVG(p.amount) AS avg_sales
FROM store AS s
INNER JOIN inventory AS i
ON s.store_id = i.store_id
INNER JOIN rental AS r
ON i.inventory_id = r.inventory_id
INNER JOIN payment AS p
ON r.rental_id = p.rental_id
INNER JOIN staff AS sf
ON r.staff_id = sf.staff_id
INNER JOIN address AS a
ON sf.address_id = a.address_id
GROUP BY s.store_id;
-- 16. The top ten film titles by number of rentals
-- (#1 should be “BUCKET BROTHERHOOD” with 34 rentals and #10 should have 31 rentals)
SELECT f.title
, COUNT(r.rental_id) AS rental_count
FROM film AS f
INNER JOIN inventory AS i
ON f.film_id = i.film_id
INNER JOIN rental AS r
ON i.inventory_id = r.inventory_id
GROUP BY f.film_id
ORDER BY rental_count DESC
LIMIT 10;
-- 17. The top five film categories by number of rentals
-- (#1 should be “Sports” with 1179 rentals and #5 should be “Family” with 1096 rentals)
SELECT c.name
, COUNT(r.rental_id) AS rental_count
FROM category AS c
INNER JOIN film_category AS fc
ON c.category_id = fc.category_id
INNER JOIN film AS f
ON fc.film_id = f.film_id
INNER JOIN inventory AS i
ON f.film_id = i.film_id
INNER JOIN rental AS r
ON i.inventory_id = r.inventory_id
GROUP BY c.name
ORDER BY rental_count DESC
LIMIT 5;
-- 18. The top five Action film titles by number of rentals
-- (#1 should have 30 rentals and #5 should have 28 rentals)
SELECT f.title
, COUNT(r.rental_id) AS rental_count
FROM category AS c
INNER JOIN film_category AS fc
ON c.category_id = fc.category_id
INNER JOIN film AS f
ON fc.film_id = f.film_id
INNER JOIN inventory AS i
ON f.film_id = i.film_id
INNER JOIN rental AS r
ON i.inventory_id = r.inventory_id
WHERE c.name = 'Action'
GROUP BY f.film_id, f.title
ORDER BY rental_count DESC
LIMIT 5;
-- 19. The top 10 actors ranked by number of rentals of films starring that actor
-- (#1 should be “GINA DEGENERES” with 753 rentals and #10 should be “SEAN GUINESS” with 599 rentals)
SELECT CONCAT(a.first_name, ' ', a.last_name)
, COUNT(r.rental_id) AS rental_count
FROM actor AS a
INNER JOIN film_actor AS fa
ON a.actor_id = fa.actor_id
INNER JOIN film AS f
ON fa.film_id = f.film_id
INNER JOIN inventory AS i
ON f.film_id = i.film_id
INNER JOIN rental AS r
ON i.inventory_id = r.inventory_id
INNER JOIN payment AS p
ON r.rental_id = p.rental_id
GROUP BY a.actor_id, a.first_name, a.last_name
ORDER BY rental_count DESC
LIMIT 10;
-- 20. The top 5 “Comedy” actors ranked by number of rentals of films in the “Comedy” category starring that actor
-- (#1 should have 87 rentals and #5 should have 72 rentals)
SELECT
FROM category AS c
INNER JOIN film_category AS fc
ON c.category_id = fc.category_id
INNER JOIN film AS f
ON fc.film_id = f.film_id
INNER JOIN inventory AS i
ON f.inventory_id = i.inventory_id
INNER JOIN rental AS r
ON i.inventory_id = r.inventory_id
WHERE c.name = 'Comedy' | true |
1a50410a0fa90c18ebbd411c995a6a9f45eb3506 | SQL | erinmayg/CS3223-project | /isaac/query1.sql | UTF-8 | 169 | 2.734375 | 3 | [] | no_license | SELECT EMPLOYEES.eid,EMPLOYEES.ename,CERTIFIED.eid,CERTIFIED.aid,EMPLOYEES.salary
FROM EMPLOYEES,CERTIFIED
WHERE EMPLOYEES.eid=CERTIFIED.eid,EMPLOYEES.eid=CERTIFIED.eid
| true |
ee1161a6cb0d268e71c43eb98d617fe229c02d85 | SQL | suda-amir/AMC | /Databases/amc.sql | UTF-8 | 3,742 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 14, 2017 at 09:17 PM
-- Server version: 10.1.25-MariaDB
-- PHP Version: 7.1.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `amc`
--
-- --------------------------------------------------------
--
-- Table structure for table `admin_info`
--
CREATE TABLE `admin_info` (
`username` varchar(256) NOT NULL,
`passsword` varchar(256) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `admin_info`
--
INSERT INTO `admin_info` (`username`, `passsword`) VALUES
('principal', 'sit');
-- --------------------------------------------------------
--
-- Table structure for table `attendance_record`
--
CREATE TABLE `attendance_record` (
`subject` varchar(256) NOT NULL,
`class` varchar(256) NOT NULL,
`division` varchar(10) NOT NULL,
`date` date NOT NULL,
`count` int(10) NOT NULL,
`attend_array` varchar(100) NOT NULL,
`lesson_plan` text NOT NULL,
`teacher` varchar(256) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `attendance_record`
--
INSERT INTO `attendance_record` (`subject`, `class`, `division`, `date`, `count`, `attend_array`, `lesson_plan`, `teacher`) VALUES
('SDL', 'TE', 'B', '2017-09-14', 1, '50', '<p><strong>Oh teacher please.</strong></p>\r\n', 'Prashant Dongre');
-- --------------------------------------------------------
--
-- Table structure for table `student`
--
CREATE TABLE `student` (
`prn_no` varchar(256) NOT NULL,
`name` varchar(256) NOT NULL,
`acad_year` varchar(256) NOT NULL,
`branch` varchar(256) NOT NULL,
`college` varchar(256) NOT NULL,
`mobile_number` varchar(256) NOT NULL,
`password` varchar(256) NOT NULL,
`division` varchar(256) NOT NULL,
`roll` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `student`
--
INSERT INTO `student` (`prn_no`, `name`, `acad_year`, `branch`, `college`, `mobile_number`, `password`, `division`, `roll`) VALUES
('71617790m', 'kevin modi', 'TE', 'Computer Enginerring', 'LOL', '9662244182', 'root', 'B', 12),
('71617840m', 'kashyap shroff', 'TE', 'Computer Enginerring', 'LOL', '9730470070', 'root', 'B', 5),
('71617850m', 'divya', 'TE', 'Computer Enginerring', 'SIT', '7845129630', 'root', 'C', 20),
('77777777m', 'sudarshan', 'TE', 'Computer Enginerring', 'SIT', '7418529630', 'root', 'B', 50);
-- --------------------------------------------------------
--
-- Table structure for table `teacher_info`
--
CREATE TABLE `teacher_info` (
`username` varchar(256) NOT NULL,
`password` varchar(256) NOT NULL,
`teacher_name` varchar(256) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `teacher_info`
--
INSERT INTO `teacher_info` (`username`, `password`, `teacher_name`) VALUES
('prashant', 'root', 'Prashant Dongre');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `admin_info`
--
ALTER TABLE `admin_info`
ADD PRIMARY KEY (`username`);
--
-- Indexes for table `student`
--
ALTER TABLE `student`
ADD PRIMARY KEY (`prn_no`),
ADD UNIQUE KEY `mobile_number` (`mobile_number`);
--
-- Indexes for table `teacher_info`
--
ALTER TABLE `teacher_info`
ADD PRIMARY KEY (`username`);
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
| true |
8172f8402ca02efff52beaf114e6b6051356ac54 | SQL | kmh5500/homepage | /webtest/WebContent/WEB-INF/sql/news.sql | UTF-8 | 1,333 | 3.453125 | 3 | [] | no_license | DROP TABLE news;
CREATE TABLE news(
newsno INT NOT NULL,
title VARCHAR(100) NOT NULL,
media VARCHAR(50) NOT NULL,
author VARCHAR(30) NOT NULL,
rdate DATE NOT NULL,
PRIMARY KEY(newsno)
);
INSERT INTO news(newsno, title, media, author, rdate)
VALUES(1, 'MS, 2016년 구형 IE 브라우저 지원 중단', 'ZDNet', '가길동', sysdate);
SELECT newsno, title, media, author, rdate FROM news;
-- MySQL 가능
INSERT INTO news(newsno, title, media, author, rdate)
VALUES(1, "MS, 2016년 구형 'IE' 브라우저 지원 중단", 'ZDNet', '가길동', sysdate);
-- MySQL 가능
INSERT INTO news(newsno, title, media, author, rdate)
VALUES(1, 'MS, 2016년 구형 \'IE\' 브라우저 지원 중단', 'ZDNet', '가길동', sysdate);
-- Oracle, single quotation의 추가
INSERT INTO news(newsno, title, media, author, rdate)
VALUES(2, 'MS, 2016년 구형 ''IE'' 브라우저 지원 중단', 'ZDNet', '가길동', sysdate);
SELECT newsno, title, media, author, rdate FROM news;
-- Oracle, double quotation의 추가
INSERT INTO news(newsno, title, media, author, rdate)
VALUES(3, '"차량 막무가내 견인한 뒤 요금 과다청구 많아"', '연합뉴스', '가길동', sysdate);
SELECT newsno, title, media, author, rdate FROM news;
| true |
c697cb5264a3f1ec8d00c8619887d544b8d8269d | SQL | vijaydairyf/TimelyFish | /SolomonApp/dbo/Stored Procedures/dbo.ADG_UpdateSOSchedPriority.sql | UTF-8 | 527 | 2.75 | 3 | [] | no_license | CREATE PROCEDURE ADG_UpdateSOSchedPriority
@CpnyID varchar(10),
@OrdNbr varchar(15),
@LineRef varchar(5),
@SchedRef varchar(5),
@PrioritySeq int,
@LUpd_Prog varchar(8),
@LUpd_User varchar(10)
AS
update SOSched
set PrioritySeq = @PrioritySeq,
LUpd_DateTime = GETDATE(),
LUpd_Prog = @LUpd_Prog,
LUpd_User = @LUpd_User
where CpnyID = @CpnyID
and OrdNbr = @OrdNbr
and LineRef = @LineRef
and SchedRef = @SchedRef
-- Copyright 1998 by Advanced Distribution Group, Ltd. All rights reserved.
| true |
7e8db6c0b3e2aaaac0851ba432ae54a7ecf43e09 | SQL | manoel-ats/atsfinanceiro | /script/sp_contas_pagas.sql | UTF-8 | 1,892 | 3.359375 | 3 | [] | no_license | ALTER PROCEDURE SP_CONTAS_PAGAS (
DTAINI Date,
DTAFIM Date,
COD_FOR Integer,
COD_CCUSTO Smallint,
COD_CONTA Integer,
COD_CAIXA Smallint )
RETURNS (
DTAEMISSAO Date,
DTAPAGTO Date,
CODFORN Integer,
FORNECEDOR Varchar(60),
DESCRICAO Varchar(150),
VALORTIT Double precision,
VALORPAGO Double precision,
CONTACONTABIL Varchar(200),
CAIXA Varchar(60),
CODCONTA Varchar(15) )
AS
DECLARE VARIABLE CCAIXA INTEGER;
DECLARE VARIABLE CCONTABIL INTEGER;
DECLARE VARIABLE N_TITULO VARCHAR(15);
BEGIN
/* Lista os pagamentos efetuados */
FOR SELECT pag.EMISSAO, pag.DATAPAGAMENTO, pag.CODFORNECEDOR, CAST(pag.CODFORNECEDOR AS VARCHAR(5)) || '-' || forn.NOMEFORNECEDOR,
pag.HISTORICO, pag.VALORTITULO, (pag.VALORRECEBIDO + pag.JUROS + pag.FUNRURAL) as VR, pag.CONTACREDITO,pag.CAIXA, pag.TITULO
FROM PAGAMENTO pag, FORNECEDOR forn where forn.CODFORNECEDOR = pag.CODFORNECEDOR
and (pag.DATAPAGAMENTO BETWEEN :DTAINI AND :DTAFIM) and (pag.STATUS = '7-')
and ((pag.CODFORNECEDOR = :cod_for) or (:cod_for = 9999999))
and ((pag.CODALMOXARIFADO = :COD_CCUSTO) or (:COD_CCUSTO = 0))
and ((pag.CONTACREDITO = :COD_CONTA) or (:COD_CONTA = 9999999))
and ((pag.CAIXA = :COD_CAIXA) or (:COD_CAIXA = 0))
order by pag.datapagamento
INTO :DTAEMISSAO, :DTAPAGTO, :CODFORN, :FORNECEDOR, :DESCRICAO, :VALORTIT, :VALORPAGO, :CCONTABIL, :CCAIXA, :N_TITULO
DO BEGIN
SELECT SUM(VALOR_PRIM_VIA) FROM PAGAMENTO WHERE TITULO = :N_TITULO AND CODFORNECEDOR = :CODFORN
INTO :VALORTIT;
SELECT NOME, CODREDUZIDO FROM PLANO WHERE CODIGO = :CCONTABIL
INTO :CONTACONTABIL, :CODCONTA;
CONTACONTABIL = CODCONTA || '-' || CONTACONTABIL;
SELECT NOME FROM PLANO WHERE CODIGO = :CCAIXA
INTO :CAIXA;
SUSPEND;
contacontabil = null;
descricao = null;
ccontabil = null;
caixa = null;
END
END | true |
b9121ce73d2aade2d596389e33192c53a59d9b8c | SQL | GustavoBorges-tec/bancodados | /bdinfox.sql | UTF-8 | 2,261 | 3.734375 | 4 | [
"MIT"
] | permissive | /*
informações sobre usuário
@author Gustavo Borges
*/
-- Pesquisar bancos de dados disponíveis
show databases;
-- Criando um banco de dados
create database dbinfox;
show databases;
-- Remover um banco de dados
drop database dbinfox;
-- Selecionar o banco de dados
use dbinfox;
-- Criando uma tabela no baco de dados
create table usuarios(
id int primary key auto_increment,
usuario varchar(50) not null,
login varchar(10) not null unique,
senha varchar(10)
);
describe usuarios;
-- Verificar tabelas disponíveis no banco
show tables;
insert into usuarios (usuario, login, senha)
values ('Gustavo','admin','1234');
alter table usuarios modify senha varchar(250);
alter table usuarios modify login varchar(50);
-- Armazenando um campo com criptografia
insert into usuarios(usuario, login, senha)
values ('Bruce','bruce@usuario',md5('12345'));
insert into usuarios(usuario, login, senha)
values ('Mario','mario@usuario',md5('12345'));
insert into usuarios(usuario, login, senha)
values ('Alef','alef@usuario',md5('12345'));
insert into usuarios(usuario, login, senha)
values ('Banner','banner@usuario',md5('12345'));
insert into usuarios(usuario, login, senha)
values ('Chris','chris@usuario',md5('12345'));
select * from usuarios;
-- comando usado para remover uma tabela
drop table usuarios;
-- Tabela de clientes (clientes da assistência técnica)
create table clientes(
idcli int primary key auto_increment,
nome varchar(50) not null,
fone varchar(15) not null
);
describe clientes;
-- Tabela de ordem de serviços
create table tbOs(
os int primary key auto_increment,
equipamento varchar (250) not null,
defeito varchar (250) not null,
dataOs timestamp default current_timestamp,
statusOs varchar (50) not null,
valor decimal (10,2) not null,
idcli int not null,
foreign key(idcli) references clientes (idcli)
);
insert into clientes (nome,fone) values('Kelly Cristina','31256-2222');
insert into clientes (nome,fone) values('José de Assis','91234-1111');
insert into tbOs(equipamento,defeito,statusOs,valor,idcli)
values('Notebook Lenovo modelo','Não liga','Orçamento',80,1);
insert into tbOs(equipamento,defeito,statusOs,valor,idcli)
values('PC Positivo','Formatação do Windows','Aprovado',80,2);
select * from tbOs;
select * from clientes;
| true |
e186f16304842b08d016a56c56a25ed84aa6fc6d | SQL | JackDan9/miniProgram | /better_work_data/better_work_data/docs/sql/table/create/token.sql | UTF-8 | 446 | 2.625 | 3 | [
"MIT"
] | permissive | CREATE TABLE `system_tokens` (
`id` INT(11) NOT NULL AUTO_INCREMENT COMMENT "序号",
`uid` VARCHAR(36) NOT NULL COMMENT "用户UUID",
`access_token` VARCHAR(64) NOT NULL COMMENT "2小时的Token",
`refresh_token` VARCHAR(64) NOT NULL COMMENT "7天的Token",
`created_at` datetime DEFAULT NULL COMMENT '创建时间',
`updated_at` datetime DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY(`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | true |
06eb72a67456b700a6bdb2041b5fe19f2b4bf256 | SQL | abdouthetif/Shop-PHP-exercice | /migrations/shop.sql | UTF-8 | 10,004 | 2.6875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1
-- Généré le : mer. 02 déc. 2020 à 17:29
-- Version du serveur : 10.4.14-MariaDB
-- Version de PHP : 7.4.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Base de données : `shop`
--
-- --------------------------------------------------------
--
-- Structure de la table `categories`
--
CREATE TABLE `categories` (
`id` int(11) NOT NULL,
`label` varchar(100) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Déchargement des données de la table `categories`
--
INSERT INTO `categories` (`id`, `label`) VALUES
(1, 'Céramique'),
(2, 'Bijoux'),
(3, 'Décorations'),
(4, 'Jouets'),
(5, 'Vêtements');
-- --------------------------------------------------------
--
-- Structure de la table `comments`
--
CREATE TABLE `comments` (
`id` int(11) NOT NULL,
`content` text COLLATE utf8_unicode_ci NOT NULL,
`createdAt` datetime NOT NULL,
`product_id` int(11) NOT NULL,
`title` text COLLATE utf8_unicode_ci NOT NULL,
`rating` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Déchargement des données de la table `comments`
--
INSERT INTO `comments` (`id`, `content`, `createdAt`, `product_id`, `title`, `rating`) VALUES
(1, ' lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum', '2020-12-01 23:49:27', 1, 'Lorem Ipsum', 5),
(2, 'lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum', '2020-12-01 23:55:35', 1, 'Lorem Ipsum', 1),
(3, 'aezarte ygvuhijo ubghnj guyhij oiugyhiujo iguyhijoi yuhiojp red tr xdctfvyg rdtcfyv df gedtrfy tgtfygu trfyug es(r tuy ygubn rytu yuryt urftugy hurytug iryftguy tryfguy tryftguyh tguyhiu ', '2020-12-02 14:47:33', 1, 'earzthzjr', 4),
(4, 'fgrqhteryjetukrilèçp zraghteyjzèki-_opçà ebzrhynjuetkièlo ebzthryju-kilàm bghnjukilo vfbgnhyejtukièl cxwvbnxv, a\'ta(y-uèiop fghdjklm aretzyuri qfghs wbnxcnbsdg gqhn,ei;o: hnjuikol xscdvfbt', '2020-12-02 14:55:59', 1, 'dsfgqhjk', 2),
(5, 'aertyjuk', '2020-12-02 17:26:26', 1, 'azerty', 5);
-- --------------------------------------------------------
--
-- Structure de la table `creators`
--
CREATE TABLE `creators` (
`id` int(11) NOT NULL,
`shop_name` varchar(100) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Déchargement des données de la table `creators`
--
INSERT INTO `creators` (`id`, `shop_name`) VALUES
(1, 'Histoire d\'Or'),
(2, 'Ceramika'),
(3, 'Art & Déco'),
(4, 'Toys\'R\'Us'),
(5, 'Jules');
-- --------------------------------------------------------
--
-- Structure de la table `pictures`
--
CREATE TABLE `pictures` (
`id` int(11) NOT NULL,
`product_id` int(11) NOT NULL,
`picture_1` text COLLATE utf8_unicode_ci NOT NULL,
`picture_2` text COLLATE utf8_unicode_ci NOT NULL,
`picture_3` text COLLATE utf8_unicode_ci NOT NULL,
`picture_4` text COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Déchargement des données de la table `pictures`
--
INSERT INTO `pictures` (`id`, `product_id`, `picture_1`, `picture_2`, `picture_3`, `picture_4`) VALUES
(1, 1, 'montre_lacoste.jpg', 'montre_festina.jpg', 'doudoune_jules.jpg', ''),
(2, 2, 'montre_festina.jpg', '', '', ''),
(3, 3, 'doudoune_jules.jpg', '', '', '');
-- --------------------------------------------------------
--
-- Structure de la table `products`
--
CREATE TABLE `products` (
`id` int(11) NOT NULL,
`name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`description` text COLLATE utf8_unicode_ci NOT NULL,
`picture` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`price` double NOT NULL,
`stock` smallint(6) NOT NULL,
`category_id` int(11) NOT NULL,
`creator_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Déchargement des données de la table `products`
--
INSERT INTO `products` (`id`, `name`, `description`, `picture`, `price`, `stock`, `category_id`, `creator_id`) VALUES
(1, 'Montre Lacoste 12.12 Noir', 'Montre Lacoste 12.12 Resine Noire Ronde Quartz 42mm Fond Noir Bracelet Silicone Noir', 'montre_lacoste.jpg', 99, 185, 2, 1),
(2, 'Montre Festina Timeless Chronograph Bleu', 'Montre Festina Timeless Chronograph Acier Blanc Ronde Quartz Chronographe 42mm Fond Bleu Bracelet Acier Blanc', 'montre_festina.jpg', 149, 89, 2, 1),
(3, 'Doudoune réversible et réflechissante - Gris Clair', 'Isolante, chaude et légère, cette doudoune réversible à capuche dispose d\'une face unie et d\'une face entièrement réflechissante. Pratique, elle dispose de deux poches zippées sur chaque face. \r\nBase, bords de manche et fermeture zippée finition biais contrasté', 'doudoune_jules.jpg', 70, 236, 5, 5),
(4, 'Bonnet bicolore - Gris Fantaisie', 'La mode urbaine s\'est répandue dans nos dressings masculins pour proposer des vêtements adaptés à toute situation et à chaque style d\'homme. \r\nCet hiver, on adopte donc sans hésiter ce bonnet homme, que l\'on soit féru du style chic ou du style sportswear. Ce bonnet est parfait sur tous vos looks !', 'bonnet_jules.jpg', 16, 152, 5, 5),
(5, 'Table d\'appoint Art Déco Jean ', 'Table d\'appoint Bubinga ronde aux éléments raffinés ! Un produit de haute qualité...\r\nLa pièce a une intarsia en ébène en forme de petits carrés récurrents et un cercle. Les caractéristiques de l\'aluminium confèrent à cette œuvre d\'art un attrait extra vif.', 'table_artdeco.jpg', 1400, 35, 3, 3),
(6, 'Cabinet Fiftie ', 'Cette armoire fait un oeil sur les années 50. Jetez un coup d\'œil aux larges pieds de table et au plateau de couleur claire. Cependant, il ne s\'agit certainement pas d\'un article fabriqué en série : la combinaison de différentes essences de bois comme le chêne, l\'acajou et le bouleau en fait un meuble exclusif. Plus encore si l\'on regarde la partie décorée au milieu et les poignées assorties avec style.', 'cabinet_artdeco.jpg', 2100, 26, 3, 3),
(7, 'Fauteuil Roaring Twenties ', 'Mobilier Art Déco audacieux. Peut être commandé comme fauteuil, 2 places, 3 places ou canapé 4 places. Recouvert de Uni, Manchester, Cuir ou Tissu de votre choix. L\'ensemble est orné de passepoils noirs, de passepoils en cuir ou de passepoils dans la couleur du tissu/cuir choisi.', 'fauteuil_artdeco.jpg', 800, 68, 3, 3),
(8, 'Chariot design ', 'Cette armoire métallique sur roulettes peut être facilement déplacée et constitue une charmante table d\'appoint. Le chariot classique peut être commandé dans toutes les couleurs RAL.\r\nIncroyablement bien adapté pour recevoir un écran plat ou un équipement audio.', 'chariot_artdeco.jpg', 1855, 43, 3, 3),
(9, 'Écharpe rayures - Noir/Blanc', 'Echarpe homme en maille ligne multicolores noir et blanc', 'echarpe_jules.jpg', 46, 173, 5, 5),
(10, 'Montre Maserati Successo Marron ', 'Montre Maserati Successo Acier Dore Ronde Quartz Chronographe 44mm Fond Marron Bracelet Cuir Marron', 'montre_maserati.jpg', 179, 126, 2, 1);
--
-- Index pour les tables déchargées
--
--
-- Index pour la table `categories`
--
ALTER TABLE `categories`
ADD PRIMARY KEY (`id`);
--
-- Index pour la table `comments`
--
ALTER TABLE `comments`
ADD PRIMARY KEY (`id`),
ADD KEY `product_id` (`product_id`);
--
-- Index pour la table `creators`
--
ALTER TABLE `creators`
ADD PRIMARY KEY (`id`);
--
-- Index pour la table `pictures`
--
ALTER TABLE `pictures`
ADD PRIMARY KEY (`id`),
ADD KEY `product_id` (`product_id`);
--
-- Index pour la table `products`
--
ALTER TABLE `products`
ADD PRIMARY KEY (`id`),
ADD KEY `category_id` (`category_id`),
ADD KEY `creator_id` (`creator_id`);
--
-- AUTO_INCREMENT pour les tables déchargées
--
--
-- AUTO_INCREMENT pour la table `categories`
--
ALTER TABLE `categories`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT pour la table `comments`
--
ALTER TABLE `comments`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT pour la table `creators`
--
ALTER TABLE `creators`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT pour la table `pictures`
--
ALTER TABLE `pictures`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT pour la table `products`
--
ALTER TABLE `products`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
| true |
df5c6121be6c13d7a63b21d508bd0e1bc447b174 | SQL | fredyns/ppjk | /development/dbchangelog/201703120955_add-companyType.sql | UTF-8 | 299 | 2.875 | 3 | [
"BSD-3-Clause"
] | permissive |
CREATE TABLE IF NOT EXISTS `companyType` (
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`name` VARCHAR(32) NOT NULL,
PRIMARY KEY (`id`))
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;
ALTER TABLE `companyProfile`
ADD COLUMN `companyType_id` INT(10) UNSIGNED NULL DEFAULT NULL AFTER `name`;
| true |
73390592bf54068ebe59c7e7d552e7a4689d2c12 | SQL | LeonVA/it-ausleihe | /docs/it-ausleihe.sql | UTF-8 | 1,506 | 3.109375 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Erstellungszeit: 19. Feb 2019 um 09:24
-- Server-Version: 10.1.28-MariaDB
-- PHP-Version: 7.1.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Datenbank: `it-ausleihe`
--
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `device`
--
CREATE TABLE `device` (
`deviceID` varchar(6) NOT NULL COMMENT 'ID of the device',
`name` varchar(40) NOT NULL COMMENT 'Name of the device',
`type` varchar(10) NOT NULL COMMENT 'Type of the device',
`brand` varchar(20) NOT NULL COMMENT 'Brand of the device',
`qrCode` int(1) NOT NULL COMMENT 'QR-Code of the device',
`link` varchar(255) NOT NULL COMMENT 'Link to information about the device'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Table contains data of devices';
--
-- Indizes der exportierten Tabellen
--
--
-- Indizes für die Tabelle `device`
--
ALTER TABLE `device`
ADD PRIMARY KEY (`deviceID`);
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
| true |
1d9600f8e69ead5fe1a84893454d832d5aa8a861 | SQL | complitex/flexpay | /eirc/etc/sql/update/2008_04_23.sql | UTF-8 | 902 | 3.6875 | 4 | [] | no_license | create table eirc_sp_registry_statuses_tbl (
id bigint not null auto_increment,
code integer not null unique,
primary key (id)
);
create table eirc_sp_registry_archive_statuses_tbl (
id bigint not null auto_increment,
code integer not null unique,
primary key (id)
);
alter table eirc_sp_registries_tbl
ADD COLUMN registry_status_id bigint not null;
ADD COLUMN archive_status_id bigint not null;
alter table eirc_sp_registries_tbl
add index FK8F6F495212E06FB1 (registry_status_id),
add constraint FK8F6F495212E06FB1
foreign key (registry_status_id)
references eirc_sp_registry_statuses_tbl (id);
alter table eirc_sp_registries_tbl
add index FK8F6F49524B0FEDC6 (archive_status_id),
add constraint FK8F6F49524B0FEDC6
foreign key (archive_status_id)
references eirc_sp_registry_archive_statuses_tbl (id); | true |
717384ea63a87a67145f0e185009eed9d2b6dddb | SQL | VictorAlmeidaLima/Lifesys | /SQL/De_Para_Campos/MODULO_CONTRATO.SQL | UTF-8 | 1,179 | 3.40625 | 3 | [] | no_license | /*
MODULOS_CONTRATO
Layout: Arquivo txt de largura fixa
Arquivo de Importação: MODULOS_CONTRATO
Descrição: Listagem de módulos contratados (vinculo entre contrato e módulo)
Listagem de Campos:
CODPROD
Nome: COD_MODULO - Tipo: INTEGER - Tamanho: 4 - Preenchimento Obrigatório -
COD_EXT
Nome: CLIENTE - Tipo: INTEGER - Tamanho: 4 - Preenchimento Obrigatório -
AD_IDENTIFICACAO - TCSPSC
Está escrito em JS porem não bate com o calculo realizado no sistema de atendimento
Nome: COD_IDENTIFICACAO - Tipo: VARCHAR - Tamanho: 15 - -
--branco
Nome: NUM_HD - Tipo: VARCHAR - Tamanho: 10 - -
--Qtd. Prevista:
Nome: QUANTIDADE - Tipo: INTEGER - Tamanho: 4 - - --qtd modulos que o cliente contratou
--branco
Nome: MAC - Tipo: VARCHAR - Tamanho: 20 - -
--Número de usuários:
Nome: QUANT_USUARIOS - Tipo: INTEGER - Tamanho: 4 - -
Obs.: Os campos devem vir na ordem em que foram apresentados acima.
*/
SELECT
PSC.CODPROD AS COD_MODULO,
CON.CODPARC AS CLIENTE,
PSC.AD_IDENTIFICACAO AS COD_IDENTIFICACAO,
'NUM_HD' AS NUM_HD,
PSC.QTDEPREVISTA AS QUANTIDADE,
'MAC' AS MAC,
PSC.NUMUSUARIOS,
FROM TCSPSC PSC
INNER JOIN TCSCON CON ON PSC.NUMCONTRATO = CON.NUMCONTRATO | true |
6b0389ace829d6cf2f86c3e53024451416379358 | SQL | fsindustry/mynote | /01_oracle/02 resource/SQL练习.sql | GB18030 | 3,367 | 3.78125 | 4 | [] | no_license | CREATE PROCEDURE CHANGE_SAL(emp_name VARCHAR2 , new_sal Number) IS
BEGIN
UPDATE emp SET sal=new_sal
WHERE ename=emp_name;
END CHANGE_SAL;
CREATE OR REPLACE FUNCTION CAL_ANNUAL_SAL(empname VARCHAR2)
--ֵ
RETURN NUMBER IS
--洢нֵ
annual_sal NUMBER(7,2);
BEGIN --ִв
SELECT (sal+NVL(comm,0))*12 INTO annual_sal
FROM emp
WHERE ename=empname;
RETURN annual_sal;
END CAL_ANNUAL_SAL;
/
--淶
CREATE PACKAGE EMP_TOOL_PACKAGE IS
--̵
PROCEDURE CHANGE_SAL(emp_name VARCHAR2 , new_sal Number);
FUNCTION CAL_ANNUAL_SAL(empname VARCHAR2) RETURN NUMBER;
END EMP_TOOL_PACKAGE;
/
--
CREATE PACKAGE BODY EMP_TOOL_PACKAGE IS
--̵ʵ
PROCEDURE CHANGE_SAL(emp_name VARCHAR2 , new_sal Number) IS
BEGIN
UPDATE emp SET sal=new_sal
WHERE ename=emp_name;
END CHANGE_SAL;
FUNCTION CAL_ANNUAL_SAL(empname VARCHAR2)
--ֵ
RETURN NUMBER IS
--洢нֵ
annual_sal NUMBER(7,2);
BEGIN --ִв
SELECT (sal+NVL(comm,0))*12 INTO annual_sal
FROM emp
WHERE ename=empname;
RETURN annual_sal;
END CAL_ANNUAL_SAL;
END EMP_TOOL_PACKAGE;
/
DECLARE
--˰
c_tax_rate CONSTANT NUMBER(3,2):=0.03;
--Ա
v_ename emp.ename%TYPE;
--
v_sal emp.sal%TYPE;
--˰
v_sal_tax NUMBER(7,2);
BEGIN
--ִ
SELECT ename,sal INTO v_ename,v_sal
FROM emp
WHERE empno=&no;
--˰
v_sal_tax:=v_sal*c_tax_rate;
--
DBMS_OUTPUT.PUT_LINE('Ա'||v_ename||' | Աʣ'||v_sal||' | ˰'||v_sal_tax);
END;
/
--¼
DECLARE
--һ¼ͣempename,sal,jobֶ
TYPE emp_record_type IS RECORD(empname emp.ename%TYPE,sal emp.sal%TYPE,job emp.job%TYPE);
--һ¼͵ı
emp_record emp_record_type;
BEGIN
--ѯempϢ¼
SELECT ename,sal,job INTO emp_record
FROM emp
WHERE empno=7788;
--ӡ¼
DBMS_OUTPUT.PUT_LINE('Ա'||emp_record.empname || 'ʣ' || emp_record.sal || ':' || emp_record.job);
END;
/
--PL/SQL
DECLARE
--һPL/SQLͣempenameֶ
TYPE emp_table_type IS TABLE OF emp.ename%TYPE INDEX BY BINARY_INTEGER;--˴ʾ±갴,Ϊ
--һPL/SQL
emp_table emp_table_type;
BEGIN
SELECT ename INTO emp_table(0)
FROM emp
WHERE empno=7788;
DBMS_OUTPUT.PUT_LINE('Ա' || emp_table(0));
END;
/
--αȡѯ
DECLARE
--α
TYPE emp_ref_cr_type IS REF CURSOR;
--α
emp_ref_cr emp_ref_cr_type;
--ename
v_ename emp.ename%TYPE;
--sal
v_sal emp.sal%TYPE;
BEGIN
--ʹα
OPEN emp_ref_cr FOR
SELECT ename,sal
FROM emp
WHERE deptno=&no;
--ѭȡ
LOOP
FETCH emp_ref_cr INTO v_ename,v_sal;
--жαǷΪ
EXIT WHEN emp_ref_cr%NOTFOUND;
--
DBMS_OUTPUT.PUT_LINE('Ա' || v_ename || 'нˮ' || v_sal );
END LOOP;
--رα
CLOSE emp_ref_cr;
END;
/
| true |
b3916e337fbfda28fd17ae5ac9f5dbec759cd54d | SQL | geosmart/me.geosmart.pssms | /pssms-rpcservice/src/main/resources/schema/BackOrderLog.sql | UTF-8 | 823 | 3.296875 | 3 | [] | no_license | -- auto Generated on 2017-03-08 14:07:31
DROP TABLE IF EXISTS `tb_back_order_log`;
CREATE TABLE `tb_back_order_log`(
`serialId`bigint (20) NOT NULL AUTO_INCREMENT COMMENT '编号',
`sale_order_id` VARCHAR (64) COMMENT '销售单号',
`back_order_id` VARCHAR (32) COMMENT '退单编号',
`customer_code` VARCHAR (64) COMMENT '客户编号',
`order_date` DATE NOT NULL COMMENT '交易日期',
`back_amount` DOUBLE (16,2) COMMENT '退单使用金额',
`memo` VARCHAR (512) COMMENT '备注',
creation_time DATETIME NOT NULL COMMENT '创建时间',
last_modified_time DATETIME NOT NULL COMMENT '最后修改时间',
is_deleted TINYINT DEFAULT '0' NOT NULL COMMENT '是否删除',
PRIMARY KEY (`serialId`)
)ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT '退货单使用记录';
| true |
8743de63c61be087acbfb236f077fd2debacffe0 | SQL | Muthuseenivelraja/orginfl | /initialization/add_db_functions.sql | UTF-8 | 948 | 3.328125 | 3 | [] | no_license | DROP FUNCTION IF EXISTS normal_name;
DELIMITER $$
CREATE FUNCTION normal_name (v TEXT)
RETURNS TEXT
COMMENT 'Normalize a string stripping delimiters and excluding delimiter repeats'
LANGUAGE SQL
DETERMINISTIC
CONTAINS SQL
BEGIN
DECLARE result TEXT;
SET result = TRIM(
REPLACE(REPLACE(REPLACE(REPLACE( REPLACE(v,'\t',' '), ' ', ' '), ' ', ' '), ' ', ' '), ' ', ' ')
);
IF result='' THEN
SET result=NULL;
END IF;
RETURN (result);
SHOW WARNINGS;
END $$
DELIMITER ;
/*DROP FUNCTION IF EXISTS normal_name;
DELIMITER $$
CREATE FUNCTION normal_name (v TEXT)
RETURNS TEXT
COMMENT 'Normalize a string stripping delimiters and excluding delimiter repeats'
LANGUAGE SQL
DETERMINISTIC
CONTAINS SQL
BEGIN
SET v = TRIM(
REPLACE(REPLACE(REPLACE(REPLACE( REPLACE(v,'\t',' '), ' ', ' '), ' ', ' '), ' ', ' '), ' ', ' ')
);
IF v='' THEN SET v=NULL; END IF;
RETURN (v);
SHOW WARNINGS;
END $$
DELIMITER ; */ | true |
133850c7c01afd62a843f0cf55aa262847f5bc99 | SQL | ESSeRE-Lab/qualitas.class-corpus | /projects/castor-1.3.3/cpactf/src/test/ddl/org/castor/cpa/test/test15/derby-create.sql | UTF-8 | 1,892 | 3.328125 | 3 | [] | no_license | create table test15_person (
fname varchar(15) not null,
lname varchar(15) not null,
bday timestamp
);
create unique index test15_person_pk on test15_person( fname, lname );
create table test15_address (
fname varchar(15) not null,
lname varchar(15) not null,
id int not null,
street varchar(30),
city varchar(30),
state varchar(2),
zip varchar(6)
);
create unique index test15_address_pk on test15_address( id );
create table test15_employee (
fname varchar(15) not null,
lname varchar(15) not null,
start_date timestamp
);
create unique index test15_employee_pk on test15_employee( fname, lname );
create table test15_contract (
fname varchar(15) not null,
lname varchar(15) not null,
policy_no int not null,
contract_no int not null,
c_comment varchar(90)
);
create unique index test15_contract_fk on test15_contract( fname, lname );
create unique index test15_contract_pk on test15_contract( policy_no, contract_no );
create table test15_category_contract (
policy_no int not null,
contract_no int not null,
cate_id int not null
);
create table test15_payroll (
fname varchar(15) not null,
lname varchar(15) not null,
id int not null,
holiday int not null,
hourly_rate int not null
);
create unique index test15_payroll_fk on test15_payroll( fname, lname );
create unique index test15_payroll_pk on test15_payroll( id );
create table test15_category (
id int not null,
name varchar(20) not null
);
create unique index test15_category_pk on test15_category( id );
create table test15_only(
fname varchar(15) not null,
lname varchar(15) not null
);
create unique index test15_only_pk on test15_only( fname, lname );
| true |
660a55af094796ed55b6de0777df2c32a97f7f5c | SQL | lonby/airbnb_sql | /Joe.SQL | UHC | 6,171 | 4.1875 | 4 | [] | no_license |
--AirBnB User Analysis on SQL Project
--On kaggle
-- create table
create table air_user
(id varchar2(50),
date_account_created date,
timestamp_first_active number,
date_first_booking varchar2(50),
gender varchar2(50),
age number(10),
signup_method varchar2(50),
signup_flow number(10),
language varchar(10),
affiliate_channel varchar2(50),
affiliate_provider varchar2(50),
first_affiliate_tracked varchar2(50),
signup_app varchar2(50),
first_device_type varchar2(50),
first_browser varchar2(50),
country_destination varchar2(10));
select *
from air_user;
--Q1. which browser will be the most favorable?
select first_browser, count(*) as cnt
from air_user
group by first_browser
order by cnt desc;
select signup_app, count(*) as cnt
from air_user
group by signup_app
order by cnt desc;
select signup_flow, count(*) as cnt
from air_user
group by signup_flow
order by cnt desc;
select *
from air_user;
--Data ȸid ߺ ȸidԴϴ.
select count(distinct id), count(*)
from air_user;
-- ȯ (0.42%) conversion rate
select country, round( (cnt_book / (select count(*) from air_user)), 2) as book_ratio
from
(
select country_destination as country, count(*) as cnt_book
from air_user
where date_first_booking is not null
group by country_destination
)
order by book_ratio desc;
--äκ
--
--
select max(timestamp_first_active)
from air_user;
-- ű ɸ ð ( 0.23 )
select round( avg(day_diff) , 3) as avg_book
from
(
select (date_account_created - to_date(substr(timestamp_first_active, 1,8), 'YYYYMMDD')) as day_diff
from air_user
);
group by time_diff;
--湮 ~
--AirBnB 湮 Ա ɸ
select dd as Day, count(*) as Cnt
from
(
select day_diff, case when day_diff <= 1 then 1
when day_diff > 1 and day_diff <= 3 then 3
when day_diff > 3 and day_diff <= 5 then 5
when day_diff > 5 and day_diff <= 7 then 7
else 10 end as dd
from
(
select (date_account_created - to_date(substr(timestamp_first_active, 1,8), 'YYYYMMDD')) as day_diff
from air_user
)
)
group by dd
order by dd;
--湮 ɸ ¥
select dd as Day, count(*) as Cnt
from
(
select day_diff, case when day_diff <= 1 then 1
when day_diff > 1 and day_diff <= 3 then 3
when day_diff > 3 and day_diff <= 5 then 5
when day_diff > 5 and day_diff <= 7 then 7
else 10 end as dd
from
(
select (to_date(date_first_booking, 'YYYY-MM-DD') - date_account_created) as day_diff
from air_user
where date_first_booking is not null
)
where day_diff >= 0
)
group by dd
order by dd;
--̳ʽ ؾ
select count(*)
from
(
select id, date_first_booking, date_account_created, (to_date(date_first_booking, 'YYYY-MM-DD') - date_account_created) as day_diff
from air_user
where date_first_booking is not null
)
where day_diff < 0
;
-- ű ð
select dd as Day, count(*) as Cnt
from
(
select day_diff, case when day_diff <= 1 then 1
when day_diff > 1 and day_diff <= 3 then 3
when day_diff > 3 and day_diff <= 5 then 5
when day_diff > 5 and day_diff <= 7 then 7
else 10 end as dd
from
(
select (to_date(date_first_booking, 'YYYY-MM-DD') - to_date(substr(timestamp_first_active, 1,8), 'YYYYMMDD')) as day_diff
from air_user
where date_first_booking is not null
)
where day_diff >= 0
)
group by dd
order by dd;
select *
from air_user;
-- ϱ?
--0. ( ȣ)
select signup_method , count(*) as cnt
from air_user
where date_first_booking is not null
group by signup_method
order by cnt desc;
--1. ȸ ( vs ü )
select gender, count(*) as cnt
from air_user
where gender not in '-unknown-'
group by gender
order by cnt desc;
select gender, count(*) as cnt
from air_user
where date_first_booking is not null and gender not in '-unknown-'
group by gender
order by cnt desc;
--2. ȸ ( vs ü )
select age, count(*)
from air_user
group by age
order by age;
| true |
e9412f5b7d5e442c4bc689f7e023f9a9d9236b00 | SQL | firat-can-slnk/untis-timetable-ios | /Webserver/database.sql | UTF-8 | 1,609 | 3.046875 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Erstellungszeit: 05. Apr 2021 um 12:43
-- Server-Version: 10.3.27-MariaDB-0+deb10u1
-- PHP-Version: 7.3.27-1~deb10u1
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 */;
--
-- Datenbank: `untisapp`
--
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `authenticate`
--
CREATE TABLE `authenticate` (
`ID` int(11) NOT NULL,
`Server` varchar(32) NOT NULL,
`School` varchar(32) NOT NULL,
`User` varchar(32) NOT NULL,
`Password` varchar(32) NOT NULL,
`Client` varchar(12) NOT NULL,
`sessionID` varchar(35) NOT NULL,
`personID` varchar(32) NOT NULL,
`personType` varchar(32) NOT NULL,
`klasseID` varchar(32) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Indizes der exportierten Tabellen
--
--
-- Indizes für die Tabelle `authenticate`
--
ALTER TABLE `authenticate`
ADD PRIMARY KEY (`ID`);
--
-- AUTO_INCREMENT für exportierte Tabellen
--
--
-- AUTO_INCREMENT für Tabelle `authenticate`
--
ALTER TABLE `authenticate`
MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
| true |
9f675fa4edfe210a85e3e34361eecebf8e1f0a6f | SQL | jeeno44/testContact | /database/createDatabase/conts.sql | UTF-8 | 5,914 | 3.25 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Хост: localhost
-- Время создания: Янв 17 2020 г., 17:20
-- Версия сервера: 5.7.28-0ubuntu0.18.04.4
-- Версия PHP: 7.2.26-1+ubuntu18.04.1+deb.sury.org+1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- База данных: `conts`
--
-- --------------------------------------------------------
--
-- Структура таблицы `contacts`
--
CREATE TABLE `contacts` (
`id` int(10) UNSIGNED NOT NULL,
`user_id` int(10) UNSIGNED NOT NULL,
`name` varchar(255) NOT NULL,
`second_name` varchar(255) DEFAULT NULL,
`phone` bigint(11) NOT NULL,
`comment` text,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Структура таблицы `failed_jobs`
--
CREATE TABLE `failed_jobs` (
`id` bigint(20) UNSIGNED NOT NULL,
`connection` text NOT NULL,
`queue` text NOT NULL,
`payload` longtext NOT NULL,
`exception` longtext NOT NULL,
`failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Структура таблицы `logs`
--
CREATE TABLE `logs` (
`id` int(10) UNSIGNED NOT NULL,
`user_id` int(10) UNSIGNED NOT NULL,
`event` varchar(255) NOT NULL,
`result` varchar(255) DEFAULT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Структура таблицы `migrations`
--
CREATE TABLE `migrations` (
`id` int(10) UNSIGNED NOT NULL,
`migration` varchar(255) NOT NULL,
`batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Дамп данных таблицы `migrations`
--
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '2014_10_12_000000_create_users_table', 1),
(2, '2014_10_12_100000_create_password_resets_table', 1),
(3, '2019_08_19_000000_create_failed_jobs_table', 1),
(4, '2020_01_16_024330_create_table_contacts', 1),
(5, '2020_01_16_024405_create_table_logs', 1);
-- --------------------------------------------------------
--
-- Структура таблицы `password_resets`
--
CREATE TABLE `password_resets` (
`email` varchar(255) NOT NULL,
`token` varchar(255) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Структура таблицы `users`
--
CREATE TABLE `users` (
`id` int(10) UNSIGNED NOT NULL,
`name` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`email_verified_at` timestamp NULL DEFAULT NULL,
`password` varchar(255) NOT NULL,
`token` varchar(255) NOT NULL,
`remember_token` varchar(100) DEFAULT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Индексы сохранённых таблиц
--
--
-- Индексы таблицы `contacts`
--
ALTER TABLE `contacts`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `user_id` (`user_id`,`phone`),
ADD KEY `table_contacts_user_id_index` (`user_id`);
--
-- Индексы таблицы `failed_jobs`
--
ALTER TABLE `failed_jobs`
ADD PRIMARY KEY (`id`);
--
-- Индексы таблицы `logs`
--
ALTER TABLE `logs`
ADD PRIMARY KEY (`id`),
ADD KEY `table_logs_user_id_index` (`user_id`);
--
-- Индексы таблицы `migrations`
--
ALTER TABLE `migrations`
ADD PRIMARY KEY (`id`);
--
-- Индексы таблицы `password_resets`
--
ALTER TABLE `password_resets`
ADD KEY `password_resets_email_index` (`email`);
--
-- Индексы таблицы `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `users_email_unique` (`email`);
--
-- AUTO_INCREMENT для сохранённых таблиц
--
--
-- AUTO_INCREMENT для таблицы `contacts`
--
ALTER TABLE `contacts`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT для таблицы `failed_jobs`
--
ALTER TABLE `failed_jobs`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT для таблицы `logs`
--
ALTER TABLE `logs`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT для таблицы `migrations`
--
ALTER TABLE `migrations`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT для таблицы `users`
--
ALTER TABLE `users`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- Ограничения внешнего ключа сохраненных таблиц
--
--
-- Ограничения внешнего ключа таблицы `contacts`
--
ALTER TABLE `contacts`
ADD CONSTRAINT `table_contacts_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);
--
-- Ограничения внешнего ключа таблицы `logs`
--
ALTER TABLE `logs`
ADD CONSTRAINT `table_logs_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
| true |
97a5aa277d2d6318a1008c8313803146ef0a5bbb | SQL | vctrmarques/interno-rh-sistema | /rhServer/src/main/resources/db/migration/V1_2019_10_18_14_59__ALTER_TABLE_FOLHA_PAGAMENTO_CONTRACHEQUE.sql | UTF-8 | 1,135 | 2.5625 | 3 | [] | no_license | -- Flávio Silva
-- Alteração da tabela folha_pagamento_contracheque para ajuste das colunas valorBruto, valorDesconto e valor liquido.
if col_length('folha_pagamento_contracheque', 'valor_bruto') is null
begin
alter table folha_pagamento_contracheque add valor_bruto float;
end
if col_length('folha_pagamento_contracheque', 'valor_liquido') is null
begin
alter table folha_pagamento_contracheque add valor_liquido float;
end
if col_length('folha_pagamento_contracheque', 'valor_desconto') is null
begin
alter table folha_pagamento_contracheque add valor_desconto float;
end
if col_length('folha_pagamento_contracheque', 'valorBruto') is not null
begin
alter table folha_pagamento_contracheque drop column valorBruto;
end
if col_length('folha_pagamento_contracheque', 'valorLiquido') is not null
begin
alter table folha_pagamento_contracheque drop column valorLiquido;
end
if col_length('folha_pagamento_contracheque', 'valorDesconto') is not null
begin
alter table folha_pagamento_contracheque drop column valorDesconto;
end
| true |
103d1a8b6c2dd87be690d4804474cff86e290aaf | SQL | IrinaAristova/DB--Workshop4 | /package.sql | UTF-8 | 2,337 | 3.703125 | 4 | [] | no_license | CREATE OR REPLACE PACKAGE Olimpiada_package IS
TYPE OLIMP_RECORD IS RECORD(CountryName VARCHAR2(50), OlimpYear NUMBER(4,0), MedalColor VARCHAR2(15));
TYPE OLIMP_TABLE IS TABLE OF OLIMP_RECORD;
PROCEDURE ChangeCountry(athletename IN VARCHAR2, countryname IN VARCHAR2);
FUNCTION GetMedals(CountryName Country.country_name%TYPE,OlimpYear Olimpiada.olimp_year%TYPE)
RETURN OLIMP_TABLE
PIPELINED;
END Olimpiada_package;
/
CREATE OR REPLACE PACKAGE BODY Olimpiada_package IS
PROCEDURE ChangeCountry(athletename IN VARCHAR2, countryname IN VARCHAR2)
IS
temp VARCHAR2(50);
BEGIN
DBMS_OUTPUT.enable;
SELECT athlete_name INTO temp FROM Athlete WHERE athlete_name = athletename;
SELECT country_name INTO temp FROM Country WHERE country_name = countryname;
UPDATE Athlete
SET country_name = countryname
WHERE athlete_name = athletename;
DBMS_OUTPUT.PUT_LINE('Change atlete country');
EXCEPTION
WHEN NO_DATA_FOUND THEN DBMS_OUTPUT.PUT_LINE('Athlete or country not found in database');
END;
FUNCTION GetMedals(CountryName Country.country_name%TYPE, OlimpYear Olimpiada.olimp_year%TYPE)
RETURN OLIMP_TABLE PIPELINED
IS
CURSOR current_cursor IS
SELECT
Country.country_name,
Olimpiada.olimp_year,
Medal.color as medal_color
FROM
Country
INNER JOIN athlete ON country.country_name = athlete.country_name
INNER JOIN grantmedal ON athlete.athlete_name = grantmedal.athlete_name
INNER JOIN olimpiada ON olimpiada.olimp_year = grantmedal.olimpiada_year
INNER JOIN medal ON medal.color = grantmedal.medal_color
WHERE
(Country.country_name = CountryName) AND
(Olimpiada.olimp_year = OlimpYear);
BEGIN
FOR current_record IN current_cursor
LOOP
PIPE ROW(current_record);
END LOOP;
END;
END Olimpiada_package;
| true |
fe5a4c053d9ca5ad94445e637a39433736c0750b | SQL | merxbj/notwa | /Installation/Database/initial_scripts/testdata/notwa.sql | UTF-8 | 3,371 | 2.640625 | 3 | [] | no_license | -- ----------------------------
-- Records of project
-- ----------------------------
INSERT INTO `project` VALUES ('1', 'notwa');
INSERT INTO `project` VALUES ('2', 'notwa fake');
INSERT INTO `project` VALUES ('3', 'person');
INSERT INTO `project` VALUES ('4', 'general');
-- ----------------------------
-- Records of project_user_assignment
-- ----------------------------
INSERT INTO `project_user_assignment` VALUES ('1', '1');
INSERT INTO `project_user_assignment` VALUES ('1', '2');
INSERT INTO `project_user_assignment` VALUES ('2', '3');
INSERT INTO `project_user_assignment` VALUES ('2', '4');
INSERT INTO `project_user_assignment` VALUES ('3', '1');
INSERT INTO `project_user_assignment` VALUES ('4', '1');
INSERT INTO `project_user_assignment` VALUES ('4', '2');
INSERT INTO `project_user_assignment` VALUES ('4', '3');
INSERT INTO `project_user_assignment` VALUES ('4', '4');
-- ----------------------------
-- Records of user
-- ----------------------------
INSERT INTO `user` VALUES ('1', 'mrneo', 'aaaa', 'Tom', 'St');
INSERT INTO `user` VALUES ('2', 'eter', 'bbbb', 'Je', 'mex');
INSERT INTO `user` VALUES ('3', 'michal', 'mmmmm', 'Mi', 'Ne');
INSERT INTO `user` VALUES ('4', 'new1', 'new2', 'User1', 'Last2');
-- ----------------------------
-- Records of work_item
-- ----------------------------
INSERT INTO `work_item` VALUES ('1', '1', '1', null, 'GUI', '3', '2', 'Implementation of GUI package', null, '2010-03-01 00:22:17');
INSERT INTO `work_item` VALUES ('2', '1', '1', '1', 'GUI - Show/Hide Button', '3', '2', 'On click shows or hide Workitem detail', null, '2010-03-14 00:22:27');
INSERT INTO `work_item` VALUES ('3', '1', '1', '1', 'GUI - SettingsDialog', '3', '2', 'Add all objects to settings dialog / buttons, TextFields, ...', null, '2010-03-14 00:22:31');
INSERT INTO `work_item` VALUES ('4', '1', '1', '1', 'GUI - TestDialog', '5', '0', 'Implementation of TestDialog (test WorkItem)', null, '2010-03-13 00:22:34');
INSERT INTO `work_item` VALUES ('5', '2', '1', null, 'DAL', '3', '1', 'Implementation of DAL package', null, '2010-03-01 00:23:37');
INSERT INTO `work_item` VALUES ('6', '2', '1', '5', 'DAL - FillWorkItemCollection', '3', '1', 'Complete implementation', '2010-03-19 00:25:46', '2010-03-01 00:25:50');
INSERT INTO `work_item` VALUES ('7', '3', '4', null, 'New class implementation', '5', '2', 'To nejde :D ', null, '2010-03-14 00:27:12');
INSERT INTO `work_item` VALUES ('8', '1', '3', null, 'Personalistika', '3', '1', '---', '2010-04-30 00:28:17', '2010-01-01 00:28:09');
INSERT INTO `work_item` VALUES ('9', '1', '3', '8', 'Personalistika - Zdravotni prohlidky', '3', '1', 'Main dialog redesign', null, '2010-03-14 00:29:18');
INSERT INTO `work_item` VALUES ('10', '1', '3', '9', 'Personalistika - subtask', '3', '1', 'create some subtask', '0000-00-00 00:00:00', '2010-03-14 00:30:09');
-- ----------------------------
-- Records of work_item_note
-- ----------------------------
INSERT INTO `work_item_note` VALUES ('2', '4', '1', 'Ok - Deleted');
INSERT INTO `work_item_note` VALUES ('1', '0', '0', null);
INSERT INTO `work_item_note` VALUES ('3', '6', '1', 'No uz aby to bylo ;-)');
INSERT INTO `work_item_note` VALUES ('4', '6', '2', 'Pracuju jak muzu :D');
INSERT INTO `work_item_note` VALUES ('5', '7', '1', 'tak ten tezko neco udela');
INSERT INTO `work_item_note` VALUES ('6', '7', '2', 'taky si myslim');
| true |
f4a0da53c5eaf2ab76059ccff0de8b82fbb2422a | SQL | baywind/rujel | /RujelEduResults/Resources/creEduResults.mysql | UTF-8 | 1,594 | 3.046875 | 3 | [
"BSD-3-Clause"
] | permissive | CREATE TABLE ITOG_COMMENT (
ITOG_CONTAINER smallint NOT NULL,
EDU_CYCLE smallint NOT NULL,
STUDENT_ID int NOT NULL,
COMMENT_TEXT text NOT NULL,
PRIMARY KEY (ITOG_CONTAINER,EDU_CYCLE,STUDENT_ID),
INDEX (STUDENT_ID)
) ENGINE=InnoDB;
CREATE TABLE ITOG_CONTAINER (
I_ID smallint NOT NULL,
ITOG_TYPE smallint NOT NULL,
ORDER_NUM tinyint,
EDU_YEAR smallint NOT NULL,
PRIMARY KEY (I_ID)
) ENGINE=InnoDB;
CREATE TABLE ITOG_MARK (
ITOG_CONTAINER smallint NOT NULL,
EDU_CYCLE smallint NOT NULL,
STUDENT_ID int NOT NULL,
MARK_TITLE varchar(5) NOT NULL,
VALUE_STATE tinyint NOT NULL,
SUCCESS_VALUE decimal(5,4),
ITOG_FLAGS tinyint NOT NULL,
PRIMARY KEY (ITOG_CONTAINER,EDU_CYCLE,STUDENT_ID),
INDEX (STUDENT_ID)
) ENGINE=InnoDB;
CREATE TABLE ITOG_PRESET (
PR_ID smallint NOT NULL,
PRESET_GROUP smallint NOT NULL,
MARK_TITLE varchar(5) NOT NULL,
VALUE_STATE tinyint NOT NULL, -- 0:none ; 1: bad ; 2:acceptable ; 3 good
SUCCESS_VALUE decimal(5,4),
PRIMARY KEY (PR_ID)
) ENGINE=InnoDB;
CREATE TABLE ITOG_TYPE (
T_ID smallint NOT NULL,
SHORT_TITLE varchar(5),
TYPE_NAME varchar(28),
IN_YEAR_COUNT tinyint NOT NULL,
SORT_NUM smallint NOT NULL,
PRIMARY KEY (T_ID)
) ENGINE=InnoDB;
CREATE TABLE ITOG_TYPE_LIST (
TL_ID mediumint NOT NULL,
LIST_NAME varchar(28) NOT NULL,
ITOG_TYPE smallint NOT NULL,
MARK_INDEX smallint,
PRESET_GROUP smallint NOT NULL,
EDU_YEAR smallint NOT NULL DEFAULT 0,
PRIMARY KEY (TL_ID)
) ENGINE=InnoDB;
INSERT INTO SCHEMA_VERSION (MODEL_NAME,VERSION_NUMBER,VERSION_TITLE)
VALUES ('EduResults',4,'1.0');
| true |
490b726c73e99c18e497dbc6c6f9afe706ca9ee2 | SQL | EvgeniyLengin/YouWanna | /bitrix/modules/iqsms.sender/install/db/mysql/install.sql | UTF-8 | 1,017 | 3.21875 | 3 | [] | no_license |
CREATE TABLE `iqsms_sender_list` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`PHONE` varchar(13) NOT NULL,
`TEXT` text NOT NULL,
`STATUS` tinyint(2) NOT NULL,
`CREATED` datetime NOT NULL,
`SCHEDULE` datetime DEFAULT NULL,
`TYPE` varchar(255) DEFAULT NULL,
`COMMENT` text,
`SITE_ID` varchar(2) NOT NULL,
`SENDER` varchar(20) NOT NULL,
`PARAMS` text,
PRIMARY KEY (`ID`),
KEY `ix_status` (`STATUS`)
);
CREATE TABLE `iqsms_sender_template` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`TYPE` varchar(255) NOT NULL,
`ACTIVE` tinyint(1) DEFAULT NULL,
`NAME` varchar(255) NOT NULL,
`PHONE` varchar(255) NOT NULL,
`PHONE_COPY` varchar(255) DEFAULT NULL,
`TEXT` text NOT NULL,
`EVENT` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`ID`),
KEY `ix_type_active` (`TYPE`,`ACTIVE`)
);
CREATE TABLE `iqsms_sender_template_site` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`TID` int(11) NOT NULL,
`SID` varchar(2) NOT NULL,
PRIMARY KEY (`ID`),
UNIQUE KEY `ix_tid_sid` (`TID`,`SID`)
);
| true |
3336d9037dce2429e159551a8f9997e2a8580f97 | SQL | ayubekop/nebeng | /SQLQuery1 db api koin.sql | UTF-8 | 1,698 | 3.421875 | 3 | [] | no_license | Create table [58659KoInOrder] (
Id int identity(1,1),
OrderDate datetime ,
OrderNumber varchar(100)
constraint PK_58659KoInOrder primary key(Id)
)
create table [58659KoInProduct](
Id int identity(1,1),
ArtDating varchar(100),
ArtDescription varchar(100),
ArtId varchar(100),
Artist varchar(100)
ArtistBirthDate datetime,
ArtistDeathTime datetime,
ArtistNationality varchar(100),
Category varchar(100),
Price money,
Size varchar(100),
Title varchar(100)
constraint PK_58659KoInProduct primary key(Id)
)
ALTER TABLE [KoInProduct58659]
ALTER COLUMN ArtistBirthDate varchar(100);
ALTER TABLE [KoInProduct58659]
ALTER COLUMN ArtistDeathTime varchar(100);
select * from [KoInProduct58659]
sp_help [KoInProduct58659]
alter table [58659KoInProduct]
add Artist Varchar(100)
create table [58659KoInOrderItem](
Id int identity(1,1),
OrderId int,
ProductId int,
Quantity int,
UnitPrice money,
constraint PK_58659KoInOrderItem primary key(Id),
constraint FK_58659KoInOrderItem_Orders_OrderId foreign key (OrderId) references [58659KoInOrder](Id),
constraint FK_58659KoInOrderItem_Products_ProductId foreign key (ProductId) references [58659KoInProduct](Id)
)
insert [58659KoInProduct](Category, Size, Price, Title, ArtDescription, ArtDating, ArtId, Artist, ArtistBirthDate, ArtistDeathTime, ArtistNationality)
select 'Poster', '48 x 36', '89.99', 'Self-portrait', 'Vincent moved to Paris in 1886, after hearing from his brother Theo about the new','1887', 'SK-A-3262', 'Vincent van gogh', '1853-03-30T00:00:00','1890-07-29T00:00:00','Nederlands'
select * from KoInProduct58659
select * from KoInOrder58659
select * from KoInOrderItem58659 | true |
e1734f273a682475267477ac27c1c4b283d0aa0d | SQL | supermao1013/study-demo | /dalomao-springboot/sql/demo.sql | UTF-8 | 1,891 | 3.140625 | 3 | [] | no_license | drop table if exists t_sys_user;
create table t_sys_user (
id bigint(20) not null auto_increment comment '主键',
login_name varchar(32) not null comment '登录账号',
user_name varchar(32) not null comment '用户昵称',
user_type varchar(2) default '00' comment '用户类型(00系统用户 01普通用户)',
email varchar(32) default '' comment '用户邮箱',
phonenumber varchar(16) default '' comment '手机号码',
sex char(1) default '0' comment '用户性别(数据字典 0男 1女 2未知)',
avatar varchar(128) default '' comment '头像路径',
password varchar(64) default '' comment '密码',
salt varchar(32) default '' comment '盐加密',
status char(1) default '0' comment '帐号状态(0正常 1停用)',
del_flag char(1) default '0' comment '删除标志(0代表存在 1代表删除)',
login_ip varchar(32) default '' comment '最后登陆IP',
login_date datetime comment '最后登陆时间',
create_user varchar(32) default '' comment '创建者',
create_time datetime comment '创建时间',
update_user varchar(32) default '' comment '更新者',
update_time datetime comment '更新时间',
remark varchar(128) default '' comment '备注',
primary key (id)
) engine=innodb COLLATE =utf8_bin comment = '系统管理-用户信息表';
insert into t_sys_user values(1, 'admin', '管理员', '00', '163.com', '119', '1', '', '29c67a30398638269fe600f73a054934', '111111', '0', '0', '127.0.0.1', now(), 'admin', now(), 'admin', now(), '');
| true |
dbf3b97232b66d1c196682f846fd5586b02a1594 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day23/select1726.sql | UTF-8 | 191 | 2.78125 | 3 | [] | no_license |
SELECT timeStamp, temperature
FROM ThermometerObservation
WHERE timestamp>'2017-11-22T17:26:00Z' AND timestamp<'2017-11-23T17:26:00Z' AND SENSOR_ID='47ad4c55_7a4e_4366_a59d_43d5c9138ffe'
| true |
9782bd8e28da108cb255dfb2b7389c04243bb4b7 | SQL | devatsrs/neon.web | /dbv-1/data/schema/prc_UpdateInProgressJobStatusToFail.sql | UTF-8 | 1,104 | 3.265625 | 3 | [
"MIT"
] | permissive | CREATE DEFINER=`neon-user`@`117.247.87.156` PROCEDURE `prc_UpdateInProgressJobStatusToFail`(IN `p_JobID` INT, IN `p_JobStatusID` INT, IN `p_JobStatusMessage` LONGTEXT, IN `p_UserName` VARCHAR(250))
BEGIN
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
/*
This procedure used to restart and terminate job.
*/
IF (SELECT count(*) from tblJob WHERE JobID = p_JobID AND JobStatusID = ( Select tblJobStatus.JobStatusID from tblJobStatus where tblJobStatus.Code = 'I' ) ) = 1
THEN
UPDATE tblJob
SET
JobStatusID = p_JobStatusID,
PID = NULL,
ModifiedBy = p_UserName,
updated_at = now()
WHERE
JobID = p_JobID
AND JobStatusID = ( Select tblJobStatus.JobStatusID from tblJobStatus where tblJobStatus.Code = 'I' );
IF p_JobStatusMessage != '' THEN
UPDATE tblJob
SET
JobStatusMessage = concat(JobStatusMessage ,'\n' ,p_JobStatusMessage)
WHERE
JobID = p_JobID;
END IF;
SELECT '1' as result;
ELSE
SELECT '0' as result;
END IF;
SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
END | true |
061a256a77811723050294487d1330342aba665e | SQL | DesmonFur/Financial-App | /db/seed.sql | UTF-8 | 2,068 | 3.84375 | 4 | [] | no_license | DROP TABLE IF EXISTS deposits;
DROP TABLE IF EXISTS expenses;
DROP TABLE IF EXISTS budgets;
DROP TABLE IF EXISTS user_info;
CREATE TABLE user_info(
user_id SERIAL PRIMARY KEY,
email VARCHAR(9999),
hash TEXT
);
CREATE TABLE budgets (
budget_id SERIAL PRIMARY KEY,
user_id INTEGER REFERENCES user_info(user_id),
budget_name VARCHAR(9000),
budget_balance INTEGER,
default_balance INTEGER,
total_budgeted INTEGER,
creation_date varchar(20) default to_char(CURRENT_DATE, 'MM/dd/yyyy'),
);
CREATE TABLE expenses(
expenses_id SERIAL PRIMARY KEY,
budget_id INTEGER REFERENCES budgets(budget_id),
rent_or_mortgage INTEGER DEFAULT 0,
Electric INTEGER DEFAULT 0,
Water INTEGER DEFAULT 0,
Internet INTEGER DEFAULT 0,
Groceries INTEGER DEFAULT 0,
Transportation INTEGER DEFAULT 0,
Auto_Maintenance INTEGER DEFAULT 0,
Home_Maintenance INTEGER DEFAULT 0,
Medical INTEGER DEFAULT 0,
Clothing INTEGER DEFAULT 0,
Gifts INTEGER DEFAULT 0,
Computer_Replacement INTEGER DEFAULT 0,
Student_Loan INTEGER DEFAULT 0,
Auto_Loan INTEGER DEFAULT 0,
Vacation INTEGER DEFAULT 0,
Fitness INTEGER DEFAULT 0,
Education INTEGER DEFAULT 0,
Dining_Out INTEGER DEFAULT 0,
Gaming INTEGER DEFAULT 0,
Fun_Money INTEGER DEFAULT 0,
dates varchar(20) default to_char(CURRENT_DATE, 'Mon/yyyy'),
note VARCHAR(9000)
);
CREATE TABLE deposits(
deposit_id serial primary key,
budget_id INTEGER REFERENCES budgets(budget_id),
deposit_amount INTEGER,
note VARCHAR(9000)
);
SELECT
*
FROM
budgets;
SELECT
SUM(default_balance)
FROM
budgets
WHERE
user_id = 6;
SELECT
*
FROM
expenses;
SELECT
*
FROM
deposits;
-- UPDATE budgets
-- SET budget_balance = 4000
-- WHERE budget_id = 1;
SELECT
*
FROM
budgets b
join expenses e ON b.budget_id = e.budget_id
WHERE
b.budget_id = 5;
SELECT
*
FROM
expenses e
JOIN budgets b ON e.budget_id = b.budget_id
WHERE
expenses_id = 1;
SELECT
*
FROM
user_info;
SELECT
*
FROM
budgets b
JOIN expenses e ON b.budget_id = e.budget_id
WHERE
user_id = 1
AND b.budget_id = 3; | true |
8fa0d6cc7dace93421235dd2d91122414fd6d7de | SQL | samson84/unique-number | /sql/init/init.sql | UTF-8 | 447 | 3.578125 | 4 | [] | no_license | DROP TABLE IF EXISTS votes;
CREATE TABLE votes (
id SERIAL PRIMARY KEY,
round_id INTEGER,
vote INTEGER NOT NULL,
username VARCHAR(100) NOT NULL,
UNIQUE(username, round_id)
);
DROP TABLE IF EXISTS rounds;
CREATE TABLE rounds (
id SERIAL PRIMARY KEY,
started_at TIMESTAMPTZ,
finished_at TIMESTAMPTZ
);
ALTER TABLE votes
ADD CONSTRAINT fk_round_id
FOREIGN KEY (round_id)
REFERENCES rounds(id)
| true |
085caea960e09484d389abbccabb27b0fe1fc47d | SQL | natalia0911/Proyecto1-BDII | /SCRIPTS/postgres/CreateUsuarios.sql | UTF-8 | 682 | 3.1875 | 3 | [] | no_license | -- Table: public.Usuarios
-- DROP TABLE public."Usuarios";
CREATE TABLE public."Usuarios"
(
"ID" numeric(20,0) NOT NULL,
"Nombre" character varying(60) COLLATE pg_catalog."default" NOT NULL,
"Cedula" numeric(9,0) NOT NULL,
"Direccion" character varying(256) COLLATE pg_catalog."default" NOT NULL,
"EsAdmin" boolean NOT NULL,
"contraseña" character varying(16) COLLATE pg_catalog."default" NOT NULL,
"Teléfono" numeric(8,0) NOT NULL,
CONSTRAINT "Usuarios_pkey" PRIMARY KEY ("Cedula", "ID"),
CONSTRAINT "Cedula" UNIQUE ("Cedula"),
CONSTRAINT "ID" UNIQUE ("ID")
)
TABLESPACE pg_default;
ALTER TABLE public."Usuarios"
OWNER to postgres; | true |
102197ab3caa17484fcb913e094b6382a78fe1b3 | SQL | lhoffmann7/StudyCollection | /Datenbanken-Praktikum/blatt3/alter-table.sql | UTF-8 | 342 | 3.25 | 3 | [] | no_license | alter table country add constraint cap foreign key (capital,code,province) references city(name,country,province) on delete cascade;
alter table country disable constraint cap;
--
alter table city add constraint cit foreign key (province,country) references province (name,country) on delete cascade;
alter table city disable constraint cit;
| true |
98c989f69fd208b14d3b005e2d5f04d7b2f5ab27 | SQL | Antoniolm/Grado_Informatica-WebDIU | /diu_hotel_dream_garden.sql | UTF-8 | 5,718 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 17-05-2016 a las 13:29:16
-- Versión del servidor: 10.1.8-MariaDB
-- Versión de PHP: 5.5.30
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: `diu_hotel_dream_garden`
--
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `comentario`
--
CREATE TABLE `comentario` (
`id` int(11) NOT NULL,
`comentario` text NOT NULL,
`nombre` varchar(45) NOT NULL,
`fecha` date NOT NULL,
`valoracion` int(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Volcado de datos para la tabla `comentario`
--
INSERT INTO `comentario` (`id`, `comentario`, `nombre`, `fecha`, `valoracion`) VALUES
(1, 'Estupendo hotel, hemos pasado un fantástico san valentin mi esposa y yo. Las promociones del hotel han sido muy bien organizadas y el trato ha sido impecable', 'Pepe ', '2016-02-14', 5),
(2, 'Estupendo hotel, hemos pasado unas fantásticas bodas de hora mi esposa y yoy el trato ha sido impecable', 'Jose ', '2016-05-20', 5),
(3, 'Han sido muy respetuosos y amables.En general ha sido una estancia estupenda en este hotel.', 'Jose Ramon', '2016-04-12', 4),
(4, 'Estupendo hotel, hemos pasado un fantástico san valentin mi esposa y yo. Las promociones del hotel han sido muy bien organizadas y el trato ha sido impecable.\r\nEstupendo hotel, hemos pasado un fantástico san valentin mi esposa y yo. Las promociones del hotel han sido muy bien organizadas y el trato ha sido impecable', 'Jose Maria', '2016-05-09', 3);
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `habitacion`
--
CREATE TABLE `habitacion` (
`id` int(10) NOT NULL,
`nombre` varchar(50) NOT NULL,
`descripcion` varchar(255) NOT NULL,
`imagen` varchar(255) NOT NULL,
`precio` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `promociones`
--
CREATE TABLE `promociones` (
`id` int(10) NOT NULL,
`imagen` varchar(255) NOT NULL,
`precio` int(10) NOT NULL,
`descripcion` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Volcado de datos para la tabla `promociones`
--
INSERT INTO `promociones` (`id`, `imagen`, `precio`, `descripcion`) VALUES
(1, 'espflamenco.png', 255, 'Ven a conocernos y disfruta de un espectáculo Flamenco dentro de una autentica cueva granadina. Incluye: - Espectáculo flamenco - Una consumición por persona - Traslado del hotel al espectáculo. Ida y vuelta. Recogida a las 21.15 h.'),
(2, 'gramoto.png', 50, 'Descubre la Ciudad de la Alhambra subido en una moto! * Moto de 125 cc con cascos y candado. * Precio por moto, máximo dos personas.'),
(3, 'romant.png', 120, '¿Quieres visitar Granada? Pues por qué no te alojas con nosotros.Queremos hacer que tu estancia se convierta en una bonita experiencia granadina, y por eso te ofrecemos esta magnífica promoción romántica.');
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `servicios`
--
CREATE TABLE `servicios` (
`id` int(10) NOT NULL,
`nombre` varchar(255) NOT NULL,
`imagen` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Volcado de datos para la tabla `servicios`
--
INSERT INTO `servicios` (`id`, `nombre`, `imagen`) VALUES
(1, 'Recepción 24 horas', '24h.png'),
(2, 'Servicio de lavandería', 'lavanderia.png'),
(3, 'Parking cubierto', 'parking.png'),
(4, 'Prensa en zonas comunes', 'prensa.png'),
(5, 'Conexión Wi-fi', 'wifi.png');
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `usuario`
--
CREATE TABLE `usuario` (
`id` int(10) NOT NULL,
`nombre` varchar(70) NOT NULL,
`apellidos` varchar(70) NOT NULL,
`pais` varchar(70) NOT NULL,
`telefono` int(11) NOT NULL,
`email` varchar(50) NOT NULL,
`contraseña` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Índices para tablas volcadas
--
--
-- Indices de la tabla `comentario`
--
ALTER TABLE `comentario`
ADD PRIMARY KEY (`id`);
--
-- Indices de la tabla `habitacion`
--
ALTER TABLE `habitacion`
ADD PRIMARY KEY (`id`);
--
-- Indices de la tabla `promociones`
--
ALTER TABLE `promociones`
ADD PRIMARY KEY (`id`);
--
-- Indices de la tabla `servicios`
--
ALTER TABLE `servicios`
ADD PRIMARY KEY (`id`);
--
-- Indices de la tabla `usuario`
--
ALTER TABLE `usuario`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT de las tablas volcadas
--
--
-- AUTO_INCREMENT de la tabla `comentario`
--
ALTER TABLE `comentario`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT de la tabla `habitacion`
--
ALTER TABLE `habitacion`
MODIFY `id` int(10) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT de la tabla `promociones`
--
ALTER TABLE `promociones`
MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT de la tabla `servicios`
--
ALTER TABLE `servicios`
MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT de la tabla `usuario`
--
ALTER TABLE `usuario`
MODIFY `id` int(10) NOT NULL AUTO_INCREMENT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
| true |
03d392b98e2242a3699db3b4be6cd5a26962a9d3 | SQL | mitchellolsthoorn/ASE-Technical-2021-api-linkage-replication | /EvoMaster/core/src/test/resources/sql_schema/passports.sql | UTF-8 | 621 | 3.953125 | 4 | [
"LGPL-3.0-only",
"LGPL-2.0-or-later",
"MIT"
] | permissive |
create table Countries (
country_id bigint not null,
country_name varchar (255) not null unique,
primary key (country_id)
);
create table Passports (
country_id bigint not null,
passport_number bigint not null,
expiration_date timestamp not null,
birth_date timestamp not null,
primary key (country_id, passport_number)
);
alter table Passports
add constraint FKCountries foreign key (country_id) references Countries;
alter table Passports
add constraint PassportUnique unique (country_id, passport_Number);
alter table Passports
add constraint ValidPassportNumber check (passport_number>0);
| true |
b0303f1d8ad2d25aee54bed67951a538e18be879 | SQL | hanzhipeng123/han_admin | /admin-login/src/sql-file/user_info.sql | UTF-8 | 1,081 | 2.65625 | 3 | [] | no_license | CREATE TABLE `user_info` (
`userId` int(11) NOT NULL AUTO_INCREMENT COMMENT '用户id',
`unionId` varchar(255) NOT NULL DEFAULT '' COMMENT '用户唯一标识',
`nickname` varchar(255) NOT NULL COMMENT '用户昵称',
`mobile` varchar(64) NOT NULL COMMENT '用户手机号',
`registryPlatform` tinyint(4) DEFAULT NULL COMMENT '用户平台:1-applet 2-ios 3-android',
`deviceToken` varchar(255) DEFAULT NULL COMMENT '用户设备令牌',
`brthday` varchar(11) DEFAULT NULL COMMENT '生日',
`userPic` varchar(255) DEFAULT NULL COMMENT '用户头像',
`recProvinceId` int(11) DEFAULT NULL COMMENT '省',
`recCityId` int(11) DEFAULT NULL COMMENT '市',
`recDistrictId` int(11) DEFAULT NULL COMMENT '区',
`createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`bindingMobileTime` timestamp NULL DEFAULT NULL COMMENT '首次绑定手机号时间',
`updateTime` timestamp NULL DEFAULT NULL COMMENT '更新时间',
`version` int(11) DEFAULT '0' COMMENT '版本号',
PRIMARY KEY (`userId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
| true |
ed0d3a244076d28921b4eb7880338f627afbfa87 | SQL | Sergiu221/Project | /database/Teachers.sql | UTF-8 | 481 | 3.21875 | 3 | [] | no_license | -- Table: public.teachers
-- DROP TABLE public.teachers;
CREATE TABLE public.teachers
(
id bigint NOT NULL,
first_name character varying(20) COLLATE pg_catalog."default" NOT NULL,
middle_name character varying(20) COLLATE pg_catalog."default",
last_name character varying(20) COLLATE pg_catalog."default" NOT NULL,
CONSTRAINT teachers_pkey PRIMARY KEY (id)
)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;
ALTER TABLE public.teachers
OWNER to postgres; | true |
9565d2f0afb1799b064795e36a65284401b4e071 | SQL | SaBierBo/DRDB | /MySQL/Backup.sql | UTF-8 | 15,167 | 3.421875 | 3 | [
"MIT"
] | permissive | -- MySQL dump 10.13 Distrib 8.0.22, for Linux (x86_64)
--
-- Host: localhost Database: DRDB
-- ------------------------------------------------------
-- Server version 8.0.22
/*!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 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `Appointment`
--
DROP TABLE IF EXISTS `Appointment`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `Appointment` (
`id` int NOT NULL AUTO_INCREMENT,
`FK_Study` int NOT NULL,
`FK_Child` int NOT NULL,
`FK_Schedule` int NOT NULL,
`createdAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updatedAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`FK_Family` int NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id_UNIQUE` (`id`),
KEY `FK_Child_idx` (`FK_Child`),
KEY `FK_Study_idx` (`FK_Study`),
KEY `FK_Schedule_idx` (`FK_Schedule`),
KEY `FK_Family_idx` (`FK_Family`),
CONSTRAINT `Family` FOREIGN KEY (`FK_Family`) REFERENCES `Family` (`id`),
CONSTRAINT `FK_Child` FOREIGN KEY (`FK_Child`) REFERENCES `Child` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `FK_Schedule` FOREIGN KEY (`FK_Schedule`) REFERENCES `Schedule` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `FK_Study` FOREIGN KEY (`FK_Study`) REFERENCES `Study` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=465 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `Child`
--
DROP TABLE IF EXISTS `Child`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `Child` (
`id` int NOT NULL AUTO_INCREMENT,
`Name` varchar(30) DEFAULT 'UNKNOWN',
`Sex` varchar(1) DEFAULT NULL,
`DoB` date DEFAULT NULL,
`Age` int DEFAULT NULL,
`Language` varchar(45) DEFAULT NULL,
`IdWithinFamily` varchar(1) DEFAULT NULL,
`HearingLoss` int DEFAULT '0',
`VisionLoss` int DEFAULT '0',
`PrematureBirth` int DEFAULT '0',
`Illness` int DEFAULT '0',
`Note` text,
`FK_Family` int DEFAULT NULL,
`BirthWeight` int DEFAULT NULL,
`createdAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updatedAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`HomeLanguage` varchar(100) DEFAULT NULL,
`SchoolLanguage` varchar(100) DEFAULT NULL,
`School` varchar(100) DEFAULT NULL,
`Gestation` int DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `Child_ibfk_1` (`FK_Family`),
CONSTRAINT `Child_ibfk_1` FOREIGN KEY (`FK_Family`) REFERENCES `Family` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=13751 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `Conversations`
--
DROP TABLE IF EXISTS `Conversations`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `Conversations` (
`id` int NOT NULL AUTO_INCREMENT,
`Conversation` text NOT NULL,
`Time` datetime NOT NULL,
`FK_Family` int DEFAULT NULL,
`createdAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updatedAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `id_UNIQUE` (`id`),
KEY `FK_Family` (`FK_Family`),
CONSTRAINT `Conversations_ibfk_1` FOREIGN KEY (`FK_Family`) REFERENCES `Family` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=51 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `Experimenter`
--
DROP TABLE IF EXISTS `Experimenter`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `Experimenter` (
`id` int NOT NULL AUTO_INCREMENT,
`FK_Experimenter` int NOT NULL,
`FK_Study` int NOT NULL,
`createdAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updatedAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `Experimenter_FK_Study_FK_Experimenter_unique` (`FK_Experimenter`,`FK_Study`),
UNIQUE KEY `id_UNIQUE` (`id`),
KEY `FK_Study` (`FK_Study`),
CONSTRAINT `Experimenter_ibfk_1` FOREIGN KEY (`FK_Experimenter`) REFERENCES `Personnel` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `Experimenter_ibfk_2` FOREIGN KEY (`FK_Study`) REFERENCES `Study` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=98 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `ExperimenterAssignment`
--
DROP TABLE IF EXISTS `ExperimenterAssignment`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `ExperimenterAssignment` (
`id` int NOT NULL AUTO_INCREMENT,
`FK_Experimenter` int NOT NULL,
`FK_Appointment` int NOT NULL,
`createdAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updatedAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `id_UNIQUE` (`id`),
KEY `FK_Experimenter_idx` (`FK_Experimenter`),
KEY `FK_Appointment_idx` (`FK_Appointment`),
CONSTRAINT `FK_Appointment` FOREIGN KEY (`FK_Appointment`) REFERENCES `Appointment` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `FK_Experimenter` FOREIGN KEY (`FK_Experimenter`) REFERENCES `Personnel` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=114 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `Family`
--
DROP TABLE IF EXISTS `Family`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `Family` (
`id` int NOT NULL AUTO_INCREMENT,
`NamePrimary` varchar(50) DEFAULT NULL,
`NameSecondary` varchar(50) DEFAULT NULL,
`Email` varchar(40) DEFAULT NULL,
`Phone` varchar(10) DEFAULT NULL,
`CellPhone` varchar(10) DEFAULT NULL,
`RacePrimary` varchar(20) DEFAULT NULL,
`RaceSecondary` varchar(20) DEFAULT NULL,
`LanguagePrimary` varchar(20) DEFAULT NULL,
`LanguageSecondary` varchar(20) DEFAULT NULL,
`EnglishPercent` int DEFAULT NULL,
`Note` text,
`Vehicle` text,
`Address` text,
`LastContactDate` date DEFAULT NULL,
`NextContactDate` date DEFAULT NULL,
`NextContactNote` text,
`RecruitmentMethod` varchar(100) DEFAULT 'Hospital',
`AssignedLab` int DEFAULT NULL,
`CreatedBy` int DEFAULT NULL,
`UpdatedBy` int DEFAULT NULL,
`NoMoreContact` int DEFAULT '0',
`createdAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updatedAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `CreatedBy` (`CreatedBy`),
KEY `UpdatedBy` (`UpdatedBy`),
KEY `CurrentLab_idx` (`AssignedLab`),
CONSTRAINT `AssignedLab` FOREIGN KEY (`AssignedLab`) REFERENCES `Lab` (`id`),
CONSTRAINT `Family_ibfk_1` FOREIGN KEY (`CreatedBy`) REFERENCES `Personnel` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT `Family_ibfk_2` FOREIGN KEY (`UpdatedBy`) REFERENCES `Personnel` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=22865 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `Feedback`
--
DROP TABLE IF EXISTS `Feedback`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `Feedback` (
`id` int NOT NULL AUTO_INCREMENT,
`Content` longtext NOT NULL,
`CreatedBy` int NOT NULL,
`createdAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updatedAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`CurrentPage` varchar(45) NOT NULL,
`Title` varchar(45) NOT NULL,
`Email` varchar(45) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id_UNIQUE` (`id`),
KEY `FK_Personnel_idx` (`CreatedBy`),
CONSTRAINT `FK_Personnel` FOREIGN KEY (`CreatedBy`) REFERENCES `Personnel` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `Lab`
--
DROP TABLE IF EXISTS `Lab`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `Lab` (
`id` int NOT NULL AUTO_INCREMENT,
`LabName` varchar(45) NOT NULL,
`PI` varchar(45) NOT NULL,
`Email` varchar(45) DEFAULT NULL,
`createdAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updatedAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`EmailOpening` mediumtext,
`EmailClosing` mediumtext,
`Location` mediumtext,
`TransportationInstructions` mediumtext,
`ZoomLink` varchar(300) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `LabName` (`LabName`),
UNIQUE KEY `PI` (`PI`),
UNIQUE KEY `Email_UNIQUE` (`Email`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `Personnel`
--
DROP TABLE IF EXISTS `Personnel`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `Personnel` (
`id` int NOT NULL AUTO_INCREMENT,
`Name` varchar(45) NOT NULL,
`Initial` varchar(45) NOT NULL,
`Role` enum('Admin','PostDoc','PI','GradStudent','Undergrad','RA','Lab manager','Staff') NOT NULL,
`FK_Lab` int DEFAULT NULL,
`Active` int NOT NULL DEFAULT '1',
`Password` varchar(255) NOT NULL,
`Email` varchar(45) NOT NULL,
`Calendar` varchar(100) NOT NULL,
`Phone` varchar(10) DEFAULT NULL,
`createdAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updatedAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`temporaryPassword` tinyint NOT NULL DEFAULT '0',
`ZoomLink` varchar(300) DEFAULT NULL,
`Retired` int NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `Initial` (`Initial`),
UNIQUE KEY `Email` (`Email`),
UNIQUE KEY `Calendar` (`Calendar`),
KEY `Personnel_ibfk_1` (`FK_Lab`),
CONSTRAINT `Personnel_ibfk_1` FOREIGN KEY (`FK_Lab`) REFERENCES `Lab` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=80 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `Schedule`
--
DROP TABLE IF EXISTS `Schedule`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `Schedule` (
`id` int NOT NULL AUTO_INCREMENT,
`AppointmentTime` datetime DEFAULT NULL,
`Status` enum('Confirmed','TBD','Rescheduling','Rescheduled','No Show','Cancelled','Rejected') NOT NULL,
`Reminded` int NOT NULL DEFAULT '0',
`ThankYouEmail` int NOT NULL DEFAULT '0',
`Note` text,
`ScheduledBy` int NOT NULL,
`FK_Family` int NOT NULL,
`eventURL` varchar(150) DEFAULT NULL,
`calendarEventId` varchar(30) DEFAULT NULL,
`createdAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updatedAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`Completed` tinyint NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `FK_Family_idx` (`FK_Family`),
KEY `ScheduledBy_idx` (`ScheduledBy`),
CONSTRAINT `FK_Family` FOREIGN KEY (`FK_Family`) REFERENCES `Family` (`id`),
CONSTRAINT `ScheduledBy` FOREIGN KEY (`ScheduledBy`) REFERENCES `Personnel` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=289 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `Sibling`
--
DROP TABLE IF EXISTS `Sibling`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `Sibling` (
`id` int NOT NULL AUTO_INCREMENT,
`FK_Child` int NOT NULL,
`Sibling` int NOT NULL,
`createdAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updatedAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`),
UNIQUE KEY `actions_unique` (`FK_Child`,`Sibling`),
KEY `Sibling` (`Sibling`),
CONSTRAINT `Sibling_ibfk_1` FOREIGN KEY (`FK_Child`) REFERENCES `Child` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `Sibling_ibfk_2` FOREIGN KEY (`Sibling`) REFERENCES `Child` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=44303 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `Study`
--
DROP TABLE IF EXISTS `Study`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `Study` (
`id` int NOT NULL AUTO_INCREMENT,
`StudyName` varchar(45) NOT NULL,
`MinAge` decimal(5,2) NOT NULL,
`MaxAge` decimal(5,2) NOT NULL,
`Description` text NOT NULL,
`EmailTemplate` text NOT NULL,
`Completed` int NOT NULL DEFAULT '0',
`FK_Lab` int NOT NULL,
`FK_Personnel` int NOT NULL,
`StudyType` varchar(30) NOT NULL,
`ASDParticipant` enum('Include','Exclude','Only') NOT NULL DEFAULT 'Include',
`PrematureParticipant` enum('Include','Exclude','Only') NOT NULL DEFAULT 'Include',
`VisionLossParticipant` enum('Include','Exclude','Only') NOT NULL DEFAULT 'Include',
`HearingLossParticipant` enum('Include','Exclude','Only') NOT NULL DEFAULT 'Include',
`IllParticipant` enum('Include','Exclude','Only') NOT NULL DEFAULT 'Include',
`createdAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updatedAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`ReminderTemplate` text NOT NULL,
`FollowUPEmailSnippet` text,
PRIMARY KEY (`id`),
KEY `FK_Lab` (`FK_Lab`),
KEY `FK_Personnel_idx` (`FK_Personnel`),
CONSTRAINT `Personnel_ibfk_3` FOREIGN KEY (`FK_Personnel`) REFERENCES `Personnel` (`id`),
CONSTRAINT `Study_ibfk_1` FOREIGN KEY (`FK_Lab`) REFERENCES `Lab` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2020-11-02 8:51:04
| true |
1dfaf882a1594d4dc6547b46286af6b5a6544822 | SQL | lqhjava/java-leaning | /shop.sql | UTF-8 | 1,058 | 3.21875 | 3 | [] | no_license | # java-leaning
This is I learn java
create database if not exists shop ;
use shop;
create table goods(
goods_id int primary key comment '商品编号',
goods_name varchar(20) not null comment '商品名',
goods_uniprice float(6,2) default 0 not null comment '单价',
goods_category varchar(10) not null comment '商品类别',
goods_providder varchar(20) comment '供应商'
);
create table custumer(
custumer_id int not null primary key comment '客户号',
name varchar(20) not null comment '客户姓名',
address varchar(20) default 0 comment '客户住址',
email int unique key not null comment '客户邮箱',
sex enum('男','女')comment '客户性别',
card_id int unique key comment'客户身份证'
);
create table purchase(
order_id int primary key auto_increment comment '订单号',
custumer_id int comment '客户号',
goods_id int comment '商品号',
nums int default 0 comment '购买数量',
foreign key (custumer_id) references custumer(custumer_id),
foreign key (goods_id) references goods(goods_id)
);
| true |
b94d90ed57de410ff73acfde63a837f33e277f48 | SQL | kyle624701089/crawler | /src/main/resources/SQL/car_type.sql | UTF-8 | 906 | 3.0625 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : test
Source Server Type : MySQL
Source Server Version : 50525
Source Host : localhost:3306
Source Schema : crawler
Target Server Type : MySQL
Target Server Version : 50525
File Encoding : 65001
Date: 01/04/2018 18:15:39
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for car_type
-- ----------------------------
DROP TABLE IF EXISTS `car_type`;
CREATE TABLE `car_type` (
`ID` int(10) NOT NULL AUTO_INCREMENT,
`NAME` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '车型名称',
`CAR_BRAND_ID` int(10) NOT NULL COMMENT 'car_brand id',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 7704 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
SET FOREIGN_KEY_CHECKS = 1;
| true |
035cac33ef6723d7ce53ee703b2306ec40215111 | SQL | achmadnabawi/sparkdata | /wrt/data_base_process/caiji/t_wrt_caiji_record_newid_feed.sql | UTF-8 | 864 | 3.8125 | 4 | [] | no_license | drop table wl_analysis.t_wrt_caiji_record_newid_feed;
create table wl_analysis.t_wrt_caiji_record_newid_feed(
item_id string comment '商品id'
)
COMMENT '采集评论所需的新晋商品id'
PARTITIONED by (ds string)
location '/commit/ids_4_crawler/shopitem_newid_feed';
--新晋商品且销量不超过5000和1000
insert overwrite table wl_analysis.t_wrt_caiji_record_newid_feed partition(ds = '20170425')
select item_id from
(
select
t1.item_id,
t1.sold
from
(
select item_id,sold from wl_base.t_base_ec_shopitem_c where ds = '20170422' and sold <= 5000
union all
select item_id,sold from wl_base.t_base_ec_shopitem_b where ds = '20170424' and sold <= 1000
)t1
left join
(select item_id from wl_base.t_base_ec_record_dev_new where ds = 'true' group by item_id)tt2
on
t1.item_id = cast(tt2.item_id as string)
WHERE
tt2.item_id is null
)t
order by sold desc;
| true |
f485491a402b70e08d7da5668e978b2d9432fd75 | SQL | facundopereztomasek/mysql-docker-testing-db | /examples/create-database.sql | UTF-8 | 1,485 | 4.5 | 4 | [] | no_license | -- This remove the databse if it exists
DROP DATABASE IF EXISTS movies;
-- This creates the database with the utf8 charset encoding
CREATE DATABASE movies
CHARACTER SET utf8
COLLATE utf8_bin;
-- This tells mysql to select the movies database in order to run next senteces
USE movies;
-- Creates movies table
CREATE TABLE movies (
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
title VARCHAR(255) NOT NULL,
year YEAR
) ENGINE=INNODB;
-- Creates genres table
CREATE TABLE genres (
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255) NOT NULL
) ENGINE=INNODB;
-- Creates pivot table (many to many: many movies has many genres)
CREATE TABLE movie_genres (
movie_id INT UNSIGNED,
genre_id INT UNSIGNED,
FOREIGN KEY (movie_id)
REFERENCES movies(id)
ON DELETE CASCADE,
FOREIGN KEY (genre_id)
REFERENCES genres(id)
ON DELETE CASCADE
) ENGINE=INNODB;
-- Insert some movie genres
INSERT
INTO
genres (name)
VALUES
('Acción'),
('Suspenso'),
('Infantil'),
('Terror'),
('Policial'),
('Animación'),
('Ficción');
-- Insert some movie titles
INSERT
INTO
movies (title, year)
VALUES
('Toy Story', 1997),
('Matrix', 2003);
-- Insert some movie-genre relationships
INSERT
INTO
movie_genres (movie_id, genre_id)
VALUES
(1, 3),
(1, 6),
(2, 1),
(2, 2),
(2, 7);
-- Select movies with genres
SELECT *
FROM movies
LEFT JOIN movie_genres ON movies.id = movie_genres.movie_id
LEFT JOIN genres ON genres.id = movie_genres.genre_id; | true |
da064813ccdf1a01d78dc57677427499485230b8 | SQL | zeeiqbal100/ajax | /ajax_demo.sql | UTF-8 | 1,314 | 2.765625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 06, 2017 at 04:37 PM
-- Server version: 10.1.26-MariaDB
-- PHP Version: 7.1.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `ajax_demo`
--
-- --------------------------------------------------------
--
-- Table structure for table `user`
--
CREATE TABLE `user` (
`FirstName` varchar(255) NOT NULL,
`LastName` varchar(255) NOT NULL,
`Age` int(10) NOT NULL,
`Hometown` varchar(255) NOT NULL,
`Job` varchar(255) NOT NULL,
`id` int(4) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `user`
--
INSERT INTO `user` (`FirstName`, `LastName`, `Age`, `Hometown`, `Job`, `id`) VALUES
('z', 'i', 10, 'ny', 'dev', 0),
('z', 'i', 10, 'n', 'r', 1);
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
| true |
a70659a21092c864af0f05f5beff8f7b59a9bf61 | SQL | jastack/sqlite3 | /import_db.sql | UTF-8 | 1,897 | 4.0625 | 4 | [] | no_license | DROP TABLE IF EXISTS users;
CREATE TABLE users (
id INTEGER PRIMARY KEY,
fname TEXT NOT NULL,
lname TEXT NOT NULL
);
DROP TABLE IF EXISTS questions;
CREATE TABLE questions (
id INTEGER PRIMARY KEY,
title TEXT NOT NULL,
body TEXT NOT NULL,
user_id INTEGER NOT NULL,
FOREIGN KEY (user_id) REFERENCES users(id)
);
DROP TABLE IF EXISTS question_follows;
CREATE TABLE question_follows (
id INTEGER PRIMARY KEY,
user_id INTEGER NOT NULL,
questions_id INTEGER NOT NULL,
FOREIGN KEY (user_id) REFERENCES users(id)
FOREIGN KEY ( questions_id) REFERENCES questions(id)
);
DROP TABLE IF EXISTS replies;
CREATE TABLE replies (
id INTEGER PRIMARY KEY,
body TEXT,
replies_id INTEGER,
user_id INTEGER NOT NULL,
questions_id INTEGER NOT NULL,
FOREIGN KEY (user_id) REFERENCES users(id)
FOREIGN KEY ( questions_id) REFERENCES questions(id)
FOREIGN KEY (replies_id) REFERENCES replies(id)
);
DROP TABLE IF EXISTS question_like;
CREATE TABLE question_like (
id INTEGER PRIMARY KEY,
user_id INTEGER NOT NULL,
questions_id INTEGER NOT NULL,
FOREIGN KEY (user_id) REFERENCES users(id)
FOREIGN KEY ( questions_id) REFERENCES questions(id)
);
INSERT INTO
users (fname, lname)
VALUES
('Kevin', 'Mckalister'),
('James', 'Jones'),
('Scrooge','None');
INSERT INTO
questions (title, body, user_id)
VALUES
('Kevin''s comment''s', 'This is a cool site!', 1),
('James''s comment''s', 'I like this too!', 2);
INSERT INTO
question_follows (user_id, questions_id)
VALUES
(1, 1),
(1, 2),
(2, 1),
(2, 2),
(3, 2);
INSERT INTO
replies (body, replies_id, user_id, questions_id)
VALUES
('Really? You think so?', NULL, 1, 2),
('Yes I do think so.', 1, 2, 2);
INSERT INTO
question_like (user_id, questions_id)
VALUES
(1, 1),
(2, 1),
(3, 1),
(2, 2);
| true |
c93ead571dfdf01fe5fad521254e37b2afc3f2ab | SQL | danielamezcua/BDA | /Primera entrega/Transacciones/5.sql | UTF-8 | 2,478 | 2.609375 | 3 | [] | no_license | -- MTY
---------------------------------------
CREATE OR REPLACE PROCEDURE EDITARDEFECTO
(
P_ID_TIPO_DEFECTO IN NUMBER,
P_DESCRIPCION IN VARCHAR2
)
AS
BEGIN
UPDATE DEFECTO SET DESCRIPCION = P_DESCRIPCION WHERE ID_TIPO_DEFECTO = P_ID_TIPO_DEFECTO;
UPDATE DEFECTO@HMO SET DESCRIPCION = P_DESCRIPCION WHERE ID_TIPO_DEFECTO = P_ID_TIPO_DEFECTO;
UPDATE DEFECTO@QURO SET DESCRIPCION = P_DESCRIPCION WHERE ID_TIPO_DEFECTO = P_ID_TIPO_DEFECTO;
UPDATE DEFECTO@TG SET DESCRIPCION = P_DESCRIPCION WHERE ID_TIPO_DEFECTO = P_ID_TIPO_DEFECTO;
COMMIT;
END EDITARDEFECTO;
/
---------------------------------------
-- HMO
---------------------------------------
CREATE OR REPLACE PROCEDURE EDITARDEFECTO
(
P_ID_TIPO_DEFECTO IN NUMBER,
P_DESCRIPCION IN VARCHAR2
)
AS
BEGIN
UPDATE DEFECTO SET DESCRIPCION = P_DESCRIPCION WHERE ID_TIPO_DEFECTO = P_ID_TIPO_DEFECTO;
UPDATE DEFECTO@MTY SET DESCRIPCION = P_DESCRIPCION WHERE ID_TIPO_DEFECTO = P_ID_TIPO_DEFECTO;
UPDATE DEFECTO@QURO SET DESCRIPCION = P_DESCRIPCION WHERE ID_TIPO_DEFECTO = P_ID_TIPO_DEFECTO;
UPDATE DEFECTO@TG SET DESCRIPCION = P_DESCRIPCION WHERE ID_TIPO_DEFECTO = P_ID_TIPO_DEFECTO;
COMMIT;
END EDITARDEFECTO;
/
---------------------------------------
-- QURO
---------------------------------------
CREATE OR REPLACE PROCEDURE EDITARDEFECTO
(
P_ID_TIPO_DEFECTO IN NUMBER,
P_DESCRIPCION IN VARCHAR2
)
AS
BEGIN
UPDATE DEFECTO SET DESCRIPCION = P_DESCRIPCION WHERE ID_TIPO_DEFECTO = P_ID_TIPO_DEFECTO;
UPDATE DEFECTO@HMO SET DESCRIPCION = P_DESCRIPCION WHERE ID_TIPO_DEFECTO = P_ID_TIPO_DEFECTO;
UPDATE DEFECTO@MTY SET DESCRIPCION = P_DESCRIPCION WHERE ID_TIPO_DEFECTO = P_ID_TIPO_DEFECTO;
UPDATE DEFECTO@TG SET DESCRIPCION = P_DESCRIPCION WHERE ID_TIPO_DEFECTO = P_ID_TIPO_DEFECTO;
COMMIT;
END EDITARDEFECTO;
/
---------------------------------------
-- TG
---------------------------------------
CREATE OR REPLACE PROCEDURE EDITARDEFECTO
(
P_ID_TIPO_DEFECTO IN NUMBER,
P_DESCRIPCION IN VARCHAR2
)
AS
BEGIN
UPDATE DEFECTO SET DESCRIPCION = P_DESCRIPCION WHERE ID_TIPO_DEFECTO = P_ID_TIPO_DEFECTO;
UPDATE DEFECTO@HMO SET DESCRIPCION = P_DESCRIPCION WHERE ID_TIPO_DEFECTO = P_ID_TIPO_DEFECTO;
UPDATE DEFECTO@QURO SET DESCRIPCION = P_DESCRIPCION WHERE ID_TIPO_DEFECTO = P_ID_TIPO_DEFECTO;
UPDATE DEFECTO@MTY SET DESCRIPCION = P_DESCRIPCION WHERE ID_TIPO_DEFECTO = P_ID_TIPO_DEFECTO;
COMMIT;
END EDITARDEFECTO;
/
| true |
61db2ae3618118e140e10f2d87b1547e270071f5 | SQL | akhandeshi/transmart-data | /ddl/oracle/i2b2demodata/qt_query_result_instance.sql | UTF-8 | 711 | 2.671875 | 3 | [] | no_license | --
-- Type: TABLE; Owner: I2B2DEMODATA; Name: QT_QUERY_RESULT_INSTANCE
--
CREATE TABLE "I2B2DEMODATA"."QT_QUERY_RESULT_INSTANCE"
( "RESULT_INSTANCE_ID" NUMBER(5,0),
"QUERY_INSTANCE_ID" NUMBER(5,0),
"RESULT_TYPE_ID" NUMBER(3,0) NOT NULL ENABLE,
"SET_SIZE" NUMBER(10,0),
"START_DATE" DATE NOT NULL ENABLE,
"END_DATE" DATE,
"STATUS_TYPE_ID" NUMBER(3,0) NOT NULL ENABLE,
"DELETE_FLAG" VARCHAR2(3 BYTE),
"MESSAGE" CLOB,
"DESCRIPTION" VARCHAR2(200 BYTE),
"REAL_SET_SIZE" NUMBER(10,0),
"OBFUSC_METHOD" VARCHAR2(500 BYTE)
) SEGMENT CREATION IMMEDIATE
TABLESPACE "I2B2_DATA"
LOB ("MESSAGE") STORE AS BASICFILE (
TABLESPACE "I2B2_DATA" ENABLE STORAGE IN ROW CHUNK 8192 RETENTION
NOCACHE LOGGING ) ;
| true |
7743eedd4078c5c66bb9dcf2b04b26d671abde4a | SQL | andreivercosa/My_SQL | /Aula 01 BD_5.sql | UTF-8 | 170 | 2.609375 | 3 | [] | no_license |
CREATE TABLE filho
(
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
idPai INT ,
nome VARCHAR(50),
dtCadastro DATE,
FOREIGN KEY(idPai) REFERENCES pai(id)
) | true |
df27eba77c83eee05e98741ec352961eb28e95ff | SQL | SairamShanmuganathan/webprojects | /career/career.sql | UTF-8 | 9,973 | 3.546875 | 4 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 27, 2017 at 10:04 AM
-- Server version: 5.7.14
-- PHP Version: 5.6.25
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: `career`
--
-- --------------------------------------------------------
--
-- Table structure for table `questions`
--
CREATE TABLE `questions` (
`count` int(10) NOT NULL,
`question` varchar(2000) NOT NULL,
`opt1` varchar(100) NOT NULL,
`opt2` varchar(100) NOT NULL,
`opt3` varchar(100) NOT NULL,
`opt4` varchar(100) NOT NULL,
`ans` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `questions`
--
INSERT INTO `questions` (`count`, `question`, `opt1`, `opt2`, `opt3`, `opt4`, `ans`) VALUES
(1, 'Keep my thoughts to myself.', 'Very Inaccurate, not like me at all.', 'Moderately inaccurate, not like me.', 'Moderately accurate, like me.', 'Very accurate, much like me.', ''),
(2, 'Am the life of the party.', 'Very Inaccurate, not like me at all.', 'Moderately inaccurate, not like me', 'Moderately accurate, like me', 'Very accurate, much like me', ''),
(3, 'Talk to a lot of different people at parties.', 'Very Inaccurate, not like me at all.', 'Moderately inaccurate, not like me.', 'Moderately accurate, like me.', 'Very accurate, much like me.', ''),
(4, 'Which seems to be more natural and satisfying', 'Frequent periods of quiet and concentration by yourself ', 'Extroverted', 'Private concern on issues', 'Frequent socializing and interaction with others ', ''),
(5, 'Choose the best word that describes you the most', 'Extrovert', 'Private', 'Exotic', 'Extrovert', ''),
(6, 'Are you drawn more work that deals with', 'Possibilities', 'Imaginations', 'Creativeness', 'Realities', ''),
(7, 'You would describe yourself as', 'Questioning', 'Motivating', 'Appreciating', 'Practical', ''),
(8, 'If you fix deadlines, what is your view on deadlines', 'No need such', 'Needed if essential', 'SOmetimes', 'Everytime', ''),
(9, 'You make decisions by', 'Asking others view', 'Get to know what the others decision are', 'Start accepting your parents decision', 'Make my own decision', ''),
(10, 'Do you read directions', 'Never', 'Sometimes', 'Often', 'EVerytime', ''),
(11, 'What would you tell about others', 'Talk back about others', 'Never mind others', 'Tell them the wrong among the crowd', 'Calling them alone and expressing their wrong', ''),
(12, 'Do you tend to more persuaded by', 'Facts', 'Data', 'Enthusiasm', 'Sin1cereity', ''),
(13, 'When conducting business,you are more formal with', 'Formal speech', 'Just a smile', 'Handshake', 'A formal entity', ''),
(14, 'WHat do you do in your leisure time', 'Music', 'Sleeping', 'Reading', 'Sports', ''),
(15, 'How you view your life', 'Literal', 'Boring', 'Appreciative', 'Practical', ''),
(16, 'During conversations with associates how would you react', 'Act too much', 'Act like you know everything', 'Act like I know something', 'Act like I dont know anything even if I know', ''),
(17, 'Are you more likely to conduct a meeting that is', 'Improper', 'PLanned but not to the executable level', 'Planned and can be implemented', 'Implementing and finding the best results out of it.', ''),
(18, 'At work are you more naturally inclined to focus on the', 'Here and now', 'Present and Past', 'Present and Future', 'Only Future', ''),
(19, 'In a meeting you are apt to', 'Hold your tongue and Listen', 'Remain silent forever', 'GO get people\'s attention', 'SPeak up', ''),
(20, '\r\nyou have the tendency to', '\r\nTake action first ', 'Discuss and ask questions first', 'Plan First', 'Implement the plan', ''),
(21, 'Others generally consider you to be more', 'Private', 'Introvert', 'Extrovert', 'OUTgoing', ''),
(22, 'You tend to be more', 'Easy going', 'Free spirited', 'Serious', 'Self-Disciplined', ''),
(23, 'When faced with a challenge in the work, you rely on', 'Instinct on it', 'Try to overcome them', 'Tell reasons', 'Experience to get through it', ''),
(24, 'You consider yourself a person that likes to focus on', 'What is ', 'What happened', 'What would have happen', 'All', ''),
(25, 'When meeting with others are you more likely to', 'Draw up a conclusion ', 'Gather information about the people priorily and compare yourself', 'Gaather some knowledge after the meet', 'GAther information priorily', ''),
(26, 'At a business function with many strangers, would you most likely', 'Sit alone', 'Mingle with selected gang', 'Mingle with few', 'Mingle with all', ''),
(27, 'You view yourself as', 'Animated ', 'Contained', 'Composed', 'Spirited', ''),
(28, 'you welcome work that', 'Firmly grounded with today', 'Doesnt matter the opportunities, matters only interest', 'Keep searching for the opportunities', 'Plan what would be my profit out of it and decide what to do', ''),
(29, 'you would more likely compliment someone for their', 'Apology', 'Sorrow', 'Insight', 'Compassion', ''),
(30, 'In general, You are more', 'Soft hearted', 'Skilled', 'Goal Oriented', 'Strong willed', ''),
(31, 'In a group of new co-workers are you initially inclined to', 'Only Observe', 'Keep Yourself a distinct position and stay there forever not involving', 'Jump and get involved', 'Drag others attention', ''),
(32, 'Choose the word that describes you the most', 'Structured ', 'Flexible', 'Practical', 'Tactical', ''),
(33, 'With unfamiliar colleagues are you more prone to', 'Mind my own business', 'Try to start up a conversation', 'Try catching their attraction', 'Help them', ''),
(34, 'What is more satisfying at work', 'Planning', 'Action', 'Going with the flow', 'Organising', ''),
(35, 'Do you generally prefer making day to day decisions', 'Often', 'Rare', 'Sometimes', 'Everytime', ''),
(36, 'How do you think and speak in terms of', 'Facts', 'Data', 'Generalities', 'Specifics', ''),
(37, 'It is a greater fault to', 'Lack reason', 'Lack knowing the issues', 'Lack feelings', 'Lack emotions', ''),
(38, 'Are you a person that is more inclined to', 'TO obey others Word though it would be wrong', 'Ask for many people and decide', 'Be in control', 'Be adaptable', ''),
(39, 'In your daily work routine do you find more comfort in', 'Sticking to somewhat similar tasks and routines', 'Doing the regular duties', 'Thinking Creatively', 'Regularly doing something very different ', ''),
(40, 'What is more enjoyable to you', 'Completing an existing project', 'Wishing new ideas from others', 'Creating a new idea', 'Creating a new idea and implementing them', ''),
(41, 'In general, do you have more of a tendency to be', 'Introspective', 'Up-front', 'Straight forward', 'Reflective', ''),
(42, 'Are you more content with your day when', 'You mostly allow it to unfold', 'You make different plans', 'You rely on different strategic and tactical plans', 'You make specific plans', ''),
(43, 'How do you find yourself', 'Feeling', 'Thinking', 'Creative', 'Implementive', ''),
(44, 'You consider the notions of a dreamer to be', 'A waste of time and energy unless there is a practical purpose ', 'A more Time wasting approach and their works are considered waste at last', 'Motivating', 'Inspirational and enlightening ', ''),
(45, 'Learn how the body functions.', 'Not Interested', 'Slightly Interested', 'Interested', 'Very Interested', ''),
(46, 'Conduct experiments and make observations.', 'Not Interested', 'Slightly Interested', 'Interested', 'Very Interested', ''),
(47, 'Advise people about healthy lifestyle habits.', 'Not Interested', 'Slightly Interested', 'Interested', 'Very Interested', ''),
(48, 'Learn how a business operates.', 'Not interested', 'Slightly Interested', 'Interested', 'Very interested', ''),
(49, 'Take care of people even strangers.', 'Not Interested', 'Interested', 'Slightly Interested', 'Very Interested', ''),
(50, 'Troubleshooting Technological Issues', 'Not interested', 'Slightly interested', 'Interested', 'Very Interested', ''),
(51, 'A career that takes less than 2 years of education', 'Not Interested', 'Interested', 'Slightly Inyterested', 'Very Interested', ''),
(52, 'Serve the community and keep it safe', 'Not interested', 'Slightly Interested', 'Interested', 'Very interested', ''),
(53, 'Help people during a natural disaster or emergency', 'Not Interested ', 'SLightly interested', 'Interested', 'Very Interested', ''),
(54, 'Ensure federal,state, and local laws are abided by', 'Not Interested', 'Slightly interested', 'Interested', 'Very Interested', ''),
(55, 'Supervise, hire and mentor others', 'Not Interested', 'Slightly Interested', 'Interested', 'Not interested', ''),
(56, 'Critique art,music or performance', 'Not interested', 'Slightly Interested', 'Interested', 'Very Interested', ''),
(57, 'Learn how to invest money', 'Not Interested ', 'Slightly interested', 'Interested', 'Very Interested', ''),
(58, 'Design works of art for others to enjoy.', 'Not Interested', 'Slightly Interested', 'Interested', 'Very Interested', ''),
(59, 'Teach people new skills', 'Not Interested ', 'Interested ', 'Slightly Interested', 'Very Interested', ''),
(60, 'Motivate and help others fulfill their goals', 'Not Interested', 'Slightly Interested', 'Interested', 'Very Interested', '');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `questions`
--
ALTER TABLE `questions`
ADD PRIMARY KEY (`count`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `questions`
--
ALTER TABLE `questions`
MODIFY `count` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=61;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
| true |
a5951a9f3b207efa18e2f6cc33024cbdfac86863 | SQL | kanjengsaifu/PerangkatMengajar | /pbm2/pbm(1).sql | UTF-8 | 11,690 | 3.015625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.4.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jun 19, 2016 at 06:49 PM
-- Server version: 5.6.26
-- PHP Version: 5.6.12
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: `pbm`
--
-- --------------------------------------------------------
--
-- Table structure for table `bacaan`
--
CREATE TABLE IF NOT EXISTS `bacaan` (
`KODE_BACAAN` int(11) NOT NULL,
`KODE_MK` varchar(10) DEFAULT NULL,
`JUDUL` varchar(50) NOT NULL,
`TAHUN` int(11) NOT NULL,
`NAMA_PENULIS` varchar(50) NOT NULL,
`NAMA_PENERBIT` varchar(25) NOT NULL,
`KOTA_PENERBIT` varchar(15) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
--
-- Dumping data for table `bacaan`
--
INSERT INTO `bacaan` (`KODE_BACAAN`, `KODE_MK`, `JUDUL`, `TAHUN`, `NAMA_PENULIS`, `NAMA_PENERBIT`, `KOTA_PENERBIT`) VALUES
(1, 'MK003', 'mmm', 2013, 'mmm', 'mmm', 'mmm'),
(2, 'MK001', 'Zahran', 2010, 'Rahadian', 'CV', 'Surabaya');
-- --------------------------------------------------------
--
-- Table structure for table `daftar_ss`
--
CREATE TABLE IF NOT EXISTS `daftar_ss` (
`KODE_SS` varchar(10) NOT NULL,
`KODE_MK` varchar(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `dosen`
--
CREATE TABLE IF NOT EXISTS `dosen` (
`NIP` varchar(20) NOT NULL,
`NAMA` varchar(50) NOT NULL,
`PASSWORD` varchar(45) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `dosen`
--
INSERT INTO `dosen` (`NIP`, `NAMA`, `PASSWORD`) VALUES
('105', 'Rahadian', 'rahadian'),
('123123', 'indra kharisma rahardjana', 'indra'),
('123123123', 'badrus zaman', 'badrus'),
('1234', 'Admin', '81dc9bdb52d04dc20036dbd8313ed055'),
('123456', 'qwertyu', 'qwert'),
('1334010105', 'Zahran', 'zahran');
-- --------------------------------------------------------
--
-- Table structure for table `fakultas`
--
CREATE TABLE IF NOT EXISTS `fakultas` (
`ID_FAK` varchar(10) NOT NULL,
`NAMA_FAK` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `fakultas`
--
INSERT INTO `fakultas` (`ID_FAK`, `NAMA_FAK`) VALUES
('FEB', 'Fakultas Ekonomi dan Bisnis'),
('FF', 'Fakultas Farmasi'),
('FH', 'Fakultas Hukum'),
('FIB', 'Fakultas Ilmu Budaya'),
('FISIP', 'Fakultas Ilmu Sosial dan Ilmu Politik'),
('FK', 'Fakultas Kedokteran'),
('FKG', 'Fakultas Kedokteran Gigi'),
('FKH', 'Fakultas Kedokteran Hewan'),
('FKM', 'Fakultas Kesehatan Masyarakat'),
('FKP', 'Fakultas Keperawatan'),
('FPK', 'Fakultas Perikanan dan Kelautan'),
('FPsi', 'Fakultas Psikologi'),
('FST', 'Fakultas Sains dan Teknologi'),
('FVok', 'Fakultas Vokasi');
-- --------------------------------------------------------
--
-- Table structure for table `kompetensi_khusus`
--
CREATE TABLE IF NOT EXISTS `kompetensi_khusus` (
`KODE_KK` varchar(10) NOT NULL,
`KODE_MK` varchar(10) DEFAULT NULL,
`NAMA_KK` varchar(35) NOT NULL,
`NAMA_PB` varchar(35) NOT NULL,
`SUB_PB` varchar(100) NOT NULL,
`WAKTU` varchar(7) NOT NULL,
`METODE` varchar(25) NOT NULL,
`MEDIA` varchar(25) NOT NULL,
`BACAAN` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `kompetensi_khusus`
--
INSERT INTO `kompetensi_khusus` (`KODE_KK`, `KODE_MK`, `NAMA_KK`, `NAMA_PB`, `SUB_PB`, `WAKTU`, `METODE`, `MEDIA`, `BACAAN`) VALUES
('coba', 'MK001', 'Coba dulu', 'Coba dulu', '1. mother\r\n2. father\r\n', '150mnt', 'Presentasi', 'White Board', 'MK001'),
('Coba dulu', 'MK003', 'Coba dulu', 'Coba dulu', '1. a\r\n2. b\r\n', '150mnt', 'Presentasi', 'White Board', 'MK003'),
('mahasiswa ', 'KD116', 'persamaan dan pertidaksamaan', 'turunan linier', '1. persamaaan fungsi linier\r\n2. fungsi turunan\r\n3. pertidaksamaan\r\n', '100mnt', 'Ceramah', 'Hand Out', 'MK003');
-- --------------------------------------------------------
--
-- Table structure for table `mata_kuliah`
--
CREATE TABLE IF NOT EXISTS `mata_kuliah` (
`KODE_MK` varchar(10) NOT NULL,
`NIP` varchar(20) NOT NULL,
`KODE_SS` varchar(10) DEFAULT NULL,
`NAMA_MK` varchar(50) NOT NULL,
`BEBAN_STUDI` int(11) NOT NULL,
`SEMESTER` int(11) NOT NULL,
`KOMPETENSI` text,
`DESKRIPSI` text,
`PRASYARAT` text,
`ATRIBUT_SS` varchar(25) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `mata_kuliah`
--
INSERT INTO `mata_kuliah` (`KODE_MK`, `NIP`, `KODE_SS`, `NAMA_MK`, `BEBAN_STUDI`, `SEMESTER`, `KOMPETENSI`, `DESKRIPSI`, `PRASYARAT`, `ATRIBUT_SS`) VALUES
('KD116', '123123', NULL, 'kalkulus', 4, 6, 'qwertyuiopasdfghjkl', 'pengembangan sistem informasi', 'kudu a', 'Keaktifan'),
('MK001', '1334010105', NULL, 'Jaringan Komputer', 2, 1, 'Coba dulu', 'Coba dulu', 'Coba dulu', 'Kejujuran'),
('MK002', '1234', NULL, 'PSI', 3, 4, 'Coba dulu', 'Coba dulu', 'Coba dulu', 'Kedisiplinan'),
('MK003', '123123', NULL, 'AAAAA', 2, 4, 'Coba dulu', 'Coba dulu', 'Coba dulu', 'Kedisiplinan');
-- --------------------------------------------------------
--
-- Table structure for table `mengajar`
--
CREATE TABLE IF NOT EXISTS `mengajar` (
`SOFTSKILL` int(100) NOT NULL,
`STRATEGI_PERKULIAHAN` varchar(250) NOT NULL,
`PERTEMUAN` int(5) NOT NULL,
`NOTE` varchar(250) NOT NULL,
`KUIS` int(5) NOT NULL,
`UAS` int(5) NOT NULL,
`TUGAS` int(5) NOT NULL,
`TUTOR` int(5) NOT NULL,
`UTS` int(5) NOT NULL,
`HARI_TANGGAL` date NOT NULL,
`KUIS_COMMENT` varchar(255) DEFAULT NULL,
`UAS_COMMENT` varchar(255) DEFAULT NULL,
`SOFTSKILL_COMMENT` varchar(255) DEFAULT NULL,
`TUGAS_COMMENT` varchar(255) DEFAULT NULL,
`TUTOR_COMMENT` varchar(255) DEFAULT NULL,
`UTS_COMMENT` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `mengajar`
--
INSERT INTO `mengajar` (`SOFTSKILL`, `STRATEGI_PERKULIAHAN`, `PERTEMUAN`, `NOTE`, `KUIS`, `UAS`, `TUGAS`, `TUTOR`, `UTS`, `HARI_TANGGAL`, `KUIS_COMMENT`, `UAS_COMMENT`, `SOFTSKILL_COMMENT`, `TUGAS_COMMENT`, `TUTOR_COMMENT`, `UTS_COMMENT`) VALUES
(1, 'asdasdasd', 0, '', 2, 3, 1, 2, 1, '2010-04-03', 'asdasd', 'asdasd', 'asdasd', 'asdasd', 'asdasd', 'asdasd'),
(1234, '', 0, '', 0, 0, 0, 0, 0, '0000-00-00', NULL, NULL, NULL, NULL, NULL, NULL);
-- --------------------------------------------------------
--
-- Table structure for table `prasyarat`
--
CREATE TABLE IF NOT EXISTS `prasyarat` (
`TAHAP_PEMBELAJARAN` varchar(50) NOT NULL,
`KEG_PENGAJAR` varchar(250) NOT NULL,
`KEG_MAHASISWA` varchar(250) NOT NULL,
`ALAT_PENGAJAR` varchar(25) NOT NULL,
`EVALUASI` varchar(250) NOT NULL,
`PERTEMUAN` int(10) NOT NULL,
`DATE` date NOT NULL,
`POKOK_BAHASAN` varchar(100) NOT NULL,
`KEGIATAN` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `prasyarat`
--
INSERT INTO `prasyarat` (`TAHAP_PEMBELAJARAN`, `KEG_PENGAJAR`, `KEG_MAHASISWA`, `ALAT_PENGAJAR`, `EVALUASI`, `PERTEMUAN`, `DATE`, `POKOK_BAHASAN`, `KEGIATAN`) VALUES
('Penutupan', 'asd', 'as', '', 'asdads', 3, '0000-00-00', '', ''),
('Bab 3', 'asdasd', 'as', '', 'asd', 4, '2010-04-02', 'Coba dulu', 'Tutor');
-- --------------------------------------------------------
--
-- Table structure for table `program_studi`
--
CREATE TABLE IF NOT EXISTS `program_studi` (
`KODE_PRODI` varchar(10) NOT NULL,
`ID_FAK` varchar(10) NOT NULL,
`NAMA_PRODI` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `program_studi`
--
INSERT INTO `program_studi` (`KODE_PRODI`, `ID_FAK`, `NAMA_PRODI`) VALUES
('S1BIO', 'FST', 'S1 Biologi'),
('S1FIS', 'FST', 'S1 Fisika'),
('S1ITL', 'FST', 'S1 Ilmu dan Teknologi Lingkungan'),
('S1KIM', 'FST', 'S1 Kimia'),
('S1MAT', 'FST', 'S1 Matematika'),
('S1SI', 'FST', 'S1 Sistem Informasi'),
('S1STAT', 'FST', 'S1 Statistika'),
('S1TB', 'FST', 'S1 Tekno Biomedik');
-- --------------------------------------------------------
--
-- Table structure for table `softskill`
--
CREATE TABLE IF NOT EXISTS `softskill` (
`KODE_SS` varchar(10) NOT NULL,
`NAMA_SS` varchar(25) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `softskill`
--
INSERT INTO `softskill` (`KODE_SS`, `NAMA_SS`) VALUES
('SS1', 'Kejujuran'),
('SS2', 'Kedisiplinan'),
('SS3', 'Keaktifan');
-- --------------------------------------------------------
--
-- Table structure for table `sub_bahasan`
--
CREATE TABLE IF NOT EXISTS `sub_bahasan` (
`KODE_SUB` varchar(10) NOT NULL,
`KODE_KK` varchar(10) NOT NULL,
`SUB_BAHASAN` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `bacaan`
--
ALTER TABLE `bacaan`
ADD PRIMARY KEY (`KODE_BACAAN`),
ADD KEY `FK_MEMILIKI_3` (`KODE_MK`);
--
-- Indexes for table `daftar_ss`
--
ALTER TABLE `daftar_ss`
ADD PRIMARY KEY (`KODE_SS`,`KODE_MK`),
ADD KEY `FK_DAFTAR_SS2` (`KODE_MK`);
--
-- Indexes for table `dosen`
--
ALTER TABLE `dosen`
ADD PRIMARY KEY (`NIP`);
--
-- Indexes for table `fakultas`
--
ALTER TABLE `fakultas`
ADD PRIMARY KEY (`ID_FAK`);
--
-- Indexes for table `kompetensi_khusus`
--
ALTER TABLE `kompetensi_khusus`
ADD PRIMARY KEY (`KODE_KK`),
ADD KEY `FK_MEMILIKI_4` (`KODE_MK`);
--
-- Indexes for table `mata_kuliah`
--
ALTER TABLE `mata_kuliah`
ADD PRIMARY KEY (`KODE_MK`),
ADD KEY `FK_MEMILIKI_2` (`KODE_SS`),
ADD KEY `FK_PENANGGUNG_JAWAB` (`NIP`);
--
-- Indexes for table `mengajar`
--
ALTER TABLE `mengajar`
ADD PRIMARY KEY (`SOFTSKILL`);
--
-- Indexes for table `program_studi`
--
ALTER TABLE `program_studi`
ADD PRIMARY KEY (`KODE_PRODI`),
ADD KEY `FK_MEMILIKI_1` (`ID_FAK`);
--
-- Indexes for table `softskill`
--
ALTER TABLE `softskill`
ADD PRIMARY KEY (`KODE_SS`);
--
-- Indexes for table `sub_bahasan`
--
ALTER TABLE `sub_bahasan`
ADD PRIMARY KEY (`KODE_SUB`),
ADD KEY `FK_MEMILIKI_5` (`KODE_KK`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `bacaan`
--
ALTER TABLE `bacaan`
MODIFY `KODE_BACAAN` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `bacaan`
--
ALTER TABLE `bacaan`
ADD CONSTRAINT `FK_MEMILIKI_3` FOREIGN KEY (`KODE_MK`) REFERENCES `mata_kuliah` (`KODE_MK`);
--
-- Constraints for table `daftar_ss`
--
ALTER TABLE `daftar_ss`
ADD CONSTRAINT `FK_DAFTAR_SS` FOREIGN KEY (`KODE_SS`) REFERENCES `softskill` (`KODE_SS`),
ADD CONSTRAINT `FK_DAFTAR_SS2` FOREIGN KEY (`KODE_MK`) REFERENCES `mata_kuliah` (`KODE_MK`);
--
-- Constraints for table `kompetensi_khusus`
--
ALTER TABLE `kompetensi_khusus`
ADD CONSTRAINT `FK_MEMILIKI_4` FOREIGN KEY (`KODE_MK`) REFERENCES `mata_kuliah` (`KODE_MK`);
--
-- Constraints for table `mata_kuliah`
--
ALTER TABLE `mata_kuliah`
ADD CONSTRAINT `FK_MEMILIKI_2` FOREIGN KEY (`KODE_SS`) REFERENCES `program_studi` (`KODE_PRODI`),
ADD CONSTRAINT `FK_PENANGGUNG_JAWAB` FOREIGN KEY (`NIP`) REFERENCES `dosen` (`NIP`);
--
-- Constraints for table `program_studi`
--
ALTER TABLE `program_studi`
ADD CONSTRAINT `FK_MEMILIKI_1` FOREIGN KEY (`ID_FAK`) REFERENCES `fakultas` (`ID_FAK`);
--
-- Constraints for table `sub_bahasan`
--
ALTER TABLE `sub_bahasan`
ADD CONSTRAINT `FK_MEMILIKI_5` FOREIGN KEY (`KODE_KK`) REFERENCES `kompetensi_khusus` (`KODE_KK`);
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
| true |
0b4f633d37f1abd2103012bf5e1b229f8fea927d | SQL | PatrickShea814-zz/itsAmazonSoAmazon | /MySQL_dbs/Departments.sql | UTF-8 | 176 | 2.515625 | 3 | [] | no_license | USE bamazon;
CREATE TABLE departments (
department_id INTEGER(20) NOT NULL AUTO_INCREMENT PRIMARY KEY,
department_name VARCHAR(50) DEFAULT NULL,
over_head_costs INTEGER(10)
); | true |
4ad39d827fbf42a8310bc385d69323adb3826be1 | SQL | josepitteloud/VESPA | /ad_hoc/V059_Panel_enablement_listing/Vespa panel migration 4 to 12.sql | WINDOWS-1250 | 5,701 | 3.71875 | 4 | [] | no_license | /****************** EXTRACTION OF VESP PANEL BY CALL BACK DATE ******************/
-- So the first thing we're going to do is batch the Vespa panel 4 out as determined
-- by the call back date, whatever that is. Panel members are on SBV, call back date
-- is on the golden box tables, so we need to patvh those together. Also we want to
-- take the first of the batches into several parts, though we're in the middle of a
-- month so we need to agree a cuttoff day after which we append everything from the
-- beginning of the month...
select count(1) from greenj.golden_boxes
-- 6556291 - good!
select count(1) from vespa_analysts.vespa_single_box_view where panel = 'VESPA'
-- 539958
select count(1) as counted, count(distinct sbv.card_subscriber_id) as distincted
from vespa_analysts.vespa_single_box_view as sbv
inner join greenj.golden_boxes as gb
on sbv.card_subscriber_id = gb.subscriber_id
where sbv.panel = 'VESPA';
-- 442934 442934 - okay, so a bunch of existing vespa boxes are not golden...
-- first some control totals for expectations:
select
coalesce(cbk_day, 'Not Golden!') as call_back_day
,count(1) as Vespa_boxes
from vespa_analysts.vespa_single_box_view as sbv
left join greenj.golden_boxes as gb
on sbv.card_subscriber_id = gb.subscriber_id
where sbv.panel = 'VESPA'
group by call_back_day
order by call_back_day;
/* OK, so this is pretty well organised, just have to organise the batching and rollover andf suchlike...
01 15074
02 14376
03 14142
04 15569
05 14456
06 15244
07 14981
08 15423
09 16085
10 15884
11 16103
12 16030
13 16172
14 15913
15 15893
16 16013
17 16231
18 16065
19 16145
20 16645
21 16360
22 16997
23 18354
24 16456
25 16399
26 15807
27 16285
28 13832
Not Golden! 97024
*/
-- also: do all the accounts have the same call back date?
select account_number, count( distinct cbk_day) as daysthings
from greenj.golden_boxes
group by account_number
having daysthings > 1
order by daysthings desc;
-- um... yeah, they're all different. Guess we're not doing it household per day or anything
-- haha, no, just take the earliest callback date...
-- oh hey slight complication, everything in the golden boxes is by box, including
-- the call back date, though we really want to organise everything by account,
-- though the call back dates are not aligned by the account in any way at all...
-- Plan is:
-- 1) Group accounts by earliest day in the month for a box call back
-- 2) Split the 97k with no call back date into 6 batches
-- 3) Make batches for every day for now (well split into smaller ones once we know the first date)
-- So, Part 1, orgasine the Vespa panel into call back dates at account level.
select
sbv.account_number
,coalesce(min(cbk_day), 'Not Golden!') as call_back_day
,count(1) as Vespa_boxes
,convert(tinyint, min(cbk_day)) as batch -- we'll update it in a bit for the non-golden boxes
into PanMan_Golden_account_batches
from vespa_analysts.vespa_single_box_view as sbv
left join greenj.golden_boxes as gb
on sbv.card_subscriber_id = gb.subscriber_id
where sbv.panel = 'VESPA'
group by sbv.account_number;
-- 361570 rows, good.
select count(distinct account_number)
from vespa_analysts.vespa_single_box_view
where panel = 'VESPA';
-- 361570, awesome
commit;
create unique index fake_pk on PanMan_Golden_account_batches (account_number);
commit;
-- OK, lets see how this balance goes...
select call_back_day, count(1) as accunts
from PanMan_Golden_account_batches
group by call_back_day
order by call_back_day;
/* Oh, it's fine, don't even have to worry about splitting out the non-golden boxes!
01 13898
02 13114
03 12907
04 14052
05 12945
06 13550
07 13249
08 13442
09 13918
10 13560
11 13605
12 13450
13 13515
14 13188
15 13094
16 13102
17 13024
18 12948
19 12792
20 13107
21 12777
22 12915
23 12367
24 11801
25 11477
26 11257
27 11340
28 8982
Not Golden! 2194
*/
update PanMan_Golden_account_batches
set batch = 29
where batch is null;
commit;
-- OK... so, how do we extract things into CSV files with Sybase?
-- So we're going back to a single big file with a second column for the batch number. Awesome.
select convert(bigint, account_number) -- shows up with quotes around it if you eave it a varchar
,batch
from PanMan_Golden_account_batches
order by batch, account_number;
output to 'D:\\Vespa\\Golden box migration batches\\Vespa_Golden_Batch_all.csv';
-- It only works on Sybase interactive on P5X1:
-- OK, so for the control totals:
select batch, count(1)
from PanMan_Golden_account_batches
group by batch
order by batch;
output to 'D:\\Vespa\\Golden box migration batches\\Vespa_Golden_Batch_Control_Totals.csv';
-- Cool, so all those are built and added to a zip file. We've spot shecked some of the files
-- against the totals quoted in the control totals, and also checked that the control totals
-- add up to 361570 so we're pretty happy with it.
-- Now one other thing: we need to pull out the subscriber IDs for everything in batch 29
-- which doesn't have a call-back date:
select sbv.subscriber_id
from PanMan_Golden_account_batches as gab
inner join vespa_analysts.vespa_single_box_view as sbv
on gab.account_number = sbv.account_number
where gab.batch = 29
order by sbv.subscriber_id;
output to 'D:\\Vespa\\Golden box migration batches\\Vespa_Golden_Batch_29_Subscriber_IDs.csv';
-- Again, P5X1 only.
| true |
d76d7014f54af03eb2651f0395de3c9c9e81f2be | SQL | pjsinco/p2.10rempatrick.com | /sql-stuff/db-bak-2013-10-30.sql | UTF-8 | 4,448 | 2.859375 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.5.33, for osx10.6 (i386)
--
-- Host: localhost Database: rempatri_p2_10rempatrick_com
-- ------------------------------------------------------
-- Server version 5.5.33
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `posts`
--
DROP TABLE IF EXISTS `posts`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `posts` (
`post_id` int(11) NOT NULL AUTO_INCREMENT,
`created` int(11) NOT NULL,
`modified` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`content` text NOT NULL,
PRIMARY KEY (`post_id`),
KEY `user_id` (`user_id`),
CONSTRAINT `posts_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `posts`
--
LOCK TABLES `posts` WRITE;
/*!40000 ALTER TABLE `posts` DISABLE KEYS */;
/*!40000 ALTER TABLE `posts` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `users`
--
DROP TABLE IF EXISTS `users`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `users` (
`user_id` int(11) NOT NULL AUTO_INCREMENT,
`created` int(11) DEFAULT NULL,
`modified` int(11) DEFAULT NULL,
`token` varchar(64) DEFAULT NULL,
`password` varchar(64) DEFAULT NULL,
`last_login` int(11) DEFAULT NULL,
`timezone` varchar(64) DEFAULT NULL,
`user_name` varchar(32) DEFAULT NULL,
`email` varchar(128) DEFAULT NULL,
`location` varchar(128) DEFAULT NULL,
`bio` text,
PRIMARY KEY (`user_id`),
UNIQUE KEY `user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `users`
--
LOCK TABLES `users` WRITE;
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
INSERT INTO `users` VALUES (1,1383086278,NULL,'e78de0dcd23fe7ab0cca9ea3c002e7523fd5e1e0','ef2ec8738e24daca58e82d55b68bde6bcb9e1cc9',NULL,NULL,'jcapulet','jcapulet@veronahs.edu',NULL,NULL),(2,1383086776,NULL,'61cdfec25dd9bbb9a2e3b235df4a20c4c9aaefcb','500339f8fd3aaa369e30594e9e05f146e827cd7c',NULL,NULL,'benvolio','bvolio@veronahs.edu',NULL,NULL),(5,1383087536,NULL,'b36f14fe2793b27b46ce5fb8f197241dd7e02a59','670102259fb523edad0bf985c116d0372cd04649',NULL,NULL,'ajax','ajax@tigers.com',NULL,NULL),(7,1383088206,NULL,'b1bbcc6cb2b5f0446ce94222b86a4b550964c386','0067e352ed2ff222173ef458c52b3d7ef3a4bb53',NULL,NULL,'omarinfante','oinfante@tigers.com',NULL,NULL);
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `users_users`
--
DROP TABLE IF EXISTS `users_users`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `users_users` (
`user_user_id` int(11) NOT NULL AUTO_INCREMENT,
`created` int(11) NOT NULL,
`user_id` int(11) NOT NULL COMMENT 'follower',
`user_id_followed` int(11) NOT NULL COMMENT 'followed',
PRIMARY KEY (`user_user_id`),
KEY `user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `users_users`
--
LOCK TABLES `users_users` WRITE;
/*!40000 ALTER TABLE `users_users` DISABLE KEYS */;
/*!40000 ALTER TABLE `users_users` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2013-10-30 14:58:45
| true |
01bb5aab75f2a8c89a85a9f589a1551e6b4e3a1a | SQL | shandianlala/AntFooder | /antfooder.sql | UTF-8 | 31,832 | 2.90625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : MySql-本机
Source Server Version : 50173
Source Host : localhost:3306
Source Database : antfooder
Target Server Type : MYSQL
Target Server Version : 50173
File Encoding : 65001
Date: 2018-02-28 12:03:38
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for address
-- ----------------------------
DROP TABLE IF EXISTS `address`;
CREATE TABLE `address` (
`address_id` char(32) NOT NULL,
`user_id` char(32) DEFAULT NULL,
`address_province` char(20) DEFAULT NULL,
`address_city` char(20) DEFAULT NULL,
`address_area` char(20) DEFAULT NULL,
`address_street` varchar(50) DEFAULT NULL,
`addressf_status` char(10) DEFAULT NULL,
`address_recipients` char(20) DEFAULT NULL,
`address_phone` char(11) DEFAULT NULL,
PRIMARY KEY (`address_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of address
-- ----------------------------
INSERT INTO `address` VALUES ('23223e73ab5d49b5a236997c2f484dd3', '05d929698b67452db2d369dd21ca928f', '广东省', '梅州市', '丰顺县', '111111', null, '1111', '11111111');
INSERT INTO `address` VALUES ('2332ae6c214c4d4cb16025dd2a289428', '063b4a7994fe11e6bf04281904cae933', '安徽省', '亳州市', '城关镇', '小县城', null, '张大凯', '18772383543');
INSERT INTO `address` VALUES ('2483fa75fcda442a9eda45896c4f20dd', '063b4a7994fe11e6bf04281904cae933', '重庆市', '重庆市', '沙坪坝区', '大县城', null, '张小凯', '18772383543');
INSERT INTO `address` VALUES ('3931bc6da9cb4b6294c3308348bad4bc', '5bef94b0bafa43e29dc379cb93f4538f', '北京市', '北京市', '西城区', 'ada', null, 'dad', '18772383543');
INSERT INTO `address` VALUES ('529c4005a26811e6931379f356d21b12', '063b4a7994fe11e6bf04281904cae934', '湖北省', '黄冈市', '黄州区', '陶店乡', '0', '张大凯', '110');
INSERT INTO `address` VALUES ('5dd6ca46a3814b218f320999854b402d', '063b4a7994fe11e6bf04281904cae934', '上海市', '上海市', '虹口区', '11111', null, '1111', '11111');
INSERT INTO `address` VALUES ('5f3be291bce94a2fa7c964bfd73c4c53', '063b4a7994fe11e6bf04281904cae933', '河北省', '唐山市', '古冶区', 'ceshi', null, 'cehsi', '111111');
INSERT INTO `address` VALUES ('8ecd3e34ad4246dcb6cb879037681207', 'cfc7210dd2f24867850834578757b7cc', '重庆市', '重庆市', '渝中区', '111', null, '123', '12312312');
INSERT INTO `address` VALUES ('91c92dfb490b4544a0ecf0c8fb2c690f', '05d929698b67452db2d369dd21ca928f', '河北省', '秦皇岛市', '抚宁县', '111111', null, '111', '11111111');
INSERT INTO `address` VALUES ('d26106c15dfa44ecbca1cce2babe4e33', '063b4a7994fe11e6bf04281904cae933', '内蒙古', '呼和浩特市', '赛罕区', '地方', null, '陈真', '12341234123');
INSERT INTO `address` VALUES ('e493c8af7ee74193bc06719051941d3e', '063b4a7994fe11e6bf04281904cae934', '北京市', '北京市', '朝阳区', '11111', null, '1111', '1111111');
INSERT INTO `address` VALUES ('e8ed061ffe9b48dba8cc910682f54246', '063b4a7994fe11e6bf04281904cae933', '湖北省', '黄冈市', '黄州区', '黄冈师范学院', null, '程晓望', '15697136169');
INSERT INTO `address` VALUES ('e9ee2aff38574c99857e436859d1263e', 'cfc7210dd2f24867850834578757b7cc', '湖北省', '黄冈市', '麻城市', '麻城街道', null, '阵阵', '15688523654');
-- ----------------------------
-- Table structure for comment
-- ----------------------------
DROP TABLE IF EXISTS `comment`;
CREATE TABLE `comment` (
`comment_id` char(32) NOT NULL,
`food_id` char(32) DEFAULT NULL,
`user_id` char(32) DEFAULT NULL,
`comment_date` varchar(255) DEFAULT NULL COMMENT '评论时间',
`comment` varchar(500) DEFAULT NULL COMMENT '评论',
`re_comment` varchar(500) DEFAULT NULL COMMENT '追加评论',
`comment_others` varchar(500) DEFAULT NULL,
`comment_status` char(4) DEFAULT NULL,
PRIMARY KEY (`comment_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of comment
-- ----------------------------
INSERT INTO `comment` VALUES ('01d69a02a8a311e680f63242b4c1ad1c', '03e271b1a4d811e683de3ffa28d9c658', '063b4a7994fe11e6bf04281904cae933', '2016-11-12 14:41:20', '14:41ceshijieguo', null, null, '2');
INSERT INTO `comment` VALUES ('0574af3ea8a711e680f63242b4c1ad1c', '03c8abf3a4d711e683de3ffa28d9c658', '063b4a7994fe11e6bf04281904cae933', '2016-11-12 15:10:04', 'asdfasdfasdf', null, null, '2');
INSERT INTO `comment` VALUES ('1170a01da58211e6842e40fc330890bs', '1170a01da58211e6842e40fc330890ba', '063b4a7994fe11e6bf04281904cae933', '2016-10-08 15:57:05', '很棒的书!超喜欢!', null, null, '2');
INSERT INTO `comment` VALUES ('1170a01da58211e6842e40fc330890bx', '1170a01da58211e6842e40fc330890ba', 'cfc7210dd2f24867850834578757b7cc', '2016-10-10 15:57:05', '很好看的书,有趣。', null, null, '2');
INSERT INTO `comment` VALUES ('163b4a7994fe11e6bf04281904cae444', '163b4a7994fe11e6bf04281904cae444', '063b4a7994fe11e6bf04281904cae933', '2016-06-04 16:53:55', '这本书好好看', '这本书好好看', '这本书好好看', '2');
INSERT INTO `comment` VALUES ('163b4a7994fe11e6bf04281904cae445', '163b4a7994fe11e6bf04281904cae444', '063b4a7994fe11e6bf04281904cae933', '2016-11-08 15:57:05', '我是来搞事情的', null, null, '2');
INSERT INTO `comment` VALUES ('45776f93a7e011e68bc65d7948fd1e9a', '163b4a7994fe11e6bf04281904cae444', '063b4a7994fe11e6bf04281904cae934', '2016-11-11 15:27:16', '啦啦啦', null, null, '2');
INSERT INTO `comment` VALUES ('55b82771a7b811e68bc65d7948fd1e9a', '163b4a7994fe11e6bf04281904cae444', '063b4a7994fe11e6bf04281904cae934', '2016-11-11 10:41:23', '一二三四五六七八九有意义有意义有意义有意义有意义一', null, null, '2');
INSERT INTO `comment` VALUES ('729eec5aa57711e6842e40fc330890ba', '163b4a7994fe11e6bf04281904cae444', '3a0afea2ff744e3c97dcf100a248dc22', '2016-11-08 13:51:51', '还可以,就这样吧', '纸质有点差', null, '2');
INSERT INTO `comment` VALUES ('74ee90d9a8a811e680f63242b4c1ad1c', '03c8abf3a4d711e683de3ffa28d9c658', '063b4a7994fe11e6bf04281904cae933', '2016-11-12 15:20:20', 'dsfasdfasdfsdfasdfasdf', null, null, '2');
INSERT INTO `comment` VALUES ('7c09221ba7b711e68bc65d7948fd1e9a', '1170a01da58211e6842e40fc330890ba', '9d6e6cbea0ec11e6ae33e43b78a8e173', '2016-11-11 10:35:18', '嘿嘿', null, null, '2');
INSERT INTO `comment` VALUES ('7c34d02fa57811e6842e40fc330890ba', '163b4a7994fe11e6bf04281904cae444', '3a0afea2ff744e3c97dcf100a248dc22', '2016-11-08 13:59:17', '啦啦', '战术目镜启动', null, '2');
INSERT INTO `comment` VALUES ('80c494f7a7b711e68bc65d7948fd1e9a', '163b4a7994fe11e6bf04281904cae444', '063b4a7994fe11e6bf04281904cae934', '2016-11-11 10:35:26', '啊啊啊啊啊', null, null, '2');
INSERT INTO `comment` VALUES ('8cf9d374a8a311e680f63242b4c1ad1c', '66b3d3b6a71d11e6a0f2b2a522bd4c45', '063b4a7994fe11e6bf04281904cae933', '2016-11-12 14:45:13', '开始评论啦 啊的的 额个阿斯蒂芬是否为是打发干撒订单干啥地方撒的发生的噶啥地方地方阿斯蒂芬阿斯蒂芬阿斯蒂芬', null, null, '2');
INSERT INTO `comment` VALUES ('924c5c89a7b811e68bc65d7948fd1e9a', '163b4a7994fe11e6bf04281904cae444', '063b4a7994fe11e6bf04281904cae934', '2016-11-11 10:43:05', 'a\r\n啊\r\n1\r\n\r\n\r\n\r\n\r\n\r\naaa\r\na', null, null, '2');
INSERT INTO `comment` VALUES ('9d2c59cfa71e11e6a0f2b2a522bd4c45', '0835d503a4d711e683de3ffa28d9c658', '9d6e6cbea0ec11e6ae33e43b78a8e173', '2016-11-10 16:21:00', '很满意的一次购物!', null, null, '2');
INSERT INTO `comment` VALUES ('adf2522ea8a011e680f63242b4c1ad1c', '03e271b1a4d811e683de3ffa28d9c658', '063b4a7994fe11e6bf04281904cae933', '2016-11-12 14:24:40', 'zheshiceshihuanjing', null, null, '2');
INSERT INTO `comment` VALUES ('afe17330a8a411e680f63242b4c1ad1c', 'd2e88bbba71c11e6a0f2b2a522bd4c45', '063b4a7994fe11e6bf04281904cae933', '2016-11-12 14:53:21', '测试的', null, null, '2');
INSERT INTO `comment` VALUES ('aff6f05ca6f711e6a0f2b2a522bd4c45', '163b4a7994fe11e6bf04281904cae444', '063b4a7994fe11e6bf04281904cae934', '2016-11-10 11:42:21', '我是来搞事情的搞事情高高哦啊宫傲高宫傲高高宫傲公安宫傲公安宫傲公安爱的世界看到了空间来刷卡机打发了盛大放假了多少房间爱死了的是对方家里快圣诞节福利卡上的记录反馈就打算离开房间都洒了开发', '', null, '2');
INSERT INTO `comment` VALUES ('aff6f05ca6f711e6a0f2b2a522bd4c48', '163b4a7994fe11e6bf04281904cae444', '063b4a7994fe11e6bf04281904cae934', '2016-11-10 11:42:21', '<font color=\"#990000\">lala</font>', '', '', '2');
INSERT INTO `comment` VALUES ('ba249fb3a8a411e680f63242b4c1ad1c', '05d2ee1ca71d11e6a0f2b2a522bd4c45', '063b4a7994fe11e6bf04281904cae933', '2016-11-12 14:53:39', '我有来了哦', null, null, '2');
INSERT INTO `comment` VALUES ('cabb5032a89411e680f63242b4c1ad1c', '163b4a7994fe11e6bf04281904cae444', '063b4a7994fe11e6bf04281904cae934', '2016-11-12 12:59:29', 'r阿斯顿撒旦', null, null, '2');
INSERT INTO `comment` VALUES ('dba16e6ea71d11e6a0f2b2a522bd4c43', '1170a01da58211e6842e40fc330890ba', '9d6e6cbea0ec11e6ae33e43b78a8e173', '2016-10-10 10:57:05', '还可以,下次再来', null, null, '2');
INSERT INTO `comment` VALUES ('dba16e6ea71d11e6a0f2b2a522bd4c45', '9d6e6cbea0ec11e6ae33e43b78a8e173', 'cfc7210dd2f24867850834578757b7cc', '2016-11-10 16:15:35', '书店老板人很好,很热情,好棒的书', null, null, '2');
INSERT INTO `comment` VALUES ('f01315b5aa0911e686244286dcbb132e', '03c8abf3a4d711e683de3ffa28d9c658', '063b4a7994fe11e6bf04281904cae933', '2016-11-14 09:30:45', '张凯,你妈妈喊你回家吃饭', null, null, '2');
INSERT INTO `comment` VALUES ('f06f43c7a58811e6842e40fc330890ba', '163b4a7994fe11e6bf04281904cae444', '063b4a7994fe11e6bf04281904cae933', '2016-11-08 15:57:05', 'asdas', 'asdasd', null, '2');
-- ----------------------------
-- Table structure for food
-- ----------------------------
DROP TABLE IF EXISTS `food`;
CREATE TABLE `food` (
`food_id` char(32) NOT NULL,
`menu_id` char(32) DEFAULT NULL,
`food_name` varchar(50) DEFAULT NULL,
`food_price` double(10,2) DEFAULT NULL,
`food_describe` varchar(500) DEFAULT NULL,
`food_photo` varchar(255) DEFAULT NULL,
`supply_begin_date` varchar(50) DEFAULT NULL,
`supply_end_date` varchar(50) DEFAULT NULL,
`supply_begin_time` varchar(50) DEFAULT NULL,
`supply_end_time` varchar(50) DEFAULT NULL,
`food_state` int(255) DEFAULT NULL,
`food_other` varchar(255) DEFAULT NULL,
PRIMARY KEY (`food_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of food
-- ----------------------------
INSERT INTO `food` VALUES ('0a944eff4256438ba9018f4e8f684184', '6fe6173fd6984afba525c03d2a4aa1c6', '酸菜卤肉饭', '18.50', '酸菜卤肉饭酸菜卤肉饭酸菜卤肉饭酸菜卤肉饭', 'resource/img/酸菜卤肉饭.jpg', '', '', '', '', '1', null);
INSERT INTO `food` VALUES ('1', 'c8', '排骨套饭', '21.50', '排骨套饭排骨套饭', 'resource/img/排骨套饭.jpg', null, null, null, null, '1', null);
INSERT INTO `food` VALUES ('1bbb3a38d24b4f55bf825d3f054bcac3', 'cf264dc1eab742bc95ad59500f429a13', '香辣焗翅', '8.00', '香辣焗翅 香辣焗翅香辣焗翅', 'resource/img/香辣焗翅.jpg', '', '', '', '', '1', null);
INSERT INTO `food` VALUES ('2', 'c8', '排骨饮料套餐', '29.50', '排骨饮料套餐排骨饮料套餐', 'resource/img/排骨饮料套餐.jpg', null, null, null, null, '1', null);
INSERT INTO `food` VALUES ('20f0022fd6df4c4a9ba2281df0f3c029', '6fe6173fd6984afba525c03d2a4aa1c6', '卤肉套饭', '20.50', '卤肉套饭卤肉套饭卤肉套饭', 'resource/img/卤肉套饭.jpg', '', '', '', '', '1', null);
INSERT INTO `food` VALUES ('27520629e6144252bb8c4ea86fb4acfd', '5e205a0be82741ccb940d250302a3e49', '新香干炒肉双人套', '58.80', '新香干炒肉双人套新香干炒肉双人套', 'resource/img/新香干炒肉双人套.jpg', '', '', '', '', '1', null);
INSERT INTO `food` VALUES ('2e1760a4c4b5496b8e8c61264a7bd07f', 'a2ce87ea5c304ff2b4e5c032f26a2484', '辣骨套饭', '21.50', '辣骨套饭辣骨套饭', 'resource/img/20150326151210_3926辣骨套饭.jpg', '', '', '', '', '1', null);
INSERT INTO `food` VALUES ('3', 'c8', '香汁排骨菜', '22.50', '香汁排骨菜香汁排骨菜', 'resource/img/香汁排骨菜.jpg', null, null, null, null, '1', null);
INSERT INTO `food` VALUES ('3885cacdfc8d4bd0ad3369a774fa55b3', 'f19d4fd9702f44ffb736fa2a81f3b25f', '花卷+小红枣露', '9.05', '花卷+小红枣露 花卷+小红枣露', 'resource/img/花卷+小红枣露.jpg', '', '', '', '', '1', null);
INSERT INTO `food` VALUES ('4', 'c8', '香汁排骨套饭', '17.50', '香汁排骨套饭香汁排骨套饭', 'resource/img/香汁排骨套饭.jpg', null, null, null, null, '1', null);
INSERT INTO `food` VALUES ('5736062b28614c9da59ba0aaabbd2af3', 'a2ce87ea5c304ff2b4e5c032f26a2484', '鲜辣排骨菜', '16.50', '鲜辣排骨菜 鲜辣排骨菜', 'resource/img/9a12a3d1580393b25113fa678e5c060c_20150326151308_1417鲜辣排骨菜.jpg', '', '', '', '', '1', null);
INSERT INTO `food` VALUES ('5cfee577db014c0b8f5141ea156c7c28', 'cf264dc1eab742bc95ad59500f429a13', '香滑蒸蛋', '6.50', '香滑蒸蛋香滑蒸蛋香滑蒸蛋', 'resource/img/香滑蒸蛋.jpg', '', '', '', '', '1', null);
INSERT INTO `food` VALUES ('5dfff0457d774ca18c65233028b7bf64', '5e205a0be82741ccb940d250302a3e49', '排骨鸡腿双人套', '62.80', '排骨鸡腿双人套排骨鸡腿双人套', 'resource/img/排骨鸡腿双人套.jpg', '', '', '', '', '1', null);
INSERT INTO `food` VALUES ('5f7b7f580d924a27901476a53451c27c', 'a2ce87ea5c304ff2b4e5c032f26a2484', '辣骨饮料套餐', '29.50', '辣骨饮料套餐 辣骨饮料套餐', 'resource/img/20150326151226_8944辣骨饮料套餐.jpg', '', '', '', '', '1', null);
INSERT INTO `food` VALUES ('8ad4c86da8004775a55d00bf0dcd23e4', 'f19d4fd9702f44ffb736fa2a81f3b25f', '蒸米粉白粥卤蛋', '12.00', '蒸米粉白粥卤蛋蒸米粉白粥卤蛋', 'resource/img/蒸米粉白粥卤蛋.jpg', '', '', '', '', '1', null);
INSERT INTO `food` VALUES ('9454139e252842ada2c1d7175d3d665a', 'cf264dc1eab742bc95ad59500f429a13', 'Q弹鱼饼', '6.00', 'Q弹鱼饼Q弹鱼饼Q弹鱼饼', 'resource/img/0a97478215bd96f057cfaf7ac2910f60_Q弹鱼饼.jpg', '', '', '', '', '1', null);
INSERT INTO `food` VALUES ('a84accd051ed41d4b5a1e0ac5a53259a', '0596fa39557f495eaa849ebf4576527c', '新枸杞红枣露', '8.50', '新枸杞红枣露新枸杞红枣露', 'resource/img/新枸杞红枣露.jpg', '', '', '', '', '1', null);
INSERT INTO `food` VALUES ('a8cd214646664c46a2e4809b1c322d8f', '904b713e5c294c88b30be9eb07c80d64', '茄子汤套', '22.00', '茄子汤套茄子汤套', 'resource/img/茄子汤套.jpg', '', '', '', '', '1', null);
INSERT INTO `food` VALUES ('ba35aac0c22144f8a83900b1c9380fcf', 'f19d4fd9702f44ffb736fa2a81f3b25f', '猪肉包+小红枣露', '11.00', '猪肉包+小红枣露猪肉包+小红枣露', 'resource/img/猪肉包+小红枣露.jpg', '', '', '', '', '1', null);
INSERT INTO `food` VALUES ('c930b2080d034aa3b6dfe1dcb708c438', '6fe6173fd6984afba525c03d2a4aa1c6', '卤肉汤套', '28.50', '卤肉汤套 卤肉汤套', 'resource/img/卤肉汤套.jpg', '', '', '', '', '1', null);
INSERT INTO `food` VALUES ('e852e32aba20466ca50c18e5c6f115fd', 'cf264dc1eab742bc95ad59500f429a13', '外婆菜', '4.00', '外婆菜 外婆菜外婆菜', 'resource/img/外婆菜.jpg', '', '', '', '', '1', null);
INSERT INTO `food` VALUES ('e8a09d43c6bb454ebeb56394c77461b4', 'a2ce87ea5c304ff2b4e5c032f26a2484', '鲜辣排骨饭', '19.50', '鲜辣排骨饭鲜辣排骨饭鲜辣排骨饭', 'resource/img/20150326151205_6797鲜辣排骨饭.jpg', '', '', '', '', '1', null);
INSERT INTO `food` VALUES ('fa418ee636ec4a228f710e81354a019a', '0596fa39557f495eaa849ebf4576527c', '新枸杞红枣露(小)', '7.50', '新枸杞红枣露(小) 新枸杞红枣露(小)', 'resource/img/新枸杞红枣露(小).jpg', '', '', '', '', '1', null);
-- ----------------------------
-- Table structure for menu
-- ----------------------------
DROP TABLE IF EXISTS `menu`;
CREATE TABLE `menu` (
`menu_id` char(32) NOT NULL,
`menu_name` varchar(50) DEFAULT NULL,
`menu_photo` varchar(100) DEFAULT NULL,
`menu_type` char(4) DEFAULT NULL COMMENT '热卖 早 中 晚',
`menu_state` int(255) DEFAULT NULL,
`menu_other` varchar(255) DEFAULT NULL,
PRIMARY KEY (`menu_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of menu
-- ----------------------------
INSERT INTO `menu` VALUES ('0596fa39557f495eaa849ebf4576527c', '新品-特惠饮料', 'resource/img/新枸杞红枣露_3.jpg', '1', '1', '新品-特惠饮 料 新品-特惠饮料');
INSERT INTO `menu` VALUES ('5e205a0be82741ccb940d250302a3e49', '超值双人餐', 'resource/img/新枸杞红枣露_5.jpg', '1', '1', '超值双人餐超值双人餐超值双人餐');
INSERT INTO `menu` VALUES ('6fe6173fd6984afba525c03d2a4aa1c6', '酸菜卤肉饭', 'resource/img/酸菜卤肉.jpg', '3', '1', '酸菜卤肉饭 酸菜卤肉饭');
INSERT INTO `menu` VALUES ('904b713e5c294c88b30be9eb07c80d64', '鱼香茄子饭', 'resource/img/鱼香茄子饭.jpg', '3', '1', '鱼香茄子饭鱼香茄子饭');
INSERT INTO `menu` VALUES ('a2ce87ea5c304ff2b4e5c032f26a2484', '鲜辣排骨饭', 'resource/img/鲜辣排骨饭.jpg', '3', '1', '鲜辣排骨饭鲜辣排骨饭');
INSERT INTO `menu` VALUES ('b2', '套餐营养配', null, '2', '1', null);
INSERT INTO `menu` VALUES ('b3', '包点', null, '2', '1', null);
INSERT INTO `menu` VALUES ('b4', '米粉、米线', null, '2', '1', null);
INSERT INTO `menu` VALUES ('b5', '粥', null, '2', '1', null);
INSERT INTO `menu` VALUES ('b6', '饮品', null, '2', '1', null);
INSERT INTO `menu` VALUES ('c1', '新品-香干炒肉饭', null, '3', '1', null);
INSERT INTO `menu` VALUES ('c10', '鲜辣排骨饭', null, '3', '0', null);
INSERT INTO `menu` VALUES ('c11', '米粉、米线', null, '3', '1', null);
INSERT INTO `menu` VALUES ('c12', '蒸汤', null, '3', '1', null);
INSERT INTO `menu` VALUES ('c13', '小吃/配菜/米饭', null, '3', '1', null);
INSERT INTO `menu` VALUES ('c14', '饮品', null, '3', '1', null);
INSERT INTO `menu` VALUES ('c2', '虫草花蒸土鸡饭', null, '3', '1', null);
INSERT INTO `menu` VALUES ('c3', '超值双人餐', null, '3', '1', null);
INSERT INTO `menu` VALUES ('c4', '排骨拼鸡腿肉饭', null, '3', '1', null);
INSERT INTO `menu` VALUES ('c5', '特惠饮料', null, '3', '1', null);
INSERT INTO `menu` VALUES ('c7', '热辣排骨饭', null, '3', '0', null);
INSERT INTO `menu` VALUES ('c8', '香汁排骨饭', 'resource/img/香汁排骨含汤套餐1.0.jpg', '3', '1', '香汁排骨饭香汁排骨饭香汁排骨饭');
INSERT INTO `menu` VALUES ('c9', '冬(香)菇鸡腿肉饭', null, '3', '1', null);
INSERT INTO `menu` VALUES ('cf264dc1eab742bc95ad59500f429a13', '小吃', 'resource/img/小吃.jpg', '4', '1', '小吃小吃小吃小吃小吃');
INSERT INTO `menu` VALUES ('d1', '套餐', null, '4', '1', null);
INSERT INTO `menu` VALUES ('d2', '小吃', null, '4', '0', null);
INSERT INTO `menu` VALUES ('f19d4fd9702f44ffb736fa2a81f3b25f', '新品-早餐', 'resource/img/新品-早餐 鲜香肉酱蒸米粉.jpg', '2', '1', '新品-早餐新品-早餐新品-早餐');
-- ----------------------------
-- Table structure for order
-- ----------------------------
DROP TABLE IF EXISTS `order`;
CREATE TABLE `order` (
`order_id` char(32) NOT NULL COMMENT '订单id',
`user_id` char(32) NOT NULL COMMENT '用户id',
`address` varchar(255) DEFAULT NULL COMMENT '收货地址',
`phone` varchar(20) DEFAULT NULL COMMENT '电话',
`total_money` double(255,2) DEFAULT NULL COMMENT '总价',
`order_time` varchar(255) DEFAULT NULL COMMENT '下单时间',
`order_status` char(6) DEFAULT NULL COMMENT '订单状态(未处理0,发货1,收货2,拒绝3)',
`accept_time` varchar(255) DEFAULT NULL COMMENT '收货时间',
PRIMARY KEY (`order_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of order
-- ----------------------------
INSERT INTO `order` VALUES ('1c5b57ffd885427fb573f7967372f87e', '5bef94b0bafa43e29dc379cb93f4538f', '北京市 北京市 西城区 ada dad 18772383543', null, '54.00', '2016-11-11 17:22:37', '1', null);
INSERT INTO `order` VALUES ('4f9a20737944483ab3f638fa88fa112e', '5bef94b0bafa43e29dc379cb93f4538f', '北京市 北京市 西城区 ada dad 18772383543', null, '293.60', '2016-11-11 14:58:13', '2', null);
INSERT INTO `order` VALUES ('5265e5a0acaf4800a88ac3f9c91cce8c', '063b4a7994fe11e6bf04281904cae933', '湖北省 黄冈市 黄州区 黄冈师范学院 程晓望 15697136169', null, '171.80', '2016-11-14 14:46:36', '3', null);
INSERT INTO `order` VALUES ('75e4c0218453478eb01ea28bb70e330a', 'cfc7210dd2f24867850834578757b7cc', '湖北省 黄冈市 麻城市 麻城街道 阵阵 15688523654', null, '105.80', '2016-11-11 10:17:52', '1', null);
INSERT INTO `order` VALUES ('acdd426addad4a2da1c5e6f7be24bff1', '05d929698b67452db2d369dd21ca928f', '河北省 秦皇岛市 抚宁县 111111 111 11111111', null, '43.20', '2016-11-15 11:37:51', '1', null);
INSERT INTO `order` VALUES ('c2f7d4216e2d4d1e8310d8a7d32688ae', '5bef94b0bafa43e29dc379cb93f4538f', '北京市 北京市 西城区 ada dad 18772383543', null, '109.50', '2016-11-11 17:02:23', '0', null);
INSERT INTO `order` VALUES ('c5ca831416e443dd9aa1587f327e6e89', '5bef94b0bafa43e29dc379cb93f4538f', '北京市 北京市 西城区 ada dad 18772383543', null, '821.50', '2016-11-11 09:20:57', '1', null);
-- ----------------------------
-- Table structure for orderdetail
-- ----------------------------
DROP TABLE IF EXISTS `orderdetail`;
CREATE TABLE `orderdetail` (
`detail_id` char(32) NOT NULL COMMENT '详情表id',
`order_id` char(32) DEFAULT NULL COMMENT '订单id',
`book_id` char(32) DEFAULT NULL COMMENT '书籍id',
`buy_num` int(11) DEFAULT NULL COMMENT '书籍数量',
`restatus` char(4) DEFAULT NULL,
`user_msg` varchar(255) DEFAULT NULL COMMENT '用户购买商品的留言',
PRIMARY KEY (`detail_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of orderdetail
-- ----------------------------
INSERT INTO `orderdetail` VALUES ('07deb53b2b6b43059ba5601a4dacf66a', 'e7c504aad36546f89e367e32999e4af5', '03c8abf3a4d711e683de3ffa28d9c658', '3', '0', null);
INSERT INTO `orderdetail` VALUES ('08991bb1ac4243a8ad45ef802902f372', 'c5ca831416e443dd9aa1587f327e6e89', '03e271b1a4d811e683de3ffa28d9c658', '1', '0', null);
INSERT INTO `orderdetail` VALUES ('0d7a89051b9e4a909285b0817fd4fd45', '5265e5a0acaf4800a88ac3f9c91cce8c', '03e271b1a4d811e683de3ffa28d9c658', '2', '0', null);
INSERT INTO `orderdetail` VALUES ('0f4dd014030e4c8794d3369f35867d92', 'd4bda41fb2784ba0862925ad0b68d768', '03c8abf3a4d711e683de3ffa28d9c658', '1', '4', null);
INSERT INTO `orderdetail` VALUES ('11078895cbff4fecbbe61b3ea2e9d127', '75e4c0218453478eb01ea28bb70e330a', '0835d503a4d711e683de3ffa28d9c658', '1', '0', null);
INSERT INTO `orderdetail` VALUES ('12184f69bbb741b4957ce69ab2bba057', 'c5ca831416e443dd9aa1587f327e6e89', '8e77f00fa71e11e6a0f2b2a522bd4c45', '3', '0', null);
INSERT INTO `orderdetail` VALUES ('12fa61f28973477f98cf79bffea341fb', 'e7c504aad36546f89e367e32999e4af5', '9d6e6cbea0ec11e6ae33e43b78a8e173', '3', '0', null);
INSERT INTO `orderdetail` VALUES ('28c57667eb4e4c9f963aa8e140af7b1d', '97c37c4b2203460db6e8e22ad5cc1c8e', '03c8abf3a4d711e683de3ffa28d9c658', '1', '4', null);
INSERT INTO `orderdetail` VALUES ('482cc801cebb4ee486bb0a46e45b2a8f', '44b736697a1c4b20b8492a950528d6ea', '518f68f5a4d711e683de3ffa28d9c658', '1', '0', null);
INSERT INTO `orderdetail` VALUES ('54742ba645624122be3486f62b9317e4', 'd27aefd7aa7a4dbaac1b197cad3d0a10', '05d2ee1ca71d11e6a0f2b2a522bd4c45', '4', '3', null);
INSERT INTO `orderdetail` VALUES ('56cf0ed63d4c46e6ad95d26828dce975', '44b736697a1c4b20b8492a950528d6ea', '2f9902e7a4d911e683de3ffa28d9c658', '1', '0', null);
INSERT INTO `orderdetail` VALUES ('654d0f2bec12423e9cff4192326dce7d', 'acdd426addad4a2da1c5e6f7be24bff1', '518f68f5a4d711e683de3ffa28d9c658', '2', '1', null);
INSERT INTO `orderdetail` VALUES ('6ab22d6a9d4f46d1b2d9275ee140c61c', 'c2f7d4216e2d4d1e8310d8a7d32688ae', '03c8abf3a4d711e683de3ffa28d9c658', '5', '1', null);
INSERT INTO `orderdetail` VALUES ('8acfeb2bb1994910adf1f180e3ee19ce', '75e4c0218453478eb01ea28bb70e330a', '129c39fda71a11e6a0f2b2a522bd4c45', '1', '0', null);
INSERT INTO `orderdetail` VALUES ('8e38247195304c56972cda03b484e8a7', '25cf25890c684bd6b26d9fcf07057a4f', '03e271b1a4d811e683de3ffa28d9c658', '1', '4', null);
INSERT INTO `orderdetail` VALUES ('9a773bc25abf46ceb54e93765fe086be', '5b230ddaf36c43749ddceb49c3d91b7e', 'd2e88bbba71c11e6a0f2b2a522bd4c45', '1', '4', null);
INSERT INTO `orderdetail` VALUES ('9e37ffeb122f493dbf32637a033a13f2', 'c5ca831416e443dd9aa1587f327e6e89', '66b3d3b6a71d11e6a0f2b2a522bd4c45', '1', '0', null);
INSERT INTO `orderdetail` VALUES ('a807298ee1eb4b9cb2f1cd10acfe72cc', '5b230ddaf36c43749ddceb49c3d91b7e', '05d2ee1ca71d11e6a0f2b2a522bd4c45', '1', '4', null);
INSERT INTO `orderdetail` VALUES ('ba780829c90b44cc8ccad7a4b4e9dba4', '44b736697a1c4b20b8492a950528d6ea', '1170a01da58211e6842e40fc330890ba', '1', '0', null);
INSERT INTO `orderdetail` VALUES ('cfeb4a7325cb4e88ba627007b0d21ab0', '7958e7de60e64802a405455ce64fb2e7', '03e271b1a4d811e683de3ffa28d9c658', '1', '2', null);
INSERT INTO `orderdetail` VALUES ('d3ece59dc1924b97bec16d94ee8655e7', '7958e7de60e64802a405455ce64fb2e7', '66b3d3b6a71d11e6a0f2b2a522bd4c45', '1', '2', null);
INSERT INTO `orderdetail` VALUES ('d45a5706175a4e1f8d1a5dacf8111890', '7bf32cd5aa034cb7b33b520a08d2102f', 'd2e88bbba71c11e6a0f2b2a522bd4c45', '1', '0', null);
INSERT INTO `orderdetail` VALUES ('d47641d2fa8742d5bbc27856f047fe95', '1c5b57ffd885427fb573f7967372f87e', '1170a01da58211e6842e40fc330890ba', '2', '0', null);
INSERT INTO `orderdetail` VALUES ('d9cff306965e4e7a8239de2d9220e7a5', '5265e5a0acaf4800a88ac3f9c91cce8c', '66b3d3b6a71d11e6a0f2b2a522bd4c45', '1', '0', null);
INSERT INTO `orderdetail` VALUES ('dcae648e8d024304adaa92b6247776c8', 'c5ca831416e443dd9aa1587f327e6e89', '83ad162fa71811e6a0f2b2a522bd4c45', '2', '0', null);
INSERT INTO `orderdetail` VALUES ('ddcf3b072714437bb0b23bf529b7ab9c', 'da06e04e84c44eebb4ce5cdfbc7b54b0', '518f68f5a4d711e683de3ffa28d9c658', '1', '1', null);
INSERT INTO `orderdetail` VALUES ('e0dc6405206043f39884989ccaea171f', '7f02661dc5704b53933d3bc5e71d34b1', '03c8abf3a4d711e683de3ffa28d9c658', '2', '4', null);
INSERT INTO `orderdetail` VALUES ('e260c9a6d47e4a1a88212e26f704175c', '4f9a20737944483ab3f638fa88fa112e', '03e271b1a4d811e683de3ffa28d9c658', '8', '1', null);
INSERT INTO `orderdetail` VALUES ('f182100540e84605bb98e0755347b9c6', '75e4c0218453478eb01ea28bb70e330a', '25537b94a4d611e683de3ffa28d9c658', '1', '0', null);
INSERT INTO `orderdetail` VALUES ('f38e432abb88493f809837abdd4381ae', '7a7e8c03932f42ceb8824457b35573bc', '66b3d3b6a71d11e6a0f2b2a522bd4c45', '1', '4', null);
INSERT INTO `orderdetail` VALUES ('f9f00a4fc3eb4850b02c51fb4faf1624', '44b736697a1c4b20b8492a950528d6ea', '8e77f00fa71e11e6a0f2b2a522bd4c45', '3', '0', null);
-- ----------------------------
-- Table structure for shopcar
-- ----------------------------
DROP TABLE IF EXISTS `shopcar`;
CREATE TABLE `shopcar` (
`shop_id` char(32) NOT NULL,
`user_id` char(32) DEFAULT NULL,
`food_id` char(32) DEFAULT NULL,
`food_num` int(11) DEFAULT NULL,
`total_money` double(255,2) DEFAULT NULL,
`food_status` int(255) DEFAULT NULL,
`shop_other` varchar(255) DEFAULT NULL,
PRIMARY KEY (`shop_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of shopcar
-- ----------------------------
INSERT INTO `shopcar` VALUES ('095bf700b91746dea1a5a460acec7396', '37464bbff74e11e6802fe03f493116b5', '5cfee577db014c0b8f5141ea156c7c28', '0', '0.00', '0', null);
INSERT INTO `shopcar` VALUES ('0993f4eb9ac24f7fbeea5cb25889786e', '37464bbff74e11e6802fe03f493116b5', '0a944eff4256438ba9018f4e8f684184', '0', '0.00', '0', null);
INSERT INTO `shopcar` VALUES ('1a510866dca340bebe0dd13c990befdd', '37464bbff74e11e6802fe03f493116b5', 'a84accd051ed41d4b5a1e0ac5a53259a', '1', '8.50', '1', null);
INSERT INTO `shopcar` VALUES ('27a8adfa88ae4f62a5d4da58f3a53f21', '37464bbff74e11e6802fe03f493116b5', 'c930b2080d034aa3b6dfe1dcb708c438', '0', '0.00', '0', null);
INSERT INTO `shopcar` VALUES ('28785f0873214e4f93c1e21c4b7d7cbb', '37464bbff74e11e6802fe03f493116b5', '5dfff0457d774ca18c65233028b7bf64', '0', '0.00', '0', null);
INSERT INTO `shopcar` VALUES ('33f472b182f0402d9e8d171d71c04387', '37464bbff74e11e6802fe03f493116b5', 'ba35aac0c22144f8a83900b1c9380fcf', '0', '0.00', '0', null);
INSERT INTO `shopcar` VALUES ('3c3a65447c6d43cd987df05ccbb1c221', '37464bbff74e11e6802fe03f493116b5', '2', '0', '0.00', '0', null);
INSERT INTO `shopcar` VALUES ('3e5eb49a2bd744feab8bb2cd2ba316f2', '37464bbff74e11e6802fe03f493116b5', '1', '0', '0.00', '0', null);
INSERT INTO `shopcar` VALUES ('4f49d9c2d6084a23ab64a725d8a551a0', '37464bbff74e11e6802fe03f493116b5', '4', '0', '0.00', '0', null);
INSERT INTO `shopcar` VALUES ('76faab2cf8ba4b528dc3612948a3dc52', '37464bbff74e11e6802fe03f493116b5', 'e8a09d43c6bb454ebeb56394c77461b4', '0', '0.00', '0', null);
INSERT INTO `shopcar` VALUES ('8613e6c187d64f69a7013791ae03a0d5', '37464bbff74e11e6802fe03f493116b5', '8ad4c86da8004775a55d00bf0dcd23e4', '0', '0.00', '0', null);
INSERT INTO `shopcar` VALUES ('98b7e8eb360d41eab1669789a55bdb08', '37464bbff74e11e6802fe03f493116b5', '20f0022fd6df4c4a9ba2281df0f3c029', '1', null, '1', null);
INSERT INTO `shopcar` VALUES ('a4a886682b674fa88697c7d9c41f8d40', '37464bbff74e11e6802fe03f493116b5', '5736062b28614c9da59ba0aaabbd2af3', '0', '0.00', '0', null);
INSERT INTO `shopcar` VALUES ('b5260a9ba46f4d39b5923850e7a398e0', '37464bbff74e11e6802fe03f493116b5', '27520629e6144252bb8c4ea86fb4acfd', '1', '58.80', '1', null);
INSERT INTO `shopcar` VALUES ('b5fd857a73654b6fb2506dd19fe63963', '37464bbff74e11e6802fe03f493116b5', '1bbb3a38d24b4f55bf825d3f054bcac3', '0', '0.00', '0', null);
INSERT INTO `shopcar` VALUES ('c8cf9d334fe54c2a8263817a7a45848e', '37464bbff74e11e6802fe03f493116b5', '3', '0', '0.00', '0', null);
INSERT INTO `shopcar` VALUES ('d60c4a8d03344e87b1800fe81d8d3d49', '37464bbff74e11e6802fe03f493116b5', '3885cacdfc8d4bd0ad3369a774fa55b3', '0', '0.00', '0', null);
INSERT INTO `shopcar` VALUES ('d7a6cc0f150946fa936bcfd314e1ed97', '37464bbff74e11e6802fe03f493116b5', 'fa418ee636ec4a228f710e81354a019a', '1', '7.50', '1', null);
INSERT INTO `shopcar` VALUES ('ed0886574d8b4b6ba07fa5d972402461', '37464bbff74e11e6802fe03f493116b5', '20f0022fd6df4c4a9ba2281df0f3c029', '0', '0.00', '0', null);
INSERT INTO `shopcar` VALUES ('f8f36c55654e4e409c3cf2206807b77a', '37464bbff74e11e6802fe03f493116b5', 'e852e32aba20466ca50c18e5c6f115fd', '0', '0.00', '0', null);
INSERT INTO `shopcar` VALUES ('ff7540bbc72840998e1ba63f167f062c', '37464bbff74e11e6802fe03f493116b5', '9454139e252842ada2c1d7175d3d665a', '0', '0.00', '0', null);
-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`user_id` char(32) NOT NULL,
`user_account` varchar(255) NOT NULL,
`user_name` varchar(255) DEFAULT NULL,
`user_password` varchar(20) DEFAULT NULL,
`user_phone` varchar(11) DEFAULT NULL,
`user_email` varchar(30) DEFAULT NULL,
`user_status` char(1) DEFAULT NULL COMMENT '0 用户注销,1 普通用户 , 2后台管理员 ,',
PRIMARY KEY (`user_id`),
UNIQUE KEY `index_status` (`user_phone`,`user_status`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of user
-- ----------------------------
INSERT INTO `user` VALUES ('37464bbff74e11e6802fe03f493116b5', 'sdll', 'Daywan', '111111', '15697136169', 'chengxwang0622@163.com', '1');
INSERT INTO `user` VALUES ('374e11e6802fe03f493116b5', 'admin', 'administrator', '111111', '18771636169', '97420622@163.com', '2');
| true |
2c73793031488c954a01f196f2407c81d47cba52 | SQL | jatakiajanvi12/Aptitude-test-for-artisans | /section3.sql | UTF-8 | 5,328 | 3.28125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.12
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Dec 15, 2015 at 07:01 AM
-- Server version: 5.6.16
-- PHP Version: 5.5.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Database: `chikankari`
--
-- --------------------------------------------------------
--
-- Table structure for table `section3`
--
CREATE TABLE IF NOT EXISTS `section3` (
`qid` int(5) DEFAULT NULL,
`type` int(5) DEFAULT NULL,
`category` varchar(100) DEFAULT NULL,
`question` varchar(500) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`questionimage` varchar(500) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`opta` varchar(500) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`optb` varchar(500) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`optc` varchar(500) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`optd` varchar(500) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`correctopt` int(5) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `section3`
--
INSERT INTO `section3` (`qid`, `type`, `category`, `question`, `questionimage`, `opta`, `optb`, `optc`, `optd`, `correctopt`) VALUES
(1, 1, 'text', 'जॉर्जेट कपडे का प्रति वर्ग मीटर ग्राम की मूल्य क्या है?', '', '५० ग्राम', '६० ग्राम', '७० ग्राम', '९० ग्राम', 2),
(2, 1, 'text', 'वॉयल कपडे की धागा गिनती कितनी है?', '', '८६-९५', '७०-६८', '४०-४५', '९२-८८', 3),
(3, 1, 'text', 'इन में से कौन चिकनकारी उद्योग के हितदायक नहीं है ?', '', 'कारीगर', 'ग्राहक', 'उत्पादक', 'संगतराश', 4),
(4, 1, 'text', 'जिस कपडे पे चिकनकारी होती है, वो इन में से कौन बनाता है?', '', 'उत्पादक', 'कारीगर', 'निर्यातक', 'बैंक', 1),
(5, 2, 'text', 'इन में से कौन चिकनकारी साड़ी पहनते है?', '', 'लड़का', 'औरते', 'लड़की', 'मर्द', 2),
(6, 2, 'text', 'आप के पास एक ग्राहक आये है, जो एक १० साल की लड़की के लिए कुछ खरीदना चाहते है. आप उन्हें इन में से क्या दिखाएँ गे ?', '', 'लेहंगा', 'साडी', 'चादर', 'कुर्ती', 4),
(7, 2, 'text', 'इन् में से कोनसा कपडा सबसे महंगा मिलता है?', '', 'जॉर्जेट', 'प्यूर सिल्क', 'शिफॉन', 'कॉटन', 2),
(8, 2, 'text', 'इन में से कोनसा शेहेर चिकनकारी के लिए जाना जाता है?', '', 'दिल्ही', 'सूरत', 'लखनऊ', 'मुंबई', 3),
(9, 2, 'text', 'इन में से कोनसा चिकनकारी पहनावा सबसे महंगा है?', '', 'साड़ी', 'कुर्ती', 'स्टोल', 'कमीज़', 1),
(10, 2, 'text', 'आप के अंदाज़े में, इन में से कोनसे कारको आपके उत्पाद की कीमत तय करने में उपयोग किये जाते है?', '', 'काम खत्म करने के लिए लिया गया समय', 'कोनसा कपडा इस्तेमाल किया गया है', 'ऊपर के सब विकल्प', 'टांके के प्रकार', 4),
(11, 3, 'text', 'एक कैशबुक में इन् में से क्या नहीं होता?', '', 'संघ के खाते में से लिए गए उधार', 'झुरमाना', 'कारीगरूँ का वेतन', 'संघ की बचत', 3),
(12, 3, 'text', '१४१ / ३ ?', '', '४४', '४७', '४६', '४५', 2),
(13, 3, 'text', '१४१ - ९९?', '', '४५', '४४', '४३', '४२', 4),
(14, 3, 'text', '२३ * ९?', '', '२०७', '३०७', '१९७', '२३४', 1),
(15, 3, 'text', 'संघ का बैंक खाता किसके नाम में होना चाहिए?', '', 'ऊपर के दोनों विकल्प', 'संघ के नाम में', 'किसी एक व्यक्ति के नाम पे', 'इन् में से एक भी नहीं', 2);
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
| true |
865151a329e316d9be7e96dee3be55d57c677869 | SQL | tmdgy6232/BIZ_403_06_Oracle | /USER3(2019-06-24 select.sql | UTF-8 | 273 | 2.84375 | 3 | [] | no_license | --user3 화면입니다.
SELECT * FROM tbl_score;
SELECT
*
FROM tbl_student;
INSERT INTO tbl_student(st_num, st_name, st_age, st_tel, st_grade)
values('00003', '임꺽정', 22, '001-001');
-- 다른 스키마에 있는 테이블 조회
select * from user3.tbl_score; | true |
a79a467e2b32ac52e222cc3db19b30f674049099 | SQL | teja-goud-kandula/5xTest | /TejaTest/models/recovery_rate_by_region.sql | UTF-8 | 758 | 3.453125 | 3 | [] | no_license |
/*
Welcome to your first dbt model!
Did you know that you can also configure models directly within SQL files?
This will override configurations stated in dbt_project.yml
Try changing "table" to "view" below
*/
/*
Welcome to your first dbt model!
Did you know that you can also configure models directly within SQL files?
This will override configurations stated in dbt_project.yml
Try changing "table" to "view" below
*/
{{ config(materialized='table') }}
with cte as (
select Location , Total_Cases, Total_Recovered,
ROW_NUMBER() OVER (Partition by Location order by Date desc) as RNUM
from metrics
)
select Location, ((Total_Recovered/ Total_Cases ) * 100 )as Recovery_Rate
from cte where RNUM = 1
order by 2 desc
| true |
0719c2df1d25e473353976ddc205d0d8b89cafd8 | SQL | kaltura/dwh | /ddl/migrations/development/add_columns_entry_id_context_id_to_facts/041.dwh_fact_fms_sessions.sql | UTF-8 | 853 | 3.171875 | 3 | [] | no_license | USE kalturadw;
DROP TABLE IF EXISTS `dwh_fact_fms_sessions_new`;
CREATE TABLE `dwh_fact_fms_sessions_new` (
`session_id` varchar(20) NOT NULL,
`session_time` datetime NOT NULL,
`session_date_id` int(11) unsigned DEFAULT NULL,
`bandwidth_source_id` int(11) NOT NULL,
`session_client_ip` varchar(15) DEFAULT NULL,
`session_client_ip_number` int(10) unsigned DEFAULT NULL,
`country_id` int(11) DEFAULT NULL,
`location_id` int(11) DEFAULT NULL,
`session_partner_id` int(10) unsigned DEFAULT NULL,
`total_bytes` bigint(20) unsigned DEFAULT NULL,
`entry_id` varchar(20) DEFAULT NULL,
UNIQUE KEY `session_id` (`session_id`,`session_date_id`),
KEY `session_partner_id` (`session_partner_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE (session_date_id)
(PARTITION p_0 VALUES LESS THAN (1) ENGINE = INNODB)*/;
| true |
5b543f7d5394c56bbb99f1fe816e39e0b8c6540f | SQL | hqottsz/MXI | /assetmanagement-database/src/upgrade/plsql/lib/liquibase/7/2/4/0/sql/DEV-1075.sql | UTF-8 | 7,935 | 3.359375 | 3 | [] | no_license | --liquibase formatted sql
--changeSet DEV-1075:1 stripComments:false endDelimiter:\n\s*/\s*\n|\n\s*/\s*$
-- migration script for DEV-1075
BEGIN
utl_migr_schema_pkg.table_create('
Create table "REF_CHANGE_REASON" (
"CHANGE_REASON_CD" Varchar2 (16) NOT NULL DEFERRABLE ,
"DISPLAY_CODE" Varchar2 (8) NOT NULL DEFERRABLE ,
"DISPLAY_NAME" Varchar2 (80) NOT NULL DEFERRABLE ,
"DISPLAY_DESC" Varchar2 (4000) NOT NULL DEFERRABLE ,
"DISPLAY_ORD" Number(4,0) NOT NULL DEFERRABLE ,
"RSTAT_CD" Number(3,0) NOT NULL DEFERRABLE Check (RSTAT_CD IN (0, 1, 2, 3) ) DEFERRABLE ,
"REVISION_NO" Number(10,0) NOT NULL DEFERRABLE ,
"CTRL_DB_ID" Number(10,0) NOT NULL DEFERRABLE Check (CTRL_DB_ID BETWEEN 0 AND 4294967295 ) DEFERRABLE ,
"CREATION_DT" Date NOT NULL DEFERRABLE ,
"CREATION_DB_ID" Number(10,0) NOT NULL DEFERRABLE Check (CREATION_DB_ID BETWEEN 0 AND 4294967295 ) DEFERRABLE ,
"REVISION_DT" Date NOT NULL DEFERRABLE ,
"REVISION_DB_ID" Number(10,0) NOT NULL DEFERRABLE Check (REVISION_DB_ID BETWEEN 0 AND 4294967295 ) DEFERRABLE ,
"REVISION_USER" Varchar2 (30) NOT NULL DEFERRABLE ,
Constraint "PK_REF_CHANGE_REASON" primary key ("CHANGE_REASON_CD")
)
');
END;
/
--changeSet DEV-1075:2 stripComments:false endDelimiter:\n\s*/\s*\n|\n\s*/\s*$
CREATE OR REPLACE TRIGGER "TIBR_REF_CHANGE_REASON" BEFORE INSERT
ON "REF_CHANGE_REASON" REFERENCING NEW AS NEW OLD AS OLD FOR EACH ROW
begin
MX_TRIGGER_PKG.before_insert(
:new.rstat_cd,
:new.revision_no,
:new.ctrl_db_id,
:new.creation_dt,
:new.creation_db_id,
:new.revision_dt,
:new.revision_db_id,
:new.revision_user
);
end;
/
--changeSet DEV-1075:3 stripComments:false endDelimiter:\n\s*/\s*\n|\n\s*/\s*$
CREATE OR REPLACE TRIGGER "TUBR_REF_CHANGE_REASON" BEFORE UPDATE
ON "REF_CHANGE_REASON" REFERENCING NEW AS NEW OLD AS OLD FOR EACH ROW
begin
MX_TRIGGER_PKG.before_update(
:old.rstat_cd,
:new.rstat_cd,
:old.revision_no,
:new.revision_no,
:new.revision_dt,
:new.revision_db_id,
:new.revision_user );
end;
/
--changeSet DEV-1075:4 stripComments:false endDelimiter:\n\s*/\s*\n|\n\s*/\s*$
BEGIN
utl_migr_schema_pkg.table_constraint_add('
Alter table "REF_CHANGE_REASON" add Constraint "FK_MIMRSTAT_REFCHANGEREASON" foreign key ("RSTAT_CD") references "MIM_RSTAT" ("RSTAT_CD") DEFERRABLE
');
END;
/
--changeSet DEV-1075:5 stripComments:false
insert into ref_change_reason ( CHANGE_REASON_CD, DISPLAY_CODE, DISPLAY_NAME, DISPLAY_DESC, DISPLAY_ORD, RSTAT_CD, REVISION_NO, CTRL_DB_ID, CREATION_DT, CREATION_DB_ID, REVISION_DT, REVISION_DB_ID, REVISION_USER)
SELECT 'MXRTINE', 'Routine', 'Routine Action', 'Routine Action', 1, 0, 1, 0, SYSDATE, 0, SYSDATE, 0, 'MXI'
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM ref_change_reason WHERE CHANGE_REASON_CD='MXRTINE');
--changeSet DEV-1075:6 stripComments:false
insert into ref_change_reason ( CHANGE_REASON_CD, DISPLAY_CODE, DISPLAY_NAME, DISPLAY_DESC, DISPLAY_ORD, RSTAT_CD, REVISION_NO, CTRL_DB_ID, CREATION_DT, CREATION_DB_ID, REVISION_DT, REVISION_DB_ID, REVISION_USER)
SELECT 'MXACCEPT', 'Accept', 'Acceptance of Quotation', 'Acceptance of Quotation', 2, 0, 1, 0, SYSDATE, 0, SYSDATE, 0, 'MXI'
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM ref_change_reason WHERE CHANGE_REASON_CD='MXACCEPT');
--changeSet DEV-1075:7 stripComments:false
insert into ref_change_reason ( CHANGE_REASON_CD, DISPLAY_CODE, DISPLAY_NAME, DISPLAY_DESC, DISPLAY_ORD, RSTAT_CD, REVISION_NO, CTRL_DB_ID, CREATION_DT, CREATION_DB_ID, REVISION_DT, REVISION_DB_ID, REVISION_USER)
SELECT 'MXALTER', 'Alter', 'Alteration', 'Alteration', 3, 0, 1, 0, SYSDATE, 0, SYSDATE, 0, 'MXI'
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM ref_change_reason WHERE CHANGE_REASON_CD='MXALTER');
--changeSet DEV-1075:8 stripComments:false
insert into ref_change_reason ( CHANGE_REASON_CD, DISPLAY_CODE, DISPLAY_NAME, DISPLAY_DESC, DISPLAY_ORD, RSTAT_CD, REVISION_NO, CTRL_DB_ID, CREATION_DT, CREATION_DB_ID, REVISION_DT, REVISION_DB_ID, REVISION_USER)
SELECT 'MXCNCL', 'Cancel', 'Cancel', 'Cancel/Decrease Quantity', 6, 0, 1, 0, SYSDATE, 0, SYSDATE, 0, 'MXI'
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM ref_change_reason WHERE CHANGE_REASON_CD='MXCNCL');
--changeSet DEV-1075:9 stripComments:false
insert into ref_change_reason ( CHANGE_REASON_CD, DISPLAY_CODE, DISPLAY_NAME, DISPLAY_DESC, DISPLAY_ORD, RSTAT_CD, REVISION_NO, CTRL_DB_ID, CREATION_DT, CREATION_DB_ID, REVISION_DT, REVISION_DB_ID, REVISION_USER)
SELECT 'MXDCRSE', 'Decrease', 'Decrease Quantity', 'Cancel/Decrease Quantity', 7, 0, 1, 0, SYSDATE, 0, SYSDATE, 0, 'MXI'
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM ref_change_reason WHERE CHANGE_REASON_CD='MXDCRSE');
--changeSet DEV-1075:10 stripComments:false
insert into ref_change_reason ( CHANGE_REASON_CD, DISPLAY_CODE, DISPLAY_NAME, DISPLAY_DESC, DISPLAY_ORD, RSTAT_CD, REVISION_NO, CTRL_DB_ID, CREATION_DT, CREATION_DB_ID, REVISION_DT, REVISION_DB_ID, REVISION_USER)
SELECT 'MXINCRSE', 'Increase', 'Increase Quantity', 'Increase Quantity', 8, 0, 1, 0, SYSDATE, 0, SYSDATE, 0, 'MXI'
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM ref_change_reason WHERE CHANGE_REASON_CD='MXINCRSE');
--changeSet DEV-1075:11 stripComments:false
insert into ref_change_reason ( CHANGE_REASON_CD, DISPLAY_CODE, DISPLAY_NAME, DISPLAY_DESC, DISPLAY_ORD, RSTAT_CD, REVISION_NO, CTRL_DB_ID, CREATION_DT, CREATION_DB_ID, REVISION_DT, REVISION_DB_ID, REVISION_USER)
SELECT 'MXPRTL', 'Partial', 'Request partial ship quantity', 'Request partial Ship Quantity of an order', 9, 0, 1, 0, SYSDATE, 0, SYSDATE, 0, 'MXI'
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM ref_change_reason WHERE CHANGE_REASON_CD='MXPRTL');
--changeSet DEV-1075:12 stripComments:false endDelimiter:\n\s*/\s*\n|\n\s*/\s*$
BEGIN
utl_migr_schema_pkg.table_column_add('
Alter table PO_LINE add (
"DELETED_BOOL" Number(1,0) Check (DELETED_BOOL IN (0, 1) ) DEFERRABLE
)
');
END;
/
--changeSet DEV-1075:13 stripComments:false endDelimiter:\n\s*/\s*\n|\n\s*/\s*$
BEGIN
utl_migr_schema_pkg.table_column_add('
Alter table PO_LINE add (
"CHANGE_REASON_CD" Varchar2 (16)
)
');
END;
/
--changeSet DEV-1075:14 stripComments:false endDelimiter:\n\s*/\s*\n|\n\s*/\s*$
BEGIN
utl_migr_schema_pkg.table_constraint_add('
Alter table "PO_LINE" add Constraint "FK_REFCHANGEREASON_POLINE" foreign key ("CHANGE_REASON_CD") references "REF_CHANGE_REASON" ("CHANGE_REASON_CD") DEFERRABLE
');
END;
/
--changeSet DEV-1075:15 stripComments:false endDelimiter:\n\s*/\s*\n|\n\s*/\s*$
BEGIN
EXECUTE IMMEDIATE 'ALTER TRIGGER TUBR_PO_LINE DISABLE';
END;
/
--changeSet DEV-1075:16 stripComments:false
UPDATE
PO_LINE
SET
deleted_bool=0
WHERE
deleted_bool IS NULL;
--changeSet DEV-1075:17 stripComments:false
UPDATE
PO_LINE
SET
change_reason_cd='MXRTINE'
WHERE
change_reason_cd IS NULL;
--changeSet DEV-1075:18 stripComments:false endDelimiter:\n\s*/\s*\n|\n\s*/\s*$
BEGIN
EXECUTE IMMEDIATE 'ALTER TRIGGER TUBR_PO_LINE ENABLE';
END;
/
--changeSet DEV-1075:19 stripComments:false endDelimiter:\n\s*/\s*\n|\n\s*/\s*$
BEGIN
utl_migr_schema_pkg.table_column_modify('
Alter table "PO_LINE" modify (
"DELETED_BOOL" Default 0 NOT NULL DEFERRABLE
)
');
END;
/
--changeSet DEV-1075:20 stripComments:false endDelimiter:\n\s*/\s*\n|\n\s*/\s*$
BEGIN
utl_migr_schema_pkg.table_column_modify('
Alter table "PO_LINE" modify (
"CHANGE_REASON_CD" NOT NULL DEFERRABLE
)
');
END;
/
--changeSet DEV-1075:21 stripComments:false endDelimiter:\n\s*/\s*\n|\n\s*/\s*$
BEGIN
utl_migr_schema_pkg.table_column_add('
Alter table PO_INVOICE add (
"INV_SEQ_NUM" Number(10,0)
)
');
END;
/
--changeSet DEV-1075:22 stripComments:false endDelimiter:\n\s*/\s*\n|\n\s*/\s*$
BEGIN
utl_migr_schema_pkg.table_column_add('
Alter table PO_INVOICE add (
"VENDOR_INVOICE_SDESC" Varchar2 (80)
)
');
END;
/
--changeSet DEV-1075:23 stripComments:false endDelimiter:\n\s*/\s*\n|\n\s*/\s*$
BEGIN
utl_migr_schema_pkg.table_column_add('
Alter table PO_INVOICE add (
"VENDOR_INVOICE_DT" Date
)
');
END;
/ | true |
221f012973324a6525aaa0858bed0d4a617a09b0 | SQL | fernandosavin/Votaciones | /eventos_imc.sql | UTF-8 | 33,587 | 3.28125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 17-04-2018 a las 01:55:02
-- Versión del servidor: 10.1.25-MariaDB
-- Versión de PHP: 7.1.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Base de datos: `eventos_imc`
--
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `aspectos`
--
CREATE TABLE `aspectos` (
`id_aspecto` int(10) UNSIGNED NOT NULL,
`id_categoria` int(10) UNSIGNED NOT NULL,
`nombre` varchar(200) COLLATE latin1_spanish_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;
--
-- Volcado de datos para la tabla `aspectos`
--
INSERT INTO `aspectos` (`id_aspecto`, `id_categoria`, `nombre`) VALUES
(1, 1, 'Se expone claramente cómo se satisface de manera directa una necesidad de la ciudad/región.'),
(2, 1, 'Calidad del \'business model canvas\' desarrollado.'),
(3, 1, 'El equipo tiene claramente identificados sus recursos y socios clave, existe coherencia en sus supuestos.'),
(4, 1, 'Identifican claramente sus fuentes de ingresos, y tienen bien definida su estructura de costos.'),
(5, 1, 'El equipo pudo demostrar la aplicación de herramientas de investigación metodológica.'),
(6, 2, 'Se demuestra claramente que se tiene conocimiento del mercado (meta/potencial).'),
(7, 2, 'Proporcionan una explicación clara del impacto potencial en su comunidad / región.'),
(8, 2, 'Se tiene una idea clara de las estrategias que seguirán con el mercado meta identificado, de acuerdo al impacto esperado.'),
(9, 2, 'Potencial implementación en comunidades o ciudades de la región.'),
(10, 3, 'Nivel de innovación en el producto/servicio presentado.'),
(11, 3, 'El producto/servicio contiene elementos diferenciadores que son fuente de una ventaja competitiva.'),
(12, 3, 'El prototipo/presentación gráfica que se presenta es estético y se explica claramente.'),
(13, 3, 'El prototipo es (o la idea puede ser) funcional en el corto o mediano plazo.'),
(14, 4, 'Dominio grupal de temas relacionados al proyecto.'),
(15, 4, 'Interés y amabilidad al atender al público.'),
(16, 4, 'Calidad del stand en donde el equipo presenta su proyecto.'),
(19, 5, 'Creatividad.'),
(21, 5, 'Innovación y originalidad.'),
(22, 5, 'El contenido del proyecto cumple con su objetivo.'),
(23, 5, 'Funcionalidad adecuada.'),
(24, 5, 'Calidad en los contenidos: animación y sonidos.'),
(25, 5, 'Fácil manejo y flujo en los escenarios.'),
(27, 5, 'Instrucciones claras.'),
(28, 5, 'Complementos (tríptico).'),
(29, 6, 'Impacto en el público.'),
(30, 6, 'Atención y cordialidad durante la exposición.'),
(31, 6, 'Creatividad y distribución del stand.'),
(32, 6, 'Dominio del tema y seguridad en las respuestas.'),
(33, 6, 'Disposición, apoyo y presencia del equipo\r\n.'),
(34, 7, 'Sabor del platillo.'),
(35, 7, 'Presentación platillo.'),
(36, 7, 'Explicación sobre el platillo.'),
(37, 7, 'Representa al Estado.'),
(38, 8, 'Sabor del platillo.'),
(40, 8, 'Presentación.'),
(41, 8, 'Explicación sobre el platillo.'),
(42, 8, 'Representa al Estado.'),
(43, 9, 'Sabor.'),
(44, 9, 'Presentación.'),
(45, 9, 'Explicación sobre la bebida.'),
(46, 9, 'Representa al Estado.'),
(47, 11, 'Exposición.'),
(48, 11, 'Trato amable.'),
(49, 11, 'Responde dudas de manera correcta y cortés.'),
(50, 12, 'Representación del Estado.'),
(52, 12, 'Creatividad.'),
(53, 12, 'Vestuario.'),
(54, 13, 'Puntualidad.'),
(55, 13, 'El producto funciona adecuadamente.'),
(56, 13, 'Es un productor innovador.'),
(57, 13, 'El proyecto cumple con el objetivo para el que fue creado.'),
(58, 13, 'El producto tiene posibilidades de ser elaborado para su posterior comercialización.'),
(59, 13, 'La presentación del producto es atractiva para el público.'),
(60, 14, 'El expositor presenta sus ideas de forma clara y fluida.'),
(61, 14, 'Vestimenta adecuada de los expositores.'),
(62, 14, 'Explican de forma detallada el funcionamiento y las ventajas de su producto.'),
(63, 14, 'El flyer entregado cuenta con información necesaria y su diseño es atractivo a la vista.'),
(64, 15, 'El expositor se preocupa por atender a todos los visitantes.'),
(65, 15, 'Otorga la información de manera detallada.'),
(66, 15, 'Responde todas las dudas de manera cortés, incluso cuando puede sentirse bajo presión.'),
(67, 15, 'El expositor muestra un trato amable a los clientes.'),
(68, 16, 'Decoración acorde al producto.'),
(69, 16, 'Diseño atractivo.'),
(70, 16, 'La distribución del espacio es adecuada.'),
(71, 16, 'El diseño y los elementos que se utilizaron son originales.'),
(72, 16, 'Los materiales con los que están elaborados son de calidad.'),
(73, 17, 'Presentación de al menos 5 obras.'),
(74, 17, 'Variedad.'),
(75, 17, 'Creatividad.'),
(76, 17, 'Presentación oral.'),
(77, 17, 'Curaduría.'),
(78, 19, 'Afinación.'),
(79, 19, 'Desenvolvimiento escénico.'),
(80, 19, 'Creatividad.'),
(81, 19, 'Originalidad.'),
(82, 19, 'Vestuario.'),
(83, 19, 'Seguridad.'),
(84, 19, 'Caracterización.'),
(85, 19, 'Calidad de ejecucion.'),
(86, 19, 'Impacto en el público.'),
(87, 20, 'Desenvolvimiento escénico.'),
(88, 20, 'Creatividad.'),
(89, 20, 'Originalidad.'),
(90, 20, 'Vestuario.'),
(91, 20, 'Seguridad.'),
(92, 20, 'Caracterización.'),
(93, 20, 'Coordinación.'),
(94, 20, 'Coreografía.'),
(95, 20, 'Calidad de ejecución.'),
(96, 20, 'Impacto en el público.'),
(97, 21, 'Desenvolvimiento escénico.'),
(98, 21, 'Creatividad.'),
(99, 21, 'Originalidad.'),
(100, 21, 'Vestuario.'),
(101, 21, 'Seguridad.'),
(102, 21, 'Caracterización.'),
(103, 21, 'Coordinación.'),
(104, 21, 'Coreografía.'),
(105, 21, 'Calidad de ejecución'),
(106, 21, 'Impacto en el público\r\n'),
(107, 10, 'Sabor'),
(108, 10, 'Presentación'),
(109, 10, 'Explicación sobre el platillo'),
(110, 10, 'Representa al estado');
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `calificaciones`
--
CREATE TABLE `calificaciones` (
`id_usuario` int(10) UNSIGNED NOT NULL,
`id_participante` int(10) UNSIGNED NOT NULL,
`id_aspecto` int(10) UNSIGNED NOT NULL,
`calificacion` int(10) UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;
--
-- Volcado de datos para la tabla `calificaciones`
--
INSERT INTO `calificaciones` (`id_usuario`, `id_participante`, `id_aspecto`, `calificacion`) VALUES
(2, 1, 78, 8),
(2, 1, 79, 7),
(2, 1, 80, 8),
(2, 1, 81, 9),
(2, 1, 82, 7),
(2, 1, 83, 7),
(2, 1, 84, 9),
(2, 1, 85, 8),
(2, 1, 86, 9),
(5, 1, 78, 7),
(5, 1, 79, 7),
(5, 1, 80, 7),
(5, 1, 81, 3),
(5, 1, 82, 7),
(5, 1, 83, 7),
(5, 1, 84, 5),
(5, 1, 85, 3),
(5, 1, 86, 4),
(6, 1, 78, 8),
(6, 1, 79, 7),
(6, 1, 80, 7),
(6, 1, 81, 7),
(6, 1, 82, 8),
(6, 1, 83, 9),
(6, 1, 84, 7),
(6, 1, 85, 8),
(6, 1, 86, 8),
(4, 1, 78, 7),
(4, 1, 79, 6),
(4, 1, 80, 6),
(4, 1, 81, 7),
(4, 1, 82, 7),
(4, 1, 83, 7),
(4, 1, 84, 5),
(4, 1, 85, 8),
(4, 1, 86, 6),
(2, 6, 78, 6),
(2, 6, 79, 7),
(2, 6, 80, 8),
(2, 6, 81, 8),
(2, 6, 82, 7),
(2, 6, 83, 7),
(2, 6, 84, 7),
(2, 6, 85, 8),
(2, 6, 86, 10),
(4, 6, 78, 6),
(4, 6, 79, 7),
(4, 6, 80, 6),
(4, 6, 81, 7),
(4, 6, 82, 8),
(4, 6, 83, 8),
(4, 6, 84, 8),
(4, 6, 85, 7),
(4, 6, 86, 8),
(6, 6, 78, 8),
(6, 6, 79, 8),
(6, 6, 80, 7),
(6, 6, 81, 7),
(6, 6, 82, 8),
(6, 6, 83, 8),
(6, 6, 84, 8),
(6, 6, 85, 8),
(6, 6, 86, 8),
(5, 6, 78, 7),
(5, 6, 79, 7),
(5, 6, 80, 4),
(5, 6, 81, 7),
(5, 6, 82, 8),
(5, 6, 83, 7),
(5, 6, 84, 7),
(5, 6, 85, 7),
(5, 6, 86, 7),
(2, 2, 78, 9),
(2, 2, 79, 10),
(2, 2, 80, 10),
(2, 2, 81, 10),
(2, 2, 82, 9),
(2, 2, 83, 10),
(2, 2, 84, 10),
(2, 2, 85, 10),
(2, 2, 86, 10),
(5, 2, 78, 8),
(5, 2, 79, 9),
(5, 2, 80, 10),
(5, 2, 81, 10),
(5, 2, 82, 8),
(5, 2, 83, 10),
(5, 2, 84, 10),
(5, 2, 85, 9),
(5, 2, 86, 10),
(6, 2, 78, 8),
(6, 2, 79, 8),
(6, 2, 80, 8),
(6, 2, 81, 8),
(6, 2, 82, 8),
(6, 2, 83, 9),
(6, 2, 84, 8),
(6, 2, 85, 8),
(6, 2, 86, 9),
(4, 2, 78, 8),
(4, 2, 79, 9),
(4, 2, 80, 9),
(4, 2, 81, 9),
(4, 2, 82, 9),
(4, 2, 83, 10),
(4, 2, 84, 8),
(4, 2, 85, 9),
(4, 2, 86, 10),
(4, 3, 78, 7),
(4, 3, 79, 6),
(4, 3, 80, 8),
(4, 3, 81, 7),
(4, 3, 82, 8),
(4, 3, 83, 7),
(4, 3, 84, 8),
(4, 3, 85, 7),
(4, 3, 86, 6),
(6, 3, 78, 8),
(6, 3, 79, 8),
(6, 3, 80, 8),
(6, 3, 81, 8),
(6, 3, 82, 9),
(6, 3, 83, 8),
(6, 3, 84, 8),
(6, 3, 85, 7),
(6, 3, 86, 8),
(2, 3, 78, 10),
(2, 3, 79, 9),
(2, 3, 80, 9),
(2, 3, 81, 10),
(2, 3, 82, 9),
(2, 3, 83, 8),
(2, 3, 84, 10),
(2, 3, 85, 9),
(2, 3, 86, 9),
(5, 3, 78, 7),
(5, 3, 79, 8),
(5, 3, 80, 10),
(5, 3, 81, 10),
(5, 3, 82, 10),
(5, 3, 83, 8),
(5, 3, 84, 8),
(5, 3, 85, 7),
(5, 3, 86, 8),
(6, 7, 78, 8),
(6, 7, 79, 8),
(6, 7, 80, 8),
(6, 7, 81, 8),
(6, 7, 82, 8),
(6, 7, 83, 8),
(6, 7, 84, 8),
(6, 7, 85, 8),
(6, 7, 86, 9),
(2, 7, 78, 8),
(2, 7, 79, 10),
(2, 7, 80, 10),
(2, 7, 81, 10),
(2, 7, 82, 10),
(2, 7, 83, 10),
(2, 7, 84, 10),
(2, 7, 85, 10),
(2, 7, 86, 9),
(5, 7, 78, 9),
(5, 7, 79, 10),
(5, 7, 80, 10),
(5, 7, 81, 10),
(5, 7, 82, 10),
(5, 7, 83, 9),
(5, 7, 84, 9),
(5, 7, 85, 10),
(5, 7, 86, 9),
(4, 7, 78, 8),
(4, 7, 79, 8),
(4, 7, 80, 8),
(4, 7, 81, 7),
(4, 7, 82, 7),
(4, 7, 83, 8),
(4, 7, 84, 8),
(4, 7, 85, 8),
(4, 7, 86, 7),
(6, 5, 78, 9),
(6, 5, 79, 8),
(6, 5, 80, 8),
(6, 5, 81, 8),
(6, 5, 82, 8),
(6, 5, 83, 9),
(6, 5, 84, 8),
(6, 5, 85, 9),
(6, 5, 86, 8),
(4, 5, 78, 9),
(4, 5, 79, 8),
(4, 5, 80, 8),
(4, 5, 81, 8),
(4, 5, 82, 7),
(4, 5, 83, 8),
(4, 5, 84, 7),
(4, 5, 85, 8),
(4, 5, 86, 8),
(2, 5, 78, 10),
(2, 5, 79, 10),
(2, 5, 80, 9),
(2, 5, 81, 10),
(2, 5, 82, 8),
(2, 5, 83, 10),
(2, 5, 84, 9),
(2, 5, 85, 10),
(2, 5, 86, 10),
(5, 5, 78, 9),
(5, 5, 79, 7),
(5, 5, 80, 8),
(5, 5, 81, 7),
(5, 5, 82, 4),
(5, 5, 83, 10),
(5, 5, 84, 8),
(5, 5, 85, 9),
(5, 5, 86, 8),
(2, 4, 78, 9),
(2, 4, 79, 10),
(2, 4, 80, 10),
(2, 4, 81, 10),
(2, 4, 82, 10),
(2, 4, 83, 10),
(2, 4, 84, 10),
(2, 4, 85, 10),
(2, 4, 86, 10),
(4, 4, 78, 10),
(4, 4, 79, 10),
(4, 4, 80, 9),
(4, 4, 81, 9),
(4, 4, 82, 8),
(4, 4, 83, 10),
(4, 4, 84, 8),
(4, 4, 85, 9),
(4, 4, 86, 9),
(5, 4, 78, 9),
(5, 4, 79, 9),
(5, 4, 80, 10),
(5, 4, 81, 10),
(5, 4, 82, 9),
(5, 4, 83, 10),
(5, 4, 84, 10),
(5, 4, 85, 9),
(5, 4, 86, 9),
(6, 4, 78, 8),
(6, 4, 79, 8),
(6, 4, 80, 7),
(6, 4, 81, 8),
(6, 4, 82, 8),
(6, 4, 83, 8),
(6, 4, 84, 8),
(6, 4, 85, 8),
(6, 4, 86, 9),
(2, 8, 87, 10),
(2, 8, 88, 10),
(2, 8, 89, 10),
(2, 8, 90, 8),
(2, 8, 91, 10),
(2, 8, 92, 9),
(2, 8, 93, 9),
(2, 8, 94, 10),
(2, 8, 95, 10),
(2, 8, 96, 10),
(5, 8, 87, 10),
(5, 8, 88, 9),
(5, 8, 89, 10),
(5, 8, 90, 9),
(5, 8, 91, 10),
(5, 8, 92, 10),
(5, 8, 93, 10),
(5, 8, 94, 9),
(5, 8, 95, 10),
(5, 8, 96, 10),
(6, 8, 87, 10),
(6, 8, 88, 9),
(6, 8, 89, 9),
(6, 8, 90, 9),
(6, 8, 91, 9),
(6, 8, 92, 9),
(6, 8, 93, 10),
(6, 8, 94, 10),
(6, 8, 95, 9),
(6, 8, 96, 9),
(4, 8, 87, 10),
(4, 8, 88, 9),
(4, 8, 89, 10),
(4, 8, 90, 9),
(4, 8, 91, 9),
(4, 8, 92, 8),
(4, 8, 93, 10),
(4, 8, 94, 9),
(4, 8, 95, 9),
(4, 8, 96, 9),
(4, 9, 87, 9),
(4, 9, 88, 9),
(4, 9, 89, 10),
(4, 9, 90, 10),
(4, 9, 91, 9),
(4, 9, 92, 9),
(4, 9, 93, 9),
(4, 9, 94, 9),
(4, 9, 95, 9),
(4, 9, 96, 10),
(2, 9, 87, 8),
(2, 9, 88, 10),
(2, 9, 89, 6),
(2, 9, 90, 9),
(2, 9, 91, 8),
(2, 9, 92, 9),
(2, 9, 93, 8),
(2, 9, 94, 8),
(2, 9, 95, 8),
(2, 9, 96, 9),
(5, 9, 87, 9),
(5, 9, 88, 10),
(5, 9, 89, 8),
(5, 9, 90, 9),
(5, 9, 91, 8),
(5, 9, 92, 7),
(5, 9, 93, 8),
(5, 9, 94, 8),
(5, 9, 95, 9),
(5, 9, 96, 8),
(6, 9, 87, 9),
(6, 9, 88, 10),
(6, 9, 89, 9),
(6, 9, 90, 9),
(6, 9, 91, 9),
(6, 9, 92, 9),
(6, 9, 93, 9),
(6, 9, 94, 10),
(6, 9, 95, 9),
(6, 9, 96, 9),
(4, 15, 87, 9),
(4, 15, 88, 10),
(4, 15, 89, 9),
(4, 15, 90, 9),
(4, 15, 91, 9),
(4, 15, 92, 10),
(4, 15, 93, 8),
(4, 15, 94, 9),
(4, 15, 95, 8),
(4, 15, 96, 1),
(2, 15, 87, 8),
(2, 15, 88, 9),
(2, 15, 89, 10),
(2, 15, 90, 10),
(2, 15, 91, 8),
(2, 15, 92, 10),
(2, 15, 93, 7),
(2, 15, 94, 8),
(2, 15, 95, 8),
(2, 15, 96, 8),
(5, 15, 87, 10),
(5, 15, 88, 10),
(5, 15, 89, 10),
(5, 15, 90, 9),
(5, 15, 91, 10),
(5, 15, 92, 10),
(5, 15, 93, 10),
(5, 15, 94, 10),
(5, 15, 95, 9),
(5, 15, 96, 10),
(6, 15, 87, 9),
(6, 15, 88, 9),
(6, 15, 89, 9),
(6, 15, 90, 9),
(6, 15, 91, 9),
(6, 15, 92, 9),
(6, 15, 93, 9),
(6, 15, 94, 9),
(6, 15, 95, 8),
(6, 15, 96, 9),
(2, 12, 87, 10),
(2, 12, 88, 10),
(2, 12, 89, 10),
(2, 12, 90, 10),
(2, 12, 91, 9),
(2, 12, 92, 10),
(2, 12, 93, 9),
(2, 12, 94, 10),
(2, 12, 95, 9),
(2, 12, 96, 10),
(5, 12, 87, 9),
(5, 12, 88, 9),
(5, 12, 89, 9),
(5, 12, 90, 10),
(5, 12, 91, 9),
(5, 12, 92, 9),
(5, 12, 93, 9),
(5, 12, 94, 9),
(5, 12, 95, 9),
(5, 12, 96, 9),
(4, 12, 87, 8),
(4, 12, 88, 9),
(4, 12, 89, 8),
(4, 12, 90, 10),
(4, 12, 91, 8),
(4, 12, 92, 9),
(4, 12, 93, 8),
(4, 12, 94, 8),
(4, 12, 95, 8),
(4, 12, 96, 8),
(6, 12, 87, 9),
(6, 12, 88, 9),
(6, 12, 89, 9),
(6, 12, 90, 9),
(6, 12, 91, 9),
(6, 12, 92, 9),
(6, 12, 93, 9),
(6, 12, 94, 9),
(6, 12, 95, 9),
(6, 12, 96, 9),
(5, 10, 87, 9),
(5, 10, 88, 9),
(5, 10, 89, 10),
(5, 10, 90, 10),
(5, 10, 91, 9),
(5, 10, 92, 9),
(5, 10, 93, 8),
(5, 10, 94, 8),
(5, 10, 95, 9),
(5, 10, 96, 8),
(2, 10, 87, 10),
(2, 10, 88, 8),
(2, 10, 89, 9),
(2, 10, 90, 10),
(2, 10, 91, 9),
(2, 10, 92, 10),
(2, 10, 93, 9),
(2, 10, 94, 9),
(2, 10, 95, 9),
(2, 10, 96, 8),
(4, 10, 87, 9),
(4, 10, 88, 10),
(4, 10, 89, 9),
(4, 10, 90, 9),
(4, 10, 91, 8),
(4, 10, 92, 10),
(4, 10, 93, 8),
(4, 10, 94, 9),
(4, 10, 95, 9),
(4, 10, 96, 8),
(6, 10, 87, 9),
(6, 10, 88, 10),
(6, 10, 89, 9),
(6, 10, 90, 9),
(6, 10, 91, 9),
(6, 10, 92, 9),
(6, 10, 93, 9),
(6, 10, 94, 9),
(6, 10, 95, 9),
(6, 10, 96, 9),
(4, 13, 87, 8),
(4, 13, 88, 9),
(4, 13, 89, 9),
(4, 13, 90, 10),
(4, 13, 91, 8),
(4, 13, 92, 9),
(4, 13, 93, 8),
(4, 13, 94, 8),
(4, 13, 95, 9),
(4, 13, 96, 9),
(6, 13, 87, 9),
(6, 13, 88, 10),
(6, 13, 89, 9),
(6, 13, 90, 9),
(6, 13, 91, 9),
(6, 13, 92, 9),
(6, 13, 93, 9),
(6, 13, 94, 9),
(6, 13, 95, 9),
(6, 13, 96, 9),
(2, 13, 87, 9),
(2, 13, 88, 10),
(2, 13, 89, 10),
(2, 13, 90, 9),
(2, 13, 91, 10),
(2, 13, 92, 10),
(2, 13, 93, 7),
(2, 13, 94, 9),
(2, 13, 95, 8),
(2, 13, 96, 10),
(5, 13, 87, 9),
(5, 13, 88, 10),
(5, 13, 89, 10),
(5, 13, 90, 10),
(5, 13, 91, 8),
(5, 13, 92, 8),
(5, 13, 93, 8),
(5, 13, 94, 8),
(5, 13, 95, 8),
(5, 13, 96, 10),
(2, 14, 87, 10),
(2, 14, 88, 10),
(2, 14, 89, 9),
(2, 14, 90, 9),
(2, 14, 91, 10),
(2, 14, 92, 9),
(2, 14, 93, 9),
(2, 14, 94, 9),
(2, 14, 95, 10),
(2, 14, 96, 10),
(5, 14, 87, 10),
(5, 14, 88, 10),
(5, 14, 89, 10),
(5, 14, 90, 10),
(5, 14, 91, 10),
(5, 14, 92, 10),
(5, 14, 93, 10),
(5, 14, 94, 10),
(5, 14, 95, 10),
(5, 14, 96, 10),
(4, 14, 87, 9),
(4, 14, 88, 8),
(4, 14, 89, 9),
(4, 14, 90, 9),
(4, 14, 91, 9),
(4, 14, 92, 9),
(4, 14, 93, 8),
(4, 14, 94, 8),
(4, 14, 95, 8),
(4, 14, 96, 8),
(6, 14, 87, 9),
(6, 14, 88, 9),
(6, 14, 89, 9),
(6, 14, 90, 9),
(6, 14, 91, 9),
(6, 14, 92, 9),
(6, 14, 93, 9),
(6, 14, 94, 8),
(6, 14, 95, 8),
(6, 14, 96, 9),
(4, 11, 87, 8),
(4, 11, 88, 9),
(4, 11, 89, 9),
(4, 11, 90, 10),
(4, 11, 91, 9),
(4, 11, 92, 10),
(4, 11, 93, 9),
(4, 11, 94, 8),
(4, 11, 95, 8),
(4, 11, 96, 10),
(2, 11, 87, 8),
(2, 11, 88, 9),
(2, 11, 89, 9),
(2, 11, 90, 8),
(2, 11, 91, 9),
(2, 11, 92, 10),
(2, 11, 93, 8),
(2, 11, 94, 8),
(2, 11, 95, 9),
(2, 11, 96, 9),
(5, 11, 87, 9),
(5, 11, 88, 10),
(5, 11, 89, 10),
(5, 11, 90, 10),
(5, 11, 91, 9),
(5, 11, 92, 10),
(5, 11, 93, 9),
(5, 11, 94, 9),
(5, 11, 95, 9),
(5, 11, 96, 9),
(6, 11, 87, 8),
(6, 11, 88, 9),
(6, 11, 89, 9),
(6, 11, 90, 9),
(6, 11, 91, 9),
(6, 11, 92, 9),
(6, 11, 93, 8),
(6, 11, 94, 9),
(6, 11, 95, 9),
(6, 11, 96, 8),
(4, 16, 87, 8),
(4, 16, 88, 10),
(4, 16, 89, 10),
(4, 16, 90, 10),
(4, 16, 91, 8),
(4, 16, 92, 8),
(4, 16, 93, 8),
(4, 16, 94, 8),
(4, 16, 95, 8),
(4, 16, 96, 9),
(2, 16, 87, 9),
(2, 16, 88, 10),
(2, 16, 89, 10),
(2, 16, 90, 8),
(2, 16, 91, 10),
(2, 16, 92, 9),
(2, 16, 93, 8),
(2, 16, 94, 9),
(2, 16, 95, 8),
(2, 16, 96, 9),
(6, 16, 87, 8),
(6, 16, 88, 8),
(6, 16, 89, 8),
(6, 16, 90, 8),
(6, 16, 91, 9),
(6, 16, 92, 8),
(6, 16, 93, 8),
(6, 16, 94, 9),
(6, 16, 95, 8),
(6, 16, 96, 8),
(5, 16, 87, 9),
(5, 16, 88, 9),
(5, 16, 89, 9),
(5, 16, 90, 8),
(5, 16, 91, 9),
(5, 16, 92, 8),
(5, 16, 93, 8),
(5, 16, 94, 9),
(5, 16, 95, 8),
(5, 16, 96, 9),
(2, 17, 87, 8),
(2, 17, 88, 8),
(2, 17, 89, 7),
(2, 17, 90, 8),
(2, 17, 91, 8),
(2, 17, 92, 9),
(2, 17, 93, 6),
(2, 17, 94, 6),
(2, 17, 95, 8),
(2, 17, 96, 8),
(4, 17, 87, 8),
(4, 17, 88, 8),
(4, 17, 89, 8),
(4, 17, 90, 9),
(4, 17, 91, 8),
(4, 17, 92, 9),
(4, 17, 93, 8),
(4, 17, 94, 8),
(4, 17, 95, 8),
(4, 17, 96, 9),
(5, 17, 87, 9),
(5, 17, 88, 10),
(5, 17, 89, 10),
(5, 17, 90, 10),
(5, 17, 91, 9),
(5, 17, 92, 9),
(5, 17, 93, 8),
(5, 17, 94, 9),
(5, 17, 95, 9),
(5, 17, 96, 9),
(6, 17, 87, 8),
(6, 17, 88, 9),
(6, 17, 89, 9),
(6, 17, 90, 9),
(6, 17, 91, 8),
(6, 17, 92, 8),
(6, 17, 93, 8),
(6, 17, 94, 8),
(6, 17, 95, 8),
(6, 17, 96, 7),
(2, 18, 97, 10),
(2, 18, 98, 10),
(2, 18, 99, 10),
(2, 18, 100, 10),
(2, 18, 101, 10),
(2, 18, 102, 10),
(2, 18, 103, 10),
(2, 18, 104, 10),
(2, 18, 105, 10),
(2, 18, 106, 10),
(5, 18, 97, 10),
(5, 18, 98, 10),
(5, 18, 99, 10),
(5, 18, 100, 10),
(5, 18, 101, 8),
(5, 18, 102, 9),
(5, 18, 103, 9),
(5, 18, 104, 10),
(5, 18, 105, 10),
(5, 18, 106, 10),
(4, 18, 97, 9),
(4, 18, 98, 9),
(4, 18, 99, 9),
(4, 18, 100, 10),
(4, 18, 101, 10),
(4, 18, 102, 10),
(4, 18, 103, 10),
(4, 18, 104, 10),
(4, 18, 105, 10),
(4, 18, 106, 10),
(6, 18, 97, 9),
(6, 18, 98, 10),
(6, 18, 99, 10),
(6, 18, 100, 9),
(6, 18, 101, 9),
(6, 18, 102, 9),
(6, 18, 103, 10),
(6, 18, 104, 10),
(6, 18, 105, 10),
(6, 18, 106, 10),
(2, 19, 97, 9),
(2, 19, 98, 7),
(2, 19, 99, 8),
(2, 19, 100, 10),
(2, 19, 101, 10),
(2, 19, 102, 8),
(2, 19, 103, 9),
(2, 19, 104, 9),
(2, 19, 105, 9),
(2, 19, 106, 10),
(5, 19, 97, 10),
(5, 19, 98, 10),
(5, 19, 99, 10),
(5, 19, 100, 10),
(5, 19, 101, 9),
(5, 19, 102, 9),
(5, 19, 103, 9),
(5, 19, 104, 9),
(5, 19, 105, 9),
(5, 19, 106, 9),
(4, 19, 97, 9),
(4, 19, 98, 10),
(4, 19, 99, 10),
(4, 19, 100, 9),
(4, 19, 101, 9),
(4, 19, 102, 10),
(4, 19, 103, 9),
(4, 19, 104, 9),
(4, 19, 105, 10),
(4, 19, 106, 9),
(6, 19, 97, 10),
(6, 19, 98, 9),
(6, 19, 99, 9),
(6, 19, 100, 10),
(6, 19, 101, 9),
(6, 19, 102, 9),
(6, 19, 103, 10),
(6, 19, 104, 9),
(6, 19, 105, 9),
(6, 19, 106, 9),
(2, 20, 97, 10),
(2, 20, 98, 10),
(2, 20, 99, 10),
(2, 20, 100, 10),
(2, 20, 101, 10),
(2, 20, 102, 10),
(2, 20, 103, 10),
(2, 20, 104, 10),
(2, 20, 105, 10),
(2, 20, 106, 10),
(4, 20, 97, 10),
(4, 20, 98, 10),
(4, 20, 99, 10),
(4, 20, 100, 9),
(4, 20, 101, 9),
(4, 20, 102, 10),
(4, 20, 103, 9),
(4, 20, 104, 10),
(4, 20, 105, 9),
(4, 20, 106, 9),
(5, 20, 97, 10),
(5, 20, 98, 10),
(5, 20, 99, 10),
(5, 20, 100, 10),
(5, 20, 101, 10),
(5, 20, 102, 10),
(5, 20, 103, 9),
(5, 20, 104, 9),
(5, 20, 105, 10),
(5, 20, 106, 10),
(6, 20, 97, 9),
(6, 20, 98, 10),
(6, 20, 99, 10),
(6, 20, 100, 10),
(6, 20, 101, 9),
(6, 20, 102, 9),
(6, 20, 103, 10),
(6, 20, 104, 10),
(6, 20, 105, 9),
(6, 20, 106, 9),
(4, 21, 97, 9),
(4, 21, 98, 10),
(4, 21, 99, 10),
(4, 21, 100, 9),
(4, 21, 101, 9),
(4, 21, 102, 9),
(4, 21, 103, 8),
(4, 21, 104, 10),
(4, 21, 105, 9),
(4, 21, 106, 9),
(5, 21, 97, 9),
(5, 21, 98, 9),
(5, 21, 99, 9),
(5, 21, 100, 9),
(5, 21, 101, 9),
(5, 21, 102, 9),
(5, 21, 103, 9),
(5, 21, 104, 8),
(5, 21, 105, 8),
(5, 21, 106, 9),
(2, 21, 97, 9),
(2, 21, 98, 9),
(2, 21, 99, 10),
(2, 21, 100, 8),
(2, 21, 101, 9),
(2, 21, 102, 8),
(2, 21, 103, 9),
(2, 21, 104, 9),
(2, 21, 105, 9),
(2, 21, 106, 8),
(6, 21, 97, 9),
(6, 21, 98, 10),
(6, 21, 99, 10),
(6, 21, 100, 9),
(6, 21, 101, 9),
(6, 21, 102, 9),
(6, 21, 103, 9),
(6, 21, 104, 10),
(6, 21, 105, 10),
(6, 21, 106, 9),
(2, 22, 97, 10),
(2, 22, 98, 10),
(2, 22, 99, 10),
(2, 22, 100, 9),
(2, 22, 101, 10),
(2, 22, 102, 10),
(2, 22, 103, 10),
(2, 22, 104, 10),
(2, 22, 105, 10),
(2, 22, 106, 9),
(5, 22, 97, 10),
(5, 22, 98, 10),
(5, 22, 99, 10),
(5, 22, 100, 10),
(5, 22, 101, 10),
(5, 22, 102, 10),
(5, 22, 103, 9),
(5, 22, 104, 10),
(5, 22, 105, 9),
(5, 22, 106, 10),
(4, 22, 97, 10),
(4, 22, 98, 10),
(4, 22, 99, 9),
(4, 22, 100, 10),
(4, 22, 101, 10),
(4, 22, 102, 10),
(4, 22, 103, 10),
(4, 22, 104, 9),
(4, 22, 105, 10),
(4, 22, 106, 9),
(6, 22, 97, 10),
(6, 22, 98, 10),
(6, 22, 99, 10),
(6, 22, 100, 10),
(6, 22, 101, 9),
(6, 22, 102, 10),
(6, 22, 103, 9),
(6, 22, 104, 9),
(6, 22, 105, 9),
(6, 22, 106, 10),
(2, 23, 97, 8),
(2, 23, 98, 9),
(2, 23, 99, 9),
(2, 23, 100, 7),
(2, 23, 101, 8),
(2, 23, 102, 7),
(2, 23, 103, 8),
(2, 23, 104, 8),
(2, 23, 105, 9),
(2, 23, 106, 9),
(4, 23, 97, 9),
(4, 23, 98, 10),
(4, 23, 99, 10),
(4, 23, 100, 9),
(4, 23, 101, 9),
(4, 23, 102, 9),
(4, 23, 103, 9),
(4, 23, 104, 9),
(4, 23, 105, 9),
(4, 23, 106, 9),
(5, 23, 97, 10),
(5, 23, 98, 10),
(5, 23, 99, 10),
(5, 23, 100, 9),
(5, 23, 101, 9),
(5, 23, 102, 9),
(5, 23, 103, 9),
(5, 23, 104, 10),
(5, 23, 105, 9),
(5, 23, 106, 10),
(6, 23, 97, 8),
(6, 23, 98, 8),
(6, 23, 99, 8),
(6, 23, 100, 8),
(6, 23, 101, 8),
(6, 23, 102, 8),
(6, 23, 103, 8),
(6, 23, 104, 8),
(6, 23, 105, 8),
(6, 23, 106, 8),
(8, 24, 73, 10),
(8, 24, 74, 9),
(8, 24, 75, 8),
(8, 24, 76, 8),
(8, 24, 77, 9),
(9, 24, 73, 8),
(9, 24, 74, 8),
(9, 24, 75, 9),
(9, 24, 76, 8),
(9, 24, 77, 8),
(7, 24, 73, 10),
(7, 24, 74, 8),
(7, 24, 75, 7),
(7, 24, 76, 8),
(7, 24, 77, 8),
(8, 25, 73, 9),
(8, 25, 74, 9),
(8, 25, 75, 9),
(8, 25, 76, 8),
(8, 25, 77, 9),
(9, 25, 73, 10),
(9, 25, 74, 10),
(9, 25, 75, 10),
(9, 25, 76, 8),
(9, 25, 77, 8),
(7, 25, 73, 10),
(7, 25, 74, 9),
(7, 25, 75, 7),
(7, 25, 76, 8),
(7, 25, 77, 7),
(9, 26, 73, 10),
(9, 26, 74, 9),
(9, 26, 75, 9),
(9, 26, 76, 8),
(9, 26, 77, 10),
(7, 26, 73, 10),
(7, 26, 74, 9),
(7, 26, 75, 9),
(7, 26, 76, 8),
(7, 26, 77, 9),
(8, 26, 73, 10),
(8, 26, 74, 10),
(8, 26, 75, 10),
(8, 26, 76, 9),
(8, 26, 77, 9),
(9, 27, 73, 10),
(9, 27, 74, 7),
(9, 27, 75, 10),
(9, 27, 76, 9),
(9, 27, 77, 9),
(7, 27, 73, 10),
(7, 27, 74, 9),
(7, 27, 75, 10),
(7, 27, 76, 9),
(7, 27, 77, 10),
(8, 27, 73, 10),
(8, 27, 74, 9),
(8, 27, 75, 10),
(8, 27, 76, 9),
(8, 27, 77, 10),
(10, 29, 73, 10),
(10, 29, 74, 7),
(10, 29, 75, 5),
(10, 29, 76, 5),
(10, 29, 77, 8),
(7, 29, 73, 10),
(7, 29, 74, 10),
(7, 29, 75, 10),
(7, 29, 76, 8),
(7, 29, 77, 8),
(9, 29, 73, 7),
(9, 29, 74, 8),
(9, 29, 75, 10),
(9, 29, 76, 8),
(9, 29, 77, 6),
(8, 29, 73, 9),
(8, 29, 74, 9),
(8, 29, 75, 9),
(8, 29, 76, 8),
(8, 29, 77, 8),
(10, 28, 73, 10),
(10, 28, 74, 8),
(10, 28, 75, 7),
(10, 28, 76, 8),
(10, 28, 77, 6),
(7, 28, 73, 10),
(7, 28, 74, 8),
(7, 28, 75, 8),
(7, 28, 76, 9),
(7, 28, 77, 9),
(8, 28, 73, 10),
(8, 28, 74, 8),
(8, 28, 75, 9),
(8, 28, 76, 1),
(8, 28, 77, 9),
(9, 28, 73, 8),
(9, 28, 74, 8),
(9, 28, 75, 9),
(9, 28, 76, 9),
(9, 28, 77, 9),
(9, 30, 73, 8),
(9, 30, 74, 10),
(9, 30, 75, 10),
(9, 30, 76, 9),
(9, 30, 77, 9),
(7, 30, 73, 10),
(7, 30, 74, 10),
(7, 30, 75, 9),
(7, 30, 76, 9),
(7, 30, 77, 9),
(8, 30, 73, 9),
(8, 30, 74, 10),
(8, 30, 75, 10),
(8, 30, 76, 9),
(8, 30, 77, 10),
(10, 30, 73, 10),
(10, 30, 74, 9),
(10, 30, 75, 8),
(10, 30, 76, 7),
(10, 30, 77, 7),
(10, 31, 73, 10),
(10, 31, 74, 8),
(10, 31, 75, 9),
(10, 31, 76, 8),
(10, 31, 77, 8),
(7, 31, 73, 10),
(7, 31, 74, 10),
(7, 31, 75, 10),
(7, 31, 76, 9),
(7, 31, 77, 8),
(8, 31, 73, 10),
(8, 31, 74, 10),
(8, 31, 75, 10),
(8, 31, 76, 8),
(8, 31, 77, 10),
(9, 31, 73, 10),
(9, 31, 74, 10),
(9, 31, 75, 10),
(9, 31, 76, 9),
(9, 31, 77, 10),
(8, 32, 73, 10),
(8, 32, 74, 10),
(8, 32, 75, 9),
(8, 32, 76, 8),
(8, 32, 77, 10),
(9, 32, 73, 10),
(9, 32, 74, 10),
(9, 32, 75, 10),
(9, 32, 76, 10),
(9, 32, 77, 10),
(7, 32, 73, 10),
(7, 32, 74, 10),
(7, 32, 75, 10),
(7, 32, 76, 9),
(7, 32, 77, 9),
(10, 32, 73, 10),
(10, 32, 74, 8),
(10, 32, 75, 7),
(10, 32, 76, 6),
(10, 32, 77, 8),
(10, 33, 73, 10),
(10, 33, 74, 9),
(10, 33, 75, 8),
(10, 33, 76, 9),
(10, 33, 77, 8),
(8, 33, 73, 10),
(8, 33, 74, 10),
(8, 33, 75, 10),
(8, 33, 76, 10),
(8, 33, 77, 10),
(7, 33, 73, 10),
(7, 33, 74, 10),
(7, 33, 75, 10),
(7, 33, 76, 10),
(7, 33, 77, 9),
(9, 33, 73, 10),
(9, 33, 74, 10),
(9, 33, 75, 10),
(9, 33, 76, 10),
(9, 33, 77, 10),
(9, 34, 73, 10),
(9, 34, 74, 10),
(9, 34, 75, 10),
(9, 34, 76, 9),
(9, 34, 77, 10),
(8, 34, 73, 9),
(8, 34, 74, 9),
(8, 34, 75, 8),
(8, 34, 76, 9),
(8, 34, 77, 10),
(7, 34, 73, 10),
(7, 34, 74, 10),
(7, 34, 75, 8),
(7, 34, 76, 8),
(7, 34, 77, 8),
(10, 34, 73, 10),
(10, 34, 74, 7),
(10, 34, 75, 8),
(10, 34, 76, 8),
(10, 34, 77, 8),
(10, 35, 73, 10),
(10, 35, 74, 7),
(10, 35, 75, 7),
(10, 35, 76, 9),
(10, 35, 77, 9),
(7, 35, 73, 10),
(7, 35, 74, 9),
(7, 35, 75, 9),
(7, 35, 76, 10),
(7, 35, 77, 10),
(8, 35, 73, 9),
(8, 35, 74, 10),
(8, 35, 75, 10),
(8, 35, 76, 10),
(8, 35, 77, 9),
(9, 35, 73, 7),
(9, 35, 74, 8),
(9, 35, 75, 10),
(9, 35, 76, 10),
(9, 35, 77, 8),
(9, 36, 73, 8),
(9, 36, 74, 9),
(9, 36, 75, 8),
(9, 36, 76, 8),
(9, 36, 77, 7),
(8, 36, 73, 10),
(8, 36, 74, 10),
(8, 36, 75, 10),
(8, 36, 76, 9),
(8, 36, 77, 10),
(7, 36, 73, 10),
(7, 36, 74, 9),
(7, 36, 75, 8),
(7, 36, 76, 8),
(7, 36, 77, 9),
(10, 36, 73, 10),
(10, 36, 74, 8),
(10, 36, 75, 7),
(10, 36, 76, 8),
(10, 36, 77, 9),
(8, 37, 73, 9),
(8, 37, 74, 8),
(8, 37, 75, 10),
(8, 37, 76, 9),
(8, 37, 77, 9),
(7, 37, 73, 10),
(7, 37, 74, 10),
(7, 37, 75, 9),
(7, 37, 76, 9),
(7, 37, 77, 9),
(10, 37, 73, 10),
(10, 37, 74, 8),
(10, 37, 75, 8),
(10, 37, 76, 7),
(10, 37, 77, 8),
(9, 37, 73, 10),
(9, 37, 74, 10),
(9, 37, 75, 7),
(9, 37, 76, 9),
(9, 37, 77, 8),
(10, 27, 73, 10),
(10, 27, 74, 10),
(10, 27, 75, 8),
(10, 27, 76, 8),
(10, 27, 77, 7),
(10, 26, 73, 10),
(10, 26, 74, 9),
(10, 26, 75, 9),
(10, 26, 76, 9),
(10, 26, 77, 8),
(10, 25, 73, 10),
(10, 25, 74, 8),
(10, 25, 75, 7),
(10, 25, 76, 7),
(10, 25, 77, 7),
(10, 24, 73, 10),
(10, 24, 74, 7),
(10, 24, 75, 8),
(10, 24, 76, 9),
(10, 24, 77, 8),
(1, 24, 73, 1),
(1, 24, 74, 1),
(1, 24, 75, 1),
(1, 24, 76, 1),
(1, 24, 77, 1);
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `categorias`
--
CREATE TABLE `categorias` (
`id_categoria` int(10) UNSIGNED NOT NULL,
`id_evento` int(10) UNSIGNED NOT NULL,
`nombre` varchar(50) COLLATE latin1_spanish_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;
--
-- Volcado de datos para la tabla `categorias`
--
INSERT INTO `categorias` (`id_categoria`, `id_evento`, `nombre`) VALUES
(1, 1, 'seccion a'),
(2, 1, 'seccion b'),
(3, 1, 'seccion c'),
(4, 1, 'seccion d'),
(5, 2, 'mejor proyecto multimedia'),
(6, 2, 'mejor stand multimedia'),
(7, 3, 'entrada'),
(8, 3, 'plato fuerte'),
(9, 3, 'bebida'),
(10, 3, 'postre'),
(11, 3, 'atencion al publico'),
(12, 3, 'stand'),
(13, 4, 'producto mas creativo'),
(14, 4, 'mejor estrategia de venta'),
(15, 4, 'mejor atencion al publico'),
(16, 4, 'mejor stand'),
(17, 5, 'Mejor Exposición'),
(19, 6, 'canto'),
(20, 6, 'grupos menores'),
(21, 6, 'grupos mayores');
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `eventos`
--
CREATE TABLE `eventos` (
`id_evento` int(10) UNSIGNED NOT NULL,
`nombre` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
`fecha` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;
--
-- Volcado de datos para la tabla `eventos`
--
INSERT INTO `eventos` (`id_evento`, `nombre`, `fecha`) VALUES
(1, 'Expo Emprendedor', '0000-00-00'),
(2, 'Expo Multimedia', '0000-00-00'),
(3, 'Muestra Gastronómica', '0000-00-00'),
(4, 'Createc', '0000-00-00'),
(5, 'Expo Arte', '0000-00-00'),
(6, 'Festival de talentos', '0000-00-00'),
(7, 'Concurso de dia de muertos', '0000-00-00');
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `participantes`
--
CREATE TABLE `participantes` (
`id_participante` int(10) UNSIGNED NOT NULL,
`id_categoria` int(10) UNSIGNED NOT NULL,
`nombre` varchar(50) COLLATE latin1_spanish_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;
--
-- Volcado de datos para la tabla `participantes`
--
INSERT INTO `participantes` (`id_participante`, `id_categoria`, `nombre`) VALUES
(1, 19, '501-Camila Battistella'),
(2, 19, '302-Salvador Valenzuela'),
(3, 19, '502-Lucía Briseño'),
(4, 19, '501-Marcelino Sánchez'),
(5, 19, '301-Ana Victoria Bustamante Paz'),
(6, 19, '301-Carmen Picos'),
(7, 19, '501-Eduardo Becerril Alegre'),
(8, 20, '501-Friends on the rain'),
(9, 20, '302-Fight like a girl'),
(10, 20, '502-Boxeadores'),
(11, 20, '301-Geeks'),
(12, 20, '102-Princesas Leias'),
(13, 20, '101-Space Jam'),
(14, 20, '501-Unsteady'),
(15, 20, '301-La la land'),
(16, 20, '102-Chewbaccas'),
(17, 20, '101-Sailor moon'),
(18, 21, '501-Utopía'),
(19, 21, '302-Charlie y la fábrica de chocolate'),
(20, 21, '502-Turkana'),
(21, 21, '301-Baile cultural Brasil, Korea y África'),
(22, 21, '102-Star wars'),
(23, 21, '101-Musical'),
(24, 17, 'Vincent Van Gogh'),
(25, 17, 'Auguste Renoir'),
(26, 17, 'Paul Gauguin'),
(27, 17, 'Pablo Picasso'),
(28, 17, 'Frida Kahlo'),
(29, 17, 'Salvador Dalí'),
(30, 17, 'Remedios Varo'),
(31, 17, 'René Margritte '),
(32, 17, 'Giacomo Balla'),
(33, 17, 'Jasper Jones'),
(34, 17, 'Andy Warhol'),
(35, 17, 'Barbara Kruguer'),
(36, 17, 'Yayoi Kusama'),
(37, 17, 'Gabriel Orozco');
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `usuarios`
--
CREATE TABLE `usuarios` (
`id_usuario` int(10) UNSIGNED NOT NULL,
`id_evento` int(10) UNSIGNED NOT NULL,
`nombre` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
`tipo` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
`pass` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
`cierre_votos` int(5) UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;
--
-- Volcado de datos para la tabla `usuarios`
--
INSERT INTO `usuarios` (`id_usuario`, `id_evento`, `nombre`, `tipo`, `pass`, `cierre_votos`) VALUES
(1, 1, 'administrador', 'administrador', 'admin123', 0),
(2, 6, 'delma', 'juez', 'delma_2017', 0),
(4, 6, 'isaac', 'juez', 'isaac_2017', 0),
(5, 6, 'itzel', 'juez', 'itzel_2017', 0),
(6, 6, 'jorge', 'juez', 'jorge_2017', 0),
(7, 5, 'Paola', 'juez', 'paola123', 0),
(8, 5, 'Mirza', 'juez', 'mirza123', 0),
(9, 5, 'Teresita', 'juez', 'teresita123', 0),
(10, 5, 'Alfredo', 'juez', 'alfredo123', 0);
--
-- Índices para tablas volcadas
--
--
-- Indices de la tabla `aspectos`
--
ALTER TABLE `aspectos`
ADD PRIMARY KEY (`id_aspecto`),
ADD KEY `categorias-aspectos` (`id_categoria`);
--
-- Indices de la tabla `calificaciones`
--
ALTER TABLE `calificaciones`
ADD KEY `aspectos-calificaciones` (`id_aspecto`),
ADD KEY `participantes-calificaciones` (`id_participante`),
ADD KEY `usuarios-calificaciones` (`id_usuario`);
--
-- Indices de la tabla `categorias`
--
ALTER TABLE `categorias`
ADD PRIMARY KEY (`id_categoria`),
ADD KEY `eventos-categorias` (`id_evento`);
--
-- Indices de la tabla `eventos`
--
ALTER TABLE `eventos`
ADD PRIMARY KEY (`id_evento`);
--
-- Indices de la tabla `participantes`
--
ALTER TABLE `participantes`
ADD PRIMARY KEY (`id_participante`),
ADD KEY `categorias-participantes` (`id_categoria`);
--
-- Indices de la tabla `usuarios`
--
ALTER TABLE `usuarios`
ADD PRIMARY KEY (`id_usuario`),
ADD KEY `eventos-usuarios` (`id_evento`);
--
-- AUTO_INCREMENT de las tablas volcadas
--
--
-- AUTO_INCREMENT de la tabla `aspectos`
--
ALTER TABLE `aspectos`
MODIFY `id_aspecto` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=111;
--
-- AUTO_INCREMENT de la tabla `categorias`
--
ALTER TABLE `categorias`
MODIFY `id_categoria` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22;
--
-- AUTO_INCREMENT de la tabla `eventos`
--
ALTER TABLE `eventos`
MODIFY `id_evento` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
--
-- AUTO_INCREMENT de la tabla `participantes`
--
ALTER TABLE `participantes`
MODIFY `id_participante` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=38;
--
-- AUTO_INCREMENT de la tabla `usuarios`
--
ALTER TABLE `usuarios`
MODIFY `id_usuario` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
--
-- Restricciones para tablas volcadas
--
--
-- Filtros para la tabla `aspectos`
--
ALTER TABLE `aspectos`
ADD CONSTRAINT `categorias-aspectos` FOREIGN KEY (`id_categoria`) REFERENCES `categorias` (`id_categoria`) ON DELETE NO ACTION ON UPDATE NO ACTION;
--
-- Filtros para la tabla `calificaciones`
--
ALTER TABLE `calificaciones`
ADD CONSTRAINT `aspectos-calificaciones` FOREIGN KEY (`id_aspecto`) REFERENCES `aspectos` (`id_aspecto`) ON DELETE NO ACTION ON UPDATE NO ACTION,
ADD CONSTRAINT `participantes-calificaciones` FOREIGN KEY (`id_participante`) REFERENCES `participantes` (`id_participante`) ON DELETE NO ACTION ON UPDATE NO ACTION,
ADD CONSTRAINT `usuarios-calificaciones` FOREIGN KEY (`id_usuario`) REFERENCES `usuarios` (`id_usuario`) ON DELETE NO ACTION ON UPDATE NO ACTION;
--
-- Filtros para la tabla `categorias`
--
ALTER TABLE `categorias`
ADD CONSTRAINT `eventos-categorias` FOREIGN KEY (`id_evento`) REFERENCES `eventos` (`id_evento`) ON DELETE NO ACTION ON UPDATE NO ACTION;
--
-- Filtros para la tabla `participantes`
--
ALTER TABLE `participantes`
ADD CONSTRAINT `categorias-participantes` FOREIGN KEY (`id_categoria`) REFERENCES `categorias` (`id_categoria`) ON DELETE NO ACTION ON UPDATE NO ACTION;
--
-- Filtros para la tabla `usuarios`
--
ALTER TABLE `usuarios`
ADD CONSTRAINT `eventos-usuarios` FOREIGN KEY (`id_evento`) REFERENCES `eventos` (`id_evento`) ON DELETE NO ACTION ON UPDATE NO ACTION;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
| true |
cdb8ea4cf26a3ec0b56324e5b675392661c937b8 | SQL | nuriakman/Ornek_Veri_Setleri | /bulmaca.sql | UTF-8 | 22,671 | 3.0625 | 3 | [] | no_license | -- Adminer 4.2.1 MySQL dump
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
DROP TABLE IF EXISTS `bulmaca`;
CREATE TABLE `bulmaca` (
`sira` int(11) NOT NULL AUTO_INCREMENT,
`soru` varchar(255) DEFAULT NULL,
`cevap` varchar(255) DEFAULT NULL,
PRIMARY KEY (`sira`)
) ENGINE=MyISAM;
INSERT INTO `bulmaca` (`sira`, `soru`, `cevap`) VALUES
(1, 'Abaküs', 'SAYIBONCUĞU'),
(2, 'Abartı', 'MÜBALAĞA'),
(3, 'ABD Başkanı Eisenhover\'in takma adı', 'İKE'),
(4, 'ABD de bir kent', 'ATLANTA, ŞİKAGO'),
(5, 'ABD Eyaletleri', 'NEBRASKA, NEVADA,NEW HAMRSHİRE,NEW JERSEY,NEW MEXİCO,NEW YORK,NORTH CAROLİNA,NORTH DAKOTA, OHİO, OKLAHAMA, OREGON, PENNZYLVANİA, RHODE İSLAND, SOUTH CAROLİNA, SOUTH DAKOTA,TENNESSEE,TEXAS,UTAH,VERMONT,VİRGİNİA,WASHİNGTON,WEST VİGİNİA,WİSCONSİN,WYOMİNG'),
(6, 'ABD Eyaletleri', 'ALABAMA, ALASKA, ARİZONA, ARKANSAS, CALİFORNİA, COLORADO, CONNECTİCUT, DELAWARE, FLORİDA, GEORGİA, HAWAİİ, İDAHO, İLLİNOİS, İNDİANA, İOWA, KANSAS, KENTUCKY, LOUİSİANA, MAİNE, MARYLAND, MASSACHUSETTS, MİCHİGAN, MİNNESOTA, MİSSİSSİPPİ, MİSSOURİ, MONTANA,'),
(7, 'ABD Profesyonel Basketbol ligi', 'NBA'),
(8, 'ABD Ulusal Havacılık ve Uzay Dairesi (kısaca)', 'NASA'),
(9, 'ABD\'de beş göllerden birisi', 'ERİE'),
(10, 'ABD\'nin Başkenti', 'WASHİNGTON D.C.'),
(11, 'ABD\'nin para birimi', 'DOLAR'),
(12, 'ABD\'nin uluslar arası plaka işareti', 'USA'),
(13, 'Abece', 'ALFABE'),
(14, 'Aberasyon', 'SAPINÇ'),
(15, 'Abes', 'SAÇMA'),
(16, 'Abi', 'AĞABEY'),
(17, 'Abide', 'ANIT'),
(18, 'Abidevi', 'ANITSAL'),
(19, 'Abıhayat', 'BENGİSU'),
(20, 'Abla', 'BACI'),
(21, 'Abuhava', 'İKLİM'),
(22, 'AC simgeli element', 'AKTİNYUM'),
(23, 'Acar', 'ÇALIŞKAN'),
(24, 'Acele', 'İVEDİ'),
(25, 'Acele Posta Servisi \"kısaca\"', 'APS'),
(26, 'Aceleci, acul', 'EVECEN, İVECEN'),
(27, 'Acelecilik', 'TELAŞ'),
(28, 'Acem', 'İRANLI'),
(29, 'Acemi', 'TOY'),
(30, 'Acemilik', 'TOYLUK'),
(31, 'Acı', 'IZDIRAP, KEDER'),
(32, 'Acı sesler çıkarmak', 'İNLEMEK'),
(33, 'Acı, üzüntü', 'ELEM'),
(34, 'Acıbadem ağacı', 'EREZ'),
(35, 'Acıbalık ta denilen bir tatlı su balığı', 'GÖRDEK'),
(36, 'Acıklı', 'ELİM'),
(37, 'Acıklı olay', 'DRAM'),
(38, 'Acıklı sahne oyunu', 'DRAM'),
(39, 'Acil', 'İVEDİ'),
(40, 'Acılar karşısında dayanma gücünü yitirmeyen, sağlam, dayanıklı, metanetli', 'METİN'),
(41, 'Acıma', 'MERHAMET'),
(42, 'Acımasız', 'ZALİM'),
(43, 'Acımasız, zorba', 'CEBERUT, CEBERRÜT'),
(44, 'Acımtırak bir içki', 'AMER'),
(45, 'Acının unutulması ya da hafiflemesi, teselli', 'AVUNÇ'),
(46, 'Acıyarak ve koruyarak seven, şefkatli', 'SEVECEN'),
(47, 'Aciz', 'GÜÇSÜZ, ZAYIF'),
(48, 'Acizler, güçsüzler', 'ACEZE'),
(49, 'Acun', 'DÜNYA'),
(50, 'Aç', 'HARİS'),
(51, 'Aç gözlü, hırslı', 'HARİS'),
(52, 'Aç gözlülük', 'TAMAH'),
(53, 'Aç olma durumu', 'AÇLIK'),
(54, 'Açacak', 'TİRBİŞON'),
(55, 'Açar', 'APERİTİF'),
(56, 'Açar', 'ANAHTAR'),
(57, 'Açı', 'ZAVİYE'),
(58, 'Açı ölçer', 'İLETKİ, MİNKALE'),
(59, 'Açı ölçmede kullanılan dönme hareketli cetvel', 'ALİDAT'),
(60, 'Açık', 'ALENİ'),
(61, 'Açık artırım ile satış', 'MEZAT'),
(62, 'Açık deniz', 'ENGİN'),
(63, 'Açık duran baş parmağın ucundan gösterme parmağının ucuna kadar olan uzaklık', 'SERE'),
(64, 'Açık elle vurulan tokat', 'ŞAMAR'),
(65, 'Açık havada çıkan kuru soğuk', 'AYAZ'),
(66, 'Açık leylak rengi', 'LİLA'),
(67, 'Açık mavi gözlü', 'MAVİŞ'),
(68, 'Açık olma durumu, açıklık', 'ALENİYET'),
(69, 'Açık saman rengi', 'KREM'),
(70, 'Açık sarı renk', 'LİMONİ, SAMANİ'),
(71, 'Açık su kanalı', 'ARK'),
(72, 'Açık toprak rengi', 'BOZ'),
(73, 'Açık yer, meydan, alan', 'SAHA'),
(74, 'Açık zincirli organik madde', 'ALİFATİK'),
(75, 'Açık, apaçık, belli', 'AŞİKAR'),
(76, 'Açık, net', 'BERRAK'),
(77, 'Açık, ortada, meydanda, herkesin içinde yapılan', 'ALENİ'),
(78, 'Açıkca, belirgin', 'AŞİKAR'),
(79, 'Açıkça gizlemeden', 'ALENEN'),
(80, 'Açıkça görünürlük, bellilik', 'BEDAHET'),
(81, 'Açıkça, gizlemeden, meydanda', 'ALENİ'),
(82, 'Açıkgöz', 'UYANIK'),
(83, 'Açıkgözlülük, hırs', 'TAMAH'),
(84, 'Açıklama', 'İZAH'),
(85, 'Açıklamalar', 'İZAHAT'),
(86, 'Açıklık', 'ALANİYET, ALENİLİK'),
(87, 'Açıklık ve boş arazi, sahra', 'KIR'),
(88, 'Açıktan açığa, herkesin gözü önünde, herkesin içinde, gizlemeden, açıkça', 'ALENEN'),
(89, 'Açılır kapanır perde türü', 'STOR'),
(90, 'Açkı', 'ANAHTAR'),
(91, 'Açma aracı', 'AÇACAK'),
(92, 'Ad', 'ÜN, İSİM, NAM'),
(93, 'Ad belirtilerek yapılan', 'NOMİNAL, YOKLAMA'),
(94, 'Ad çekme', 'KURA'),
(95, 'Ad ve Soyadın baş harfleriyle atılan kısa imza', 'PARAF'),
(96, 'Adaçayı', 'MERYEMİYE'),
(97, 'Adak', 'NEZİR'),
(98, 'Adakta bulunma', 'ADAMA'),
(99, 'Adale', 'KAS'),
(100, 'Adalet', 'HAK, TÜRE'),
(101, 'Adaletle iş gören, adaletten ayrılmayan', 'ADİL'),
(102, 'Adaletli', 'ADİL'),
(103, 'Adam öldürme', 'CİNAYET'),
(104, 'Adamak', 'NEZRETMEK'),
(105, 'Adana\'nın İlçeleri', 'SEYHAN, YÜREĞİR, ALADAĞ, BAHÇE, CEYHAN, DÜZİÇİ, FEKE, İMAMOĞLU, KADİRLİ, KARAİSALI, SAİMBEYLİ, TUĞFANBEYLİ, YUMURTALIK'),
(106, 'Adavet', 'DÜŞMANLIK'),
(107, 'Aday', 'NAMZET'),
(108, 'Adcılık', 'NOMİNALİZM'),
(109, 'Adem ile Hava\'nın üçüncü oğlu', 'ŞİT'),
(110, 'Ademiyat', 'BEŞERİYET, İNSANİYET, İNSANLIK'),
(111, 'Ademoğlu, beşer', 'İNSAN'),
(112, 'Adese', 'LUP, MERCEK'),
(113, 'Adet', 'TANE'),
(114, 'Adet haline getirme, alışma, alışkanlık', 'İTİYAT'),
(115, 'Adet, parça', 'PARE'),
(116, 'Adi', 'BAYAĞI, DEĞERSİZ, KABA, ÖZENSİZ'),
(117, 'Adı sanı belli olmayan', 'ANONİM'),
(118, 'Adil', 'ADALETLİ'),
(119, 'Adıl', 'ZAMİR'),
(120, 'Adım aralığı', 'FULE'),
(121, 'Adın durum elerinden biri', 'DE'),
(122, 'Adını anma', 'ZİKİR'),
(123, 'Adıyaman\'ın İlçeleri', 'BESNİ, ÇELİKHAN, GERGER, GÖLBAŞI, KAHTA, SAMSAT, SİNCİK, TUT'),
(124, 'Adiyö', 'HOŞCAKAL'),
(125, 'Adlar, isimler', 'ESAME'),
(126, 'Adları aynı olanlardan her biri', 'ADAŞ'),
(127, 'Adli', 'TÜREL'),
(128, 'Adolf Hitler\'in partisi', 'NAZİ'),
(129, 'Af', 'BAĞIŞLAMA'),
(130, 'Afacan', 'YARAMAZ'),
(131, 'Afak', 'UFUKLAR'),
(132, 'Afakiye', 'NESNELCİLİK'),
(133, 'Aferin', 'BRAVO'),
(134, 'Afete uğramış', 'AFETZEDE'),
(135, 'Affetmek', 'BAĞIŞLAMAK'),
(136, 'Afganistan\'da bir şehir', 'HERAT'),
(137, 'Afganistan\'ın Başkenti', 'KABİL'),
(138, 'Afganistan\'ın para birimi', 'AFGANİ'),
(139, 'Afi', 'CAKA, FİYAKA'),
(140, 'Afitap', 'GÜNEŞ'),
(141, 'Afiyet', 'SAĞLIK'),
(142, 'Aforizma', 'ÖZDEYİŞ'),
(143, 'Afrika misk kedisi', 'KALEMİKS'),
(144, 'Afrika Ulusal Kongresi\'ni simgeleyen harfler', 'ANC'),
(145, 'Afrika yerli davulu', 'TAMTAM'),
(146, 'Afrika\'da bir akarsu', 'NİL'),
(147, 'Afrika\'da yaşayan bir tür antilop', 'KOB'),
(148, 'Afrika\'da yaşayan, gövdesi kızıl kestane, bacakları beyaz çizgili memeli hayvan', 'OKAPİ'),
(149, 'Afrika\'nın en yüksek dağı Kilimanjaro\'nun, yerli dillerde \"özgürlük\" anlamına gelen yeni adı', 'UHURU'),
(150, 'Afrika\'nın hızlı koşullar için yetiştirilmiş evcil hecin devesi', 'MEHARİ'),
(151, 'Afrika\'nın kimi yerlerinde toplu biçimde yapılan vahşi hayvan acı', 'SAFARİ'),
(152, 'Afrika\'ya hayat veren akarsu', 'NİL'),
(153, 'Afrikalı zencilerin büyük bir bölümünü içine alan etnik grup', 'BANTU'),
(154, 'Afyon\'un İlçeleri', 'BAŞMAKÇI, BAYAT, BOLVADİN, ÇAY, ÇOBANLAR, DAZKIRI, DİNAR, EMİRDAĞ, EVCİLER, HOCALAR, İHSANİYE, İSCEHİSAR, KIZILÖREN, SANDIKLI, SİNCANLI, SULTANDAĞI, ŞUHUT'),
(155, 'AG simgeli element', 'GÜMÜŞ'),
(156, 'Ağ', 'ŞEBEKE'),
(157, 'Ağ şeklinde yapılan örgü', 'FİLE'),
(158, 'Ağ tabaka', 'RETİNA'),
(159, 'Ağ torba', 'FİLE'),
(160, 'Ağ yatak', 'HAMAK'),
(161, 'Ağabey', 'ABİ, AKA'),
(162, 'Ağabey (kısaca)', 'ABİ'),
(163, 'Ağabey sözcüğünün kısa söyleniş biçimi', 'ABİ'),
(164, 'Ağabeyin eşi', 'YENGE'),
(165, 'Ağacı çizmeye yarayan çember kesitli, ucu sivri ve ağaç saplı el aracı', 'ÇİZECEK'),
(166, 'Ağacın gövdesinden ayrılan kollardan her biri', 'DAL'),
(167, 'Ağaçlarla örtülü alan', 'ORMAN'),
(168, 'Ağaçlıklı yol', 'ALE'),
(169, 'Ağan', 'AKANYILDIZ, ŞAHAP'),
(170, 'Ağdalık', 'VİSKOZİT'),
(171, 'Ağı', 'ZEHİR'),
(172, 'Ağı, sem', 'ZEHİR'),
(173, 'Ağıağacı', 'ZAKKUM'),
(174, 'Ağıl', 'DAM, KOM'),
(175, 'Ağılı', 'ZEHİRLİ'),
(176, 'Ağır bir dans türü', 'SLOV'),
(177, 'Ağır ritimli bir İspanyol dansı', 'BOLERO'),
(178, 'Ağır topuz', 'GÜRZ'),
(179, 'Ağır, sert ve siyah renkli tahtası olan ağaç', 'ABANOZ'),
(180, 'Ağırbaşlı, onurlu', 'VAKUR'),
(181, 'Ağırlama', 'İZAZ'),
(182, 'Ağırlık', 'YÜK'),
(183, 'Ağırlık ölçmekte kullanılan alet', 'TERAZİ'),
(184, 'Ağırlık ve uzunluk ölçüleri için kabul edilmiş kanuni ölçü modeli', 'ETALON'),
(185, 'Ağırlık yitimi', 'FİRE'),
(186, 'Ağıt', 'ELEJİ'),
(187, 'Ağız ağıza dolu, ağzına kadar dolu, silme', 'LEBALEB'),
(188, 'Ağız armonikası', 'MIZIKA'),
(189, 'Ağız boşluğunun tavanı', 'DAMAK'),
(190, 'Ağızda evirip çevirme', 'GEVELEME'),
(191, 'Ağızdan çıkan, bir veya daha fazla heceden meydana gelen ve mana ifade eden kelime veya kelime topluluğu', 'SÖZ'),
(192, 'Ağızdan, sözle söylenerek', 'ŞİFAHEN'),
(193, 'Ağlayan, inleyen', 'NALAN'),
(194, 'Ağrı dağının eski adı', 'ARARAT'),
(195, 'Ağrı\'nın İlçeleri', 'DİYADİN, DOĞUBEYAZIT, ELEŞKİRT, HAMUR, PATNOS, TAŞLIÇAY, TUTAK'),
(196, 'Ağtabaka', 'RETİNA'),
(197, 'Ağzı çember biçiminde, torbaya benzer büyük gözlü ağ', 'APOSİ'),
(198, 'Ağzı dar, şişkin gövdeli su kabı', 'DAMACANA'),
(199, 'Ağzı geniş tek kulplu su kabı', 'KANATA'),
(200, 'Ağzı sıkı', 'KETUM'),
(201, 'Ağzı sıkılık', 'KETUMİYET'),
(202, 'Ağzı yayvan toprak kap', 'DAGAR'),
(203, 'Ağzın tavanı', 'DAMAK'),
(204, 'Ağzına kadar dolu', 'LEBELEB, TIKABASA'),
(205, 'Ah', 'BEDDUA, İLENÇ, İLENME'),
(206, 'Ahali', 'AVAM, HALK'),
(207, 'Ahenk', 'UYUM'),
(208, 'Ahenk, ölçü, düzenlilik', 'RİTİM'),
(209, 'Ahenksiz', 'UYUMSUZ'),
(210, 'Ahilik ocağından olan kimse', 'AHİ'),
(211, 'Ahır', 'DAM'),
(212, 'Ahırdaki iki hayvan yeri arasında bölme olarak kullanılan kalın sırık', 'ARALTI'),
(213, 'Ahirette bütün insanların üzerinden geçeceği köprü', 'SIRAT'),
(214, 'Ahize', 'ALICI, ALMAÇ'),
(215, 'Ahmak, sersem', 'SEME'),
(216, 'Ahret ile ilgili', 'UHREVİ'),
(217, 'Ahşap gemilerin omurgalarına, borda kaplamalarını yerleştirmek için açılan yuva', 'AŞOZ'),
(218, 'Aidat', 'ÖDENTİ'),
(219, 'AİDS Testi', 'ELİZA'),
(220, 'Aile', 'FAMİLYA'),
(221, 'Aile halkı', 'HORANTA'),
(222, 'Aile ile ilgili', 'AİLEVİ'),
(223, 'Aile ocağı', 'YUVA'),
(224, 'Ailesinin geçimini sağlayan', 'AİL'),
(225, 'Ait', 'DEĞİN, İLİŞKİN'),
(226, 'Ait olma durumu, ilişkinlik, aitlik, dairlik', 'AİDİYET'),
(227, 'Ajan', 'CASUS'),
(228, 'Ak', 'BEYAZ, LEKESİZ, NAMUSLU, TEMİZ'),
(229, 'Ak tenli mavi gözlü kimse', 'MAVİŞ'),
(230, 'Aka', 'AĞABEY'),
(231, 'Akaç', 'DİREN'),
(232, 'Akademik bir unvan', 'PROFESÖR'),
(233, 'Akademik unvan', 'DR'),
(234, 'Akaju da denilen bir ağaç', 'MAUN'),
(235, 'Akamet', 'SONUÇSUZLUK, VERİMSİZLİK'),
(236, 'Akanyıldız', 'AĞAN, ŞAHAP'),
(237, 'Akarsu', 'IRMAK, NEHİR'),
(238, 'Akarsu kıyılarındaki çalı ve ağaçların üzerinde de yaşayabilen bir balık', 'ANABAS'),
(239, 'Akarsu üzerinde yapılan bent', 'BARAJ'),
(240, 'Akarsu yatağı, mecra', 'AKAK'),
(241, 'Akarsuyun saniyelik akımı', 'DEBİ'),
(242, 'Akciğer', 'RİE'),
(243, 'Akciğer (eski dil)', 'RİE'),
(244, 'Akdeniz Anemisi adı da verilen bir hastalık', 'TALASEMİ'),
(245, 'Akdeniz Bölgesi\'nde turistik bir koy', 'OKLUK'),
(246, 'Akdeniz bölgesinin kısa boylu tipik bitki örtüsü', 'MAKİ'),
(247, 'Akdeniz havzasında görülen çok sıcak bir rüzgar', 'SİROKO'),
(248, 'Akdeniz tipi bitki örtüsü', 'MAKİ'),
(249, 'Akdeniz\'de bir ada', 'GİRİT, RODOS'),
(250, 'Akdeniz\'de bir ada ülkesi', 'MALTA'),
(251, 'Akdeniz\'de hapishanesi ile ünlü küçük bir Fransız adası', 'İF'),
(252, 'Ake', 'DİVİT'),
(253, 'Akı', 'AKINTI, AKMA, SEYELAN'),
(254, 'Akıcı', 'AKAR, LİKİT, MAYİ, SIVI'),
(255, 'Akıl', 'US'),
(256, 'Akıl ve gerçeğe aykırı', 'ABES'),
(257, 'Akilane', 'AKILLICA'),
(258, 'Akıllı', 'AKİL, USLU, ZEKİ'),
(259, 'Akıllı, akıl sahibi', 'AKİL'),
(260, 'Akıllıca', 'AKİLANE'),
(261, 'Akılsız', 'BUDALA, EBLEH'),
(262, 'Akim', 'BAŞARISIZ, SONUÇSUZ, VERİMSİZ'),
(263, 'Akım', 'CEREYAN'),
(264, 'Akımtoplar', 'AKÜ'),
(265, 'Akın', 'HÜCUM'),
(266, 'Akıntı', 'AKI, AKMA, SEYELAN'),
(267, 'Akis', 'AKS, EKO, YANKI'),
(268, 'Akit', 'KONTRAT, MUKAVELE, MUKAVELENAME, NİKAH, SÖZLEŞME'),
(269, 'Akıtma', 'İSALE'),
(270, 'Akkan', 'LENF'),
(271, 'Akla ve gerçeğe aykırı', 'ABES'),
(272, 'Aklama', 'İBRA'),
(273, 'Aklama, temize çıkma', 'İBRA'),
(274, 'Aklanmış', 'BERAAT'),
(275, 'Akli', 'USSAL'),
(276, 'Aklı dengesi yerinde olmayan', 'DELİ'),
(277, 'Aklımda denen oyun', 'LADES'),
(278, 'Aklıselim', 'SAĞDUYU'),
(279, 'Akma', 'AKI, AKINTI, REÇİNE, SEYELAN,'),
(280, 'Akort oluşturan seslerin bir biri arkasından çalınması', 'ARPEJ'),
(281, 'Akraba', 'HISIM'),
(282, 'Akran', 'DENK, ÖĞÜR, YAŞIT'),
(283, 'Akrobat', 'CAMBAZ'),
(284, 'Aks', 'AKİS, DİNGİL, EKO, ROT, YANKI,'),
(285, 'Aksak', 'TOPAL, LENG'),
(286, 'Aksaklığı olan', 'ARIZALI'),
(287, 'Aksama, aksaklık', 'ARIZA'),
(288, 'Aksaray İlinde yamaçlarında birçok manastır, kilise, peribacaları ve koniler bulunan vadi', 'IHLARA VADİSİ'),
(289, 'Aksaray\'ın İlçeleri', 'AĞAÇÖREN, ESKİL, GÜLAĞAÇ, GÜZELYURT, ORTAKÖY, SARIYAHŞİ'),
(290, 'Aksata', 'ALIŞVERİŞ'),
(291, 'Aksayan, işlemeyen, bozulmuş', 'ARIZALI'),
(292, 'Aksetme, yansıma, yankılanma', 'İNİKAS'),
(293, 'Aksi, ters', 'TERS, ZIT'),
(294, 'Aksilik', 'TERSLİK'),
(295, 'Aksiseda, yankı', 'EKO'),
(296, 'Akşam namazı', 'AŞA'),
(297, 'Aktar', 'BAHARATÇI'),
(298, 'Aktar\'ın sattığı şeyler, aktar eşyası', 'AKTARİYE'),
(299, 'Aktarma', 'VİRMAN'),
(300, 'Aktif', 'CANLI, ETKEN, ETKİN, FAAL'),
(301, 'Aktörün sahnedeki işi', 'ROL'),
(302, 'Akü', 'AKIMTOPLAR'),
(303, 'Akyuvar', 'LOKOSİT'),
(304, 'Al', 'HİLE, KIRMIZI'),
(305, 'Al Salvador\'un Başkenti', 'SAN SALVADOR'),
(306, 'AL simgeli element', 'ALÜMİNYUM'),
(307, 'Alabalıkgiller familyasından, denizlerde yaşayan bir balık türü', 'DENİZANASI'),
(308, 'Alacak', 'BORÇ, MATLUP, TAKANAK'),
(309, 'Alacak ya da borç', 'TAKANAK'),
(310, 'Alaka', 'İLGİ'),
(311, 'Alakadar', 'ALAKALI'),
(312, 'Alakalı', 'ALAKADAR'),
(313, 'Alakok', 'RAFADAN'),
(314, 'Alalama', 'KAMUFLE'),
(315, 'Alamet', 'İM, İZ'),
(316, 'Alan', 'MEYDAN, SAHA,'),
(317, 'Alanı geniş', 'İHATALI'),
(318, 'Alaniyet', 'AÇIKLIK'),
(319, 'Alanya\'nın tarihteki adı', 'ALAİYE'),
(320, 'Alaşit', 'HALİTA'),
(321, 'Alaten', 'CÜZZAMLI'),
(322, 'Alaturka karşıtı', 'ALAFRANGA'),
(323, 'Alaturka Müzik kurallarını inceleyen yapıt', 'EDVAR'),
(324, 'Alay', 'İSTİHZA, KALABALIK, SARAKA'),
(325, 'Alay işareti', 'NANİK'),
(326, 'Alay, istihza', 'SARAKA'),
(327, 'Alayiş', 'GÖSTERİŞ'),
(328, 'Alaz', 'ALEV, YALAZ, YALAZA'),
(329, 'Albay', 'MİRALAY'),
(330, 'Albüm', 'RESİMLİK'),
(331, 'Alçak', 'NAMERT'),
(332, 'Alçak gönüllü olan, titizlik göstermeyen', 'KALENDER'),
(333, 'Alçak gönüllü, uysal', 'TEVAZULU'),
(334, 'Alçak gönüllülük', 'TEVAZU'),
(335, 'Alçak, aşağılık, kötü', 'REZİL'),
(336, 'Alçak, kötü kimse', 'DENİ'),
(337, 'Alçalma, düşkünlük', 'ZİL'),
(338, 'Aldatma', 'DESİSE, DÜZEN, OYUN'),
(339, 'Aldatma işi', 'AL, DEK, DOLAP, HİLE'),
(340, 'Aldırışsız, umursamaz', 'LAKAYT'),
(341, 'Aleladelik', 'SIRADANLIK'),
(342, 'Alem', 'BAYRAK, CİHAN, KAİNAT'),
(343, 'Alemdar', 'BAYRAKTAR, SANCAKTAR'),
(344, 'Alemşümul', 'EVRENSEL'),
(345, 'Aleni', 'AÇIK'),
(346, 'Alenilik', 'AÇIKLIK'),
(347, 'Alerjilerin tedavisini konu alan bilim dalı', 'ALERGOLOJİ'),
(348, 'Aletler bütünü', 'MAKİNE'),
(349, 'Aletler, araçlar', 'LEVAZIM'),
(350, 'Aleut takımadalarında yer alan adalar', 'RAT'),
(351, 'Alev', 'ALAZ, YALIM'),
(352, 'Alev, alev dili', 'YALAZA'),
(353, 'Alev, yalım', 'ŞULE'),
(354, 'Aleve tutmak', 'ALAZLAMAK'),
(355, 'Alevi-Bektaşi ozanlarının tarikatlarıyla ilgili şiirlerine verilen ad', 'DEME'),
(356, 'Alfabe', 'ABECE'),
(357, 'Algı', 'İDRAK'),
(358, 'Alicenap', 'CÖMERT'),
(359, 'Alıcı', 'AHİZE'),
(360, 'Alıcı kan grubu', 'AB'),
(361, 'Alıcı yönetmeni', 'KAMERAMAN'),
(362, 'Alıcı, reseptör', 'AHİZE'),
(363, 'Alıklaşma', 'APTAL'),
(364, 'Alil', 'SAKAT'),
(365, 'Alim', 'BİLGİN'),
(366, 'Alım, çekicilik, cazibe', 'ALBENİ'),
(367, 'Alın yazısı', 'FATALİTE'),
(368, 'Alın yazısı, takdir', 'KADER'),
(369, 'Alın yazısı, yazgı', 'FATALİTE, KADER'),
(370, 'Alınan bir şeyi geri verme', 'İADE'),
(371, 'Alinan bir şeyi geri verme', 'İADE'),
(372, 'Alınma', 'GÜCENME'),
(373, 'Alınması gereken şey', 'ALACAK'),
(374, 'Alınmış bir şeyi geri verme', 'İADE'),
(375, 'Alıntı', 'İKTİBAS'),
(376, 'Alışılagelen', 'RUTİN'),
(377, 'Alışılan zamandan önce', 'ER, ERKEN'),
(378, 'Alışılandan fazla', 'BOL'),
(379, 'Alışılmış, alışılan', 'MUTAT'),
(380, 'Alışkanlık halinde yapılan', 'RUTİN'),
(381, 'Alışkanlık, huy', 'İTİYAT'),
(382, 'Alışma', 'ÜLFET'),
(383, 'Alışveriş', 'AKSATA'),
(384, 'Alışverişte durgunluk hali, sürümsüzlük', 'KESAT'),
(385, 'Alışverişte kötü mal satmak', 'KAKALAMAK'),
(386, 'Alkol', 'ETANOL'),
(387, 'Alkol ve Madde bağımlıları Tedavi Merkezi (kısaca)', 'AMATEM'),
(388, 'Alkolde eriyen hayvansal reçine', 'GOMALAK'),
(389, 'Alkollü bir içki', 'CİN, ŞARAP, VOTKA'),
(390, 'Allah (cc) velilerinden zuhur eden olağanüstü hal, harikulade hal', 'KERAMET'),
(391, 'Allah (cc)\'a kalbi bağlılık, kesin inanma; iman', 'İTİKAT'),
(392, 'Allah (cc)\'a karşı kulluk vazifesini yetirme getirme, tapınma', 'İBADET'),
(393, 'Allah (cc)\'a ve İslâm akidelerine inanma', 'İMAN'),
(394, 'Allah (cc)\'a ve O\'nun rızasına erişmek için tutulan yol, tasavvuf yolu', 'TARİKAT'),
(395, 'Allah (cc)\'ın bir kimseye insanı', 'İNAYET'),
(396, 'Allah (cc)\'ın emirlerine tam itaat eden yaratık, ferişteh', 'MELEK'),
(397, 'Allah (cc)\'ın isimlerinden biri', 'RAM'),
(398, 'Allah (cc)\'ın kullarına ve diğer yaratıklarına lütfu olan nimet, yenilen, içilen ve sarf edilen şey, kısmet', 'RIZIK'),
(399, 'Allah (cc)\'ın sıfatlarından biri', 'RAHİM'),
(400, 'Allah (cc)\'ın sıfatlarından; lutfu ve ihsanı bol', 'KERİM'),
(401, 'Allah (cc)\'ın, fazlasıyla merhametli ve esirgeyici anlamına gelen sıfatı', 'RAUF'),
(402, 'Allah\'ı tanımayan', 'KAFİR'),
(403, 'Alma', 'FETHETME'),
(404, 'Almaç', 'AHİZE'),
(405, 'Alman Faşisti', 'NAZİ'),
(406, 'Alman markının yüzde biri', 'FENİK'),
(407, 'Almanca \"Bir\"', 'EİN'),
(408, 'Almanca \"Evet\"', 'JA'),
(409, 'Almanca \"Sen\"', 'DU'),
(410, 'Almanca \"Ve\"', 'UND'),
(411, 'Almanya\'da bin kent', 'AEREN'),
(412, 'Almanya\'da bir eyalet', 'SAAR'),
(413, 'Almanya\'da bir ırmak', 'WUPPER'),
(414, 'Almanya\'da bir kent', 'AACHEN, BREMEN'),
(415, 'Almanya\'nın eski para biriminin kısa yazılışı', 'DM'),
(416, 'Almanya\'nın para birimi', 'MARK'),
(417, 'Alp', 'CİVANMERT, ER, YİĞİT'),
(418, 'Alt alta yazılmış şeyler', 'LİSTE'),
(419, 'Alt karşıtı', 'ÜST'),
(420, 'Alt kurul, encümen', 'KOMİTE'),
(421, 'Alt, aşağı', 'ZİR'),
(422, 'Altar', 'SUNAK'),
(423, 'Alternatif', 'SEÇENEK'),
(424, 'Altı düz, geniş ve sağlam yapılı tekne', 'LAYTER'),
(425, 'Altı Mayıs\'ta yapılan geleneksel bayram', 'HIDRELLEZ'),
(426, 'Altı yüzlü dikdörtgen', 'KÜP'),
(427, 'Altıkardeş takım yıldızı', 'ZATÜLKÜRSİ'),
(428, 'Altın', 'ZER'),
(429, 'Altın ve Gümüş işlemeli bir tür ipek kumaş', 'DİBO'),
(430, 'Altın, gümüş gibi madenlerden yapılmış şeylerin saflık derecesi', 'AYAR'),
(431, 'Altının latince adı', 'AİRUM'),
(432, 'Altınkökü', 'İPEKA'),
(433, 'Altmış beş santimetre boyunda bir uzunluk ölçüsü', 'ENDAZE'),
(434, 'Altmış dakikalık zaman birimi', 'SAAT'),
(435, 'Altmış saniye', 'DAKİKA'),
(436, 'Alüvyon', 'LIĞ'),
(437, 'Alyuvar', 'ERİTROSİT'),
(438, 'AM simgeli element', 'AMERİSYUM'),
(439, 'Ama', 'DARİR, GÖRMEZ, KÖR'),
(440, 'Ama, fakat, ancak', 'LAKİN'),
(441, 'Amaç', 'EREK, GAYE'),
(442, 'Amaç, gaye', 'EREK'),
(443, 'Amaç, maksat', 'GAYE'),
(444, 'Amaçsız', 'GAYESİZ'),
(445, 'Amade', 'ANIK, HAZIR'),
(446, 'Amasya\'nın İlçeleri', 'GÖYNÜCEK, GÜMÜŞHACIKÖY, HAMAMÖZÜ, MERZİFON, SULUOVA, TAŞOVA'),
(447, 'Amatör olma durumu', 'AMATÖRLÜK'),
(448, 'Ambar', 'KİLER'),
(449, 'Amca', 'EMMİ'),
(450, 'Amel', 'DİYARE, İSHAL, ÖTÜRÜK, SÜRGÜN'),
(451, 'Amel', 'İŞ'),
(452, 'Amele', 'İŞÇİ'),
(453, 'Amelelik', 'İŞÇİLİK'),
(454, 'Ameliyat yapan hekim, cerrah', 'OPERATÖR'),
(455, 'Amerika Birleşik Devletleri (kısaca)', 'ABD'),
(456, 'Amerika Birleşik Devletleri halkından olan kimse', 'AMERİKALI'),
(457, 'Amerika kabilelerinden bazılarının Hindistan cevizi suyunu kaynatıp yaptıkları içki', 'ORRAKA'),
(458, 'Amerikalı', 'YANKİ'),
(459, 'Amerikan armudu da denilen bir meyve', 'AVUKADO'),
(460, 'Amerikan devesi', 'LAMA'),
(461, 'Amerikan istihbarat teşkilatı', 'FBİ'),
(462, 'Amerikan pamuğu', 'AKALA'),
(463, 'Amerikan uzay örgütü (kısaca)', 'NASA'),
(464, 'Amil', 'ETKEN, ETMEN, FAKTÖR'),
(465, 'Amil', 'ETKİN'),
(466, 'Amiral yetkisiyle görevli deniz subayı', 'KOMODOR'),
(467, 'Amiralden bir rütbe küçük deniz subayı', 'VİSAMİRAL'),
(468, 'Amirler', 'ÜMERA'),
(469, 'Amme', 'KAMU'),
(470, 'Amonyak tuzu', 'NIŞADIR'),
(471, 'Amorf', 'ŞEKİLSİZ'),
(472, 'Ampul yuvası', 'DUY'),
(473, 'An', 'LAHZA'),
(474, 'Ana', 'ANNE, ASIL, BAZ, ESAS, TEMEL, VALİDE'),
(475, 'Ana ile dölüt arasında kan alışverişini sağlayan organ', 'ETENE'),
(476, 'Ana para', 'KAPİTAL'),
(477, 'Ana, baba ve çocuklardan oluşan topluluk', 'AİLE'),
(478, 'Ana, esas', 'TEMEL'),
(479, 'Ana, temel', 'ESAS'),
(480, 'Anadolu Ajansı (kısaca)', 'AA'),
(481, 'Anadolu beyliklerinde donanmada kullanılan asker', 'AZAP'),
(482, 'Anadolu karasının batıdaki en uç noktası', 'BABABURUN'),
(483, 'Anadolu\'da hüküm sürmüş eski bir medeniyet', 'ETİ'),
(484, 'Anadolu\'nun birçok yöresinde ve düğünlerde yapılan güreşe verilen ad', 'GENCER'),
(485, 'Anadolu\'nun kapılarını Türk\'lere açan Selçuklu hükümdarı', 'ALPARSLAN'),
(486, 'Anafor', 'GİRDAP'),
(487, 'Anahtar', 'AÇAR, AÇKI'),
(488, 'Anahtarla açılan kapı düzeneği', 'KİLİT'),
(489, 'Analiz yapan kimse', 'ANALİST'),
(490, 'Analog karşıtı', 'DİJİTAL'),
(491, 'Anamal', 'KAPİTAL'),
(492, 'Anasına düşkün olan', 'ANACIL'),
(493, 'Anasır', 'UNSURLAR'),
(494, 'Anavatan', 'ANAYURT, ÖZYURT'),
(495, 'Anayoldan ayrılan yolun başlangıç noktası', 'SAPAK'),
(496, 'Anayurt', 'ANAVATAN, VATAN'),
(497, 'Andora\'nın Başkenti', 'ANDORRA LA VELLA');
-- 2019-02-01 21:05:10
| true |
71c40fe85f0e07cab5a83149bf4caa12d3720937 | SQL | gurpreet19/ec198392_wht | /Database/configuration/03_02_headless_tool/Delta_WST/SourceTriggerDefinitions/IU_CNTX_MENU_ITEM_PARAM.sql | UTF-8 | 2,316 | 3.1875 | 3 | [] | no_license | CREATE OR REPLACE EDITIONABLE TRIGGER "IU_CNTX_MENU_ITEM_PARAM"
BEFORE INSERT OR UPDATE ON CNTX_MENU_ITEM_PARAM
FOR EACH ROW
DECLARE
/* cursor c_bf_component_action is
select bf_component_action_no
from bf_component_action bca, bf_component bfc
where bfc.bf_component_no = bca.bf_component_no
and bfc.bf_code = :NEW.bf_code
and bfc.comp_code = :NEW.comp_code
and bca.name = :NEW.item_code;
*/
ln_bf_component_action_no NUMBER;
BEGIN
-- Common
-- $Revision: 1.2 $
-- Handle old code not aware of new key structure
-- must then align BF_CODE, COMP_CODE and BF_COMPONENT_ACTION
IF Inserting THEN
IF :NEW.BF_COMPONENT_ACTION_NO IS NULL THEN
:NEW.BF_COMPONENT_ACTION_NO := EcDp_Business_function.getCMI_BFComponentAction(:NEW.BF_CODE,:NEW.COMP_CODE,:NEW.ITEM_CODE);
END IF;
:new.record_status := 'P';
IF :new.created_by IS NULL THEN
:new.created_by := COALESCE(SYS_CONTEXT('USERENV', 'CLIENT_IDENTIFIER'),USER);
END IF;
IF :new.created_date IS NULL THEN
:new.created_date := Ecdp_Timestamp.getCurrentSysdate;
END IF;
:new.rev_no := 0;
ELSIF UPDATING THEN
IF Nvl(:NEW.BF_COMPONENT_ACTION_NO,0) <> Nvl(:OLD.BF_COMPONENT_ACTION_NO,0) THEN
-- NEED to find and update BF_CODE, COMP_CODE
:NEW.BF_CODE := EcDp_Business_function.getBFCodefromBFCA(:NEW.BF_COMPONENT_ACTION_NO);
:NEW.COMP_CODE := EcDp_Business_function.getCompCodefromBFCA(:NEW.BF_COMPONENT_ACTION_NO);
ELSIF Nvl(:NEW.BF_CODE,'NULL') <> Nvl(:OLD.BF_CODE,'NULL')
OR Nvl(:NEW.COMP_CODE,'NULL') <> Nvl(:OLD.COMP_CODE,'NULL') THEN
-- Align BF_COMPONENT_ACTION_NO in case this is an update not aware of new key structure
:NEW.BF_COMPONENT_ACTION_NO := EcDp_Business_function.getCMI_BFComponentAction(:NEW.BF_CODE,:NEW.COMP_CODE,:NEW.ITEM_CODE);
END IF;
IF Nvl(:new.record_status,'P') = Nvl(:old.record_status,'P') THEN
IF NOT UPDATING('LAST_UPDATED_BY') THEN
:new.last_updated_by := COALESCE(SYS_CONTEXT('USERENV', 'CLIENT_IDENTIFIER'),USER);
END IF;
IF NOT UPDATING('LAST_UPDATED_DATE') THEN
:new.last_updated_date := Ecdp_Timestamp.getCurrentSysdate;
END IF;
END IF;
END IF;
END;
| true |
ba215ed7487a915b2a2986b3828594efeab47419 | SQL | CMKawser7476/basicsqltest | /Subqueries.sql | UTF-8 | 217 | 2.609375 | 3 | [] | no_license | SELECT * FROM shirt_table
WHERE last_worn = (SELECT MIN(last_worn) FROM shirt_table);
SELECT article, description, color, size, last_worn FROM shirt_table
WHERE last_worn = (SELECT MIN(last_worn) FROM shirt_table); | true |
722a8e38185cea2297f0a08d4228f3556e61d67e | SQL | abijitsuresh/PioneerTech.WebApp | /Database/StoredProcedureScripts/uspSaveEmployeeEducationalDetails.sql | UTF-8 | 682 | 3.375 | 3 | [] | no_license | CREATE PROCEDURE uspSaveEmployeeEducationalDetails
@EmployeeID INTEGER,
@CourseType VARCHAR(50),
@CourseSpecialization VARCHAR(50),
@CourseYearOfPassing VARCHAR(50)
AS
BEGIN
IF(NOT EXISTS(SELECT * FROM EmployeeEducationalDetails WHERE EmployeeID = @EmployeeID))
BEGIN
INSERT INTO EmployeeEducationalDetails(EmployeeID, CourseType, CourseSpecialization, CourseYearOfPassing) VALUES (@EmployeeID, @CourseType, @CourseSpecialization, @CourseYearOfPassing)
END
ELSE
BEGIN
UPDATE EmployeeEducationalDetails
SET CourseType = @CourseType, CourseSpecialization = @CourseSpecialization, CourseYearOfPassing = @CourseYearOfPassing
WHERE EmployeeID = @EmployeeID
END
END | true |
2a3fad7f538d029c4fe227b75f8e11002b7cf184 | SQL | Jaware/stack-2015 | /authorization-server/src/main/resources/db/migration/V1_0_0_0__Schema_Oauth.sql | UTF-8 | 4,022 | 3.265625 | 3 | [] | no_license | create table if not exists `c_security_permission` (
`id` varchar(255) NOT NULL,
`permission_label` varchar(255) NOT NULL,
`permission_value` varchar(255) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `UK_k4suda9cvcsoikdgquscypmt6` (`permission_value`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ;
create table if not exists `c_security_role` (
`id` varchar(255) NOT NULL,
`description` varchar(255) DEFAULT NULL,
`name` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
create table if not exists `c_security_role_permission` (
`id_role` varchar(255) NOT NULL,
`id_permission` varchar(255) NOT NULL,
PRIMARY KEY (`id_role`,`id_permission`),
KEY `FK_d89p0a0x87scb5s3830jx7xq0` (`id_permission`),
CONSTRAINT `FK_d89p0a0x87scb5s3830jx7xq0` FOREIGN KEY (`id_permission`) REFERENCES `c_security_permission` (`id`),
CONSTRAINT `FK_fvynt2q4rxk27e0bxuon50tp4` FOREIGN KEY (`id_role`) REFERENCES `c_security_role` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
create table if not exists `c_security_user` (
`id` varchar(255) NOT NULL,
`active` bit(1) DEFAULT NULL,
`fullname` varchar(255) NOT NULL,
`username` varchar(255) NOT NULL,
`id_role` varchar(255) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `UK_at8if7a9lnl90wxllb9divpdf` (`username`),
KEY `FK_my18sie96bgbncypva3fxboxy` (`id_role`),
CONSTRAINT `FK_my18sie96bgbncypva3fxboxy` FOREIGN KEY (`id_role`) REFERENCES `c_security_role` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
create table if not exists op_c_security_user_extension (
id varchar(255) not null,
id_extension varchar(255) not null,
id_user varchar(255) not null,
primary key (id)
) ENGINE=InnoDB;
create table if not exists `c_security_user_password` (
`id_user` varchar(255) NOT NULL,
`user_password` varchar(255) NOT NULL,
PRIMARY KEY (`id_user`),
CONSTRAINT `FK_9a26m4sjx4ddi35n3w0s6b5os` FOREIGN KEY (`id_user`) REFERENCES `c_security_user` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `oauth_access_token` (
`token_id` varchar(256) DEFAULT NULL,
`token` blob,
`authentication_id` varchar(256) DEFAULT NULL,
`user_name` varchar(256) DEFAULT NULL,
`client_id` varchar(256) DEFAULT NULL,
`authentication` blob,
`refresh_token` varchar(256) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `oauth_client_details` (
`client_id` varchar(256) NOT NULL,
`resource_ids` varchar(256) DEFAULT NULL,
`client_secret` varchar(256) DEFAULT NULL,
`scope` varchar(256) DEFAULT NULL,
`authorized_grant_types` varchar(256) DEFAULT NULL,
`web_server_redirect_uri` varchar(256) DEFAULT NULL,
`authorities` varchar(256) DEFAULT NULL,
`access_token_validity` int(11) DEFAULT NULL,
`refresh_token_validity` int(11) DEFAULT NULL,
`additional_information` varchar(4096) DEFAULT NULL,
`autoapprove` varchar(256) DEFAULT NULL,
PRIMARY KEY (`client_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `oauth_refresh_token` (
`token_id` varchar(256) DEFAULT NULL,
`token` blob,
`authentication` blob
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `oauth_client_token` (
`token_id` varchar(256) DEFAULT NULL,
`token` blob,
`authentication_id` varchar(256) DEFAULT NULL,
`user_name` varchar(256) DEFAULT NULL,
`client_id` varchar(256) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO `c_security_permission` (`id`, `permission_label`, `permission_value`) VALUES
('userweb', 'User Web', 'ROLE_USER_WEB');
INSERT INTO `c_security_role` (`id`, `description`, `name`) VALUES
('administrator', 'Application Administrator', 'Administrator');
INSERT INTO `c_security_role_permission` (`id_role`, `id_permission`) VALUES
('administrator', 'userweb');
INSERT INTO `c_security_user` (`id`, `active`, `fullname`, `username`, `id_role`) VALUES
('su123', b'1', 'Supsr User', 'superuser', 'administrator');
INSERT INTO `c_security_user_password` (`id_user`, `user_password`) VALUES
('su123', '$2a$08$LS3sz9Ft014MNaIGCEyt4u6VflkslOW/xosyRbinIF9.uaVLpEhB6'); | true |
1b83918caf7af85c466ea54890a2a8f65773c491 | SQL | AirJEC/AirJEC-reviews-jesse | /data/postgres/postgres.sql | UTF-8 | 1,216 | 3.5625 | 4 | [] | no_license | DROP TABLE IF EXISTS reviews;
DROP TABLE IF EXISTS users;
DROP TABLE IF EXISTS listings;
CREATE TABLE users (
id SERIAL PRIMARY KEY,
guest_name VARCHAR(50),
guest_photo VARCHAR(150)
);
CREATE TABLE listings (
id SERIAL PRIMARY KEY,
address VARCHAR(100),
host_name VARCHAR(250),
host_photo VARCHAR(500),
host_text TEXT
);
CREATE TABLE reviews (
id SERIAL PRIMARY KEY,
review_text VARCHAR(600),
accuracy_rating INTEGER,
communication_rating INTEGER,
cleanliness_rating INTEGER,
location_rating INTEGER,
checkin_rating INTEGER,
value_rating INTEGER,
user_id INTEGER REFERENCES users(id),
listing_id INTEGER REFERENCES listings(id),
review_date VARCHAR(40)
);
COPY users (username, user_img)
FROM '/Users/jzchua/Documents/HR/SDC/AirJEC-reviews-jesse/data/postgres/users.txt' (DELIMITER(','));
COPY listings (address)
FROM '/Users/jzchua/Documents/HR/SDC/AirJEC-reviews-jesse/data/postgres/listings.txt';
COPY reviews (body, accuracy_rating, communication_rating, cleanliness_rating, location_rating, checkin_rating, value_rating, user_id, listing_id, date_submitted)
FROM '/Users/jzchua/Documents/HR/SDC/AirJEC-reviews-jesse/data/postgres/reviews.txt' (DELIMITER(','));
| true |
74ad143e596f452d19f4c090aace38ec840f3993 | SQL | iJasonCui/big_database | /MySQL/sproc/Accounting/wsp_updSettlementQ.mysql | UTF-8 | 1,565 | 3.328125 | 3 | [] | no_license | DELIMITER ;;
DROP PROCEDURE IF EXISTS wsp_updSettlementQ;
CREATE DEFINER='root'@'10.10.26.21' PROCEDURE wsp_updSettlementQ (
/******************************************************************************
**
** CREATION:
** Author: Jeff Yang
** Date: Jnue 7 2008
** Description: approve or reject settlement q and insert a row into CreditCardTransaction table.
**
******************************************************************************/
at_xactionId DECIMAL(12,0),
at_status int,
at_adminUserId int
)
BEGIN
DECLARE at_dateGMT DATETIME;
DECLARE EXIT HANDLER FOR SQLWARNING
BEGIN
ROLLBACK;
END;
DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN
ROLLBACK;
END;
SET at_dateGMT = UTC_TIMESTAMP();
START TRANSACTION;
IF at_status = 1 OR at_status = 2
THEN
UPDATE SettlementQueue
SET status=at_status, adminUserId=at_adminUserId, dateReviewed=at_dateGMT
WHERE xactionId=at_xactionId;
-- In SettlemtnQueue
-- 0 MEANS pending approve
-- 1 MEANS approved, in other words: it is for Pending settlement
-- 2 MEANS rejected
UPDATE CreditCardTransaction
SET CCTranStatusId = at_status
WHERE xactionId = at_xactionId
AND CCTranStatusId = 6;
-- In CreditCardTransaction:
-- 1 MEANS Pending for settlement
-- 2 MEANS void
END IF;
COMMIT;
SELECT 0 AS RESULT,ROW_COUNT() AS ROWCNT,at_xactionId AS PRIMKEY;
/* ### DEFNCOPY: END OF DEFINITION */
END;;
DELIMITER ;
| true |
067c186b4a0b0cd19b7d5152601e2d79c44028b2 | SQL | haris-tulic/Poslovna-inteligencija | /17.02.2020/zadatak1_SQL.sql | UTF-8 | 200 | 2.765625 | 3 | [] | no_license | create table god_voznje(
voznja_ID int not null primary key(voznja_ID),
godina_voznje int
)
insert into god_voznje
select voznja.voznja_ID,year(voznja.dtm_voznje)
from voznja
select *from god_voznje
| true |
88ffdc5fa5ec1dc016b09ae4496bc435080109a1 | SQL | CubeBlack/Acta-day | /DB/Codigos do DB.sql | UTF-8 | 6,936 | 3.71875 | 4 | [] | no_license | /*Criando DB*/
create database if not exists acta_dei
default character set utf8
default collate utf8_general_ci;
use acta_dei;
/*Criando Tabelas*/
create table if not exists usuarios (
email varchar (50) not null,
nome varchar(60) not null,
senha varchar (100) not null,
tipo_de_usuario enum('Administrador','Leitor') default 'Leitor',
primary key(email)
) default charset = utf8;
create table if not exists publicacao_diaria (
dia date not null,
titulo varchar(100) not null,
versiculo text not null,
referencia_versiculo varchar(100) not null,
texto text not null,
oracao text not null,
missao_diaria text not null,
publicado_por varchar(60) not null,
primary key (dia),
foreign key (publicado_por) references usuarios(email)
)default charset = utf8;
create table if not exists comentarios (
id int not null auto_increment,
usuarios_email varchar (50) not null,
publicacao_diaria_dia date not null,
tipo_comentario enum('Oração','Correção') default 'Oração',
comentario text not null,
primary key (id),
foreign key (usuarios_email) references usuarios(email),
foreign key (publicacao_diaria_dia) references publicacao_diaria(dia)
)default charset = utf8;
/*inserindo dados para teste*/
insert into usuarios
(email, nome, senha, tipo_de_usuario)
values
('edson.vit0r@hotmail.com', 'Edson Vitor', 'cogitari', 'Administrador'),
('danie_nerd@hotmail.com', 'Daniel Lima', 'dannke', 'Administrador'),
('edson.vit0r.pessoal@gmail.com', 'Vitor da Silva', 'cogitari', 'Leitor'),
('roselylima2014@gmail.com', 'Rosely Lima', 'roselylima', 'Leitor');
select * from usuarios;
insert into publicacao_diaria
(dia, titulo, versiculo, referencia_versiculo, texto, oracao, missao_diaria, publicado_por)
values
('2016-01-01',
'A Conexão de Deus conosco',
' “Então o SENHOR Deus formou o homem do pó da terra e soprou em suas narinas o fôlego de vida, e o homem se tornou um ser vivente.”',
'Gênesis 2.7',
'Deus criou o universo por meio da palavra. Ele determinou às estrelas e aos planetas que existissem. Iniciou do nada o processo de criação. Como Espirito Santo e por sua palavra, a criação ocorreu.
Então, Deus se dedicou a fazer o ser humano. Alguns textos bíblicos descrevem-no como “oleiro” e os seres humanos como “barro” (Is 64.8), fazendo-nos pensar no pai formando figuras de barro conforme o sedenho que tinha em mente. O toque final foi soprar em nós o fôlego de vida. Ele tornou-se pessoal.
Ao soprar-nos fôlego, nos deu também a capacidade de falar. O ato de respirar que nos mantém vivos é o que usamos para nos comunicar. Devemos usar o privilégio do fôlego da vida para falar com nosso Criador.
Fomos feitos para nos comunicar com nosso Oleiro. Assim como nos alegramos quando os bebês emitem os primeiros sons, o Pai também se alegra ao ouvir o som das palavras que seus filhos lhe dirigem.
Sussurrem uma oração com frequência. Se as palavras não lhe vieram à mente logo, comece dizendo “Obrigado”. Pronuncie devagar essa palavra e, então, acrescente “por...”, até que diferentes modos de terminar a comecem a fluir. À medida que o fizer, vai ver que pode usar o tempo de inspiração para refletir sobre as palavras seguintes, e o de expiração para expressar seu agradecimento. Conceder-nos o “fôlego de vida” é a conexão de Deus conosco; orar é nossa conexão com ele.',
'Senhor, eu te agradeço pelo sopro da vida. Assim como falaste e trouxeste vida ao teu mundo maravilhoso, ajuda-me a falar palavras que tragam vida ao meu pequeno mundo. Sou grato (a) por esta ligada (o) a ti.',
'Com “fôlego da vida” dizer ao máximo de pessoas possíveis que lhe rodeia o quão bom é tela do seu lado e refletir o quanto você demonstra isto através de suas ações, pois bem melhor que falar com a boca é falar com “ações”.',
'edson.vit0r@hotmail.com'),
('2016-01-02',
'Um passeio {fingindo um erro para teste} pelo jardim .',
'“Ouvindo o homem e sua mulher os passos do SENHOR Deus que andava pelo jardim quando soprava a brisa do dia, esconderam-se da presença de SENHOR Deus entre as árvores do jardim. Mas o SENHOR Deus chamou o homem, perguntando “Onde está você?””',
'Gênesis 3.8-9',
'Certos lugares se parecem com o primeiro jardim, provocando em nós o anseio de experimentar o que Adão e Eva desfrutaram: caminhar com Deus.
O mundo continua sendo um ótimo cenário para conhecer a Deus, mas algo mudou. As duas primeiras pessoas desistiram da companhia de divina. Elas ouviram os passos dele a procurá-las. Mas ambas haviam pecado, e a culpa as oprimiu. Perderam o relacionamento intimo que tinham, e desde então lutamos para retomar essa proximidade.
Deus não se escondeu do ser humano; foi o inverso. Envergonhados, temerosos e rebelados, Adão e Eva se Esconderam. Deus porém, foi procura-los. Embora tivesse conhecimento da desobediência, manteve seu compromisso.
De que amizade maravilhosa foram privados! Que paz perderam! Mas, antes de criticá-los, lembremos com que frequência repetimos o mesmo erro. Passamos momentos com Deus que gostaríamos de guardar, no entanto, horas mais tarde, lhe voltamos às costas.
O poder na vida de oração flui da presença de Deus em nos. Esse poder não é nosso, mas dele. Não o experimentaremos se insistirmos em nossos programas. Temos de planejar com serenidade momento em que nos encontraremos com Deus. Se não construímos a vida em torno desses “passeios no jardim” com o Senhor, bem rápido o mundo preencherá nossas horas com outros compromissos. Como fez com Adão e Eva, Deus virá procurar-nos. Eu não quero que ele tenha de me perguntar: “Onde você está?”. E você?',
'Senhor, quero caminhar junto de ti. Ajuda-me a não perder essa intimidade ao ser atraída pelas distrações deste mundo. Que eu ouça tua voz me chamando e que responda sem nenhuma hesitação. Ajuda-me a nunca me esconder de ti.',
'Pense em alguém que você tenha bastante conhecimento na bíblia, uma que esteja acessível, para que você possa sentar e conversar com ela sobre um ou dois temas que você não compreende da bíblia. Uma maneira de torna-se mais intimo de Deus é conhecer sua palavra.',
'danie_nerd@hotmail.com');
select * from publicacao_diaria;
insert into comentarios
(id, usuarios_email, publicacao_diaria_dia, tipo_comentario, comentario)
values
(default, 'roselylima2014@gmail.com', '2016-01-01', 'Oração', 'Deus me faz mais próxima de te. Torna-me novamente digna de tua presença, Pois ao teu lado quero viver na eternidade desfrutando de tua magnifica presença. Abençoa toda a minha volta para que todos (Minha família, Meus amigos, Colegas, e até aqueles que não sei quem é) estejam todos juntos desfrutando de tua companhia.'),
(default, 'edson.vit0r.pessoal@gmail.com', '2016-01-02', 'Correção', 'No título há o seguinte erro: {fingindo um erro para teste}, creio que isto não deveria esta lá. Caso seja uma equivoco meu, minhas desculpas.');
select * from publicacao_diaria; | true |
cf2eb7b9724bfe5f205bbd004f0bba11419964fa | SQL | avihoo44/Website-with-connection-to-MySql-server | /team05-Query 3.sql | UTF-8 | 384 | 3.5625 | 4 | [] | no_license | SELECT dog_name FROM (SELECT Dogs.dog_name ,count(*) as max_trip
FROM Taking_Dogs as tk JOIN Dogs on tk.dog_id=Dogs.dog_id
GROUP BY Dogs.dog_name
HAVING max_trip<=0.5*(SELECT max(max_trip) FROM
(SELECT tk.dog_id, count(*) as max_trip
FROM Taking_Dogs as tk JOIN Dogs on tk.dog_id=Dogs.dog_id
GROUP BY dog_id) as d)) as d; | true |
327441547cfd58ab24c0cba7aefa25adec35e747 | SQL | somas/drools | /src/main/resources/schema.sql | UTF-8 | 259 | 2.6875 | 3 | [] | no_license | --CREATE USER som PASSWORD "password";
--CREATE SCHEMA drools;
CREATE TABLE rules (id VARCHAR(40) not null, merchant_name VARCHAR(100), merchant_jurisdiction VARCHAR(100), insurer VARCHAR(100), start_date DATE, end_date DATE);
GRANT ALL ON rules TO PUBLIC;
| true |
304a11e1d3ce7b432c41f65fb11ade85a68418e8 | SQL | ganqiubo/code-name001 | /sql/upload_pic_thumbup.sql | UTF-8 | 222 | 2.609375 | 3 | [] | no_license | create table upload_pic_thumbup(
id bigint not null primary key auto_increment COMMENT '图片id',
upload_pic_id bigint not null COMMENT '上传图片id',
thumbup_user_id varchar(10) not null COMMENT '点赞用户id'
); | true |
9c14d890f13cd2d08e1ad7f7d53275786215a2a1 | SQL | jlw429/JasonsBlog | /public/seed.sql | UTF-8 | 284 | 2.65625 | 3 | [
"MIT"
] | permissive | DROP DATABASE IF EXISTS jasons_blog;
CREATE DATABASE jasons_blog;
USE jasons_blog;
CREATE TABLE blog (
ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
CreationDate datetime default current_timestamp,
Author VARCHAR(100) NOT NULL,
Title VARCHAR(100) NOT NULL,
Blog_Body TEXT NOT NULL
); | true |
ce381ca0ad6ef1252ef4745fc45c85843fa74503 | SQL | mar1n/PHP-OOP-CRUD | /books.sql | UTF-8 | 2,086 | 3.21875 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
-- Dumped from database version 10.3
-- Dumped by pg_dump version 10.3
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET client_min_messages = warning;
SET row_security = off;
SET default_tablespace = '';
SET default_with_oids = false;
--
-- Name: books; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.books (
id integer NOT NULL,
title character varying(100),
primary_author character varying(100)
);
ALTER TABLE public.books OWNER TO postgres;
--
-- Name: books_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.books_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.books_id_seq OWNER TO postgres;
--
-- Name: books_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.books_id_seq OWNED BY public.books.id;
--
-- Name: books id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.books ALTER COLUMN id SET DEFAULT nextval('public.books_id_seq'::regclass);
--
-- Data for Name: books; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.books (id, title, primary_author) FROM stdin;
1 The Hobbit Tollkien
2 Pan Tadeusz Adam Mickiewicz
3 Romeo and Juliet William Shaskespeare
4 The Old Curiosity Shop Charles Dickens
5 Far From the Madding Crowd Thomas Hardy
6 E.M. Forster A Passage to India
7 Dulce et Decorum Est Wilfred Owen
8 Brideshead Revisited Evelyn Waugh
9 The Lord of the Rings Tolkien
10 the Queen of Crime Agatha Christi
\.
--
-- Name: books_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('public.books_id_seq', 1, true);
--
-- Name: books szymon; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.books
ADD CONSTRAINT szymon PRIMARY KEY (id);
--
-- PostgreSQL database dump complete
--
| true |
53ee63564f7e11510aed045c0ea6ee01b1280bd0 | SQL | varshawankhede/new-repository | /ossum/ossum.sql | UTF-8 | 2,062 | 3.0625 | 3 | [
"Apache-2.0"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 13, 2021 at 02:23 PM
-- Server version: 10.4.20-MariaDB
-- PHP Version: 7.3.29
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: `ossum`
--
-- --------------------------------------------------------
--
-- Table structure for table `tblusers`
--
CREATE TABLE `tblusers` (
`id` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`payment_amount` varchar(255) NOT NULL,
`gst` varchar(255) NOT NULL,
`withoutgst` varchar(255) NOT NULL,
`total_payable_amount` varchar(255) NOT NULL,
`inserted_date` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `tblusers`
--
INSERT INTO `tblusers` (`id`, `name`, `payment_amount`, `gst`, `withoutgst`, `total_payable_amount`, `inserted_date`) VALUES
(2, 'Harry Potter', '12000', '14160', '12000', '14160', '2021-09-13 12:03:16'),
(3, 'John Doe', '14000', '16520', '14000', '16520', '2021-09-13 12:03:57'),
(4, 'chritina william', '1600', '1888', '1600', '1888', '2021-09-13 12:04:25'),
(5, 'mac', '1953', '2304.54', '1953', '2304.54', '2021-09-13 12:04:58'),
(6, 'joe', '2000', '2360', '2000', '2360', '2021-09-13 12:05:19');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `tblusers`
--
ALTER TABLE `tblusers`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `tblusers`
--
ALTER TABLE `tblusers`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
| true |
83254bc87b08b97bd1e88b9c08c5be20d40d0b30 | SQL | mo3athBaioud/bluestome | /ssi-common-model/res/scripts/mobile.sql | UTF-8 | 720 | 3.59375 | 4 | [] | no_license | DROP TABLE IF EXISTS TBL_MOBILE_BRAND;
--手机品牌表
CREATE TABLE TBL_MOBILE_BRAND (
D_ID INT(4) NOT NULL AUTO_INCREMENT, --主键ID
D_BRAND_ID INT(4) NOT NULL, --品牌ID
D_CH_NAME VARCHAR(128) NOT NULL DEFAULT '', --品牌名称
D_EN_NAME VARCHAR(128), -- 品牌英文名
D_ICON VARCHAR(512), -- 品牌图标
D_SOURCE SMALLINT(6) NOT NULL DEFAULT '1', -- 品牌来源:泡泡网,中关村
D_SOURCE_URL VARCHAR(512) NOT NULL DEFAULT '', -- 品牌网址
D_DESCRIPTION TEXT NULL, -- 品牌描述
D_CREATE_DT TIMESTAMP DEFAULT CURRENT_TIMESTAMP,-- 创建时间
D_MODIFY_DT TIMESTAMP, -- 修改时间
PRIMARY KEY (D_ID),
UNIQUE INDEX UNIQUE_TBL_MOBILE_BRAND (D_SOURCE,D_BRAND_ID)
); | true |
c5d70d668431ae5040530c42e7cb9f6e6ce7ea76 | SQL | wilkersoh/prisma-orm | /base.sql | UTF-8 | 898 | 3.8125 | 4 | [] | no_license | -- Create a custom type
CREATE TYPE "user_role_enum" AS ENUM ('user', 'admin', 'superadmin');
-- Create a table
CREATE TABLE "users"(
"id" BIGSERIAL PRIMARY KEY NOT NULL,
"name" VARCHAR(255) NOT NULL,
"email" VARCHAR(255) UNIQUE NOT NULL,
"role" user_role_enum NOT NULL DEFAULT('user')
);
-- Create a table
CREATE TABLE "posts"(
"id" BIGSERIAL PRIMARY KEY NOT NULL,
"title" VARCHAR(255) NOT NULL,
"body" TEXT,
"userId" INTEGER NOT NULL,
FOREIGN KEY ("userId") REFERENCES "users"("id")
);
-- Create data
INSERT INTO "users" ("name", "email", "role")
VALUES('John Doe', 'john@email.com', 'admin'),
('jane Doe', 'jane@email.com', 'admin'),
('Ahmed Hadjou', 'ahmed@hadjou.com', 'user');
INSERT INTO "posts" ("title", "body", "userId")
VALUES('Hello World!!', 'Hey guys, I see a rainbow through this prisma :D', 1),
('So do I', 'It looks cooool!!!', 2),
('It does', 'Yeahhh', 1);
-- Drop schema
| true |
c5cf8a85e752a4d4f475eb2205277c1aa5a9baf1 | SQL | reiherric/Hackerrank | /SQL/Basic Select/Weather Observation Station 9.sql | UTF-8 | 584 | 3.765625 | 4 | [] | no_license | /*
Query the list of CITY names from STATION that do not start with vowels. Your result cannot contain duplicates.
Input Format
The STATION table is described as follows:
STATION
FIELD FORMAT
ID NUMBER
CITY VARCHAR2(21)
STATE VARCHAR2(2)
LAT_N NUMBER
lONG_W NUMBER
where LAT_N is the northern latitude and LONG_W is the western longitude.
*/
/*MS SQL Server*/
SELECT CITY
FROM STATION
WHERE CITY NOT IN
(SELECT CITY
FROM STATION
WHERE CITY LIKE 'A%' OR CITY LIKE 'E%' OR CITY LIKE 'I%' OR CITY LIKE 'O%' OR CITY LIKE 'U%'
GROUP BY CITY)
GROUP BY CITY
| true |
2066f9e1e52131d52cc83357eaafa659134b9b9d | SQL | ThePatrickStar/sqlite-test-generator | /minimized/unionvtabfault.sql | UTF-8 | 472 | 2.78125 | 3 | [] | no_license | ATTACH 'test.db2' AS aux;
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT);
CREATE TABLE t2(a INTEGER PRIMARY KEY, b TEXT);
CREATE TABLE aux.t3(a INTEGER PRIMARY KEY, b TEXT);
INSERT INTO t1 VALUES(1, 'one'), (2, 'two'), (3, 'three');
INSERT INTO t2 VALUES(10, 'ten'), (11, 'eleven'), (12, 'twelve');
INSERT INTO t3 VALUES(20, 'twenty'), (21, 'twenty-one'), (22, 'twenty-two');
CREATE VIRTUAL TABLE temp.uuu USING unionvtab(;
CREATE VIRTUAL TABLE temp.uuu USING unionvtab(;
| true |
34378fb120f52882357420f64675d738698d02dd | SQL | TYPO3-svn-archive/artless | /ext_tables.sql | UTF-8 | 407 | 2.65625 | 3 | [] | no_license | #
# Table structure for table 'pages'
#
CREATE TABLE pages (
tx_artless_startdate int(11) DEFAULT '0' NOT NULL,
tx_artless_enddate int(11) DEFAULT '0' NOT NULL,
tx_artless_place text,
tx_artless_enablecomments tinyint(3) DEFAULT '0' NOT NULL,
tx_artless_categories text,
tx_artless_relatives text,
tx_artless_owners text,
tx_artless_participants text,
price decimal(19,2) DEFAULT '0.00' NOT NULL
); | true |
14d6dcdde75cbc52b0c8df1b0d839df6ed4f4eec | SQL | anctilsa/sources | /2016-09 Projet Saint-Pierre - C#/SOURCES/Dev/stpierrePeuple.sql | UTF-8 | 12,907 | 3.609375 | 4 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Client : 127.0.0.1
-- Généré le : Ven 25 Novembre 2016 à 15:55
-- Version du serveur : 10.1.19-MariaDB
-- Version de PHP : 5.6.28
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 données : `stpierre`
--
CREATE DATABASE IF NOT EXISTS `stpierre` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE `stpierre`;
-- --------------------------------------------------------
--
-- Structure de la table `brand`
--
DROP TABLE IF EXISTS `brand`;
CREATE TABLE IF NOT EXISTS `brand` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL,
`phone` varchar(30) DEFAULT NULL,
`contact` varchar(255) DEFAULT NULL,
`website` varchar(127) DEFAULT NULL,
`note` text,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4;
--
-- Contenu de la table `brand`
--
INSERT INTO `brand` (`id`, `name`, `phone`, `contact`, `website`, `note`) VALUES
(5, 'Castrol', '1-514-CAS-TROL', 'Castrol contact - Bernard', 'castrol.com', 'Marque d''huiles et d''articles de maintenance'),
(6, 'Master', '819-123-0012', 'Master contact - Gaétan', 'master.ca', 'Marque d''outils et d''équipement'),
(3, 'Ford', '819-221-FORD', 'Ford contact - Gérard', 'ford.ca', 'Marque de véhicules utilisés.'),
(4, 'Harvey', '819-HAR-VEY0', 'Harvey contact - Guy', 'harvey.ca', 'Restaurant préféré des employés'),
(2, 'CAT', '819-CAT-1234', 'Cat contact - Bob', 'cat.ca', 'Marque de machineries lourdes'),
(1, 'Inconnue', 'Inconnue', 'Aucun', 'www.google.com', 'La marque de le objet est inconnue');
-- --------------------------------------------------------
--
-- Structure de la table `category`
--
DROP TABLE IF EXISTS `category`;
CREATE TABLE IF NOT EXISTS `category` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL,
`description` text,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;
--
-- Contenu de la table `category`
--
INSERT INTO `category` (`id`, `name`, `description`) VALUES
(2, 'Articles', 'Accessoires pour les équipements'),
(1, 'Équipement', 'Items ayant un moteur'),
(3, 'Autre', 'Items divers, sans lien avec les équipements ou articles');
-- --------------------------------------------------------
--
-- Structure de la table `company`
--
DROP TABLE IF EXISTS `company`;
CREATE TABLE IF NOT EXISTS `company` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(127) NOT NULL,
`description` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4;
--
-- Contenu de la table `company`
--
INSERT INTO `company` (`id`, `name`, `description`) VALUES
(3, 'Transport St-Pierre', ''),
(2, 'Excavation St-Pierre', ''),
(4, 'Démolition St-Pierre', ''),
(1, 'Inconnue', 'Le la compagnie pour la qu''elle l''objet est attitré est inconnue ou pour plusieurs de ceux-ci');
-- --------------------------------------------------------
--
-- Structure de la table `item`
--
DROP TABLE IF EXISTS `item`;
CREATE TABLE IF NOT EXISTS `item` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL,
`description` text NOT NULL,
`number` varchar(10) DEFAULT NULL,
`model` varchar(127) DEFAULT NULL,
`year` smallint(6) DEFAULT NULL,
`value` decimal(10,0) DEFAULT NULL,
`comments` text,
`receptionDate` datetime DEFAULT NULL,
`creationDate` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`serialNumber` varchar(255) DEFAULT NULL,
`matriculation` varchar(10) DEFAULT NULL,
`quantity` int(11) DEFAULT NULL,
`FK_Type_id` int(11) NOT NULL,
`FK_Brand_id` int(11) DEFAULT NULL,
`FK_Location_id` int(11) DEFAULT NULL,
`FK_Provider_id` int(11) DEFAULT NULL,
`FK_Company_id` int(11) DEFAULT NULL,
`FK_Unit_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=24 DEFAULT CHARSET=utf8mb4;
--
-- Contenu de la table `item`
--
INSERT INTO `item` (`id`, `name`, `description`, `number`, `model`, `year`, `value`, `comments`, `receptionDate`, `creationDate`, `serialNumber`, `matriculation`, `quantity`, `FK_Type_id`, `FK_Brand_id`, `FK_Location_id`, `FK_Provider_id`, `FK_Company_id`, `FK_Unit_id`) VALUES
(2, 'Bouteur B8N', 'Voici un autre bouteur d8n', 'b8n2', 'b8n', 2007, '65000', 'Voici un autre bouteur d8n', '2006-05-05 13:50:00', '2016-10-13 20:38:49', 'B8N10124', '1234', NULL, 1, 1, 1, 1, 1, NULL),
(1, 'Bouteur B8N', 'Voici le bouteur d8n', 'b8n1', 'b8n', 1997, '45000', 'Voici le bouteur d8n', '1999-05-05 13:50:00', '2016-10-13 20:37:36', 'B8N10123', 'B8N1A2', NULL, 4, 2, 3, 1, 2, NULL),
(3, 'Vielle Pelle Mécanique P1M', 'Voici une pelle mécanique de modèle P1M', 'P1M1', 'P1M', 2006, '60000', 'Voici une pelle mécanique de modèle P1M', '2006-03-03 12:00:00', '2016-10-13 20:41:13', 'P1M001', 'P1M1P1', NULL, 5, 3, 1, 1, 1, NULL),
(4, 'Nouvelle Pelle Mécanique P1M', 'Voici une pelle mécanique de modèle P1M', 'P1M2', 'P1M', 2012, '90000', 'Voici une pelle mécanique de modèle P1M', '2012-03-03 12:00:00', '2016-10-13 20:41:58', 'P1M002', 'P1M2P1', NULL, 6, 4, 4, 2, 3, NULL),
(5, 'Pelle P01', 'Pelle P01 pour la pelle mécanique P1M', 'P01-1', 'P01', 1997, '4500', 'Pelle P01 pour la pelle mécanique P1M', '2002-10-19 00:00:00', '2016-10-13 20:45:04', 'P01-01', NULL, NULL, 2, 5, 1, 1, 1, NULL),
(6, 'Nouvelle Pelle P01', 'Nouvelle Pelle P01', 'P01-2', 'P01', 2015, '10500', 'TEST\nPelle P01 pour la pelle mécanique P1M', '2015-10-19 00:00:00', '2016-10-13 20:45:43', 'P01-02', NULL, NULL, 2, 6, 1, 1, 1, NULL),
(7, 'Huile biodégradable', 'Huile bio [xyz]', 'HBI-01', 'HBI', NULL, '750', 'Voici de l''huile biodégradable pour les chantiers près des cours d''eau', '2016-10-04 00:00:00', '2016-10-13 20:51:45', NULL, NULL, 200, 3, 1, 1, 3, 1, 1),
(8, 'Huile', 'Voici de l''huile pour les chantiers habituels', 'H-01', 'HUILE', NULL, '750', 'Voici de l''huile pour les chantiers habituels', '2016-07-04 00:00:00', '2016-10-13 20:52:36', NULL, NULL, 150, 3, 1, 1, 1, 1, 1),
(19, 'Vis', 'Vis caré #2', 'C2', 'Vis caré #2', NULL, NULL, 'useless', NULL, '2016-11-11 09:56:12', NULL, NULL, NULL, 1, 3, 2, 3, 4, NULL),
(20, 'Bouteur B8N', 'Voici un autre bouteur d8n', 'b8n22', 'b8nasd', 2007, '65000', 'Voici un autre bouteur d8n', '2006-05-05 13:50:00', '2016-11-25 09:42:00', 'B8N10124', '1234', NULL, 1, 1, 1, 1, 1, NULL),
(23, 'Bouteur B8N', 'Voici un autre bouteur d8n', '', 'b8nasd', 2007, '65000', 'Voici un autre bouteur d8n', '2006-05-05 13:50:00', '2016-11-25 09:46:48', 'B8N10124', '1234', NULL, 1, 1, 1, 1, 1, NULL);
-- --------------------------------------------------------
--
-- Structure de la table `item_compatibility`
--
DROP TABLE IF EXISTS `item_compatibility`;
CREATE TABLE IF NOT EXISTS `item_compatibility` (
`FK_Item1_id` int(11) NOT NULL,
`FK_Item2_id` int(11) NOT NULL,
PRIMARY KEY (`FK_Item1_id`,`FK_Item2_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
--
-- Contenu de la table `item_compatibility`
--
INSERT INTO `item_compatibility` (`FK_Item1_id`, `FK_Item2_id`) VALUES
(1, 8),
(1, 9),
(2, 7),
(2, 9),
(3, 8),
(3, 9),
(4, 8),
(4, 9),
(5, 8),
(5, 9),
(6, 7),
(6, 9);
-- --------------------------------------------------------
--
-- Structure de la table `location`
--
DROP TABLE IF EXISTS `location`;
CREATE TABLE IF NOT EXISTS `location` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(127) NOT NULL,
`description` text,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4;
--
-- Contenu de la table `location`
--
INSERT INTO `location` (`id`, `name`, `description`) VALUES
(2, 'Hangar Sherbrooke', 'Hangar principale de la maison mère'),
(3, 'Entrepôt secondaire sherbrooke', 'Entrepôt secondaire près du pont'),
(4, 'Chantier 1 Québec', 'La pelle est au chantier de pont ***'),
(1, 'Inconnue', 'L''endroit est inconnue');
-- --------------------------------------------------------
--
-- Structure de la table `provider`
--
DROP TABLE IF EXISTS `provider`;
CREATE TABLE IF NOT EXISTS `provider` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL,
`phone` varchar(30) DEFAULT NULL,
`phoneAlt` varchar(30) DEFAULT NULL,
`email` varchar(127) DEFAULT NULL,
`contact` varchar(255) DEFAULT NULL,
`website` varchar(127) DEFAULT NULL,
`city` varchar(127) DEFAULT NULL,
`notes` text,
`creationDate` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;
--
-- Contenu de la table `provider`
--
INSERT INTO `provider` (`id`, `name`, `phone`, `phoneAlt`, `email`, `contact`, `website`, `city`, `notes`, `creationDate`) VALUES
(2, 'First provider', '123 456 7890', 'tmp', 'test@email.com', 'bobby bob', 'bob.ca', 'city', 'Notes', '2016-10-29 14:57:32'),
(3, 'Second provider', '223 456 7890', 'tmp', 'test2@email.com', '2bobby bob', 'bob.2ca', 'city2', 'Notes2', '2016-10-29 14:57:53'),
(1, 'Inconnue', 'Aucun', 'Aucun', 'Aucun', 'Aucun', 'Aucun', 'Aucun', 'Aucun', '2016-11-11 10:07:01');
-- --------------------------------------------------------
--
-- Structure de la table `role`
--
DROP TABLE IF EXISTS `role`;
CREATE TABLE IF NOT EXISTS `role` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL,
`description` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;
--
-- Contenu de la table `role`
--
INSERT INTO `role` (`id`, `name`, `description`) VALUES
(1, 'Administration', 'L''administration peut voir tout les champs ainsi que de créer et modifier les autres utilisateurs'),
(2, 'Mécanicien', 'Le mécanicien est l''utilisateur général.\r\nIl ne peut modifier les informations, Il peut seulement lire certains champs. ');
-- --------------------------------------------------------
--
-- Structure de la table `type`
--
DROP TABLE IF EXISTS `type`;
CREATE TABLE IF NOT EXISTS `type` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL,
`FK_Category_id` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4;
--
-- Contenu de la table `type`
--
INSERT INTO `type` (`id`, `name`, `FK_Category_id`) VALUES
(5, 'Pelle', 2),
(4, 'Pick-Up', 1),
(3, 'Pelle Mécanique', 1),
(2, 'Bouteur', 1),
(6, 'Cisailles', 2),
(7, 'Outils', 3),
(8, 'Maintenance', 3),
(1, 'Inconnue', 3);
-- --------------------------------------------------------
--
-- Structure de la table `unit`
--
DROP TABLE IF EXISTS `unit`;
CREATE TABLE IF NOT EXISTS `unit` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL,
`shortName` varchar(10) NOT NULL,
`description` text,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4;
--
-- Contenu de la table `unit`
--
INSERT INTO `unit` (`id`, `name`, `shortName`, `description`) VALUES
(2, 'Litres', 'L', 'Volume en Litres'),
(1, 'Kilogramme', 'kg', 'Poids en Kg'),
(3, 'onces', 'oz', 'Quantité liquide onces'),
(4, 'livre', 'lbs', 'Poids en livre');
-- --------------------------------------------------------
--
-- Structure de la table `user`
--
DROP TABLE IF EXISTS `user`;
CREATE TABLE IF NOT EXISTS `user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(50) NOT NULL,
`firstName` varchar(127) NOT NULL,
`lastName` varchar(127) NOT NULL,
`email` varchar(127) NOT NULL,
`phone` varchar(30) NOT NULL,
`phoneAlt` varchar(30) DEFAULT NULL,
`userCode` char(6) NOT NULL,
`passwordHash` varchar(255) NOT NULL,
`note` text,
`creationDate` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`archiveDate` datetime DEFAULT NULL,
`isActive` tinyint(1) NOT NULL DEFAULT '1',
`FK_Role_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;
--
-- Contenu de la table `user`
--
INSERT INTO `user` (`id`, `username`, `firstName`, `lastName`, `email`, `phone`, `phoneAlt`, `userCode`, `passwordHash`, `note`, `creationDate`, `archiveDate`, `isActive`, `FK_Role_id`) VALUES
(1, 'first', 'firstname1', 'lastname1', 'first@user.ca', '1234567890', NULL, 'user', '12dea96fec20593566ab75692c9949596833adc9', 'notes', '2016-10-29 15:00:36', NULL, 1, 2),
(2, 'test', 'test', 'test', 'test@gmail.com', '819-444-1919', '819-444-1919', 'test', '', 'Utilisateur test', '2016-11-11 10:10:48', '2016-11-30 00:00:00', 1, 2),
(3, 'Admin', 'admin', 'admin', 'admin@gmail.com', '911', '911', 'admin', 'dd94709528bb1c83d08f3088d4043f4742891f4f', 'Administrateur du système', '2016-11-11 10:11:44', NULL, 1, 1);
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
| true |
4cead495204606e92d88cd2d59f3f9ab12634aa9 | SQL | esharp054/EDUEXCHANGE | /eduexchange.sql | UTF-8 | 16,198 | 3.015625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: May 04, 2017 at 07:08 PM
-- Server version: 5.7.18-0ubuntu0.16.04.1
-- PHP Version: 7.0.15-0ubuntu0.16.04.4
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: `eduexchange`
--
-- --------------------------------------------------------
--
-- Table structure for table `notes`
--
CREATE TABLE `notes` (
`id` int(11) NOT NULL,
`type` varchar(20) NOT NULL DEFAULT 'notes',
`cover` varchar(128) DEFAULT NULL,
`title` varchar(20) NOT NULL,
`description` text NOT NULL,
`upload_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`viewDate` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`uploader_id` int(11) NOT NULL,
`price` int(11) NOT NULL,
`class` varchar(20) NOT NULL,
`stat` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `notes`
--
INSERT INTO `notes` (`id`, `type`, `cover`, `title`, `description`, `upload_date`, `viewDate`, `uploader_id`, `price`, `class`, `stat`) VALUES
(49, 'notes', '/assets/default_textbook.jpg', 'ArrayLists', 'Understanding the basics of an ArrayList', '2017-04-03 08:04:02', '2017-04-03 08:04:02', 22, 15, 'Java', 1),
(41, 'notes', '/assets/default_textbook.jpg', 'Converegnt plate bou', 'Types of boundries notes', '2017-02-09 11:31:19', '2017-02-09 11:31:19', 22, 10, 'Geology 1313', 1),
(56, 'notes', '/assets/default_textbook.jpg', 'Covalent Bonds', 'Chemistry notes from day 1', '2017-05-04 08:08:45', '2017-05-04 08:08:45', 4, 3, 'Chemistry', 1),
(32, 'notes', '/assets/default_textbook.jpg', 'Econ: Day 1', 'Notes covering the supply curve', '2017-01-03 18:12:11', '2017-01-03 18:12:11', 1, 10, 'Economics 1301', 0),
(33, 'notes', '/assets/default_textbook.jpg', 'Econ: Day 2', 'Notes covering the demand curve', '2017-01-07 20:17:10', '2017-01-07 20:17:10', 2, 15, 'Economics 1301', 1),
(34, 'notes', '/assets/default_textbook.jpg', 'Econ: Day 3', 'Supply intersecting demand and what that means', '2017-01-13 01:02:03', '2017-01-13 01:02:03', 3, 5, 'Economics 1301', 1),
(55, 'notes', '/assets/default_textbook.jpg', 'Eigenspaces, Eigenve', 'Chapter 9 notes', '2017-04-24 11:12:13', '2017-04-24 11:12:13', 13, 4, 'Linear Algebra', 1),
(47, 'notes', '/assets/default_textbook.jpg', 'Exam 3 review', 'Things to review', '2017-03-19 10:17:10', '2017-03-19 10:17:10', 14, 16, 'Anthropology', 1),
(44, 'notes', '/assets/default_textbook.jpg', 'Heap', 'Implementing and understanding a heap', '2017-02-27 23:59:59', '2017-02-27 23:59:59', 3, 6, 'Data structures', 1),
(40, 'notes', '/assets/default_textbook.jpg', 'Industrialization of', 'Industrialization cause and effects', '2017-02-05 03:44:55', '2017-02-05 03:44:55', 24, 20, 'Antropology', 1),
(51, 'notes', '/assets/default_textbook.jpg', 'Inheritance', 'When to use inheritance and when to implement', '2017-04-09 15:17:19', '2017-04-09 15:17:19', 21, 5, 'Java', 1),
(39, 'notes', '/assets/default_textbook.jpg', 'Introduction to sign', 'What each hand gesture means', '2017-01-24 09:10:10', '2017-01-24 09:10:10', 20, 25, 'American Sign Langua', 1),
(38, 'notes', '/assets/default_textbook.jpg', 'Limits Introduction', 'How and when to take the limit', '2017-01-23 16:17:01', '2017-01-23 16:17:01', 8, 10, 'Calculus 1337', 1),
(53, 'notes', '/assets/default_textbook.jpg', 'Mean, Median, Mode', 'Learning statistics to surivive Prof. Fontenots classes', '2017-04-17 20:17:17', '2017-04-17 20:17:17', 18, 9, 'Databases', 1),
(48, 'notes', '/assets/default_textbook.jpg', 'MOV + LDR', 'Learning assembly language', '2017-03-27 09:05:50', '2017-03-27 09:05:50', 17, 21, 'Assembly Language', 1),
(36, 'notes', '/assets/default_textbook.jpg', 'PHPmyAdmin', 'Notes on how to install and use phpmyadmin', '2017-01-19 07:45:46', '2017-01-19 07:45:46', 15, 1, 'Databases', 1),
(45, 'notes', '/assets/default_textbook.jpg', 'Python Basics', 'Learning python', '2017-03-03 17:17:17', '2017-03-03 17:17:17', 5, 1, 'Programming Language', 1),
(46, 'notes', '/assets/default_textbook.jpg', 'R', 'Downloading, installing, and programming in R', '2017-03-13 04:49:39', '2017-03-13 04:49:39', 16, 12, 'Databases', 1),
(43, 'notes', '/assets/default_textbook.jpg', 'REGEX', 'Understanding regular expressions', '2017-02-23 10:08:56', '2017-02-23 10:08:56', 9, 4, 'Programming Language', 1),
(42, 'notes', '/assets/default_textbook.jpg', 'ROI', 'Return on investment and its use', '2017-02-17 20:59:59', '2017-02-17 20:59:59', 13, 15, 'ACCT', 1),
(37, 'notes', '/assets/default_textbook.jpg', 'SLIM', 'How to install and use SLIM', '2017-01-20 23:23:23', '2017-01-20 23:23:23', 11, 11, 'Databases', 1),
(52, 'notes', '/assets/default_textbook.jpg', 'Threads', 'Avoiding race conditions and deadlocks', '2017-04-13 21:14:07', '2017-04-13 21:14:07', 14, 3, 'Programming Language', 1),
(35, 'notes', '/assets/default_textbook.jpg', 'Vagrant', 'Notes on how to install vagrant', '2017-01-16 05:39:25', '2017-01-16 05:39:25', 7, 50, 'Databases', 1),
(50, 'notes', '/assets/default_textbook.jpg', 'Vector', 'Understanding the basics of a Vector', '2017-04-08 07:07:25', '2017-04-08 07:07:25', 20, 10, 'C++', 1),
(54, 'notes', '/assets/default_textbook.jpg', 'Vector Addition', 'How to add vectors in physics', '2017-04-23 17:04:23', '2017-04-23 17:04:23', 17, 6, 'Physics', 1);
-- --------------------------------------------------------
--
-- Table structure for table `supplies`
--
CREATE TABLE `supplies` (
`id` int(11) NOT NULL,
`type` varchar(20) NOT NULL DEFAULT 'supplies',
`cover` text,
`title` varchar(20) NOT NULL,
`description` text NOT NULL,
`upload_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`viewDate` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`uploader_id` int(11) NOT NULL,
`price` int(11) NOT NULL,
`class` varchar(20) NOT NULL,
`stat` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `supplies`
--
INSERT INTO `supplies` (`id`, `type`, `cover`, `title`, `description`, `upload_date`, `viewDate`, `uploader_id`, `price`, `class`, `stat`) VALUES
(5, 'supplies', '/assets/default_textbook.jpg', 'Binders', '5 Binders that are g', '2012-06-18 10:34:09', '2017-04-20 04:20:09', 5, 25, 'General', 1),
(3, 'supplies', '/assets/default_textbook.jpg', 'DLD board', 'Spartan board', '2012-06-18 10:34:09', '2017-04-20 04:20:09', 3, 75, 'DLD', 1),
(4, 'supplies', 'http://placehold.it/125x150', 'External hard drive', 'A hard drive to back', '2012-06-18 10:34:09', '2017-04-20 04:20:09', 1, 50, 'General', 1),
(2, 'supplies', '/assets/default_textbook.jpg', 'Macbook Pro', 'Newest Macbook pro, ', '2012-06-18 10:34:09', '2017-04-20 04:20:09', 2, 3000, 'General', 1),
(1, 'supplies', '/assets/default_textbook.jpg', 'TI84', 'TI84 from 2012, ok c', '2012-06-18 10:34:09', '2017-04-20 04:20:09', 1, 100, 'Math Classes', 0);
-- --------------------------------------------------------
--
-- Table structure for table `textbooks`
--
CREATE TABLE `textbooks` (
`id` int(11) NOT NULL,
`type` varchar(20) NOT NULL DEFAULT 'textbook',
`ibsn` int(11) DEFAULT NULL,
`cover` text,
`title` varchar(20) NOT NULL,
`description` text,
`upload_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`viewDate` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`uploader_id` int(11) NOT NULL,
`price` int(11) NOT NULL,
`class` varchar(20) NOT NULL,
`stat` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `textbooks`
--
INSERT INTO `textbooks` (`id`, `type`, `ibsn`, `cover`, `title`, `description`, `upload_date`, `viewDate`, `uploader_id`, `price`, `class`, `stat`) VALUES
(1, 'textbook', 564731, 'http://test.url', 'updated title', 'my database', '2017-04-26 00:00:00', '2017-04-26 00:00:00', 1, 100, 'cse3381', 1),
(2, 'textbook', 112113114, NULL, 'Lookbook', 'A book for kid', '2017-04-26 00:00:00', '2017-04-26 00:00:00', 7, 89, 'MATH229', 1),
(3, 'textbook', 7778899, 'http://placehold.it/125x150', '1984', 'a novel', '2017-04-26 00:00:00', '2017-04-26 00:00:00', 9, 65, 'cse4340', 1),
(4, 'textbook', 332232326, NULL, 'Mockingbird', 'a bird', '2017-04-19 00:00:00', '2017-04-26 00:00:00', 66, 77, 'CSE8866', 1),
(5, 'textbook', 6556565, NULL, 'DB n points', 'slim', '2017-04-26 00:00:00', '2017-04-26 00:00:00', 67, 76, 'CSE8888', 1),
(7, 'textbook', NULL, 'http://placehold.it/125x150', 'Textbook', 'ok', '2017-05-03 06:05:15', '2017-05-03 06:05:15', 1, 45, 'cse 3330', 1),
(8, 'textbook', NULL, 'http://placehold.it/125x150', 'test', 'This is a test to see if long descriptions will be accepted', '2017-05-03 06:06:34', '2017-05-03 06:06:34', 1, 20, 'CSE 3330', 1),
(9, 'textbook', NULL, 'http://placehold.it/125x150', 'New Listing', 'This is a test', '2017-05-03 17:45:03', '2017-05-03 17:45:03', 1, 45, 'Cse 4450', 0),
(10, 'textbook', NULL, 'http://placehold.it/125x150', 'Textbook', 'This is a test', '2017-05-03 18:28:29', '2017-05-03 18:28:29', 1, 45, 'cse 3330', 0),
(11, 'textbook', NULL, 'http://placehold.it/125x150', 'GUI Notes', 'GUI notes for class 1', '2017-05-03 18:30:05', '2017-05-03 18:30:05', 1, 3, 'CSE 3345', 0),
(12, 'textbook', NULL, 'http://www.bio-rad.com/webroot/web/images/lse/products/biotechnology_laboratory_textbook/category_feature/global/lse_cat_feat_gataca_txtbk_11-0689.jpg', 'cheme', 'chemestry textbooks', '2017-05-03 19:06:55', '2017-05-03 19:06:55', 1, 19, 'ch20', 0),
(13, 'textbook', NULL, 'https://s-media-cache-ak0.pinimg.com/736x/68/5d/61/685d61a47e631a12cef4156a62cf2557.jpg', 'math', 'This is my math book and the condition was perfect', '2017-05-03 19:21:42', '2017-05-03 19:21:42', 1, 15, 'Math3315', 0),
(14, 'textbook', NULL, 'http://i.walmartimages.com/i/p/09/78/06/18/69/0978061869008_500X500.jpg', 'History', 'Condition is fairly ok', '2017-05-03 19:36:40', '2017-05-03 19:36:40', 114, 9, 'History1000', 1);
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`email` varchar(40) NOT NULL,
`phone` varchar(14) NOT NULL,
`pass` char(64) NOT NULL,
`avatar` text,
`rating` int(11) DEFAULT NULL,
`userID` int(11) NOT NULL,
`joined_date` datetime DEFAULT CURRENT_TIMESTAMP,
`username` varchar(40) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`email`, `phone`, `pass`, `avatar`, `rating`, `userID`, `joined_date`, `username`) VALUES
('cjin@smu.edu', '4699946777', 'db4fb40a247dc1bc111f0dc9d84ed0e0', 'https://cdn0.iconfinder.com/data/icons/iconshock_guys/512/andrew.png', NULL, 1, NULL, 'Derek'),
('cjin23@smu.edu', '469994677789', 'f24b7c52b6ab0a0364c5888a4b57f681', NULL, NULL, 3, NULL, 'OK'),
('cjin45@smu.edu', '777777777', '3d801aa532c1cec3ee82d87a99fdf63f', 'https://www.google.com/imgres?imgurl=http%3A%2F%2Fendlesstheme.com%2Fsimplify1.0%2Fimages%2Fprofile%2Fprofile4.jpg&imgrefurl=http%3A%2F%2Fendlesstheme.com%2Fsimplify1.0%2Fwidget.html&docid=u_EzSpMskjuIrM&tbnid=UIFWdSKtprOD6M%3A&vet=10ahUKEwiMp7mPuM_TAhUB7IMKHfcwD5QQMwiMASggMCA..i&w=452&h=454&bih=826&biw=1440&q=user%20avatar&ved=0ahUKEwiMp7mPuM_TAhUB7IMKHfcwD5QQMwiMASggMCA&iact=mrc&uact=8', NULL, 5, NULL, 'temp'),
('rlonghirst0@smu.edu', '3259674273', 'aeLruOe', NULL, 1, 82, '2017-01-03 18:12:11', 'aparr0'),
('mporrett1@smu.edu', '1982024408', 'wh5QyNvpJzvj', NULL, 4, 83, '2017-01-07 20:17:10', 'ckeeler1'),
('dwoodyatt2@smu.edu', '9236784358', 'y4qw0Tfo', NULL, 4, 84, '2017-01-13 01:02:03', 'oponting2'),
('ngawne3@smu.edu', '6528603264', 'QEpY21JQOlC', NULL, 3, 85, '2017-01-16 05:39:25', 'ekrebs3'),
('pbrigshaw4@smu.edu', '7434384536', 'm8oZ1CYEreoY', NULL, 4, 86, '2017-01-19 07:45:46', 'dsondon4'),
('ibrownlee5@smu.edu', '8417415060', 'B0RaVHa1dBUk', NULL, 2, 87, '2017-01-20 23:23:23', 'oroll5'),
('jjime6@smu.edu', '4022029241', 'RILrQVYAo9BA', NULL, 1, 88, '2017-01-23 16:17:01', 'lmactrustie6'),
('dkainz7@smu.edu', '4176842373', 'o3UfMwbSB', NULL, 1, 89, '2017-01-24 09:10:10', 'bbollard7'),
('eskayman8@smu.edu', '2111816382', 'sUo9yGfVuO', NULL, 5, 90, '2017-02-05 03:44:55', 'bbarnwall8'),
('cbrolly9@smu.edu', '4634288548', 'TZYA0UzviIJM', NULL, 2, 91, '2017-02-09 11:31:19', 'gbyrcher9'),
('mlangfortha@smu.edu', '1746393815', 'jWjCVwziUj', NULL, 4, 92, '2017-02-17 20:59:59', 'tbalstona'),
('mshopcottb@smu.edu', '9178361811', 'T2U2zNVP', NULL, 5, 93, '2017-02-23 10:08:56', 'hmenearb'),
('mdrexelc@smu.edu', '5064824448', 'vLwFObCyf', NULL, 4, 94, '2017-02-27 23:59:59', 'jmenendesc'),
('mpaddemored@smu.edu', '9046816548', 'YZaX8lDWvD', NULL, 3, 95, '2017-03-03 17:17:17', 'bbotwrightd'),
('ssansome@smu.edu', '6198079315', '0NoDZ4kR50xu', NULL, 2, 96, '2017-03-13 04:49:39', 'rsoldnere'),
('bbindinf@smu.edu', '7002409861', 'qpVCGvW', NULL, 4, 97, '2017-03-19 10:17:10', 'ptabbf'),
('aarkowg@smu.edu', '5585633719', 'GYPgO1c7H', NULL, 1, 98, '2017-03-27 09:05:50', 'cpaulog'),
('ablesingh@smu.edu', '9895035520', '2FxFMeHgp', NULL, 4, 99, '2017-04-03 08:04:02', 'clemonnierh'),
('dbelvini@smu.edu', '2848993188', '4pCN3k', NULL, 4, 100, '2017-04-08 07:07:25', 'wphilcocki'),
('scastiglionej@smu.edu', '9384104559', 'ChUKGoh93i', NULL, 3, 101, '2017-04-09 15:17:19', 'nrozetj'),
('dbeatonk@smu.edu', '8886689619', 'xUw7tQCokF', NULL, 1, 102, '2017-04-13 21:14:07', 'psinkinsk'),
('tdenisyukl@smu.edu', '8669553664', 'LrcTYZF', NULL, 5, 103, '2017-04-17 20:17:17', 'mgallagerl'),
('gkaganm@smu.edu', '9438507875', 'bFKeaQJ', NULL, 4, 104, '2017-04-23 17:04:23', 'mniccollsm'),
('ikingen@smu.edu', '1734407625', '7g7ILzEjWDY1', NULL, 2, 105, '2017-04-24 11:12:13', 'cmcsauln'),
('nkeywoodo@smu.edu', '2317992469', '4vAVwza', NULL, 3, 106, '2017-05-04 08:08:45', 'dstortono'),
('12312ji@op.com', '123123123', 'db4fb40a247dc1bc111f0dc9d84ed0e0', NULL, NULL, 107, '2017-05-03 06:48:18', 'TAI'),
('12311232ji@op.com', '9090909090', 'db4fb40a247dc1bc111f0dc9d84ed0e0', NULL, NULL, 111, '2017-05-03 06:50:58', 'TAIi'),
('test@smu.edu', '3546575647', '3d801aa532c1cec3ee82d87a99fdf63f', NULL, NULL, 112, '2017-05-03 07:20:10', 'test'),
('tog@op.com', '9909012330', 'db4fb40a247dc1bc111f0dc9d84ed0e0', NULL, NULL, 114, '2017-05-03 07:20:55', 'Tog'),
('tog7@op.com', '99090123370', 'db4fb40a247dc1bc111f0dc9d84ed0e0', NULL, NULL, 116, '2017-05-03 07:25:48', 'Tog7'),
('test7@smu.edu', '1212121212', '3d801aa532c1cec3ee82d87a99fdf63f', NULL, NULL, 117, '2017-05-03 07:33:26', 'test7'),
('anfajk@gmail.com', '1111111111', 'e99a18c428cb38d5f260853678922e03', NULL, NULL, 118, '2017-05-03 20:04:56', 'tommy123'),
('jerryB@gmail.com', '3211234345', '3bcb59853bb75521993d3703a5946c08', NULL, NULL, 119, '2017-05-04 04:39:42', 'Jerry123'),
('jbar@smu.edu', '2131231111', '2cf032e1e94afd6331b12b052ac08313', NULL, NULL, 121, '2017-05-04 06:41:34', 'Jerry1234'),
('rrobin@smu.edu', '2312345678', 'ba6f6c1945b2cc32d0882d9b548376b8', NULL, NULL, 129, '2017-05-04 06:42:29', 'redrobin');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `notes`
--
ALTER TABLE `notes`
ADD PRIMARY KEY (`title`,`uploader_id`),
ADD UNIQUE KEY `id` (`id`);
--
-- Indexes for table `supplies`
--
ALTER TABLE `supplies`
ADD PRIMARY KEY (`title`,`uploader_id`),
ADD UNIQUE KEY `id` (`id`);
--
-- Indexes for table `textbooks`
--
ALTER TABLE `textbooks`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `id` (`id`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`userID`),
ADD UNIQUE KEY `email` (`email`),
ADD UNIQUE KEY `phone` (`phone`),
ADD UNIQUE KEY `userID` (`userID`),
ADD UNIQUE KEY `username` (`username`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `notes`
--
ALTER TABLE `notes`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=57;
--
-- AUTO_INCREMENT for table `supplies`
--
ALTER TABLE `supplies`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `textbooks`
--
ALTER TABLE `textbooks`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `userID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=130;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
| true |
2cea345c757c1e985c4f318e27326fe509790c6d | SQL | hyotylainensusanna/twimm | /database/create_tables.sql | UTF-8 | 1,043 | 3.78125 | 4 | [] | no_license | DROP TABLE kayttajanKiinnostus;
DROP TABLE kiinnostus;
DROP TABLE kayttaja;
CREATE TABLE authority (
id INT NOT NULL auto_increment PRIMARY KEY,
role varchar(255) NOT NULL UNIQUE
) ENGINE=InnoDB CHARACTER SET=utf8;
CREATE TABLE kayttaja (
id INT NOT NULL AUTO_INCREMENT,
etunimi VARCHAR(20) NOT NULL,
sukunimi VARCHAR(30) NOT NULL,
sahkoposti VARCHAR(25) NOT NULL,
kuvaus VARCHAR(100),
salasana_encrypted VARCHAR(255) NOT NULL,
enabled tinyint NOT NULL,
role_id INT NOT NULL,
PRIMARY KEY (id),
FOREIGN KEY(role_id) REFERENCES authority (id)
)ENGINE=InnoDB CHARACTER SET=UTF8;
CREATE TABLE kiinnostus (
kiinnostus_id INT NOT NULL AUTO_INCREMENT,
nimi VARCHAR(30) NOT NULL,
PRIMARY KEY(kiinnostus_id)
)ENGINE=InnoDB CHARACTER SET=UTF8;
CREATE TABLE kayttajanKiinnostus (
kayttaja_id INT NOT NULL,
kiinnostus_id INT NOT NULL,
PRIMARY KEY(kayttaja_id, kiinnostus_id),
FOREIGN KEY(kayttaja_id) REFERENCES kayttaja (id),
FOREIGN KEY(kiinnostus_id) REFERENCES kiinnostus (kiinnostus_id)
)ENGINE=InnoDB CHARACTER SET=UTF8; | true |
29e6986b87fddd451270a982c51a5d809cb92105 | SQL | pepeul1191/ruby-padrino-gestion | /archivos/migrations/20180813222027_create_archivos.sql | UTF-8 | 334 | 2.984375 | 3 | [] | no_license | -- migrate:up
CREATE TABLE archivos (
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
nombre VARCHAR(45) NOT NULL,
nombre_generado VARCHAR(80) NOT NULL,
ruta VARCHAR(40) NOT NULL,
extension_id INTEGER,
FOREIGN KEY (extension_id) REFERENCES extensiones(id) ON DELETE CASCADE
);
-- migrate:down
DROP TABLE IF EXISTS archivos;
| true |
9721fc4341d949cafce2c250ceedaf0d0c97f2be | SQL | vuloi/instaliker | /schema.sql | UTF-8 | 1,162 | 3.734375 | 4 | [] | no_license | # Tao bang users
# Bang nay chua cac truong thong tin: user_id, access_token, username, created_on. 3 truong du lieu dau tien chung ta
# nhan duoc sau khi truy van de lay access_token. Moi user cua instragram co mot user_id duy nhat. Do do chung ta su
# dung user_id lam khoa chinh cho bang users
CREATE TABLE users (
user_id INT(15),
access_token VARCHAR(100),
username VARCHAR(100),
created_on DATETIME,
primary key (user_id)
);
# Tao bang tags
# Bang nay chua cac truong thon tin: user_id, tag_id, tag_detail. Doi voi moi user, sau khi user nhap vao mot tag de
# thuc hien thao tac tim kiem, chung ta se luu tag nay vao co so du lieu. Do mot user co the nhap vao nhieu tag khac
# nhau. Do do, tag co the coi la mot thuoc tinh da tri. Nguoc lai mot tag cung co the duoc tao ra boi nhieu nguoi(
# chung ta co the coi moi quan he giua tag va user la moi quan he N * N). Trong truong hop nay, chung ta coi nhu su
# dung moi quan he giua user va tag la 1 * N. Va do do, ta su dung cap (user_id, tag_id) lam khoa chinh cua bang
CREATE TABLE tags (
user_id INT(15),
tag_id INT(15) AUTO_INCREMENT,
tag_detail VARCHAR(255),
primary key (tag_id)
);
| true |
ac04c2ca21e1b8922b5214d39b57485fca9b6812 | SQL | Rubenjose2/bamazon | /seed.sql | UTF-8 | 1,428 | 2.640625 | 3 | [] | no_license | -- Adding Initial Data into Database
INSERT INTO product (product_name, department_name,price,stock_quantity)
VALUES ("Sandas",1,34.99,100);
INSERT INTO product (product_name, department_name,price,stock_quantity)
VALUES ("Fine Towels",1,19.39,20);
INSERT INTO product (product_name, department_name,price,stock_quantity)
VALUES ("Portable Outdoor Beach Table with No-Slip Surface by Sol Coastal",1,12.99,45);
INSERT INTO product (product_name, department_name,price,stock_quantity)
VALUES ("Franklin Sports Black Hawk Portable Soccer Goal",2,19.99,0);
INSERT INTO product (product_name, department_name,price,stock_quantity)
VALUES ("Soccer Gifts, Soccer Bracelet, Soccer Jewelry, Adjustable Soccer Charm Bracelet- Perfect Soccer Gifts",2,9.99,1000);
INSERT INTO product (product_name, department_name,price,stock_quantity)
VALUES ("Doinshop Women Multilayer Irregular Pendant Chain Statement Necklace",3,2.99,100);
INSERT INTO product (product_name, department_name,price,stock_quantity)
VALUES ("Batman v Superman: Dawn of Justice",3,10.99,100);
-------------------------------------------------------------
-- Adding data into the Department table
INSERT INTO department (department_name,over_head_cost) VALUE ("Beach Department",10);
INSERT INTO department (department_name,over_head_cost) VALUE ("Sport Department",90);
INSERT INTO department (department_name,over_head_cost) VALUE ("Women Accesories",10); | true |
c17a2b18df315c485c2abb66bb5baf69a30a8d70 | SQL | cortlandperry/CS121 | /cs121hw7 2/make-warehouse.sql | UTF-8 | 1,730 | 4.15625 | 4 | [] | no_license | -- [Problem 3]
DROP TABLE IF EXISTS resource_fact;
DROP TABLE IF EXISTS visitor_fact;
DROP TABLE IF EXISTS datetime_dim;
DROP TABLE IF EXISTS resource_dim;
DROP TABLE IF EXISTS visitor_dim;
-- This is the dimension table for the visitor
CREATE TABLE visitor_dim (
visitor_id INTEGER NOT NULL AUTO_INCREMENT,
ip_addr VARCHAR(100) NOT NULL,
visit_val INTEGER NOT NULL UNIQUE,
PRIMARY KEY (visitor_id),
UNIQUE (visit_val)
);
-- dimension table for our resource values
CREATE TABLE resource_dim (
resource_id INTEGER NOT NULL AUTO_INCREMENT,
resource VARCHAR(200) NOT NULL,
method VARCHAR(15),
protocol VARCHAR(200),
response INTEGER NOT NULL,
PRIMARY KEY(resource_id),
UNIQUE(resource, method, protocol, response)
);
-- Dimension table for our datetime values
CREATE TABLE datetime_dim (
date_id INTEGER NOT NULL AUTO_INCREMENT,
date_val DATE NOT NULL,
hour_val INTEGER NOT NULL,
weekend BOOLEAN NOT NULL,
holiday VARCHAR(20),
PRIMARY KEY (date_id),
UNIQUE (date_val, hour_val)
);
-- this is the fact table for our resources, its ID's reference the dim tables
CREATE TABLE resource_fact (
date_id INTEGER NOT NULL REFERENCES datetime_dim(date_id),
resource_id INTEGER NOT NULL REFERENCES resource_dim(resource_id),
num_requests INTEGER NOT NULL,
total_bytes BIGINT,
PRIMARY KEY(date_id, resource_id)
);
-- This is the visitor fact table, its ID values reference the dim tables
CREATE TABLE visitor_fact (
date_id INTEGER NOT NULL REFERENCES datetime_dim(date_id),
visitor_id INTEGER NOT NULL REFERENCES visitor_dim(visitor_id),
num_requests INTEGER NOT NULL,
total_bytes BIGINT,
PRIMARY KEY (date_id, visitor_id)
); | true |
26ed38403761ada66207deba868a8a290bb2e338 | SQL | Antonio-Cruciani/Agricola-Database | /Scripts/Agricola View.sql | UTF-8 | 4,249 | 4.09375 | 4 | [] | no_license | --7) Seleziona il terreno più grande con più di un dipendente che lavora ad esso,la città,la via in cui si trova ed il numero totale di dipendenti (agronomi e contadini) che lavorano a quel terreno
select
terreno.id_terreno as IdTerreno,
terreno.dimensione as Dimensione,
ifnull(AgronomiCheAnalizzano.a,0)+ifnull(ContadiniCheColtivano.c,0) as DipendentiCheSeNeOccupano,
ifnull(AgronomiCheAnalizzano.a,0) as AgronomiCheAnalzzano,
ifnull(ContadiniCheColtivano.c,0) as ContadiniCheColtivano
from
AgronomiCheAnalizzano
left join
ContadiniCheColtivano
on
AgronomiCheAnalizzano.ita = ContadiniCheColtivano.itc
left join
terreno
on
terreno.id_terreno = AgronomiCheAnalizzano.ita
having DipendentiCheSeNeOccupano >=1
order by Dimensione DESC limit 1;
CREATE OR REPLACE VIEW AgronomiCheAnalizzano as
select
id_terreno as ita ,
dimensione as dimta,
count(*) as a
from agronomo,analizza,terreno
where agronomo.id_agronomo = analizza.agronomo and analizza.terreno=terreno.id_terreno
group by ita ;
CREATE OR REPLACE VIEW ContadiniCheColtivano as
select
id_terreno as itc,
dimensione as dimtc,
count(*) as c
from contadino,coltiva,terreno
where contadino.id_contadino = coltiva.contadino and coltiva.terreno = terreno.id_terreno
group by itc;
--14) Seleziona i contadini che hanno patente e lavorano i terreni con una macchina agricola
select
nome as Nome,
cognome as Cognome,
n_patente as NumeroPatente,
SelectContadinoUtilizzaMacchinaAgricola.dai as DataInizioMa,
SelectContadinoUtilizzaMacchinaAgricola.daf as DataFineMA,
SelectContadinoLavoraTerreno.daic as DataInizioColt,
SelectContadinoLavoraTerreno.dfc as DataFineColt,
SelectContadinoLavoraTerreno.idt as IdTerreno,
SelectContadinoLavoraTerreno.dpc as ProdColtivato
from
dipendente,
SelectContadinoLavoraTerreno,
SelectContadinoUtilizzaMacchinaAgricola
where
matricola = SelectContadinoUtilizzaMacchinaAgricola.m and
SelectContadinoUtilizzaMacchinaAgricola.idc = SelectContadinoLavoraTerreno.idc1 and
SelectContadinoLavoraTerreno.daic between SelectContadinoUtilizzaMacchinaAgricola.dai and SelectContadinoUtilizzaMacchinaAgricola.daf
order by Nome;
CREATE OR REPLACE VIEW SelectContadinoLavoraTerreno as
select
coltiva.terreno as idt,
prodotto.descrizione as dpc,
id_contadino as idc1,
data_inizio as daic,
data_fine as dfc
from
prodotto, contadino,coltiva,terreno,viene_coltivato
where
contadino.id_contadino = coltiva.contadino and
coltiva.terreno = terreno.id_terreno and
viene_coltivato.terreno = terreno.id_terreno and
viene_coltivato.prodotto = prodotto.id_prodotto ;
CREATE OR REPLACE VIEW SelectContadinoUtilizzaMacchinaAgricola as
select
mat_dip as m,
id_contadino as idc,
data_inizio as dai,
data_fine as daf
from
contadino,utilizza
where contadino.id_contadino =utilizza.contadino;
-- 13) Seleziona tutti gli agronomi che analizzano il prodotto:" Prodotto qualunque_2" e che sono specializzati in gatti e pesci o in una soltanto delle due tipologie di animali
select
dipendente.nome as NomeAgronomo,
cognome as Cognome,
matricola as Matricola,
anno_nascita as DataNascita
FROM
dipendente,agronomo,terreno,viene_coltivato,prodotto,analizza,
SelectAgronomoGattiPesci
where
dipendente.matricola = agronomo.mat_dip and
agronomo.id_agronomo = SelectAgronomoGattiPesci.ida and
agronomo.id_agronomo = analizza.terreno and
analizza.terreno = terreno.id_terreno and
terreno.id_terreno = viene_coltivato.terreno and
viene_coltivato.prodotto= prodotto.id_prodotto and
prodotto.nome = "Prodotto qualunque_2"
group by Matricola;
CREATE OR REPLACE VIEW SelectAgronomoGattiPesci as
select
agronomo as ida
from
specializzato,tipo_di_allevamento
where
specializzato.tipo_allevamento = tipo_di_allevamento.id_tipo and
(tipo_di_allevamento.descrizione ="gatti" or
tipo_di_allevamento.descrizione ="pesci" or
tipo_di_allevamento.descrizione ="gatti" and
tipo_di_allevamento.descrizione="pesci")
group by ida; | true |
10698533e0fb151a863d6931eb68425b6855cef7 | SQL | cf-student-5731/CFLMS-JAVA-fasy-CodeReview-07 | /sql/database-dump.sql | UTF-8 | 34,078 | 2.890625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.5deb2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Aug 15, 2020 at 09:40 AM
-- Server version: 10.3.22-MariaDB-1ubuntu1
-- PHP Version: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `CR7_fasy`
--
CREATE DATABASE IF NOT EXISTS `CR7_fasy` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE `CR7_fasy`;
-- --------------------------------------------------------
--
-- Table structure for table `attends`
--
CREATE TABLE `attends` (
`id` int(11) NOT NULL,
`fk_student` int(11) NOT NULL,
`fk_class` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `attends`
--
INSERT INTO `attends` (`id`, `fk_student`, `fk_class`) VALUES
(1, 291, 20),
(2, 387, 16),
(3, 392, 7),
(4, 364, 15),
(5, 500, 3),
(6, 221, 24),
(7, 476, 21),
(8, 289, 6),
(9, 329, 23),
(10, 385, 6),
(11, 178, 10),
(12, 259, 2),
(13, 362, 5),
(14, 170, 9),
(15, 189, 18),
(16, 282, 9),
(17, 333, 10),
(18, 37, 13),
(19, 278, 9),
(20, 212, 1),
(21, 150, 11),
(22, 66, 18),
(23, 268, 15),
(24, 251, 11),
(25, 5, 8),
(26, 166, 6),
(27, 18, 17),
(28, 9, 8),
(29, 410, 5),
(30, 313, 8),
(31, 376, 5),
(32, 400, 12),
(33, 453, 7),
(34, 315, 3),
(35, 463, 6),
(36, 490, 12),
(37, 167, 23),
(38, 492, 19),
(39, 148, 14),
(40, 123, 5),
(41, 349, 21),
(42, 433, 11),
(43, 468, 15),
(44, 185, 20),
(45, 416, 12),
(46, 217, 21),
(47, 440, 3),
(48, 90, 18),
(49, 182, 4),
(50, 418, 10),
(51, 413, 24),
(52, 172, 19),
(53, 248, 18),
(54, 49, 20),
(55, 206, 8),
(56, 442, 20),
(57, 402, 16),
(58, 252, 14),
(59, 493, 14),
(60, 126, 12),
(61, 311, 4),
(62, 157, 19),
(63, 176, 19),
(64, 298, 11),
(65, 437, 23),
(66, 184, 1),
(67, 314, 12),
(68, 328, 12),
(69, 308, 23),
(70, 411, 3),
(71, 39, 15),
(72, 238, 23),
(73, 443, 14),
(74, 38, 16),
(75, 113, 14),
(76, 491, 13),
(77, 303, 3),
(78, 494, 24),
(79, 301, 12),
(80, 51, 6),
(81, 390, 10),
(82, 12, 12),
(83, 20, 1),
(84, 55, 3),
(85, 159, 8),
(86, 488, 1),
(87, 389, 8),
(88, 382, 21),
(89, 374, 23),
(90, 473, 11),
(91, 381, 2),
(92, 253, 10),
(93, 118, 6),
(94, 122, 9),
(95, 93, 4),
(96, 130, 23),
(97, 429, 16),
(98, 142, 3),
(99, 216, 24),
(100, 424, 16),
(101, 262, 6),
(102, 359, 11),
(103, 254, 13),
(104, 244, 19),
(105, 63, 24),
(106, 214, 7),
(107, 72, 17),
(108, 95, 20),
(109, 223, 10),
(110, 375, 9),
(111, 183, 12),
(112, 101, 5),
(113, 460, 7),
(114, 83, 21),
(115, 94, 24),
(116, 120, 18),
(117, 242, 17),
(118, 110, 9),
(119, 317, 23),
(120, 121, 19),
(121, 31, 20),
(122, 97, 11),
(123, 357, 16),
(124, 195, 12),
(125, 53, 3),
(126, 16, 24),
(127, 335, 24),
(128, 106, 8),
(129, 77, 22),
(130, 86, 17),
(131, 168, 3),
(132, 80, 24),
(133, 466, 13),
(134, 266, 22),
(135, 213, 4),
(136, 82, 17),
(137, 464, 16),
(138, 54, 24),
(139, 26, 14),
(140, 202, 3),
(141, 226, 11),
(142, 70, 18),
(143, 164, 21),
(144, 422, 14),
(145, 100, 4),
(146, 155, 2),
(147, 154, 16),
(148, 292, 4),
(149, 481, 14),
(150, 370, 20),
(151, 207, 5),
(152, 50, 8),
(153, 293, 23),
(154, 334, 3),
(155, 33, 6),
(156, 256, 15),
(157, 421, 22),
(158, 475, 22),
(159, 225, 15),
(160, 75, 18),
(161, 296, 17),
(162, 447, 14),
(163, 341, 18),
(164, 388, 7),
(165, 76, 17),
(166, 265, 7),
(167, 115, 9),
(168, 459, 14),
(169, 211, 17),
(170, 107, 12),
(171, 131, 15),
(172, 69, 11),
(173, 378, 4),
(174, 173, 17),
(175, 35, 22),
(176, 420, 18),
(177, 486, 3),
(178, 257, 13),
(179, 395, 5),
(180, 477, 15),
(181, 363, 22),
(182, 369, 10),
(183, 347, 24),
(184, 258, 23),
(185, 24, 11),
(186, 197, 11),
(187, 393, 17),
(188, 353, 22),
(189, 42, 9),
(190, 30, 22),
(191, 89, 4),
(192, 300, 18),
(193, 380, 16),
(194, 92, 3),
(195, 152, 2),
(196, 340, 8),
(197, 436, 17),
(198, 407, 15),
(199, 383, 21),
(200, 129, 22),
(201, 264, 5),
(202, 394, 15),
(203, 277, 1),
(204, 230, 2),
(205, 337, 18),
(206, 325, 16),
(207, 350, 6),
(208, 287, 10),
(209, 2, 20),
(210, 198, 5),
(211, 280, 16),
(212, 338, 1),
(213, 276, 17),
(214, 191, 7),
(215, 58, 22),
(216, 233, 24),
(217, 36, 10),
(218, 158, 7),
(219, 479, 7),
(220, 318, 10),
(221, 309, 15),
(222, 485, 6),
(223, 239, 15),
(224, 237, 13),
(225, 307, 1),
(226, 71, 18),
(227, 34, 14),
(228, 319, 10),
(229, 458, 6),
(230, 68, 23),
(231, 190, 17),
(232, 365, 5),
(233, 366, 19),
(234, 227, 16),
(235, 384, 3),
(236, 386, 12),
(237, 471, 7),
(238, 467, 13),
(239, 84, 19),
(240, 104, 7),
(241, 279, 24),
(242, 441, 4),
(243, 324, 5),
(244, 482, 4),
(245, 434, 10),
(246, 345, 8),
(247, 306, 16),
(248, 186, 3),
(249, 456, 24),
(250, 271, 7),
(251, 419, 22),
(252, 96, 11),
(253, 321, 24),
(254, 187, 1),
(255, 379, 10),
(256, 336, 2),
(257, 316, 7),
(258, 160, 21),
(259, 161, 23),
(260, 403, 13),
(261, 111, 4),
(262, 412, 2),
(263, 310, 2),
(264, 29, 7),
(265, 288, 14),
(266, 13, 5),
(267, 269, 17),
(268, 133, 16),
(269, 134, 12),
(270, 469, 11),
(271, 438, 4),
(272, 472, 9),
(273, 62, 5),
(274, 127, 4),
(275, 250, 4),
(276, 483, 4),
(277, 428, 20),
(278, 3, 18),
(279, 439, 21),
(280, 128, 19),
(281, 255, 1),
(282, 138, 11),
(283, 57, 21),
(284, 47, 15),
(285, 171, 12),
(286, 236, 24),
(287, 450, 6),
(288, 151, 13),
(289, 137, 2),
(290, 188, 18),
(291, 48, 7),
(292, 404, 1),
(293, 249, 21),
(294, 299, 17),
(295, 371, 4),
(296, 74, 5),
(297, 79, 23),
(298, 56, 10),
(299, 497, 10),
(300, 21, 17),
(301, 91, 13),
(302, 326, 17),
(303, 323, 11),
(304, 263, 18),
(305, 147, 24),
(306, 281, 3),
(307, 17, 7),
(308, 228, 16),
(309, 136, 3),
(310, 165, 18),
(311, 67, 21),
(312, 377, 20),
(313, 87, 16),
(314, 99, 1),
(315, 181, 2),
(316, 445, 10),
(317, 81, 23),
(318, 232, 13),
(319, 495, 2),
(320, 61, 4),
(321, 406, 14),
(322, 455, 15),
(323, 65, 20),
(324, 88, 2),
(325, 474, 11),
(326, 274, 11),
(327, 194, 18),
(328, 480, 10),
(329, 64, 1),
(330, 409, 9),
(331, 241, 2),
(332, 200, 12),
(333, 41, 18),
(334, 451, 19),
(335, 146, 22),
(336, 231, 5),
(337, 40, 1),
(338, 1, 2),
(339, 478, 1),
(340, 499, 8),
(341, 342, 17),
(342, 327, 12),
(343, 361, 14),
(344, 143, 14),
(345, 415, 21),
(346, 368, 17),
(347, 14, 14),
(348, 208, 8),
(349, 302, 11),
(350, 196, 1),
(351, 391, 10),
(352, 360, 19),
(353, 432, 22),
(354, 203, 17),
(355, 343, 9),
(356, 305, 14),
(357, 23, 9),
(358, 372, 13),
(359, 417, 10),
(360, 470, 8),
(361, 273, 12),
(362, 28, 10),
(363, 73, 2),
(364, 156, 20),
(365, 462, 8),
(366, 354, 16),
(367, 397, 2),
(368, 44, 23),
(369, 141, 10),
(370, 169, 8),
(371, 59, 9),
(372, 124, 13),
(373, 358, 2),
(374, 135, 15),
(375, 175, 20),
(376, 290, 22),
(377, 489, 22),
(378, 109, 15),
(379, 346, 19),
(380, 177, 15),
(381, 427, 22),
(382, 260, 1),
(383, 367, 6),
(384, 356, 15),
(385, 145, 6),
(386, 461, 4),
(387, 448, 13),
(388, 243, 7),
(389, 78, 19),
(390, 112, 17),
(391, 339, 19),
(392, 286, 13),
(393, 320, 5),
(394, 351, 16),
(395, 396, 22),
(396, 105, 6),
(397, 348, 20),
(398, 144, 19),
(399, 414, 3),
(400, 25, 16),
(401, 295, 6),
(402, 285, 13),
(403, 267, 23),
(404, 332, 16),
(405, 399, 18),
(406, 15, 23),
(407, 484, 15),
(408, 132, 8),
(409, 425, 6),
(410, 245, 7),
(411, 46, 5),
(412, 163, 13),
(413, 283, 13),
(414, 85, 21),
(415, 4, 21),
(416, 7, 19),
(417, 179, 14),
(418, 454, 22),
(419, 43, 20),
(420, 247, 9),
(421, 209, 14),
(422, 401, 12),
(423, 498, 8),
(424, 449, 1),
(425, 149, 19),
(426, 117, 13),
(427, 220, 8),
(428, 430, 8),
(429, 224, 11),
(430, 431, 20),
(431, 8, 11),
(432, 32, 3),
(433, 426, 21),
(434, 19, 12),
(435, 408, 24),
(436, 201, 9),
(437, 331, 21),
(438, 229, 13),
(439, 193, 15),
(440, 11, 20),
(441, 10, 9),
(442, 284, 21),
(443, 205, 13),
(444, 116, 22),
(445, 125, 9),
(446, 352, 3),
(447, 234, 6),
(448, 330, 23),
(449, 114, 7),
(450, 435, 19),
(451, 294, 19),
(452, 22, 14),
(453, 446, 1),
(454, 219, 6),
(455, 45, 4),
(456, 215, 7),
(457, 139, 6),
(458, 235, 12),
(459, 222, 8),
(460, 153, 9),
(461, 405, 1),
(462, 297, 20),
(463, 398, 2),
(464, 60, 19),
(465, 102, 2),
(466, 174, 5),
(467, 52, 14),
(468, 6, 9),
(469, 496, 21),
(470, 180, 6),
(471, 98, 7),
(472, 465, 20),
(473, 373, 4),
(474, 444, 3),
(475, 140, 9),
(476, 210, 9),
(477, 246, 2),
(478, 204, 5),
(479, 275, 20),
(480, 355, 18),
(481, 457, 12),
(482, 218, 2),
(483, 304, 1),
(484, 344, 18),
(485, 261, 5),
(486, 240, 11),
(487, 312, 23),
(488, 487, 24),
(489, 452, 23),
(490, 119, 16),
(491, 192, 21),
(492, 27, 1),
(493, 322, 8),
(494, 423, 19),
(495, 162, 22),
(496, 199, 15),
(497, 272, 5),
(498, 108, 24),
(499, 270, 4),
(500, 103, 20);
-- --------------------------------------------------------
--
-- Table structure for table `classes`
--
CREATE TABLE `classes` (
`id` int(11) NOT NULL,
`name` varchar(7) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `classes`
--
INSERT INTO `classes` (`id`, `name`) VALUES
(1, '1a'),
(2, '1b'),
(3, '1c'),
(4, '2a'),
(5, '2b'),
(6, '2c'),
(7, '3a'),
(8, '3b'),
(9, '3c'),
(10, '4a'),
(11, '4b'),
(12, '4c'),
(13, '5a'),
(14, '5b'),
(15, '5c'),
(16, '6a'),
(17, '6b'),
(18, '6c'),
(19, '7a'),
(20, '7b'),
(21, '7c'),
(22, '8a'),
(23, '8b'),
(24, '8c');
-- --------------------------------------------------------
--
-- Table structure for table `students`
--
CREATE TABLE `students` (
`id` int(11) NOT NULL,
`firstname` varchar(45) NOT NULL,
`lastname` varchar(45) NOT NULL,
`email` varchar(45) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `students`
--
INSERT INTO `students` (`id`, `firstname`, `lastname`, `email`) VALUES
(1, 'Alix', 'McGilleghole', 'amcgilleghole0@mlb.com'),
(2, 'Kellia', 'Robecon', 'krobecon1@intel.com'),
(3, 'Crin', 'Askham', 'caskham2@tripadvisor.com'),
(4, 'Chet', 'Carwardine', 'ccarwardine3@yellowbook.com'),
(5, 'Rob', 'Worsom', 'rworsom4@vkontakte.ru'),
(6, 'Godwin', 'Rustidge', 'grustidge5@g.co'),
(7, 'Zelma', 'Sherrington', 'zsherrington6@bloglovin.com'),
(8, 'Delainey', 'Ballham', 'dballham7@illinois.edu'),
(9, 'Ignatius', 'Abadam', 'iabadam8@bbb.org'),
(10, 'Andeee', 'Hylden', 'ahylden9@va.gov'),
(11, 'Adham', 'Caldeiro', 'acaldeiroa@mozilla.com'),
(12, 'Dean', 'Linham', 'dlinhamb@wix.com'),
(13, 'Bernice', 'Devanney', 'bdevanneyc@uiuc.edu'),
(14, 'Drud', 'Stickney', 'dstickneyd@sciencedaily.com'),
(15, 'Gerty', 'Caddell', 'gcaddelle@google.com.br'),
(16, 'Carly', 'Tremain', 'ctremainf@mlb.com'),
(17, 'Rex', 'Gelderd', 'rgelderdg@reverbnation.com'),
(18, 'Ozzy', 'Haverson', 'ohaversonh@wix.com'),
(19, 'Anni', 'Lande', 'alandei@vinaora.com'),
(20, 'Annalise', 'Weins', 'aweinsj@walmart.com'),
(21, 'Lynnette', 'Strand', 'lstrandk@ca.gov'),
(22, 'Seana', 'Hamflett', 'shamflettl@elegantthemes.com'),
(23, 'Jedd', 'Yesinov', 'jyesinovm@bandcamp.com'),
(24, 'Millard', 'Busch', 'mbuschn@harvard.edu'),
(25, 'Timmy', 'Gueste', 'tguesteo@cornell.edu'),
(26, 'Laurella', 'Spikins', 'lspikinsp@cdbaby.com'),
(27, 'Homerus', 'Hadkins', 'hhadkinsq@reverbnation.com'),
(28, 'Julia', 'Ginglell', 'jginglellr@ask.com'),
(29, 'Loella', 'Bending', 'lbendings@multiply.com'),
(30, 'Desi', 'Behne', 'dbehnet@howstuffworks.com'),
(31, 'Chucho', 'Prattin', 'cprattinu@telegraph.co.uk'),
(32, 'Kev', 'Zettoi', 'kzettoiv@adobe.com'),
(33, 'Pate', 'Hemphrey', 'phemphreyw@earthlink.net'),
(34, 'Derwin', 'Gliddon', 'dgliddonx@auda.org.au'),
(35, 'Lolita', 'Gentzsch', 'lgentzschy@pcworld.com'),
(36, 'Matthaeus', 'Krolak', 'mkrolakz@imgur.com'),
(37, 'Maureene', 'Jolland', 'mjolland10@amazon.co.jp'),
(38, 'Broddie', 'Giacomucci', 'bgiacomucci11@webeden.co.uk'),
(39, 'Wini', 'Pedri', 'wpedri12@ft.com'),
(40, 'Benoite', 'Pinchback', 'bpinchback13@com.com'),
(41, 'Felicia', 'Pirrey', 'fpirrey14@chicagotribune.com'),
(42, 'Dannie', 'Ramelot', 'dramelot15@timesonline.co.uk'),
(43, 'Jena', 'Fahy', 'jfahy16@wunderground.com'),
(44, 'Stella', 'Riggs', 'sriggs17@un.org'),
(45, 'Rosana', 'Vonasek', 'rvonasek18@usgs.gov'),
(46, 'Thibaut', 'Frantzeni', 'tfrantzeni19@sfgate.com'),
(47, 'Otto', 'Surtees', 'osurtees1a@wikipedia.org'),
(48, 'Damaris', 'Caurah', 'dcaurah1b@cornell.edu'),
(49, 'Cirillo', 'Elsegood', 'celsegood1c@toplist.cz'),
(50, 'Guthry', 'Le Sieur', 'glesieur1d@elpais.com'),
(51, 'Lesly', 'Anmore', 'lanmore1e@usgs.gov'),
(52, 'Rodina', 'Sleicht', 'rsleicht1f@cam.ac.uk'),
(53, 'Cathee', 'Ellesworthe', 'cellesworthe1g@newyorker.com'),
(54, 'Ryun', 'Schroter', 'rschroter1h@ca.gov'),
(55, 'Colette', 'McKelvey', 'cmckelvey1i@hubpages.com'),
(56, 'Jesse', 'Wressell', 'jwressell1j@bigcartel.com'),
(57, 'Anica', 'McShane', 'amcshane1k@posterous.com'),
(58, 'Reese', 'Braden', 'rbraden1l@telegraph.co.uk'),
(59, 'Arlene', 'Cotgrave', 'acotgrave1m@time.com'),
(60, 'Wolf', 'Kitlee', 'wkitlee1n@sciencedaily.com'),
(61, 'Donny', 'Styche', 'dstyche1o@ask.com'),
(62, 'Kinnie', 'Boardman', 'kboardman1p@ucsd.edu'),
(63, 'Melamie', 'Calkin', 'mcalkin1q@wsj.com'),
(64, 'Antonina', 'Major', 'amajor1r@phpbb.com'),
(65, 'Herold', 'Heel', 'hheel1s@pagesperso-orange.fr'),
(66, 'Milissent', 'Deane', 'mdeane1t@amazon.co.uk'),
(67, 'Nola', 'Crowch', 'ncrowch1u@ameblo.jp'),
(68, 'Merla', 'Christoffe', 'mchristoffe1v@wunderground.com'),
(69, 'Granville', 'Jenkyn', 'gjenkyn1w@usatoday.com'),
(70, 'Michele', 'Dewdney', 'mdewdney1x@scribd.com'),
(71, 'Tomkin', 'Bartolacci', 'tbartolacci1y@google.co.jp'),
(72, 'Peg', 'Mulheron', 'pmulheron1z@chron.com'),
(73, 'Marylinda', 'Kilminster', 'mkilminster20@loc.gov'),
(74, 'Zachary', 'Antonelli', 'zantonelli21@etsy.com'),
(75, 'Anny', 'Kincade', 'akincade22@gov.uk'),
(76, 'Dukey', 'Beards', 'dbeards23@who.int'),
(77, 'King', 'Hatchell', 'khatchell24@nasa.gov'),
(78, 'Eustace', 'Droghan', 'edroghan25@uol.com.br'),
(79, 'Winn', 'Vere', 'wvere26@gravatar.com'),
(80, 'Micki', 'Deplacido', 'mdeplacido27@weibo.com'),
(81, 'Maude', 'Assel', 'massel28@sbwire.com'),
(82, 'Aretha', 'Mellon', 'amellon29@illinois.edu'),
(83, 'Thoma', 'Bodesson', 'tbodesson2a@mit.edu'),
(84, 'Sean', 'Fligg', 'sfligg2b@1und1.de'),
(85, 'Boone', 'Petzold', 'bpetzold2c@businessweek.com'),
(86, 'Thaddus', 'Jales', 'tjales2d@desdev.cn'),
(87, 'Haywood', 'Benedettini', 'hbenedettini2e@reference.com'),
(88, 'Gillian', 'Luckman', 'gluckman2f@cdbaby.com'),
(89, 'Joshua', 'Rappa', 'jrappa2g@businesswire.com'),
(90, 'Tammi', 'Rann', 'trann2h@fda.gov'),
(91, 'Conrade', 'Frow', 'cfrow2i@eventbrite.com'),
(92, 'Hildy', 'Dodds', 'hdodds2j@liveinternet.ru'),
(93, 'Faber', 'Bamber', 'fbamber2k@icio.us'),
(94, 'Dalt', 'Robbins', 'drobbins2l@mozilla.org'),
(95, 'Christoforo', 'Scimonelli', 'cscimonelli2m@jalbum.net'),
(96, 'Evelina', 'Strank', 'estrank2n@ebay.com'),
(97, 'Walt', 'Nabbs', 'wnabbs2o@java.com'),
(98, 'Marnia', 'Reder', 'mreder2p@ifeng.com'),
(99, 'Esme', 'Strike', 'estrike2q@nhs.uk'),
(100, 'Felike', 'Treske', 'ftreske2r@boston.com'),
(101, 'Gusella', 'Barnardo', 'gbarnardo2s@blogger.com'),
(102, 'Masha', 'Davydoch', 'mdavydoch2t@ft.com'),
(103, 'Mateo', 'Filliskirk', 'mfilliskirk2u@huffingtonpost.com'),
(104, 'Hillary', 'Kimbrey', 'hkimbrey2v@senate.gov'),
(105, 'Gradeigh', 'Pechan', 'gpechan2w@redcross.org'),
(106, 'Mirabel', 'MacGowan', 'mmacgowan2x@wired.com'),
(107, 'Cynthea', 'Folbig', 'cfolbig2y@wix.com'),
(108, 'Ramona', 'Given', 'rgiven2z@chron.com'),
(109, 'Staffard', 'Renahan', 'srenahan30@omniture.com'),
(110, 'Jermaine', 'Padbury', 'jpadbury31@springer.com'),
(111, 'Ferguson', 'Spriggs', 'fspriggs32@baidu.com'),
(112, 'Redd', 'Wadesworth', 'rwadesworth33@livejournal.com'),
(113, 'Conny', 'Shilstone', 'cshilstone34@icq.com'),
(114, 'Murvyn', 'Prine', 'mprine35@clickbank.net'),
(115, 'Vere', 'Hawkswell', 'vhawkswell36@discuz.net'),
(116, 'Isa', 'Haet', 'ihaet37@smh.com.au'),
(117, 'Zuzana', 'Whifen', 'zwhifen38@ifeng.com'),
(118, 'Alaric', 'Salandino', 'asalandino39@oaic.gov.au'),
(119, 'L;urette', 'Blore', 'lblore3a@japanpost.jp'),
(120, 'Arnold', 'Wickling', 'awickling3b@si.edu'),
(121, 'Ruprecht', 'Riccardelli', 'rriccardelli3c@cam.ac.uk'),
(122, 'Lucas', 'Pinnington', 'lpinnington3d@netscape.com'),
(123, 'Gena', 'Ewles', 'gewles3e@youtu.be'),
(124, 'Jacques', 'Crigin', 'jcrigin3f@blinklist.com'),
(125, 'Gael', 'Chilvers', 'gchilvers3g@51.la'),
(126, 'Claudetta', 'Philipp', 'cphilipp3h@zdnet.com'),
(127, 'Zed', 'Malham', 'zmalham3i@smugmug.com'),
(128, 'Evanne', 'Farady', 'efarady3j@craigslist.org'),
(129, 'Ruthe', 'Droghan', 'rdroghan3k@altervista.org'),
(130, 'Worth', 'Bushen', 'wbushen3l@amazon.co.jp'),
(131, 'Gherardo', 'Dron', 'gdron3m@amazon.de'),
(132, 'Lyndel', 'Johanning', 'ljohanning3n@cdbaby.com'),
(133, 'Nana', 'Greenhowe', 'ngreenhowe3o@mozilla.com'),
(134, 'Greg', 'McQuode', 'gmcquode3p@webs.com'),
(135, 'Adara', 'Carlsen', 'acarlsen3q@infoseek.co.jp'),
(136, 'D\'arcy', 'Varney', 'dvarney3r@hostgator.com'),
(137, 'Bryn', 'Boggish', 'bboggish3s@wired.com'),
(138, 'Giorgio', 'Roelvink', 'groelvink3t@ft.com'),
(139, 'Richie', 'Grigson', 'rgrigson3u@trellian.com'),
(140, 'Jeromy', 'Tinston', 'jtinston3v@google.pl'),
(141, 'Missie', 'Grigaut', 'mgrigaut3w@xing.com'),
(142, 'Alexi', 'Aubray', 'aaubray3x@mozilla.org'),
(143, 'Jonathan', 'Macourek', 'jmacourek3y@elpais.com'),
(144, 'Emelyne', 'Yeaman', 'eyeaman3z@ca.gov'),
(145, 'Johnette', 'Valentin', 'jvalentin40@shop-pro.jp'),
(146, 'Emmeline', 'Stollenberg', 'estollenberg41@pagesperso-orange.fr'),
(147, 'Merilee', 'Warby', 'mwarby42@themeforest.net'),
(148, 'Stanley', 'Haydon', 'shaydon43@jigsy.com'),
(149, 'Sib', 'Andrysiak', 'sandrysiak44@a8.net'),
(150, 'Ike', 'Sommerville', 'isommerville45@techcrunch.com'),
(151, 'Pearle', 'Sneesbie', 'psneesbie46@china.com.cn'),
(152, 'Gris', 'Vasilchenko', 'gvasilchenko47@creativecommons.org'),
(153, 'Chelsey', 'Shute', 'cshute48@google.com.br'),
(154, 'Tate', 'Feacham', 'tfeacham49@github.com'),
(155, 'Ugo', 'Larkworthy', 'ularkworthy4a@amazon.co.jp'),
(156, 'Dallas', 'Worlidge', 'dworlidge4b@1und1.de'),
(157, 'Omero', 'Mallia', 'omallia4c@weather.com'),
(158, 'Fonz', 'Hammersley', 'fhammersley4d@vk.com'),
(159, 'Winfield', 'Skillen', 'wskillen4e@cam.ac.uk'),
(160, 'Haven', 'Seilmann', 'hseilmann4f@bandcamp.com'),
(161, 'Alanna', 'Beckingham', 'abeckingham4g@ezinearticles.com'),
(162, 'Willetta', 'Viveash', 'wviveash4h@gravatar.com'),
(163, 'Katine', 'Cohn', 'kcohn4i@behance.net'),
(164, 'Costa', 'Reddyhoff', 'creddyhoff4j@wix.com'),
(165, 'Brittne', 'Kelloch', 'bkelloch4k@sina.com.cn'),
(166, 'Sandi', 'Tomadoni', 'stomadoni4l@newsvine.com'),
(167, 'Sharia', 'Blunsum', 'sblunsum4m@mail.ru'),
(168, 'Welsh', 'Bordone', 'wbordone4n@rambler.ru'),
(169, 'Cal', 'Capoun', 'ccapoun4o@slate.com'),
(170, 'Cal', 'Laskey', 'claskey4p@arstechnica.com'),
(171, 'Ruddy', 'Petzolt', 'rpetzolt4q@blogspot.com'),
(172, 'Reta', 'Syson', 'rsyson4r@multiply.com'),
(173, 'Bell', 'Cardew', 'bcardew4s@ihg.com'),
(174, 'Doro', 'Edlyne', 'dedlyne4t@shareasale.com'),
(175, 'Gottfried', 'de Guerre', 'gdeguerre4u@washington.edu'),
(176, 'Valaree', 'Iglesia', 'viglesia4v@dell.com'),
(177, 'Celestyna', 'Whiteland', 'cwhiteland4w@topsy.com'),
(178, 'Jae', 'Pryn', 'jpryn4x@ameblo.jp'),
(179, 'Hetti', 'Egerton', 'hegerton4y@pbs.org'),
(180, 'Dalis', 'Bayles', 'dbayles4z@fc2.com'),
(181, 'Kylynn', 'Odam', 'kodam50@macromedia.com'),
(182, 'Gregorio', 'Gaffney', 'ggaffney51@wiley.com'),
(183, 'Fernando', 'Olrenshaw', 'folrenshaw52@printfriendly.com'),
(184, 'Angelita', 'Johnsey', 'ajohnsey53@economist.com'),
(185, 'Thebault', 'Sturdey', 'tsturdey54@last.fm'),
(186, 'Ingemar', 'Benfield', 'ibenfield55@shutterfly.com'),
(187, 'Gayelord', 'Ucceli', 'gucceli56@sbwire.com'),
(188, 'Barnett', 'Arguile', 'barguile57@yelp.com'),
(189, 'Karleen', 'Grossier', 'kgrossier58@last.fm'),
(190, 'Jay', 'Carillo', 'jcarillo59@umich.edu'),
(191, 'Edie', 'Claeskens', 'eclaeskens5a@webnode.com'),
(192, 'Dreddy', 'Whytock', 'dwhytock5b@tripod.com'),
(193, 'Sheri', 'Juorio', 'sjuorio5c@ocn.ne.jp'),
(194, 'Ray', 'Bugge', 'rbugge5d@people.com.cn'),
(195, 'Jethro', 'Ainscough', 'jainscough5e@wunderground.com'),
(196, 'Odell', 'Pettican', 'opettican5f@imdb.com'),
(197, 'Anders', 'MacGauhy', 'amacgauhy5g@hc360.com'),
(198, 'Ingar', 'Barhems', 'ibarhems5h@shutterfly.com'),
(199, 'Stephie', 'Dominik', 'sdominik5i@harvard.edu'),
(200, 'Armando', 'Abbett', 'aabbett5j@berkeley.edu'),
(201, 'Forrester', 'Sondland', 'fsondland5k@psu.edu'),
(202, 'Karin', 'Dobbinson', 'kdobbinson5l@mayoclinic.com'),
(203, 'Ferdie', 'Barthelet', 'fbarthelet5m@lulu.com'),
(204, 'Johnnie', 'Bruckental', 'jbruckental5n@wp.com'),
(205, 'Henriette', 'Weatherall', 'hweatherall5o@java.com'),
(206, 'Michel', 'Ungaretti', 'mungaretti5p@bloglovin.com'),
(207, 'Estelle', 'Ollet', 'eollet5q@e-recht24.de'),
(208, 'Phil', 'Doggrell', 'pdoggrell5r@tiny.cc'),
(209, 'Kirk', 'Eyles', 'keyles5s@storify.com'),
(210, 'Lesley', 'Boullin', 'lboullin5t@de.vu'),
(211, 'Ulrica', 'Apark', 'uapark5u@noaa.gov'),
(212, 'Mildred', 'Stickland', 'mstickland5v@eepurl.com'),
(213, 'Gwenora', 'Bliven', 'gbliven5w@nasa.gov'),
(214, 'Walker', 'Raeside', 'wraeside5x@t-online.de'),
(215, 'Norrie', 'Kingswold', 'nkingswold5y@newsvine.com'),
(216, 'Zora', 'Trematick', 'ztrematick5z@discovery.com'),
(217, 'Robina', 'Bercevelo', 'rbercevelo60@yolasite.com'),
(218, 'Dani', 'Harcase', 'dharcase61@noaa.gov'),
(219, 'Rees', 'Millbank', 'rmillbank62@cnet.com'),
(220, 'Julissa', 'Duffin', 'jduffin63@paypal.com'),
(221, 'Claire', 'Timby', 'ctimby64@multiply.com'),
(222, 'Constance', 'Manville', 'cmanville65@skype.com'),
(223, 'Gustav', 'Abendroth', 'gabendroth66@cyberchimps.com'),
(224, 'Keriann', 'Bewick', 'kbewick67@bizjournals.com'),
(225, 'Ronalda', 'Annott', 'rannott68@delicious.com'),
(226, 'Gualterio', 'Tynnan', 'gtynnan69@vinaora.com'),
(227, 'Gay', 'Biffin', 'gbiffin6a@symantec.com'),
(228, 'Chrystal', 'Dinnies', 'cdinnies6b@parallels.com'),
(229, 'Jacquelyn', 'O\'Fairy', 'jofairy6c@chicagotribune.com'),
(230, 'Doroteya', 'Dodds', 'ddodds6d@seattletimes.com'),
(231, 'Modesta', 'Garlee', 'mgarlee6e@economist.com'),
(232, 'Kenneth', 'Medley', 'kmedley6f@privacy.gov.au'),
(233, 'Brendis', 'Angelo', 'bangelo6g@google.pl'),
(234, 'Orlando', 'Ingall', 'oingall6h@51.la'),
(235, 'Collen', 'Chatres', 'cchatres6i@studiopress.com'),
(236, 'Francene', 'Ashlee', 'fashlee6j@issuu.com'),
(237, 'Yankee', 'Neissen', 'yneissen6k@ucsd.edu'),
(238, 'Maryjo', 'Bousfield', 'mbousfield6l@va.gov'),
(239, 'Anna-maria', 'Karim', 'akarim6m@ezinearticles.com'),
(240, 'Lexis', 'Cuerdall', 'lcuerdall6n@time.com'),
(241, 'Harold', 'Chaudron', 'hchaudron6o@forbes.com'),
(242, 'Archy', 'McCaffrey', 'amccaffrey6p@hugedomains.com'),
(243, 'Ninetta', 'Galland', 'ngalland6q@trellian.com'),
(244, 'Lissa', 'Sexty', 'lsexty6r@fema.gov'),
(245, 'Jodee', 'Justun', 'jjustun6s@mit.edu'),
(246, 'Alexia', 'Kopacek', 'akopacek6t@businesswire.com'),
(247, 'Amy', 'Gulliman', 'agulliman6u@netlog.com'),
(248, 'Rosanne', 'Leivesley', 'rleivesley6v@amazon.co.uk'),
(249, 'Roland', 'Scoffham', 'rscoffham6w@dmoz.org'),
(250, 'Corney', 'Liles', 'cliles6x@samsung.com'),
(251, 'Aloise', 'Lichfield', 'alichfield6y@yandex.ru'),
(252, 'Minnnie', 'Galbreath', 'mgalbreath6z@bizjournals.com'),
(253, 'Tedd', 'Juste', 'tjuste70@sogou.com'),
(254, 'Noel', 'Le Clercq', 'nleclercq71@foxnews.com'),
(255, 'Sydel', 'Ogilvie', 'sogilvie72@sbwire.com'),
(256, 'Guendolen', 'Jewett', 'gjewett73@un.org'),
(257, 'Dena', 'Cole', 'dcole74@slashdot.org'),
(258, 'Missy', 'Bauldry', 'mbauldry75@state.gov'),
(259, 'Rudie', 'Hazelton', 'rhazelton76@flickr.com'),
(260, 'Mercedes', 'Peggs', 'mpeggs77@pbs.org'),
(261, 'Fidelity', 'Roake', 'froake78@ow.ly'),
(262, 'Ansel', 'Trethowan', 'atrethowan79@whitehouse.gov'),
(263, 'Wyatt', 'Saleway', 'wsaleway7a@yellowbook.com'),
(264, 'Cy', 'Gritsaev', 'cgritsaev7b@sbwire.com'),
(265, 'Wynnie', 'Lowes', 'wlowes7c@privacy.gov.au'),
(266, 'Marian', 'Snooks', 'msnooks7d@yandex.ru'),
(267, 'Dwight', 'Dedman', 'ddedman7e@google.fr'),
(268, 'Grier', 'Minifie', 'gminifie7f@tripadvisor.com'),
(269, 'Judas', 'Gwinn', 'jgwinn7g@scientificamerican.com'),
(270, 'Gothart', 'Boshell', 'gboshell7h@indiegogo.com'),
(271, 'Gilligan', 'Poulsen', 'gpoulsen7i@cargocollective.com'),
(272, 'Lorettalorna', 'Colleford', 'lcolleford7j@japanpost.jp'),
(273, 'Haze', 'Whithalgh', 'hwhithalgh7k@w3.org'),
(274, 'Tove', 'Taffarello', 'ttaffarello7l@jalbum.net'),
(275, 'Veriee', 'Hanniger', 'vhanniger7m@surveymonkey.com'),
(276, 'Caril', 'Ingilson', 'cingilson7n@addtoany.com'),
(277, 'Esta', 'Gidman', 'egidman7o@amazon.co.jp'),
(278, 'Giulietta', 'Wield', 'gwield7p@wired.com'),
(279, 'Teodoor', 'Garm', 'tgarm7q@imgur.com'),
(280, 'Vanda', 'Mount', 'vmount7r@trellian.com'),
(281, 'Modestine', 'Sleford', 'msleford7s@ucoz.com'),
(282, 'Moe', 'Jerdan', 'mjerdan7t@intel.com'),
(283, 'Faustine', 'Banck', 'fbanck7u@msu.edu'),
(284, 'Conny', 'Redmire', 'credmire7v@google.pl'),
(285, 'Car', 'Deaton', 'cdeaton7w@biglobe.ne.jp'),
(286, 'Winona', 'Scase', 'wscase7x@wikimedia.org'),
(287, 'Northrop', 'Schwandermann', 'nschwandermann7y@unc.edu'),
(288, 'Shalne', 'Blankhorn', 'sblankhorn7z@twitpic.com'),
(289, 'Jarred', 'Adamek', 'jadamek80@washingtonpost.com'),
(290, 'Mikkel', 'Yglesia', 'myglesia81@microsoft.com'),
(291, 'Carina', 'Pundy', 'cpundy82@dion.ne.jp'),
(292, 'Bethena', 'Mowday', 'bmowday83@dot.gov'),
(293, 'Henderson', 'Choake', 'hchoake84@chicagotribune.com'),
(294, 'Alayne', 'Bearns', 'abearns85@marriott.com'),
(295, 'Pauletta', 'Haryngton', 'pharyngton86@cocolog-nifty.com'),
(296, 'Kingsly', 'Shord', 'kshord87@java.com'),
(297, 'Laurice', 'Kinner', 'lkinner88@webnode.com'),
(298, 'Matilda', 'Jachimczak', 'mjachimczak89@bbc.co.uk'),
(299, 'Norri', 'Santori', 'nsantori8a@cdc.gov'),
(300, 'Jocelin', 'Cowins', 'jcowins8b@yale.edu'),
(301, 'Jordon', 'Kiendl', 'jkiendl8c@google.co.jp'),
(302, 'Cariotta', 'Blind', 'cblind8d@example.com'),
(303, 'Hendrick', 'McRamsey', 'hmcramsey8e@t.co'),
(304, 'Norah', 'Cranmere', 'ncranmere8f@discuz.net'),
(305, 'Adriaens', 'Nuttall', 'anuttall8g@apple.com'),
(306, 'Ives', 'Coppock.', 'icoppock8h@harvard.edu'),
(307, 'Scotty', 'Kall', 'skall8i@cyberchimps.com'),
(308, 'Gustave', 'Scolts', 'gscolts8j@marketwatch.com'),
(309, 'Waldemar', 'Lidbetter', 'wlidbetter8k@redcross.org'),
(310, 'Marcile', 'Cherry Holme', 'mcherryholme8l@surveymonkey.com'),
(311, 'Seymour', 'Oris', 'soris8m@homestead.com'),
(312, 'Annmaria', 'Feander', 'afeander8n@hao123.com'),
(313, 'Maxy', 'Bagg', 'mbagg8o@hao123.com'),
(314, 'Samantha', 'Boothman', 'sboothman8p@tmall.com'),
(315, 'Raffarty', 'Saddler', 'rsaddler8q@microsoft.com'),
(316, 'Alain', 'Quilter', 'aquilter8r@amazon.com'),
(317, 'Osmond', 'Garretts', 'ogarretts8s@ning.com'),
(318, 'Hillard', 'Kerswill', 'hkerswill8t@i2i.jp'),
(319, 'Andre', 'Reinbach', 'areinbach8u@booking.com'),
(320, 'Alverta', 'Morteo', 'amorteo8v@ucsd.edu'),
(321, 'Riordan', 'Ost', 'rost8w@yellowbook.com'),
(322, 'Hewett', 'Rintoul', 'hrintoul8x@reverbnation.com'),
(323, 'Mack', 'Saterweyte', 'msaterweyte8y@utexas.edu'),
(324, 'Kania', 'Dalgety', 'kdalgety8z@usatoday.com'),
(325, 'Frasier', 'Sutcliffe', 'fsutcliffe90@bravesites.com'),
(326, 'Caty', 'Stopforth', 'cstopforth91@godaddy.com'),
(327, 'Wes', 'Tunnicliff', 'wtunnicliff92@ucoz.com'),
(328, 'Glori', 'Tieman', 'gtieman93@mediafire.com'),
(329, 'Kellia', 'Jamblin', 'kjamblin94@hatena.ne.jp'),
(330, 'Klaus', 'Orbell', 'korbell95@qq.com'),
(331, 'Brina', 'Norsworthy', 'bnorsworthy96@unblog.fr'),
(332, 'Pat', 'Antonazzi', 'pantonazzi97@edublogs.org'),
(333, 'Barty', 'Boxe', 'bboxe98@ox.ac.uk'),
(334, 'Vyky', 'Causey', 'vcausey99@topsy.com'),
(335, 'Tally', 'Hayball', 'thayball9a@bloglines.com'),
(336, 'Cobbie', 'Urquhart', 'curquhart9b@icq.com'),
(337, 'Aimil', 'Mattingson', 'amattingson9c@blog.com'),
(338, 'Barry', 'Street', 'bstreet9d@phoca.cz'),
(339, 'Korrie', 'Studholme', 'kstudholme9e@time.com'),
(340, 'Bartolemo', 'Cowpertwait', 'bcowpertwait9f@usa.gov'),
(341, 'Marcelline', 'Seater', 'mseater9g@google.fr'),
(342, 'Mersey', 'Dwyer', 'mdwyer9h@acquirethisname.com'),
(343, 'Aldus', 'Dinley', 'adinley9i@desdev.cn'),
(344, 'Reggie', 'Mc Giffin', 'rmcgiffin9j@diigo.com'),
(345, 'Juline', 'Beeson', 'jbeeson9k@fastcompany.com'),
(346, 'Austina', 'O\'Calleran', 'aocalleran9l@cnbc.com'),
(347, 'Kennie', 'Spat', 'kspat9m@typepad.com'),
(348, 'Lynne', 'Mattaus', 'lmattaus9n@hexun.com'),
(349, 'Kirbee', 'Formby', 'kformby9o@a8.net'),
(350, 'Selina', 'Howles', 'showles9p@desdev.cn'),
(351, 'Kiley', 'Cussons', 'kcussons9q@over-blog.com'),
(352, 'Jacquenette', 'Lamey', 'jlamey9r@fda.gov'),
(353, 'Florina', 'Braghini', 'fbraghini9s@chicagotribune.com'),
(354, 'Everett', 'Stear', 'estear9t@npr.org'),
(355, 'Derek', 'Abraham', 'dabraham9u@illinois.edu'),
(356, 'Guido', 'Alejandro', 'galejandro9v@harvard.edu'),
(357, 'Gabriella', 'Buxsy', 'gbuxsy9w@sakura.ne.jp'),
(358, 'Ashley', 'Duckitt', 'aduckitt9x@newyorker.com'),
(359, 'Waldo', 'Lillecrap', 'wlillecrap9y@csmonitor.com'),
(360, 'Lotte', 'Rowet', 'lrowet9z@blogs.com'),
(361, 'Clemmy', 'Casazza', 'ccasazzaa0@pbs.org'),
(362, 'Melloney', 'Nisot', 'mnisota1@altervista.org'),
(363, 'Rosamond', 'Adamolli', 'radamollia2@newyorker.com'),
(364, 'Pierre', 'Lound', 'plounda3@hc360.com'),
(365, 'Georgianne', 'Fillis', 'gfillisa4@moonfruit.com'),
(366, 'Oby', 'Gonning', 'ogonninga5@goo.ne.jp'),
(367, 'Bronson', 'Steward', 'bstewarda6@hubpages.com'),
(368, 'Deedee', 'Fedder', 'dfeddera7@nymag.com'),
(369, 'Hillel', 'Folbigg', 'hfolbigga8@rakuten.co.jp'),
(370, 'Jerrilee', 'Mitchiner', 'jmitchinera9@washingtonpost.com'),
(371, 'Normand', 'Doerling', 'ndoerlingaa@usda.gov'),
(372, 'Nev', 'Baggiani', 'nbaggianiab@narod.ru'),
(373, 'Ansell', 'Baxster', 'abaxsterac@altervista.org'),
(374, 'Zack', 'Cramp', 'zcrampad@ihg.com'),
(375, 'Doralyn', 'Stirley', 'dstirleyae@csmonitor.com'),
(376, 'Dory', 'Wheelton', 'dwheeltonaf@clickbank.net'),
(377, 'Annalise', 'Dimitriou', 'adimitriouag@engadget.com'),
(378, 'Ulrike', 'Heiden', 'uheidenah@newsvine.com'),
(379, 'Willabella', 'Anniwell', 'wanniwellai@bizjournals.com'),
(380, 'Gram', 'Pideon', 'gpideonaj@cafepress.com'),
(381, 'Elisabet', 'Brackenridge', 'ebrackenridgeak@123-reg.co.uk'),
(382, 'Dagny', 'Crabtree', 'dcrabtreeal@wordpress.com'),
(383, 'Kienan', 'Belward', 'kbelwardam@dagondesign.com'),
(384, 'Aharon', 'Trower', 'atroweran@sohu.com'),
(385, 'Friederike', 'Lardeur', 'flardeurao@ocn.ne.jp'),
(386, 'Cristina', 'Pipkin', 'cpipkinap@hc360.com'),
(387, 'Lura', 'Gallally', 'lgallallyaq@marriott.com'),
(388, 'Orv', 'Gilston', 'ogilstonar@com.com'),
(389, 'Rasla', 'Boorman', 'rboormanas@bloglines.com'),
(390, 'Harriot', 'Powdrill', 'hpowdrillat@clickbank.net'),
(391, 'Cora', 'O\'Howbane', 'cohowbaneau@dmoz.org'),
(392, 'Bing', 'Dawe', 'bdaweav@ehow.com'),
(393, 'Cindie', 'Tritten', 'ctrittenaw@china.com.cn'),
(394, 'Leonelle', 'Scimone', 'lscimoneax@aol.com'),
(395, 'Lilah', 'Mursell', 'lmursellay@cafepress.com'),
(396, 'Lida', 'Cunah', 'lcunahaz@ucsd.edu'),
(397, 'Modestia', 'Bennie', 'mbennieb0@theglobeandmail.com'),
(398, 'Boony', 'Malafe', 'bmalafeb1@bbc.co.uk'),
(399, 'Cammie', 'Halfhead', 'chalfheadb2@yelp.com'),
(400, 'Claudianus', 'Rosingdall', 'crosingdallb3@microsoft.com'),
(401, 'Royce', 'Bathersby', 'rbathersbyb4@ezinearticles.com'),
(402, 'Merrili', 'Feehely', 'mfeehelyb5@usda.gov'),
(403, 'Elianore', 'Speed', 'espeedb6@smugmug.com'),
(404, 'Rhonda', 'McMorland', 'rmcmorlandb7@omniture.com'),
(405, 'Gisele', 'Balma', 'gbalmab8@xing.com'),
(406, 'Helga', 'Griffitt', 'hgriffittb9@webs.com'),
(407, 'Winne', 'Marsden', 'wmarsdenba@bizjournals.com'),
(408, 'Van', 'Keme', 'vkemebb@webnode.com'),
(409, 'Guglielmo', 'Drinkwater', 'gdrinkwaterbc@fema.gov'),
(410, 'Abbye', 'Corgenvin', 'acorgenvinbd@dailymail.co.uk'),
(411, 'Mischa', 'Portal', 'mportalbe@fotki.com'),
(412, 'Lana', 'Steers', 'lsteersbf@cocolog-nifty.com'),
(413, 'Mirabel', 'Fischer', 'mfischerbg@free.fr'),
(414, 'Jerrilee', 'Dictus', 'jdictusbh@webs.com'),
(415, 'Lucie', 'Dimnage', 'ldimnagebi@ft.com'),
(416, 'Lorena', 'Bromell', 'lbromellbj@netlog.com'),
(417, 'Samuele', 'Bleasdale', 'sbleasdalebk@arstechnica.com'),
(418, 'Tedmund', 'Witherbed', 'twitherbedbl@economist.com'),
(419, 'Kiley', 'Cromie', 'kcromiebm@domainmarket.com'),
(420, 'Jere', 'Prantoni', 'jprantonibn@cnn.com'),
(421, 'Craggy', 'Britch', 'cbritchbo@tinypic.com'),
(422, 'Valencia', 'Bunyan', 'vbunyanbp@hatena.ne.jp'),
(423, 'Thaddeus', 'Kellart', 'tkellartbq@mysql.com'),
(424, 'Wildon', 'Picard', 'wpicardbr@buzzfeed.com'),
(425, 'Reggis', 'Yusupov', 'ryusupovbs@posterous.com'),
(426, 'Gothart', 'Rennenbach', 'grennenbachbt@so-net.ne.jp'),
(427, 'Carolee', 'Brimblecombe', 'cbrimblecombebu@webmd.com'),
(428, 'Kati', 'McLenaghan', 'kmclenaghanbv@java.com'),
(429, 'Hobart', 'Dunniom', 'hdunniombw@dot.gov'),
(430, 'Aldis', 'Ovenell', 'aovenellbx@miibeian.gov.cn'),
(431, 'Trescha', 'Langrish', 'tlangrishby@g.co'),
(432, 'Drucill', 'Burhouse', 'dburhousebz@bluehost.com'),
(433, 'Pauline', 'Goodin', 'pgoodinc0@shinystat.com'),
(434, 'Janetta', 'Hallwell', 'jhallwellc1@ibm.com'),
(435, 'Humfrid', 'Halwill', 'hhalwillc2@biglobe.ne.jp'),
(436, 'Axel', 'Vonasek', 'avonasekc3@squarespace.com'),
(437, 'Fancy', 'Lewsam', 'flewsamc4@economist.com'),
(438, 'Angie', 'Athelstan', 'aathelstanc5@cyberchimps.com'),
(439, 'Eward', 'Paynton', 'epayntonc6@fotki.com'),
(440, 'Daniela', 'Prazor', 'dprazorc7@blogtalkradio.com'),
(441, 'Robb', 'Moxham', 'rmoxhamc8@ycombinator.com'),
(442, 'Lorianna', 'Schapero', 'lschaperoc9@bandcamp.com'),
(443, 'Dorthea', 'Swinerd', 'dswinerdca@hhs.gov'),
(444, 'Angie', 'Griggs', 'agriggscb@imgur.com'),
(445, 'Ainsley', 'Powder', 'apowdercc@reddit.com'),
(446, 'Jarret', 'Mottinelli', 'jmottinellicd@discovery.com'),
(447, 'Cristie', 'Bodiam', 'cbodiamce@ox.ac.uk'),
(448, 'Joni', 'Croutear', 'jcroutearcf@issuu.com'),
(449, 'Reggie', 'Zanetto', 'rzanettocg@howstuffworks.com'),
(450, 'Shannon', 'Etches', 'setchesch@163.com'),
(451, 'Pincus', 'Spreadbury', 'pspreadburyci@java.com'),
(452, 'Vilhelmina', 'Beck', 'vbeckcj@cisco.com'),
(453, 'Modesty', 'Greenless', 'mgreenlessck@umn.edu'),
(454, 'Normand', 'Maass', 'nmaasscl@fc2.com'),
(455, 'Tadd', 'Dorton', 'tdortoncm@hud.gov'),
(456, 'Prentice', 'Kiddey', 'pkiddeycn@1688.com'),
(457, 'Cathi', 'Keywood', 'ckeywoodco@devhub.com'),
(458, 'Cairistiona', 'Tomaschke', 'ctomaschkecp@cnet.com'),
(459, 'Fan', 'Bosch', 'fboschcq@kickstarter.com'),
(460, 'Calley', 'Boutcher', 'cboutchercr@aboutads.info'),
(461, 'Filip', 'Berthelmot', 'fberthelmotcs@ucsd.edu'),
(462, 'Flossy', 'Josland', 'fjoslandct@pinterest.com'),
(463, 'Madelene', 'Stolberger', 'mstolbergercu@bbc.co.uk'),
(464, 'Colan', 'Gluyus', 'cgluyuscv@springer.com'),
(465, 'Thorny', 'Quail', 'tquailcw@patch.com'),
(466, 'Sheree', 'Tidridge', 'stidridgecx@boston.com'),
(467, 'Sarene', 'Gabbett', 'sgabbettcy@histats.com'),
(468, 'Charmian', 'Zucker', 'czuckercz@deviantart.com'),
(469, 'Thacher', 'Flagg', 'tflaggd0@abc.net.au'),
(470, 'Jania', 'Jannasch', 'jjannaschd1@simplemachines.org'),
(471, 'Hymie', 'Tal', 'htald2@chicagotribune.com'),
(472, 'Kaela', 'Belli', 'kbellid3@netscape.com'),
(473, 'Sid', 'Bown', 'sbownd4@wsj.com'),
(474, 'Lenka', 'Maryan', 'lmaryand5@eventbrite.com'),
(475, 'Diane', 'Spatig', 'dspatigd6@washington.edu'),
(476, 'Merv', 'Sanford', 'msanfordd7@google.nl'),
(477, 'Braden', 'Stimpson', 'bstimpsond8@flavors.me'),
(478, 'Guthrie', 'Ireson', 'giresond9@arstechnica.com'),
(479, 'Dee dee', 'Donnellan', 'ddonnellanda@ed.gov'),
(480, 'Rex', 'McLachlan', 'rmclachlandb@goo.ne.jp'),
(481, 'Vina', 'Howgego', 'vhowgegodc@aboutads.info'),
(482, 'Tamma', 'Visick', 'tvisickdd@macromedia.com'),
(483, 'Brendan', 'Dulwitch', 'bdulwitchde@phoca.cz'),
(484, 'Shadow', 'Leneham', 'slenehamdf@businessinsider.com'),
(485, 'Lowe', 'Buncom', 'lbuncomdg@cnn.com'),
(486, 'Cordelia', 'Milkins', 'cmilkinsdh@cdbaby.com'),
(487, 'Susanetta', 'Murtell', 'smurtelldi@gov.uk'),
(488, 'Sibley', 'Evelyn', 'sevelyndj@cam.ac.uk'),
(489, 'Ag', 'Letchford', 'aletchforddk@mozilla.com'),
(490, 'Engelbert', 'Dutnall', 'edutnalldl@army.mil'),
(491, 'Codie', 'Barajaz', 'cbarajazdm@amazon.com'),
(492, 'Randall', 'Pflieger', 'rpfliegerdn@behance.net'),
(493, 'Zack', 'Bosden', 'zbosdendo@zdnet.com'),
(494, 'Lurleen', 'Leabeater', 'lleabeaterdp@altervista.org'),
(495, 'Marcella', 'MacAnellye', 'mmacanellyedq@homestead.com'),
(496, 'Krista', 'Fender', 'kfenderdr@spiegel.de'),
(497, 'Dorry', 'Crawcour', 'dcrawcourds@cloudflare.com'),
(498, 'Katya', 'Monahan', 'kmonahandt@gnu.org'),
(499, 'Guy', 'Kleen', 'gkleendu@aboutads.info'),
(500, 'Joelle', 'Amorine', 'jamorinedv@wikimedia.org');
-- --------------------------------------------------------
--
-- Table structure for table `teachers`
--
CREATE TABLE `teachers` (
`id` int(11) NOT NULL,
`firstname` varchar(45) NOT NULL,
`lastname` varchar(45) NOT NULL,
`email` varchar(45) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `teachers`
--
INSERT INTO `teachers` (`id`, `firstname`, `lastname`, `email`) VALUES
(1, 'Lucina', 'Humpage', 'lhumpage0@surveymonkey.com'),
(2, 'Scarlet', 'Ledwich', 'sledwich1@a8.net'),
(3, 'Helli', 'Wayman', 'hwayman2@answers.com'),
(4, 'Cissy', 'Dyerson', 'cdyerson3@imdb.com'),
(5, 'Anna-maria', 'Stollsteiner', 'astollsteiner4@lycos.com'),
(6, 'Tyne', 'Jonathon', 'tjonathon5@google.pl'),
(7, 'Gill', 'Karolewski', 'gkarolewski6@e-recht24.de'),
(8, 'Townsend', 'Rentoll', 'trentoll7@aboutads.info'),
(9, 'Davita', 'Echallie', 'dechallie8@networkadvertising.org'),
(10, 'Belle', 'Creavin', 'bcreavin9@sakura.ne.jp'),
(11, 'Ludvig', 'Van Dalen', 'lvandalena@t.co'),
(12, 'Hirsch', 'Cheales', 'hchealesb@surveymonkey.com'),
(13, 'Angel', 'Lombardo', 'alombardoc@theglobeandmail.com'),
(14, 'Garreth', 'Quant', 'gquantd@google.com'),
(15, 'Dorry', 'Putman', 'dputmane@china.com.cn'),
(16, 'Georgette', 'Nesterov', 'gnesterovf@cornell.edu'),
(17, 'Josiah', 'Olufsen', 'jolufseng@nydailynews.com'),
(18, 'Nanci', 'Dungate', 'ndungateh@newsvine.com'),
(19, 'Tildy', 'Ramelot', 'trameloti@multiply.com'),
(20, 'Virgilio', 'Bemlott', 'vbemlottj@uol.com.br'),
(21, 'Russ', 'Bennedick', 'rbennedickk@ehow.com'),
(22, 'Andy', 'Piatti', 'apiattil@pbs.org'),
(23, 'Caleb', 'Petcher', 'cpetcherm@mapy.cz'),
(24, 'Genna', 'Verrier', 'gverriern@npr.org'),
(25, 'Gamaliel', 'Van Bruggen', 'gvanbruggeno@washingtonpost.com'),
(26, 'Rochette', 'Lambourne', 'rlambournep@etsy.com'),
(27, 'Oby', 'Birdis', 'obirdisq@clickbank.net'),
(28, 'Cherianne', 'Arens', 'carensr@auda.org.au'),
(29, 'Elora', 'Stebbins', 'estebbinss@constantcontact.com'),
(30, 'Sutherland', 'Calladine', 'scalladinet@networksolutions.com');
-- --------------------------------------------------------
--
-- Table structure for table `teaches`
--
CREATE TABLE `teaches` (
`id` int(11) NOT NULL,
`fk_teacher` int(11) NOT NULL,
`fk_class` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `teaches`
--
INSERT INTO `teaches` (`id`, `fk_teacher`, `fk_class`) VALUES
(1, 1, 3),
(2, 2, 1),
(3, 3, 21),
(4, 4, 18),
(5, 5, 22),
(6, 6, 16),
(7, 7, 10),
(8, 8, 17),
(9, 9, 5),
(10, 10, 22),
(11, 11, 10),
(12, 12, 12),
(13, 13, 6),
(14, 14, 10),
(15, 15, 11),
(16, 16, 9),
(17, 17, 1),
(18, 18, 20),
(19, 19, 6),
(20, 20, 23),
(21, 21, 14),
(22, 22, 19),
(23, 23, 13),
(24, 24, 1),
(25, 25, 2),
(26, 26, 5),
(27, 27, 18),
(28, 28, 7),
(29, 29, 9),
(30, 30, 16),
(31, 1, 22),
(32, 2, 13),
(33, 3, 12),
(34, 4, 21),
(35, 5, 15),
(36, 6, 19),
(37, 7, 7),
(38, 8, 23),
(39, 9, 17),
(40, 10, 3),
(41, 11, 13),
(42, 12, 23),
(43, 13, 8),
(44, 14, 22),
(45, 15, 12),
(46, 16, 19),
(47, 17, 11),
(48, 18, 24),
(49, 19, 21),
(50, 20, 2),
(51, 21, 11),
(52, 22, 24),
(53, 23, 15),
(54, 24, 20),
(55, 25, 2),
(56, 26, 4),
(57, 27, 20),
(58, 28, 17),
(59, 29, 15),
(60, 30, 4),
(61, 1, 6),
(62, 2, 16),
(63, 3, 16),
(64, 4, 4),
(65, 5, 8),
(66, 6, 14),
(67, 7, 17),
(68, 8, 8),
(69, 9, 9),
(70, 10, 7),
(71, 11, 14),
(72, 12, 5),
(73, 13, 3),
(74, 14, 18),
(75, 15, 24);
--
-- Indexes for dumped tables
--
--
-- Indexes for table `attends`
--
ALTER TABLE `attends`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `fk_student` (`fk_student`),
ADD KEY `fk_class` (`fk_class`);
--
-- Indexes for table `classes`
--
ALTER TABLE `classes`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `name` (`name`);
--
-- Indexes for table `students`
--
ALTER TABLE `students`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `teachers`
--
ALTER TABLE `teachers`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `teaches`
--
ALTER TABLE `teaches`
ADD PRIMARY KEY (`id`),
ADD KEY `fk_teacher` (`fk_teacher`),
ADD KEY `fk_class` (`fk_class`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `attends`
--
ALTER TABLE `attends`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=501;
--
-- AUTO_INCREMENT for table `classes`
--
ALTER TABLE `classes`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=25;
--
-- AUTO_INCREMENT for table `students`
--
ALTER TABLE `students`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=501;
--
-- AUTO_INCREMENT for table `teachers`
--
ALTER TABLE `teachers`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=101;
--
-- AUTO_INCREMENT for table `teaches`
--
ALTER TABLE `teaches`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=76;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `attends`
--
ALTER TABLE `attends`
ADD CONSTRAINT `attends_ibfk_1` FOREIGN KEY (`fk_student`) REFERENCES `students` (`id`),
ADD CONSTRAINT `attends_ibfk_2` FOREIGN KEY (`fk_class`) REFERENCES `classes` (`id`);
--
-- Constraints for table `teaches`
--
ALTER TABLE `teaches`
ADD CONSTRAINT `teaches_ibfk_1` FOREIGN KEY (`fk_teacher`) REFERENCES `teachers` (`id`),
ADD CONSTRAINT `teaches_ibfk_2` FOREIGN KEY (`fk_class`) REFERENCES `classes` (`id`);
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
| true |
3f28d35404497840f99a9a5e87c5f27d360f5b8b | SQL | advaitpatel/CSC-453-Database-Technology | /orac_allfiles/oracle_sql/scripts/ch08/fig8-19a.sql | UTF-8 | 271 | 2.765625 | 3 | [] | no_license | SELECT invoice_number, terms_id,
CASE terms_id
WHEN 1 THEN 'Net due 10 days'
WHEN 2 THEN 'Net due 20 days'
WHEN 3 THEN 'Net due 30 days'
WHEN 4 THEN 'Net due 60 days'
WHEN 5 THEN 'Net due 90 days'
END AS terms
FROM invoices | true |
16972238f8046a27e3b00c181b9617bd53ce292b | SQL | UAMS-DBMI/PosdaTools | /posda/posdatools/queries/sql/ClassicPublicDownloadPath.sql | UTF-8 | 571 | 3.390625 | 3 | [
"Apache-2.0"
] | permissive | -- Name: ClassicPublicDownloadPath
-- Schema: public
-- Columns: ['file_path']
-- Args: ['sop_instance_uid']
-- Tags: ['public']
-- Description: Get the 'classic download file path' for a file based on sop_instance_uid
--
select concat(gs.project,'/',
gs.patient_id,'/',
s.study_instance_uid,'/',
gs.series_instance_uid, '/') as file_path
from study s,
general_series gs,
general_image gi
where gs.study_pk_id = s.study_pk_id
and gs.general_series_pk_id = gi.general_series_pk_id
and gi.sop_instance_uid=? | true |
f5e45b7af2de6c03b33895459172205903ff14b3 | SQL | chudali1/jachaubachau | /sql/v1.sql | UTF-8 | 802 | 3.328125 | 3 | [] | no_license | create table symptoms(
s_id int primary key auto_increment ,
s_name varchar(100) not null);
--------------------------------------------------------------------------------------------------------------------
create table desease(
d_id int primary key auto_increment,
d_name varchar(100) not null);
d
----------------------------------------------------------------------------------------------------------------------
create table symptoms_deseases(
id int primary key auto_increment,
sid int ,
did int );
------------------------------------------------------------------------------------------------------------------------
alter table symptoms_deseases add foreign key (sid) references symptoms(s_id);
alter table symptoms_deseases add foreign key (did) references desease(d_id);
| true |
bb33ac0fe1493d9030c2bd6f15ee94bd51a0f0e8 | SQL | andrenq/host_agent | /solution.sql | UTF-8 | 1,016 | 4.3125 | 4 | [] | no_license | -- First exercise
SELECT cpu_number,
id,
total_mem
FROM host_info
ORDER BY 1,
2,
3 DESC;
-- SECOND exercise
SELECT host_id,
hostname,
total_memory,
Round(used_memory_percentage, 0)
FROM (SELECT host_id,
hostname,
total_mem / 1000
AS TOTAL_MEMORY,
Avg(( 1 - ( memory_free / ( total_mem / 1000.0 ) ) ) * 100)
over(
ORDER BY u."timestamp" DESC ROWS BETWEEN 5 preceding AND
CURRENT ROW
) AS
used_memory_percentage,
( u."timestamp" ),
Rank()
over(
PARTITION BY host_id
ORDER BY u."timestamp" DESC)
AS rank
FROM host_usage AS u
join host_info AS i
ON i.id = u.host_id
ORDER BY 1,
"timestamp" DESC) AS t
WHERE rank = 1 ;
| true |
1a729db3477b9a33c1517c969f241e8566b2484a | SQL | xuegaodanjuan/note | /target/classes/schema.sql | UTF-8 | 502 | 2.703125 | 3 | [] | no_license | create table User
(
id int(2147483647),
username varchar(20) unique not null,
password varchar(20) not null,
firstName varchar(30) not null,
lastName varchar(30) not null,
email varchar(30) not null
);
create table NoteBook (
id int(2147483647),
name varchar(50) not null,
message varchar(50) not null,
createdTime timestamp not null
);
create table Note (
id int(2147483647),
notebook varchar(50),
message varchar(1000) not null,
createdTime timestamp not null
);
| true |
fa6033229099ad1e6e885f127485db9d003948ec | SQL | UCLALibrary/sql-scripts | /Voyager/Acquisitions/Report of current print continuation POs RR-583.sql | UTF-8 | 2,831 | 3.625 | 4 | [] | no_license | select distinct
po.po_number
, f.ledger_name
, vger_support.unifix(title) as title
, v.vendor_name
, v.vendor_code
, f.fund_code
, f.fund_name
, ( select
i.invoice_number
from invoice i
inner join invoice_line_item ili on i.invoice_id = ili.invoice_id
where ili.line_item_id = li.line_item_id
and i.invoice_status_date = (select max(invoice_status_date) from invoice where invoice_id in (select invoice_id from invoice_line_item where line_item_id = ili.line_item_id))
and rownum < 2
) as latest_inv
, ( select
i.invoice_date
from invoice i
inner join invoice_line_item ili on i.invoice_id = ili.invoice_id
where ili.line_item_id = li.line_item_id
and i.invoice_status_date = (select max(invoice_status_date) from invoice where invoice_id in (select invoice_id from invoice_line_item where line_item_id = ili.line_item_id))
and rownum < 2
) as latest_inv_date
, (select
ili.piece_identifier
from invoice_line_item ili
--inner join line_item li on ili.line_item_id = li.line_item_id
inner join invoice i on ili.invoice_id = i.invoice_id
where ili.line_item_id = li.line_item_id
and i.invoice_status_date = (select max(invoice_status_date) from invoice where invoice_id in (select invoice_id from invoice_line_item where line_item_id = ili.line_item_id))
and rownum < 2
) as latest_piece_id
--, l.location_name
, bt.bib_id
--, mm.mfhd_id
from purchase_order po
INNER JOIN po_type pt ON po.po_type = pt.po_type
INNER JOIN PO_STATUS pos ON po.PO_STATUS = pos.PO_STATUS
INNER JOIN line_item li ON po.po_id = li.po_id
INNER JOIN line_item_copy_status lics ON li.line_item_id = lics.line_item_id
INNER JOIN LINE_ITEM_FUNDS lif ON lics.COPY_ID = lif.COPY_ID
INNER JOIN ucla_fundledger_vw f ON lif.FUND_ID = f.FUND_ID
inner join BIB_TEXT bt ON li.BIB_ID = bt.BIB_ID
INNER JOIN BIB_MFHD bmf ON bt.BIB_ID = bmf.BIB_ID
INNER JOIN MFHD_MASTER mm ON bmf.MFHD_ID = mm.MFHD_ID
inner join location l on mm.location_id = l.location_id
inner join vendor v ON v.vendor_id = po.vendor_id
WHERE pt.po_type_desc = 'Continuation'
and (pos.po_status_desc = 'Approved/Sent' or pos.po_status_desc = 'Received Partial')
and (f.ledger_name like '%20-21%'
and f.ledger_name not like 'EAST ASIAN%'
and f.ledger_name not like 'LAW DIFFERENTIAL%'
and f.ledger_name not like 'MUSIC%'
and f.ledger_name not like 'SPECIAL COLLECTIONS%')
and (po.po_number NOT LIKE 'DCS%'
and po.po_number NOT LIKE 'EAL%'
and po.po_number NOT LIKE 'MUS%'
and po.po_number NOT LIKE 'LAW%')
and l.location_name not like '%Internet%'
and l.location_code not like 'sr%'
-- and latest_inv <> ''
order by --latest_inv
vger_support.unifix(title)
| true |
723043a0b59a47c8130f7098d3262a60ee6216ae | SQL | Storm-Visser/Testen | /gerecht.sql | UTF-8 | 3,135 | 3.25 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 06, 2021 at 01:57 PM
-- Server version: 10.4.6-MariaDB
-- PHP Version: 7.3.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `gerecht`
--
-- --------------------------------------------------------
--
-- Table structure for table `boodschappenlijst`
--
CREATE TABLE `boodschappenlijst` (
`ID` int(8) NOT NULL,
`product` varchar(69) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `boodschappenlijst`
--
INSERT INTO `boodschappenlijst` (`ID`, `product`) VALUES
(1, 'ei'),
(2, 'boter'),
(3, 'kaas'),
(4, 'ei'),
(5, 'ei'),
(6, 'ei'),
(7, 'ei'),
(8, 'ei'),
(9, 'boter'),
(10, 'kaas'),
(11, 'ketchup');
-- --------------------------------------------------------
--
-- Table structure for table `gerecht`
--
CREATE TABLE `gerecht` (
`naam` varchar(69) NOT NULL,
`product1` varchar(69) DEFAULT NULL,
`product2` varchar(69) DEFAULT NULL,
`product3` varchar(69) DEFAULT NULL,
`product4` varchar(69) DEFAULT NULL,
`product5` varchar(69) DEFAULT NULL,
`product6` varchar(69) DEFAULT NULL,
`product7` varchar(69) DEFAULT NULL,
`product8` varchar(69) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `gerecht`
--
INSERT INTO `gerecht` (`naam`, `product1`, `product2`, `product3`, `product4`, `product5`, `product6`, `product7`, `product8`) VALUES
('Nasi', 'Kipfilethaasjes', 'Wok Olie', 'Sambal Oelek', 'Nasi-Bamigroente', 'Taugé', 'Ketjap Asin', 'kant-en-klare-satésaus', 'Chinese Eiermie');
-- --------------------------------------------------------
--
-- Table structure for table `producten`
--
CREATE TABLE `producten` (
`ID` int(11) NOT NULL,
`product` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `producten`
--
INSERT INTO `producten` (`ID`, `product`) VALUES
(1, 'ei'),
(2, 'boter'),
(3, 'kaas'),
(4, 'ketchup');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `boodschappenlijst`
--
ALTER TABLE `boodschappenlijst`
ADD PRIMARY KEY (`ID`);
--
-- Indexes for table `gerecht`
--
ALTER TABLE `gerecht`
ADD PRIMARY KEY (`naam`);
--
-- Indexes for table `producten`
--
ALTER TABLE `producten`
ADD PRIMARY KEY (`ID`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `boodschappenlijst`
--
ALTER TABLE `boodschappenlijst`
MODIFY `ID` int(8) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;
--
-- AUTO_INCREMENT for table `producten`
--
ALTER TABLE `producten`
MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
| true |
f6c95266d9049d03d5e7fb6bf94af7215de7c53d | SQL | CUBRID/cubrid-testcases | /sql/_13_issues/_12_2h/cases/bug_bts_8226.sql | UTF-8 | 862 | 3.140625 | 3 | [
"BSD-3-Clause"
] | permissive | set system parameters 'create_table_reuseoid=no';
--TEST: [ErrorEnhance] Error message is not clear when creating a view with invalid column name.
create table aa(a int);
insert into aa values(1), (2), (3);
--create view
create view v as select aa a from aa;
show create view v;
select * from v;
select a.a from v order by 1;
--create view again
create view v1 as select v a from v;
show create view v1;
select * from v1;
select a.a.a from v1 order by 1;
--create view again
create view v2 as select v1 a from v1;
show create view v2;
select * from v2;
select a.a.a.a from v2 order by 1;
--create view again
create view v3 as select v2 a from v2;
show create view v3;
select * from v3;
select a.a.a.a.a from v3 order by 1;
drop table aa;
drop view v;
drop view v1;
drop view v2;
drop view v3;
set system parameters 'create_table_reuseoid=yes';
| true |
8b813004d10aaedcf78557ebe17cc4dd12280b80 | SQL | Sywooch/question-list | /point_enter/auth_a_i.sql | UTF-8 | 5,285 | 2.828125 | 3 | [] | no_license | -- --------------------------------------------------------
-- Хост: 127.0.0.1
-- Версия сервера: 5.5.38-log - MySQL Community Server (GPL)
-- ОС Сервера: Win32
-- HeidiSQL Версия: 8.3.0.4694
-- --------------------------------------------------------
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-- Дамп структуры для таблица v2_unicnews.auth_item
CREATE TABLE IF NOT EXISTS `auth_item` (
`name` varchar(64) NOT NULL,
`type` int(11) NOT NULL,
`description` text,
`rule_name` varchar(64) DEFAULT NULL,
`data` text,
`created_at` int(11) DEFAULT NULL,
`updated_at` int(11) DEFAULT NULL,
PRIMARY KEY (`name`),
KEY `rule_name` (`rule_name`),
KEY `type` (`type`),
CONSTRAINT `auth_item_ibfk_1` FOREIGN KEY (`rule_name`) REFERENCES `auth_rule` (`name`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Дамп данных таблицы v2_unicnews.auth_item: ~24 rows (приблизительно)
/*!40000 ALTER TABLE `auth_item` DISABLE KEYS */;
INSERT INTO `auth_item` (`name`, `type`, `description`, `rule_name`, `data`, `created_at`, `updated_at`) VALUES
('admin', 1, NULL, NULL, NULL, 1433255707, 1433255707),
('author', 1, NULL, NULL, NULL, 1433255707, 1433255707),
('create', 2, NULL, NULL, NULL, 1433255707, 1433255707),
('createNews', 2, NULL, NULL, NULL, 1433255707, 1433255707),
('createQuestion', 2, NULL, NULL, NULL, 1433255707, 1433255707),
('delete', 2, NULL, NULL, NULL, 1433255707, 1433255707),
('deleteNews', 2, NULL, NULL, NULL, 1433255707, 1433255707),
('deleteQuestion', 2, NULL, 'milestone', NULL, 1433255707, 1433255707),
('deleteQuestionOwn', 2, NULL, 'userOwn', NULL, 1433255707, 1433255707),
('management', 2, NULL, NULL, NULL, 1433255707, 1433255707),
('moderator', 1, NULL, NULL, NULL, 1433255707, 1433255707),
('super_moderator', 1, NULL, NULL, NULL, 1433255707, 1433255707),
('update', 2, NULL, NULL, NULL, 1433255707, 1433255707),
('updateNews', 2, NULL, NULL, NULL, 1433255707, 1433255707),
('updateNewsModerator', 2, NULL, 'statusAllowUpdateNews', NULL, 1433255707, 1433255707),
('updateNewsOwn', 2, NULL, 'userOwn', NULL, 1433255707, 1433255707),
('updateQuestion', 2, NULL, 'milestone', NULL, 1433255707, 1433255707),
('updateQuestionOwn', 2, NULL, 'userOwn', NULL, 1433255707, 1433255707),
('view', 2, NULL, NULL, NULL, 1433255707, 1433255707),
('viewNews', 2, NULL, NULL, NULL, 1433255707, 1433255707),
('viewNewsModerator', 2, NULL, 'statusAllowUpdateNews', NULL, 1433255707, 1433255707),
('viewNewsOwn', 2, NULL, 'userOwn', NULL, 1433255707, 1433255707),
('viewQuestion', 2, NULL, NULL, NULL, 1433255707, 1433255707),
('viewQuestionOwn', 2, NULL, 'userOwn', NULL, 1433255707, 1433255707);
/*!40000 ALTER TABLE `auth_item` ENABLE KEYS */;
-- Дамп структуры для таблица v2_unicnews.auth_item_child
CREATE TABLE IF NOT EXISTS `auth_item_child` (
`parent` varchar(64) NOT NULL,
`child` varchar(64) NOT NULL,
PRIMARY KEY (`parent`,`child`),
KEY `child` (`child`),
CONSTRAINT `auth_item_child_ibfk_1` FOREIGN KEY (`parent`) REFERENCES `auth_item` (`name`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `auth_item_child_ibfk_2` FOREIGN KEY (`child`) REFERENCES `auth_item` (`name`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Дамп данных таблицы v2_unicnews.auth_item_child: ~32 rows (приблизительно)
/*!40000 ALTER TABLE `auth_item_child` DISABLE KEYS */;
INSERT INTO `auth_item_child` (`parent`, `child`) VALUES
('moderator', 'author'),
('createNews', 'create'),
('createQuestion', 'create'),
('author', 'createNews'),
('author', 'createQuestion'),
('admin', 'delete'),
('deleteNews', 'delete'),
('deleteQuestion', 'delete'),
('admin', 'deleteQuestion'),
('deleteQuestionOwn', 'deleteQuestion'),
('author', 'deleteQuestionOwn'),
('admin', 'management'),
('delete', 'management'),
('update', 'management'),
('admin', 'moderator'),
('super_moderator', 'moderator'),
('updateNews', 'update'),
('updateQuestion', 'update'),
('updateNewsModerator', 'updateNews'),
('updateNewsOwn', 'updateNews'),
('moderator', 'updateNewsModerator'),
('author', 'updateNewsOwn'),
('admin', 'updateQuestion'),
('updateQuestionOwn', 'updateQuestion'),
('author', 'updateQuestionOwn'),
('admin', 'view'),
('viewNews', 'view'),
('viewQuestion', 'view'),
('viewNewsModerator', 'viewNews'),
('viewNewsOwn', 'viewNews'),
('moderator', 'viewNewsModerator'),
('author', 'viewNewsOwn'),
('viewQuestionOwn', 'viewQuestion'),
('author', 'viewQuestionOwn');
/*!40000 ALTER TABLE `auth_item_child` ENABLE KEYS */;
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
| true |
f830c075bf27259b23bc18eb98f12b19abff2066 | SQL | allwaysoft/fun | /Clients/MBTA/SQL/View_Scripts/COST_TO_COMPLETE_CADVW_NEW.sql | UTF-8 | 4,333 | 3.578125 | 4 | [] | no_license | /*
CREATE OR REPLACE FORCE VIEW DA1.COST_TO_COMPLETE_CADVW (CTC_COMP_CODE, CTC_JOB_CODE, CTC_PHS_CODE1
, CTC_PHS_CODE2, CTC_CAT_CODE, CTC_PHS_NAME, CTC_POST_DATE
, CTC_COMMITED_AMT, CTC_WM_CODE)
AS
SELECT JCDT_COMP_CODE
, JCDT_JOB_CODE
, CASE
WHEN JCDT_PHS_CODE LIKE '%-%'
THEN SUBSTR(JCDT_PHS_CODE, 1, INSTR(JCDT_PHS_CODE,'-')-1)
ELSE JCDT_PHS_CODE
END CASE
, CASE
WHEN JCDT_PHS_CODE LIKE '%-%'
THEN SUBSTR(JCDT_PHS_CODE, INSTR(JCDT_PHS_CODE,'-')+1, LENGTH(JCDT_PHS_CODE))
ELSE
NULL
END CASE
, JCDT_CAT_CODE
, JHP_NAME
, TRUNC(JCDT_POST_DATE)
, LTRIM(TO_CHAR(JCDT_AMT,'9999999990.00'))
, JCAT_WM_CODE
FROM DA.JCDETAIL DET,
DA.JCJOBCAT CAT,
DA.JCJOBHPHS PHS
WHERE 1=1
-- JCDT_COMP_CODE = :P_COMPANY_CODE
AND CASE
WHEN JCDT_TYPE_CODE = 'O'
-- AND TRUNC(JCDT_POST_DATE) <= TO_DATE (:P_POST_DATE,'MM-DD-YY')
THEN 'A'
WHEN JCDT_TYPE_CODE = 'C'
-- AND TRUNC(JCDT_POST_DATE) <= TO_DATE (:P_POST_DATE,'MM-DD-YY')
AND JCDT_SRC_COMM_CODE IS NULL
THEN 'B'
END IN ('A','B')
AND DET.JCDT_JOB_CODE >= '90000'
AND DET.JCDT_COMP_CODE = PHS.JHP_COMP_CODE
AND DET.JCDT_JOB_CODE = PHS.JHP_JOB_CODE
AND DET.JCDT_PHS_CODE = PHS.JHP_CODE
AND CAT.JCAT_JOB_CODE = DET.JCDT_JOB_CODE
AND CAT.JCAT_COMP_CODE = DET.JCDT_COMP_CODE
AND CAT.JCAT_PHS_CODE = DET.JCDT_PHS_CODE
AND CAT.JCAT_CODE = DET.JCDT_CAT_CODE
COMMENT ON VIEW DA1.COST_TO_COMPLETE_CADVW IS 'COST TO COMPLETE REPORT';
--group by jcdt_comp_code
-- , jcdt_job_code
--, replace(jcdt_phs_code,'-',',')
--, '"'||jcdt_cat_code||'"'
--, '"'||jhp_name||'"'
--, '"'||to_char(to_date (:p_post_date,'mm-dd-yy'),'mm-dd-yyyy')||'"'
--, cat.jcat_wm_code
--, '0.00'
--, ''
*/
CREATE OR REPLACE FORCE VIEW DA1.COST_TO_COMPLETE_CADVW (CTC_COMP_CODE, CTC_JOB_CODE_NAME
, CTC_PHS_CODE1, CTC_PHS_CODE2, CTC_CAT_CODE
, CTC_PHS_NAME, CTC_POST_DATE, CTC_COMMITED_AMT
, CTC_WM_CODE, CTC_BUDG_AMT)
AS
SELECT JCAT_COMP_CODE
, JCAT_JOB_CODE ||' - '|| JOB_NAME
, CASE
WHEN JCAT_PHS_CODE LIKE '%-%'
THEN SUBSTR(JCAT_PHS_CODE, 1, INSTR(JCAT_PHS_CODE,'-')-1)
ELSE JCAT_PHS_CODE
END CASE
, CASE
WHEN JCAT_PHS_CODE LIKE '%-%'
THEN SUBSTR(JCAT_PHS_CODE, INSTR(JCAT_PHS_CODE,'-')+1, LENGTH(JCAT_PHS_CODE))
ELSE
NULL
END CASE
, JCAT_CODE
, JHP_NAME
, NVL(TRUNC(JCDT_POST_DATE), TO_DATE('01-JAN-1900', 'DD-MON-YYYY'))
, NVL(DECODE(DET.JCDT_TYPE_CODE, 'O', JCDT_AMT
, 'C', DECODE(DET.JCDT_SRC_COMM_CODE, NULL, JCDT_AMT, 0)
, 0
)
, 0
)
, JCAT_WM_CODE
, nvl(JCAT_BUDG_AMT,0)
FROM DA.JCDETAIL DET,
DA.JCJOBHPHS PHS,
DA.JCJOBCAT CAT,
DA.JCJOB_TABLE JOB
WHERE 1=1
/*
-- JCDT_COMP_CODE = :P_COMPANY_CODE
AND CASE
WHEN DET.JCDT_TYPE_CODE(+) = 'O'
-- AND TRUNC(JCDT_POST_DATE) <= TO_DATE (:P_POST_DATE,'MM-DD-YY')
THEN 'A'
WHEN DET.JCDT_TYPE_CODE(+) = 'C'
-- AND TRUNC(JCDT_POST_DATE) <= TO_DATE (:P_POST_DATE,'MM-DD-YY')
AND DET.JCDT_SRC_COMM_CODE IS NULL
THEN 'B'
WHEN DET.JCDT_TYPE_CODE IS NULL
THEN 'C'
END IN ('A','B','C')
*/
AND CAT.JCAT_JOB_CODE >= '90002'
AND CAT.JCAT_COMP_CODE NOT IN ('ZZ')
AND CAT.JCAT_COMP_CODE = PHS.JHP_COMP_CODE
AND CAT.JCAT_JOB_CODE = PHS.JHP_JOB_CODE
AND CAT.JCAT_PHS_CODE = PHS.JHP_CODE
AND DET.JCDT_JOB_CODE(+) = CAT.JCAT_JOB_CODE
AND DET.JCDT_COMP_CODE(+) = CAT.JCAT_COMP_CODE
AND DET.JCDT_PHS_CODE(+) = CAT.JCAT_PHS_CODE
AND DET.JCDT_CAT_CODE(+) = CAT.JCAT_CODE
AND CAT.JCAT_JOB_CODE = JOB.JOB_CODE
AND CAT.JCAT_COMP_CODE = JOB.JOB_COMP_CODE
--AND CAT.JCAT_COMP_CODE = '01'
--AND CAT.JCAT_JOB_CODE = '90930'
select sysdate from dual
select * from DA1.COST_TO_COMPLETE_CADVW
select * from DA.JCDETAIL DET | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.