sql
stringlengths 6
1.05M
|
|---|
<filename>db/schema.sql
DROP DATABASE IF EXISTS employee_tracker_db;
CREATE DATABASE employee_tracker_db;
USE employee_tracker_db;
CREATE TABLE department (
id INT NOT NULL AUTO_INCREMENT,
dept_name VARCHAR(30) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE roles (
id INT NOT NULL AUTO_INCREMENT,
title VARCHAR(30) NOT NULL,
salary DECIMAL(15, 2) NOT NULL,
dept_id INT,
FOREIGN KEY(dept_id) REFERENCES department(id),
PRIMARY KEY (id)
);
CREATE TABLE employee (
id INT NOT NULL AUTO_INCREMENT,
first_name VARCHAR(30) NOT NULL,
last_name VARCHAR(30) NOT NULL,
role_id INT,
FOREIGN KEY(role_id) REFERENCES roles(id),
manager_id INT,
FOREIGN KEY(manager_id) REFERENCES employee(id),
PRIMARY KEY(id)
)
|
<reponame>cincuranet/FirebirdDbComparer
create table t (i int);
create function new_ee_function(in1 integer)
returns integer
external name 'FooBar!new_ee_function'
engine FbNetExternalEngine;
set term ~;
create trigger trig for t
before insert
as
begin
new.i = new_ee_function(new.i);
end~
set term ;~
|
with covid_cases as (
SELECT date, country_name, subregion1_name, sum(coalesce(new_confirmed, 0)) as new_confirmed, sum(coalesce(new_deceased,0)) as new_deceased, sum(coalesce(new_recovered,0)) as new_recovered, sum(coalesce(new_tested,0)) as new_tested
FROM `dop_sandbox_us.stg_covid19`
{% if is_incremental() %}
where date >= DATE("{{ ds }}")
{% endif %}
GROUP BY date, country_name, subregion1_name
)
select * from covid_cases
|
-- rowid.test
--
-- execsql {
-- SELECT * FROM t3 WHERE a>100.5 AND a<200.5
-- }
SELECT * FROM t3 WHERE a>100.5 AND a<200.5
|
<reponame>Zarun1/Evolve
CREATE TABLE A1 (
val INT
) engine=InnoDB;
|
-- creates table
-- creates force_name table
CREATE TABLE IF NOT EXISTS force_name (
id INT,
name VARCHAR(256) NOT NULL
);
|
<filename>core/src/test/resources/sql/test/list.sql
-- full
SELECT A.*
FROM USER A
WHERE 1 = 1
AND A.first_name LIKE '%' -- $ lib.replace(@Line,'%',@{firstName})
AND A.birthday BETWEEN '1990-1-1' AND '2020-12-30' -- $ lib.replace(@Line,'1990-1-1',@{beginDate},'2020-12-30',@{endDate})
AND A.score > 10.5 -- $ lib.replace(@Line,10.5,@{score})
GROUP BY A.rank,
A.first_name,
A.last_name
ORDER BY A.score
-- @ function
|
<reponame>mudbri/Faure
------------------------------------------------------------
-- TOPOLOGY MODIFICATION FUNCTIONS
------------------------------------------------------------
/* Add a new link in the network provider
* NEW.sid: switch end of the link
* NEW.nid: other end of the link (host or switch)
* NEW.isHost: if the node connected to the switch is a host
*/
CREATE OR REPLACE FUNCTION add_link_fun ()
RETURNS TRIGGER
AS $$
import os
import sys
if "PYTHONPATH" in os.environ:
sys.path = os.environ["PYTHONPATH"].split(":") + sys.path
sys.path.append("/home/vagrant/Faure_clones/Faure")
from ravel.network import AddLinkMessage, NetworkProvider
from ravel.messaging import MsgQueueSender
sid = TD["new"]["sid"]
nid = TD["new"]["nid"]
isHost = TD["new"]["ishost"]
isActive = TD["new"]["ishost"]
msg = AddLinkMessage(sid, nid, isHost, isActive)
sender = MsgQueueSender(NetworkProvider.QueueId)
sender.send(msg)
return None;
$$ LANGUAGE 'plpython3u' VOLATILE SECURITY DEFINER;
/* Add link trigger */
CREATE TRIGGER add_link_trigger
AFTER INSERT ON tp
FOR EACH ROW
EXECUTE PROCEDURE add_link_fun();
/* Remove a new link from the network provider
* OLD.sid: switch end of the link
* OLD.nid: other end of the link (host or switch)
*/
CREATE OR REPLACE FUNCTION del_link_fun ()
RETURNS TRIGGER
AS $$
import os
import sys
if "PYTHONPATH" in os.environ:
sys.path = os.environ["PYTHONPATH"].split(":") + sys.path
sys.path.append("/home/vagrant/Faure_clones/Faure")
from ravel.network import RemoveLinkMessage, NetworkProvider
from ravel.messaging import MsgQueueSender
sid = TD["old"]["sid"]
nid = TD["old"]["nid"]
msg = RemoveLinkMessage(sid, nid)
sender = MsgQueueSender(NetworkProvider.QueueId)
sender.send(msg)
return None;
$$ LANGUAGE 'plpython3u' VOLATILE SECURITY DEFINER;
/* Delete link trigger */
CREATE TRIGGER del_link_trigger
AFTER DELETE ON tp
FOR EACH ROW
EXECUTE PROCEDURE del_link_fun();
/* Add a new switch in the network provider
* NEW.sid: switch id
* NEW.name: switch name (in Mininet)
* NEW.dpid: datapath id
* NEW.ip: switch IP address (if a physical, remote switch)
* NEW.mac: switch MAC address
*/
CREATE OR REPLACE FUNCTION add_switch_fun ()
RETURNS TRIGGER
AS $$
import os
import sys
if "PYTHONPATH" in os.environ:
sys.path = os.environ["PYTHONPATH"].split(":") + sys.path
sys.path.append("/home/vagrant/Faure_clones/Faure")
from ravel.network import AddSwitchMessage, NetworkProvider
from ravel.messaging import MsgQueueSender
sid = TD["new"]["sid"]
name = TD["new"]["name"]
dpid = TD["new"]["dpid"]
ip = TD["new"]["ip"]
mac = TD["new"]["mac"]
msg = AddSwitchMessage(sid, name, dpid, ip, mac)
sender = MsgQueueSender(NetworkProvider.QueueId)
sender.send(msg)
return None;
$$ LANGUAGE 'plpython3u' VOLATILE SECURITY DEFINER;
/* Add switch trigger */
CREATE TRIGGER add_switch_trigger
AFTER INSERT ON switches
FOR EACH ROW
EXECUTE PROCEDURE add_switch_fun();
/* Remove a new switch from the network provider
* OLD.sid: switch id
* OLD.name: switch name (in Mininet)
*/
CREATE OR REPLACE FUNCTION del_switch_fun ()
RETURNS TRIGGER
AS $$
import os
import sys
if "PYTHONPATH" in os.environ:
sys.path = os.environ["PYTHONPATH"].split(":") + sys.path
sys.path.append("/home/vagrant/Faure_clones/Faure")
from ravel.network import RemoveSwitchMessage, NetworkProvider
from ravel.messaging import MsgQueueSender
sid = TD["old"]["sid"]
name = TD["old"]["name"]
msg = RemoveSwitchMessage(sid, name)
sender = MsgQueueSender(NetworkProvider.QueueId)
sender.send(msg)
return None;
$$ LANGUAGE 'plpython3u' VOLATILE SECURITY DEFINER;
/* Delete switch trigger */
CREATE TRIGGER del_switch_trigger
AFTER DELETE ON switches
FOR EACH ROW
EXECUTE PROCEDURE del_switch_fun();
/* Add a new host in the network provider
* NEW.hid: host id
* NEW.ip: host's IP address
* NEW.mac: host's MAC address
* NEW.name: hostname (in Mininet)
*/
CREATE OR REPLACE FUNCTION add_host_fun ()
RETURNS TRIGGER
AS $$
import os
import sys
if "PYTHONPATH" in os.environ:
sys.path = os.environ["PYTHONPATH"].split(":") + sys.path
sys.path.append("/home/vagrant/Faure_clones/Faure")
from ravel.network import AddHostMessage, NetworkProvider
from ravel.messaging import MsgQueueSender
hid = TD["new"]["hid"]
name = TD["new"]["name"]
ip = TD["new"]["ip"]
mac = TD["new"]["mac"]
msg = AddHostMessage(hid, name, ip, mac)
sender = MsgQueueSender(NetworkProvider.QueueId)
sender.send(msg)
return None;
$$ LANGUAGE 'plpython3u' VOLATILE SECURITY DEFINER;
/* Add host trigger */
CREATE TRIGGER add_host_trigger
AFTER INSERT ON hosts
FOR EACH ROW
EXECUTE PROCEDURE add_host_fun();
/* Remove a host from the network provider
* OLD.hid: host id
* OLD.name: hostname (in Mininet)
*/
CREATE OR REPLACE FUNCTION del_host_fun ()
RETURNS TRIGGER
AS $$
import os
import sys
if "PYTHONPATH" in os.environ:
sys.path = os.environ["PYTHONPATH"].split(":") + sys.path
sys.path.append("/home/vagrant/Faure_clones/Faure")
from ravel.network import RemoveHostMessage, NetworkProvider
from ravel.messaging import MsgQueueSender
hid = TD["old"]["hid"]
name = TD["old"]["name"]
msg = RemoveHostMessage(hid, name)
sender = MsgQueueSender(NetworkProvider.QueueId)
sender.send(msg)
return None;
$$ LANGUAGE 'plpython3u' VOLATILE SECURITY DEFINER;
/* Delete host trigger */
CREATE TRIGGER del_host_trigger
AFTER DELETE ON hosts
FOR EACH ROW
EXECUTE PROCEDURE del_host_fun();
|
<gh_stars>0
-- INSERT INTO
-- driver (first_name, last_name, email, phone_number, msr_id, scca_id, work_req, work_skill)
-- VALUES
-- ('Nick', 'Maludy', '<EMAIL>', '1234', 1, 2, NULL, NULL),
-- ('Brad', 'Bishop', '<EMAIL>', '4321', 2, 3, NULL, NULL);
INSERT INTO
organization (name)
VALUES
('CincySCCA');
INSERT INTO
season (name, organization_id)
VALUES
('2021', 1);
INSERT INTO
event (name, date, organization_id, season_id)
VALUES
('T&T #1', '2021-04-10', 1, 1);
|
/****** Object: StoredProcedure [dbo].[FindActiveRequestedRunForDataset] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[FindActiveRequestedRunForDataset]
/****************************************************
**
** Desc:
** Looks for an active requested run for the specified dataset name
**
** Steps backward through the name looking for dashes and underscores, looking
** for active requested runs that match the dataset name portion
**
** If one and only one match is found, returns that requested run's id via the output parameter
** If multiple matches are found, @requestedID will be 0
**
** Return values: 0 if no error; otherwise error code
**
** Auth: mem
** Date: 06/10/2016 mem - Initial version
** 10/19/2020 mem - Rename the instrument group column to RDS_instrument_group
**
*****************************************************/
(
@datasetName varchar(128), -- Dataset name
@experimentID int = 0, -- Optional; include to limit by experiment ID,
@requestID int = 0 output, -- Matched request ID; 0 if no match
@requestInstGroup varchar(128) = '' output, -- Instrument group for the matched request; empty if no match
@requestMatchCount int = 0 output, -- Number of matching candidate run requests
@showDebugMessages tinyint = 0
)
AS
Set XACT_ABORT, nocount on
Set NOCOUNT ON
Declare @myRowCount int
Declare @myError int
Set @myRowCount = 0
Set @myError = 0
---------------------------------------------------
-- Validate the inputs
---------------------------------------------------
Set @datasetName = IsNull(@datasetName, '')
Set @experimentID = IsNull(@experimentID, 0)
Set @showDebugMessages = IsNull(@showDebugMessages, 0)
If @datasetName = ''
RAISERROR ('Dataset name cannot be blank', 11, 10)
---------------------------------------------------
-- Initialize some variables
---------------------------------------------------
Declare @startPos int = 1
Declare @datasetReversed varchar(128) = Reverse(@datasetName)
Declare @datasetNameLength int = Len(@datasetName)
Declare @underscorePos int
Declare @dashPos int
Declare @DatasetPrefix varchar(128)
Declare @requestName varchar(128) = ''
Set @requestID = 0
Set @requestInstGroup = ''
Set @requestMatchCount = 0
---------------------------------------------------
-- Search for active requested runs
---------------------------------------------------
While @startPos > 0
Begin -- <a>
Set @underscorePos = CharIndex('_', @datasetReversed, @startPos)
Set @dashPos = CharIndex('-', @datasetReversed, @startPos)
If @underscorePos > 0
Begin
If @dashPos > 0 AND @dashPos < @underscorePos
Set @startPos = @dashPos
Else
Set @startPos = @underscorePos
End
Else
Begin
Set @startPos = @dashPos
End
If @startPos > 0
Begin -- <b>
Set @DatasetPrefix = Substring(@datasetName, 1, @datasetNameLength - @startPos)
If @showDebugMessages > 0
Print Substring(@datasetName, 1, @datasetNameLength - @startPos)
If @experimentID <= 0
SELECT @requestMatchCount = Count(*),
@requestID = Min(ID)
FROM T_Requested_Run
WHERE RDS_Name LIKE @DatasetPrefix + '%' AND
RDS_Status = 'Active'
Else
SELECT @requestMatchCount = Count(*),
@requestID = Min(ID)
FROM T_Requested_Run
WHERE RDS_Name LIKE @DatasetPrefix + '%' AND
RDS_Status = 'Active' AND
Exp_ID = @experimentID
If @requestMatchCount = 1
Begin
-- Match found; lookup the requested run's instrument group
--
SELECT @requestInstGroup = RDS_instrument_group,
@requestName = RDS_Name
FROM T_Requested_Run
WHERE ID = @requestID
Set @startPos = 0
End
Else
Begin
Set @requestID = 0
Set @startPos = @startPos + 1
End
End -- </b>
End -- </a>
If @showDebugMessages > 0
Begin
If @requestID > 0
SELECT 'Match found ' AS Status,
@datasetName As Dataset,
@requestID AS Request_ID,
@requestName AS Request,
@requestInstGroup AS Instrument_Group
Else
SELECT 'Match not found' AS Status,
@datasetName As Dataset,
@requestMatchCount as Candidate_Count
End
Done:
Return @myError
GO
GRANT VIEW DEFINITION ON [dbo].[FindActiveRequestedRunForDataset] TO [DDL_Viewer] AS [dbo]
GO
|
<filename>sqleditor-other/testscripts/syntax-highlighting-SELECT.sql
-- *******************************
-- * Example SQL snippet to test *
-- * SELECT highlighting *
-- *******************************
SELECT DISTINCT employees AS e FROM EMP_TABLE AS t WHERE e.employed=1 GROUP BY e.lastname HAVING Having-Cause ORDER BY sortattribute ASC DESC;
-- Another syntax color example:
SELECT count(ticket.id) AS Matches, ticket_custom.name, ticket.status FROM engine.ticket INNER JOIN engine.ticket_custom ON ticket.id = ticket_custom.ticket WHERE ticket_custom.name='chapter'
AND ticket_custom.value LIKE '%c%' AND type='New material' AND milestone='1.1.12' AND component NOT LIKE 'internal_engine' AND ticket.status='qa' AND (ticket.status IN (........))
GROUP BY ticket.id, ticket_custom.name;
-- simple inner join
/*
* ---------------------------
* This is a multiline comment
* ---------------------------
*/
select uc.username, ud.street, ud.telephone from userdata ud
inner join usercore uc. on ud.data_id=uc.data_ref ;
-- a delete containing a sub select
DELETE FROM MYSCHEMA.DBP_FIRSTNAMEINDEX where FIRS_USERS_ID in (select USER_ID from MYSCHEMA.DBP_USER where USER_UID_UPPER='albert.tregnaghi')
|
<filename>engine/src/test/resources/org/opencds/cqf/cql/engine/execution/IncludedCodeRefTestCommon.cql<gh_stars>10-100
library IncludedCodeRefTestCommon
codesystem "MedicationRequestCategory": 'http://terminology.hl7.org/CodeSystem/medicationrequest-category'
code "Community": 'community' from "MedicationRequestCategory" display 'Community'
|
<reponame>Twyer/discogs-parser
CREATE INDEX artists_artist_id ON artists(artist_id);
CREATE INDEX artists_name ON artists(name);
CREATE INDEX artists_real_name ON artists(real_name);
CREATE INDEX artists_data_quality ON artists(data_quality);
CREATE INDEX artist_aliases_artist_id ON artist_aliases(artist_id);
CREATE INDEX artist_aliases_alias_id ON artist_aliases(alias_id);
CREATE INDEX artist_members_artist_id ON artist_members(artist_id);
CREATE INDEX artist_members_member_id ON artist_members(member_id);
CREATE INDEX images_artist_id ON images(artist_id);
CREATE INDEX images_label_id ON images(label_id);
CREATE INDEX images_master_id ON images(master_id);
CREATE INDEX images_release_id ON images(release_id);
CREATE INDEX labels_label_id ON labels(label_id);
CREATE INDEX labels_name ON labels(name);
CREATE INDEX labels_data_quality ON labels(data_quality);
CREATE INDEX label_labels_label_id ON label_labels(label_id);
CREATE INDEX label_labels_sub_label_id ON label_labels(sub_label_id);
CREATE INDEX label_labels_name ON label_labels(name);
CREATE INDEX masters_master_id ON masters(master_id);
CREATE INDEX masters_data_quality ON masters(data_quality);
CREATE INDEX videos_master_id ON videos(master_id);
CREATE INDEX videos_release_id ON videos(release_id);
CREATE INDEX videos_title ON videos(title);
CREATE INDEX releases_release_id ON releases(release_id);
CREATE INDEX releases_status ON releases(status);
CREATE INDEX releases_title ON releases(title);
CREATE INDEX releases_country ON releases(country);
CREATE INDEX releases_released ON releases(released);
CREATE INDEX releases_master_id ON releases(master_id);
CREATE INDEX release_artists_master_id ON release_artists(master_id);
CREATE INDEX release_artists_release_id ON release_artists(release_id);
CREATE INDEX release_artists_name ON release_artists(name);
CREATE INDEX release_labels_release_id ON release_labels(release_id);
CREATE INDEX release_labels_release_label_id ON release_labels(release_label_id);
CREATE INDEX release_labels_name ON release_labels(name);
CREATE INDEX release_labels_category ON release_labels(category);
CREATE INDEX release_identifiers_release_id ON release_identifiers(release_id);
CREATE INDEX release_formats_release_id ON release_formats(release_id);
CREATE INDEX release_formats_name ON release_formats(name);
CREATE INDEX release_companies_release_id ON release_companies(release_id);
CREATE INDEX release_companies_release_company_id ON release_companies(release_company_id);
CREATE INDEX release_companies_name ON release_companies(name);
CREATE INDEX release_companies_category ON release_companies(category);
CREATE INDEX release_tracks_release_id ON release_tracks(release_id);
|
<gh_stars>10-100
/* 0.7.0.4 (r1359) Forums icon fix */
UPDATE `cot_forum_sections` SET `fs_icon` = 'images/icons/default/forums.png'
WHERE `fs_icon` = 'system/admin/tpl/img/forums.png';
|
<gh_stars>0
DROP DATABASE IF EXISTS bamazonDB
CREATE DATABASE bamazonDB
USE bamazonDB
CREATE TABLE products (
id INT NOT NULL AUTO_INCREMENT,
product_name VARCHAR(50) NOT NULL,
department_name VARCHAR(30) NOT NULL,
price DECIMAL(10,2) NOT NULL,
stock_quantity INT NOT NULL,
PRIMARY KEY (id)
)
INSERT INTO products (product_name, department_name, price, stock_quantity)
VALUES ('camera', 'electronics', 499.99, 5)
INSERT INTO products (product_name, department_name, price, stock_quantity)
VALUES ('settlers of catan', 'toys', 59.98, 10)
INSERT INTO products (product_name, department_name, price, stock_quantity)
VALUES ('shampoo', 'beauty', 8.99, 25)
INSERT INTO products (product_name, department_name, price, stock_quantity)
VALUES ('switch', 'electronics', 299.99, 3)
INSERT INTO products (product_name, department_name, price, stock_quantity)
VALUES ('spoon', 'kitchen', 0.98, 100)
INSERT INTO products (product_name, department_name, price, stock_quantity)
VALUES ('grinder', 'kitchen', 79.97, 8)
INSERT INTO products (product_name, department_name, price, stock_quantity)
VALUES ('hair dye', 'beauty', 15.98, 30)
INSERT INTO products (product_name, department_name, price, stock_quantity)
VALUES ('laptop', 'electronics', 999.99, 1)
INSERT INTO products (product_name, department_name, price, stock_quantity)
VALUES ('funko pop', 'toys', 9.99, 150)
INSERT INTO products (product_name, department_name, price, stock_quantity)
VALUES ('the matrix', 'electronics', 9.99, 700)
|
<reponame>GuiraldelliS/toduh-api
CREATE TABLE IF NOT EXISTS public.board
(
id serial NOT NULL,
name character varying(30) NOT NULL,
color character varying(30) NOT NULL,
reset_date date,
creation_date date NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE IF NOT EXISTS public.item
(
id serial NOT NULL,
board_id bigint,
done boolean NOT NULL,
name character varying(255) NOT NULL,
description character varying(1024),
priority character varying(15) NOT NULL,
PRIMARY KEY (id),
CONSTRAINT fk_board FOREIGN KEY (board_id)
REFERENCES public.board (id) MATCH SIMPLE
ON UPDATE CASCADE
ON DELETE CASCADE
);
|
<gh_stars>0
CREATE DATABASE AGENDA;
USE AGENDA;
#CRIANDO A TABELA UNIDADE
CREATE TABLE UNIDADE
(
idEscola int auto_increment primary key NOT NULL,
nomeUnidade varchar(45),
enderecoUnidade varchar(50),
emailUnidade varchar(45),
telefoneUnidade varchar(45)
);
#CRIANDO A TABELA CURSO
CREATE TABLE CURSO
(
idCurso int primary key auto_increment NOT NULL,
coordenador varchar(45),
descricao VARCHAR (45),
tipoCurso VARCHAR(7),
anoCurso VARCHAR(4),
codUnidade int,
CONSTRAINT FK_CODUNIDADE_CURSO FOREIGN KEY (codUnidade) REFERENCES UNIDADE (idEscola)
);
#CRIANDO A TABELA PERIODO
CREATE TABLE PERIODO
(
idPeriodo INT PRIMARY KEY AUTO_INCREMENT NOT NULL,
periodo VARCHAR (10)
);
#CRIANDO A TABELA TURMA
CREATE TABLE TURMA
(
idTurma int primary key auto_increment NOT NULL,
descricao VARCHAR (45),
codCurso int,
codPeriodo INT,
CONSTRAINT FK_COD_TURMA_PERIODO FOREIGN KEY (codPeriodo) REFERENCES PERIODO (idPeriodo),
CONSTRAINT FK_CODCURSO_TURMA FOREIGN KEY (codCurso) REFERENCES CURSO (idCurso)
);
#CRIANDO A TABELA DISCIPLINA
CREATE TABLE DISCIPLINA
(
idDisciplina INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
disciplina VARCHAR (30)
);
#CRIANDO A TABELA AULA
CREATE TABLE AULA
(
idAula INT PRIMARY KEY AUTO_INCREMENT NOT NULL,
dataAula VARCHAR(10),
descricao VARCHAR (45),
locall VARCHAR(45),
horaInicio VARCHAR(5),
horaTermino VARCHAR(5),
codTurma INT,
codDisciplina INT,
CONSTRAINT FK_COD_TURMA_AULA FOREIGN KEY (codTurma) REFERENCES TURMA (idTurma),
CONSTRAINT fk_COD_DISCIPLINA_AULA FOREIGN KEY (codDisciplina) REFERENCES DISCIPLINA (idDisciplina)
);
DROP TABLE AULA;
#CRIANDO A TABELA ITENS_TURMA_USUARIO
CREATE TABLE ITENS_TURMA_USUARIO
(
id_Itens_Turma_Usuario INT primary key NOT NULL AUTO_INCREMENT,
codTurma INT,
codUsuario INT,
CONSTRAINT FK_COD_ITENS_TURMA FOREIGN KEY (codTurma) REFERENCES TURMA (idTurma),
CONSTRAINT FK_ITENS_USUARIO FOREIGN KEY (codUsuario) REFERENCES USUARIO (idUsuario)
);
#CRIANDO A TABELA USUARIO
CREATE TABLE USUARIO
(
idUsuario int primary key auto_increment not null,
email varchar(45),
senha varchar(20),
nome varchar(45),
telefone varchar (14),
dataNascimento VARCHAR(10),
codTipoUsuario int,
CONSTRAINT FK_COD_TIPO_USUARIO foreign key (codTipoUsuario) REFERENCES TIPO_USUARIO (idTipoUsuario)
);
#CRIANDO TABELA TIPO_USUARIO
CREATE TABLE TIPO_USUARIO
(
idTipoUsuario int primary key auto_increment not null,
tipoUsuario varchar(15)
);
/*INSERIDO USUÁRIOS DO TIPO ALUNO = 1 E PROFESSOR = 2*/
INSERT INTO TIPO_USUARIO (idTipoUsuario, tipoUsuario) VALUES (1,'ALUNO');
INSERT INTO TIPO_USUARIO (idTipoUsuario, tipoUsuario) VALUES (2, 'PROFESSOR');
SELECT idTipoUsuario AS 'IDENTIFICADOR', tipoUsuario AS 'Tipo de Usuário' FROM TIPO_USUARIO;
#CRIANDO A TABELA ITENS MURAL
CREATE TABLE MURAL
(
idMural int primary key auto_increment not null,
descricao varchar (250),
codUsuario int,
CONSTRAINT FK_CODUSUARIO_MURAL FOREIGN KEY (codUsuario) REFERENCES USUARIO (idUsuario)
);
|
<gh_stars>0
DROP DATABASE IF EXISTS employee_trackerDB;
CREATE database employee_trackerDB;
USE employee_trackerDB;
CREATE TABLE department (
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(30) UNIQUE NOT NULL
);
CREATE TABLE title_role (
id INT NOT NULL AUTO_INCREMENT,
title VARCHAR(30) UNIQUE NOT NULL,
salary DECIMAL NOT NULL,
-- department_id INT NOT NULL,
PRIMARY KEY(id)
-- INDEX department_index (department_id),
-- FOREIGN KEY (department_id) REFERENCES department(id) ON DELETE CASCADE
);
CREATE TABLE employee (
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
first_name VARCHAR(30) NOT NULL,
last_name VARCHAR(30) NOT NULL,
role_id INT UNSIGNED NOT NULL,
INDEX role_index (role_id),
-- CONSTRAINT title_role FOREIGN KEY (role_id) REFERENCES title_role(id) ON DELETE CASCADE,
manager_id INT UNSIGNED,
INDEX manager_index (manager_id),
CONSTRAINT manager FOREIGN KEY (manager_id) REFERENCES employee(id) ON DELETE SET NULL
);
INSERT INTO department
(name)
VALUES
('Thieves Guild'),
('Wizard College'),
('Warrior Guild'),
('Archer Battalion');
INSERT INTO title_role
(title, salary)
VALUES
('Scouting Team', 30000),
('Thief', 50000),
('Student', 35000),
('Professor', 75000),
('Trapper', 60000),
('<NAME>', 80000),
('Headmaster', 95000),
('Marksman', 90000);
INSERT INTO employee
(first_name, last_name, role_id, manager_id)
VALUES
('Noctis', 'Caelum', 1, NULL),
('Prompto', 'Argentum', 2, 1),
('Lunafreya', 'Fleuret', 3, 1),
('Ardyn', 'Izunia', 4, NULL),
('Gladiolus', 'Amicitia', 5, 1),
('Ignis', 'Scientia', 6, 1),
('Ravus', 'Fleuret', 7, 1),
('Regis', 'Lucis', 8, NULL);
SELECT * FROM employee_trackerDB.employee;
SELECT * FROM employee_trackerDB.title_role;
SELECT * FROM employee_trackerDB.department;
|
<reponame>tumluliu/mmrp-osm-analyzer
-- scripts for trackseginfo
DROP TABLE IF EXISTS trackseginfo;
CREATE TABLE trackseginfo(
page_no integer,
track_id integer,
segment_id integer,
length_2d double precision,
length_3d double precision,
moving_time interval,
stopped_time interval,
max_speed double precision,
uphill double precision,
downhill double precision,
started timestamp,
ended timestamp,
points integer,
start_lon double precision,
start_lat double precision,
end_lon double precision,
end_lat double precision,
avg_point_distance double precision
);
\COPY trackseginfo FROM '../data/munich_gpx_info.csv' WITH CSV HEADER;
SELECT AddGeometryColumn('public', 'trackseginfo', 'start_geom', 4326, 'POINT', 2);
SELECT AddGeometryColumn('public', 'trackseginfo', 'end_geom', 4326, 'POINT', 2);
UPDATE trackseginfo SET start_geom = ST_SetSRID(ST_MakePoint(start_lon, start_lat), 4326);
UPDATE trackseginfo SET end_geom = ST_SetSRID(ST_MakePoint(end_lon, end_lat), 4326);
CREATE INDEX trackseginfo_start_geom ON trackseginfo USING GIST (start_geom);
CREATE INDEX trackseginfo_end_geom ON trackseginfo USING GIST (end_geom);
-- scripts for trackinfo
DROP TABLE IF EXISTS trackinfo;
CREATE TABLE trackinfo(
page_no integer,
track_id integer,
segments integer,
length_2d double precision,
length_3d double precision,
moving_time interval,
stopped_time interval,
max_speed double precision,
uphill double precision,
downhill double precision,
started timestamp,
ended timestamp,
points integer,
start_lon double precision,
start_lat double precision,
end_lon double precision,
end_lat double precision,
avg_point_distance double precision
);
\COPY trackinfo (end_lon,length_3d,downhill,start_lon,started,avg_point_distance,segments,moving_time,track_id,uphill,ended,max_speed,end_lat,start_lat,length_2d,stopped_time,page_no,points) FROM '../data/munich_track_info.csv' WITH CSV HEADER;
SELECT AddGeometryColumn('public', 'trackinfo', 'start_geom', 4326, 'POINT', 2);
SELECT AddGeometryColumn('public', 'trackinfo', 'end_geom', 4326, 'POINT', 2);
UPDATE trackinfo SET start_geom = ST_SetSRID(ST_MakePoint(start_lon, start_lat), 4326);
UPDATE trackinfo SET end_geom = ST_SetSRID(ST_MakePoint(end_lon, end_lat), 4326);
CREATE INDEX trackinfo_start_geom ON trackinfo USING GIST (start_geom);
CREATE INDEX trackinfo_end_geom ON trackinfo USING GIST (end_geom);
ALTER TABLE "trackinfo" ADD COLUMN "ogc_fid" INTEGER;
UPDATE trackinfo SET ogc_fid = tracks.ogc_fid FROM tracks WHERE trackinfo.page_no = tracks.page_no AND trackinfo.track_id = tracks.track_id;
ALTER TABLE "trackinfo"
ALTER COLUMN "ogc_fid" SET NOT NULL;
ALTER TABLE "trackinfo" ADD UNIQUE ("ogc_fid");
ALTER TABLE "trackinfo" ADD PRIMARY KEY ("ogc_fid");
|
SELECT
c1.relname as table, c2.relname as index, a.attname as column, t.typname as type,
pg_size_pretty(pg_relation_size(c2.relname::text)) as i_size
FROM
pg_class c1,
pg_class c2,
pg_index i,
pg_attribute a,
pg_type t
WHERE
c1.oid = i.indrelid
and c2.oid = i.indexrelid
and a.attrelid = c1.oid
and a.attnum = ANY(i.indkey)
and t.oid = a.atttypid
and c1.relkind = 'r'
and t.typname in (select typname from pg_type where typcategory='S') -- text columns
order by
c1.relname,
c2.relname;
|
<filename>test/sql/official-suite/syscall-1.sql
-- original: syscall.test
-- credit: http://www.sqlite.org/src/tree?ci=trunk&name=test
CREATE TABLE t1(x, y);
INSERT INTO t1 VALUES(1, 2);
ATTACH 'test.db2' AS aux;
CREATE TABLE aux.t2(x, y);
INSERT INTO t2 VALUES(3, 4)
;ATTACH 'test.db2' AS aux
;PRAGMA main.journal_mode = sub_jrnl
;PRAGMA aux.journal_mode = sub_jrnl
;BEGIN;
INSERT INTO t1 VALUES(5, 6);
INSERT INTO t2 VALUES(7, 8);
COMMIT
;ATTACH 'test.db2' AS aux
;SELECT * FROM t1;
SELECT * FROM t2
;CREATE TABLE t1(a, b);
INSERT INTO t1 VALUES(1, 2);
BEGIN;
INSERT INTO t1 VALUES(3, 4)
;SELECT * FROM t1
;COMMIT
;PRAGMA temp_store = file;
PRAGMA main.cache_size = 10;
PRAGMA temp.cache_size = 10;
CREATE TABLE temp.tt(a, b);
INSERT INTO tt VALUES(randomblob(500), randomblob(600));
INSERT INTO tt SELECT randomblob(500), randomblob(600) FROM tt;
INSERT INTO tt SELECT randomblob(500), randomblob(600) FROM tt;
INSERT INTO tt SELECT randomblob(500), randomblob(600) FROM tt;
INSERT INTO tt SELECT randomblob(500), randomblob(600) FROM tt;
INSERT INTO tt SELECT randomblob(500), randomblob(600) FROM tt;
INSERT INTO tt SELECT randomblob(500), randomblob(600) FROM tt;
INSERT INTO tt SELECT randomblob(500), randomblob(600) FROM tt;
INSERT INTO tt SELECT randomblob(500), randomblob(600) FROM tt;
|
CREATE TABLE `creditCategory` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`isLocked` tinyint(1) DEFAULT NULL,
`status` smallint(6) DEFAULT NULL,
`roadieId` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`createdDate` datetime DEFAULT NULL,
`lastUpdated` datetime DEFAULT NULL,
`name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
`description` varchar(4000) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`urls` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`tags` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`alternateNames` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `ix_creditCategory_roadieId` (`roadieId`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE `credit` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`artistId` int(11) NULL DEFAULT NULL,
`releaseId` int(11) NULL DEFAULT NULL,
`trackId` int(11) NULL DEFAULT NULL,
`creditCategoryId` int(11) NOT NULL,
`isLocked` tinyint(1) DEFAULT NULL,
`status` smallint(6) DEFAULT NULL,
`roadieId` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`createdDate` datetime DEFAULT NULL,
`lastUpdated` datetime DEFAULT NULL,
`creditToName` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`description` varchar(4000) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`urls` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`tags` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `ix_credit_roadieId` (`roadieId`),
KEY `idx_creditCreditandRelease` (`releaseId`,`id`),
KEY `idx_creditCreditandTrack` (`trackId`,`id`),
CONSTRAINT `credit_artist_ibfk_1` FOREIGN KEY (`artistId`) REFERENCES `artist` (`id`) ON DELETE CASCADE,
CONSTRAINT `credit_release_ibfk_1` FOREIGN KEY (`releaseId`) REFERENCES `release` (`id`) ON DELETE CASCADE,
CONSTRAINT `credit_track_ibfk_1` FOREIGN KEY (`trackId`) REFERENCES `track` (`id`) ON DELETE CASCADE,
CONSTRAINT `credit_category_ibfk_1` FOREIGN KEY (`creditCategoryId`) REFERENCES `creditCategory` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
INSERT INTO `creditCategory` VALUES (null,0,1,'d4008de3-2735-4991-968b-b6dfe868990a', UTC_TIMESTAMP(), null, 'Vocals', 'Provided lead or backup vocals',null,null,null);
INSERT INTO `creditCategory` VALUES (null,0,1,'aea463b8-0b90-47d5-8fde-5e68d3c454ed', UTC_TIMESTAMP(), null, 'Instrument', 'Played an instrument',null,null,null);
INSERT INTO `creditCategory` VALUES (null,0,1,'e3178aae-2359-4654-ab29-b45338b5984f', UTC_TIMESTAMP(), null, 'Production', 'Provided some role in production',null,null,null);
|
<gh_stars>10-100
-- file:gin.sql ln:16 expect:true
insert into gin_test_tbl select array[3, 1, g] from generate_series(1, 1000) g
|
<reponame>WeilerWebServices/PostgreSQL
{# FETCH lexize functions for TEXT SEARCH TEMPLATE #}
{% if lexize %}
SELECT
proname, nspname
FROM
pg_proc JOIN pg_namespace n ON n.oid=pronamespace
WHERE
prorettype=2281
AND proargtypes='2281 2281 2281 2281'
ORDER BY proname;
{% endif %}
{# FETCH init functions for TEXT SEARCH TEMPLATE #}
{% if init %}
SELECT
proname, nspname
FROM
pg_proc JOIN pg_namespace n ON n.oid=pronamespace
WHERE
prorettype=2281 and proargtypes='2281'
ORDER BY
proname;
{% endif %}
|
UPDATE `null_point` SET date = ? WHERE ID_Inst = ?
|
<gh_stars>1-10
-- NOTES
-- Cards that require extra coding are at the bottom of the file.
-- The "duration" column specifies how many rounds a card is active.
-- Zero means the card has no lasting effect; -1 means the card stays permanently.
-- Unicode characters cheat sheet:
-- - en dash: U+2013
-- - apostrophe (single quote): U+2019
-- - double quotes: U+201C U+201D
-- - ellipsis: U+2026
-- "All" cards
INSERT INTO "all_cards" ("text_id", "name", "type", "text", "visibility", "duration", "remote") VALUES
('and_all_for_one', U&'\2026and All for One', 'all', 'During the next round, when someone must drink, everyone drinks the same amount in sympathy.', 'all', 1, true),
('bad_breath', 'Bad Breath', 'all', U&'If you haven\2019t brushed your teeth in 24 hours, take three sips.', 'all', 0, true),
('big_bother', 'Big Bother', 'all', 'If you have a big brother, take a sip. Otherwise take three sips.', 'all', 0, true),
('blackout', 'Blackout', 'all', 'Turn off all lights for the next two rounds.', 'all', 2, true),
('cant_be_this_cute', U&'Can\2019t Be This Cute', 'all', 'If you have a little sister, take a sip. Otherwise take three sips.', 'all', 0, true),
('charitable', 'Charitable', 'all', U&'If you haven\2019t given to charity in the past year, take two sips.', 'all', 0, true),
('chocolate_rain', 'Chocolate Rain', 'all', 'Add something sweet (preferably chocolate) to your drink and take two sips.', 'all', 0, true),
('companions', 'Companions', 'all', U&'Take a sip for every pet you\2019ve ever owned (but no more than four sips).', 'all', 0, true),
('dilution', 'Dilution', 'all', 'Fill your drink with something non-alcoholic.', 'all', 0, true),
('double_trouble', 'Double Trouble', 'all', 'The amounts of drinks in the next card shall be doubled.', 'all', 0, true),
('fancy_dress', 'Fancy Dress', 'all', 'The finest-dressed player takes three sips.', 'all', 0, false),
('finish_him', 'Finish Him!', 'all', 'Split into two teams. Each team chooses a champion to a wrestling match. The losing team cheers the winners and takes three sips.', 'all', 0, false),
('gamers_rise_up', 'Gamers Rise Up', 'all', U&'Take turns naming video games that you have played. Once someone can\2019t name a new one, they take four sips.', 'all', 0, true),
('group_hug', 'Group Hug', 'all', 'Have a group hug and take two sips from the drink of the player on your right.', 'all', 0, false),
('hand_me_downs', 'Hand-Me-Downs', 'all', 'Give a piece of clothing to another player.', 'all', 0, false),
('happy_hardcore', 'Happy Hardcore', 'all', 'Play some happy hardcore as loud as possible. Empty your drink.', 'all', 0, true),
('i_get_wet', 'I Get Wet', 'all', 'Wet your hair or finish your drink.', 'all', 0, true),
('ice_cold', 'Ice Cold', 'all', 'Add ice to your drink or cool it down some other way.', 'all', 0, true),
('insomniac', 'Insomniac', 'all', U&'If you didn\2019t sleep at least seven hours last night, take two sips.', 'all', 0, true),
('martial_law', 'Martial Law', 'all', 'Martial law applies for the next three rounds. All actions must be completed, and protection cards are not effective.', 'all', 3, true),
('mix_and_mingle', 'Mix and Mingle', 'all', U&'Mix all players\2019 drinks together and drink the delicious mixture.', 'all', 0, false),
('motherland', 'Motherland', 'all', 'Respect the Motherland by taking a sip of vodka. True gopniki happily drink more.', 'all', 0, true),
('neet', 'NEET', 'all', U&'If you don\2019t work, take two sips.', 'all', 0, true),
('oktoberfest', 'Oktoberfest', 'all', 'Everyone cheers and takes three sips.', 'all', 0, true),
('roundabout', 'Roundabout', 'all', 'Give your drink to the player on your right. Take a sip from the drink you received.', 'all', 0, false),
('sophistication', 'Sophistication', 'all', 'Listen to classical music and drink some wine. If both are not available, everyone takes two sips.', 'all', 0, true),
('spring_cleaning', 'Spring Cleaning', 'all', 'Clear the table of drinks by finishing them!', 'all', 0, true),
('summertide', 'Summertide', 'all', 'In summer or spring take two sips. In winter or fall take four sips.', 'all', 0, true),
('the_more_the_merrier', 'The More the Merrier', 'all', 'Take as many sips as there are players.', 'all', 0, true),
('yuletide', 'Yuletide', 'all', 'In winter or fall take two sips. In summer or spring take four sips.', 'all', 0, true),
-- "Use" cards
('ahead_of_schedule', 'Ahead of Schedule', 'use', 'Pause the game. Decide the length of the pause with other players.', 'player', 0, true),
('asserting_dominance', 'Asserting Dominance', 'use', 'Refuse to carry out any one action.', 'player', 0, true),
('challenge', 'Challenge', 'use', U&'Challenge another player to arm-wrestling. The loser takes a sip from both players\2019 drinks.', 'player', 0, false),
('delegation', 'Delegation', 'use', 'Order another player to carry out an action in your stead.', 'player', 0, true),
('honeymoon', 'Honeymoon', 'use', 'Pick two players. During the next round they must talk to each other in a ridiculously sappy, mushy, lovey-dovey manner.', 'player', 1, true),
('kindness', 'Kindness', 'use', U&'Protect yourself and up to two others from an \201Call\201D card.', 'player', 0, true),
('no_u', 'NO U', 'use', U&'After someone draws an \201Cact\201D card, order them to carry out the card\2019s task themself.', 'player', 0, true),
('phoenix', 'Phoenix', 'use', 'Fill the drink of another player.', 'player', 0, false),
('safe_space', 'Safe Space', 'use', 'Protect yourself and the players next to you from any card.', 'player', 0, true),
('teetotal', 'Teetotal', 'use', 'Switch your drink for a non-alcoholic beverage.', 'player', 0, true),
('thunderdome', 'Thunderdome', 'use', 'Avoid all actions during the next round.', 'player', 1, true),
('white_knight', 'White Knight', 'use', U&'Carry out another player\2019s task.', 'player', 0, true),
-- "Permanent" cards
('cant_get_enough', U&'Can\2019t Get Enough', 'perm', 'Take a sip at the start of your every turn.', 'all', -1, true),
('cockatrice', 'Cockatrice', 'perm', 'You may not look anyone in the eyes. If you do, stay completely still until your next turn.', 'all', -1, false),
('deus_ex_machina', 'De<NAME>', 'perm', 'The amounts of sips you must drink are halved! (Rounded up.)', 'all', -1, true),
('dictator', 'Dictator', 'perm', 'You may add a new rule to the game. Remember to set a punishment for breaking the rule.', 'all', -1, true),
('falsetto', 'Falsetto', 'perm', 'You must talk in a high-pitched voice. Take a sip if you forget to.', 'all', -1, true),
('fight_club', 'Fight Club', 'perm', 'You must keep your fists clenched. If you forget, take two sips.', 'all', -1, false),
('foul_mouth', 'Foul Mouth', 'perm', 'You may not swear. If you do, take two sips.', 'all', -1, true),
('gary', 'Gary!', 'perm', 'You are now known as Gary. Addressing you by any other name carries a punishment of three sips.', 'all', -1, true),
('hydra', 'Hydra', 'perm', 'You must touch some part of three other players at all times. If you get separated, you may discard this card but all four players must take four sips.', 'all', -1, false),
('methanol', 'Methanol', 'perm' , 'Keep your eyes shut or covered. If you forget, take two sips.', 'all', -1, false),
('my_lips_are_sealed', 'My Lips Are Sealed', 'perm', 'You may not speak unless spoken to. If you do, take two sips.', 'all', -1, true),
('rhyme_and_reason', 'Rhyme and Reason', 'perm', U&'You must speak in rhyme. Like, all the time. If your rhyme\2019s a disappointment, two sips shall be your punishment.', 'all', -1, true),
('servants', 'Servants', 'perm', 'Other players shall give you your drinks. You may not touch your drink yourself.', 'all', -1, false),
('super_serious', 'Super Serious', 'perm', 'Take a sip whenever you laugh.', 'all', -1, true),
('wingman', 'Wingman', 'perm', 'You are affected by all permanent cards of the player in turn before you.', 'all', -1, true),
('your_next_pose_will_be', U&'Your Next Pose Will Be\2026', 'perm', 'On your every turn strike a pose and keep it until your next turn.', 'all', -1, false),
-- "Action" cards
('alcoholic', 'Alcoholic', 'act', 'Finish your drink. Because why not?', 'all', 0, true),
('anything_you_can_do', U&'Anything You Can Do\2026', 'act', U&'Pick a player. They must do something that you must then imitate. If you succeed, they take three sips. If you don\2019t, take three sips yourself.', 'all', 0, false),
('armored', 'Armored', 'act', U&'For the next two rounds, you are protected from cards that you didn\2019t draw.', 'all', 2, true),
('bad_touch', 'Bad Touch', 'act', 'Let anyone who wants to slap your ass. Alternatively finish your drink.', 'all', 0, false),
('curses', 'Curses!', 'act', 'You are cursed! Take a sip now and at the start of your next two turns.', 'all', 2, true),
('deadline', 'Deadline', 'act', 'Finish your drink in ten seconds. If you fail, take three additional sips.', 'all', 0, true),
('dragonborn', 'Dragonborn', 'act', 'Let the player on your right spice up your drink.', 'all', 0, false),
('experimental_formula', 'Experimental Formula', 'act', 'Add milk and salt to taste to your drink. Enjoy.', 'all', 0, true),
('fashion_show', 'Fashion Show', 'act', 'Perform a proper catwalk. Others take a sip.', 'all', 0, false),
('fetch_boy', 'Fetch, Boy!', 'act', 'Throw something. Tell everyone that whoever brings it back to you will not have to take three sips. Laugh (and drink along).', 'player', 0, false),
('high_five', 'High Five', 'act', 'High five with another player. Everyone else takes a sip.', 'all', 0, false),
('honesty', 'Honesty', 'act', 'Pick a player who will ask you a question. Answer truthfully or finish your drink.', 'all', 0, true),
('hug_or_chug', 'Hug or Chug', 'act', 'Hug every other player or finish your drink.', 'all', 0, false),
('loyalty', 'Loyalty', 'act', 'Pick a player. The next time they have to finish their drink, drink half of it in their stead.', 'all', 0, false),
('mimic', 'Mimic', 'act', U&'Imitate another player. Others rate your act on a scale of 0\20135. The imitated player takes a sip for every five points.', 'all', 0, true),
('monarch', 'Monarch', 'act', 'You are the Queen or King of the game. Everyone else toasts in your honor and finishes their drink.', 'all', 0, true),
('one_for_all', 'One for All?', 'act', 'Either take five sips or order everyone else to take two sips.', 'all', 0, true),
('party_of_one', 'Party of One', 'act', 'Go sit in the corner of the room until your next turn. Take three sips.', 'all', 0, true),
('push_up_or_shup_up', 'Push Up, or Shut Up!', 'act', U&'Order a player to perform ten push-ups. If they succeed, take a sip. If they don\2019t, they take three sips.', 'all', 0, false),
('slaver', 'Slaver', 'act', 'Choose a slave. For the next three turns they have to carry out actions in your stead.', 'all', 3, true),
('special_eyes', 'Special Eyes', 'act', U&'Challenge another player to a staring contest. The loser takes three sips from the winner\2019s drink.', 'all', 0, false),
('stand_up', 'Stand-Up', 'act', 'Try to make others laugh. Everyone who laughs takes two sips. If no-one does, take four sips yourself.', 'player', 0, true),
('switcheroo', 'Switcheroo', 'act', 'You may switch drinks with another player. Alternatively take two sips.', 'all', 0, false),
('take_a_letter', 'Take a Letter', 'act', 'Dictate a short letter to another player. If they are able to repeat it, word for word, take two sips. If not, they take a sip.', 'all', 0, true),
('waterfall', 'Waterfall', 'act', 'Pick an opponent. Both fill their drinks and empty them on the count of three. The faster player may add a new rule to the game.', 'all', 0, false);
-- Cards that require extra coding (altering turn order, drawing extra cards, moving cards between players, etc.).
-- Unimplemented ones are commented out.
INSERT INTO "all_cards" ("text_id", "name", "type", "text", "visibility", "duration", "remote") VALUES
-- "All" cards
--('chaos', 'Chaos', 'all', U&'The direction of the game is reversed. All players\2019 permanent and \201Cuse\201D cards are shuffled and dealt to all players.', 'all', 0, true),
--('missed_opportunities', 'Missed Opportunities', 'all', U&'All \201Cuse\201D cards in players\2019 hands are shuffled back into the deck. Their owners must take one sip per card.', 'all', 0, true),
--('revolution', 'Revolution', 'all', 'Everyone gives their permanent cards to the player next in turn from them.', 'all', 0, true),
-- "Use" cards
('artist', 'Artist', 'use', 'Take a creative break and skip your next five turns.', 'player', 5, true),
--('cleanup', 'Cleanup', 'use', 'You may discard any active permanent cards.', 'player', 0, true),
--('donor', 'Donor', 'use', 'Search the deck for a card and give it to any other player.', 'player', 0, true),
('gotta_go_fast', 'Gotta Go Fast', 'use', 'Skip your next turn.', 'player', 1, true),
--('grand_larceny', 'Grand Larceny', 'use', U&'Steal all other players\2019 \201Cuse\201D cards.', 'player', 0, true),
--('nope', 'NOPE', 'use', 'Cancel the effect of any card. If used on a permanent card, it is removed from the game.', 'player', 0, true),
--('not_so_permanent', 'Not So Permanent', 'use', 'All active permanent cards are shuffled back into the deck.', 'player', 0, true),
--('petty_theft', 'Petty Theft', 'use', U&'Steal one \201Cuse\201D card from any player. You may not see the cards you\2019re choosing from.', 'player', 0, true),
--('teleportation', 'Teleportation', 'use', 'Switch places with another player. If you have been ordered to do something, that player does it in your stead.', 'player', 0, true),
('to_the_loo', 'To the Loo', 'use', 'Take a bathroom break. Your next three turns are skipped.', 'player', 3, true),
--('tyrant', 'Tyrant', 'use', 'Order another player to double their drinks for the next two rounds.', 'player', 2, true),
-- "Permanent" cards
('generosity', 'Generosity', 'perm', U&'You must give away any \201Cuse\201D cards you have, with a smile. Cards must be given to other players in turns. If you forget to smile, take a sip.', 'all', -1, false),
--('spidey_sense', 'Spidey Sense', 'perm', 'You can see the card on the top of the deck.', 'player', -1, true),
-- "Action" cards
('daring', 'Daring', 'act', 'Draw the next card. Its drinks shall be doubled.', 'all', 0, true),
('distracted', 'Distracted', 'act', 'You are distracted and skip your next turn.', 'all', 1, true),
('greed', 'Greed', 'act', U&'Take all other players\2019 permanent cards.', 'all', 0, true),
('magic', 'Magic', 'act', 'Shuffle the deck and put this card at the bottom of the deck.', 'all', 0, true),
--('new_world_order', 'New World Order', 'act', 'Switch places with another player. Both of you take a sip.', 'all', 0, true),
--('sacrifice', 'Sacrifice', 'act', 'For every drink you finish, you may discard two permanent cards.', 'all', 0, true),
('too_many_cards', 'Too Many Cards', 'act', 'The top two cards in the deck are discarded.', 'all', 0, true);
|
<filename>coeus-db/coeus-db-sql/src/main/resources/org/kuali/coeus/coeus-sql/log/Release_2_0_logs/KRACOEUS-2534b.sql
CREATE TABLE EPS_PROP_SITES
(
PROPOSAL_NUMBER varchar2(8) NOT NULL,
SITE_NUMBER decimal(3) NOT NULL,
LOCATION_NAME varchar2(60) NOT NULL,
LOCATION_TYPE_CODE decimal(3) NOT NULL,
ORGANIZATION_ID varchar2(8),
ROLODEX_ID decimal(6),
UPDATE_TIMESTAMP date NOT NULL,
UPDATE_USER varchar2(8) NOT NULL
);
alter table EPS_PROP_SITES
ADD CONSTRAINT PK_EPS_PROP_SITES PRIMARY KEY (PROPOSAL_NUMBER,SITE_NUMBER);
ALTER TABLE EPS_PROP_SITES
ADD CONSTRAINT FK_EPS_PROP_SITES1
FOREIGN KEY (PROPOSAL_NUMBER)
REFERENCES EPS_PROPOSAL(PROPOSAL_NUMBER)
;
ALTER TABLE EPS_PROP_SITES
ADD CONSTRAINT FK_EPS_PROP_SITES2
FOREIGN KEY (LOCATION_TYPE_CODE)
REFERENCES LOCATION_TYPE(LOCATION_TYPE_CODE)
;
|
<filename>db2te/queryfiles/predefined/Views2XML.sql
select XMLELEMENT( NAME "views"
, XMLAGG(XMLELEMENT(NAME "view"
,XMLATTRIBUTES(TABSCHEMA as schema,TABNAME as name)
) order by TABSCHEMA,TABNAME
)
)
from (select * from syscat.tables t where type='V')
|
-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Feb 19, 2016 at 12:51 AM
-- Server version: 5.6.17
-- PHP Version: 5.5.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 utf8 */;
--
-- Database: `marija`
--
-- --------------------------------------------------------
--
-- Table structure for table `drustvo`
--
CREATE TABLE IF NOT EXISTS `drustvo` (
`udruzenjeid` int(10) NOT NULL AUTO_INCREMENT,
`nazivDrustva` varchar(30) NOT NULL,
`grad` varchar(30) NOT NULL,
`brojClanova` int(10) NOT NULL,
`id` int(10) NOT NULL,
PRIMARY KEY (`udruzenjeid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;
--
-- Dumping data for table `drustvo`
--
INSERT INTO `drustvo` (`udruzenjeid`, `nazivDrustva`, `grad`, `brojClanova`, `id`) VALUES
(1, 'Planinarsko društvo Beograd', 'Beograd', 3000, 0),
(2, 'Planinarsko društvo Niš', 'Niš', 1000, 0),
(3, 'Planinarsko društvo Novi sad', 'Novi sad', 500, 0);
-- --------------------------------------------------------
--
-- Table structure for table `members`
--
CREATE TABLE IF NOT EXISTS `members` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`ime` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`prezime` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`pol` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`email` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`telefon` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`datumRodjenja` date NOT NULL,
`oprema` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`planine` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`napomena` varchar(70) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`pripada` varchar(10) NOT NULL,
`planinarskoDrustvo` varchar(30) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=889 ;
--
-- Dumping data for table `members`
--
INSERT INTO `members` (`id`, `ime`, `prezime`, `pol`, `email`, `telefon`, `datumRodjenja`, `oprema`, `planine`, `napomena`, `pripada`, `planinarskoDrustvo`) VALUES
(123, 'Ljiljana', 'Simovic', 'zenski', '<EMAIL>', '0611122334', '1993-10-21', 'obuca, stap', 'Rtanj', '', 'da', 'Planinasko društvo Novi sad'),
(211, 'Kristina', 'Pajic', 'zenski', '<EMAIL>', '0611122335', '1993-03-04', 'obuca', 'Kopaonik', '', 'da', 'Planinarsko društvo Niš'),
(222, 'Marija', 'Jankovic', 'zenski', '<EMAIL>', '0691919000', '1992-10-11', 'obuca, stap', 'Rtanj', '', 'da', 'Planinarsko društvo Niš'),
(234, 'Marija', 'Kosaric', 'zenski', '<EMAIL>', '0692233445', '1993-11-15', 'nema', 'Midzor', '', 'da', 'Planinarsko društvo Beograd'),
(333, 'Milena', 'Vujovic', 'zenski', '<EMAIL>', '0660022330', '1992-02-28', 'nema', 'Rtanj', '', 'da', 'Planinarsko društvo Beograd'),
(345, 'Stefan', 'Mitrovic', 'muski', '<EMAIL>', '0611199223', '1993-09-23', 'nema', 'Stara planina', '', 'da', 'Planinarsko društvo Novi sad'),
(444, 'Andrijana', 'Miletic', 'zenski', '<EMAIL>', '0655511223', '1992-03-24', 'nema', 'Zlatibor', '', 'da', 'Planinarsko društvo Niš'),
(456, 'Djordje', 'Radovanovic', 'muski', '<EMAIL>', '0622342345', '1993-06-03', 'obuca', 'Suva planina', '', 'da', 'Planinarsko društvo Beograd'),
(567, 'Aleksandar', 'Kandic', 'muski', '<EMAIL>', '0699911229', '1993-04-16', 'nema', 'Ozren', '', 'da', 'Planinarsko društvo Beograd'),
(666, 'Jelena', 'Milovanovic', 'zenski', '<EMAIL>', '0690022334', '1992-09-02', 'obuca, stap', 'Zlatibor', '', 'da', 'Planinarsko društvo Niš'),
(678, 'Milan', 'Vukajlovic', 'muski', '<EMAIL>', '0623456123', '1993-11-20', 'stap', 'Kopaonik', '', 'da', 'Planinarsko društvo Niš'),
(777, 'Nikola', 'Gajic', 'muski', '<EMAIL>', '0641212123', '1983-07-16', 'stap', 'Tara', '', 'da', 'Planinarsko društvo Beograd'),
(789, 'Nikolina', 'Momcilovic', 'zenski', '<EMAIL>', '0638989123', '1993-12-21', 'nema', 'Stara planina', '', 'da', 'Planinarsko društvo Novi sad'),
(888, 'Ana', 'Miletic', 'zenski', '<EMAIL>', '0622212123', '1993-05-09', 'nema', 'Rtanj', '', 'da', 'Planinarsko društvo Beograd');
/*!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 */;
|
<gh_stars>0
set pagewidth 1000;
select T1.id, T1.nume, T1.prenume, T1.an, c.titlu_curs, n.valoare, T1."avg"
from ( select * from (select s.id, s.nume, s.prenume, s.an, avg(n.valoare) as "avg"
from studenti s join note n on n.id_student=s.id group by s.id, s.nume, s.prenume, s.an, s.nume, s.prenume
having count(n.valoare) >= 3 order by avg(n.valoare) desc, s.an desc, s.nume asc, s.prenume asc )
where rownum = 1) T1 join note n on
n.id_student = T1.id join cursuri c on c.id = n.id_curs;
set pagewidth 1000;
select s1.id, s1.nume, s1.prenume, s1.an, trunc(avg(n1.valoare),3) as "MEDIE", count(valoare) as "NUMAR NOTE"
from studenti s1, note n1
where s1.id = n1.id_student
group by s1.id, s1.nume, s1.prenume, s1.an
having count(valoare) >= 3
order by 5 desc, 4 desc, 2 asc;
select id
from studenti
order by id asc;
describe note;
select id_student, avg(valoare)
from note
group by id_student;
select id_student, sum(valoare) as "Suma note", count(valoare) as "Numar note"
from note, studenti
where id_student = studenti.id
and id_student = 543
group by id_student;
describe databases;
SELECT NAME FROM v$database;
SELECT DISTINCT OWNER FROM ALL_OBJECTS;
select sqrt(23) from dual;
select sqrt(2) from dual;
|
create table config(
app text not null,
key text not null,
value text,
descr text,
primary key(app, key)
);
-- insert into config(app, key, value) values ('csimc', 'TTY', '/dev/ttyS0');
insert into config(app, key, value) values ('csimc', 'TTY', '/dev/ttyUSB0');
insert into config(app, key, value) values ('csimc', 'HOST', '127.0.0.1');
insert into config(app, key, value) values ('csimc', 'PORT', '7623');
insert into config(app, key, value) values ('csimc', 'INIT0', 'basic.cmc find.cmc nodeHA.cmc');
insert into config(app, key, value) values ('csimc', 'INIT1', 'basic.cmc find.cmc nodeDec.cmc');
insert into config(app, key, value) values ('csimc', 'INIT2', 'basic.cmc find.cmc nodeFocus.cmc');
-- insert into config(app, key, value) values ('home', 'ecnoderMax', '12976128');
-- from telescoped.cfg
-- HESTEP 12976128 ! raw encoder counts/rev
-- DESTEP 12976128 ! raw encoder counts/rev
-- CGUIDEVEL 0.0016 ! coarse jogging velocity, rads/sec
-- HAXIS 0
-- DAXIS 1
-- "H" refers to the longitudinal axis, ie, ha or az.
-- "D" refers to the latitudinal axis, ie, dec or alt.
-- deg * (pi/180) = rad
-- rad * (180/pi) = deg
|
# code Sample from the tutorial at https://learncodeshare.net/2015/06/02/basic-crud-operations-using-cx_oracle/
# The following drops the tables created for the tutorial
drop table CX_PETS
/
drop table CX_PEOPLE
/
|
<gh_stars>1-10
/*
Navicat MySQL Data Transfer
Source Server : seho
Source Server Version : 50553
Source Host : localhost:3306
Source Database : wms
Target Server Type : MYSQL
Target Server Version : 50553
File Encoding : 65001
Date: 2019-06-23 21:44:33
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for admin
-- ----------------------------
DROP TABLE IF EXISTS `admin`;
CREATE TABLE `admin` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(20) NOT NULL,
`password` varchar(32) NOT NULL,
`create_time` varchar(32) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of admin
-- ----------------------------
INSERT INTO `admin` VALUES ('1', 'admin', '<PASSWORD>', '');
INSERT INTO `admin` VALUES ('2', 'sehochen', '21232f297a57a5a743894a0e4a801fc3', '');
-- ----------------------------
-- Table structure for finance
-- ----------------------------
DROP TABLE IF EXISTS `finance`;
CREATE TABLE `finance` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`num` int(11) NOT NULL,
`create_time` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of finance
-- ----------------------------
INSERT INTO `finance` VALUES ('1', '40', '1561288297');
INSERT INTO `finance` VALUES ('2', '10', '1561288297');
INSERT INTO `finance` VALUES ('3', '12', '1561288297');
INSERT INTO `finance` VALUES ('4', '23', '1561204292');
INSERT INTO `finance` VALUES ('5', '45', '1561031492');
INSERT INTO `finance` VALUES ('6', '100', '1558957892');
-- ----------------------------
-- Table structure for house
-- ----------------------------
DROP TABLE IF EXISTS `house`;
CREATE TABLE `house` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`num` varchar(10) NOT NULL COMMENT '房间号',
`price` decimal(10,2) NOT NULL COMMENT '价格',
`type` varchar(10) NOT NULL COMMENT '类型',
`status` varchar(10) DEFAULT '1' COMMENT '入住状态0有人、1空闲、2待打扫、3维修',
`storey` varchar(10) DEFAULT NULL COMMENT '楼层',
`user` varchar(50) DEFAULT NULL COMMENT '入住者姓名',
`identity` varchar(20) DEFAULT NULL COMMENT '入住者身份证',
`move_type` varchar(20) DEFAULT NULL COMMENT '入住类型。时长',
`move_time` varchar(20) DEFAULT NULL COMMENT '入住时间',
`expire_time` varchar(20) DEFAULT NULL COMMENT '到期时间',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=56 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of house
-- ----------------------------
INSERT INTO `house` VALUES ('53', '601', '600.00', '牛奶', '1', '6', null, null, null, null, null);
INSERT INTO `house` VALUES ('52', '501', '500.00', '大牛', '1', '5', null, null, null, null, null);
INSERT INTO `house` VALUES ('51', '301', '300.00', '3楼单间', '1', '3', null, null, null, null, null);
INSERT INTO `house` VALUES ('49', '202', '210.00', '游戏房', '1', '2', null, null, null, null, null);
INSERT INTO `house` VALUES ('50', '401', '400.00', '看景房', '3', '4', null, null, null, null, null);
INSERT INTO `house` VALUES ('47', '107', '180.00', '双人间', '0', '1', '对对', '330724197010122923', '1', '1561262400', '1561348800');
INSERT INTO `house` VALUES ('48', '108', '190.00', '三人间', '1', '1', null, null, null, null, null);
INSERT INTO `house` VALUES ('46', '106', '170.00', '单人间', '2', '1', null, null, null, null, null);
INSERT INTO `house` VALUES ('44', '104', '150.00', '标准房', '1', '1', null, null, null, null, null);
INSERT INTO `house` VALUES ('54', '105', '161.00', '大', '1', '1', null, null, null, null, null);
INSERT INTO `house` VALUES ('55', '201', '234.00', '2楼房', '2', '2', '', '', '3', '1561089600', '1561352400');
INSERT INTO `house` VALUES ('42', '103', '140.00', '电脑房', '4', '1', '我', '387325199308093039', '3', '1559959200', '1560571200');
INSERT INTO `house` VALUES ('41', '102', '130.00', '标准房', '0', '1', '测试', '330724197010122923', '1', '1561262400', '1561348800');
INSERT INTO `house` VALUES ('40', '101', '120.00', '标准房', '2', '1', '', '', '1', '1561262400', '1561348800');
-- ----------------------------
-- Table structure for jointime
-- ----------------------------
DROP TABLE IF EXISTS `jointime`;
CREATE TABLE `jointime` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(20) NOT NULL,
`num` varchar(50) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=22 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of jointime
-- ----------------------------
INSERT INTO `jointime` VALUES ('21', '2天房', '2');
INSERT INTO `jointime` VALUES ('20', '6小时房', '0.025');
INSERT INTO `jointime` VALUES ('17', '1天房', '1');
INSERT INTO `jointime` VALUES ('18', '3天房', '3');
INSERT INTO `jointime` VALUES ('15', '午休房', '0.0083333333333333');
INSERT INTO `jointime` VALUES ('16', '半天房', '0.5');
-- ----------------------------
-- Table structure for storey
-- ----------------------------
DROP TABLE IF EXISTS `storey`;
CREATE TABLE `storey` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`num` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of storey
-- ----------------------------
INSERT INTO `storey` VALUES ('1', '1');
INSERT INTO `storey` VALUES ('2', '2');
INSERT INTO `storey` VALUES ('3', '3');
INSERT INTO `storey` VALUES ('4', '4');
INSERT INTO `storey` VALUES ('10', '5');
INSERT INTO `storey` VALUES ('11', '6');
SET FOREIGN_KEY_CHECKS=1;
|
/*L
Copyright SAIC
Distributed under the OSI-approved BSD 3-Clause License.
See http://ncip.github.com/cabio/LICENSE.txt for details.
L*/
DROP PUBLIC SYNONYM HISTOLOGY_CLOSURE
/
--
-- HISTOLOGY_CLOSURE (Synonym)
--
-- Dependencies:
-- HISTOLOGY_CLOSURE (Table)
--
CREATE PUBLIC SYNONYM HISTOLOGY_CLOSURE FOR HISTOLOGY_CLOSURE
/
|
<filename>addons/legrand/init.sql
-- Fő gyártási helyek beírása a cikktörzsbe
WITH
cikk as (
select cikk_id, max(id) as id from legrand_gyartasi_lap group by cikk_id
),
gyhely as (
select cikk.cikk_id, gylap.gyartasi_hely_id from cikk join legrand_gyartasi_lap as gylap on gylap.id = cikk.id
)
update legrand_cikk set gyartasi_hely_id = gyhely.gyartasi_hely_id from gyhely where gyhely.cikk_id = legrand_cikk.id
;
-- Gyártási lap 'rendelt_ora' beírása 'gylap_homogen' táblából #### nincs kész ####
WITH
homogen AS (
SELECT gyartasi_lap_id, SUM(rendelt_ora) AS rendelt_ora FROM legrand_gylap_homogen WHERE sajat GROUP BY gyartasi_lap_id
)
SELECT gylap.id, homogen.rendelt_ora FROM legrand_gyartasi_lap AS gylap
JOIN homogen ON homogen.gyartasi_lap_id = gylap.id
WHERE gylap.active AND gylap.state = 'uj'
ORDER BY id
;
-- statisztika adatok beírása
WITH
mozgassor AS (
SELECT sor.gyartasi_lap_id,
sor.mennyiseg,
date(fej.create_date) AS create_date,
gylap.hatarido,
CASE WHEN date(fej.create_date) <= gylap.hatarido THEN sor.mennyiseg ELSE 0 END AS idoben_db,
CASE WHEN date(fej.create_date) > gylap.hatarido THEN sor.mennyiseg ELSE 0 END AS idontul_db
FROM legrand_mozgassor AS sor
JOIN legrand_mozgasfej AS fej ON fej.id = sor.mozgasfej_id AND fej.mozgasnem = 'ki'
JOIN legrand_gyartasi_lap AS gylap ON gylap.id = sor.gyartasi_lap_id
),
min_max AS (
SELECT gyartasi_lap_id,
min(create_date) AS min_date,
max(create_date) AS max_date,
sum(idoben_db) AS idoben_db ,
sum(idontul_db) AS idontul_db
FROM mozgassor
GROUP BY gyartasi_lap_id
)
UPDATE legrand_gyartasi_lap AS gylap
SET elso_teljesites = min_date,
utolso_teljesites = max_date,
hatarido_elott_db = idoben_db,
hatarido_utan_db = idontul_db
FROM min_max
WHERE gylap.id = min_max.gyartasi_lap_id
;
WITH
gylap_ids AS (
SELECT distinct gyartasi_lap_id
FROM legrand_mozgassor AS sor
JOIN legrand_mozgasfej AS fej ON fej.id = sor.mozgasfej_id AND fej.mozgasnem = 'ki'
),
stat AS (
SELECT id,
round(rendelt_ora/modositott_db*hatarido_elott_db, 2) AS hatarido_elott_ora,
round(rendelt_ora/modositott_db*hatarido_utan_db, 2) AS hatarido_utan_ora,
elso_teljesites - date(create_date) AS elsoig_eltelt_nap,
utolso_teljesites - date(create_date) AS utolsoig_eltelt_nap
FROM legrand_gyartasi_lap
JOIN gylap_ids ON gyartasi_lap_id = id
WHERE active AND modositott_db != 0 AND (hatarido_elott_db > 0 or hatarido_utan_db > 0)
)
UPDATE legrand_gyartasi_lap AS gylap
SET hatarido_elott_ora = stat.hatarido_elott_ora,
hatarido_utan_ora = stat.hatarido_utan_ora,
elsoig_eltelt_nap = stat.elsoig_eltelt_nap,
utolsoig_eltelt_nap = stat.utolsoig_eltelt_nap
FROM stat
WHERE stat.id = gylap.id
;
-- statisztika adatok lekérdezése
select id, elso_teljesites, utolso_teljesites, hatarido_elott_db, hatarido_utan_db, hatarido_elott_ora, hatarido_utan_ora, elsoig_eltelt_nap, utolsoig_eltelt_nap
from legrand_gyartasi_lap where elso_teljesites is not null limit 100
;
select termekcsoport, to_char(create_date, 'YYYY.MM') as honap, sum(rendelt_ora) as rendelt_ora, round(avg(elsoig_eltelt_nap), 1) as elsoig, round(avg(utolsoig_eltelt_nap), 1) as utolsoig
from legrand_gyartasi_lap where active and elsoig_eltelt_nap > 0 and hatralek_db = 0 and termekcsoport is not null
group by termekcsoport, to_char(create_date, 'YYYY.MM')
order by termekcsoport, to_char(create_date, 'YYYY.MM')
;
select termekcsoport, sum(rendelt_ora) as rendelt_ora, round(avg(elsoig_eltelt_nap), 1) as elsoig, round(avg(utolsoig_eltelt_nap), 1) as utolsoig
from legrand_gyartasi_lap where active and elsoig_eltelt_nap > 0 and hatralek_db = 0 and termekcsoport is not null
group by termekcsoport
order by termekcsoport
;
select termekkod, sum(rendelt_db) as rendelt_db, round(avg(elsoig_eltelt_nap), 1) as elsoig, round(avg(utolsoig_eltelt_nap), 1) as utolsoig
from legrand_gyartasi_lap where active and elsoig_eltelt_nap > 0 and hatralek_db = 0 and termekkod is not null
group by termekkod
order by termekkod
;
select termekcsoport, date(create_date) as felveve, round(avg(elsoig_eltelt_nap), 1) as elsoig, round(avg(utolsoig_eltelt_nap), 1) as utolsoig
from legrand_gyartasi_lap where active and elsoig_eltelt_nap > 0 and hatralek_db = 0 and termekcsoport is not null
group by termekcsoport, date(create_date)
order by termekcsoport, date(create_date)
;
select termekkod, date(create_date) as felveve, elsoig_eltelt_nap, utolsoig_eltelt_nap
from legrand_gyartasi_lap where active and elsoig_eltelt_nap > 0
order by termekkod, date(create_date)
;
-- statisztika adatok lekérdezése vége
select * from update_rel
order by max_id desc
limit 10
;
limit 100 ;
update legrand_cikk set cimke_e = true where cikknev ilike 'címke%' ;
delete from chance_mozgassor ;
alter sequence chance_mozgassor_id_seq RESTART WITH 1 ;
delete from chance_mozgasfej ;
alter sequence chance_mozgasfej_id_seq RESTART WITH 1 ;
-- Legrand árlista átvétele VIR-be
-- import impexbe
-- id keresés
WITH
arak as ( select imp.id, cikk.id as cikk_id from legrand_impex as imp join legrand_cikk as cikk on cikk.cikkszam ilike imp.cikkszam where imp.create_uid = 6)
update legrand_impex as imp set cikk_id = arak.cikk_id from arak where imp.create_uid = 6 and arak.id = imp.id
;
delete from legrand_impex as imp where imp.create_uid = 6 and imp.cikk_id is null
;
update legrand_cikk as cikk set bekerulesi_ar = imp.beepules from legrand_impex as imp where cikk.id = imp.cikk_id and imp.create_uid = 6 and imp.beepules != cikk.bekerulesi_ar
;
select imp.beepules, cikk.bekerulesi_ar from legrand_impex as imp join legrand_cikk as cikk on cikk.id = imp.cikk_id where imp.create_uid = 6 and imp.beepules != cikk.bekerulesi_ar
;
delete from legrand_impex as imp where imp.create_uid = 6
;
-- impex alapján cikktörzs árak és gyártási lap árak összevetése
select cikk.cikkszam, cikk.cikknev, cikk.bekerulesi_ar as cikk, dbj.bekerulesi_ar as gylap from legrand_impex as imp
join legrand_cikk as cikk on cikk.id = imp.cikk_id
join legrand_gylap_dbjegyzek as dbj on dbj.cikk_id = imp.cikk_id and dbj.gyartasi_lap_id = imp.gyartasi_lap_id
-- where cikk.bekerulesi_ar = dbj.bekerulesi_ar
;
eszkoz as ( select max(id) as max_id, eszkoz_id from leltar_eszkozatvetel where regi_hasznalo_id is null group by eszkoz_id having count(*) > 1 ),
eszkoz_elozok as ( select atvet.id as prev_id, eszkoz.* from leltar_eszkozatvetel as atvet, eszkoz where atvet.eszkoz_id = eszkoz.eszkoz_id and atvet.id < eszkoz.max_id ),
atvet_rel as (select eszkoz_id, max_id, max(prev_id) as prev_id from eszkoz_elozok group by eszkoz_id, max_id),
update_rel as (select atvet_rel.*, atvet.uj_hasznalo_id as prev_hasznalo_id from atvet_rel join leltar_eszkozatvetel as atvet on atvet_rel.prev_id = atvet.id)
update leltar_eszkozatvetel set regi_hasznalo_id = prev_hasznalo_id from update_rel where id = max_id
;
-- összes adat törlése
-- delete from datawh_files ;
-- alter sequence datawh_files_id_seq RESTART WITH 1 ;
-- delete from datawh_documents ;
-- alter sequence datawh_documents_id_seq RESTART WITH 1 ;
delete from legrand_mozgassor ;
alter sequence legrand_mozgassor_id_seq RESTART WITH 1 ;
delete from legrand_mozgasfej ;
alter sequence legrand_mozgasfej_id_seq RESTART WITH 1 ;
delete from legrand_meo_jkv_selejt ;
delete from legrand_meo_jegyzokonyv ;
delete from legrand_muveletvegzes ;
delete from legrand_gylap_szefo_muvelet ;
delete from legrand_gylap_dbjegyzek ;
delete from legrand_gylap_legrand_muvelet ;
delete from legrand_feljegyzes ;
delete from legrand_gylap_homogen ;
delete from legrand_anyagigeny ;
alter sequence legrand_anyagigeny_id_seq RESTART WITH 1 ;
delete from legrand_gyartasi_lap ;
alter sequence legrand_gyartasi_lap_id_seq RESTART WITH 1000 ;
delete from legrand_bom_line ;
alter sequence legrand_bom_line_id_seq RESTART WITH 1 ;
delete from legrand_bom ;
alter sequence legrand_bom_id_seq RESTART WITH 1 ;
-- delete from legrand_hely ;
delete from legrand_muvelet ;
delete from legrand_lezer_tampon ;
delete from legrand_hibakod ;
delete from legrand_homogen ;
delete from legrand_cikk ;
-- legrand_cikk feltöltése product_product-ból
insert into legrand_cikk (id, cikkszam, cikknev, alkatresz_e, bekerulesi_ar, active)
select id, CASE WHEN cikkszam is null THEN ltrim(split_part(name_template, '|', 1)) ELSE cikkszam END, ltrim(split_part(name_template, '|', 2)), anyag,
-- A következő select lassú, ezért lett ideiglenesen helyettesítve az alatta lévővel
-- (select bekerulesi_ar from raktar_darabjegyzek where product_product.id=product_id order by id desc limit 1), true from product_product
(select bekerulesi_ar from raktar_darabjegyzek where product_product.id=product_id limit 1), true from product_product
-- Saját összeállítású félkésztermékeket kivesszük, később néhány egyszeres beépüléssel bírót visszateszünk
where active and name_template not like 'referencia%' and name_template not like 'FLK%' and name_template not like 'GYV%' and name_template not like 'HF%'
and name_template not like 'MR%' and name_template not like 'NAU%' and name_template not like 'UHF%' and name_template not like 'VE%'
order by id ;
-- legrand_cikk feltöltése kiválasztott félkész termékekkel
WITH felkesz (regi_cikkszam, uj_cikkszam, uj_cikknev) AS (VALUES
('HFD001','SZF001','Hegesztett földelőérintkező /HFD001/'),
('HFD002','SZF002','Hegesztett földelőérintkező /HFD002/'),
('HFD003','SZF003','Hegesztett földelőérintkező /HFD003/'),
('HFD004','SZF004','Hegesztett földelőérintkező /HFD004/'),
('HFD005','SZF005','Hegesztett földelőérintkező /HFD005/'),
('HFD006','SZF006','Hegesztett földelőérintkező /HFD006/'),
('HFD007','SZF007','Hegesztett földelőérintkező /HFD007/'),
('HFD008','SZF008','Hegesztett földelőérintkező /HFD008/'),
('HFD009','SZF009','Hegesztett földelőérintkező /HFD009/'),
('HFD010','SZF010','Hegesztett földelőérintkező /HFD010/'),
('HFD011','SZF011','Hegesztett földelőérintkező /HFD011/'),
('HFS001','SZF012','Hegesztett fázisérintkező jobbos /HFS001/'),
('HFS002','SZF013','Hegesztett fázisérintkező balos /HFS002/'),
('HFS003','SZF014','Hegesztett fázisérintkező jobbos /HFS003/'),
('HFS004','SZF015','Hegesztett fázisérintkező balos /HFS004/'),
('HFS005','SZF016','Hegesztett fázisérintkező jobbos /HFS005/'),
('HFS006','SZF017','Hegesztett fázisérintkező balos /HFS006/'),
('HFS007','SZF018','Hegesztett fázisérintkező jobbos,balos /HFS007-HSF008/'),
('HFS013','SZF019','Hegesztett fázisérintkező jobbos /HFS013/'),
('HFS014','SZF020','Hegesztett fázisérintkező balos /HFS014/'),
('VE001','SZF021','Cseh null érintkező /VE001/'),
('VE002','SZF022','Cseh fázis érintkező /VE002/'),
('MR001','SZF101','M-Rugózott /MR001/'),
('VE016','SZF201','Csavarozott érintkező cariva /VE016/'),
('UHF001','SZF301','Ultrahangos fedelek /UHF001/'),
('UHF002','SZF302','Ultrahangos fedelek /UHF002/'),
('UHF004','SZF303','Ultrahangos fedelek /UHF004/'),
('UHF005','SZF304','Ultrahangos fedelek /UHF005/'),
('UHF006','SZF305','Ultrahangos fedelek /UHF006/'),
('UHF007','SZF306','Ultrahangos fedelek /UHF007/'),
('UHF008','SZF307','Ultrahangos fedelek /UHF008/'),
('UHF009','SZF308','Ultrahangos fedelek /UHF009/'),
('UHF010','SZF309','Ultrahangos fedelek /UHF010/'),
('UHF011','SZF310','Ultrahangos fedelek /UHF011/'),
('UHF014','SZF311','Ultrahangos fedelek /UHF014/'),
('GYV001','SZF401','Szerelt gyv /GYV001/'),
('GYV004','SZF402','Szerelt gyv VL /GYV004/'),
('GYV005','SZF403','Szerelt gyv VL /GYV005/'),
('GYV006','SZF404','Szerelt gyv Izrael /GYV006/'),
('GYV007','SZF405','Szerelt gyv /GYV007/'),
('GYV009','SZF406','Szerelt gyv nélküli kazetta /GYV009/'),
('NAU001','SZF501','Nausicaa szerelt betét /NAU001/'),
('NAU002','SZF502','Nausicaa szerelt betét /NAU002/'),
('NAU003','SZF503','Nausicaa szerelt betét /NAU003/'),
('NAU006','SZF504','Nausicaa szerelt betét /NAU006/'),
('NAU007','SZF505','Nausicaa szerelt betét /NAU007/'),
('NAU008','SZF506','Nausicaa szerelt betét /NAU008/'),
('FLK001','SZF601','(3.200.0040-00) Érintkező berakás /FLK001/')
)
insert into legrand_cikk (id, cikkszam, cikknev, alkatresz_e, bekerulesi_ar, active, szefo_cikk_e)
select product_product.id, uj_cikkszam, uj_cikknev, false, 0, true, true from felkesz
join product_product on cikkszam = regi_cikkszam ;
ALTER SEQUENCE legrand_cikk_id_seq RESTART WITH 3000 ;
-- bom feltöltése raktar_gyartasi_lap-ból
insert into legrand_bom (name, cikk_id, verzio, gylap_default_e, raktar_gylap_id)
select termekkod || ' késztermék', product_id, 'késztermék', true, id from raktar_gyartasi_lap
join (select termekkod as utkod, max(id) as utid from raktar_gyartasi_lap where rendelesszam not ilike 'j%' and active group by termekkod) as utgylap on id = utid ;
-- bom_line feltöltése raktar_darabjegyzek-ből
insert into legrand_bom_line (bom_id, cikk_id, beepules)
select legrand_bom.id, dbjegyzek.product_id, dbjegyzek.ossz_beepules / gylap.rendelt_db as beep from raktar_darabjegyzek as dbjegyzek
join (select termekkod as utkod, max(id) as utid from raktar_gyartasi_lap where rendelesszam not ilike 'j%' and active group by termekkod) as utgylap on gyartasi_lap_id = utid
join legrand_bom on raktar_gylap_id = gyartasi_lap_id
join raktar_gyartasi_lap as gylap on gylap.id = gyartasi_lap_id;
-- bom feltöltése anyagjegyzékből, kiválasztott félkész termékekre
WITH felkesz (regi_cikkszam, uj_cikkszam, uj_cikknev) AS (VALUES
('HFD001','SZF001','Hegesztett földelőérintkező /HFD001/'),
('HFD002','SZF002','Hegesztett földelőérintkező /HFD002/'),
('HFD003','SZF003','Hegesztett földelőérintkező /HFD003/'),
('HFD004','SZF004','Hegesztett földelőérintkező /HFD004/'),
('HFD005','SZF005','Hegesztett földelőérintkező /HFD005/'),
('HFD006','SZF006','Hegesztett földelőérintkező /HFD006/'),
('HFD007','SZF007','Hegesztett földelőérintkező /HFD007/'),
('HFD008','SZF008','Hegesztett földelőérintkező /HFD008/'),
('HFD009','SZF009','Hegesztett földelőérintkező /HFD009/'),
('HFD010','SZF010','Hegesztett földelőérintkező /HFD010/'),
('HFD011','SZF011','Hegesztett földelőérintkező /HFD011/'),
('HFS001','SZF012','Hegesztett fázisérintkező jobbos /HFS001/'),
('HFS002','SZF013','Hegesztett fázisérintkező balos /HFS002/'),
('HFS003','SZF014','Hegesztett fázisérintkező jobbos /HFS003/'),
('HFS004','SZF015','Hegesztett fázisérintkező balos /HFS004/'),
('HFS005','SZF016','Hegesztett fázisérintkező jobbos /HFS005/'),
('HFS006','SZF017','Hegesztett fázisérintkező balos /HFS006/'),
('HFS007','SZF018','Hegesztett fázisérintkező jobbos,balos /HFS007-HSF008/'),
('HFS013','SZF019','Hegesztett fázisérintkező jobbos /HFS013/'),
('HFS014','SZF020','Hegesztett fázisérintkező balos /HFS014/'),
('VE001','SZF021','Cseh null érintkező /VE001/'),
('VE002','SZF022','Cseh fázis érintkező /VE002/'),
('MR001','SZF101','M-Rugózott /MR001/'),
('VE016','SZF201','Csavarozott érintkező cariva /VE016/'),
('UHF001','SZF301','Ultrahangos fedelek /UHF001/'),
('UHF002','SZF302','Ultrahangos fedelek /UHF002/'),
('UHF004','SZF303','Ultrahangos fedelek /UHF004/'),
('UHF005','SZF304','Ultrahangos fedelek /UHF005/'),
('UHF006','SZF305','Ultrahangos fedelek /UHF006/'),
('UHF007','SZF306','Ultrahangos fedelek /UHF007/'),
('UHF008','SZF307','Ultrahangos fedelek /UHF008/'),
('UHF009','SZF308','Ultrahangos fedelek /UHF009/'),
('UHF010','SZF309','Ultrahangos fedelek /UHF010/'),
('UHF011','SZF310','Ultrahangos fedelek /UHF011/'),
('UHF014','SZF311','Ultrahangos fedelek /UHF014/'),
('GYV001','SZF401','Szerelt gyv /GYV001/'),
('GYV004','SZF402','Szerelt gyv VL /GYV004/'),
('GYV005','SZF403','Szerelt gyv VL /GYV005/'),
('GYV006','SZF404','Szerelt gyv Izrael /GYV006/'),
('GYV007','SZF405','Szerelt gyv /GYV007/'),
('GYV009','SZF406','Szerelt gyv nélküli kazetta /GYV009/'),
('NAU001','SZF501','Nausicaa szerelt betét /NAU001/'),
('NAU002','SZF502','Nausicaa szerelt betét /NAU002/'),
('NAU003','SZF503','Nausicaa szerelt betét /NAU003/'),
('NAU006','SZF504','Nausicaa szerelt betét /NAU006/'),
('NAU007','SZF505','Nausicaa szerelt betét /NAU007/'),
('NAU008','SZF506','Nausicaa szerelt betét /NAU008/'),
('FLK001','SZF601','(3.200.0040-00) Érintkező berakás /FLK001/')
)
insert into legrand_bom (name, cikk_id, verzio, gylap_default_e, beepul_e)
select uj_cikkszam || ' félkésztermék', legrand_cikk.id, 'félkésztermék', false, true from felkesz
join legrand_cikk on cikkszam = uj_cikkszam ;
-- bom_line feltöltése anyagjegyzékből, kiválasztott félkész termékekre
WITH felkesz (regi_cikkszam, uj_cikkszam, uj_cikknev) AS (VALUES
('HFD001','SZF001','Hegesztett földelőérintkező /HFD001/'),
('HFD002','SZF002','Hegesztett földelőérintkező /HFD002/'),
('HFD003','SZF003','Hegesztett földelőérintkező /HFD003/'),
('HFD004','SZF004','Hegesztett földelőérintkező /HFD004/'),
('HFD005','SZF005','Hegesztett földelőérintkező /HFD005/'),
('HFD006','SZF006','Hegesztett földelőérintkező /HFD006/'),
('HFD007','SZF007','Hegesztett földelőérintkező /HFD007/'),
('HFD008','SZF008','Hegesztett földelőérintkező /HFD008/'),
('HFD009','SZF009','Hegesztett földelőérintkező /HFD009/'),
('HFD010','SZF010','Hegesztett földelőérintkező /HFD010/'),
('HFD011','SZF011','Hegesztett földelőérintkező /HFD011/'),
('HFS001','SZF012','Hegesztett fázisérintkező jobbos /HFS001/'),
('HFS002','SZF013','Hegesztett fázisérintkező balos /HFS002/'),
('HFS003','SZF014','Hegesztett fázisérintkező jobbos /HFS003/'),
('HFS004','SZF015','Hegesztett fázisérintkező balos /HFS004/'),
('HFS005','SZF016','Hegesztett fázisérintkező jobbos /HFS005/'),
('HFS006','SZF017','Hegesztett fázisérintkező balos /HFS006/'),
('HFS007','SZF018','Hegesztett fázisérintkező jobbos,balos /HFS007-HSF008/'),
('HFS013','SZF019','Hegesztett fázisérintkező jobbos /HFS013/'),
('HFS014','SZF020','Hegesztett fázisérintkező balos /HFS014/'),
('VE001','SZF021','Cseh null érintkező /VE001/'),
('VE002','SZF022','Cseh fázis érintkező /VE002/'),
('MR001','SZF101','M-Rugózott /MR001/'),
('VE016','SZF201','Csavarozott érintkező cariva /VE016/'),
('UHF001','SZF301','Ultrahangos fedelek /UHF001/'),
('UHF002','SZF302','Ultrahangos fedelek /UHF002/'),
('UHF004','SZF303','Ultrahangos fedelek /UHF004/'),
('UHF005','SZF304','Ultrahangos fedelek /UHF005/'),
('UHF006','SZF305','Ultrahangos fedelek /UHF006/'),
('UHF007','SZF306','Ultrahangos fedelek /UHF007/'),
('UHF008','SZF307','Ultrahangos fedelek /UHF008/'),
('UHF009','SZF308','Ultrahangos fedelek /UHF009/'),
('UHF010','SZF309','Ultrahangos fedelek /UHF010/'),
('UHF011','SZF310','Ultrahangos fedelek /UHF011/'),
('UHF014','SZF311','Ultrahangos fedelek /UHF014/'),
('GYV001','SZF401','Szerelt gyv /GYV001/'),
('GYV004','SZF402','Szerelt gyv VL /GYV004/'),
('GYV005','SZF403','Szerelt gyv VL /GYV005/'),
('GYV006','SZF404','Szerelt gyv Izrael /GYV006/'),
('GYV007','SZF405','Szerelt gyv /GYV007/'),
('GYV009','SZF406','Szerelt gyv nélküli kazetta /GYV009/'),
('NAU001','SZF501','Nausicaa szerelt betét /NAU001/'),
('NAU002','SZF502','Nausicaa szerelt betét /NAU002/'),
('NAU003','SZF503','Nausicaa szerelt betét /NAU003/'),
('NAU006','SZF504','Nausicaa szerelt betét /NAU006/'),
('NAU007','SZF505','Nausicaa szerelt betét /NAU007/'),
('NAU008','SZF506','Nausicaa szerelt betét /NAU008/'),
('FLK001','SZF601','(3.200.0040-00) Érintkező berakás /FLK001/')
)
insert into legrand_bom_line (bom_id, cikk_id, beepules)
select legrand_bom.id, mrp_bom_line.product_id, mrp_bom_line.product_qty from felkesz
join legrand_cikk on legrand_cikk.cikkszam = uj_cikkszam
join legrand_bom on legrand_bom.cikk_id = legrand_cikk.id
join mrp_bom on mrp_bom.product_tmpl_id = legrand_cikk.id
join mrp_bom_line on mrp_bom_line.bom_id = mrp_bom.id ;
-- lezer_tampon feltöltése raktar_lezer_tampon-ból
insert into legrand_lezer_tampon (muvelet, termekkod, termek_id, alkatresz, alkatresz_id, pozicio, rajz_felirat, muvelet_db, megjegyzes)
select muvelet, termekkod, termek_id, alkatresz, alkatresz_id, pozicio, rajz_felirat, muvelet_db, megjegyzes from raktar_lezer_tampon order by id ;
-- hibakod feltöltése raktar_hibakod-ból
insert into legrand_hibakod (name, kod, nev, active)
select name, kod, nev, active from raktar_hibakod order by kod ;
-- homogen feltöltése sajathomogen-ből
insert into legrand_homogen (homogen, homogennev, sajat_homogen)
select homogen, nev, true from raktar_sajathomogen order by homogen ;
--######################################################################################################################################################## Egyebek ###
-- mozgasfej feltöltése picking-ből
delete from legrand_mozgassor ;
delete from legrand_mozgasfej ;
insert into legrand_mozgasfej (id, state, mozgasnem, forrashely_id, celallomas_id, forrasdokumentum, megjegyzes)
select id, state, mozgas, 1, 4, forrasdokumentum, megjegyzes from raktar_picking where mozgas = 'be' order by id;
insert into legrand_mozgasfej (id, state, mozgasnem, forrashely_id, celallomas_id, forrasdokumentum, megjegyzes)
select id, state, mozgas, 4, 1, forrasdokumentum, megjegyzes from raktar_picking where mozgas in ('ki', 'vissza', 'selejt') order by id;
insert into legrand_mozgasfej (id, state, mozgasnem, forrashely_id, celallomas_id, forrasdokumentum, megjegyzes)
select id, state, 'belso', 4, 5, forrasdokumentum, megjegyzes from raktar_picking where mozgas in ('belso', 'szall') order by id;
alter sequence legrand_mozgasfej_id_seq RESTART WITH 10000 ;
-- mozgassor feltöltése move-ból
alter sequence legrand_mozgassor_id_seq RESTART WITH 1 ;
insert into legrand_mozgassor (mozgasfej_id, mozgasfej_sorszam, cikk_id, mennyiseg, megjegyzes)
select raktar_picking_id, raktar_picking_id, product_id, product_uom_qty, megjegyzes from raktar_move order by id;
-- Szállított félkész termékek összegyűjtése
\o out.txt
select referencia, sum(mennyiseg) from (
select p.name_template as referencia, m.product_uom_qty as mennyiseg from raktar_move as m join product_product as p on m.product_id = p.id
where active and (
name_template like 'referencia%' or name_template like 'FLK%' or name_template like 'GYV%' or name_template like 'HF%' or
name_template like 'MR%' or name_template like 'NAU%' or name_template like 'UHF%' or name_template like 'VE%'
)
) as szall
group by referencia
order by referencia
;
\q
-- virtual table
select * from ( values ('egy','ketto'), ('3','4') ) as t (colname1, colname2);
WITH temp (k,v) AS (VALUES (0,-9999), (1, 100)) SELECT * FROM temp;
#########################################################################################
delete from legrand_anyaghiany_log ;
INSERT INTO legrand_anyaghiany_log (create_date, datum, cikk_id, szefo_keszlet, mterv_igeny, gyartas_igeny, mterv_gyartas_elter, gyartas_elter)
SELECT now(), now(), cikk_id, szefo_keszlet, mterv_igeny, gyartas_igeny, mterv_gyartas_elter, gyartas_elter
FROM legrand_anyaghiany
WHERE mterv_gyartas_elter < 0
ORDER BY cikk_id
;
delete from legrand_gyartasi_lap_log ;
INSERT INTO legrand_gyartasi_lap_log (datum, create_uid, create_date, write_uid, write_date, gyartasi_lap_id, state, gyartasi_hely_id, rendelesszam, termekkod, hatarido,
hatralek_db, rendelt_ora, teljesitett_ora, hatralek_ora, szamlazott_ora, szamlazhato_ora, termekcsoport, leallas_ok, aktivitas, leallas_felelos)
SELECT now(), create_uid, create_date, write_uid, write_date, id, state, gyartasi_hely_id, rendelesszam, termekkod, hatarido,
hatralek_db, rendelt_ora, teljesitett_ora, hatralek_ora, szamlazott_ora, szamlazhato_ora, termekcsoport, leallas_ok, aktivitas, leallas_felelos
FROM legrand_gyartasi_lap
WHERE state IN ('mterv', 'gyartas') AND active
ORDER BY id
;
update legrand_gyartasi_lap set aktivitas = '' where aktivitas = 'mind' ;
update legrand_gyartasi_lap set aktivitas = 'folyamatban' where aktivitas = 'foly' ;
update legrand_gyartasi_lap set aktivitas = 'áll' where aktivitas = 'all' ;
update legrand_gyartasi_lap_log set aktivitas = '' where aktivitas = 'mind' ;
update legrand_gyartasi_lap_log set aktivitas = 'folyamatban' where aktivitas = 'foly' ;
update legrand_gyartasi_lap_log set aktivitas = 'áll' where aktivitas = 'all' ;
WITH
anyag AS (
SELECT state, cikk_id, SUM(hatralek) AS hatralek FROM legrand_anyagszukseglet GROUP BY state, cikk_id
),
igeny AS (
SELECT keszlet.cikk_id, keszlet.szefo_keszlet,
CASE WHEN gyartas.state IS NULL THEN 0.0 ELSE gyartas.hatralek END AS gyartas_igeny,
CASE WHEN mterv.state IS NULL THEN 0.0 ELSE mterv.hatralek END AS mterv_igeny
FROM legrand_vall_keszlet AS keszlet
LEFT JOIN anyag AS gyartas ON gyartas.cikk_id = keszlet.cikk_id AND gyartas.state = 'gyartas'
LEFT JOIN anyag AS mterv ON mterv.cikk_id = keszlet.cikk_id AND mterv.state = 'mterv'
),
elter AS (
SELECT cikk_id, szefo_keszlet, gyartas_igeny, mterv_igeny, szefo_keszlet - gyartas_igeny AS gyartas_elter , szefo_keszlet - gyartas_igeny - mterv_igeny AS mterv_gyartas_elter FROM igeny
)
-- SELECT row_number() over() AS id, elter.* FROM elter WHERE mterv_gyartas_elter < 0 AND gyartas_igeny + mterv_igeny > 0
SELECT row_number() over() AS id, elter.* FROM elter WHERE gyartas_igeny + mterv_igeny > 0
;
WITH
eszkoz as ( select max(id) as max_id, eszkoz_id from leltar_eszkozatvetel where regi_hasznalo_id is null group by eszkoz_id having count(*) > 1 ),
eszkoz_elozok as ( select atvet.id as prev_id, eszkoz.* from leltar_eszkozatvetel as atvet, eszkoz where atvet.eszkoz_id = eszkoz.eszkoz_id and atvet.id < eszkoz.max_id ),
atvet_rel as (select eszkoz_id, max_id, max(prev_id) as prev_id from eszkoz_elozok group by eszkoz_id, max_id),
update_rel as (select atvet_rel.*, atvet.uj_hasznalo_id as prev_hasznalo_id from atvet_rel join leltar_eszkozatvetel as atvet on atvet_rel.prev_id = atvet.id)
update leltar_eszkozatvetel set regi_hasznalo_id = prev_hasznalo_id from update_rel where id = max_id
;
select * from update_rel
order by max_id desc
limit 10
;
|
-- MySQL dump 10.13 Distrib 5.7.26, for osx10.10 (x86_64)
--
-- Host: 127.0.0.1 Database: laraclassified
-- ------------------------------------------------------
-- Server version 5.7.26
/*!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 */;
--
-- Dumping data for table `<<prefix>>subadmin1`
--
/*!40000 ALTER TABLE `<<prefix>>subadmin1` DISABLE KEYS */;
INSERT INTO `<<prefix>>subadmin1` (`code`, `country_code`, `name`, `asciiname`, `active`) VALUES ('GG.6417213','GG','St Pierre du Bois','St Pierre du Bois',1);
INSERT INTO `<<prefix>>subadmin1` (`code`, `country_code`, `name`, `asciiname`, `active`) VALUES ('GG.6417214','GG','Torteval','Torteval',1);
INSERT INTO `<<prefix>>subadmin1` (`code`, `country_code`, `name`, `asciiname`, `active`) VALUES ('GG.6417215','GG','Saint Saviour','Saint Saviour',1);
INSERT INTO `<<prefix>>subadmin1` (`code`, `country_code`, `name`, `asciiname`, `active`) VALUES ('GG.6417223','GG','Forest','Forest',1);
INSERT INTO `<<prefix>>subadmin1` (`code`, `country_code`, `name`, `asciiname`, `active`) VALUES ('GG.6417224','GG','St Martin','St Martin',1);
INSERT INTO `<<prefix>>subadmin1` (`code`, `country_code`, `name`, `asciiname`, `active`) VALUES ('GG.6417226','GG','Saint Andrew','Saint Andrew',1);
INSERT INTO `<<prefix>>subadmin1` (`code`, `country_code`, `name`, `asciiname`, `active`) VALUES ('GG.6417228','GG','St Peter Port','St Peter Port',1);
INSERT INTO `<<prefix>>subadmin1` (`code`, `country_code`, `name`, `asciiname`, `active`) VALUES ('GG.6417229','GG','Castel','Castel',1);
INSERT INTO `<<prefix>>subadmin1` (`code`, `country_code`, `name`, `asciiname`, `active`) VALUES ('GG.6417230','GG','Vale','Vale',1);
INSERT INTO `<<prefix>>subadmin1` (`code`, `country_code`, `name`, `asciiname`, `active`) VALUES ('GG.6417233','GG','St Sampson','St Sampson',1);
INSERT INTO `<<prefix>>subadmin1` (`code`, `country_code`, `name`, `asciiname`, `active`) VALUES ('GG.8989934','GG','Alderney','Alderney',1);
/*!40000 ALTER TABLE `<<prefix>>subadmin1` ENABLE KEYS */;
--
-- Dumping data for table `<<prefix>>subadmin2`
--
/*!40000 ALTER TABLE `<<prefix>>subadmin2` DISABLE KEYS */;
/*!40000 ALTER TABLE `<<prefix>>subadmin2` ENABLE KEYS */;
--
-- Dumping data for table `<<prefix>>cities`
--
/*!40000 ALTER TABLE `<<prefix>>cities` DISABLE KEYS */;
INSERT INTO `<<prefix>>cities` (`country_code`, `name`, `asciiname`, `longitude`, `latitude`, `feature_class`, `feature_code`, `subadmin1_code`, `subadmin2_code`, `population`, `time_zone`, `active`, `created_at`, `updated_at`) VALUES ('GG','Torteval','Torteval',-2.65,49.4333,'P','PPLA','GG.6417214',NULL,0,'Europe/Guernsey',1,'2016-11-02 23:00:00','2016-11-02 23:00:00');
INSERT INTO `<<prefix>>cities` (`country_code`, `name`, `asciiname`, `longitude`, `latitude`, `feature_class`, `feature_code`, `subadmin1_code`, `subadmin2_code`, `population`, `time_zone`, `active`, `created_at`, `updated_at`) VALUES ('GG','Saint Sampson','Saint Sampson',-2.52333,49.4839,'P','PPLA','GG.6417233',NULL,0,'Europe/Guernsey',1,'2016-11-02 23:00:00','2016-11-02 23:00:00');
INSERT INTO `<<prefix>>cities` (`country_code`, `name`, `asciiname`, `longitude`, `latitude`, `feature_class`, `feature_code`, `subadmin1_code`, `subadmin2_code`, `population`, `time_zone`, `active`, `created_at`, `updated_at`) VALUES ('GG','Saint Peter Port','Saint Peter Port',-2.53527,49.4598,'P','PPLC','GG.6417228',NULL,16488,'Europe/Guernsey',1,'2019-09-04 23:00:00','2019-09-04 23:00:00');
INSERT INTO `<<prefix>>cities` (`country_code`, `name`, `asciiname`, `longitude`, `latitude`, `feature_class`, `feature_code`, `subadmin1_code`, `subadmin2_code`, `population`, `time_zone`, `active`, `created_at`, `updated_at`) VALUES ('GG','St Anne','St Anne',-2.20757,49.7155,'P','PPLA','GG.8989934',NULL,0,'Europe/Guernsey',1,'2016-11-02 23:00:00','2016-11-02 23:00:00');
INSERT INTO `<<prefix>>cities` (`country_code`, `name`, `asciiname`, `longitude`, `latitude`, `feature_class`, `feature_code`, `subadmin1_code`, `subadmin2_code`, `population`, `time_zone`, `active`, `created_at`, `updated_at`) VALUES ('GG','Saint Saviour','Saint Saviour',-2.63583,49.4569,'P','PPLA','GG.6417215',NULL,0,'Europe/Guernsey',1,'2016-11-02 23:00:00','2016-11-02 23:00:00');
INSERT INTO `<<prefix>>cities` (`country_code`, `name`, `asciiname`, `longitude`, `latitude`, `feature_class`, `feature_code`, `subadmin1_code`, `subadmin2_code`, `population`, `time_zone`, `active`, `created_at`, `updated_at`) VALUES ('GG','Castel','Castel',-2.60015,49.4676,'P','PPLA','GG.6417229',NULL,0,'Europe/Guernsey',1,'2016-11-02 23:00:00','2016-11-02 23:00:00');
INSERT INTO `<<prefix>>cities` (`country_code`, `name`, `asciiname`, `longitude`, `latitude`, `feature_class`, `feature_code`, `subadmin1_code`, `subadmin2_code`, `population`, `time_zone`, `active`, `created_at`, `updated_at`) VALUES ('GG','S<NAME>','Saint Andrew',-2.58018,49.4439,'P','PPLA','GG.6417226',NULL,0,'Europe/Guernsey',1,'2019-07-18 23:00:00','2019-07-18 23:00:00');
INSERT INTO `<<prefix>>cities` (`country_code`, `name`, `asciiname`, `longitude`, `latitude`, `feature_class`, `feature_code`, `subadmin1_code`, `subadmin2_code`, `population`, `time_zone`, `active`, `created_at`, `updated_at`) VALUES ('GG','St Martin','St Martin',-2.55479,49.4371,'P','PPLA','GG.6417224',NULL,0,'Europe/Guernsey',1,'2016-11-02 23:00:00','2016-11-02 23:00:00');
/*!40000 ALTER TABLE `<<prefix>>cities` ENABLE KEYS */;
/*!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
|
<reponame>wasimsadiq77/healthrediction<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 22, 2021 at 07:29 PM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 8.0.3
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: `cbhms`
--
-- --------------------------------------------------------
--
-- Table structure for table `complaint`
--
CREATE TABLE `complaint` (
`id` int(11) NOT NULL,
`username` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`doctorname` varchar(255) NOT NULL,
`type` varchar(255) NOT NULL,
`problem` varchar(255) NOT NULL,
`symptoms` varchar(255) NOT NULL,
`age` varchar(255) NOT NULL,
`since` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `complaint`
--
INSERT INTO `complaint` (`id`, `username`, `email`, `doctorname`, `type`, `problem`, `symptoms`, `age`, `since`) VALUES
(19, 'Wasim', '<EMAIL>', 'sad', 'mobile health', 'Cold ', 'Cough', '12', '2'),
(20, 'Yamini', '<EMAIL>', 'sad', 'Load store', 'Ovarian disorder ', 'Fat, acne and stressed ', '25', '1month '),
(22, 'Pooja', '<EMAIL>', 'Dr. Poo', 'mobile health', 'Sore throat ', 'Sore throat ', '5', '1 day '),
(23, 'yam', '<EMAIL>', 'sad', 'remote patient monitoring', 'cough', 'headache', '26', '5days'),
(24, 'Naziya', '<EMAIL>', 'Dr. Poo', 'live', 'Fever', 'Leg pain', '20', '2 days'),
(25, 'sadiqvasim', '<EMAIL>', 'sad', 'mobile health', 'fever ', 'cough', '26', '8days'),
(26, 'admin', '<EMAIL>', 'admin', 'mobile health', 'diabetes', 'obesity', '52', '15');
-- --------------------------------------------------------
--
-- Table structure for table `doctorlogin`
--
CREATE TABLE `doctorlogin` (
`id` int(11) NOT NULL,
`username` varchar(50) NOT NULL,
`password` varchar(255) NOT NULL,
`special` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`created_at` datetime DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `doctorlogin`
--
INSERT INTO `doctorlogin` (`id`, `username`, `password`, `special`, `email`, `created_at`) VALUES
(5, 'sad', <PASSWORD>', 'gyno', '<EMAIL>', '2020-03-24 01:47:44'),
(9, 'Dr. Poo', '$2y$10$D515vZnkgM6Qj82gVzAPd.1FznH8WxCltNB5T/MEgDtP30kPGA/Sy', 'Paediatrics', '<EMAIL>', '2020-06-03 11:12:20'),
(10, 'pooja', '$2y$10$6sPvpWl2E.6vmZls9oKSmOvF6pfrhWGolpQ7fSTViDqbMx8j2C9dy', 'physician', '<EMAIL>', '2020-06-03 23:31:11'),
(11, 'pooooo', '$2y$10$GuQx7iwyJEB.K7RG.esLC.3ZLuatYsTtrqOJeDdv101Kx6sRr6Dt.', 'pysician', '<EMAIL>', '2020-08-27 02:56:53'),
(12, 'abc', '$2y$10$rVqTs9pjUwa3Nyz8/GciA.GCX2fTxdRo/rsmyPR5RTOYNKQP0EXPK', 'general', '<EMAIL>', '2020-09-19 06:45:10'),
(13, 'admin', '$2y$10$v6Vj5fmfqhLXvQIjPzuEluQjTogaAKWjpwdOOpgki7nuHVp8I.SXe', 'gp', '<EMAIL>', '2021-05-25 19:22:43'),
(14, 'admin1', '$2y$10$j6NghW1OmvZ/BJybQi4yj.KcZ0rnriuq9VQgdltxeTBu5SWbzXzPq', 'general physician', '<EMAIL>', '2021-06-07 16:45:21');
-- --------------------------------------------------------
--
-- Table structure for table `flu`
--
CREATE TABLE `flu` (
`id` int(11) NOT NULL,
`age` int(3) DEFAULT NULL,
`fever` int(5) DEFAULT NULL,
`cough` int(5) DEFAULT NULL,
`chills` int(6) DEFAULT NULL,
`dehydration` int(11) DEFAULT NULL,
`fatigue` int(7) DEFAULT NULL,
`vomiting` int(8) DEFAULT NULL,
`diarrhea` int(8) DEFAULT NULL,
`headache` int(8) DEFAULT NULL,
`chestpain` int(10) DEFAULT NULL,
`runny` int(17) DEFAULT NULL,
`sorethroat` int(11) DEFAULT NULL,
`asthma` int(6) DEFAULT NULL,
`diabetes` int(8) DEFAULT NULL,
`heartdisease` int(13) DEFAULT NULL,
`lungdisease` int(12) DEFAULT NULL,
`flu` int(3) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `flu`
--
INSERT INTO `flu` (`id`, `age`, `fever`, `cough`, `chills`, `dehydration`, `fatigue`, `vomiting`, `diarrhea`, `headache`, `chestpain`, `runny`, `sorethroat`, `asthma`, `diabetes`, `heartdisease`, `lungdisease`, `flu`) VALUES
(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(2, 25, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(3, 45, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 1, 0, 1),
(4, 26, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(5, 27, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(6, 19, 39, 14, 4, 1, 10, 1, 1, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(7, 27, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(8, 27, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(9, 55, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 1, 0, 0, 1),
(10, 25, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(11, 25, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(12, 26, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(13, 26, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(14, 20, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(15, 22, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(16, 18, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(17, 29, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(18, 47, 31, 7, 2, 0, 10, 0, 1, 2, 2, 1, 1, 0, 0, 0, 0, 0),
(19, 45, 30, 7, 2, 0, 10, 0, 1, 2, 2, 1, 1, 0, 0, 0, 0, 0),
(20, 46, 30, 7, 2, 0, 10, 0, 1, 2, 2, 1, 1, 0, 0, 0, 0, 0),
(21, 48, 30, 7, 2, 0, 10, 0, 1, 2, 2, 1, 1, 0, 0, 0, 0, 0),
(22, 45, 31, 7, 2, 0, 10, 0, 1, 2, 2, 1, 1, 0, 0, 0, 0, 0),
(23, 47, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(24, 48, 33, 7, 2, 0, 10, 0, 0, 2, 2, 1, 1, 0, 0, 0, 0, 0),
(25, 45, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(26, 46, 30, 7, 1, 0, 10, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(27, 47, 31, 4, 2, 0, 10, 0, 0, 2, 2, 1, 1, 0, 0, 0, 0, 0),
(28, 49, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 1, 0, 0, 0, 0, 1),
(29, 47, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(30, 29, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(31, 21, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(32, 21, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(33, 27, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(34, 21, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(35, 28, 32, 7, 2, 1, 10, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(36, 27, 30, 7, 2, 1, 10, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(37, 25, 30, 7, 2, 1, 10, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(38, 22, 32, 7, 2, 1, 10, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(39, 20, 30, 7, 2, 1, 10, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(40, 26, 31, 7, 2, 1, 10, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(41, 27, 30, 7, 2, 1, 10, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(42, 27, 32, 7, 2, 1, 10, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(43, 22, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 1, 0, 0, 0, 0, 1),
(44, 25, 31, 4, 1, 0, 10, 1, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(45, 20, 30, 7, 2, 0, 5, 0, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0),
(46, 28, 30, 7, 2, 0, 5, 0, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0),
(47, 22, 30, 4, 1, 0, 5, 0, 1, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(48, 25, 30, 7, 2, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(49, 27, 32, 7, 2, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(50, 20, 40, 14, 4, 0, 10, 0, 0, 6, 4, 0, 1, 0, 0, 0, 0, 1),
(51, 21, 40, 14, 4, 0, 10, 0, 0, 6, 4, 0, 1, 0, 0, 0, 0, 1),
(52, 24, 31, 4, 1, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(53, 18, 30, 4, 1, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(54, 29, 30, 7, 2, 0, 5, 0, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0),
(55, 25, 30, 4, 1, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(56, 27, 39, 14, 4, 1, 10, 0, 0, 6, 4, 1, 1, 0, 0, 0, 0, 1),
(57, 24, 39, 14, 4, 1, 10, 0, 0, 6, 4, 1, 1, 0, 0, 0, 0, 1),
(58, 5, 30, 4, 1, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(59, 28, 30, 4, 1, 0, 5, 0, 0, 2, 2, 1, 1, 0, 0, 0, 0, 0),
(60, 10, 32, 7, 2, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(61, 18, 30, 4, 1, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(62, 27, 30, 7, 2, 0, 5, 0, 0, 2, 2, 1, 0, 0, 0, 0, 0, 0),
(63, 2, 39, 14, 4, 0, 10, 1, 1, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(64, 12, 30, 7, 2, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(65, 15, 39, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(66, 66, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 1, 0, 0, 1),
(67, 8, 39, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(68, 2, 39, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(69, 11, 32, 7, 2, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(70, 16, 30, 4, 1, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(71, 27, 30, 7, 2, 0, 5, 0, 0, 2, 2, 1, 0, 0, 0, 0, 0, 0),
(72, 4, 39, 14, 4, 0, 10, 1, 1, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(73, 17, 30, 7, 2, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(74, 12, 39, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(75, 68, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 1, 0, 0, 1),
(76, 7, 40, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(77, 2, 39, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(78, 14, 33, 7, 2, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(79, 18, 30, 4, 1, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(80, 27, 30, 7, 2, 0, 5, 0, 0, 2, 2, 1, 0, 0, 0, 0, 0, 0),
(81, 5, 39, 14, 4, 0, 10, 1, 1, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(82, 16, 30, 7, 2, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(83, 12, 39, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(84, 70, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 1, 0, 0, 1),
(85, 6, 40, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(86, 2, 39, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(87, 49, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 1, 0, 0, 0, 0, 1),
(88, 47, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(89, 29, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(90, 21, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(91, 21, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(92, 27, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(93, 21, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(94, 28, 32, 7, 2, 1, 10, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(95, 27, 30, 7, 2, 1, 10, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(96, 50, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 1, 0, 0, 1),
(97, 67, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 1, 1, 0, 1),
(98, 25, 30, 7, 2, 0, 5, 0, 0, 2, 2, 1, 0, 1, 0, 0, 0, 0),
(99, 28, 30, 7, 2, 0, 5, 0, 0, 2, 2, 1, 0, 0, 1, 0, 0, 0),
(100, 6, 40, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(101, 25, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(102, 45, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 1, 0, 1),
(103, 26, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(104, 27, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(105, 19, 39, 14, 4, 1, 10, 1, 1, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(106, 27, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(107, 27, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(108, 55, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 1, 0, 0, 1),
(109, 25, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(110, 25, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(111, 49, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 1, 0, 0, 0, 0, 1),
(112, 47, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(113, 29, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(114, 21, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(115, 21, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(116, 27, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(117, 21, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(118, 28, 32, 7, 2, 1, 10, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(119, 27, 30, 7, 2, 1, 10, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(120, 10, 32, 7, 2, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(121, 18, 30, 4, 1, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(122, 27, 30, 7, 2, 0, 5, 0, 0, 2, 2, 1, 0, 0, 0, 0, 0, 0),
(123, 2, 40, 14, 4, 0, 10, 1, 1, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(124, 12, 30, 7, 2, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(125, 15, 39, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(126, 66, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 1, 0, 0, 1),
(127, 8, 40, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(128, 2, 39, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(129, 11, 32, 7, 2, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(130, 16, 30, 4, 1, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(131, 27, 30, 7, 2, 0, 5, 0, 0, 2, 2, 1, 0, 0, 0, 0, 0, 0),
(132, 4, 40, 14, 4, 0, 10, 1, 1, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(133, 17, 30, 7, 2, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(134, 12, 39, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(135, 68, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 1, 0, 0, 1),
(136, 7, 40, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(137, 2, 40, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(138, 14, 32, 7, 2, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(139, 18, 30, 4, 1, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(140, 27, 30, 7, 2, 0, 5, 0, 0, 2, 2, 1, 0, 0, 0, 0, 0, 0),
(141, 5, 40, 14, 4, 0, 10, 1, 1, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(142, 16, 30, 7, 2, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(143, 12, 39, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(144, 70, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 1, 0, 0, 1),
(145, 6, 40, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(146, 2, 40, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(147, 49, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 1, 0, 0, 0, 0, 1),
(148, 47, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(149, 29, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(150, 21, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(151, 21, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(152, 27, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(153, 21, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(154, 28, 32, 7, 2, 1, 10, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(155, 27, 30, 7, 2, 1, 10, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(156, 50, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 1, 0, 0, 1),
(157, 67, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 1, 1, 0, 1),
(158, 25, 30, 7, 2, 0, 5, 0, 0, 2, 2, 1, 0, 1, 0, 0, 0, 0),
(159, 28, 30, 7, 2, 0, 5, 0, 0, 2, 2, 1, 0, 0, 1, 0, 0, 0),
(160, 6, 40, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(161, 25, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(162, 45, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 1, 0, 1),
(163, 26, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(164, 27, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(165, 19, 39, 14, 4, 1, 10, 1, 1, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(166, 27, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(167, 27, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(168, 55, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 1, 0, 0, 1),
(169, 25, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(170, 25, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(171, 49, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 1, 0, 0, 0, 0, 1),
(172, 47, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(173, 29, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(174, 21, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(175, 21, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(176, 27, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(177, 21, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(178, 28, 32, 7, 2, 1, 10, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(179, 27, 30, 7, 2, 1, 10, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(180, 25, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(181, 45, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 1, 0, 1),
(182, 26, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(183, 27, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(184, 19, 39, 14, 4, 1, 10, 1, 1, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(185, 27, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(186, 27, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(187, 55, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 1, 0, 0, 1),
(188, 25, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(189, 28, 30, 7, 2, 0, 5, 0, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0),
(190, 22, 30, 4, 1, 0, 5, 0, 1, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(191, 25, 30, 7, 2, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(192, 27, 32, 7, 2, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(193, 20, 40, 14, 4, 0, 10, 0, 0, 6, 4, 0, 1, 0, 0, 0, 0, 1),
(194, 21, 40, 14, 4, 0, 10, 0, 0, 6, 4, 0, 1, 0, 0, 0, 0, 1),
(195, 24, 31, 4, 1, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(196, 18, 30, 4, 1, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(197, 29, 30, 7, 2, 0, 5, 0, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0),
(198, 25, 30, 4, 1, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(199, 27, 40, 14, 4, 1, 10, 0, 0, 6, 4, 1, 1, 0, 0, 0, 0, 1),
(200, 24, 40, 14, 4, 1, 10, 0, 0, 6, 4, 1, 1, 0, 0, 0, 0, 1),
(201, 5, 30, 4, 1, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(202, 28, 30, 4, 1, 0, 5, 0, 0, 2, 2, 1, 1, 0, 0, 0, 0, 0),
(203, 10, 32, 7, 2, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(204, 18, 30, 4, 1, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(205, 27, 30, 7, 2, 0, 5, 0, 0, 2, 2, 1, 0, 0, 0, 0, 0, 0),
(206, 2, 40, 14, 4, 0, 10, 1, 1, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(207, 12, 30, 7, 2, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(208, 15, 39, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(209, 66, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 1, 0, 0, 1),
(210, 8, 40, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(211, 2, 40, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(212, 21, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(213, 27, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(214, 21, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(215, 28, 32, 7, 2, 1, 10, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(216, 27, 30, 7, 2, 1, 10, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(217, 50, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 1, 0, 0, 1),
(218, 67, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 1, 1, 0, 1),
(219, 25, 30, 7, 2, 0, 5, 0, 0, 2, 2, 1, 0, 1, 0, 0, 0, 0),
(220, 28, 30, 7, 2, 0, 5, 0, 0, 2, 2, 1, 0, 0, 1, 0, 0, 0),
(221, 6, 40, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(222, 25, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(223, 45, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 1, 0, 1),
(224, 26, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(225, 27, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(226, 19, 39, 14, 4, 1, 10, 1, 1, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(227, 27, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(228, 27, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(229, 55, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 1, 0, 0, 1),
(230, 25, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(231, 25, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(232, 25, 30, 4, 1, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(233, 27, 39, 14, 4, 1, 10, 0, 0, 6, 4, 1, 1, 0, 0, 0, 0, 1),
(234, 24, 40, 14, 4, 1, 10, 0, 0, 6, 4, 1, 1, 0, 0, 0, 0, 1),
(235, 5, 30, 4, 1, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(236, 28, 30, 4, 1, 0, 5, 0, 0, 2, 2, 1, 1, 0, 0, 0, 0, 0),
(237, 10, 32, 7, 2, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(238, 18, 30, 4, 1, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(239, 27, 30, 7, 2, 0, 5, 0, 0, 2, 2, 1, 0, 0, 0, 0, 0, 0),
(240, 2, 39, 14, 4, 0, 10, 1, 1, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(241, 12, 30, 7, 2, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(242, 15, 39, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(243, 66, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 1, 0, 0, 1),
(244, 8, 40, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(245, 2, 39, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(246, 11, 32, 7, 2, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(247, 16, 30, 4, 1, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(248, 27, 30, 7, 2, 0, 5, 0, 0, 2, 2, 1, 0, 0, 0, 0, 0, 0),
(249, 4, 40, 14, 4, 0, 10, 1, 1, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(250, 17, 30, 7, 2, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(251, 12, 40, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(252, 68, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 1, 0, 0, 1),
(253, 55, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 1, 0, 0, 1),
(254, 25, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(255, 25, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(256, 26, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(257, 26, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(258, 20, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(259, 22, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(260, 18, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(261, 29, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(262, 47, 31, 7, 2, 0, 10, 0, 1, 2, 2, 1, 1, 0, 0, 0, 0, 0),
(263, 45, 30, 7, 2, 0, 10, 0, 1, 2, 2, 1, 1, 0, 0, 0, 0, 0),
(264, 46, 30, 7, 2, 0, 10, 0, 1, 2, 2, 1, 1, 0, 0, 0, 0, 0),
(265, 48, 30, 7, 2, 0, 10, 0, 1, 2, 2, 1, 1, 0, 0, 0, 0, 0),
(266, 45, 31, 7, 2, 0, 10, 0, 1, 2, 2, 1, 1, 0, 0, 0, 0, 0),
(267, 47, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(268, 48, 33, 7, 2, 0, 10, 0, 0, 2, 2, 1, 1, 0, 0, 0, 0, 0),
(269, 45, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(270, 46, 30, 7, 1, 0, 10, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(271, 47, 31, 4, 2, 0, 10, 0, 0, 2, 2, 1, 1, 0, 0, 0, 0, 0),
(272, 2, 39, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(273, 11, 32, 7, 2, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(274, 16, 30, 4, 1, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(275, 27, 30, 7, 2, 0, 5, 0, 0, 2, 2, 1, 0, 0, 0, 0, 0, 0),
(276, 4, 40, 14, 4, 0, 10, 1, 1, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(277, 17, 30, 7, 2, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(278, 12, 39, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(279, 68, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 1, 0, 0, 1),
(280, 7, 39, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(281, 2, 39, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(282, 14, 32, 7, 2, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(283, 18, 30, 4, 1, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(284, 27, 30, 7, 2, 0, 5, 0, 0, 2, 2, 1, 0, 0, 0, 0, 0, 0),
(285, 5, 40, 14, 4, 0, 10, 1, 1, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(286, 16, 30, 7, 2, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(287, 12, 40, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(288, 70, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 1, 0, 0, 1),
(289, 6, 40, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(290, 2, 39, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(291, 49, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 1, 0, 0, 0, 0, 1),
(292, 22, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 1, 0, 0, 0, 0, 1),
(293, 25, 31, 4, 1, 0, 10, 1, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(294, 20, 30, 7, 2, 0, 5, 0, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0),
(295, 28, 30, 7, 2, 0, 5, 0, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0),
(296, 22, 30, 4, 1, 0, 5, 0, 1, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(297, 25, 30, 7, 2, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(298, 27, 32, 7, 2, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(299, 20, 40, 14, 4, 0, 10, 0, 0, 6, 4, 0, 1, 0, 0, 0, 0, 1),
(300, 21, 40, 14, 4, 0, 10, 0, 0, 6, 4, 0, 1, 0, 0, 0, 0, 1),
(301, 24, 31, 4, 1, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(302, 18, 30, 4, 1, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(303, 29, 30, 7, 2, 0, 5, 0, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0),
(304, 25, 30, 4, 1, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(305, 27, 39, 14, 4, 1, 10, 0, 0, 6, 4, 1, 1, 0, 0, 0, 0, 1),
(306, 24, 40, 14, 4, 1, 10, 0, 0, 6, 4, 1, 1, 0, 0, 0, 0, 1),
(307, 5, 30, 4, 1, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(308, 28, 30, 4, 1, 0, 5, 0, 0, 2, 2, 1, 1, 0, 0, 0, 0, 0),
(309, 10, 32, 7, 2, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(310, 18, 30, 4, 1, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(311, 27, 30, 7, 2, 0, 5, 0, 0, 2, 2, 1, 0, 0, 0, 0, 0, 0),
(312, 2, 40, 14, 4, 0, 10, 1, 1, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(313, 12, 30, 7, 2, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(314, 15, 40, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(315, 66, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 1, 0, 0, 1),
(316, 8, 39, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(317, 2, 40, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(318, 49, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 1, 0, 0, 0, 0, 1),
(319, 47, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(320, 29, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(321, 21, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(322, 21, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(323, 27, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(324, 21, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(325, 28, 32, 7, 2, 1, 10, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(326, 27, 30, 7, 2, 1, 10, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(327, 50, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 1, 0, 0, 1),
(328, 67, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 1, 1, 0, 1),
(329, 25, 30, 7, 2, 0, 5, 0, 0, 2, 2, 1, 0, 1, 0, 0, 0, 0),
(330, 28, 30, 7, 2, 0, 5, 0, 0, 2, 2, 1, 0, 0, 1, 0, 0, 0),
(331, 6, 40, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(332, 25, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(333, 45, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 1, 0, 1),
(334, 26, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(335, 27, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(336, 19, 39, 14, 4, 1, 10, 1, 1, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(337, 27, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(338, 27, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(339, 55, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 1, 0, 0, 1),
(340, 25, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(341, 25, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(342, 49, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 1, 0, 0, 0, 0, 1),
(343, 47, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(344, 29, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(345, 28, 30, 4, 1, 0, 5, 0, 0, 2, 2, 1, 1, 0, 0, 0, 0, 0),
(346, 10, 32, 7, 2, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(347, 18, 30, 4, 1, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(348, 27, 30, 7, 2, 0, 5, 0, 0, 2, 2, 1, 0, 0, 0, 0, 0, 0),
(349, 2, 40, 14, 4, 0, 10, 1, 1, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(350, 12, 30, 7, 2, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(351, 15, 40, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(352, 66, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 1, 0, 0, 1),
(353, 8, 40, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(354, 2, 39, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(355, 21, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(356, 27, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(357, 21, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(358, 28, 32, 7, 2, 1, 10, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(359, 27, 30, 7, 2, 1, 10, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(360, 50, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 1, 0, 0, 1),
(361, 67, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 1, 1, 0, 1),
(362, 25, 30, 7, 2, 0, 5, 0, 0, 2, 2, 1, 0, 1, 0, 0, 0, 0),
(363, 26, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(364, 27, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(365, 19, 39, 14, 4, 1, 10, 1, 1, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(366, 27, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(367, 27, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(368, 55, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 1, 0, 0, 1),
(369, 25, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(370, 25, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(371, 26, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(372, 26, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(373, 20, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(374, 22, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(375, 18, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(376, 29, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(377, 47, 31, 7, 2, 0, 10, 0, 1, 2, 2, 1, 1, 0, 0, 0, 0, 0),
(378, 45, 30, 7, 2, 0, 10, 0, 1, 2, 2, 1, 1, 0, 0, 0, 0, 0),
(379, 46, 30, 7, 2, 0, 10, 0, 1, 2, 2, 1, 1, 0, 0, 0, 0, 0),
(380, 48, 30, 7, 2, 0, 10, 0, 1, 2, 2, 1, 1, 0, 0, 0, 0, 0),
(381, 45, 31, 7, 2, 0, 10, 0, 1, 2, 2, 1, 1, 0, 0, 0, 0, 0),
(382, 47, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(383, 48, 33, 7, 2, 0, 10, 0, 0, 2, 2, 1, 1, 0, 0, 0, 0, 0),
(384, 45, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(385, 46, 30, 7, 1, 0, 10, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(386, 47, 31, 4, 2, 0, 10, 0, 0, 2, 2, 1, 1, 0, 0, 0, 0, 0),
(387, 49, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 1, 0, 0, 0, 0, 1),
(388, 47, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(389, 12, 30, 7, 2, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(390, 15, 40, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(391, 66, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 1, 0, 0, 1),
(392, 8, 39, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(393, 2, 39, 14, 4, 1, 10, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1),
(394, 11, 32, 7, 2, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(395, 16, 30, 4, 1, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(396, 27, 30, 7, 2, 0, 5, 0, 0, 2, 2, 1, 0, 0, 0, 0, 0, 0),
(397, 55, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 1, 0, 0, 1),
(398, 25, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(399, 25, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(400, 26, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(401, 26, 39, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(402, 20, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(403, 22, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(404, 18, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(405, 29, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(406, 47, 31, 7, 2, 0, 10, 0, 1, 2, 2, 1, 1, 0, 0, 0, 0, 0),
(407, 45, 30, 7, 2, 0, 10, 0, 1, 2, 2, 1, 1, 0, 0, 0, 0, 0),
(408, 46, 30, 7, 2, 0, 10, 0, 1, 2, 2, 1, 1, 0, 0, 0, 0, 0),
(409, 48, 30, 7, 2, 0, 10, 0, 1, 2, 2, 1, 1, 0, 0, 0, 0, 0),
(410, 45, 31, 7, 2, 0, 10, 0, 1, 2, 2, 1, 1, 0, 0, 0, 0, 0),
(411, 47, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(412, 48, 33, 7, 2, 0, 10, 0, 0, 2, 2, 1, 1, 0, 0, 0, 0, 0),
(413, 45, 40, 14, 4, 1, 10, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 1),
(414, 46, 30, 7, 1, 0, 10, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0),
(415, 47, 31, 4, 2, 0, 10, 0, 0, 2, 2, 1, 1, 0, 0, 0, 0, 0);
-- --------------------------------------------------------
--
-- Table structure for table `patientlogin`
--
CREATE TABLE `patientlogin` (
`id` int(11) NOT NULL,
`username` varchar(50) NOT NULL,
`password` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`created_at` datetime DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `patientlogin`
--
INSERT INTO `patientlogin` (`id`, `username`, `password`, `email`, `created_at`) VALUES
(6, 'sad', <PASSWORD>$<PASSWORD>gI/JxD6Xogv..9CMF5rM6LwOExIW6mbdJ8e7hGFuriwy', '', '2020-03-11 08:41:40'),
(13, 'sadiq12', '$2y$10$myQY/1fg5Gf2fJ0zqpD9meNDSkYMe.QwrgqHGpv58MSl05Seg1N7O', '<EMAIL>', '2020-06-03 02:19:31'),
(14, 'Wasim', '$2y$10$O1/Pu8mW2tbwK7s.uCPT0OmG5yBHO1FPnKse7dNdvHqwWTucF8dAm', '<EMAIL>', '2020-06-03 11:06:42'),
(15, 'Pooja', '$2y$10$mPpM2BvjVG7UqAkv.1a0Teym1a8UHcn3NlIejLVwvxOI3Nw3QjST6', '<EMAIL>', '2020-06-03 11:09:47'),
(16, 'Yamini', '$2y$10$d4jkkanWZgLZaL7bFeKOh.6hHvJagg23J1Dv.tG8czgi21L1yg7p2', '<EMAIL>', '2020-06-03 11:10:59'),
(17, 'shamsiyavasim', '$2y$10$bAsg.LybAvPPP4p6CNTk1.sEQUeKKoVSwD3iNVZP52zgYDFvsEkCm', '<EMAIL>', '2020-06-03 11:13:48'),
(18, 'yam', '$2y$10$9GUuoR4K9gn05OFf1nEBUO7UP9X5DTko5Z3s9FGxAC50BLY6m0ENe', '<EMAIL>', '2020-06-03 23:26:58'),
(19, 'Naziya', '$2y$10$EUF4AM8QDCqyLhp/w102UePQEzBvNbNYZIMU5BKOaLVA0hMNYligC', '<EMAIL>', '2020-06-16 09:22:53'),
(20, 'sadiqvasim', '$2y$10$dfUb/EniIoVpNdHNe3Ea6O.ReMERfBLYueeXIZdRkn6KiSVaBU8EG', '<EMAIL>', '2020-08-27 02:53:53'),
(21, 'sadiq', '$2y$10$/NzTmWcnqoOVbaa.YvVxT.0MoN5mXMr.Mhjo1VWW3ZqwO6XGv2XzS', '<EMAIL>', '2021-01-08 12:13:08'),
(22, 'sadiq123', '$2y$10$udoBdKm8Yc/pHFwSZN6..OkxusO8fXe7sadxEtb/eauMQzQYVt1jS', '<EMAIL>', '2021-01-08 20:33:03'),
(23, 'Wasimsadiq', '$2y$10$B5oNXzrQzuNuxNv5O.PD/e5risCOldaT5QNJDMq32JW7nxZtrnR2.', '<EMAIL>', '2021-04-06 22:46:13'),
(24, 'admin', '$2y$10$7bgo2fD5ff56FdycFHO.h.HPnuVGqZQN03vyD5YizYbS1iB1T98ZG', '<EMAIL>', '2021-05-12 09:31:28');
-- --------------------------------------------------------
--
-- Table structure for table `quickconsult`
--
CREATE TABLE `quickconsult` (
`id` int(11) NOT NULL,
`username` varchar(50) NOT NULL,
`email` varchar(50) NOT NULL,
`type` varchar(50) NOT NULL,
`age` int(50) NOT NULL,
`fever` int(50) NOT NULL,
`cough` int(50) NOT NULL,
`chills` int(50) NOT NULL,
`dehydration` int(50) NOT NULL,
`fatigue` int(50) NOT NULL,
`vomiting` int(50) NOT NULL,
`diarrhea` int(50) NOT NULL,
`headache` int(50) NOT NULL,
`chestpain` int(50) NOT NULL,
`runny` int(50) NOT NULL,
`sorethroat` int(50) NOT NULL,
`asthma` int(50) NOT NULL,
`diabetes` int(50) NOT NULL,
`heartdisease` int(50) NOT NULL,
`lungdisease` int(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `quickconsult`
--
INSERT INTO `quickconsult` (`id`, `username`, `email`, `type`, `age`, `fever`, `cough`, `chills`, `dehydration`, `fatigue`, `vomiting`, `diarrhea`, `headache`, `chestpain`, `runny`, `sorethroat`, `asthma`, `diabetes`, `heartdisease`, `lungdisease`) VALUES
(1, 'admin', '<EMAIL>', '', 25, 32, 12, 14, 4, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5),
(2, 'admin', '<EMAIL>', '', 25, 32, 12, 14, 4, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5),
(3, 'admin', '<EMAIL>', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
--
-- Indexes for dumped tables
--
--
-- Indexes for table `complaint`
--
ALTER TABLE `complaint`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `doctorlogin`
--
ALTER TABLE `doctorlogin`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `username` (`username`);
--
-- Indexes for table `flu`
--
ALTER TABLE `flu`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `patientlogin`
--
ALTER TABLE `patientlogin`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `username` (`username`);
--
-- Indexes for table `quickconsult`
--
ALTER TABLE `quickconsult`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `complaint`
--
ALTER TABLE `complaint`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=27;
--
-- AUTO_INCREMENT for table `doctorlogin`
--
ALTER TABLE `doctorlogin`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;
--
-- AUTO_INCREMENT for table `flu`
--
ALTER TABLE `flu`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=416;
--
-- AUTO_INCREMENT for table `patientlogin`
--
ALTER TABLE `patientlogin`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=25;
--
-- AUTO_INCREMENT for table `quickconsult`
--
ALTER TABLE `quickconsult`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
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 */;
|
<filename>DSEscuela/sql/schooldb.sql
CREATE DATABASE dsschool;
USE dsschool;
CREATE TABLE students (
id_student INTEGER NOT NULL AUTO_INCREMENT,
regtag VARCHAR(45) NOT NULL,
groupa VARCHAR(45) NOT NULL,
name VARCHAR(45) NOT NULL,
last_name VARCHAR(45) NOT NULL,
ml_name VARCHAR(45) NOT NULL,
address VARCHAR(45) NOT NULL,
Hphone INT NOT NULL,
email VARCHAR(45) NOT NULL,
birthdate DATE NOT NULL,
sex VARCHAR(45) NOT NULL,
regdate TIMESTAMP NOT NULL,
PRIMARY KEY(id_student)
);
|
SELECT conn.session_id, host_name, program_name,
nt_domain, login_name, connect_time, last_request_end_time
FROM sys.dm_exec_sessions AS sess
JOIN sys.dm_exec_connections AS conn
ON sess.session_id = conn.session_id;
|
<filename>line_items_per_invoice.sql<gh_stars>0
SELECT i.invoiceId, COUNT(i.InvoiceLineId) as NumberOfLines
FROM InvoiceLine i
GROUP BY i.InvoiceId
|
SELECT acc.location, count(*)
FROM
site as s,
so_user as u1,
question as q1,
answer as a1,
tag as t1,
tag_question as tq1,
badge as b,
account as acc
WHERE
s.site_id = q1.site_id
AND s.site_id = u1.site_id
AND s.site_id = a1.site_id
AND s.site_id = t1.site_id
AND s.site_id = tq1.site_id
AND s.site_id = b.site_id
AND q1.id = tq1.question_id
AND q1.id = a1.question_id
AND a1.owner_user_id = u1.id
AND t1.id = tq1.tag_id
AND b.user_id = u1.id
AND acc.id = u1.account_id
AND (s.site_name in ('stackoverflow'))
AND (t1.name in ('android-gridview','android-preferences','google-docs','graph-theory','hadoop2','loading','ms-access-2013','point','remote-server','runnable'))
AND (q1.view_count >= 100)
AND (q1.view_count <= 100000)
AND (u1.downvotes >= 10)
AND (u1.downvotes <= 100000)
AND (b.name in ('Altruist','Analytical','Lifejacket','Mortarboard','Outspoken','Synonymizer'))
GROUP BY acc.location
ORDER BY COUNT(*)
DESC
LIMIT 100
|
<filename>lexers/t/testdata/transactsql_declare.sql<gh_stars>0
DECLARE @find VARCHAR(30);
|
<reponame>JohnLBevan/EdinburghFringe
create procedure sp_GetSinglePerformanceEventSupplementaryInfoById (@Id as bigint)
as
begin
set nocount on
select top 1 Id, PerformanceEventId, SupplementaryInfoId
from PerformanceEventSupplementaryInfo
where Id = @Id
option (fast 1)
end
|
CREATE TABLE [dbo].[tbl_stg_Jira_Status_Category]
(
[Status_Category_Id] [int] NOT NULL,
[Name] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Key] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Color_Name] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Refresh_Id] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[tbl_stg_Jira_Status_Category] ADD CONSTRAINT [PK_tbl_stg_Jira_Status_Category] PRIMARY KEY CLUSTERED ([Status_Category_Id]) ON [PRIMARY]
GO
GRANT INSERT ON [dbo].[tbl_stg_Jira_Status_Category] TO [JiraRefreshRole]
GO
|
<reponame>peace-shillong/Computer-Applications-Theory-and-Practical-Part-2<gh_stars>0
--calling the procedure gr_3nos
set serveroutput on
begin
gr_3nos(11,11,11);
end;
|
<reponame>darkdrei/Inventario
create type descripcion as (articulo integer ,cantidad real);
|
<reponame>sayler3/Burger<gh_stars>0
INSERT INTO burgers (burger_name) VALUES ('Salmon burger');
INSERT INTO burgers (burger_name) VALUES ('BBQ bacon burger');
INSERT INTO burgers (burger_name) VALUES ('Beyond burger');
|
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Creato il: Lug 08, 2021 alle 19:21
-- Versione del server: 10.4.18-MariaDB
-- Versione PHP: 8.0.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `hw2`
--
-- --------------------------------------------------------
--
-- Struttura della tabella `elements`
--
CREATE TABLE `elements` (
`ID` int(11) NOT NULL,
`nome_utente` varchar(100) NOT NULL,
`id_prodotto` int(11) NOT NULL,
`titolo` varchar(200) DEFAULT NULL,
`link_immagine` varchar(200) DEFAULT NULL,
`prezzo` float DEFAULT NULL,
`quantita` int(11) DEFAULT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`updated_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Struttura della tabella `orders`
--
CREATE TABLE `orders` (
`ID` int(11) NOT NULL,
`nome_utente` varchar(255) DEFAULT NULL,
`n_ordine` int(11) DEFAULT NULL,
`prezzo_tot` float DEFAULT NULL,
`id_prodotto` int(11) DEFAULT NULL,
`titolo` varchar(100) DEFAULT NULL,
`link_immagine` varchar(200) DEFAULT NULL,
`quantita` int(11) DEFAULT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`updated_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dump dei dati per la tabella `orders`
--
INSERT INTO `orders` (`ID`, `nome_utente`, `n_ordine`, `prezzo_tot`, `id_prodotto`, `titolo`, `link_immagine`, `quantita`, `created_at`, `updated_at`) VALUES
(11, 'admin', 1, 3.38, 2, '<NAME> Cecco', 'img/taglioliniDeCecco.jpg', 2, '2021-07-08 13:38:54', '2021-07-08 13:38:54'),
(12, 'admin', 2, 8.96, 3, 'Hamburger di pollo AIA', 'img/hamburgerDiPolloAIA.jpg', 2, '2021-07-08 13:47:08', '2021-07-08 13:47:08'),
(13, 'admin', 2, 8.96, 4, '<NAME>', 'img/involtiniDiPistacchioGlorioso.jpg', 1, '2021-07-08 13:47:08', '2021-07-08 13:47:08'),
(14, 'admin', 2, 8.96, 5, 'Bastoncini Findus 6pz.', 'img/bastonciniFindus.jpg', 1, '2021-07-08 13:47:08', '2021-07-08 13:47:08'),
(15, 'marco01', 1, 8.25, 2, 'Tagliolini De Cecco', 'img/taglioliniDeCecco.jpg', 2, '2021-07-08 14:02:48', '2021-07-08 14:02:48'),
(16, 'marco01', 1, 8.25, 1, '<NAME> 1kg', 'img/barillaPenneRigate1kg.jpg', 2, '2021-07-08 14:02:48', '2021-07-08 14:02:48'),
(17, 'marco01', 1, 8.25, 3, 'Hamburger di pollo AIA', 'img/hamburgerDiPolloAIA.jpg', 1, '2021-07-08 14:02:48', '2021-07-08 14:02:48');
-- --------------------------------------------------------
--
-- Struttura della tabella `products`
--
CREATE TABLE `products` (
`ID` int(11) NOT NULL,
`titolo` varchar(100) DEFAULT NULL,
`link_immagine` varchar(200) DEFAULT NULL,
`prezzo` float DEFAULT NULL,
`descrizione` varchar(300) DEFAULT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`updated_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dump dei dati per la tabella `products`
--
INSERT INTO `products` (`ID`, `titolo`, `link_immagine`, `prezzo`, `descrizione`, `created_at`, `updated_at`) VALUES
(1, '<NAME> 1kg', 'img/barillaPenneRigate1kg.jpg', 1.29, 'Penne rigate Barilla confezione da 1kg', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(2, '<NAME>', 'img/taglioliniDeCecco.jpg', 1.69, 'Tagliolini n.206 De Cecco lenta essiccazione 500g', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(3, 'Hamburger di pollo AIA', 'img/hamburgerDiPolloAIA.jpg', 2.29, 'Hamburger di pollo AIA 300g', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(4, 'Involtini Glorioso', 'img/involtiniDiPistacchioGlorioso.jpg', 2.89, 'Involtini di carne di manzo con granella di pistacchio 6pz', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(5, 'Bastoncini Findus 6pz.', 'img/bastonciniFindus.jpg', 1.49, 'Bastoncini Findus 6pz 150g', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(6, '<NAME>', 'img/tonnoRioMare.jpg', 2.49, 'Tonno Rio Mare in scatola 30g 4pz', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(7, '<NAME>', 'img/icebergBonduelle.jpg', 0.99, '<NAME> 200g', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(8, '<NAME>', 'img/tofuValsoia.jpg', 1.89, '<NAME>ia 100% vegetale 250g', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(9, 'Coca-Cola 1,5L', 'img/cocacola1,5L.jpg', 3.99, 'Coca-Cola 6 bottiglie 1,5L', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(10, 'Fanta 1,5L', 'img/fanta1,5L.jpg', 3.79, 'Fanta orange 6 bottiglie 1,5L', '0000-00-00 00:00:00', '0000-00-00 00:00:00');
-- --------------------------------------------------------
--
-- Struttura della tabella `reviews`
--
CREATE TABLE `reviews` (
`ID` int(11) NOT NULL,
`id_prodotto` int(11) DEFAULT NULL,
`nome_utente` varchar(50) DEFAULT NULL,
`commento` varchar(1024) DEFAULT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`updated_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dump dei dati per la tabella `reviews`
--
INSERT INTO `reviews` (`ID`, `id_prodotto`, `nome_utente`, `commento`, `created_at`, `updated_at`) VALUES
(6, 2, 'admin', 'La pasta piu\' buona del mondo', '2021-07-08 10:41:11', '2021-07-08 10:41:11'),
(7, 1, 'admin', 'Mi piace', '2021-07-08 10:41:22', '2021-07-08 10:41:22'),
(8, 3, 'admin', 'Questi hamburger sono delizioni!', '2021-07-08 12:18:18', '2021-07-08 12:18:18'),
(9, 3, 'marco01', 'I più buoni del mondo.', '2021-07-08 14:02:41', '2021-07-08 14:02:41');
-- --------------------------------------------------------
--
-- Struttura della tabella `users`
--
CREATE TABLE `users` (
`ID` int(11) NOT NULL,
`nome` varchar(30) NOT NULL,
`cognome` varchar(30) NOT NULL,
`indirizzo` varchar(60) NOT NULL,
`cellulare` varchar(15) NOT NULL,
`username` varchar(30) NOT NULL,
`password` varchar(30) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`updated_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dump dei dati per la tabella `users`
--
INSERT INTO `users` (`ID`, `nome`, `cognome`, `indirizzo`, `cellulare`, `username`, `password`, `created_at`, `updated_at`) VALUES
(10, 'Cristian', 'Cataldo', 'Via Orlando 30', '3668405202', 'admin', 'admin', '2021-07-07 15:54:21', '2021-07-07 15:54:21'),
(11, 'marco', 'barbagallo', 'Via Litteri 40', '123123123123', 'marco01', 'fozzacatania!', '2021-07-07 13:56:26', '2021-07-07 13:56:26');
--
-- Indici per le tabelle scaricate
--
--
-- Indici per le tabelle `elements`
--
ALTER TABLE `elements`
ADD PRIMARY KEY (`ID`,`nome_utente`,`id_prodotto`),
ADD KEY `nomeUtente` (`nome_utente`);
--
-- Indici per le tabelle `orders`
--
ALTER TABLE `orders`
ADD PRIMARY KEY (`ID`);
--
-- Indici per le tabelle `products`
--
ALTER TABLE `products`
ADD PRIMARY KEY (`ID`);
--
-- Indici per le tabelle `reviews`
--
ALTER TABLE `reviews`
ADD PRIMARY KEY (`ID`);
--
-- Indici per le tabelle `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`ID`,`username`),
ADD UNIQUE KEY `username` (`username`);
--
-- AUTO_INCREMENT per le tabelle scaricate
--
--
-- AUTO_INCREMENT per la tabella `elements`
--
ALTER TABLE `elements`
MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21;
--
-- AUTO_INCREMENT per la tabella `orders`
--
ALTER TABLE `orders`
MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18;
--
-- AUTO_INCREMENT per la tabella `products`
--
ALTER TABLE `products`
MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
--
-- AUTO_INCREMENT per la tabella `reviews`
--
ALTER TABLE `reviews`
MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;
--
-- AUTO_INCREMENT per la tabella `users`
--
ALTER TABLE `users`
MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=38;
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 */;
|
<gh_stars>1-10
-- Use demo database
use __json
CREATE TYPE Neo4j
EXTERNAL NAME PolyService.[PolyService.Service.Neo4j];
GO
DECLARE @neo4j AS dbo.Neo4j = N'http://t4.cloudapp.net:7474/db/data/transaction/commit'
SET @neo4j = @neo4j.SetNamePass('ty','ty')
DECLARE @result nvarchar(max);
SET @result = @neo4j.ExecuteQuery('MATCH (nineties:Movie) RETURN nineties')
SELECT @result
SELECT * FROM OPENJSON(@result, '$.results[0].data') with (title nvarchar(100) '$.row[0].title', released int '$.row[0].released')
GO
DECLARE @neo4j AS dbo.Neo4j = N'http://t4.cloudapp.net:7474/db/data/transaction/commit'
SET @neo4j = @neo4j.SetNamePass('ty','ty')
declare @response nvarchar(max) = (
@neo4j.MatchPattern('(@tom) -[@r1]-> (movie) <-[@r2]- (director)')
.Node('tom').WithProperty('name','<NAME>')
.Relationship('r1').AsType('ACTED_IN')
.Relationship('r2').AsType('DIRECTED')
.Returns('movie.title, director.name, id(director)')
.Run())
select * FROM openjson(@response, '$.results[0].data') with (title nvarchar(100) '$.row[0]', title nvarchar(100) '$.row[1]', id int '$.row[2]')
GO
DECLARE @neo4j AS dbo.Neo4j = N'http://t4.cloudapp.net:7474/db/data/transaction/commit'
SET @neo4j = @neo4j.SetNamePass('ty','ty')
declare @response nvarchar(max) = (@neo4j.MatchPattern('(@kevin) -[@r]- (co_actor)') --MatchPattern('(@kevin) -[@r]-> (movie) <-[@r]- (co_actor)')
.Node('kevin').WithProperty('name','<NAME>')
.Relationship('r').AsType('ACTED_IN*2')
.Returns('id(co_actor),co_actor.name')
.Run())
SELECT @response
select * FROM openjson(@response, '$.results[0].data') with (id int '$.row[0]', actor nvarchar(100) '$.row[1]')
GO
DECLARE @neo4j AS dbo.Neo4j = N'http://t4.cloudapp.net:7474/db/data/transaction/commit'
SET @neo4j = @neo4j.SetNamePass('ty','ty')
declare @response nvarchar(max) = (@neo4j.MatchPattern('(actor) -[@r]-> (movie)')
.Relationship('r').AsType('ACTED_IN')
.WithVar('actor, count(movie) as MovieCount')
.OrderBy('MovieCount DESC')
.Limit(10)
.Returns('id(actor),actor.name, MovieCount')
.Run()
)
SELECT @response
select * FROM openjson(@response, '$.results[0].data') with (id int '$.row[0]', actor nvarchar(100) '$.row[1]', MovieCount int '$.row[2]')
GO
DROP TYPE Neo4j
|
<filename>src/Basics/Get_Current_SQL_Version.sql
-- Author: <NAME>, <EMAIL>
-- Output: Gives you a quick summary for current sql server and operating system with version and architecture informations.
-- Sample: Microsoft SQL Server 2017 (RTM-GDR) (KB4505224) - 14.0.2027.2 (X64) etc...
select @@VERSION as V
|
<reponame>quchunguang/test<gh_stars>1-10
-----------------------------
-- Querying a Table:
-- A SELECT statement is used for retrieving data. The basic syntax is
-- SELECT columns FROM tables WHERE predicates.
-----------------------------
-- A simple one would be:
SELECT * FROM weather;
-- You may also specify expressions in the target list. (The 'AS column'
-- specifies the column name of the result. It is optional.)
SELECT city, (temp_hi+temp_lo)/2 AS temp_avg, date FROM weather;
-- If you want to retrieve rows that satisfy certain condition (i.e., a
-- restriction), specify the condition in WHERE. The following retrieves
-- the weather of San Francisco on rainy days.
SELECT *
FROM weather
WHERE city = 'San Francisco'
AND prcp > 0.0;
-- Here is a more complicated one. Duplicates are removed when DISTINCT is
-- specified. ORDER BY specifies the column to sort on. (Just to make sure the
-- following won't confuse you, DISTINCT and ORDER BY can be used separately.)
SELECT DISTINCT city
FROM weather
ORDER BY city;
-----------------------------
-- Joins Between Tables:
-- queries can access multiple tables at once or access the same table
-- in such a way that multiple instances of the table are being processed
-- at the same time.
-----------------------------
-- The following joins the weather table and the cities table.
SELECT *
FROM weather, cities
WHERE city = name;
-- This prevents a duplicate city name column:
SELECT city, temp_lo, temp_hi, prcp, date, location
FROM weather, cities
WHERE city = name;
-- since the column names are all different, we don't have to specify the
-- table name. If you want to be clear, you can do the following. They give
-- identical results, of course.
SELECT weather.city, weather.temp_lo, weather.temp_hi, weather.prcp, weather.date, cities.location
FROM weather, cities
WHERE cities.name = weather.city;
-- JOIN syntax
SELECT *
FROM weather JOIN cities ON (weather.city = cities.name);
-- Outer join
SELECT *
FROM weather LEFT OUTER JOIN cities ON (weather.city = cities.name);
-- Suppose we want to find all the records that are in the temperature range
-- of other records. W1 and W2 are aliases for weather.
SELECT W1.city, W1.temp_lo, W1.temp_hi,
W2.city, W2.temp_lo, W2.temp_hi
FROM weather W1, weather W2
WHERE W1.temp_lo < W2.temp_lo
and W1.temp_hi > W2.temp_hi;
-----------------------------
-- Aggregate Functions
-----------------------------
SELECT max(temp_lo)
FROM weather;
SELECT city FROM weather
WHERE temp_lo = (SELECT max(temp_lo) FROM weather);
-- Aggregate with GROUP BY
SELECT city, max(temp_lo)
FROM weather
GROUP BY city;
-- ... and HAVING
SELECT city, max(temp_lo)
FROM weather
GROUP BY city
HAVING max(temp_lo) < 40;
-----------------------------
-- Updates:
-- An UPDATE statement is used for updating data.
-----------------------------
-- Suppose you discover the temperature readings are all off by 2 degrees as
-- of Nov 28, you may update the data as follow:
UPDATE weather
SET temp_hi = temp_hi - 2, temp_lo = temp_lo - 2
WHERE date > '1994-11-28';
SELECT * FROM weather;
-----------------------------
-- Deletions:
-- A DELETE statement is used for deleting rows from a table.
-----------------------------
-- Suppose you are no longer interested in the weather of Hayward, then you can
-- do the following to delete those rows from the table.
DELETE FROM weather WHERE city = 'Hayward';
SELECT * FROM weather;
-- You can also delete all the rows in a table by doing the following. (This
-- is different from DROP TABLE which removes the table in addition to the
-- removing the rows.)
DELETE FROM weather;
SELECT * FROM weather;
|
<filename>ifs-data-layer/ifs-data-service/src/main/resources/db/migration/V238_1__Update_subsidy_control_ktp_terms_and_conditions_v2.sql
-- IFS-10325 ktp subsidy control t&cs update
SET @system_maintenance_user_id = (
SELECT id
FROM user
WHERE email = '<EMAIL>');
INSERT INTO terms_and_conditions (name, template, version, type, created_by, created_on, modified_by, modified_on)
VALUES ('Knowledge Transfer Partnership (KTP) - Subsidy control', 'ktp-subsidy-control-terms-and-conditions-v2', 2, 'GRANT',
@system_maintenance_user_id, now(), @system_maintenance_user_id, now());
|
-- 23.05.2017 18:41:47
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_SysConfig (AD_Client_ID,AD_Org_ID,AD_SysConfig_ID,ConfigurationLevel,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,541147,'S',TO_TIMESTAMP('2017-05-23 18:41:47','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.payment.esr','Y','de.metas.payment.esr.MatchOrg',TO_TIMESTAMP('2017-05-23 18:41:47','YYYY-MM-DD HH24:MI:SS'),100,'Y')
;
-- 23.05.2017 19:31:21
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_SysConfig (AD_Client_ID,AD_Org_ID,AD_SysConfig_ID,ConfigurationLevel,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,541148,'S',TO_TIMESTAMP('2017-05-23 19:31:21','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.payment.esr','Y','de.metas.payment.esr.CheckDuplicated',TO_TIMESTAMP('2017-05-23 19:31:21','YYYY-MM-DD HH24:MI:SS'),100,'N')
;
|
-- start_ignore
SET gp_create_table_random_default_distribution=off;
-- end_ignore
drop table cr_hybrid_part;
|
SELECT content FROM test1 WHERE id = constant;
|
CREATE DATABASE IF NOT EXISTS `astro` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_czech_ci */;
USE `astro`;
-- MySQL dump 10.13 Distrib 5.7.12, for Win32 (AMD64)
--
-- Host: localhost Database: astro
-- ------------------------------------------------------
-- Server version 5.7.17-log
/*!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 `astro_tab`
--
DROP TABLE IF EXISTS `astro_tab`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `astro_tab` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`f_name` varchar(20) COLLATE utf8_czech_ci NOT NULL,
`l_name` varchar(20) COLLATE utf8_czech_ci NOT NULL,
`DOB` date NOT NULL,
`skill` varchar(45) COLLATE utf8_czech_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `astro_tab`
--
LOCK TABLES `astro_tab` WRITE;
/*!40000 ALTER TABLE `astro_tab` DISABLE KEYS */;
INSERT INTO `astro_tab` VALUES (1,'L<b>ajk</b>a','pes','1954-09-11','Nejdelší pobyt na oběžné dráze'),(2,'Homer','Simpson','1961-05-11','Pojídání chipsů v beztížném stavu'),(9,'Jurij','Gagarin','1934-03-09','Pěrvyj v kosmose');
/*!40000 ALTER TABLE `astro_tab` 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 2020-08-11 20:03:07
|
CREATE OR REPLACE FUNCTION category_path(INTEGER) RETURNS TEXT AS $$
DECLARE
p INTEGER := (SELECT parent from categories WHERE id = $1)::INTEGER;
n TEXT := (SELECT name from categories WHERE id = $1)::TEXT;
BEGIN
while p > 0 loop
n := (SELECT CONCAT(name, ' -> ' , n) from categories WHERE id = p)::TEXT;
p := (SELECT parent from categories WHERE id = p)::INTEGER;
end loop;
return n;
END;
$$ LANGUAGE plpgsql;
|
<filename>employee_table.sql
-- phpMyAdmin SQL Dump
-- version 4.8.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 06, 2018 at 10:07 AM
-- Server version: 10.1.31-MariaDB
-- PHP Version: 7.2.4
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: `employee`
--
-- --------------------------------------------------------
--
-- Table structure for table `employee_table`
--
CREATE TABLE `employee_table` (
`id` int(11) NOT NULL,
`e_id` varchar(50) NOT NULL,
`name` varchar(200) NOT NULL,
`email` varchar(100) NOT NULL,
`phone` bigint(20) NOT NULL,
`doj` date NOT NULL,
`status` enum('1','0','2') NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `employee_table`
--
INSERT INTO `employee_table` (`id`, `e_id`, `name`, `email`, `phone`, `doj`, `status`) VALUES
(2, 'emp_200', 'test200', '<EMAIL>', 9843455555, '2018-10-27', '1'),
(3, 'emp_456', 'test56', '<EMAIL>', 9843111111, '2018-10-27', '0'),
(4, 'emp_101', 'test', '<EMAIL>', 9843422290, '2018-10-31', '1'),
(6, 'emp_675', 'test23', '<EMAIL>', 9843474222, '2018-10-02', '1'),
(7, 'emp_102', 'test102', '<EMAIL>', 9842474864, '2013-09-12', '1'),
(8, 'emp_104', 'test45', '<EMAIL>', 9876543211, '2019-10-27', '1'),
(14, 'emp_300', 'test300', '<EMAIL>', 9625456677, '2018-10-19', '1');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `employee_table`
--
ALTER TABLE `employee_table`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `employee_table`
--
ALTER TABLE `employee_table`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;
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 */;
|
<reponame>ranisharafeeque/readyship-app<gh_stars>0
DROP TABLE IF EXISTS "account_has_task";
DROP TABLE IF EXISTS "task";
DROP TABLE IF EXISTS "project";
DROP TABLE IF EXISTS "account";
DROP TABLE IF EXISTS "session";
|
INSERT INTO item_on_the_menu VALUES ('Spaghetti Bolognesse', 20, 'M')
INSERT INTO item_on_the_menu VALUES ('Foie Gras', 30, 'M')
INSERT INTO item_on_the_menu VALUES ('Wino "Vino"', 4.50 , 'D')
|
-- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 02-Out-2017 às 13:10
-- Versão do servidor: 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: `pacsdb`
--
-- --------------------------------------------------------
--
-- Estrutura da tabela `matrizes`
--
CREATE TABLE `matrizes` (
`id` int(11) NOT NULL,
`titulo` varchar(200) DEFAULT NULL,
`texto` text
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Extraindo dados da tabela `matrizes`
--
INSERT INTO `matrizes` (`id`, `titulo`, `texto`) VALUES
(1, 'RX DE ABDOME', '- Estruturas ósseas íntegras. - Linhas musculares preservadas. - Não há evidência de calcificações patológicas. - Distribuição gasosa normal. - Imagens renais em situação anatômica e dimensões normais. - Margens dos músculos psoas livres. - Ausência de evidência de hepatoesplenomegalia. - Gordura pré peritoneal preservada. '),
(2, 'RX ANTEBRACO', '- Estruturas ósseas íntegras.\r\n- Espaços articulares preservados.\r\n- Tecidos moles preservados.\r\n- Ausência de sinais de fratura.\r\n- Ausência de evidências de lesões líticas ou blásticas.\r\n'),
(3, 'RX ARCOS COSTAIS', '- Arcos costais de morfologia e densidades habituais, sem evidências de fraturas.'),
(4, 'RX ARCOS ZIGOMATICOS', 'Estruturas ósseas íntegras.'),
(5, 'RX ARTICULACAO ACROMIOCLAVICULAR', '- Estruturas ósseas íntegras.\r\n- Tecidos moles sem alterações.\r\n- Espaços articulares preservados.\r\n- Ausência de lesões líticas ou blásticas.\r\n');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `matrizes`
--
ALTER TABLE `matrizes`
ADD PRIMARY KEY (`id`);
ALTER TABLE `matrizes` ADD FULLTEXT KEY `titulo` (`titulo`,`texto`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `matrizes`
--
ALTER TABLE `matrizes`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
/*!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 */;
|
CREATE TABLE [dbo].[Conversations]
(
[Id] VARCHAR(50) NOT NULL,
[ActivityId] VARCHAR(50) NOT NULL,
[TurnId] BIGINT NOT NULL
CONSTRAINT [PK_Conversations] PRIMARY KEY ([Id]),
CONSTRAINT UC_Conversation UNIQUE (Id, TurnId)
)
|
<gh_stars>1-10
CREATE TABLE `user_info` (
`id` char(32) NOT NULL,
`user_name` varchar(45) DEFAULT NULL,
`user_pwd` varchar(45) DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
`insert_time` datetime DEFAULT NULL,
`status` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
INSERT INTO egp_portalservice(
id, module, code, version, url, isactive, name, userservice,
businessuserservice, helpdoclink, createdby, createddate)
VALUES (nextval('seq_egp_portalservice'), (select id from eg_module where contextroot = 'pgr' and parentmodule is null), 'Register Grievance',0,'/pgr/complaint/citizen/show-reg-form' , 't', 'Register Grievance', 't', 't',
'/pgr/complaint/citizen/show-reg-form', 1, now());
|
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: pm
-- ------------------------------------------------------
-- Server version 5.7.20-log
/*!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 `projects`
--
DROP TABLE IF EXISTS `projects`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `projects` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL,
`description` text,
`parentId` int(11) DEFAULT NULL,
`closed` tinyint(4) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `projects_Name_uindex` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `projects`
--
LOCK TABLES `projects` WRITE;
/*!40000 ALTER TABLE `projects` DISABLE KEYS */;
INSERT INTO `projects` VALUES (14,'Project 1','my first project',NULL,0),(15,'Project 2','second project',NULL,0),(16,'Project 3','asdfgahgafh',NULL,0);
/*!40000 ALTER TABLE `projects` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `task-status`
--
DROP TABLE IF EXISTS `task-status`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `task-status` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(20) NOT NULL,
`description` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `task-status`
--
LOCK TABLES `task-status` WRITE;
/*!40000 ALTER TABLE `task-status` DISABLE KEYS */;
INSERT INTO `task-status` VALUES (1,'new','new'),(2,'work in progress','work in progress'),(3,'rejected','rejected'),(4,'rezolved','rezolved'),(5,'closed','closed');
/*!40000 ALTER TABLE `task-status` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `task-types`
--
DROP TABLE IF EXISTS `task-types`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `task-types` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL,
`description` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `task-types`
--
LOCK TABLES `task-types` WRITE;
/*!40000 ALTER TABLE `task-types` DISABLE KEYS */;
INSERT INTO `task-types` VALUES (16,'bug','bug'),(17,'task','task'),(19,'test','test');
/*!40000 ALTER TABLE `task-types` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `tasks`
--
DROP TABLE IF EXISTS `tasks`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tasks` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL,
`description` text,
`type` varchar(10) NOT NULL,
`projectId` int(11) DEFAULT NULL,
`parentId` int(11) DEFAULT NULL,
`closed` tinyint(4) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `tasks_name_uindex` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `tasks`
--
LOCK TABLES `tasks` WRITE;
/*!40000 ALTER TABLE `tasks` DISABLE KEYS */;
INSERT INTO `tasks` VALUES (16,'Task1','description','bug',NULL,NULL,1),(17,'Task2','descprition','task',NULL,NULL,0);
/*!40000 ALTER TABLE `tasks` 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` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`email` varchar(250) DEFAULT NULL,
`firstName` varchar(50) DEFAULT NULL,
`lastName` varchar(50) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `users_email_uindex` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=4 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,'<EMAIL>','Bogdan-Mihai','Ionescu'),(2,'<EMAIL>','Anonimus','User1'),(3,'<EMAIL>','Test1','test');
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `users-auth`
--
DROP TABLE IF EXISTS `users-auth`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `users-auth` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`userId` int(11) NOT NULL,
`password` varchar(30) DEFAULT NULL,
`failedLogin` int(11) DEFAULT '0',
`disabled` tinyint(4) DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `users-auth`
--
LOCK TABLES `users-auth` WRITE;
/*!40000 ALTER TABLE `users-auth` DISABLE KEYS */;
INSERT INTO `users-auth` VALUES (22,1,'test',0,0);
/*!40000 ALTER TABLE `users-auth` 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 2019-01-13 8:59:00
|
<filename>useful-scripts/sql/drop-all-content-db-objects.sql
DROP TABLE __EFMigrationsHistory;
ALTER TABLE Publications
DROP CONSTRAINT FK_Publications_Contacts_ContactId;
ALTER TABLE Publications
DROP CONSTRAINT FK_Publications_Methodologies_MethodologyId;
ALTER TABLE Publications
DROP CONSTRAINT FK_Publications_Topics_TopicId;
ALTER TABLE ContentBlock
DROP CONSTRAINT FK_ContentBlock_ContentSections_ContentSectionId
ALTER TABLE Releases
DROP CONSTRAINT FK_Releases_Publications_PublicationId;
ALTER TABLE Releases
DROP CONSTRAINT FK_Releases_ReleaseTypes_TypeId;
ALTER TABLE ReleaseContentBlocks
DROP CONSTRAINT FK_ReleaseContentBlocks_ContentBlock_ContentBlockId;
ALTER TABLE ReleaseContentBlocks
DROP CONSTRAINT FK_ReleaseContentBlocks_Releases_ReleaseId;
ALTER TABLE ReleaseContentSections
DROP CONSTRAINT FK_ReleaseContentSections_ContentSections_ContentSectionId;
ALTER TABLE ReleaseContentSections
DROP CONSTRAINT FK_ReleaseContentSections_Releases_ReleaseId;
DROP TABLE [Update];
DROP TABLE ReleaseSummaries;
DROP TABLE ContentSections;
DROP TABLE Releases;
DROP TABLE ReleaseTypes;
DROP TABLE LegacyRelease;
DROP TABLE Publications;
DROP TABLE Methodologies;
DROP TABLE Topics;
DROP TABLE Contacts;
DROP TABLE Themes;
DROP TABLE ContentBlock;
DROP TABLE ReleaseContentBlocks;
DROP TABLE ReleaseContentSections;
DROP TABLE AspNetRoleClaims;
DROP TABLE AspNetUserClaims;
DROP TABLE AspNetUserLogins;
DROP TABLE AspNetUserRoles;
DROP TABLE AspNetUserTokens;
DROP TABLE DeviceCodes;
DROP TABLE PersistedGrants;
DROP TABLE UserInvites;
DROP TABLE UserReleaseInvites;
DROP TABLE UserReleaseRoles;
DROP TABLE AspNetRoles;
DROP TABLE AspNetUsers;
DROP TABLE Comment;
DROP TABLE ExternalMethodology;
DROP TABLE ContentBlock;
DROP TABLE Publications;
DROP TABLE ReleaseFiles;
DROP TABLE ReleaseFileReferences;
DROP TABLE Releases;
DROP TABLE Users;
|
DROP TABLE "public"."featured";
|
<gh_stars>1-10
-- 10/16/2018 Paul. Moved to BuildAllAuditViews.8.sql
|
-- memdb.test
--
-- execsql {
-- CREATE TABLE t6(x);
-- INSERT INTO t6 VALUES(1);
-- INSERT INTO t6 SELECT x+1 FROM t6;
-- INSERT INTO t6 SELECT x+2 FROM t6;
-- INSERT INTO t6 SELECT x+4 FROM t6;
-- INSERT INTO t6 SELECT x+8 FROM t6;
-- INSERT INTO t6 SELECT x+16 FROM t6;
-- INSERT INTO t6 SELECT x+32 FROM t6;
-- INSERT INTO t6 SELECT x+64 FROM t6;
-- INSERT INTO t6 SELECT x+128 FROM t6;
-- SELECT count(*) FROM (SELECT DISTINCT x FROM t6);
-- }
CREATE TABLE t6(x);
INSERT INTO t6 VALUES(1);
INSERT INTO t6 SELECT x+1 FROM t6;
INSERT INTO t6 SELECT x+2 FROM t6;
INSERT INTO t6 SELECT x+4 FROM t6;
INSERT INTO t6 SELECT x+8 FROM t6;
INSERT INTO t6 SELECT x+16 FROM t6;
INSERT INTO t6 SELECT x+32 FROM t6;
INSERT INTO t6 SELECT x+64 FROM t6;
INSERT INTO t6 SELECT x+128 FROM t6;
SELECT count(*) FROM (SELECT DISTINCT x FROM t6);
|
<reponame>DavidWiseman/dba-dash<filename>DBADashDB/dbo/Stored Procedures/DBConfigurationHistory_Get.sql
CREATE PROC dbo.DBConfigurationHistory_Get(
@InstanceIDs VARCHAR(MAX)=NULL,
@ConfiguredOnly BIT=0,
@DatabaseID INT=NULL
)
AS
DECLARE @Instances TABLE(
InstanceID INT PRIMARY KEY
)
IF @InstanceIDs IS NULL
BEGIN
INSERT INTO @Instances
(
InstanceID
)
SELECT InstanceID
FROM dbo.Instances
WHERE IsActive=1
END
ELSE
BEGIN
INSERT INTO @Instances
(
InstanceID
)
SELECT value
FROM STRING_SPLIT(@InstanceIDs,',')
END;
SELECT I.InstanceGroupName,
D.name AS DB,
H.configuration_id,
CO.name,H.value,
H.new_value,
H.value_for_secondary,
H.new_value_for_secondary,
H.ValidFrom,
H.ValidTo
FROM dbo.DBConfigHistory H
JOIN dbo.DBConfigOptions CO ON H.configuration_id = CO.configuration_id
JOIN dbo.Databases D ON D.DatabaseID = H.DatabaseID
JOIN dbo.Instances I ON I.InstanceID = D.InstanceID
WHERE EXISTS(SELECT 1 FROM @Instances t WHERE I.InstanceID = t.InstanceID)
AND I.IsActive=1
AND D.IsActive=1
AND (D.DatabaseID = @DatabaseID OR @DatabaseID IS NULL)
ORDER BY H.ValidTo DESC
|
<reponame>stroxler/demo-apps
CREATE TABLE IF NOT EXISTS customers (
id BIGINT NOT NULL,
first_name VARCHAR(50) NOT NULL,
last_name VARCHAR(50) NOT NULL,
n_sales INTEGER NOT NULL,
PRIMARY KEY(id)
);
CREATE TABLE IF NOT EXISTS items (
id BIGINT NOT NULL,
description VARCHAR(100) NOT NULL,
PRIMARY KEY(id)
);
CREATE TABLE IF NOT EXISTS sales (
id BIGINT NOT NULL,
customer_id BIGINT NOT NULL,
item_id BIGINT NOT NULL,
FOREIGN KEY(customer_id) REFERENCES customers(id),
FOREIGN KEY(item_id) REFERENCES items(id),
PRIMARY KEY(id)
);
CREATE INDEX i_sales_cutomer_id ON sales(customer_id);
|
--! Previous: sha1:ae6622011e1c35b0b2db1e6212b366bdc1dd2b03
--! Hash: sha1:cd33e5f1f63a039f46502f68fc92029896fb3104
--! split: 1-current.sql
-- enter migration here
grant insert (id) on table app_public.companies to tasted_visitor;
|
ALTER TABLE rothschild.`Transactions`
ADD pendingVoidDate DATETIME DEFAULT NULL;
ALTER TABLE rothschild.`Transactions`
ADD INDEX ix_Transactions_pendingVoidDate (pendingVoidDate);
|
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Dec 19, 2019 at 02:46 AM
-- Server version: 10.4.10-MariaDB
-- PHP Version: 7.3.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `crud`
--
-- --------------------------------------------------------
--
-- Table structure for table `t_member`
--
CREATE TABLE `t_member` (
`id` int(11) NOT NULL,
`nama` varchar(100) NOT NULL,
`email` varchar(75) NOT NULL,
`hp` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `t_member`
--
INSERT INTO `t_member` (`id`, `nama`, `email`, `hp`) VALUES
(10, '<NAME>', '<EMAIL>', '0834355543'),
(11, 'Bagas Tri Usada', '<EMAIL>', '065757546756'),
(12, '<NAME>', '<EMAIL>', '08782755345');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `t_member`
--
ALTER TABLE `t_member`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `t_member`
--
ALTER TABLE `t_member`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;
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 */;
|
<filename>src/test/resources/db/fill/issue-type/issue-type-fill.sql
-- Creates custom issue type
insert into issue_type(id, issue_group_id, locator, issue_name, abbreviation, hex_color) values (100, 3, 'pb_ajf7d5d', 'Custom', 'CS', '#a3847e');
|
<gh_stars>10-100
create table customers_addresses(
address_id varchar(40) primary key,
customer_id varchar(40),
type varchar(20),
address1 varchar(120),
address2 varchar(120),
city varchar(50),
state varchar(2),
postal_code varchar(9),
country varchar(3),
validated BOOLEAN,
deleted_at datetime,
constraint customer_address unique (customer_id, address1)
);
|
DROP TABLE IF EXISTS nullable_00571;
CREATE TABLE nullable_00571 (x String) ENGINE = MergeTree ORDER BY x;
INSERT INTO nullable_00571 VALUES ('hello'), ('world');
SELECT * FROM nullable_00571;
ALTER TABLE nullable_00571 ADD COLUMN n Nullable(UInt64);
SELECT * FROM nullable_00571;
ALTER TABLE nullable_00571 DROP COLUMN n;
ALTER TABLE nullable_00571 ADD COLUMN n Nullable(UInt64) DEFAULT NULL;
SELECT * FROM nullable_00571;
ALTER TABLE nullable_00571 DROP COLUMN n;
ALTER TABLE nullable_00571 ADD COLUMN n Nullable(UInt64) DEFAULT 0;
SELECT * FROM nullable_00571;
DROP TABLE nullable_00571;
|
<reponame>MidnightBSD/security-advisory
alter table advisory_product_map add constraint pk_advisory PRIMARY KEY (advisory_id, product_id);
drop index adv_product;
|
<reponame>AthenaModel/athena
------------------------------------------------------------------------
-- TITLE:
-- scenariodb_econ.sql
--
-- AUTHOR:
-- <NAME>
--
-- DESCRIPTION:
-- SQL Schema for scenariodb(n): Economics Area
--
------------------------------------------------------------------------
-- Neighborhood inputs and outputs.
--
-- NOTE: All production capacities and related factors concern the
-- "goods" sector; when we add additional kinds of production, we'll
-- probably need to elaborate this scheme considerably.
CREATE TABLE econ_n (
-- Symbolic neighborhood name
n TEXT PRIMARY KEY REFERENCES nbhoods(n)
ON DELETE CASCADE
DEFERRABLE INITIALLY DEFERRED,
-- The following columns can be ignored if nbhoods.local == 0.
-- Output, Production Capacity at time 0
cap0 DOUBLE DEFAULT 0,
-- Output, Production Capacity at time t
cap DOUBLE DEFAULT 0,
-- Jobs at time 0 given production capacity t time 0
jobs0 DOUBLE DEFAULT 0,
-- Jobs in neighborhood given production capacity
jobs DOUBLE DEFAULT 0
);
-- A view of only those econ_n records that correspond to local
-- neighborhoods.
CREATE VIEW econ_n_view AS
SELECT * FROM nbhoods JOIN econ_n USING (n) WHERE nbhoods.local = 1;
------------------------------------------------------------------------
-- End of File
------------------------------------------------------------------------
|
create function [dbo].[Roman] (
@arabic int
) returns varchar(30) as begin
if @arabic > 10000 return '*'
declare @roman varchar(30)
set @roman = replicate('M',@arabic/1000)
set @arabic = @arabic%1000
set @roman = @roman + replicate('C',@arabic/100)
set @arabic = @arabic%100
set @roman = @roman + replicate('X',@arabic/10)
set @arabic = @arabic%10
set @roman = @roman + replicate('I',@arabic)
set @roman = replace(@roman,replicate('C',9),'CM')
set @roman = replace(@roman,replicate('X',9),'XC')
set @roman = replace(@roman,replicate('I',9),'IX')
set @roman = replace(@roman,replicate('C',5),'D')
set @roman = replace(@roman,replicate('X',5),'L')
set @roman = replace(@roman,replicate('I',5),'V')
set @roman = replace(@roman,replicate('C',4),'CD')
set @roman = replace(@roman,replicate('X',4),'XL')
set @roman = replace(@roman,replicate('I',4),'IV')
return @roman
end
|
<reponame>dsrodrigues/vote-no-restaurante
CREATE TABLE Restaurant (
id INTEGER PRIMARY KEY NOT NULL GENERATED BY DEFAULT AS IDENTITY(START WITH 1, INCREMENT BY 1),
name VARCHAR(45) NOT NULL ,
image_path VARCHAR(150) NULL ,
vote INTEGER NOT NULL
);
CREATE TABLE User (
id INTEGER PRIMARY KEY NOT NULL GENERATED BY DEFAULT AS IDENTITY(START WITH 1, INCREMENT BY 1) ,
name VARCHAR(100) NOT NULL ,
email VARCHAR(150) NOT NULL
);
CREATE TABLE Voting (
id INTEGER PRIMARY KEY NOT NULL GENERATED BY DEFAULT AS IDENTITY(START WITH 1, INCREMENT BY 1) ,
restaurant_id INTEGER NOT NULL ,
user_id VARCHAR(150) NOT NULL ,
vote INTEGER NOT NULL
);
ALTER TABLE Voting
ADD FOREIGN KEY (restaurant_id) REFERENCES Restaurant(id);
ALTER TABLE Voting
ADD FOREIGN KEY (user_id) REFERENCES User(id);
|
ALTER TABLE notifications
ADD COLUMN container VARCHAR(50) NULL;
|
alter table t_lc_task add `info_up` int(3) DEFAULT '0' COMMENT '信息更新申请状态';
DROP TABLE IF EXISTS `t_lc_task_uplog`;
CREATE TABLE `t_lc_task_uplog` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
`user_id` bigint(20) DEFAULT NULL COMMENT '用户id',
`date_log` date DEFAULT NULL,
`cishu` int(3) DEFAULT '0' COMMENT '次数',
PRIMARY KEY (`id`),
UNIQUE KEY `udd` (`user_id`,`date_log`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
CREATE TABLE `t_lc_task_infoup` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主鍵ID',
`task_id` bigint(20) DEFAULT NULL COMMENT '任务id',
`case_no` varchar(100) DEFAULT NULL COMMENT '案件编号',
`certificate_no` varchar(100) DEFAULT NULL COMMENT '证件号',
`certificate_type` int(11) DEFAULT NULL COMMENT '证件类型',
`custom_code` varchar(100) DEFAULT NULL COMMENT '客户编号',
`custom_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '客户姓名',
`arrears_total` decimal(13,2) DEFAULT NULL COMMENT '委案金额',
`overdue_days` bigint(11) DEFAULT NULL COMMENT '逾期天数',
`owner_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '业务归属人',
`org_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '业务归属机构',
`org_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '所属机构',
`create_by` varchar(30) DEFAULT NULL COMMENT '创建人',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`modify_by` varchar(30) DEFAULT NULL COMMENT '信息审批人',
`modify_time` datetime DEFAULT NULL COMMENT '信息审批时间',
`infoup_apro_status` int(3) DEFAULT '0' COMMENT '信息审核状态',
`infoup_by` varchar(30) DEFAULT NULL COMMENT '信息更新人',
`infoup_time` datetime DEFAULT NULL COMMENT '信息更新时间',
`infoup_status` int(3) DEFAULT '0' COMMENT '信息更新状态',
`phone` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`certificate_address` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`import_batch_no` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3939964482257 DEFAULT CHARSET=utf8 COMMENT='信息更新表';
CREATE TABLE `t_lc_infoup` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`task_infoup_id` bigint(20) NOT NULL COMMENT '更新任务id',
`task_id` bigint(20) NOT NULL COMMENT '关联任务id',
`types` tinyint(3) DEFAULT '0' COMMENT '更新类型',
`names` varchar(56) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '姓名',
`relations` tinyint(3) DEFAULT NULL COMMENT '与本人关系',
`phone` varchar(56) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '电话',
`contents` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '地址',
`remark` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`create_by` varchar(32) DEFAULT NULL COMMENT '创建人',
`create_by_id` bigint(20) DEFAULT NULL COMMENT '创建人id',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(32) DEFAULT NULL COMMENT '修改人',
`update_by_id` bigint(20) DEFAULT NULL COMMENT '更新人',
`update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
`import_batch_no` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`org_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '业务归属机构',
`org_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '所属机构',
`case_no` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '案件编号',
`cunzai` tinyint(3) DEFAULT '0' COMMENT '存在联系表中',
PRIMARY KEY (`id`),
KEY `pri` (`task_id`),
KEY `sc` (`org_id`,`case_no`,`import_batch_no`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=55 DEFAULT CHARSET=utf8;
alter table t_lc_cust_contact add `infoup_id` bigint(20) DEFAULT '0' COMMENT '信息更新id';
alter table t_lc_cust_contact add `infoup_status` int(3) DEFAULT '0' COMMENT '信息更新状态';
-- 菜单 SQL
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('信息更新', 0, '6', '#', 'M', '0', '', 'fa fa-book', 'admin', '2018-03-01', 'ry', '2018-03-01', '【信息更新】');
-- 菜单 SQL 信息更新
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('信息更新任务', (select t.menu_id from sys_menu t where t.menu_name = '信息更新'), '1', '/task/infoup/infoupGx', 'C', '0', 'taskinfoup:infoup:listGx', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '【信息更新任务】菜单');
-- 按钮父菜单ID
SELECT @parentId := LAST_INSERT_ID();
-- 按钮 SQL
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('查询', @parentId, '1', '#', 'F', '0', 'taskinfoup:infoup:listGx', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('状态更新', @parentId, '2', '#', 'F', '0', 'taskinfoup:infoup:updateStatusGx', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('电话联系人列表', @parentId, '3', '#', 'F', '0', 'infouplog:infoup:list', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('电话或联系人新增', @parentId, '4', '#', 'F', '0', 'infouplog:infoup:add', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('电话或联系人修改', @parentId, '5', '#', 'F', '0', 'infouplog:infoup:edit', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
-- 菜单 SQL 信息更新审批
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('信息更新审批', (select t.menu_id from sys_menu t where t.menu_name = '信息更新'), '2', '/task/infoup', 'C', '0', 'taskinfoup:infoup:view', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '【信息更新审批】菜单');
-- 按钮父菜单ID
SELECT @parentId := LAST_INSERT_ID();
-- 按钮 SQL
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('信息更新查询-按钮', @parentId, '1', '#', 'F', '0', 'taskinfoup:infoup:list', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('信息状态更新', @parentId, '1', '#', 'F', '0', 'taskinfoup:infoup:updateStatus', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
-- 菜单 SQL 信息更新审批
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('信息更新查询', (select t.menu_id from sys_menu t where t.menu_name = '信息更新'), '3', '/task/infoup/infoupGxSer', 'C', '0', 'taskinfoup:infoup:listGxSer', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '【信息更新查询】菜单');
|
-- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Dec 26, 2016 at 12:50 PM
-- Server version: 10.1.9-MariaDB-log
-- PHP Version: 5.6.16
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: `partidasdev`
--
--
-- Dumping data for table `partidas`
--
INSERT INTO `partidas` (`id`, `codigo`, `descripcion`, `created_at`, `updated_at`, `deleted_at`, `user_id`) VALUES
(1, 111, 'RETRIBUCION DEL CARGO', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(2, 113, 'ADICIONALES', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(3, 114, 'SUELDO ANUAL COMPLEMENTARIO Y OTROS BENEFICIOS', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(4, 115, 'CONTRIBUCIONES PATRONALES PARA JUBILACION', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(5, 116, 'APORTE PATRONAL PARA OBRA SOCIAL', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(6, 117, 'COMPLEMENTOS', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(7, 118, 'OTRAS CONTRIBUCIONES PATRONALES', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(8, 121, 'RETRIBUCION DEL CARGO', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(9, 122, 'ADICIONALES', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(10, 123, 'SUELDO ANUAL COMPLEMENTARIO Y OTROS BENEFICIOS', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(11, 124, 'CONTRIBUCIONES PATRONALES PARA JUBILACION', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(12, 125, 'APORTE PATRONAL PARA OBRA SOCIAL', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(13, 126, 'COMPLEMENTOS', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(14, 127, 'OTRAS CONTRIBUCIONES PATRONALES', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(15, 131, 'RETRIBUCIONES EXTRAORDINARIAS', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(16, 141, 'ASIGNACIONES FAMILIARES VARIAS', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(17, 151, 'ASISTENCIA SOCIAL AL PERSONAL', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(18, 161, 'BENEFICIOS Y COMPENSACIONES VARIAS', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(19, 211, 'ALIMENTOS PARA PERSONAS', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(20, 222, 'PRENDAS DE VESTIR', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(21, 223, 'CONFECCIONES TEXTILES', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(22, 229, 'OTROS NO ESPECIFICADOS PRECEDENTEMENTE', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(23, 231, 'PAPEL Y CARTON PARA OFICINA', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(24, 233, 'PRODUCTOS DE ARTES GRAFICAS', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(25, 234, 'PRODUCTOS DE PAPEL Y CARTON', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(26, 255, 'TINTAS, PINTURAS Y COLORANTES', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(27, 256, 'COMBUSTIBLES Y LUBRICANTES', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(28, 258, 'PRODUCTOS DE MATERIAL PLASTICO', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(29, 274, 'ESTRUCTURAS METALICAS ACABADAS', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(30, 275, 'HERRAMIENTAS MENORES', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(31, 279, 'OTROS NO ESPECIFICADOS PRECEDENTEMENTE', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(32, 291, 'ELEMENTOS DE LIMPIEZA', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(33, 292, 'UTILES DE ESCRITORIO, OFICINA Y ENSENANZA', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(34, 293, 'UTILES Y MATERIALES ELECTRICOS', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(35, 296, 'REPUESTOS Y ACCESORIOS', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(36, 299, 'OTROS NO ESPECIFICADOS PRECEDENTEMENTE', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(37, 314, 'TELEFONOS, TELEX, TELEFAX Y COMUNICACIONES POR INTERNET', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(38, 331, 'MANTENIMIENTO Y REPARACION DE EDIFICIOS Y LOCALES', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(39, 333, 'MANTENIMIENTO Y REPARACION DE MAQUINARIAS Y EQUIPOS', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(40, 335, 'LIMPIEZA, ASEO Y FUMIGACION', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(41, 339, 'OTROS NO ESPECIFICADOS PRECEDENTEMENTE', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(42, 346, 'DE INFORMATICA Y SISTEMAS COMPUTARIZADOS', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(43, 351, 'TRANSPORTE', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(44, 355, 'COMISIONES Y GASTOS BANCARIOS', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(45, 356, 'DE INTERNET', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(46, 359, 'OTROS NO ESPECIFICADOS PRECEDENTEMENTE', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(47, 371, 'PASAJES', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(48, 372, 'VIATICOS', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(49, 393, 'SERVICIOS DE VIGILANCIA', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(50, 399, 'OTROS NO ESPECIFICADOS PRECEDENTEMENTE', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 1),
(53, 439, 'EQUIPOS VARIOS', '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, 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 */;
|
<gh_stars>0
/*
Warnings:
- A unique constraint covering the columns `[event_name]` on the table `ResearchEventAttendance` will be added. If there are existing duplicate values, this will fail.
*/
-- CreateIndex
CREATE UNIQUE INDEX "ResearchEventAttendance_event_name_key" ON "ResearchEventAttendance"("event_name");
|
<filename>prisma/migrations/20211106215428_file_table_added_file_type/migration.sql
-- AlterTable
ALTER TABLE "File" ADD COLUMN "fileType" TEXT NOT NULL DEFAULT E'';
|
<filename>sql/spr.sql
WITH cls AS (
SELECT t1.*, 0 AS LEVEL FROM BO_CLASSES AS t1
WHERE t1.GUID = 'wAgjesx5tcaAJxHuubSGfd'
UNION ALL
SELECT t2.*, t3.LEVEL + 1 AS LEVEL FROM BO_CLASSES AS t2 inner join cls AS t3 ON t2.GUID=t3.GUIDPARENT
)
SELECT * FROM cls
|
create index delta_simc_new on prg.delta_new using hash (teryt_simc);
alter table prg.delta_new set logged;
|
<reponame>akhramov/knast<filename>storage/src/sqlite_engine/remove.sql
DELETE FROM storage WHERE key = :key AND tree = :tree;
|
<filename>src/test/resources/sql/insert/4a3eb795.sql
-- file:numeric.sql ln:441 expect:true
INSERT INTO num_exp_ln VALUES (3,'1.46093790411565641971')
|
<gh_stars>100-1000
--
-- Generate random hash string
--
DELIMITER $$
DROP FUNCTION IF EXISTS random_hash $$
CREATE FUNCTION random_hash() RETURNS CHAR(40) CHARSET ascii
DETERMINISTIC
NO SQL
SQL SECURITY INVOKER
COMMENT 'Generate random hash string'
begin
declare result CHAR(40) CHARSET ascii;
select
SHA1(
CONCAT_WS(',', @@server_id, SYSDATE(), RAND(), GROUP_CONCAT(VARIABLE_VALUE))
)
from
INFORMATION_SCHEMA.GLOBAL_STATUS
into result;
return result;
end $$
DELIMITER ;
|
--
-- PostgreSQL database dump
--
-- Dumped from database version 10.10 (Ubuntu 10.10-0ubuntu0.18.04.1)
-- Dumped by pg_dump version 10.10 (Ubuntu 10.10-0ubuntu0.18.04.1)
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 xmloption = content;
SET client_min_messages = warning;
SET row_security = off;
--
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:
--
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
--
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner:
--
COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
SET default_tablespace = '';
SET default_with_oids = false;
--
-- Name: actors; Type: TABLE; Schema: public; Owner: chux
--
CREATE TABLE public.actors (
id integer NOT NULL,
name character varying NOT NULL,
age integer NOT NULL,
gender character varying NOT NULL
);
ALTER TABLE public.actors OWNER TO chux;
--
-- Name: actors_id_seq; Type: SEQUENCE; Schema: public; Owner: chux
--
CREATE SEQUENCE public.actors_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.actors_id_seq OWNER TO chux;
--
-- Name: actors_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: chux
--
ALTER SEQUENCE public.actors_id_seq OWNED BY public.actors.id;
--
-- Name: alembic_version; Type: TABLE; Schema: public; Owner: chux
--
CREATE TABLE public.alembic_version (
version_num character varying(32) NOT NULL
);
ALTER TABLE public.alembic_version OWNER TO chux;
--
-- Name: movies; Type: TABLE; Schema: public; Owner: chux
--
CREATE TABLE public.movies (
id integer NOT NULL,
title character varying(80) NOT NULL,
release_date timestamp without time zone NOT NULL
);
ALTER TABLE public.movies OWNER TO chux;
--
-- Name: movies_id_seq; Type: SEQUENCE; Schema: public; Owner: chux
--
CREATE SEQUENCE public.movies_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.movies_id_seq OWNER TO chux;
--
-- Name: movies_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: chux
--
ALTER SEQUENCE public.movies_id_seq OWNED BY public.movies.id;
--
-- Name: actors id; Type: DEFAULT; Schema: public; Owner: chux
--
ALTER TABLE ONLY public.actors ALTER COLUMN id SET DEFAULT nextval('public.actors_id_seq'::regclass);
--
-- Name: movies id; Type: DEFAULT; Schema: public; Owner: chux
--
ALTER TABLE ONLY public.movies ALTER COLUMN id SET DEFAULT nextval('public.movies_id_seq'::regclass);
--
-- Data for Name: actors; Type: TABLE DATA; Schema: public; Owner: chux
--
COPY public.actors (id, name, age, gender) FROM stdin;
1 <NAME> 25 male
2 <NAME> 22 female
3 <NAME> 42 male
4 flavor umeh 18 female
\.
--
-- Data for Name: alembic_version; Type: TABLE DATA; Schema: public; Owner: chux
--
COPY public.alembic_version (version_num) FROM stdin;
b2e0641109ec
\.
--
-- Data for Name: movies; Type: TABLE DATA; Schema: public; Owner: chux
--
COPY public.movies (id, title, release_date) FROM stdin;
\.
--
-- Name: actors_id_seq; Type: SEQUENCE SET; Schema: public; Owner: chux
--
SELECT pg_catalog.setval('public.actors_id_seq', 4, true);
--
-- Name: movies_id_seq; Type: SEQUENCE SET; Schema: public; Owner: chux
--
SELECT pg_catalog.setval('public.movies_id_seq', 1, false);
--
-- Name: actors actors_pkey; Type: CONSTRAINT; Schema: public; Owner: chux
--
ALTER TABLE ONLY public.actors
ADD CONSTRAINT actors_pkey PRIMARY KEY (id);
--
-- Name: alembic_version alembic_version_pkc; Type: CONSTRAINT; Schema: public; Owner: chux
--
ALTER TABLE ONLY public.alembic_version
ADD CONSTRAINT alembic_version_pkc PRIMARY KEY (version_num);
--
-- Name: movies movies_pkey; Type: CONSTRAINT; Schema: public; Owner: chux
--
ALTER TABLE ONLY public.movies
ADD CONSTRAINT movies_pkey PRIMARY KEY (id);
--
-- Name: movies movies_title_key; Type: CONSTRAINT; Schema: public; Owner: chux
--
ALTER TABLE ONLY public.movies
ADD CONSTRAINT movies_title_key UNIQUE (title);
--
-- PostgreSQL database dump complete
--
|
<gh_stars>0
DELIMITER /
ALTER TABLE COI_DISCL_PROJECTS
ADD CONSTRAINT FK_COI_ISCLOSURE_PROJECTS
FOREIGN KEY (COI_DISCLOSURE_ID)
REFERENCES COI_DISCLOSURE (COI_DISCLOSURE_ID)
/
DELIMITER ;
|
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 07-04-2020 a las 18:58:21
-- Versión del servidor: 10.4.11-MariaDB
-- Versión de PHP: 7.4.4
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 datos: `grhabs`
--
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `almacen`
--
CREATE TABLE `almacen` (
`id` int(11) NOT NULL,
`name` varchar(30) DEFAULT NULL,
`direccion_id` int(11) DEFAULT NULL,
`estado` char(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `atributo`
--
CREATE TABLE `atributo` (
`id` int(11) NOT NULL,
`name` varchar(40) DEFAULT NULL,
`estado` char(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `atributo_valor`
--
CREATE TABLE `atributo_valor` (
`id` int(11) NOT NULL,
`atributo_id` int(11) DEFAULT NULL,
`valor` varchar(40) DEFAULT NULL,
`estado` char(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `categoria`
--
CREATE TABLE `categoria` (
`id` int(11) NOT NULL,
`name` char(1) DEFAULT NULL,
`estado` char(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `cliente`
--
CREATE TABLE `cliente` (
`id` int(11) NOT NULL,
`nombre` varchar(30) DEFAULT NULL,
`direccion` varchar(50) DEFAULT NULL,
`telefono` varchar(9) DEFAULT NULL,
`estado` char(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `compra`
--
CREATE TABLE `compra` (
`id` int(11) NOT NULL,
`usuario_id` int(11) DEFAULT NULL,
`proveedor_id` int(11) DEFAULT NULL,
`descripcion` text DEFAULT NULL,
`monto` float(6,2) DEFAULT NULL,
`estado` char(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `compra_producto`
--
CREATE TABLE `compra_producto` (
`id` int(11) NOT NULL,
`compra_id` int(11) DEFAULT NULL,
`producto_id` int(11) DEFAULT NULL,
`fecha` datetime DEFAULT NULL,
`cantidad` int(4) DEFAULT NULL,
`montounitario` float(6,2) DEFAULT NULL,
`estado` char(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `departamento`
--
CREATE TABLE `departamento` (
`id` int(11) NOT NULL,
`nombre` varchar(30) DEFAULT NULL,
`estado` char(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `direccion`
--
CREATE TABLE `direccion` (
`id` int(11) NOT NULL,
`departamento_id` int(11) DEFAULT NULL,
`pais_id` int(11) DEFAULT NULL,
`direccion_1` varchar(50) DEFAULT NULL,
`direccion_2` varchar(50) DEFAULT NULL,
`ciudad` varchar(50) DEFAULT NULL,
`codigo_postal` varchar(6) DEFAULT NULL,
`longitude` float(12,8) DEFAULT NULL,
`latitude` float(12,8) DEFAULT NULL,
`estado` char(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `image`
--
CREATE TABLE `image` (
`id` int(11) NOT NULL,
`producto_id` int(11) DEFAULT NULL,
`image_url` text DEFAULT NULL,
`estado` char(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `marca`
--
CREATE TABLE `marca` (
`id` int(11) NOT NULL,
`nombre` varchar(20) DEFAULT NULL,
`estado` char(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `notas`
--
CREATE TABLE `notas` (
`id` int(11) NOT NULL,
`producto_id` int(11) DEFAULT NULL,
`usuario_id` int(11) DEFAULT NULL,
`fecha` datetime DEFAULT NULL,
`descripcion` text DEFAULT NULL,
`estado` char(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `pais`
--
CREATE TABLE `pais` (
`id` int(11) NOT NULL,
`nombre` varchar(20) DEFAULT NULL,
`estado` char(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `pedido`
--
CREATE TABLE `pedido` (
`id` int(11) NOT NULL,
`usuario_id` int(11) DEFAULT NULL,
`cliente_id` int(11) DEFAULT NULL,
`cantidad` int(4) DEFAULT NULL,
`descuento` float(6,2) DEFAULT NULL,
`pbruto` float(6,2) DEFAULT NULL,
`estado` char(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `pedido_producto`
--
CREATE TABLE `pedido_producto` (
`id` int(11) NOT NULL,
`pedido_id` int(11) DEFAULT NULL,
`producto_id` int(11) DEFAULT NULL,
`cantidad` int(4) DEFAULT NULL,
`importe` float(6,2) DEFAULT NULL,
`punitario` float(6,2) DEFAULT NULL,
`fecha` datetime DEFAULT NULL,
`estado` char(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `producto`
--
CREATE TABLE `producto` (
`id` int(11) NOT NULL,
`categoria_id` int(11) DEFAULT NULL,
`almacen_id` int(11) DEFAULT NULL,
`atributo_valor_id` int(11) DEFAULT NULL,
`marca_id` int(11) DEFAULT NULL,
`unidad_id` int(11) DEFAULT NULL,
`nombre` varchar(40) DEFAULT NULL,
`codigo` varchar(10) DEFAULT NULL,
`descripcion` text DEFAULT NULL,
`cantidad` int(4) DEFAULT NULL,
`preciocompra` float(6,2) DEFAULT NULL,
`precioventa` float(6,2) DEFAULT NULL,
`existenciaminima` int(4) DEFAULT NULL,
`estado` char(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `proveedor`
--
CREATE TABLE `proveedor` (
`id` int(11) NOT NULL,
`direccion_id` int(11) DEFAULT NULL,
`nombre` varchar(30) DEFAULT NULL,
`logo_url` text DEFAULT NULL,
`descripcion` text DEFAULT NULL,
`tipo` varchar(20) DEFAULT NULL,
`website_url` text DEFAULT NULL,
`email` varchar(30) DEFAULT NULL,
`estado` char(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `rol`
--
CREATE TABLE `rol` (
`id` int(11) NOT NULL,
`name` varchar(20) DEFAULT NULL,
`estado` char(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `unidad`
--
CREATE TABLE `unidad` (
`id` int(11) NOT NULL,
`name` varchar(20) DEFAULT NULL,
`estado` char(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `usuario`
--
CREATE TABLE `usuario` (
`id` int(11) NOT NULL,
`rol_id` int(11) DEFAULT NULL,
`nombre` varchar(30) DEFAULT NULL,
`apellidos` varchar(50) DEFAULT NULL,
`direccion` varchar(40) DEFAULT NULL,
`telefono` varchar(9) DEFAULT NULL,
`email` varchar(30) DEFAULT NULL,
`password` varchar(255) DEFAULT NULL,
`skin_url` text DEFAULT NULL,
`estado` char(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Índices para tablas volcadas
--
--
-- Indices de la tabla `almacen`
--
ALTER TABLE `almacen`
ADD PRIMARY KEY (`id`),
ADD KEY `FK` (`direccion_id`);
--
-- Indices de la tabla `atributo`
--
ALTER TABLE `atributo`
ADD PRIMARY KEY (`id`);
--
-- Indices de la tabla `atributo_valor`
--
ALTER TABLE `atributo_valor`
ADD PRIMARY KEY (`id`),
ADD KEY `FK` (`atributo_id`);
--
-- Indices de la tabla `categoria`
--
ALTER TABLE `categoria`
ADD PRIMARY KEY (`id`);
--
-- Indices de la tabla `cliente`
--
ALTER TABLE `cliente`
ADD PRIMARY KEY (`id`);
--
-- Indices de la tabla `compra`
--
ALTER TABLE `compra`
ADD PRIMARY KEY (`id`),
ADD KEY `FK` (`usuario_id`,`proveedor_id`);
--
-- Indices de la tabla `compra_producto`
--
ALTER TABLE `compra_producto`
ADD PRIMARY KEY (`id`),
ADD KEY `FK` (`compra_id`,`producto_id`);
--
-- Indices de la tabla `departamento`
--
ALTER TABLE `departamento`
ADD PRIMARY KEY (`id`);
--
-- Indices de la tabla `direccion`
--
ALTER TABLE `direccion`
ADD PRIMARY KEY (`id`),
ADD KEY `FK` (`departamento_id`,`pais_id`);
--
-- Indices de la tabla `image`
--
ALTER TABLE `image`
ADD PRIMARY KEY (`id`),
ADD KEY `FK` (`producto_id`);
--
-- Indices de la tabla `marca`
--
ALTER TABLE `marca`
ADD PRIMARY KEY (`id`);
--
-- Indices de la tabla `notas`
--
ALTER TABLE `notas`
ADD PRIMARY KEY (`id`),
ADD KEY `FK` (`producto_id`,`usuario_id`);
--
-- Indices de la tabla `pais`
--
ALTER TABLE `pais`
ADD PRIMARY KEY (`id`);
--
-- Indices de la tabla `pedido`
--
ALTER TABLE `pedido`
ADD PRIMARY KEY (`id`),
ADD KEY `FK` (`usuario_id`,`cliente_id`);
--
-- Indices de la tabla `pedido_producto`
--
ALTER TABLE `pedido_producto`
ADD PRIMARY KEY (`id`),
ADD KEY `FK` (`pedido_id`,`producto_id`);
--
-- Indices de la tabla `producto`
--
ALTER TABLE `producto`
ADD PRIMARY KEY (`id`),
ADD KEY `FK` (`categoria_id`,`almacen_id`,`atributo_valor_id`,`marca_id`,`unidad_id`);
--
-- Indices de la tabla `proveedor`
--
ALTER TABLE `proveedor`
ADD PRIMARY KEY (`id`),
ADD KEY `FK` (`direccion_id`);
--
-- Indices de la tabla `rol`
--
ALTER TABLE `rol`
ADD PRIMARY KEY (`id`);
--
-- Indices de la tabla `unidad`
--
ALTER TABLE `unidad`
ADD PRIMARY KEY (`id`);
--
-- Indices de la tabla `usuario`
--
ALTER TABLE `usuario`
ADD PRIMARY KEY (`id`),
ADD KEY `FK` (`rol_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 */;
|
<gh_stars>0
/* ------------------------------------------------------------
* Create table audit_log
*/------------------------------------------------------------
CREATE TABLE audit_log
(
id int NOT NULL IDENTITY (1, 1),
dtime datetime NULL,
event nvarchar(255) NULL,
username nvarchar(255) NULL,
ip nvarchar(255) NULL,
app nvarchar(2048) NULL,
host nvarchar(255) NULL,
protocol nvarchar(255) NULL,
role nvarchar(255) NULL,
partnerid nvarchar(255) NULL,
status nvarchar(255) NULL,
adapterid nvarchar(255) NULL,
description nvarchar(MAX) NULL,
responsetime int NULL,
trackingid nvarchar(255) NULL
) ON [PRIMARY]
GO
|
<gh_stars>0
CREATE PROCEDURE [tSQLt].[Private_ResetNewTestClassList]
AS
BEGIN
SET NOCOUNT ON;
DELETE FROM tSQLt.Private_NewTestClassList;
END;
|
CREATE SCHEMA [calendar]
AUTHORIZATION [dbo];
|
USE veritabani
ALTER TABLE tbl_subeler
ADD FOREIGN KEY (sube_iletisim_id)
REFERENCES tbl_iletisim (iletisim_id)
ALTER TABLE tbl_seans_ve_koltuklar
ADD FOREIGN KEY (sk_koltuk_id)
REFERENCES tbl_koltuk (koltuk_id)
ALTER TABLE tbl_seans_ve_koltuklar
ADD FOREIGN KEY (sk_seans_id)
REFERENCES tbl_seanslar (seans_id)
ALTER TABLE tbl_seanslar
ADD FOREIGN KEY (seans_film_id)
REFERENCES tbl_filmler (film_id)
ALTER TABLE tbl_seanslar
ADD FOREIGN KEY (seans_salon_id)
REFERENCES tbl_salonlar (salon_id)
ALTER TABLE tbl_salonlar
ADD FOREIGN KEY (salon_sube_id)
REFERENCES tbl_subeler (sube_id)
ALTER TABLE tbl_personel
ADD FOREIGN KEY (personel_iletisim_id)
REFERENCES tbl_iletisim (iletisim_id)
ALTER TABLE tbl_personel
ADD FOREIGN KEY (personel_unvan_id)
REFERENCES tbl_personel_unvan (unvan_id)
ALTER TABLE tbl_personel
ADD FOREIGN KEY (personel_sube_id)
REFERENCES tbl_subeler (sube_id)
ALTER TABLE tbl_koltuk
ADD FOREIGN KEY (koltuk_salon_id)
REFERENCES tbl_salonlar (salon_id)
ALTER TABLE tbl_iletisim
ADD FOREIGN KEY (iletisim_il_id)
REFERENCES tbl_iller (il_id)
ALTER TABLE tbl_iletisim
ADD FOREIGN KEY (iletisim_ilce_id)
REFERENCES tbl_ilceler (ilce_id)
ALTER TABLE tbl_ilceler
ADD FOREIGN KEY (ilce_il_id)
REFERENCES tbl_iller (il_id)
ALTER TABLE tbl_filmler
ADD FOREIGN KEY (film_kategori_id)
REFERENCES tbl_kategori (kategori_id)
ALTER TABLE tbl_bilet
ADD FOREIGN KEY (bilet_seans_ve_koltuk_id)
REFERENCES tbl_seans_ve_koltuklar (seanskoltuk_id)
ALTER TABLE tbl_musteriler
ADD FOREIGN KEY (musteri_iletisim_id)
REFERENCES tbl_iletisim (iletisim_id)
ALTER TABLE tbl_bilet
ADD FOREIGN KEY (bilet_musteri_id)
REFERENCES tbl_musteriler (musteri_id)
ALTER TABLE tbl_filmler_ve_yonetmenleri
ADD FOREIGN KEY (film_ve_yonetmenler_film_id)
REFERENCES tbl_filmler (film_id)
|
/****** Object: Table [ParentPortal].[StudentGoal] Script Date: 03/11/2020 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [ParentPortal].[StudentGoal](
[StudentGoalId] [int] IDENTITY(1,1) NOT NULL,
[StudentUSI] [int] NOT NULL,
[GoalType] [nvarchar](10) NOT NULL,
[Goal] [nvarchar](max) NOT NULL,
[GradeLevel] [nvarchar](max) NOT NULL,
[DateGoalCreated] [datetime] NOT NULL,
[DateScheduled] [datetime] NOT NULL,
[DateCompleted] [datetime] NULL,
[Additional] [nvarchar](max) NOT NULL,
[Completed] [nvarchar](10) NOT NULL,
[DateCreated] [datetime] NOT NULL,
[DateUpdated] [datetime] NOT NULL,
[Labels] [nvarchar](max) NULL
CONSTRAINT [StudentGoal_PK] PRIMARY KEY CLUSTERED
(
[StudentGoalId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [ParentPortal].[StudentGoalStep] Script Date: 03/11/2020 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [ParentPortal].[StudentGoalStep](
[StudentGoalStepId] [int] IDENTITY(1,1) NOT NULL,
[StudentGoalId] [int] NOT NULL,
[StepName] [nvarchar](max) NOT NULL,
[Completed] [bit] NOT NULL,
[DateCreated] [datetime] NOT NULL,
[DateUpdated] [datetime] NOT NULL,
[IsActive] [bit] NOT NULL,
[StudentGoalInterventionId] [int] NULL
CONSTRAINT [StudentGoalStep_PK] PRIMARY KEY CLUSTERED
(
[StudentGoalStepId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [ParentPortal].[StudentGoalStep] WITH CHECK ADD CONSTRAINT [FK_StudentGoalStep_StudentGoal] FOREIGN KEY([StudentGoalId])
REFERENCES [ParentPortal].[StudentGoal] ([StudentGoalId])
GO
/****** Object: Table [ParentPortal].[StudentGoalLabel] Script Date: 03/11/2020 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [ParentPortal].[StudentGoalLabel](
[StudentGoalLabelId] [int] IDENTITY(1,1) NOT NULL,
[Label] [nvarchar](max) NOT NULL,
[DateCreated] [datetime] NOT NULL,
[DateUpdated] [datetime] NOT NULL
CONSTRAINT [StudentGoalLabel_PK] PRIMARY KEY CLUSTERED
(
[StudentGoalLabelId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
INSERT INTO ParentPortal.StudentGoalLabel VALUES ('Reading',CURRENT_TIMESTAMP,CURRENT_TIMESTAMP)
INSERT INTO ParentPortal.StudentGoalLabel VALUES ('Writing',CURRENT_TIMESTAMP,CURRENT_TIMESTAMP)
INSERT INTO ParentPortal.StudentGoalLabel VALUES ('Math',CURRENT_TIMESTAMP,CURRENT_TIMESTAMP)
INSERT INTO ParentPortal.StudentGoalLabel VALUES ('Social Studies',CURRENT_TIMESTAMP,CURRENT_TIMESTAMP)
INSERT INTO ParentPortal.StudentGoalLabel VALUES ('Science',CURRENT_TIMESTAMP,CURRENT_TIMESTAMP)
INSERT INTO ParentPortal.StudentGoalLabel VALUES ('Literacy',CURRENT_TIMESTAMP,CURRENT_TIMESTAMP)
INSERT INTO ParentPortal.StudentGoalLabel VALUES ('Art',CURRENT_TIMESTAMP,CURRENT_TIMESTAMP)
INSERT INTO ParentPortal.StudentGoalLabel VALUES ('Music',CURRENT_TIMESTAMP,CURRENT_TIMESTAMP)
INSERT INTO ParentPortal.StudentGoalLabel VALUES ('CTE',CURRENT_TIMESTAMP,CURRENT_TIMESTAMP)
INSERT INTO ParentPortal.StudentGoalLabel VALUES ('PE',CURRENT_TIMESTAMP,CURRENT_TIMESTAMP)
GO
|
SELECT c_last_name
,c_first_name
,ca_city
,bought_city
,ss_ticket_number
,amt
,profit
FROM (
SELECT ss_ticket_number
,ss_customer_sk
,ca_city bought_city
,SUM(ss_coupon_amt) amt
,SUM(ss_net_profit) profit
FROM store_sales
JOIN date_dim
JOIN store
JOIN household_demographics
JOIN customer_address
WHERE store_sales.ss_sold_date_sk = date_dim.d_date_sk
AND store_sales.ss_store_sk = store.s_store_sk
AND store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk
AND store_sales.ss_addr_sk = customer_address.ca_address_sk
AND (
household_demographics.hd_dep_count = 8
OR household_demographics.hd_vehicle_count = - 1
)
AND date_dim.d_dow IN (
6
,0
)
AND date_dim.d_year IN (
2000
,2000 + 1
,2000 + 2
)
AND store.s_city IN (
'Midway'
,'Fairview'
,'Fairview'
,'Fairview'
,'Fairview'
)
GROUP BY ss_ticket_number
,ss_customer_sk
,ss_addr_sk
,ca_city
) dn
JOIN customer
JOIN customer_address current_addr
WHERE ss_customer_sk = c_customer_sk
AND customer.c_current_addr_sk = current_addr.ca_address_sk
AND current_addr.ca_city <> bought_city
ORDER BY c_last_name
,c_first_name
,ca_city
,bought_city
,ss_ticket_number;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.