text
stringlengths 1
1.05M
|
|---|
insert into sline_line_day values('1','0','1','1','0');
insert into sline_line_day values('2','0','2','2','0');
insert into sline_line_day values('3','0','3','3','0');
insert into sline_line_day values('4','0','4','4','0');
insert into sline_line_day values('5','0','5','5','0');
insert into sline_line_day values('6','0','6','6','0');
insert into sline_line_day values('7','0','7','7','0');
insert into sline_line_day values('8','0','8','8','0');
insert into sline_line_day values('9','0','9','9','0');
insert into sline_line_day values('10','0','10','10','0');
|
DROP SCHEMA IF EXISTS sikb cascade;
CREATE SCHEMA sikb;
CREATE TABLE sikb.application
(
"id" serial PRIMARY KEY,
"name" text UNIQUE,
"login" text,
"password" text
);
CREATE TABLE sikb.user
(
"id" serial PRIMARY KEY,
"email" text UNIQUE,
"password" text,
"salt" text,
"information" jsonb,
"activationToken" text,
"activationTokenExpirationDate" timestamp,
"resetToken" text,
"resetTokenExpirationDate" timestamp,
"accessToken" text,
"profile" jsonb,
"enabled" boolean default false,
"creationDate" timestamp,
"modificationDate" timestamp
);
CREATE TABLE sikb.profileType
(
"id" serial PRIMARY KEY,
"name" text UNIQUE,
"functionalities" varchar(20) array
);
CREATE TABLE sikb.club
(
"id" serial PRIMARY KEY,
"name" varchar(255),
"shortName" varchar(255),
"logoKey" varchar(255) unique,
"logoData" bytea,
"creationDate" timestamp,
"modificationDate" timestamp
);
CREATE TABLE sikb.season
(
"id" varchar(8) PRIMARY KEY,
"description" varchar(255),
"begin" date,
"end" date,
"creationDate" timestamp,
"modificationDate" timestamp
);
CREATE TABLE sikb.affiliation
(
"id" serial PRIMARY KEY,
"prefectureNumber" varchar(255),
"prefectureCity" varchar(255),
"siretNumber" varchar(255),
"address" varchar(255),
"postalCode" varchar(255),
"city" varchar(255),
"phoneNumber" varchar(255),
"email" varchar(255),
"webSite" varchar(255),
"president" varchar(255),
"presidentSex" varchar(255),
"secretary" varchar(255),
"secretarySex" varchar(255),
"treasurer" varchar(255),
"treasurerSex" varchar(255),
"membersNumber" integer,
"electedDate" date,
"status" varchar(20),
"comment" text,
"creationDate" timestamp,
"modificationDate" timestamp,
"season" varchar(8) REFERENCES sikb.season (id),
"clubId" integer REFERENCES sikb.club (id) ON DELETE CASCADE,
CONSTRAINT unique_affiliation_for_club_season UNIQUE ("clubId", "season")
);
CREATE TABLE sikb.person
(
"id" serial PRIMARY KEY,
"firstName" varchar(255),
"name" varchar(255),
"sex" varchar(255),
"birthDate" date,
"address" varchar(255),
"postalCode" varchar(255),
"city" varchar(255),
"phoneNumber" varchar(255),
"email" varchar(255),
"nationality" varchar(255),
"formations" jsonb,
"photoKey" varchar(255) unique,
"photoData" bytea,
"medicalCertificateKey" varchar(255) unique,
"medicalCertificateData" bytea,
"medicalCertificateBeginValidityDate" date,
"creationDate" timestamp,
"modificationDate" timestamp
);
CREATE TABLE sikb.licenceType
(
"id" serial PRIMARY KEY,
"name" varchar(255),
"medicalCertificateRequired" boolean,
"creationDate" timestamp,
"modificationDate" timestamp
);
CREATE TABLE sikb.licence
(
"id" serial PRIMARY KEY,
"number" varchar(255) unique,
"formationsNeed" integer[],
"types" integer[],
"season" varchar(8) REFERENCES sikb.season (id),
"clubId" integer REFERENCES sikb.club (id),
"personId" integer REFERENCES sikb.person (id) ON DELETE CASCADE,
"creationDate" timestamp,
"modificationDate" timestamp,
CONSTRAINT unique_licence_for_club_season_person UNIQUE ("clubId", "season", "personId")
);
CREATE TABLE sikb.formationType
(
"id" serial PRIMARY KEY,
"name" varchar(255),
"creationDate" timestamp,
"modificationDate" timestamp
);
CREATE TABLE sikb.formation
(
"id" serial PRIMARY KEY,
"trainedDate" date,
"personId" integer REFERENCES sikb.person (id),
"refereeLevelId" integer REFERENCES sikb.formationType (id),
"creationDate" timestamp,
"modificationDate" timestamp
);
CREATE TABLE sikb.team
(
"id" serial PRIMARY KEY,
"name" varchar(255),
"season" varchar(8) REFERENCES sikb.season (id),
"clubId" integer REFERENCES sikb.club (id),
"teamMembers" jsonb,
"creationDate" timestamp,
"modificationDate" timestamp
);
|
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.4.5
-- Dumped by pg_dump version 9.4.1
-- Started on 2016-02-02 15:23:20
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
--
-- TOC entry 235 (class 3079 OID 11861)
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:
--
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
--
-- TOC entry 2527 (class 0 OID 0)
-- Dependencies: 235
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner:
--
COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
SET search_path = public, pg_catalog;
SET default_tablespace = '';
SET default_with_oids = false;
--
-- TOC entry 197 (class 1259 OID 16536)
-- Name: application_media_media_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE application_media_media_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE application_media_media_id_seq OWNER TO postgres;
--
-- TOC entry 198 (class 1259 OID 16538)
-- Name: application_media; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE application_media (
id bigint DEFAULT nextval('application_media_media_id_seq'::regclass) NOT NULL,
application_id bigint,
media_content character varying(256)[] NOT NULL
);
ALTER TABLE application_media OWNER TO postgres;
--
-- TOC entry 2529 (class 0 OID 0)
-- Dependencies: 198
-- Name: TABLE application_media; Type: COMMENT; Schema: public; Owner: postgres
--
COMMENT ON TABLE application_media IS 'Table that will hold all the media content that can be used by the Catalogue frontend to present the application.
On developer choice the media could also be placed in the file system (so that is better retrieved) and here will be saved just the path.';
--
-- TOC entry 233 (class 1259 OID 17397)
-- Name: application_size_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE application_size_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE application_size_id_seq OWNER TO postgres;
--
-- TOC entry 234 (class 1259 OID 17399)
-- Name: application_size; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE application_size (
id bigint DEFAULT nextval('application_size_id_seq'::regclass) NOT NULL,
size character varying(100) NOT NULL
);
ALTER TABLE application_size OWNER TO postgres;
--
-- TOC entry 199 (class 1259 OID 16545)
-- Name: applications_application_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE applications_application_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE applications_application_id_seq OWNER TO postgres;
--
-- TOC entry 200 (class 1259 OID 16547)
-- Name: applications; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE applications (
id bigint DEFAULT nextval('applications_application_id_seq'::regclass) NOT NULL,
application_name character varying(50) NOT NULL,
application_description text NOT NULL,
application_tosca_template text,
application_version character varying(10) NOT NULL,
status_id bigint NOT NULL,
organization_id bigint,
application_tosca_name character varying(10),
application_process bigint,
short_description text,
application_subscriber_mail text,
application_sp_mail text,
application_is_tryable boolean,
terms text,
service_price character varying(100),
platform_price character varying(100),
size_id bigint
);
ALTER TABLE applications OWNER TO postgres;
--
-- TOC entry 2530 (class 0 OID 0)
-- Dependencies: 200
-- Name: COLUMN applications.application_tosca_name; Type: COMMENT; Schema: public; Owner: postgres
--
COMMENT ON COLUMN applications.application_tosca_name IS 'This is the name used in the storage and has to be the same as the one used in the tosca file.
This will be checked and validated';
--
-- TOC entry 201 (class 1259 OID 16554)
-- Name: applications_tags; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE applications_tags (
application_id bigint NOT NULL,
tag_id bigint NOT NULL
);
ALTER TABLE applications_tags OWNER TO postgres;
--
-- TOC entry 202 (class 1259 OID 16557)
-- Name: cloudaccounts_cloudaccount_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE cloudaccounts_cloudaccount_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE cloudaccounts_cloudaccount_id_seq OWNER TO postgres;
--
-- TOC entry 203 (class 1259 OID 16559)
-- Name: cloud_accounts; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE cloud_accounts (
id bigint DEFAULT nextval('cloudaccounts_cloudaccount_id_seq'::regclass) NOT NULL,
name character varying(50) NOT NULL,
api_key character varying(100) NOT NULL,
secret_key character varying(100) NOT NULL,
endpoint character varying(100) NOT NULL,
provider_id bigint NOT NULL,
organization_id bigint NOT NULL
);
ALTER TABLE cloud_accounts OWNER TO postgres;
--
-- TOC entry 204 (class 1259 OID 16563)
-- Name: contact_contact_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE contact_contact_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE contact_contact_id_seq OWNER TO postgres;
--
-- TOC entry 205 (class 1259 OID 16565)
-- Name: contact; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE contact (
id bigint DEFAULT nextval('contact_contact_id_seq'::regclass) NOT NULL,
name character varying(100) NOT NULL,
email character varying(100) NOT NULL,
phone character varying(20),
message character varying(1000),
company_name character varying(100)
);
ALTER TABLE contact OWNER TO postgres;
--
-- TOC entry 231 (class 1259 OID 17260)
-- Name: customization_status_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE customization_status_id_seq
START WITH 100
INCREMENT BY 1
MINVALUE 100
NO MAXVALUE
CACHE 1;
ALTER TABLE customization_status_id_seq OWNER TO postgres;
--
-- TOC entry 232 (class 1259 OID 17262)
-- Name: customization_status; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE customization_status (
id bigint DEFAULT nextval('customization_status_id_seq'::regclass) NOT NULL,
status character varying(50) NOT NULL
);
ALTER TABLE customization_status OWNER TO postgres;
--
-- TOC entry 206 (class 1259 OID 16572)
-- Name: customizations_customization_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE customizations_customization_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE customizations_customization_id_seq OWNER TO postgres;
--
-- TOC entry 207 (class 1259 OID 16574)
-- Name: customizations; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE customizations (
id bigint DEFAULT nextval('customizations_customization_id_seq'::regclass) NOT NULL,
application_id bigint NOT NULL,
customization_tosca_file text NOT NULL,
customization_creation date NOT NULL,
customization_activation date NOT NULL,
customization_decommission date NOT NULL,
status_id bigint NOT NULL,
process_id character varying(64),
customer_organization_id bigint,
cloud_account_id bigint,
customization_form_value text,
pay_service boolean,
pay_platform boolean,
is_trial boolean,
trial_end_date date
);
ALTER TABLE customizations OWNER TO postgres;
--
-- TOC entry 208 (class 1259 OID 16581)
-- Name: hibernate_sequence; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE hibernate_sequence
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE hibernate_sequence OWNER TO postgres;
--
-- TOC entry 229 (class 1259 OID 17160)
-- Name: monitoring_info_elastic_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE monitoring_info_elastic_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE monitoring_info_elastic_id_seq OWNER TO postgres;
--
-- TOC entry 230 (class 1259 OID 17162)
-- Name: monitoring_info_elastic; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE monitoring_info_elastic (
id bigint DEFAULT nextval('monitoring_info_elastic_id_seq'::regclass) NOT NULL,
customization_id bigint NOT NULL,
container character varying(1000),
condition character varying(1000),
fields character varying(1000),
type character varying(1000),
description text,
title character varying(1000),
pagination bigint
);
ALTER TABLE monitoring_info_elastic OWNER TO postgres;
--
-- TOC entry 209 (class 1259 OID 16583)
-- Name: organizationstatus_organizationstatus_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE organizationstatus_organizationstatus_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE organizationstatus_organizationstatus_id_seq OWNER TO postgres;
--
-- TOC entry 210 (class 1259 OID 16585)
-- Name: organization_status; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE organization_status (
id bigint DEFAULT nextval('organizationstatus_organizationstatus_id_seq'::regclass) NOT NULL,
status character varying(20) NOT NULL
);
ALTER TABLE organization_status OWNER TO postgres;
--
-- TOC entry 211 (class 1259 OID 16589)
-- Name: organizationtypes_organizationtype_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE organizationtypes_organizationtype_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE organizationtypes_organizationtype_id_seq OWNER TO postgres;
--
-- TOC entry 212 (class 1259 OID 16591)
-- Name: organization_types; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE organization_types (
id bigint DEFAULT nextval('organizationtypes_organizationtype_id_seq'::regclass) NOT NULL,
types character varying(20) NOT NULL
);
ALTER TABLE organization_types OWNER TO postgres;
--
-- TOC entry 213 (class 1259 OID 16595)
-- Name: organizations_organization_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE organizations_organization_id_seq
START WITH 10
INCREMENT BY 1
MINVALUE 0
NO MAXVALUE
CACHE 1;
ALTER TABLE organizations_organization_id_seq OWNER TO postgres;
--
-- TOC entry 214 (class 1259 OID 16597)
-- Name: organizations; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE organizations (
id bigint DEFAULT nextval('organizations_organization_id_seq'::regclass) NOT NULL,
organization_creation date NOT NULL,
organization_activation date,
organization_decommission date,
status_id bigint NOT NULL,
organization_type bigint NOT NULL,
description character varying(500) NOT NULL,
organization_key character varying(300),
organization_name character varying(300),
email character varying(100),
contact_representative character varying(300),
contact_phone character varying(100)
);
ALTER TABLE organizations OWNER TO postgres;
--
-- TOC entry 215 (class 1259 OID 16604)
-- Name: providers_provider_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE providers_provider_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE providers_provider_id_seq OWNER TO postgres;
--
-- TOC entry 216 (class 1259 OID 16606)
-- Name: providers; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE providers (
id bigint DEFAULT nextval('providers_provider_id_seq'::regclass) NOT NULL,
provider character varying(20) NOT NULL
);
ALTER TABLE providers OWNER TO postgres;
--
-- TOC entry 217 (class 1259 OID 16610)
-- Name: status_status_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE status_status_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE status_status_id_seq OWNER TO postgres;
--
-- TOC entry 218 (class 1259 OID 16612)
-- Name: status; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE status (
id bigint DEFAULT nextval('status_status_id_seq'::regclass) NOT NULL,
status character varying(20) NOT NULL
);
ALTER TABLE status OWNER TO postgres;
--
-- TOC entry 219 (class 1259 OID 16616)
-- Name: t_authority; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE t_authority (
name character varying(50) NOT NULL
);
ALTER TABLE t_authority OWNER TO postgres;
--
-- TOC entry 220 (class 1259 OID 16619)
-- Name: t_persistent_audit_event_event_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE t_persistent_audit_event_event_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE t_persistent_audit_event_event_id_seq OWNER TO postgres;
--
-- TOC entry 221 (class 1259 OID 16621)
-- Name: t_persistent_audit_event; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE t_persistent_audit_event (
event_id bigint DEFAULT nextval('t_persistent_audit_event_event_id_seq'::regclass) NOT NULL,
principal character varying(255) NOT NULL,
event_date timestamp without time zone NOT NULL,
event_type character varying(255) NOT NULL
);
ALTER TABLE t_persistent_audit_event OWNER TO postgres;
--
-- TOC entry 222 (class 1259 OID 16628)
-- Name: t_persistent_audit_event_data; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE t_persistent_audit_event_data (
event_id bigint NOT NULL,
name character varying(255) NOT NULL,
value character varying(255) NOT NULL
);
ALTER TABLE t_persistent_audit_event_data OWNER TO postgres;
--
-- TOC entry 223 (class 1259 OID 16634)
-- Name: t_persistent_token; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE t_persistent_token (
series character varying(255) NOT NULL,
user_id bigint NOT NULL,
token_value character varying(255) NOT NULL,
token_date date NOT NULL,
ip_address character varying(39) NOT NULL,
user_agent character varying(255) NOT NULL
);
ALTER TABLE t_persistent_token OWNER TO postgres;
--
-- TOC entry 224 (class 1259 OID 16640)
-- Name: t_user_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE t_user_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE t_user_id_seq OWNER TO postgres;
--
-- TOC entry 225 (class 1259 OID 16642)
-- Name: t_user; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE t_user (
id bigint DEFAULT nextval('t_user_id_seq'::regclass) NOT NULL,
login character varying(50) NOT NULL,
password character varying(100) NOT NULL,
first_name character varying(50) NOT NULL,
last_name character varying(50) NOT NULL,
email character varying(100) NOT NULL,
activated boolean NOT NULL,
lang_key character varying(5) NOT NULL,
activation_key character varying(20) NOT NULL,
created_by character varying(50) NOT NULL,
created_date timestamp without time zone NOT NULL,
last_modified_by character varying(50) NOT NULL,
last_modified_date timestamp without time zone NOT NULL,
organization_id bigint,
reset_date date,
reset_key character(20)
);
ALTER TABLE t_user OWNER TO postgres;
--
-- TOC entry 226 (class 1259 OID 16649)
-- Name: t_user_authority; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE t_user_authority (
user_id bigint NOT NULL,
authority_name character varying(50) NOT NULL
);
ALTER TABLE t_user_authority OWNER TO postgres;
--
-- TOC entry 227 (class 1259 OID 16652)
-- Name: tags_tag_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE tags_tag_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE tags_tag_id_seq OWNER TO postgres;
--
-- TOC entry 228 (class 1259 OID 16654)
-- Name: tags; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE tags (
id bigint DEFAULT nextval('tags_tag_id_seq'::regclass) NOT NULL,
tag character varying(20) NOT NULL
);
ALTER TABLE tags OWNER TO postgres;
--
-- TOC entry 2518 (class 2613 OID 17137)
-- Name: 17137; Type: BLOB; Schema: -; Owner: postgres
--
SELECT pg_catalog.lo_create('17137');
ALTER LARGE OBJECT 17137 OWNER TO postgres;
--
-- TOC entry 2532 (class 0 OID 0)
-- Dependencies: 197
-- Name: application_media_media_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('application_media_media_id_seq', 1, false);
--
-- TOC entry 2517 (class 0 OID 17399)
-- Dependencies: 234
-- Data for Name: application_size; Type: TABLE DATA; Schema: public; Owner: postgres
--
INSERT INTO application_size (id, size) VALUES (1, 'Small');
INSERT INTO application_size (id, size) VALUES (2, 'Medium');
INSERT INTO application_size (id, size) VALUES (3, 'Large');
INSERT INTO application_size (id, size) VALUES (4, 'Extra large');
--
-- TOC entry 2533 (class 0 OID 0)
-- Dependencies: 233
-- Name: application_size_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('application_size_id_seq', 4, true);
--
-- TOC entry 2483 (class 0 OID 16547)
-- Dependencies: 200
-- Data for Name: applications; Type: TABLE DATA; Schema: public; Owner: postgres
--
INSERT INTO applications (id, application_name, application_description, application_tosca_template, application_version, status_id, organization_id, application_tosca_name, application_process, short_description, application_subscriber_mail, application_sp_mail, application_is_tryable, terms, service_price, platform_price, size_id) VALUES (3366, 'Hello', 'Hello', NULL, '1', 105, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO applications (id, application_name, application_description, application_tosca_template, application_version, status_id, organization_id, application_tosca_name, application_process, short_description, application_subscriber_mail, application_sp_mail, application_is_tryable, terms, service_price, platform_price, size_id) VALUES (3367, 'Wordpress', 'bleh', NULL, '1', 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO applications (id, application_name, application_description, application_tosca_template, application_version, status_id, organization_id, application_tosca_name, application_process, short_description, application_subscriber_mail, application_sp_mail, application_is_tryable, terms, service_price, platform_price, size_id) VALUES (3372, 'hello', 'hello', NULL, '1', 105, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO applications (id, application_name, application_description, application_tosca_template, application_version, status_id, organization_id, application_tosca_name, application_process, short_description, application_subscriber_mail, application_sp_mail, application_is_tryable, terms, service_price, platform_price, size_id) VALUES (3541, 'service test 01', 'hfalksjhflka d hflkajsdhfjhflaskj f hlsak hflksahf lksjadhflkajshf hlkasjhf', NULL, '1', 105, NULL, 'tosca66776', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO applications (id, application_name, application_description, application_tosca_template, application_version, status_id, organization_id, application_tosca_name, application_process, short_description, application_subscriber_mail, application_sp_mail, application_is_tryable, terms, service_price, platform_price, size_id) VALUES (233, 'ASIA', 'ASIA-GUIA (Applied Integrated Systems Support) is a corporative database that accumulates every data related to Facilities and Events in Barcelona and its Metropolitan Area.
The main purpose is to centralize the information about these Facilities and Events into an only system that provides users with quality information updated by the different information and public attention channels that the Barcelona City Council has.', NULL, '2', 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO applications (id, application_name, application_description, application_tosca_template, application_version, status_id, organization_id, application_tosca_name, application_process, short_description, application_subscriber_mail, application_sp_mail, application_is_tryable, terms, service_price, platform_price, size_id) VALUES (195, 'Next2Me', 'NextToMe is an application offered by the Barcelona City Council that allows the citizen to find services and events occurring around him. The objective is to develop a mobile solution that looks for nearby services and public facilities, allowing the user to filter them by category of the service/event or to look for a specific one. The application provides a list of services and facilities, geo-location of the user and a map of the services and facilities.
Agenda and NextToMe applications are going to be migrated to the CloudOpting platform under the same experiment #3, since these two applications are sharing the same technological approach.', NULL, '3', 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO applications (id, application_name, application_description, application_tosca_template, application_version, status_id, organization_id, application_tosca_name, application_process, short_description, application_subscriber_mail, application_sp_mail, application_is_tryable, terms, service_price, platform_price, size_id) VALUES (236, 'MIB', 'MIB is a service that....', NULL, '1', 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO applications (id, application_name, application_description, application_tosca_template, application_version, status_id, organization_id, application_tosca_name, application_process, short_description, application_subscriber_mail, application_sp_mail, application_is_tryable, terms, service_price, platform_price, size_id) VALUES (1, 'Clearò', 'Clearò is a shared web portal, multi-agency, delivered in the cloud, designed in accordance with standard models and patterns imposed by the Italian national laws and rules about Transparency, that respects guidelines defined by the National Authority Anti Corruption (ANAC).
Clearò can be integrated easily into the own corporate website, and is customizable according the availability of contents. It is able to handle even the aspects of storage and updating in a synergistic way with the existing information systems supporting the organization and activities of the institutions (Financial, administrative acts, Personnel Management…).', 'csisp/Clearo.czar', '3', 3, NULL, NULL, NULL, NULL, 'Thank you for subscribing to <#if serviceName?has_content>${serviceName}</#if>.
You will be contacte', 'Dear <#if serviceOrganization?has_content>${serviceOrganization}</#if>,
the service <#if serviceName', NULL, NULL, NULL, NULL, NULL);
INSERT INTO applications (id, application_name, application_description, application_tosca_template, application_version, status_id, organization_id, application_tosca_name, application_process, short_description, application_subscriber_mail, application_sp_mail, application_is_tryable, terms, service_price, platform_price, size_id) VALUES (199, 'MobileID', 'The mobile digital-identity system is a cryptographic authentication service performed through a digital-identity application for citizens, downloaded to a mobile telephone device with access to the Internet under the owner’s control, in accordance with the current legislation. The system enables the user, among other things, to communicate with services of the administration and third parties that use this digital-identity authentication system.', NULL, '2', 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO applications (id, application_name, application_description, application_tosca_template, application_version, status_id, organization_id, application_tosca_name, application_process, short_description, application_subscriber_mail, application_sp_mail, application_is_tryable, terms, service_price, platform_price, size_id) VALUES (239, 'Energy Consumption - Corby', 'The service transforms a home (or business premises) into a smart space where the power, lighting and heating can be controlled from a smartphone or tablet. In addition, electricity use and pre-set options can be monitored to manage lighting or powered devices to meet the space requirements or reduce energy consumption.', NULL, '1', 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO applications (id, application_name, application_description, application_tosca_template, application_version, status_id, organization_id, application_tosca_name, application_process, short_description, application_subscriber_mail, application_sp_mail, application_is_tryable, terms, service_price, platform_price, size_id) VALUES (243, 'BusPortal - Corby', 'The Northamptonshire Bus Portal is an online website designed to help users plan their journey more easily. The service will be developed taking into account Northamptonshire’s ambition of accelerating modal shift which will result in greater public transport use. Expanding information on public services to an online platform is also part of Northamptonshire Transportation Plan of 2012. The service will be developed by TeamNet using Northamptonshire County Council data.', NULL, '3', 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO applications (id, application_name, application_description, application_tosca_template, application_version, status_id, organization_id, application_tosca_name, application_process, short_description, application_subscriber_mail, application_sp_mail, application_is_tryable, terms, service_price, platform_price, size_id) VALUES (182, 'Agenda', 'City Agenda is a service offered by Barcelona City Council that aims to increase the citizen participation by keeping them updated with the schedule of the events. The objective is to develop a mobile solution that allows the users to look for cultural and leisure events –by theme– happening in Barcelona. The application provides a list of events occurring within an established distance, geo-location of the user, map of events, search tool for events and possibility of highlighting events.', NULL, '3', 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO applications (id, application_name, application_description, application_tosca_template, application_version, status_id, organization_id, application_tosca_name, application_process, short_description, application_subscriber_mail, application_sp_mail, application_is_tryable, terms, service_price, platform_price, size_id) VALUES (181, 'FixThis', 'Fix This is an application set to ease the interaction among the citizens and the city council. The objective is to develop a mobile solution where citizens can report geo-located incidences with their smartphones, which are automatically sent to the incidents systems of the Public Administration for reporting and then take corrective actions. The application provides a list of possible incidences, geo-location of the user, record of incidences sent by the user and status of them.', NULL, '2', 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO applications (id, application_name, application_description, application_tosca_template, application_version, status_id, organization_id, application_tosca_name, application_process, short_description, application_subscriber_mail, application_sp_mail, application_is_tryable, terms, service_price, platform_price, size_id) VALUES (242, 'Transportation System - Corby', 'Transportation System - Corby is a service that allows to...', NULL, '2', 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO applications (id, application_name, application_description, application_tosca_template, application_version, status_id, organization_id, application_tosca_name, application_process, short_description, application_subscriber_mail, application_sp_mail, application_is_tryable, terms, service_price, platform_price, size_id) VALUES (716, 'TestApp', 'Test application description', NULL, '1', 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO applications (id, application_name, application_description, application_tosca_template, application_version, status_id, organization_id, application_tosca_name, application_process, short_description, application_subscriber_mail, application_sp_mail, application_is_tryable, terms, service_price, platform_price, size_id) VALUES (4056, 'aClearo', ' <p>Clearo description<br/></p> <h2 class="service-summary-heading">Features</h2> <ul class="service-summary-features-and-benefits"> <li>Feature 1</li> </ul> <h2 class="service-summary-heading">Benefits</h2> <ul class="service-summary-features-and-benefits"> <li>Benefit 1</li> </ul> <h2 class="service-summary-heading">Support</h2> <h2 class="service-summary-heading">Price</h2> <h2 class="service-summary-heading">Contact</h2> <p>Name Surname</p> <p>phone</p> <p>mail</p> ', 'csi/clearo/template/tosca.zip', '1', 3, 3929, 'clearo', NULL, NULL, 'Thank you for subscribing to <#if serviceName?has_content>${serviceName}</#if>.
You will be contacte', 'Dear <#if serviceOrganization?has_content>${serviceOrganization}</#if>,
the service', NULL, NULL, NULL, NULL, NULL);
INSERT INTO applications (id, application_name, application_description, application_tosca_template, application_version, status_id, organization_id, application_tosca_name, application_process, short_description, application_subscriber_mail, application_sp_mail, application_is_tryable, terms, service_price, platform_price, size_id) VALUES (4516, 'ProvaFixDeployLogo', ' <p>Fix deploy logo win 10</p> <h5 class="service-summary-heading">Features</h5> <ul class="service-summary-features-and-benefits"> <li>[Place your features here]</li> <li>[Place your features here]</li> </ul> <h5 class="service-summary-heading">Benefits</h5> <ul class="service-summary-features-and-benefits"> <li>[Place your benefits here]</li> <li>[Place your benefits here]</li> </ul> <h5 class="service-summary-heading">Support</h5> <h5 class="service-summary-heading">Price</h5> <h5 class="service-summary-heading">Contact</h5> <ul class="service-summary-features-and-benefits"> <li>Name, Surname: [Place your name here]</li> <li>Phone number: [Place your phone number here]</li> <li>E-mail: [Place your e-mail here]</li> </ul> ', 'organization_key/Prova2/template/l-uomo-tigre-17.jpg', '1', 3, 1, 'Prova2', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
--
-- TOC entry 2534 (class 0 OID 0)
-- Dependencies: 199
-- Name: applications_application_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('applications_application_id_seq', 4516, true);
--
-- TOC entry 2486 (class 0 OID 16559)
-- Dependencies: 203
-- Data for Name: cloud_accounts; Type: TABLE DATA; Schema: public; Owner: postgres
--
INSERT INTO cloud_accounts (id, name, api_key, secret_key, endpoint, provider_id, organization_id) VALUES (1, 'CSI-Cloud', 'OOmWvl5fK_-WA1efI9-xyk8_mD-ZruqPDcNCQl1MqC6D8s3enzRssRRXnLwMhko93BfSBcIC3M8ZuPOsMCeSRQ', 'vkWj7MV9z0PIV6FEQyoqzB46CJ4fOziqSaCTyT1gCSa-FXsygKuePsJ__e2gJjEsug0k9Pt7WVDPWWIcEZ0wjA', 'https://cs1.cloudopen.csipiemonte.it:8443/client/api', 1, 1);
--
-- TOC entry 2535 (class 0 OID 0)
-- Dependencies: 202
-- Name: cloudaccounts_cloudaccount_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('cloudaccounts_cloudaccount_id_seq', 1, false);
--
-- TOC entry 2536 (class 0 OID 0)
-- Dependencies: 204
-- Name: contact_contact_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('contact_contact_id_seq', 1, false);
--
-- TOC entry 2515 (class 0 OID 17262)
-- Dependencies: 232
-- Data for Name: customization_status; Type: TABLE DATA; Schema: public; Owner: postgres
--
INSERT INTO customization_status (id, status) VALUES (100, 'Requested');
INSERT INTO customization_status (id, status) VALUES (101, 'Running');
INSERT INTO customization_status (id, status) VALUES (102, 'Stopped');
INSERT INTO customization_status (id, status) VALUES (103, 'To Delete');
INSERT INTO customization_status (id, status) VALUES (104, 'Deleted');
--
-- TOC entry 2537 (class 0 OID 0)
-- Dependencies: 231
-- Name: customization_status_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('customization_status_id_seq', 104, true);
--
-- TOC entry 2539 (class 0 OID 0)
-- Dependencies: 208
-- Name: hibernate_sequence; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('hibernate_sequence', 5300, true);
--
-- TOC entry 2540 (class 0 OID 0)
-- Dependencies: 229
-- Name: monitoring_info_elastic_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('monitoring_info_elastic_id_seq', 1, true);
--
-- TOC entry 2493 (class 0 OID 16585)
-- Dependencies: 210
-- Data for Name: organization_status; Type: TABLE DATA; Schema: public; Owner: postgres
--
INSERT INTO organization_status (id, status) VALUES (1, 'Pending');
INSERT INTO organization_status (id, status) VALUES (2, 'Validated');
INSERT INTO organization_status (id, status) VALUES (3, 'Retired');
SELECT pg_catalog.setval('organizationstatus_organizationstatus_id_seq', 3, true);
--
-- TOC entry 2495 (class 0 OID 16591)
-- Dependencies: 212
-- Data for Name: organization_types; Type: TABLE DATA; Schema: public; Owner: postgres
--
INSERT INTO organization_types (id, types) VALUES (1, 'Type 1');
INSERT INTO organization_types (id, types) VALUES (2, 'Type 2');
INSERT INTO organization_types (id, types) VALUES (3, 'Type 3');
SELECT pg_catalog.setval('organizationtypes_organizationtype_id_seq', 3, true);
--
-- TOC entry 2497 (class 0 OID 16597)
-- Dependencies: 214
-- Data for Name: organizations; Type: TABLE DATA; Schema: public; Owner: postgres
--
INSERT INTO organizations (id, organization_creation, organization_activation, organization_decommission, status_id, organization_type, description, organization_key, organization_name, email, contact_representative, contact_phone) VALUES (4034, '2016-01-26', '2016-01-26', NULL, 1, 1, 'SP', 'SP', 'SP', NULL, NULL, NULL);
INSERT INTO organizations (id, organization_creation, organization_activation, organization_decommission, status_id, organization_type, description, organization_key, organization_name, email, contact_representative, contact_phone) VALUES (3929, '2016-01-26', '2016-01-28', NULL, 1, 1, 'Consorzio per il sistema informativo della Regione Piemonte', 'csi', 'CSI-Piemonte', 'luca.gioppo@csi.it', 'Anna Cavallo', '+390113168713');
INSERT INTO organizations (id, organization_creation, organization_activation, organization_decommission, status_id, organization_type, description, organization_key, organization_name, email, contact_representative, contact_phone) VALUES (4176, '2016-01-28', '2016-01-28', NULL, 1, 1, 'Testing organization for subscribers', 'goth', 'Gotham City', 'luca.gioppo@csi.it', 'Bruce Wayne', '+4100000000');
INSERT INTO organizations (id, organization_creation, organization_activation, organization_decommission, status_id, organization_type, description, organization_key, organization_name, email, contact_representative, contact_phone) VALUES (4198, '2016-01-28', '2016-01-28', NULL, 1, 1, 'SC TeamNet International SA', 'TEA', 'Teamnet', NULL, NULL, NULL);
INSERT INTO organizations (id, organization_creation, organization_activation, organization_decommission, status_id, organization_type, description, organization_key, organization_name, email, contact_representative, contact_phone) VALUES (4197, '2016-01-28', '2016-01-28', NULL, 1, 1, 'Institut Municipal Informàtica (Barcelona)', 'IMI', 'IMI', NULL, NULL, NULL);
INSERT INTO organizations (id, organization_creation, organization_activation, organization_decommission, status_id, organization_type, description, organization_key, organization_name, email, contact_representative, contact_phone) VALUES (4199, '2016-01-28', '2016-01-28', NULL, 1, 1, 'Wellness Telecom', 'WT', 'Wellness Telecom', NULL, NULL, NULL);
INSERT INTO organizations (id, organization_creation, organization_activation, organization_decommission, status_id, organization_type, description, organization_key, organization_name, email, contact_representative, contact_phone) VALUES (4203, '2016-01-28', '2016-01-28', NULL, 1, 1, 'Atos WordLine', 'ATOSWL', 'Atos WordLine', NULL, NULL, NULL);
INSERT INTO organizations (id, organization_creation, organization_activation, organization_decommission, status_id, organization_type, description, organization_key, organization_name, email, contact_representative, contact_phone) VALUES (4204, '2016-01-28', '2016-01-28', NULL, 1, 1, 'SDG', 'SDG', 'SDG', NULL, NULL, NULL);
INSERT INTO organizations (id, organization_creation, organization_activation, organization_decommission, status_id, organization_type, description, organization_key, organization_name, email, contact_representative, contact_phone) VALUES (4205, '2016-01-28', '2016-01-28', NULL, 1, 1, 'Smart Partnership', 'SP', 'Smart Partnership', NULL, NULL, NULL);
INSERT INTO organizations (id, organization_creation, organization_activation, organization_decommission, status_id, organization_type, description, organization_key, organization_name, email, contact_representative, contact_phone) VALUES (4206, '2016-01-28', '2016-01-28', NULL, 1, 1, 'Profesia SRL', 'PRO', 'Profesia', NULL, NULL, NULL);
INSERT INTO organizations (id, organization_creation, organization_activation, organization_decommission, status_id, organization_type, description, organization_key, organization_name, email, contact_representative, contact_phone) VALUES (4207, '2016-01-28', '2016-01-28', NULL, 1, 1, 'Electric Corby', 'COR', 'Electric Corby', NULL, NULL, NULL);
INSERT INTO organizations (id, organization_creation, organization_activation, organization_decommission, status_id, organization_type, description, organization_key, organization_name, email, contact_representative, contact_phone) VALUES (4208, '2016-01-28', '2016-01-28', NULL, 1, 1, 'Netport Science Park AB', 'NET', 'Netport', NULL, NULL, NULL);
INSERT INTO organizations (id, organization_creation, organization_activation, organization_decommission, status_id, organization_type, description, organization_key, organization_name, email, contact_representative, contact_phone) VALUES (1, '2015-02-15', '2015-02-15', '2015-02-15', 1, 1, 'organization de', 'organization_key', 'organization_name', 'luca.gioppo@csi.it', 'Luca Gioppo', NULL);
--
-- TOC entry 2541 (class 0 OID 0)
-- Dependencies: 213
-- Name: organizations_organization_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('organizations_organization_id_seq', 4209, true);
--
-- TOC entry 2499 (class 0 OID 16606)
-- Dependencies: 216
-- Data for Name: providers; Type: TABLE DATA; Schema: public; Owner: postgres
--
INSERT INTO providers (id, provider) VALUES (1, 'cloudstack');
--
-- TOC entry 2544 (class 0 OID 0)
-- Dependencies: 215
-- Name: providers_provider_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('providers_provider_id_seq', 1, false);
--
-- TOC entry 2501 (class 0 OID 16612)
-- Dependencies: 218
-- Data for Name: status; Type: TABLE DATA; Schema: public; Owner: postgres
--
INSERT INTO status (id, status) VALUES (1, 'Uploaded');
INSERT INTO status (id, status) VALUES (2, 'For Testing');
INSERT INTO status (id, status) VALUES (3, 'Published');
INSERT INTO status (id, status) VALUES (101, 'Running');
INSERT INTO status (id, status) VALUES (102, 'Stopped');
INSERT INTO status (id, status) VALUES (103, 'To Delete');
INSERT INTO status (id, status) VALUES (104, 'Deleted');
INSERT INTO status (id, status) VALUES (100, 'Requested');
INSERT INTO status (id, status) VALUES (90, 'In Deployment');
INSERT INTO status (id, status) VALUES (105, 'Draft');
--
-- TOC entry 2545 (class 0 OID 0)
-- Dependencies: 217
-- Name: status_status_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('status_status_id_seq', 105, false);
--
-- TOC entry 2502 (class 0 OID 16616)
-- Dependencies: 219
-- Data for Name: t_authority; Type: TABLE DATA; Schema: public; Owner: postgres
--
INSERT INTO t_authority (name) VALUES ('ROLE_ADMIN');
INSERT INTO t_authority (name) VALUES ('ROLE_USER');
INSERT INTO t_authority (name) VALUES ('ROLE_SUBSCRIBER');
INSERT INTO t_authority (name) VALUES ('ROLE_PUBLISHER');
INSERT INTO t_authority (name) VALUES ('ROLE_OPERATOR');
--
-- TOC entry 2546 (class 0 OID 0)
-- Dependencies: 220
-- Name: t_persistent_audit_event_event_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('t_persistent_audit_event_event_id_seq', 1, false);
--
-- TOC entry 2506 (class 0 OID 16634)
-- Dependencies: 223
-- Data for Name: t_persistent_token; Type: TABLE DATA; Schema: public; Owner: postgres
--
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('vD+UoEjDB8FX5L4RDaLzOw==', 3, 'AV5uhkGoYdDGauDqV7EGog==', '2016-01-20', '0:0:0:0:0:0:0:1', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('5IZch0McspWm1Ky+RnNYJg==', 3, 'KLU3H7nSSRNE7MKo0ZNN4g==', '2016-01-20', '0:0:0:0:0:0:0:1', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('CEWUkMONPOsxBrDTjpGOCw==', 3, '+NVO2+V++Q0GQGgGS8GKPA==', '2016-01-21', '0:0:0:0:0:0:0:1', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('1+DLKns/c2z4O3oGYqa5Hw==', 3, 'pbmXKEs7OtcAAmlW1DPbJA==', '2016-01-22', '0:0:0:0:0:0:0:1', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('vakjY934DOg4bSgElYX+Dw==', 3, 'bgaCGjp+7gOYLKgmg8kzTg==', '2016-01-22', '0:0:0:0:0:0:0:1', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('VJFfNejp341gMvfsJRbPHg==', 3, 'Cs2UEEWgz/H48O9adi94iA==', '2016-01-22', '0:0:0:0:0:0:0:1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:43.0) Gecko/20100101 Firefox/43.0');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('QsVWEuUlClTMgSHmurzQig==', 3, 'FvmHpu3XW80LnbPfMQM2eg==', '2016-01-22', '10.0.2.2', 'Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('b8tHRSII2A3D6qAxur0COg==', 3, 'XhNNKcGYeBE3Xst3XzJKkQ==', '2016-01-25', '0:0:0:0:0:0:0:1', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('n2icDqzjorKGjciZshwXbA==', 3, 'WhoggETe6CBIb9PphQm2ig==', '2016-01-25', '0:0:0:0:0:0:0:1', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('yOWmSAr7lNCW+UQX5uxJ2w==', 3, 'BrgCOYiHA9wZflwKz49HFA==', '2016-01-25', '0:0:0:0:0:0:0:1', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('Puzwac3Hoq0pdlmMAj12Mg==', 3, 'eb2WpL2zfL48hAAb1Q8Phw==', '2016-01-25', '0:0:0:0:0:0:0:1', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('E9mXFJoucOlbrwGjI8VPcA==', 3, 'euzcjWjVixcC4jemhYSL7w==', '2016-01-25', '0:0:0:0:0:0:0:1', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('9Tr8/qgMaNTNDrts7kRH/w==', 5, 'WnkXNqygc7+61Y3pH3wKxw==', '2016-01-25', '10.0.2.2', 'Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('06m7XVLRiR8OnzxzCsUnvQ==', 3, '25eWRxX0DnV89o16YvMelg==', '2016-01-25', '10.0.2.2', 'Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('QXGvJC13qQnFN1IqWWwnZQ==', 3, 'xJBXiV+zHgeDW0vpH+AG6Q==', '2016-01-25', '10.0.2.2', 'Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('Qi0FOq7SSb4SutJBZj5+fA==', 3, 'AROFeZZLWqLPl5AJz2oppA==', '2016-01-25', '10.0.2.2', 'Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('JoU2JY9EyIv0ZqYc6DflvQ==', 3, '8x/eQp3WNNO3leEy+6/06g==', '2016-01-25', '0:0:0:0:0:0:0:1', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('Eo9S9PnLaQyDU+RQsMiKDQ==', 3, 'cxz/60IzWFBOHIzvgmT9cg==', '2016-01-25', '10.0.2.2', 'Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('HfA45XUf/m1Z/+t2f0xUzw==', 3, '62ex89mrpoxIWZoJkp4Zgg==', '2016-01-25', '0:0:0:0:0:0:0:1', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('nU1AMSa8Xaskm0V1P9wLQg==', 3, 'aP1y/F1JLzS05wzaEEqRZw==', '2016-01-25', '0:0:0:0:0:0:0:1', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('U8hZAINrRohqmizVg5CKSA==', 3, 'JqlQUrjUvirdAGug2Ha/Rg==', '2016-01-25', '10.0.2.2', 'Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('EPLi8HbFRZjypl6l0xGgZQ==', 3, 'WtDbpnP/zHsp0GrRRHgwzw==', '2016-01-25', '0:0:0:0:0:0:0:1', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('AXDP4gevadEmaToewdbv0Q==', 3, '7KPCpwNkZaNL82WTfllP5g==', '2016-01-25', '0:0:0:0:0:0:0:1', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('CXRekRY93ESC3E2NaHFaLw==', 3, 'fHOEbif4lt3G5JUGMnTC8A==', '2016-01-25', '0:0:0:0:0:0:0:1', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('mOzLu5HEO14Z21l+PI6URw==', 3, 'un/E+MVStYSwhajD8nM0sQ==', '2016-01-26', '0:0:0:0:0:0:0:1', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('kqxf09TZwkdRdTMkaAXquw==', 3, '1a3YR+4e4O+SqU3EjKda3w==', '2016-01-26', '0:0:0:0:0:0:0:1', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('52JqDfQnVRXS8dkzRTxKyA==', 3930, 'OMhizQ8QkLNynSvtZZBjAg==', '2016-01-26', '10.0.2.2', 'Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('xxa3akCmf6RKnSejVMoXcg==', 3, 'BTHioaWKBv9zNnAhwSuGSA==', '2016-01-26', '10.0.2.2', 'Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('kE0yed/fleDUkNQuckFvfQ==', 3, 'xhXlj06IhBsKEcIzrPzmzQ==', '2016-01-26', '10.0.2.2', 'Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('psJZ9V9zCaDUyG0i+hzX8w==', 3, 'w8G5By5P0CZ2VFx6IM54AA==', '2016-01-26', '10.0.2.2', 'Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('su8m7pYzVkxRLFl/2B+zGA==', 3, 'UNidwMPQAJ+rfu/CfS2lSA==', '2016-01-26', '0:0:0:0:0:0:0:1', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('9q96pz6sY5F9Z9PSe4kEPQ==', 3, 'K40ozSMGfKV1zslXaTLIQg==', '2016-01-26', '0:0:0:0:0:0:0:1', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('at865diqBluxZMUGa3ZKeA==', 3, '419qEAW3pU7EQL2GHOkblA==', '2016-01-26', '10.0.2.2', 'Mozilla/5.0 (Windows NT 5.1; rv:43.0) Gecko/20100101 Firefox/43.0');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('eWSU3uk3c5Kd/lP0/dmylw==', 3, 'QTpezWokQr/9SGE9u4Pkuw==', '2016-01-26', '10.0.2.2', 'Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('NRoxvaL7qwp2CLvxBgSWfQ==', 3, 'i8E0kdsVPNVWabks/bh39Q==', '2016-01-26', '10.0.2.2', 'Mozilla/5.0 (Windows NT 5.1; rv:43.0) Gecko/20100101 Firefox/43.0');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('MQ0xd76gl90N5b8f420uSA==', 3, '+X5i07KBelwV6HyvgLsySg==', '2016-01-26', '10.0.2.2', 'Mozilla/5.0 (Windows NT 5.1; rv:43.0) Gecko/20100101 Firefox/43.0');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('RyOV23VuGyEjHj1VA2n4ag==', 3, 'H2IxYTkUimJGvcuGeY6+2A==', '2016-01-27', '10.0.2.2', 'Mozilla/5.0 (Windows NT 5.1; rv:43.0) Gecko/20100101 Firefox/43.0');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('MhvV6FATOP2503hyWpiJYQ==', 3, '12WHNv7G9JR8ppA1rAytsA==', '2016-01-26', '0:0:0:0:0:0:0:1', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('FWe1Rc9ZV8Nw2HL2KyzBkw==', 3, 'XjcxqQWfBCbJeZqGyNUnWw==', '2016-01-26', '0:0:0:0:0:0:0:1', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('vWkZ4tbt9YfwxBwxB7X80Q==', 3, 'RusvXGizd2jyk87MhlqW3g==', '2016-01-26', '0:0:0:0:0:0:0:1', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('RI7CXGT/UFvcgYFegJ/x0w==', 3, 'XrdiZ7BO4pOlTq2Xi3DjCA==', '2016-01-26', '10.0.2.2', 'Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('0xekgkdJ662MP935O/jAOQ==', 3, 'R6LsIOch28Tj3LRCyXW27w==', '2016-01-27', '0:0:0:0:0:0:0:1', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('q3/5kNHES4FYnEUB8EOfFA==', 3, 'B75gNZ/s6SHmkbIQM7raFQ==', '2016-01-27', '10.0.2.2', 'Mozilla/5.0 (Windows NT 5.1; rv:43.0) Gecko/20100101 Firefox/43.0');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('B99wTohmDykT6G7W8id1BA==', 3, 'AG2PZ74R/sX4KwArv0RVcw==', '2016-01-27', '0:0:0:0:0:0:0:1', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('OQbVHT1PT9g+BiPaevyODg==', 3, 'KV1WVx0F9rKHQ8FX9RcGRA==', '2016-01-27', '0:0:0:0:0:0:0:1', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('t7vj3AKI0V2ettjQZLM0BA==', 3, 'd/3+eFnBclsM8YE6S/iYBQ==', '2016-01-28', '10.0.2.2', 'Mozilla/5.0 (Windows NT 5.1; rv:44.0) Gecko/20100101 Firefox/44.0');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('Uqik94fDoaTxzQfmgRdH8g==', 3, 'mh/6dnIh67w3hSPAgqQ/0A==', '2016-01-28', '0:0:0:0:0:0:0:1', 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('EuFIH9ptgS6u+0dItHHN7Q==', 3, '1aj6k2kOUJYlaTdgxHbfiQ==', '2016-02-01', '0:0:0:0:0:0:0:1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.97 Safari/537.36');
INSERT INTO t_persistent_token (series, user_id, token_value, token_date, ip_address, user_agent) VALUES ('s8N2icUHTJmG5hmcK+2MQg==', 3, 'GwMIOqFNcSrZrqFGvtLkVw==', '2016-02-01', '0:0:0:0:0:0:0:1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.97 Safari/537.36');
--
-- TOC entry 2508 (class 0 OID 16642)
-- Dependencies: 225
-- Data for Name: t_user; Type: TABLE DATA; Schema: public; Owner: postgres
--
INSERT INTO t_user (id, login, password, first_name, last_name, email, activated, lang_key, activation_key, created_by, created_date, last_modified_by, last_modified_date, organization_id, reset_date, reset_key) VALUES (1, 'system', '$2a$10$mE.qmcV0mFU5NcKh73TZx.z4ueI/.bDWbj0T1BYyqP481kGGarKLG', 'system', 'System', 'syste@syste.com', true, 'en', '1234', 'system', '2015-02-15 14:12:41.67', 'admin', '2015-02-15 00:00:00', NULL, NULL, NULL);
INSERT INTO t_user (id, login, password, first_name, last_name, email, activated, lang_key, activation_key, created_by, created_date, last_modified_by, last_modified_date, organization_id, reset_date, reset_key) VALUES (4, 'operator', '$2a$10$gSAhZrxMllrbgj/kkK9UceBPpChGWJA7SYIb1Mqo.n5aNLq1/oRrC', 'Operator', 'Operator', 'operator@cloudopting.eu', true, 'en', '55555', 'admin', '2015-02-15 00:00:00', 'admin', '2015-02-15 00:00:00', NULL, NULL, NULL);
INSERT INTO t_user (id, login, password, first_name, last_name, email, activated, lang_key, activation_key, created_by, created_date, last_modified_by, last_modified_date, organization_id, reset_date, reset_key) VALUES (3, 'admin', '$2a$10$gSAhZrxMllrbgj/kkK9UceBPpChGWJA7SYIb1Mqo.n5aNLq1/oRrC', 'Admin', 'Administrator', 'admin@admin.com', true, 'en', '55555', 'admin', '2015-02-15 00:00:00', 'admin', '2015-09-21 13:34:25.883', 1, NULL, NULL);
INSERT INTO t_user (id, login, password, first_name, last_name, email, activated, lang_key, activation_key, created_by, created_date, last_modified_by, last_modified_date, organization_id, reset_date, reset_key) VALUES (2808, 'xrierape', '$2a$10$2J3Swo2eMyYL4YM.g6IIlOohjDunN0Nee4QzvGhLwDAC3e5t5hjFS', 'Xavier', 'Riera Pérez', 'xrierape@gmail.com', true, 'en', '94479004834454765443', 'anonymousUser', '2015-09-23 09:07:18.103', 'anonymousUser', '2015-09-23 09:07:18.103', NULL, NULL, NULL);
INSERT INTO t_user (id, login, password, first_name, last_name, email, activated, lang_key, activation_key, created_by, created_date, last_modified_by, last_modified_date, organization_id, reset_date, reset_key) VALUES (5, 'subscriber', '$2a$10$gSAhZrxMllrbgj/kkK9UceBPpChGWJA7SYIb1Mqo.n5aNLq1/oRrC', 'Subscriber', 'Subscriber', 'subscriber@cloudopting.eu', true, 'en', '21640000158412619719', 'admin', '2015-02-15 00:00:00', 'admin', '2016-01-25 08:50:10.86', 1, NULL, NULL);
INSERT INTO t_user (id, login, password, first_name, last_name, email, activated, lang_key, activation_key, created_by, created_date, last_modified_by, last_modified_date, organization_id, reset_date, reset_key) VALUES (4224, 'atos', '$2a$10$NS.a4jxZ/O1xAKxiw95HZer633OGnyP2XBtZAWnkyzsg8oTbf6KSu', 'atos', 'atos', 'atos@atos', true, 'es', '66584456996728323974', 'admin', '2016-01-28 11:16:20.707', 'admin', '2016-01-28 11:16:21.064', 4203, NULL, NULL);
INSERT INTO t_user (id, login, password, first_name, last_name, email, activated, lang_key, activation_key, created_by, created_date, last_modified_by, last_modified_date, organization_id, reset_date, reset_key) VALUES (4225, 'atossub', '$2a$10$85Sr5K1pqWY/euXgVciPg.YzJ4neVk67Y.MuHzHa1/EXGO8CbAEk.', 'atossub', 'atossub', 'atossub@atossub', true, 'es', '71753378132134513717', 'admin', '2016-01-28 11:17:09.676', 'admin', '2016-01-28 11:17:10.016', 4203, NULL, NULL);
INSERT INTO t_user (id, login, password, first_name, last_name, email, activated, lang_key, activation_key, created_by, created_date, last_modified_by, last_modified_date, organization_id, reset_date, reset_key) VALUES (4226, 'sdg', '$2a$10$IZvOH4m29kn795YpzMUyou3YQp5Q1j0X8QHLMTvUZFjK5QnRPwCuW', 'sdg', 'sdg', 'sdg@sdg', true, 'es', '14044400908802023069', 'admin', '2016-01-28 11:18:06.216', 'admin', '2016-01-28 11:18:06.555', 4204, NULL, NULL);
INSERT INTO t_user (id, login, password, first_name, last_name, email, activated, lang_key, activation_key, created_by, created_date, last_modified_by, last_modified_date, organization_id, reset_date, reset_key) VALUES (4227, 'sdgsub', '$2a$10$.IrhCxiOVXPAVD.FZ7qoOejR5OVjMtg6As7izBSuI7/lwoZnBWHim', 'sdgsub', 'sdgsub', 'sdgsub@sdgsub', true, 'es', '66428671708232022851', 'admin', '2016-01-28 11:18:38.255', 'admin', '2016-01-28 11:18:38.594', 4204, NULL, NULL);
INSERT INTO t_user (id, login, password, first_name, last_name, email, activated, lang_key, activation_key, created_by, created_date, last_modified_by, last_modified_date, organization_id, reset_date, reset_key) VALUES (3930, 'gioppoluca', '$2a$10$9fS/5N7.4s7ye4k50kFeU.cqdHjH3JzptLg7f3ZUlJ1J/2dmU3mHK', 'Luca', 'Gioppo', 'gioppo@csi.it', true, 'en', '64648802047098836422', 'admin', '2016-01-26 08:14:04.936', 'admin', '2016-01-27 08:10:21.551', 3929, NULL, NULL);
INSERT INTO t_user (id, login, password, first_name, last_name, email, activated, lang_key, activation_key, created_by, created_date, last_modified_by, last_modified_date, organization_id, reset_date, reset_key) VALUES (6, 'publisher', '$2a$10$gSAhZrxMllrbgj/kkK9UceBPpChGWJA7SYIb1Mqo.n5aNLq1/oRrC', 'Publisher', 'Publisher', 'publisher@cloudopting.eu', true, 'en', '55555', 'admin', '2015-02-15 00:00:00', 'admin', '2015-02-15 00:00:00', 1, NULL, NULL);
INSERT INTO t_user (id, login, password, first_name, last_name, email, activated, lang_key, activation_key, created_by, created_date, last_modified_by, last_modified_date, organization_id, reset_date, reset_key) VALUES (4177, 'batman', '$2a$10$2A8a8r7PdZ2sW6lIZAR.AeOeBMsFePoxM5NphTBBjmNNglxdkAe7y', 'Batman', 'DarkKnight', 'luca.gioppo@csi.it', true, 'en', '08924129517987390505', 'admin', '2016-01-28 10:20:22.946', 'admin', '2016-01-28 10:20:23.115', 4176, NULL, NULL);
INSERT INTO t_user (id, login, password, first_name, last_name, email, activated, lang_key, activation_key, created_by, created_date, last_modified_by, last_modified_date, organization_id, reset_date, reset_key) VALUES (4228, 'sp', '$2a$10$AtOllByr8uEryci74VPSBetSFawYPAjyYL3b87T2GVa.IIu82wmp.', 'sp', 'sp', 'sp@sp', true, 'es', '70398601152922291681', 'admin', '2016-01-28 11:19:13.498', 'admin', '2016-01-28 11:19:13.852', 4205, NULL, NULL);
INSERT INTO t_user (id, login, password, first_name, last_name, email, activated, lang_key, activation_key, created_by, created_date, last_modified_by, last_modified_date, organization_id, reset_date, reset_key) VALUES (4209, 'imi', '$2a$10$DcktY8ZUN57KNk.ihu1JreFded9PQZxUNXaeOlPgws2Jobbdzhtrq', 'IMI', 'IMI', 'imi@imi', true, 'es', '16664986804693461923', 'admin', '2016-01-28 10:58:48.439', 'admin', '2016-01-28 10:58:48.848', 4197, NULL, NULL);
INSERT INTO t_user (id, login, password, first_name, last_name, email, activated, lang_key, activation_key, created_by, created_date, last_modified_by, last_modified_date, organization_id, reset_date, reset_key) VALUES (3841, 'xevi', '$2a$10$cJ3Pe1ijHszRtA/jZDD9iuSYi13RWRmUKp9Wqd2yWGtDRpqmkCsaO', 'Xavier', 'Cases Camats', 'xeviscc@gmail.com', true, 'en', '79495699300130759288', 'admin', '2016-01-25 12:14:59.826', 'admin', '2016-01-26 10:50:42.001', 1, NULL, NULL);
INSERT INTO t_user (id, login, password, first_name, last_name, email, activated, lang_key, activation_key, created_by, created_date, last_modified_by, last_modified_date, organization_id, reset_date, reset_key) VALUES (4219, 'imisub', '$2a$10$SNx.Q1uyFpm/tbKQFIyvC.s..aAl.L/N3ixEEs5lfimCJlPigqqim', 'imisub', 'imisub', 'imisub@imi', true, 'es', '70487600179142301179', 'admin', '2016-01-28 11:08:25.022', 'admin', '2016-01-28 11:08:25.416', 4197, NULL, NULL);
INSERT INTO t_user (id, login, password, first_name, last_name, email, activated, lang_key, activation_key, created_by, created_date, last_modified_by, last_modified_date, organization_id, reset_date, reset_key) VALUES (4220, 'tea', '$2a$10$zNK4ChT2a4aizOt2z.JnReNEL21TeuIW7CnuR/Onyv/.CCqLWfkpS', 'tea', 'tea', 'tea@tea', true, 'en', '48065543069572603654', 'admin', '2016-01-28 11:13:08.132', 'admin', '2016-01-28 11:13:08.472', 4198, NULL, NULL);
INSERT INTO t_user (id, login, password, first_name, last_name, email, activated, lang_key, activation_key, created_by, created_date, last_modified_by, last_modified_date, organization_id, reset_date, reset_key) VALUES (4221, 'teasub', '$2a$10$tVh66niw9CZJeWeUlIxHveXhonl2pzQvgi2CMFL1b5WI51IVSRqvO', 'teasub', 'teasub', 'teasub@teasub', true, 'en', '66345853996746447264', 'admin', '2016-01-28 11:13:47.438', 'admin', '2016-01-28 11:13:47.781', 4198, NULL, NULL);
INSERT INTO t_user (id, login, password, first_name, last_name, email, activated, lang_key, activation_key, created_by, created_date, last_modified_by, last_modified_date, organization_id, reset_date, reset_key) VALUES (4222, 'wt', '$2a$10$n.3ejHTZ7TaoTDueSKr1/.o6u2VaPrFH6B7oZpVgvmq1PdnNcg9xS', 'wt', 'wt', 'wt@wt', true, 'es', '28787352189585816823', 'admin', '2016-01-28 11:14:40.541', 'admin', '2016-01-28 11:14:40.882', 4199, NULL, NULL);
INSERT INTO t_user (id, login, password, first_name, last_name, email, activated, lang_key, activation_key, created_by, created_date, last_modified_by, last_modified_date, organization_id, reset_date, reset_key) VALUES (4223, 'wtsub', '$2a$10$YElGsp2jMZkadZ0OOyDoJu3/G6Akb6nI9nnr8y7ZRc28LBU/AedOC', 'wtsub', 'wtsub', 'wtsub@stsub', true, 'es', '09661787364519288906', 'admin', '2016-01-28 11:15:30.075', 'admin', '2016-01-28 11:15:30.416', 4199, NULL, NULL);
INSERT INTO t_user (id, login, password, first_name, last_name, email, activated, lang_key, activation_key, created_by, created_date, last_modified_by, last_modified_date, organization_id, reset_date, reset_key) VALUES (4229, 'spsub', '$2a$10$Kv58CYCnvM2Ea..fZQ19FOtIyy.ny2O5D1o.KUBRPrrPEBHxyGTSC', 'spsub', 'spsub', 'spsub@spsub', true, 'es', '89294477505746669494', 'admin', '2016-01-28 11:19:46.123', 'admin', '2016-01-28 11:19:46.554', 4205, NULL, NULL);
INSERT INTO t_user (id, login, password, first_name, last_name, email, activated, lang_key, activation_key, created_by, created_date, last_modified_by, last_modified_date, organization_id, reset_date, reset_key) VALUES (4230, 'pro', '$2a$10$oAFqGK0D7w7WbtoviYrWL.5DKBuUAySDchrpoSisFpMGcDk03dxnu', 'pro', 'pro', 'guido.spadotto@profesia.it', true, 'it', '34760273132049155931', 'admin', '2016-01-28 11:20:36.491', 'admin', '2016-01-28 11:20:36.849', 4206, NULL, NULL);
INSERT INTO t_user (id, login, password, first_name, last_name, email, activated, lang_key, activation_key, created_by, created_date, last_modified_by, last_modified_date, organization_id, reset_date, reset_key) VALUES (4231, 'prosub', '$2a$10$kELVmJH7VaYQhBoMUAYkdO7R4En1Xlq1kHyGyHchUGgqomgV0lZ1G', 'prosub', 'prosub', 'prosub@prosub', true, 'it', '86694160555412434687', 'admin', '2016-01-28 11:24:09.55', 'admin', '2016-01-28 11:24:09.9', 4206, NULL, NULL);
INSERT INTO t_user (id, login, password, first_name, last_name, email, activated, lang_key, activation_key, created_by, created_date, last_modified_by, last_modified_date, organization_id, reset_date, reset_key) VALUES (4233, 'cor', '$2a$10$oaG5ov4yNOYsC5JGhvCRzuVKWIUnkpFOy5JUNm3lc9/ab8Z06QbeO', 'cor', 'cor', 'cor@cor', true, 'en', '61527725684125697751', 'admin', '2016-01-28 11:24:54.486', 'admin', '2016-01-28 11:24:54.954', 4207, NULL, NULL);
INSERT INTO t_user (id, login, password, first_name, last_name, email, activated, lang_key, activation_key, created_by, created_date, last_modified_by, last_modified_date, organization_id, reset_date, reset_key) VALUES (4234, 'corsub', '$2a$10$8t265HL4uC9t8CWjFlpFaOkj8882gtPZQvlnGjTCEpqJDyLjbMeM.', 'corsub', 'corsub', 'corsub@corsub', true, 'en', '30125710938047895572', 'admin', '2016-01-28 11:25:29.17', 'admin', '2016-01-28 11:25:29.549', 4207, NULL, NULL);
INSERT INTO t_user (id, login, password, first_name, last_name, email, activated, lang_key, activation_key, created_by, created_date, last_modified_by, last_modified_date, organization_id, reset_date, reset_key) VALUES (4235, 'net', '$2a$10$9U9rzZT.ibjJRZRsr4AOfuyt4/ehG.zvdj8N502zIpTdHaAIiMnz6', 'net', 'net', 'net@net', true, 'en', '39639451946334542429', 'admin', '2016-01-28 11:26:00.799', 'admin', '2016-01-28 11:26:01.409', 4208, NULL, NULL);
INSERT INTO t_user (id, login, password, first_name, last_name, email, activated, lang_key, activation_key, created_by, created_date, last_modified_by, last_modified_date, organization_id, reset_date, reset_key) VALUES (4236, 'netsub', '$2a$10$I/slw6SrTMPAwFtcbvZrp.jxkwqjjjEiBBMRQOUAuIOlTG3LSpNl.', 'netsub', 'netsub', 'netsub@netsub', true, 'en', '46822539615638081970', 'admin', '2016-01-28 11:26:31.049', 'admin', '2016-01-28 11:26:31.39', 4208, NULL, NULL);
INSERT INTO t_user (id, login, password, first_name, last_name, email, activated, lang_key, activation_key, created_by, created_date, last_modified_by, last_modified_date, organization_id, reset_date, reset_key) VALUES (4250, 'a', '$2a$10$/Q6B8hokebqD7MDKJLELie1prcEUcE54z6s3FLGK7xuqKuORZPtfi', 'b', 'Cases Camats', 'asxeviscc@gmail.com', true, 'en', '16870557188820091615', 'admin', '2016-01-28 12:02:59.024', 'admin', '2016-01-28 12:02:59.348', 1, NULL, NULL);
INSERT INTO t_user (id, login, password, first_name, last_name, email, activated, lang_key, activation_key, created_by, created_date, last_modified_by, last_modified_date, organization_id, reset_date, reset_key) VALUES (4367, 'cpavel', '$2a$10$8RTYnRRsXFhLugA.WJZZK.ySJxn3rdSp2vG3LKO.bOc9X12e1oOYG', 'ciprian', 'pavel', 'ciprian.pavel@teamnet.ro', true, 'en', '09513228075759540515', 'anonymousUser', '2016-01-29 07:30:18.034', 'admin', '2016-01-29 07:31:13.655', 4198, NULL, NULL);
--
-- TOC entry 2509 (class 0 OID 16649)
-- Dependencies: 226
-- Data for Name: t_user_authority; Type: TABLE DATA; Schema: public; Owner: postgres
--
INSERT INTO t_user_authority (user_id, authority_name) VALUES (3, 'ROLE_ADMIN');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (3, 'ROLE_USER');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4, 'ROLE_OPERATOR');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (5, 'ROLE_SUBSCRIBER');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (6, 'ROLE_PUBLISHER');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (2808, 'ROLE_SUBSCRIBER');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (5, 'ROLE_USER');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4, 'ROLE_USER');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (6, 'ROLE_USER');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (2808, 'ROLE_USER');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (3841, 'ROLE_SUBSCRIBER');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (3841, 'ROLE_USER');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (3930, 'ROLE_USER');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (3930, 'ROLE_PUBLISHER');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4177, 'ROLE_SUBSCRIBER');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4177, 'ROLE_USER');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4209, 'ROLE_OPERATOR');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4209, 'ROLE_USER');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4209, 'ROLE_ADMIN');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4219, 'ROLE_SUBSCRIBER');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4219, 'ROLE_USER');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4219, 'ROLE_ADMIN');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4220, 'ROLE_USER');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4220, 'ROLE_ADMIN');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4221, 'ROLE_SUBSCRIBER');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4221, 'ROLE_USER');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4222, 'ROLE_USER');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4222, 'ROLE_ADMIN');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4223, 'ROLE_SUBSCRIBER');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4223, 'ROLE_USER');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4224, 'ROLE_USER');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4224, 'ROLE_ADMIN');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4225, 'ROLE_SUBSCRIBER');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4225, 'ROLE_USER');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4226, 'ROLE_USER');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4226, 'ROLE_ADMIN');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4227, 'ROLE_SUBSCRIBER');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4227, 'ROLE_USER');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4228, 'ROLE_USER');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4228, 'ROLE_ADMIN');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4229, 'ROLE_SUBSCRIBER');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4229, 'ROLE_USER');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4230, 'ROLE_USER');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4230, 'ROLE_ADMIN');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4231, 'ROLE_SUBSCRIBER');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4231, 'ROLE_USER');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4233, 'ROLE_USER');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4233, 'ROLE_ADMIN');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4234, 'ROLE_SUBSCRIBER');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4234, 'ROLE_USER');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4235, 'ROLE_USER');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4235, 'ROLE_ADMIN');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4236, 'ROLE_SUBSCRIBER');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4236, 'ROLE_USER');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4250, 'ROLE_USER');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4250, 'ROLE_ADMIN');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4367, 'ROLE_SUBSCRIBER');
INSERT INTO t_user_authority (user_id, authority_name) VALUES (4367, 'ROLE_USER');
--
-- TOC entry 2547 (class 0 OID 0)
-- Dependencies: 224
-- Name: t_user_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('t_user_id_seq', 4367, false);
--
-- TOC entry 2511 (class 0 OID 16654)
-- Dependencies: 228
-- Data for Name: tags; Type: TABLE DATA; Schema: public; Owner: postgres
--
--
-- TOC entry 2548 (class 0 OID 0)
-- Dependencies: 227
-- Name: tags_tag_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('tags_tag_id_seq', 1, false);
--
-- TOC entry 2519 (class 0 OID 0)
-- Data for Name: BLOBS; Type: BLOBS; Schema: -; Owner:
--
SET search_path = pg_catalog;
BEGIN;
SELECT pg_catalog.lo_open('17137', 131072);
SELECT pg_catalog.lowrite(0, '\x7b22646270617373223a2261646d696e222c2270617373776f7264223a2261646d696e646231222c227365727665726e616d65223a227777772e7765622e6974222c22706f7374677265735f70617373776f7264223a2261646d696e6462227d');
SELECT pg_catalog.lo_close(0);
COMMIT;
SET search_path = public, pg_catalog;
--
-- TOC entry 2258 (class 2606 OID 16752)
-- Name: aplpications_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY applications_tags
ADD CONSTRAINT aplpications_tags_pkey PRIMARY KEY (application_id, tag_id);
--
-- TOC entry 2305 (class 2606 OID 17404)
-- Name: application_size_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY application_size
ADD CONSTRAINT application_size_pkey PRIMARY KEY (id);
--
-- TOC entry 2256 (class 2606 OID 16754)
-- Name: applications_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY applications
ADD CONSTRAINT applications_pkey PRIMARY KEY (id);
--
-- TOC entry 2260 (class 2606 OID 16756)
-- Name: cloudaccounts_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY cloud_accounts
ADD CONSTRAINT cloudaccounts_pkey PRIMARY KEY (id);
--
-- TOC entry 2262 (class 2606 OID 16758)
-- Name: contact_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY contact
ADD CONSTRAINT contact_pkey PRIMARY KEY (id);
--
-- TOC entry 2303 (class 2606 OID 17267)
-- Name: customization_status_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY customization_status
ADD CONSTRAINT customization_status_pkey PRIMARY KEY (id);
--
-- TOC entry 2264 (class 2606 OID 16760)
-- Name: customizations_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY customizations
ADD CONSTRAINT customizations_pkey PRIMARY KEY (id);
--
-- TOC entry 2301 (class 2606 OID 17170)
-- Name: mon_elastic_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY monitoring_info_elastic
ADD CONSTRAINT mon_elastic_pkey PRIMARY KEY (id);
--
-- TOC entry 2266 (class 2606 OID 16762)
-- Name: organization_status_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY organization_status
ADD CONSTRAINT organization_status_pkey PRIMARY KEY (id);
--
-- TOC entry 2272 (class 2606 OID 16764)
-- Name: organizations_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY organizations
ADD CONSTRAINT organizations_pkey PRIMARY KEY (id);
--
-- TOC entry 2269 (class 2606 OID 16766)
-- Name: organizationtypes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY organization_types
ADD CONSTRAINT organizationtypes_pkey PRIMARY KEY (id);
--
-- TOC entry 2254 (class 2606 OID 16768)
-- Name: pk_application_media; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY application_media
ADD CONSTRAINT pk_application_media PRIMARY KEY (id);
--
-- TOC entry 2280 (class 2606 OID 16770)
-- Name: pk_t_authority; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY t_authority
ADD CONSTRAINT pk_t_authority PRIMARY KEY (name);
--
-- TOC entry 2283 (class 2606 OID 16772)
-- Name: pk_t_persistent_audit_event; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY t_persistent_audit_event
ADD CONSTRAINT pk_t_persistent_audit_event PRIMARY KEY (event_id);
--
-- TOC entry 2288 (class 2606 OID 16774)
-- Name: pk_t_persistent_token; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY t_persistent_token
ADD CONSTRAINT pk_t_persistent_token PRIMARY KEY (series);
--
-- TOC entry 2292 (class 2606 OID 16776)
-- Name: pk_t_user; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY t_user
ADD CONSTRAINT pk_t_user PRIMARY KEY (id);
--
-- TOC entry 2274 (class 2606 OID 16778)
-- Name: providers_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY providers
ADD CONSTRAINT providers_pkey PRIMARY KEY (id);
--
-- TOC entry 2277 (class 2606 OID 16780)
-- Name: status_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY status
ADD CONSTRAINT status_pkey PRIMARY KEY (id);
--
-- TOC entry 2286 (class 2606 OID 16782)
-- Name: t_persistent_audit_event_data_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY t_persistent_audit_event_data
ADD CONSTRAINT t_persistent_audit_event_data_pkey PRIMARY KEY (event_id, name);
--
-- TOC entry 2296 (class 2606 OID 16784)
-- Name: t_user_authority_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY t_user_authority
ADD CONSTRAINT t_user_authority_pkey PRIMARY KEY (user_id, authority_name);
--
-- TOC entry 2298 (class 2606 OID 16786)
-- Name: tags_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY tags
ADD CONSTRAINT tags_pkey PRIMARY KEY (id);
--
-- TOC entry 2252 (class 1259 OID 16832)
-- Name: application_media_application_i; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
--
CREATE UNIQUE INDEX application_media_application_i ON application_media USING btree (application_id);
--
-- TOC entry 2281 (class 1259 OID 16833)
-- Name: idx_persistent_audit_event; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
--
CREATE INDEX idx_persistent_audit_event ON t_persistent_audit_event USING btree (principal, event_date);
--
-- TOC entry 2284 (class 1259 OID 16834)
-- Name: idx_persistent_audit_event_data; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
--
CREATE INDEX idx_persistent_audit_event_data ON t_persistent_audit_event_data USING btree (event_id);
--
-- TOC entry 2289 (class 1259 OID 16835)
-- Name: idx_user_email; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
--
CREATE UNIQUE INDEX idx_user_email ON t_user USING btree (email);
--
-- TOC entry 2290 (class 1259 OID 16836)
-- Name: idx_user_login; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
--
CREATE UNIQUE INDEX idx_user_login ON t_user USING btree (login);
--
-- TOC entry 2267 (class 1259 OID 16837)
-- Name: organizationstatus_pkey; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
--
CREATE UNIQUE INDEX organizationstatus_pkey ON organization_status USING btree (id);
--
-- TOC entry 2270 (class 1259 OID 16838)
-- Name: organizationtypes_types_key; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
--
CREATE UNIQUE INDEX organizationtypes_types_key ON organization_types USING btree (types);
--
-- TOC entry 2275 (class 1259 OID 16839)
-- Name: providers_provider_key; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
--
CREATE UNIQUE INDEX providers_provider_key ON providers USING btree (provider);
--
-- TOC entry 2278 (class 1259 OID 16840)
-- Name: status_status_key; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
--
CREATE UNIQUE INDEX status_status_key ON status USING btree (status);
--
-- TOC entry 2293 (class 1259 OID 16841)
-- Name: t_user_email_key; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
--
CREATE UNIQUE INDEX t_user_email_key ON t_user USING btree (email);
--
-- TOC entry 2294 (class 1259 OID 16842)
-- Name: t_user_login_key; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
--
CREATE UNIQUE INDEX t_user_login_key ON t_user USING btree (login);
--
-- TOC entry 2299 (class 1259 OID 16843)
-- Name: tags_tag_key; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
--
CREATE UNIQUE INDEX tags_tag_key ON tags USING btree (tag);
--
-- TOC entry 2327 (class 2606 OID 16949)
-- Name: application_media_application_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY application_media
ADD CONSTRAINT application_media_application_id_fkey FOREIGN KEY (application_id) REFERENCES applications(id) ON UPDATE RESTRICT ON DELETE RESTRICT;
--
-- TOC entry 2328 (class 2606 OID 16954)
-- Name: applications_status_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY applications
ADD CONSTRAINT applications_status_id_fkey FOREIGN KEY (status_id) REFERENCES status(id) ON UPDATE RESTRICT ON DELETE RESTRICT;
--
-- TOC entry 2331 (class 2606 OID 16959)
-- Name: fk_app_tag_references_app; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY applications_tags
ADD CONSTRAINT fk_app_tag_references_app FOREIGN KEY (application_id) REFERENCES applications(id);
--
-- TOC entry 2332 (class 2606 OID 16964)
-- Name: fk_app_tag_references_tag; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY applications_tags
ADD CONSTRAINT fk_app_tag_references_tag FOREIGN KEY (tag_id) REFERENCES tags(id);
--
-- TOC entry 2329 (class 2606 OID 16969)
-- Name: fk_applic_reference_organ; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY applications
ADD CONSTRAINT fk_applic_reference_organ FOREIGN KEY (organization_id) REFERENCES organizations(id);
--
-- TOC entry 2330 (class 2606 OID 17405)
-- Name: fk_application_size; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY applications
ADD CONSTRAINT fk_application_size FOREIGN KEY (size_id) REFERENCES application_size(id);
--
-- TOC entry 2343 (class 2606 OID 16974)
-- Name: fk_authority_name; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY t_user_authority
ADD CONSTRAINT fk_authority_name FOREIGN KEY (authority_name) REFERENCES t_authority(name);
--
-- TOC entry 2333 (class 2606 OID 16979)
-- Name: fk_clouacc_reference_org; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY cloud_accounts
ADD CONSTRAINT fk_clouacc_reference_org FOREIGN KEY (organization_id) REFERENCES organizations(id);
--
-- TOC entry 2334 (class 2606 OID 16984)
-- Name: fk_clouacc_reference_provider; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY cloud_accounts
ADD CONSTRAINT fk_clouacc_reference_provider FOREIGN KEY (provider_id) REFERENCES providers(id);
--
-- TOC entry 2335 (class 2606 OID 16989)
-- Name: fk_cloud_account; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY customizations
ADD CONSTRAINT fk_cloud_account FOREIGN KEY (cloud_account_id) REFERENCES cloud_accounts(id);
--
-- TOC entry 2337 (class 2606 OID 17268)
-- Name: fk_custom_custom_status; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY customizations
ADD CONSTRAINT fk_custom_custom_status FOREIGN KEY (status_id) REFERENCES customization_status(id);
--
-- TOC entry 2336 (class 2606 OID 16994)
-- Name: fk_custom_reference_org; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY customizations
ADD CONSTRAINT fk_custom_reference_org FOREIGN KEY (customer_organization_id) REFERENCES organizations(id);
--
-- TOC entry 2340 (class 2606 OID 16999)
-- Name: fk_event_persistent_audit_event_data; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY t_persistent_audit_event_data
ADD CONSTRAINT fk_event_persistent_audit_event_data FOREIGN KEY (event_id) REFERENCES t_persistent_audit_event(event_id);
--
-- TOC entry 2345 (class 2606 OID 17171)
-- Name: fk_monelastic_customization; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY monitoring_info_elastic
ADD CONSTRAINT fk_monelastic_customization FOREIGN KEY (customization_id) REFERENCES customizations(id);
--
-- TOC entry 2338 (class 2606 OID 17004)
-- Name: fk_org_org_status; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY organizations
ADD CONSTRAINT fk_org_org_status FOREIGN KEY (status_id) REFERENCES organization_status(id);
--
-- TOC entry 2339 (class 2606 OID 17009)
-- Name: fk_organ_reference_organtypes; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY organizations
ADD CONSTRAINT fk_organ_reference_organtypes FOREIGN KEY (organization_type) REFERENCES organization_types(id);
--
-- TOC entry 2342 (class 2606 OID 17014)
-- Name: fk_organiz_reference_organiz; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY t_user
ADD CONSTRAINT fk_organiz_reference_organiz FOREIGN KEY (organization_id) REFERENCES organizations(id);
--
-- TOC entry 2344 (class 2606 OID 17019)
-- Name: fk_user_id; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY t_user_authority
ADD CONSTRAINT fk_user_id FOREIGN KEY (user_id) REFERENCES t_user(id);
--
-- TOC entry 2341 (class 2606 OID 17024)
-- Name: fk_user_persistent_token; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY t_persistent_token
ADD CONSTRAINT fk_user_persistent_token FOREIGN KEY (user_id) REFERENCES t_user(id);
alter table customizations add CONSTRAINT fk_custom_application FOREIGN KEY (application_id)
REFERENCES applications (id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION;
ALTER TABLE applications ADD COLUMN application_logo_ref text;
--
-- TOC entry 2526 (class 0 OID 0)
-- Dependencies: 6
-- Name: public; Type: ACL; Schema: -; Owner: postgres
--
REVOKE ALL ON SCHEMA public FROM PUBLIC;
REVOKE ALL ON SCHEMA public FROM postgres;
GRANT ALL ON SCHEMA public TO postgres;
GRANT ALL ON SCHEMA public TO PUBLIC;
-- Completed on 2016-02-02 15:24:40
--
-- PostgreSQL database dump complete
--
|
/**新闻分类初始化***/
insert into crawler_news_classify(classifytype,classifyname) values(0,'体育');
insert into crawler_news_classify(classifytype,classifyname) values(1,'教育');
insert into crawler_news_classify(classifytype,classifyname) values(2,'财经');
insert into crawler_news_classify(classifytype,classifyname) values(3,'社会');
insert into crawler_news_classify(classifytype,classifyname) values(4,'娱乐');
insert into crawler_news_classify(classifytype,classifyname) values(5,'军事');
insert into crawler_news_classify(classifytype,classifyname) values(6,'国内');
insert into crawler_news_classify(classifytype,classifyname) values(7,'科技');
insert into crawler_news_classify(classifytype,classifyname) values(8,'互联网');
insert into crawler_news_classify(classifytype,classifyname) values(9,'房产');
insert into crawler_news_classify(classifytype,classifyname) values(10,'国际');
insert into crawler_news_classify(classifytype,classifyname) values(11,'女人');
insert into crawler_news_classify(classifytype,classifyname) values(12,'汽车');
insert into crawler_news_classify(classifytype,classifyname) values(13,'游戏');
|
-- Your SQL goes here
CREATE TABLE modules (
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
name TEXT NOT NULL,
cost INTEGER NOT NULL,
author INTEGER NOT NULL
);
|
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: pg_trgm; Type: EXTENSION; Schema: -; Owner: -
--
CREATE EXTENSION IF NOT EXISTS pg_trgm WITH SCHEMA public;
--
-- Name: EXTENSION pg_trgm; Type: COMMENT; Schema: -; Owner: -
--
COMMENT ON EXTENSION pg_trgm IS 'text similarity measurement and index searching based on trigrams';
--
-- Name: posts_trigger_change_seq(); Type: FUNCTION; Schema: public; Owner: -
--
CREATE FUNCTION public.posts_trigger_change_seq() RETURNS trigger
LANGUAGE plpgsql
AS $$
BEGIN
IF NEW.tag_string != OLD.tag_string OR NEW.parent_id != OLD.parent_id OR NEW.source != OLD.source OR NEW.approver_id != OLD.approver_id OR NEW.rating != OLD.rating OR NEW.description != OLD.description OR NEW.md5 != OLD.md5 OR NEW.is_deleted != OLD.is_deleted OR NEW.is_pending != OLD.is_pending OR NEW.is_flagged != OLD.is_flagged OR NEW.is_rating_locked != OLD.is_rating_locked OR NEW.is_status_locked != OLD.is_status_locked OR NEW.is_note_locked != OLD.is_note_locked OR NEW.bit_flags != OLD.bit_flags OR NEW.has_active_children != OLD.has_active_children OR NEW.last_noted_at != OLD.last_noted_at
THEN
NEW.change_seq = nextval('public.posts_change_seq_seq');
END IF;
RETURN NEW;
END;
$$;
--
-- Name: sourcepattern(text); Type: FUNCTION; Schema: public; Owner: -
--
CREATE FUNCTION public.sourcepattern(src text) RETURNS text
LANGUAGE plpgsql IMMUTABLE STRICT
AS $_$
BEGIN
RETURN regexp_replace(src, '^[^/]*(//)?[^/]*.pixiv.net/img.*(/[^/]*/[^/]*)$', E'pixiv\\2');
END;
$_$;
--
-- Name: testprs_end(internal); Type: FUNCTION; Schema: public; Owner: -
--
CREATE FUNCTION public.testprs_end(internal) RETURNS void
LANGUAGE c STRICT
AS '$libdir/test_parser', 'testprs_end';
--
-- Name: testprs_getlexeme(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: -
--
CREATE FUNCTION public.testprs_getlexeme(internal, internal, internal) RETURNS internal
LANGUAGE c STRICT
AS '$libdir/test_parser', 'testprs_getlexeme';
--
-- Name: testprs_lextype(internal); Type: FUNCTION; Schema: public; Owner: -
--
CREATE FUNCTION public.testprs_lextype(internal) RETURNS internal
LANGUAGE c STRICT
AS '$libdir/test_parser', 'testprs_lextype';
--
-- Name: testprs_start(internal, integer); Type: FUNCTION; Schema: public; Owner: -
--
CREATE FUNCTION public.testprs_start(internal, integer) RETURNS internal
LANGUAGE c STRICT
AS '$libdir/test_parser', 'testprs_start';
--
-- Name: testparser; Type: TEXT SEARCH PARSER; Schema: public; Owner: -
--
CREATE TEXT SEARCH PARSER public.testparser (
START = public.testprs_start,
GETTOKEN = public.testprs_getlexeme,
END = public.testprs_end,
HEADLINE = prsd_headline,
LEXTYPES = public.testprs_lextype );
--
-- Name: danbooru; Type: TEXT SEARCH CONFIGURATION; Schema: public; Owner: -
--
CREATE TEXT SEARCH CONFIGURATION public.danbooru (
PARSER = public.testparser );
ALTER TEXT SEARCH CONFIGURATION public.danbooru
ADD MAPPING FOR word WITH simple;
SET default_tablespace = '';
SET default_table_access_method = heap;
--
-- Name: api_keys; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.api_keys (
id integer NOT NULL,
user_id integer NOT NULL,
key character varying NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone
);
--
-- Name: api_keys_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.api_keys_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: api_keys_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.api_keys_id_seq OWNED BY public.api_keys.id;
--
-- Name: ar_internal_metadata; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.ar_internal_metadata (
key character varying NOT NULL,
value character varying,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
--
-- Name: artist_urls; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.artist_urls (
id integer NOT NULL,
artist_id integer NOT NULL,
url text NOT NULL,
normalized_url text NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
is_active boolean DEFAULT true NOT NULL
);
--
-- Name: artist_urls_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.artist_urls_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: artist_urls_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.artist_urls_id_seq OWNED BY public.artist_urls.id;
--
-- Name: artist_versions; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.artist_versions (
id integer NOT NULL,
artist_id integer NOT NULL,
name character varying NOT NULL,
updater_id integer NOT NULL,
updater_ip_addr inet NOT NULL,
is_active boolean DEFAULT true NOT NULL,
group_name character varying DEFAULT ''::character varying NOT NULL,
is_banned boolean DEFAULT false NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
other_names text[] DEFAULT '{}'::text[] NOT NULL,
urls text[] DEFAULT '{}'::text[] NOT NULL,
notes_changed boolean DEFAULT false
);
--
-- Name: artist_versions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.artist_versions_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: artist_versions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.artist_versions_id_seq OWNED BY public.artist_versions.id;
--
-- Name: artists; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.artists (
id integer NOT NULL,
name character varying NOT NULL,
creator_id integer NOT NULL,
is_active boolean DEFAULT true NOT NULL,
is_banned boolean DEFAULT false NOT NULL,
group_name character varying DEFAULT ''::character varying NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
other_names text[] DEFAULT '{}'::text[] NOT NULL,
linked_user_id integer,
is_locked boolean DEFAULT false
);
--
-- Name: artists_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.artists_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: artists_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.artists_id_seq OWNED BY public.artists.id;
--
-- Name: bans; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.bans (
id integer NOT NULL,
user_id integer,
reason text NOT NULL,
banner_id integer NOT NULL,
expires_at timestamp without time zone,
created_at timestamp without time zone,
updated_at timestamp without time zone
);
--
-- Name: bans_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.bans_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: bans_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.bans_id_seq OWNED BY public.bans.id;
--
-- Name: blips; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.blips (
id bigint NOT NULL,
creator_ip_addr inet NOT NULL,
creator_id integer NOT NULL,
body character varying NOT NULL,
response_to integer,
is_hidden boolean DEFAULT false,
body_index tsvector NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
warning_type integer,
warning_user_id integer
);
--
-- Name: blips_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.blips_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: blips_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.blips_id_seq OWNED BY public.blips.id;
--
-- Name: bulk_update_requests; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.bulk_update_requests (
id integer NOT NULL,
user_id integer NOT NULL,
forum_topic_id integer,
script text NOT NULL,
status character varying DEFAULT 'pending'::character varying NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
approver_id integer,
forum_post_id integer,
title text,
user_ip_addr inet DEFAULT '127.0.0.1'::inet NOT NULL
);
--
-- Name: bulk_update_requests_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.bulk_update_requests_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: bulk_update_requests_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.bulk_update_requests_id_seq OWNED BY public.bulk_update_requests.id;
--
-- Name: comment_votes; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.comment_votes (
id integer NOT NULL,
comment_id integer NOT NULL,
user_id integer NOT NULL,
score integer NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
user_ip_addr inet
);
--
-- Name: comment_votes_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.comment_votes_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: comment_votes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.comment_votes_id_seq OWNED BY public.comment_votes.id;
--
-- Name: comments; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.comments (
id integer NOT NULL,
post_id integer NOT NULL,
creator_id integer NOT NULL,
body text NOT NULL,
creator_ip_addr inet NOT NULL,
body_index tsvector NOT NULL,
score integer DEFAULT 0 NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
updater_id integer,
updater_ip_addr inet,
do_not_bump_post boolean DEFAULT false NOT NULL,
is_hidden boolean DEFAULT false NOT NULL,
is_sticky boolean DEFAULT false NOT NULL,
warning_type integer,
warning_user_id integer
);
--
-- Name: comments_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.comments_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: comments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.comments_id_seq OWNED BY public.comments.id;
--
-- Name: destroyed_posts; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.destroyed_posts (
id bigint NOT NULL,
post_id integer NOT NULL,
md5 character varying NOT NULL,
destroyer_id integer NOT NULL,
destroyer_ip_addr inet NOT NULL,
uploader_id integer,
uploader_ip_addr inet,
upload_date timestamp without time zone,
post_data json NOT NULL,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL
);
--
-- Name: destroyed_posts_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.destroyed_posts_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: destroyed_posts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.destroyed_posts_id_seq OWNED BY public.destroyed_posts.id;
--
-- Name: dmail_filters; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.dmail_filters (
id integer NOT NULL,
user_id integer NOT NULL,
words text NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone
);
--
-- Name: dmail_filters_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.dmail_filters_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: dmail_filters_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.dmail_filters_id_seq OWNED BY public.dmail_filters.id;
--
-- Name: dmails; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.dmails (
id integer NOT NULL,
owner_id integer NOT NULL,
from_id integer NOT NULL,
to_id integer NOT NULL,
title text NOT NULL,
body text NOT NULL,
message_index tsvector NOT NULL,
is_read boolean DEFAULT false NOT NULL,
is_deleted boolean DEFAULT false NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
creator_ip_addr inet NOT NULL,
is_spam boolean DEFAULT false
);
--
-- Name: dmails_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.dmails_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: dmails_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.dmails_id_seq OWNED BY public.dmails.id;
--
-- Name: edit_histories; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.edit_histories (
id bigint NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
body text NOT NULL,
subject text,
versionable_type character varying(100) NOT NULL,
versionable_id integer NOT NULL,
version integer NOT NULL,
ip_addr inet NOT NULL,
user_id integer NOT NULL
);
--
-- Name: edit_histories_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.edit_histories_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: edit_histories_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.edit_histories_id_seq OWNED BY public.edit_histories.id;
--
-- Name: email_blacklists; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.email_blacklists (
id bigint NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
domain character varying NOT NULL,
creator_id integer NOT NULL,
reason character varying NOT NULL
);
--
-- Name: email_blacklists_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.email_blacklists_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: email_blacklists_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.email_blacklists_id_seq OWNED BY public.email_blacklists.id;
--
-- Name: exception_logs; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.exception_logs (
id bigint NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
class_name character varying NOT NULL,
ip_addr inet NOT NULL,
version character varying NOT NULL,
extra_params text,
message text NOT NULL,
trace text NOT NULL,
code uuid NOT NULL,
user_id integer
);
--
-- Name: exception_logs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.exception_logs_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: exception_logs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.exception_logs_id_seq OWNED BY public.exception_logs.id;
--
-- Name: favorite_groups; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.favorite_groups (
id integer NOT NULL,
name text NOT NULL,
creator_id integer NOT NULL,
post_ids text DEFAULT ''::text NOT NULL,
post_count integer DEFAULT 0 NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
is_public boolean DEFAULT false NOT NULL
);
--
-- Name: favorite_groups_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.favorite_groups_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: favorite_groups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.favorite_groups_id_seq OWNED BY public.favorite_groups.id;
--
-- Name: favorites; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.favorites (
id bigint NOT NULL,
user_id integer NOT NULL,
post_id integer NOT NULL,
created_at timestamp without time zone DEFAULT now() NOT NULL
);
--
-- Name: favorites_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.favorites_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: favorites_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.favorites_id_seq OWNED BY public.favorites.id;
--
-- Name: forum_categories; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.forum_categories (
id bigint NOT NULL,
name character varying NOT NULL,
description text,
cat_order integer,
can_view integer DEFAULT 20 NOT NULL,
can_create integer DEFAULT 20 NOT NULL,
can_reply integer DEFAULT 20 NOT NULL
);
--
-- Name: forum_categories_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.forum_categories_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: forum_categories_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.forum_categories_id_seq OWNED BY public.forum_categories.id;
--
-- Name: forum_post_votes; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.forum_post_votes (
id bigint NOT NULL,
forum_post_id integer NOT NULL,
creator_id integer NOT NULL,
score integer NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
--
-- Name: forum_post_votes_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.forum_post_votes_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: forum_post_votes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.forum_post_votes_id_seq OWNED BY public.forum_post_votes.id;
--
-- Name: forum_posts; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.forum_posts (
id integer NOT NULL,
topic_id integer NOT NULL,
creator_id integer NOT NULL,
updater_id integer NOT NULL,
body text NOT NULL,
text_index tsvector NOT NULL,
is_hidden boolean DEFAULT false NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
creator_ip_addr inet,
warning_type integer,
warning_user_id integer
);
--
-- Name: forum_posts_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.forum_posts_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: forum_posts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.forum_posts_id_seq OWNED BY public.forum_posts.id;
--
-- Name: forum_subscriptions; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.forum_subscriptions (
id integer NOT NULL,
user_id integer,
forum_topic_id integer,
last_read_at timestamp without time zone,
delete_key character varying
);
--
-- Name: forum_subscriptions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.forum_subscriptions_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: forum_subscriptions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.forum_subscriptions_id_seq OWNED BY public.forum_subscriptions.id;
--
-- Name: forum_topic_visits; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.forum_topic_visits (
id integer NOT NULL,
user_id integer,
forum_topic_id integer,
last_read_at timestamp without time zone,
created_at timestamp without time zone,
updated_at timestamp without time zone
);
--
-- Name: forum_topic_visits_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.forum_topic_visits_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: forum_topic_visits_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.forum_topic_visits_id_seq OWNED BY public.forum_topic_visits.id;
--
-- Name: forum_topics; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.forum_topics (
id integer NOT NULL,
creator_id integer NOT NULL,
updater_id integer NOT NULL,
title character varying NOT NULL,
response_count integer DEFAULT 0 NOT NULL,
is_sticky boolean DEFAULT false NOT NULL,
is_locked boolean DEFAULT false NOT NULL,
is_hidden boolean DEFAULT false NOT NULL,
text_index tsvector NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
category_id integer DEFAULT 0 NOT NULL,
min_level integer DEFAULT 0 NOT NULL,
creator_ip_addr inet
);
--
-- Name: forum_topics_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.forum_topics_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: forum_topics_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.forum_topics_id_seq OWNED BY public.forum_topics.id;
--
-- Name: help_pages; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.help_pages (
id bigint NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
name character varying NOT NULL,
wiki_page character varying NOT NULL,
related character varying,
title character varying
);
--
-- Name: help_pages_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.help_pages_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: help_pages_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.help_pages_id_seq OWNED BY public.help_pages.id;
--
-- Name: ip_bans; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.ip_bans (
id integer NOT NULL,
creator_id integer NOT NULL,
ip_addr inet NOT NULL,
reason text NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone
);
--
-- Name: ip_bans_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.ip_bans_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: ip_bans_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.ip_bans_id_seq OWNED BY public.ip_bans.id;
--
-- Name: janitor_trials; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.janitor_trials (
id integer NOT NULL,
creator_id integer NOT NULL,
user_id integer NOT NULL,
original_level integer,
created_at timestamp without time zone,
updated_at timestamp without time zone,
status character varying DEFAULT 'active'::character varying NOT NULL
);
--
-- Name: janitor_trials_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.janitor_trials_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: janitor_trials_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.janitor_trials_id_seq OWNED BY public.janitor_trials.id;
--
-- Name: mod_actions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.mod_actions_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: mod_actions; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.mod_actions (
id integer DEFAULT nextval('public.mod_actions_id_seq'::regclass) NOT NULL,
creator_id integer,
created_at timestamp without time zone,
updated_at timestamp without time zone,
action text,
"values" json
);
--
-- Name: news_updates; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.news_updates (
id integer NOT NULL,
message text NOT NULL,
creator_id integer NOT NULL,
updater_id integer NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone
);
--
-- Name: news_updates_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.news_updates_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: news_updates_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.news_updates_id_seq OWNED BY public.news_updates.id;
--
-- Name: note_versions; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.note_versions (
id integer NOT NULL,
note_id integer NOT NULL,
post_id integer NOT NULL,
updater_id integer NOT NULL,
updater_ip_addr inet NOT NULL,
x integer NOT NULL,
y integer NOT NULL,
width integer NOT NULL,
height integer NOT NULL,
is_active boolean DEFAULT true NOT NULL,
body text NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
version integer DEFAULT 0 NOT NULL
);
--
-- Name: note_versions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.note_versions_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: note_versions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.note_versions_id_seq OWNED BY public.note_versions.id;
--
-- Name: notes; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.notes (
id integer NOT NULL,
creator_id integer NOT NULL,
post_id integer NOT NULL,
x integer NOT NULL,
y integer NOT NULL,
width integer NOT NULL,
height integer NOT NULL,
is_active boolean DEFAULT true NOT NULL,
body text NOT NULL,
body_index tsvector NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
version integer DEFAULT 0 NOT NULL
);
--
-- Name: notes_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.notes_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: notes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.notes_id_seq OWNED BY public.notes.id;
--
-- Name: pixiv_ugoira_frame_data; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.pixiv_ugoira_frame_data (
id integer NOT NULL,
post_id integer,
data text NOT NULL,
content_type character varying NOT NULL
);
--
-- Name: pixiv_ugoira_frame_data_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.pixiv_ugoira_frame_data_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: pixiv_ugoira_frame_data_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.pixiv_ugoira_frame_data_id_seq OWNED BY public.pixiv_ugoira_frame_data.id;
--
-- Name: pool_versions; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.pool_versions (
id bigint NOT NULL,
pool_id integer NOT NULL,
post_ids integer[] DEFAULT '{}'::integer[] NOT NULL,
added_post_ids integer[] DEFAULT '{}'::integer[] NOT NULL,
removed_post_ids integer[] DEFAULT '{}'::integer[] NOT NULL,
updater_id integer,
updater_ip_addr inet,
description text,
description_changed boolean DEFAULT false NOT NULL,
name text,
name_changed boolean DEFAULT false NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
is_active boolean DEFAULT true NOT NULL,
is_deleted boolean DEFAULT false NOT NULL,
category character varying,
version integer DEFAULT 1 NOT NULL
);
--
-- Name: pool_versions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.pool_versions_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: pool_versions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.pool_versions_id_seq OWNED BY public.pool_versions.id;
--
-- Name: pools; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.pools (
id integer NOT NULL,
name character varying,
creator_id integer NOT NULL,
description text,
is_active boolean DEFAULT true NOT NULL,
post_ids integer[] DEFAULT '{}'::integer[] NOT NULL,
is_deleted boolean DEFAULT false NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
category character varying DEFAULT 'series'::character varying NOT NULL
);
--
-- Name: pools_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.pools_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: pools_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.pools_id_seq OWNED BY public.pools.id;
--
-- Name: post_appeals; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.post_appeals (
id integer NOT NULL,
post_id integer NOT NULL,
creator_id integer NOT NULL,
creator_ip_addr inet,
reason text,
created_at timestamp without time zone,
updated_at timestamp without time zone
);
--
-- Name: post_appeals_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.post_appeals_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: post_appeals_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.post_appeals_id_seq OWNED BY public.post_appeals.id;
--
-- Name: post_approvals; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.post_approvals (
id integer NOT NULL,
user_id integer NOT NULL,
post_id integer NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
--
-- Name: post_approvals_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.post_approvals_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: post_approvals_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.post_approvals_id_seq OWNED BY public.post_approvals.id;
--
-- Name: post_disapprovals; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.post_disapprovals (
id bigint NOT NULL,
user_id integer NOT NULL,
post_id integer NOT NULL,
reason character varying DEFAULT 'legacy'::character varying,
message text,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
--
-- Name: post_disapprovals_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.post_disapprovals_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: post_disapprovals_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.post_disapprovals_id_seq OWNED BY public.post_disapprovals.id;
--
-- Name: post_events; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.post_events (
id bigint NOT NULL,
creator_id bigint NOT NULL,
post_id bigint NOT NULL,
action integer NOT NULL,
extra_data jsonb NOT NULL,
created_at timestamp without time zone NOT NULL
);
--
-- Name: post_events_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.post_events_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: post_events_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.post_events_id_seq OWNED BY public.post_events.id;
--
-- Name: post_flags; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.post_flags (
id integer NOT NULL,
post_id integer NOT NULL,
creator_id integer NOT NULL,
creator_ip_addr inet NOT NULL,
reason text,
is_resolved boolean DEFAULT false NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
is_deletion boolean DEFAULT false NOT NULL
);
--
-- Name: post_flags_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.post_flags_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: post_flags_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.post_flags_id_seq OWNED BY public.post_flags.id;
--
-- Name: post_image_hashes; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.post_image_hashes (
id bigint NOT NULL,
post_id bigint NOT NULL,
nw double precision NOT NULL,
ne double precision NOT NULL,
sw double precision NOT NULL,
se double precision NOT NULL,
phash bytea
);
--
-- Name: post_image_hashes_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.post_image_hashes_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: post_image_hashes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.post_image_hashes_id_seq OWNED BY public.post_image_hashes.id;
--
-- Name: post_replacements; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.post_replacements (
id integer NOT NULL,
post_id integer NOT NULL,
creator_id integer NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
file_ext character varying,
file_size integer,
image_width integer,
image_height integer,
md5 character varying,
old_image_height integer,
old_image_width integer,
old_md5 character varying,
old_file_size integer,
old_file_ext character varying,
replacement_url text,
original_url text
);
--
-- Name: post_replacements2; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.post_replacements2 (
id bigint NOT NULL,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL,
post_id integer NOT NULL,
creator_id integer NOT NULL,
creator_ip_addr inet NOT NULL,
approver_id integer,
file_ext character varying NOT NULL,
file_size integer NOT NULL,
image_height integer NOT NULL,
image_width integer NOT NULL,
md5 character varying NOT NULL,
source character varying,
file_name character varying,
storage_id character varying NOT NULL,
status character varying DEFAULT 'pending'::character varying NOT NULL,
reason character varying NOT NULL,
protected boolean DEFAULT false NOT NULL,
uploader_id_on_approve integer,
penalize_uploader_on_approve boolean
);
--
-- Name: post_replacements2_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.post_replacements2_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: post_replacements2_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.post_replacements2_id_seq OWNED BY public.post_replacements2.id;
--
-- Name: post_replacements_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.post_replacements_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: post_replacements_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.post_replacements_id_seq OWNED BY public.post_replacements.id;
--
-- Name: post_report_reasons; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.post_report_reasons (
id bigint NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
reason character varying NOT NULL,
creator_id integer NOT NULL,
creator_ip_addr inet,
description character varying NOT NULL
);
--
-- Name: post_report_reasons_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.post_report_reasons_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: post_report_reasons_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.post_report_reasons_id_seq OWNED BY public.post_report_reasons.id;
--
-- Name: post_set_maintainers; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.post_set_maintainers (
id bigint NOT NULL,
post_set_id integer NOT NULL,
user_id integer NOT NULL,
status character varying DEFAULT 'pending'::character varying NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
--
-- Name: post_set_maintainers_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.post_set_maintainers_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: post_set_maintainers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.post_set_maintainers_id_seq OWNED BY public.post_set_maintainers.id;
--
-- Name: post_sets; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.post_sets (
id bigint NOT NULL,
name character varying NOT NULL,
shortname character varying NOT NULL,
description text DEFAULT ''::text,
is_public boolean DEFAULT false NOT NULL,
transfer_on_delete boolean DEFAULT false NOT NULL,
creator_id integer NOT NULL,
creator_ip_addr inet,
post_ids integer[] DEFAULT '{}'::integer[] NOT NULL,
post_count integer DEFAULT 0 NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
--
-- Name: post_sets_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.post_sets_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: post_sets_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.post_sets_id_seq OWNED BY public.post_sets.id;
--
-- Name: post_updates; Type: TABLE; Schema: public; Owner: -
--
CREATE UNLOGGED TABLE public.post_updates (
post_id integer
);
--
-- Name: post_versions; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.post_versions (
id bigint NOT NULL,
post_id integer NOT NULL,
tags text NOT NULL,
added_tags text[] DEFAULT '{}'::text[] NOT NULL,
removed_tags text[] DEFAULT '{}'::text[] NOT NULL,
locked_tags text,
added_locked_tags text[] DEFAULT '{}'::text[] NOT NULL,
removed_locked_tags text[] DEFAULT '{}'::text[] NOT NULL,
updater_id integer,
updater_ip_addr inet,
updated_at timestamp without time zone NOT NULL,
rating character varying(1),
rating_changed boolean DEFAULT false NOT NULL,
parent_id integer,
parent_changed boolean DEFAULT false NOT NULL,
source text,
source_changed boolean DEFAULT false NOT NULL,
description text,
description_changed boolean DEFAULT false NOT NULL,
version integer DEFAULT 1 NOT NULL,
reason character varying
);
--
-- Name: post_versions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.post_versions_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: post_versions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.post_versions_id_seq OWNED BY public.post_versions.id;
--
-- Name: post_votes; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.post_votes (
id integer NOT NULL,
post_id integer NOT NULL,
user_id integer NOT NULL,
score integer NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
user_ip_addr inet
);
--
-- Name: post_votes_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.post_votes_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: post_votes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.post_votes_id_seq OWNED BY public.post_votes.id;
--
-- Name: posts; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.posts (
id integer NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
up_score integer DEFAULT 0 NOT NULL,
down_score integer DEFAULT 0 NOT NULL,
score integer DEFAULT 0 NOT NULL,
source character varying DEFAULT ''::character varying NOT NULL,
md5 character varying NOT NULL,
rating character(1) DEFAULT 'q'::bpchar NOT NULL,
is_note_locked boolean DEFAULT false NOT NULL,
is_rating_locked boolean DEFAULT false NOT NULL,
is_status_locked boolean DEFAULT false NOT NULL,
is_pending boolean DEFAULT false NOT NULL,
is_flagged boolean DEFAULT false NOT NULL,
is_deleted boolean DEFAULT false NOT NULL,
uploader_id integer NOT NULL,
uploader_ip_addr inet NOT NULL,
approver_id integer,
fav_string text DEFAULT ''::text NOT NULL,
pool_string text DEFAULT ''::text NOT NULL,
last_noted_at timestamp without time zone,
last_comment_bumped_at timestamp without time zone,
fav_count integer DEFAULT 0 NOT NULL,
tag_string text DEFAULT ''::text NOT NULL,
tag_index tsvector,
tag_count integer DEFAULT 0 NOT NULL,
tag_count_general integer DEFAULT 0 NOT NULL,
tag_count_artist integer DEFAULT 0 NOT NULL,
tag_count_character integer DEFAULT 0 NOT NULL,
tag_count_copyright integer DEFAULT 0 NOT NULL,
file_ext character varying NOT NULL,
file_size integer NOT NULL,
image_width integer NOT NULL,
image_height integer NOT NULL,
parent_id integer,
has_children boolean DEFAULT false NOT NULL,
pixiv_id integer,
last_commented_at timestamp without time zone,
has_active_children boolean DEFAULT false,
bit_flags bigint DEFAULT 0 NOT NULL,
tag_count_meta integer DEFAULT 0 NOT NULL,
locked_tags text,
tag_count_species integer DEFAULT 0 NOT NULL,
tag_count_invalid integer DEFAULT 0 NOT NULL,
description text DEFAULT ''::text NOT NULL,
comment_count integer DEFAULT 0 NOT NULL,
change_seq bigint NOT NULL,
tag_count_lore integer DEFAULT 0 NOT NULL,
bg_color character varying,
generated_samples character varying[],
duration numeric
);
--
-- Name: posts_change_seq_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.posts_change_seq_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: posts_change_seq_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.posts_change_seq_seq OWNED BY public.posts.change_seq;
--
-- Name: posts_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.posts_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: posts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.posts_id_seq OWNED BY public.posts.id;
--
-- Name: saved_searches; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.saved_searches (
id integer NOT NULL,
user_id integer,
query text,
created_at timestamp without time zone,
updated_at timestamp without time zone,
labels text[] DEFAULT '{}'::text[] NOT NULL
);
--
-- Name: saved_searches_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.saved_searches_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: saved_searches_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.saved_searches_id_seq OWNED BY public.saved_searches.id;
--
-- Name: schema_migrations; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.schema_migrations (
version character varying NOT NULL
);
--
-- Name: staff_audit_logs; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.staff_audit_logs (
id bigint NOT NULL,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL,
user_id bigint NOT NULL,
action character varying DEFAULT 'unknown_action'::character varying NOT NULL,
"values" json
);
--
-- Name: staff_audit_logs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.staff_audit_logs_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: staff_audit_logs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.staff_audit_logs_id_seq OWNED BY public.staff_audit_logs.id;
--
-- Name: staff_notes; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.staff_notes (
id bigint NOT NULL,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL,
user_id bigint NOT NULL,
creator_id integer NOT NULL,
body character varying,
resolved boolean DEFAULT false NOT NULL
);
--
-- Name: staff_notes_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.staff_notes_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: staff_notes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.staff_notes_id_seq OWNED BY public.staff_notes.id;
--
-- Name: tag_aliases; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.tag_aliases (
id integer NOT NULL,
antecedent_name character varying NOT NULL,
consequent_name character varying NOT NULL,
creator_id integer NOT NULL,
creator_ip_addr inet NOT NULL,
forum_topic_id integer,
status text DEFAULT 'pending'::text NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
post_count integer DEFAULT 0 NOT NULL,
approver_id integer,
forum_post_id integer,
reason text DEFAULT ''::text NOT NULL
);
--
-- Name: tag_aliases_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.tag_aliases_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: tag_aliases_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.tag_aliases_id_seq OWNED BY public.tag_aliases.id;
--
-- Name: tag_implications; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.tag_implications (
id integer NOT NULL,
antecedent_name character varying NOT NULL,
consequent_name character varying NOT NULL,
creator_id integer NOT NULL,
creator_ip_addr inet NOT NULL,
forum_topic_id integer,
status text DEFAULT 'pending'::text NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
approver_id integer,
forum_post_id integer,
descendant_names text[] DEFAULT '{}'::text[],
reason text DEFAULT ''::text NOT NULL
);
--
-- Name: tag_implications_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.tag_implications_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: tag_implications_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.tag_implications_id_seq OWNED BY public.tag_implications.id;
--
-- Name: tag_rel_undos; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.tag_rel_undos (
id bigint NOT NULL,
tag_rel_type character varying,
tag_rel_id bigint,
undo_data json,
applied boolean DEFAULT false,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL
);
--
-- Name: tag_rel_undos_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.tag_rel_undos_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: tag_rel_undos_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.tag_rel_undos_id_seq OWNED BY public.tag_rel_undos.id;
--
-- Name: tag_type_versions; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.tag_type_versions (
id bigint NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
old_type integer NOT NULL,
new_type integer NOT NULL,
is_locked boolean NOT NULL,
tag_id integer NOT NULL,
creator_id integer NOT NULL
);
--
-- Name: tag_type_versions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.tag_type_versions_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: tag_type_versions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.tag_type_versions_id_seq OWNED BY public.tag_type_versions.id;
--
-- Name: tags; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.tags (
id integer NOT NULL,
name character varying NOT NULL,
post_count integer DEFAULT 0 NOT NULL,
category integer DEFAULT 0 NOT NULL,
related_tags text,
related_tags_updated_at timestamp without time zone,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
is_locked boolean DEFAULT false NOT NULL
);
--
-- Name: tags_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.tags_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: tags_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.tags_id_seq OWNED BY public.tags.id;
--
-- Name: takedowns; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.takedowns (
id bigint NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
creator_id integer,
creator_ip_addr inet NOT NULL,
approver_id integer,
status character varying DEFAULT 'pending'::character varying,
vericode character varying NOT NULL,
source character varying,
email character varying,
reason text,
reason_hidden boolean DEFAULT false NOT NULL,
notes text DEFAULT 'none'::text NOT NULL,
instructions text,
post_ids text DEFAULT ''::text,
del_post_ids text DEFAULT ''::text,
post_count integer DEFAULT 0 NOT NULL
);
--
-- Name: takedowns_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.takedowns_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: takedowns_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.takedowns_id_seq OWNED BY public.takedowns.id;
--
-- Name: tickets; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.tickets (
id bigint NOT NULL,
creator_id integer NOT NULL,
creator_ip_addr inet NOT NULL,
disp_id integer NOT NULL,
qtype character varying NOT NULL,
status character varying DEFAULT 'pending'::character varying NOT NULL,
reason character varying,
report_reason character varying,
response character varying DEFAULT ''::character varying NOT NULL,
handler_id integer DEFAULT 0 NOT NULL,
claimant_id integer,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
--
-- Name: tickets_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.tickets_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: tickets_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.tickets_id_seq OWNED BY public.tickets.id;
--
-- Name: upload_whitelists; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.upload_whitelists (
id bigint NOT NULL,
pattern character varying NOT NULL,
note character varying,
reason character varying,
allowed boolean DEFAULT true NOT NULL,
hidden boolean DEFAULT false NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
--
-- Name: upload_whitelists_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.upload_whitelists_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: upload_whitelists_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.upload_whitelists_id_seq OWNED BY public.upload_whitelists.id;
--
-- Name: uploads; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.uploads (
id integer NOT NULL,
source text,
file_path character varying,
content_type character varying,
rating character(1) NOT NULL,
uploader_id integer NOT NULL,
uploader_ip_addr inet NOT NULL,
tag_string text NOT NULL,
status text DEFAULT 'pending'::text NOT NULL,
backtrace text,
post_id integer,
md5_confirmation character varying,
created_at timestamp without time zone,
updated_at timestamp without time zone,
server text,
parent_id integer,
md5 character varying,
file_ext character varying,
file_size integer,
image_width integer,
image_height integer,
context text,
referer_url text,
description text DEFAULT ''::text NOT NULL
);
--
-- Name: uploads_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.uploads_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: uploads_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.uploads_id_seq OWNED BY public.uploads.id;
--
-- Name: user_blacklisted_tags; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.user_blacklisted_tags (
id integer NOT NULL,
user_id integer NOT NULL,
tags text NOT NULL
);
--
-- Name: user_feedback; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.user_feedback (
id integer NOT NULL,
user_id integer NOT NULL,
creator_id integer NOT NULL,
category character varying NOT NULL,
body text NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
creator_ip_addr inet
);
--
-- Name: user_feedback_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.user_feedback_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: user_feedback_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.user_feedback_id_seq OWNED BY public.user_feedback.id;
--
-- Name: user_name_change_requests; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.user_name_change_requests (
id integer NOT NULL,
status character varying DEFAULT 'pending'::character varying NOT NULL,
user_id integer NOT NULL,
approver_id integer,
original_name character varying,
desired_name character varying,
change_reason text,
rejection_reason text,
created_at timestamp without time zone,
updated_at timestamp without time zone
);
--
-- Name: user_name_change_requests_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.user_name_change_requests_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: user_name_change_requests_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.user_name_change_requests_id_seq OWNED BY public.user_name_change_requests.id;
--
-- Name: user_password_reset_nonces; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.user_password_reset_nonces (
id integer NOT NULL,
key character varying NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
user_id integer NOT NULL
);
--
-- Name: user_password_reset_nonces_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.user_password_reset_nonces_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: user_password_reset_nonces_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.user_password_reset_nonces_id_seq OWNED BY public.user_password_reset_nonces.id;
--
-- Name: user_statuses; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.user_statuses (
id bigint NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
user_id integer NOT NULL,
post_count integer DEFAULT 0 NOT NULL,
post_deleted_count integer DEFAULT 0 NOT NULL,
post_update_count integer DEFAULT 0 NOT NULL,
post_flag_count integer DEFAULT 0 NOT NULL,
favorite_count integer DEFAULT 0 NOT NULL,
wiki_edit_count integer DEFAULT 0 NOT NULL,
note_count integer DEFAULT 0 NOT NULL,
forum_post_count integer DEFAULT 0 NOT NULL,
comment_count integer DEFAULT 0 NOT NULL,
pool_edit_count integer DEFAULT 0 NOT NULL,
blip_count integer DEFAULT 0 NOT NULL,
set_count integer DEFAULT 0 NOT NULL,
artist_edit_count integer DEFAULT 0 NOT NULL,
own_post_replaced_count integer DEFAULT 0,
own_post_replaced_penalize_count integer DEFAULT 0,
post_replacement_rejected_count integer DEFAULT 0
);
--
-- Name: user_statuses_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.user_statuses_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: user_statuses_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.user_statuses_id_seq OWNED BY public.user_statuses.id;
--
-- Name: users; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.users (
id integer NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
name character varying NOT NULL,
display_name character varying,
password_hash character varying NOT NULL,
email character varying,
email_verification_key character varying,
level integer DEFAULT 20 NOT NULL,
base_upload_limit integer DEFAULT 5 NOT NULL,
v3_api_limit integer DEFAULT 8 NOT NULL,
last_logged_in_at timestamp without time zone,
last_forum_read_at timestamp without time zone,
recent_tags text,
comment_threshold integer DEFAULT '-1'::integer NOT NULL,
default_image_size character varying DEFAULT 'original'::character varying NOT NULL,
favorite_tags text,
blacklisted_tags text DEFAULT ''::text,
time_zone character varying DEFAULT 'UTC'::character varying NOT NULL,
bcrypt_password_hash text,
per_page integer DEFAULT 75 NOT NULL,
custom_style text,
bit_prefs bigint DEFAULT 4096 NOT NULL,
last_ip_addr inet,
unread_dmail_count integer DEFAULT 0 NOT NULL,
profile_about text DEFAULT ''::text,
profile_artinfo text DEFAULT ''::text,
avatar_id integer
);
--
-- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.users_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.users_id_seq OWNED BY public.users.id;
--
-- Name: wiki_page_versions; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.wiki_page_versions (
id integer NOT NULL,
wiki_page_id integer NOT NULL,
updater_id integer NOT NULL,
updater_ip_addr inet NOT NULL,
title character varying NOT NULL,
body text NOT NULL,
is_locked boolean NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
other_names text[] DEFAULT '{}'::text[] NOT NULL,
is_deleted boolean DEFAULT false NOT NULL,
reason character varying
);
--
-- Name: wiki_page_versions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.wiki_page_versions_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: wiki_page_versions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.wiki_page_versions_id_seq OWNED BY public.wiki_page_versions.id;
--
-- Name: wiki_pages; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.wiki_pages (
id integer NOT NULL,
creator_id integer NOT NULL,
title character varying NOT NULL,
body text NOT NULL,
body_index tsvector NOT NULL,
is_locked boolean DEFAULT false NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
updater_id integer,
other_names text[] DEFAULT '{}'::text[] NOT NULL,
is_deleted boolean DEFAULT false NOT NULL
);
--
-- Name: wiki_pages_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.wiki_pages_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: wiki_pages_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.wiki_pages_id_seq OWNED BY public.wiki_pages.id;
--
-- Name: api_keys id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.api_keys ALTER COLUMN id SET DEFAULT nextval('public.api_keys_id_seq'::regclass);
--
-- Name: artist_urls id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.artist_urls ALTER COLUMN id SET DEFAULT nextval('public.artist_urls_id_seq'::regclass);
--
-- Name: artist_versions id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.artist_versions ALTER COLUMN id SET DEFAULT nextval('public.artist_versions_id_seq'::regclass);
--
-- Name: artists id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.artists ALTER COLUMN id SET DEFAULT nextval('public.artists_id_seq'::regclass);
--
-- Name: bans id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.bans ALTER COLUMN id SET DEFAULT nextval('public.bans_id_seq'::regclass);
--
-- Name: blips id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.blips ALTER COLUMN id SET DEFAULT nextval('public.blips_id_seq'::regclass);
--
-- Name: bulk_update_requests id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.bulk_update_requests ALTER COLUMN id SET DEFAULT nextval('public.bulk_update_requests_id_seq'::regclass);
--
-- Name: comment_votes id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.comment_votes ALTER COLUMN id SET DEFAULT nextval('public.comment_votes_id_seq'::regclass);
--
-- Name: comments id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.comments ALTER COLUMN id SET DEFAULT nextval('public.comments_id_seq'::regclass);
--
-- Name: destroyed_posts id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.destroyed_posts ALTER COLUMN id SET DEFAULT nextval('public.destroyed_posts_id_seq'::regclass);
--
-- Name: dmail_filters id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.dmail_filters ALTER COLUMN id SET DEFAULT nextval('public.dmail_filters_id_seq'::regclass);
--
-- Name: dmails id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.dmails ALTER COLUMN id SET DEFAULT nextval('public.dmails_id_seq'::regclass);
--
-- Name: edit_histories id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.edit_histories ALTER COLUMN id SET DEFAULT nextval('public.edit_histories_id_seq'::regclass);
--
-- Name: email_blacklists id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.email_blacklists ALTER COLUMN id SET DEFAULT nextval('public.email_blacklists_id_seq'::regclass);
--
-- Name: exception_logs id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.exception_logs ALTER COLUMN id SET DEFAULT nextval('public.exception_logs_id_seq'::regclass);
--
-- Name: favorite_groups id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.favorite_groups ALTER COLUMN id SET DEFAULT nextval('public.favorite_groups_id_seq'::regclass);
--
-- Name: favorites id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.favorites ALTER COLUMN id SET DEFAULT nextval('public.favorites_id_seq'::regclass);
--
-- Name: forum_categories id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.forum_categories ALTER COLUMN id SET DEFAULT nextval('public.forum_categories_id_seq'::regclass);
--
-- Name: forum_post_votes id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.forum_post_votes ALTER COLUMN id SET DEFAULT nextval('public.forum_post_votes_id_seq'::regclass);
--
-- Name: forum_posts id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.forum_posts ALTER COLUMN id SET DEFAULT nextval('public.forum_posts_id_seq'::regclass);
--
-- Name: forum_subscriptions id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.forum_subscriptions ALTER COLUMN id SET DEFAULT nextval('public.forum_subscriptions_id_seq'::regclass);
--
-- Name: forum_topic_visits id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.forum_topic_visits ALTER COLUMN id SET DEFAULT nextval('public.forum_topic_visits_id_seq'::regclass);
--
-- Name: forum_topics id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.forum_topics ALTER COLUMN id SET DEFAULT nextval('public.forum_topics_id_seq'::regclass);
--
-- Name: help_pages id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.help_pages ALTER COLUMN id SET DEFAULT nextval('public.help_pages_id_seq'::regclass);
--
-- Name: ip_bans id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.ip_bans ALTER COLUMN id SET DEFAULT nextval('public.ip_bans_id_seq'::regclass);
--
-- Name: janitor_trials id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.janitor_trials ALTER COLUMN id SET DEFAULT nextval('public.janitor_trials_id_seq'::regclass);
--
-- Name: news_updates id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.news_updates ALTER COLUMN id SET DEFAULT nextval('public.news_updates_id_seq'::regclass);
--
-- Name: note_versions id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.note_versions ALTER COLUMN id SET DEFAULT nextval('public.note_versions_id_seq'::regclass);
--
-- Name: notes id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.notes ALTER COLUMN id SET DEFAULT nextval('public.notes_id_seq'::regclass);
--
-- Name: pixiv_ugoira_frame_data id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.pixiv_ugoira_frame_data ALTER COLUMN id SET DEFAULT nextval('public.pixiv_ugoira_frame_data_id_seq'::regclass);
--
-- Name: pool_versions id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.pool_versions ALTER COLUMN id SET DEFAULT nextval('public.pool_versions_id_seq'::regclass);
--
-- Name: pools id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.pools ALTER COLUMN id SET DEFAULT nextval('public.pools_id_seq'::regclass);
--
-- Name: post_appeals id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.post_appeals ALTER COLUMN id SET DEFAULT nextval('public.post_appeals_id_seq'::regclass);
--
-- Name: post_approvals id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.post_approvals ALTER COLUMN id SET DEFAULT nextval('public.post_approvals_id_seq'::regclass);
--
-- Name: post_disapprovals id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.post_disapprovals ALTER COLUMN id SET DEFAULT nextval('public.post_disapprovals_id_seq'::regclass);
--
-- Name: post_events id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.post_events ALTER COLUMN id SET DEFAULT nextval('public.post_events_id_seq'::regclass);
--
-- Name: post_flags id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.post_flags ALTER COLUMN id SET DEFAULT nextval('public.post_flags_id_seq'::regclass);
--
-- Name: post_image_hashes id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.post_image_hashes ALTER COLUMN id SET DEFAULT nextval('public.post_image_hashes_id_seq'::regclass);
--
-- Name: post_replacements id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.post_replacements ALTER COLUMN id SET DEFAULT nextval('public.post_replacements_id_seq'::regclass);
--
-- Name: post_replacements2 id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.post_replacements2 ALTER COLUMN id SET DEFAULT nextval('public.post_replacements2_id_seq'::regclass);
--
-- Name: post_report_reasons id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.post_report_reasons ALTER COLUMN id SET DEFAULT nextval('public.post_report_reasons_id_seq'::regclass);
--
-- Name: post_set_maintainers id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.post_set_maintainers ALTER COLUMN id SET DEFAULT nextval('public.post_set_maintainers_id_seq'::regclass);
--
-- Name: post_sets id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.post_sets ALTER COLUMN id SET DEFAULT nextval('public.post_sets_id_seq'::regclass);
--
-- Name: post_versions id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.post_versions ALTER COLUMN id SET DEFAULT nextval('public.post_versions_id_seq'::regclass);
--
-- Name: post_votes id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.post_votes ALTER COLUMN id SET DEFAULT nextval('public.post_votes_id_seq'::regclass);
--
-- Name: posts id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.posts ALTER COLUMN id SET DEFAULT nextval('public.posts_id_seq'::regclass);
--
-- Name: posts change_seq; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.posts ALTER COLUMN change_seq SET DEFAULT nextval('public.posts_change_seq_seq'::regclass);
--
-- Name: saved_searches id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.saved_searches ALTER COLUMN id SET DEFAULT nextval('public.saved_searches_id_seq'::regclass);
--
-- Name: staff_audit_logs id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.staff_audit_logs ALTER COLUMN id SET DEFAULT nextval('public.staff_audit_logs_id_seq'::regclass);
--
-- Name: staff_notes id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.staff_notes ALTER COLUMN id SET DEFAULT nextval('public.staff_notes_id_seq'::regclass);
--
-- Name: tag_aliases id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.tag_aliases ALTER COLUMN id SET DEFAULT nextval('public.tag_aliases_id_seq'::regclass);
--
-- Name: tag_implications id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.tag_implications ALTER COLUMN id SET DEFAULT nextval('public.tag_implications_id_seq'::regclass);
--
-- Name: tag_rel_undos id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.tag_rel_undos ALTER COLUMN id SET DEFAULT nextval('public.tag_rel_undos_id_seq'::regclass);
--
-- Name: tag_type_versions id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.tag_type_versions ALTER COLUMN id SET DEFAULT nextval('public.tag_type_versions_id_seq'::regclass);
--
-- Name: tags id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.tags ALTER COLUMN id SET DEFAULT nextval('public.tags_id_seq'::regclass);
--
-- Name: takedowns id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.takedowns ALTER COLUMN id SET DEFAULT nextval('public.takedowns_id_seq'::regclass);
--
-- Name: tickets id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.tickets ALTER COLUMN id SET DEFAULT nextval('public.tickets_id_seq'::regclass);
--
-- Name: upload_whitelists id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.upload_whitelists ALTER COLUMN id SET DEFAULT nextval('public.upload_whitelists_id_seq'::regclass);
--
-- Name: uploads id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.uploads ALTER COLUMN id SET DEFAULT nextval('public.uploads_id_seq'::regclass);
--
-- Name: user_feedback id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.user_feedback ALTER COLUMN id SET DEFAULT nextval('public.user_feedback_id_seq'::regclass);
--
-- Name: user_name_change_requests id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.user_name_change_requests ALTER COLUMN id SET DEFAULT nextval('public.user_name_change_requests_id_seq'::regclass);
--
-- Name: user_password_reset_nonces id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.user_password_reset_nonces ALTER COLUMN id SET DEFAULT nextval('public.user_password_reset_nonces_id_seq'::regclass);
--
-- Name: user_statuses id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.user_statuses ALTER COLUMN id SET DEFAULT nextval('public.user_statuses_id_seq'::regclass);
--
-- Name: users id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.users ALTER COLUMN id SET DEFAULT nextval('public.users_id_seq'::regclass);
--
-- Name: wiki_page_versions id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.wiki_page_versions ALTER COLUMN id SET DEFAULT nextval('public.wiki_page_versions_id_seq'::regclass);
--
-- Name: wiki_pages id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.wiki_pages ALTER COLUMN id SET DEFAULT nextval('public.wiki_pages_id_seq'::regclass);
--
-- Name: api_keys api_keys_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.api_keys
ADD CONSTRAINT api_keys_pkey PRIMARY KEY (id);
--
-- Name: ar_internal_metadata ar_internal_metadata_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.ar_internal_metadata
ADD CONSTRAINT ar_internal_metadata_pkey PRIMARY KEY (key);
--
-- Name: artist_urls artist_urls_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.artist_urls
ADD CONSTRAINT artist_urls_pkey PRIMARY KEY (id);
--
-- Name: artist_versions artist_versions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.artist_versions
ADD CONSTRAINT artist_versions_pkey PRIMARY KEY (id);
--
-- Name: artists artists_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.artists
ADD CONSTRAINT artists_pkey PRIMARY KEY (id);
--
-- Name: bans bans_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.bans
ADD CONSTRAINT bans_pkey PRIMARY KEY (id);
--
-- Name: blips blips_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.blips
ADD CONSTRAINT blips_pkey PRIMARY KEY (id);
--
-- Name: bulk_update_requests bulk_update_requests_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.bulk_update_requests
ADD CONSTRAINT bulk_update_requests_pkey PRIMARY KEY (id);
--
-- Name: comment_votes comment_votes_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.comment_votes
ADD CONSTRAINT comment_votes_pkey PRIMARY KEY (id);
--
-- Name: comments comments_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.comments
ADD CONSTRAINT comments_pkey PRIMARY KEY (id);
--
-- Name: destroyed_posts destroyed_posts_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.destroyed_posts
ADD CONSTRAINT destroyed_posts_pkey PRIMARY KEY (id);
--
-- Name: dmail_filters dmail_filters_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.dmail_filters
ADD CONSTRAINT dmail_filters_pkey PRIMARY KEY (id);
--
-- Name: dmails dmails_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.dmails
ADD CONSTRAINT dmails_pkey PRIMARY KEY (id);
--
-- Name: edit_histories edit_histories_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.edit_histories
ADD CONSTRAINT edit_histories_pkey PRIMARY KEY (id);
--
-- Name: email_blacklists email_blacklists_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.email_blacklists
ADD CONSTRAINT email_blacklists_pkey PRIMARY KEY (id);
--
-- Name: exception_logs exception_logs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.exception_logs
ADD CONSTRAINT exception_logs_pkey PRIMARY KEY (id);
--
-- Name: favorite_groups favorite_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.favorite_groups
ADD CONSTRAINT favorite_groups_pkey PRIMARY KEY (id);
--
-- Name: favorites favorites_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.favorites
ADD CONSTRAINT favorites_pkey PRIMARY KEY (id);
--
-- Name: forum_categories forum_categories_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.forum_categories
ADD CONSTRAINT forum_categories_pkey PRIMARY KEY (id);
--
-- Name: forum_post_votes forum_post_votes_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.forum_post_votes
ADD CONSTRAINT forum_post_votes_pkey PRIMARY KEY (id);
--
-- Name: forum_posts forum_posts_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.forum_posts
ADD CONSTRAINT forum_posts_pkey PRIMARY KEY (id);
--
-- Name: forum_subscriptions forum_subscriptions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.forum_subscriptions
ADD CONSTRAINT forum_subscriptions_pkey PRIMARY KEY (id);
--
-- Name: forum_topic_visits forum_topic_visits_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.forum_topic_visits
ADD CONSTRAINT forum_topic_visits_pkey PRIMARY KEY (id);
--
-- Name: forum_topics forum_topics_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.forum_topics
ADD CONSTRAINT forum_topics_pkey PRIMARY KEY (id);
--
-- Name: help_pages help_pages_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.help_pages
ADD CONSTRAINT help_pages_pkey PRIMARY KEY (id);
--
-- Name: ip_bans ip_bans_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.ip_bans
ADD CONSTRAINT ip_bans_pkey PRIMARY KEY (id);
--
-- Name: janitor_trials janitor_trials_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.janitor_trials
ADD CONSTRAINT janitor_trials_pkey PRIMARY KEY (id);
--
-- Name: mod_actions mod_actions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.mod_actions
ADD CONSTRAINT mod_actions_pkey PRIMARY KEY (id);
--
-- Name: news_updates news_updates_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.news_updates
ADD CONSTRAINT news_updates_pkey PRIMARY KEY (id);
--
-- Name: note_versions note_versions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.note_versions
ADD CONSTRAINT note_versions_pkey PRIMARY KEY (id);
--
-- Name: notes notes_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.notes
ADD CONSTRAINT notes_pkey PRIMARY KEY (id);
--
-- Name: pixiv_ugoira_frame_data pixiv_ugoira_frame_data_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.pixiv_ugoira_frame_data
ADD CONSTRAINT pixiv_ugoira_frame_data_pkey PRIMARY KEY (id);
--
-- Name: pool_versions pool_versions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.pool_versions
ADD CONSTRAINT pool_versions_pkey PRIMARY KEY (id);
--
-- Name: pools pools_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.pools
ADD CONSTRAINT pools_pkey PRIMARY KEY (id);
--
-- Name: post_appeals post_appeals_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.post_appeals
ADD CONSTRAINT post_appeals_pkey PRIMARY KEY (id);
--
-- Name: post_approvals post_approvals_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.post_approvals
ADD CONSTRAINT post_approvals_pkey PRIMARY KEY (id);
--
-- Name: post_disapprovals post_disapprovals_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.post_disapprovals
ADD CONSTRAINT post_disapprovals_pkey PRIMARY KEY (id);
--
-- Name: post_events post_events_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.post_events
ADD CONSTRAINT post_events_pkey PRIMARY KEY (id);
--
-- Name: post_flags post_flags_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.post_flags
ADD CONSTRAINT post_flags_pkey PRIMARY KEY (id);
--
-- Name: post_image_hashes post_image_hashes_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.post_image_hashes
ADD CONSTRAINT post_image_hashes_pkey PRIMARY KEY (id);
--
-- Name: post_replacements2 post_replacements2_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.post_replacements2
ADD CONSTRAINT post_replacements2_pkey PRIMARY KEY (id);
--
-- Name: post_replacements post_replacements_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.post_replacements
ADD CONSTRAINT post_replacements_pkey PRIMARY KEY (id);
--
-- Name: post_report_reasons post_report_reasons_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.post_report_reasons
ADD CONSTRAINT post_report_reasons_pkey PRIMARY KEY (id);
--
-- Name: post_set_maintainers post_set_maintainers_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.post_set_maintainers
ADD CONSTRAINT post_set_maintainers_pkey PRIMARY KEY (id);
--
-- Name: post_sets post_sets_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.post_sets
ADD CONSTRAINT post_sets_pkey PRIMARY KEY (id);
--
-- Name: post_versions post_versions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.post_versions
ADD CONSTRAINT post_versions_pkey PRIMARY KEY (id);
ALTER TABLE public.post_versions CLUSTER ON post_versions_pkey;
--
-- Name: post_votes post_votes_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.post_votes
ADD CONSTRAINT post_votes_pkey PRIMARY KEY (id);
--
-- Name: posts posts_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.posts
ADD CONSTRAINT posts_pkey PRIMARY KEY (id);
--
-- Name: saved_searches saved_searches_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.saved_searches
ADD CONSTRAINT saved_searches_pkey PRIMARY KEY (id);
--
-- Name: schema_migrations schema_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.schema_migrations
ADD CONSTRAINT schema_migrations_pkey PRIMARY KEY (version);
--
-- Name: staff_audit_logs staff_audit_logs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.staff_audit_logs
ADD CONSTRAINT staff_audit_logs_pkey PRIMARY KEY (id);
--
-- Name: staff_notes staff_notes_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.staff_notes
ADD CONSTRAINT staff_notes_pkey PRIMARY KEY (id);
--
-- Name: tag_aliases tag_aliases_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.tag_aliases
ADD CONSTRAINT tag_aliases_pkey PRIMARY KEY (id);
--
-- Name: tag_implications tag_implications_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.tag_implications
ADD CONSTRAINT tag_implications_pkey PRIMARY KEY (id);
--
-- Name: tag_rel_undos tag_rel_undos_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.tag_rel_undos
ADD CONSTRAINT tag_rel_undos_pkey PRIMARY KEY (id);
--
-- Name: tag_type_versions tag_type_versions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.tag_type_versions
ADD CONSTRAINT tag_type_versions_pkey PRIMARY KEY (id);
--
-- Name: tags tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.tags
ADD CONSTRAINT tags_pkey PRIMARY KEY (id);
--
-- Name: takedowns takedowns_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.takedowns
ADD CONSTRAINT takedowns_pkey PRIMARY KEY (id);
--
-- Name: tickets tickets_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.tickets
ADD CONSTRAINT tickets_pkey PRIMARY KEY (id);
--
-- Name: upload_whitelists upload_whitelists_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.upload_whitelists
ADD CONSTRAINT upload_whitelists_pkey PRIMARY KEY (id);
--
-- Name: uploads uploads_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.uploads
ADD CONSTRAINT uploads_pkey PRIMARY KEY (id);
--
-- Name: user_feedback user_feedback_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.user_feedback
ADD CONSTRAINT user_feedback_pkey PRIMARY KEY (id);
--
-- Name: user_name_change_requests user_name_change_requests_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.user_name_change_requests
ADD CONSTRAINT user_name_change_requests_pkey PRIMARY KEY (id);
--
-- Name: user_password_reset_nonces user_password_reset_nonces_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.user_password_reset_nonces
ADD CONSTRAINT user_password_reset_nonces_pkey PRIMARY KEY (id);
--
-- Name: user_statuses user_statuses_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.user_statuses
ADD CONSTRAINT user_statuses_pkey PRIMARY KEY (id);
--
-- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.users
ADD CONSTRAINT users_pkey PRIMARY KEY (id);
--
-- Name: wiki_page_versions wiki_page_versions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.wiki_page_versions
ADD CONSTRAINT wiki_page_versions_pkey PRIMARY KEY (id);
--
-- Name: wiki_pages wiki_pages_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.wiki_pages
ADD CONSTRAINT wiki_pages_pkey PRIMARY KEY (id);
--
-- Name: index_api_keys_on_key; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX index_api_keys_on_key ON public.api_keys USING btree (key);
--
-- Name: index_api_keys_on_user_id; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX index_api_keys_on_user_id ON public.api_keys USING btree (user_id);
--
-- Name: index_artist_urls_on_artist_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_artist_urls_on_artist_id ON public.artist_urls USING btree (artist_id);
--
-- Name: index_artist_urls_on_normalized_url_pattern; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_artist_urls_on_normalized_url_pattern ON public.artist_urls USING btree (normalized_url text_pattern_ops);
--
-- Name: index_artist_urls_on_normalized_url_trgm; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_artist_urls_on_normalized_url_trgm ON public.artist_urls USING gin (normalized_url public.gin_trgm_ops);
--
-- Name: index_artist_urls_on_url_trgm; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_artist_urls_on_url_trgm ON public.artist_urls USING gin (url public.gin_trgm_ops);
--
-- Name: index_artist_versions_on_artist_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_artist_versions_on_artist_id ON public.artist_versions USING btree (artist_id);
--
-- Name: index_artist_versions_on_created_at; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_artist_versions_on_created_at ON public.artist_versions USING btree (created_at);
--
-- Name: index_artist_versions_on_name; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_artist_versions_on_name ON public.artist_versions USING btree (name);
--
-- Name: index_artist_versions_on_updater_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_artist_versions_on_updater_id ON public.artist_versions USING btree (updater_id);
--
-- Name: index_artist_versions_on_updater_ip_addr; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_artist_versions_on_updater_ip_addr ON public.artist_versions USING btree (updater_ip_addr);
--
-- Name: index_artists_on_group_name; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_artists_on_group_name ON public.artists USING btree (group_name);
--
-- Name: index_artists_on_group_name_trgm; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_artists_on_group_name_trgm ON public.artists USING gin (group_name public.gin_trgm_ops);
--
-- Name: index_artists_on_name; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX index_artists_on_name ON public.artists USING btree (name);
--
-- Name: index_artists_on_name_trgm; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_artists_on_name_trgm ON public.artists USING gin (name public.gin_trgm_ops);
--
-- Name: index_artists_on_other_names; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_artists_on_other_names ON public.artists USING gin (other_names);
--
-- Name: index_bans_on_banner_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_bans_on_banner_id ON public.bans USING btree (banner_id);
--
-- Name: index_bans_on_expires_at; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_bans_on_expires_at ON public.bans USING btree (expires_at);
--
-- Name: index_bans_on_user_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_bans_on_user_id ON public.bans USING btree (user_id);
--
-- Name: index_blips_on_body_index; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_blips_on_body_index ON public.blips USING gin (body_index);
--
-- Name: index_bulk_update_requests_on_forum_post_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_bulk_update_requests_on_forum_post_id ON public.bulk_update_requests USING btree (forum_post_id);
--
-- Name: index_comment_votes_on_comment_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_comment_votes_on_comment_id ON public.comment_votes USING btree (comment_id);
--
-- Name: index_comment_votes_on_comment_id_and_user_id; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX index_comment_votes_on_comment_id_and_user_id ON public.comment_votes USING btree (comment_id, user_id);
--
-- Name: index_comment_votes_on_created_at; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_comment_votes_on_created_at ON public.comment_votes USING btree (created_at);
--
-- Name: index_comment_votes_on_user_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_comment_votes_on_user_id ON public.comment_votes USING btree (user_id);
--
-- Name: index_comments_on_body_index; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_comments_on_body_index ON public.comments USING gin (body_index);
--
-- Name: index_comments_on_creator_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_comments_on_creator_id ON public.comments USING btree (creator_id);
--
-- Name: index_comments_on_creator_id_and_post_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_comments_on_creator_id_and_post_id ON public.comments USING btree (creator_id, post_id);
--
-- Name: index_comments_on_creator_ip_addr; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_comments_on_creator_ip_addr ON public.comments USING btree (creator_ip_addr);
--
-- Name: index_comments_on_post_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_comments_on_post_id ON public.comments USING btree (post_id);
--
-- Name: index_dmail_filters_on_user_id; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX index_dmail_filters_on_user_id ON public.dmail_filters USING btree (user_id);
--
-- Name: index_dmails_on_creator_ip_addr; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_dmails_on_creator_ip_addr ON public.dmails USING btree (creator_ip_addr);
--
-- Name: index_dmails_on_is_deleted; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_dmails_on_is_deleted ON public.dmails USING btree (is_deleted);
--
-- Name: index_dmails_on_is_read; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_dmails_on_is_read ON public.dmails USING btree (is_read);
--
-- Name: index_dmails_on_message_index; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_dmails_on_message_index ON public.dmails USING gin (message_index);
--
-- Name: index_dmails_on_owner_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_dmails_on_owner_id ON public.dmails USING btree (owner_id);
--
-- Name: index_edit_histories_on_user_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_edit_histories_on_user_id ON public.edit_histories USING btree (user_id);
--
-- Name: index_edit_histories_on_versionable_id_and_versionable_type; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_edit_histories_on_versionable_id_and_versionable_type ON public.edit_histories USING btree (versionable_id, versionable_type);
--
-- Name: index_favorite_groups_on_creator_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_favorite_groups_on_creator_id ON public.favorite_groups USING btree (creator_id);
--
-- Name: index_favorite_groups_on_lower_name; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_favorite_groups_on_lower_name ON public.favorite_groups USING btree (lower(name));
--
-- Name: index_favorites_on_post_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_favorites_on_post_id ON public.favorites USING btree (post_id);
--
-- Name: index_favorites_on_user_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_favorites_on_user_id ON public.favorites USING btree (user_id);
--
-- Name: index_favorites_on_user_id_and_post_id; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX index_favorites_on_user_id_and_post_id ON public.favorites USING btree (user_id, post_id);
--
-- Name: index_forum_post_votes_on_forum_post_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_forum_post_votes_on_forum_post_id ON public.forum_post_votes USING btree (forum_post_id);
--
-- Name: index_forum_post_votes_on_forum_post_id_and_creator_id; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX index_forum_post_votes_on_forum_post_id_and_creator_id ON public.forum_post_votes USING btree (forum_post_id, creator_id);
--
-- Name: index_forum_posts_on_creator_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_forum_posts_on_creator_id ON public.forum_posts USING btree (creator_id);
--
-- Name: index_forum_posts_on_text_index; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_forum_posts_on_text_index ON public.forum_posts USING gin (text_index);
--
-- Name: index_forum_posts_on_topic_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_forum_posts_on_topic_id ON public.forum_posts USING btree (topic_id);
--
-- Name: index_forum_subscriptions_on_forum_topic_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_forum_subscriptions_on_forum_topic_id ON public.forum_subscriptions USING btree (forum_topic_id);
--
-- Name: index_forum_subscriptions_on_user_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_forum_subscriptions_on_user_id ON public.forum_subscriptions USING btree (user_id);
--
-- Name: index_forum_topic_visits_on_forum_topic_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_forum_topic_visits_on_forum_topic_id ON public.forum_topic_visits USING btree (forum_topic_id);
--
-- Name: index_forum_topic_visits_on_last_read_at; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_forum_topic_visits_on_last_read_at ON public.forum_topic_visits USING btree (last_read_at);
--
-- Name: index_forum_topic_visits_on_user_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_forum_topic_visits_on_user_id ON public.forum_topic_visits USING btree (user_id);
--
-- Name: index_forum_topics_on_creator_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_forum_topics_on_creator_id ON public.forum_topics USING btree (creator_id);
--
-- Name: index_forum_topics_on_is_sticky_and_updated_at; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_forum_topics_on_is_sticky_and_updated_at ON public.forum_topics USING btree (is_sticky, updated_at);
--
-- Name: index_forum_topics_on_text_index; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_forum_topics_on_text_index ON public.forum_topics USING gin (text_index);
--
-- Name: index_forum_topics_on_updated_at; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_forum_topics_on_updated_at ON public.forum_topics USING btree (updated_at);
--
-- Name: index_ip_bans_on_ip_addr; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX index_ip_bans_on_ip_addr ON public.ip_bans USING btree (ip_addr);
--
-- Name: index_janitor_trials_on_user_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_janitor_trials_on_user_id ON public.janitor_trials USING btree (user_id);
--
-- Name: index_mod_actions_on_action; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_mod_actions_on_action ON public.mod_actions USING btree (action);
--
-- Name: index_news_updates_on_created_at; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_news_updates_on_created_at ON public.news_updates USING btree (created_at);
--
-- Name: index_note_versions_on_created_at; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_note_versions_on_created_at ON public.note_versions USING btree (created_at);
--
-- Name: index_note_versions_on_note_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_note_versions_on_note_id ON public.note_versions USING btree (note_id);
--
-- Name: index_note_versions_on_post_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_note_versions_on_post_id ON public.note_versions USING btree (post_id);
--
-- Name: index_note_versions_on_updater_id_and_post_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_note_versions_on_updater_id_and_post_id ON public.note_versions USING btree (updater_id, post_id);
--
-- Name: index_note_versions_on_updater_ip_addr; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_note_versions_on_updater_ip_addr ON public.note_versions USING btree (updater_ip_addr);
--
-- Name: index_notes_on_body_index; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_notes_on_body_index ON public.notes USING gin (body_index);
--
-- Name: index_notes_on_creator_id_and_post_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_notes_on_creator_id_and_post_id ON public.notes USING btree (creator_id, post_id);
--
-- Name: index_notes_on_post_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_notes_on_post_id ON public.notes USING btree (post_id);
--
-- Name: index_pixiv_ugoira_frame_data_on_post_id; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX index_pixiv_ugoira_frame_data_on_post_id ON public.pixiv_ugoira_frame_data USING btree (post_id);
--
-- Name: index_pool_versions_on_pool_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_pool_versions_on_pool_id ON public.pool_versions USING btree (pool_id);
--
-- Name: index_pool_versions_on_updater_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_pool_versions_on_updater_id ON public.pool_versions USING btree (updater_id);
--
-- Name: index_pool_versions_on_updater_ip_addr; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_pool_versions_on_updater_ip_addr ON public.pool_versions USING btree (updater_ip_addr);
--
-- Name: index_pools_on_creator_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_pools_on_creator_id ON public.pools USING btree (creator_id);
--
-- Name: index_pools_on_lower_name; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_pools_on_lower_name ON public.pools USING btree (lower((name)::text));
--
-- Name: index_pools_on_name; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_pools_on_name ON public.pools USING btree (name);
--
-- Name: index_pools_on_name_trgm; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_pools_on_name_trgm ON public.pools USING gin (lower((name)::text) public.gin_trgm_ops);
--
-- Name: index_pools_on_updated_at; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_pools_on_updated_at ON public.pools USING btree (updated_at);
--
-- Name: index_post_appeals_on_created_at; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_post_appeals_on_created_at ON public.post_appeals USING btree (created_at);
--
-- Name: index_post_appeals_on_creator_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_post_appeals_on_creator_id ON public.post_appeals USING btree (creator_id);
--
-- Name: index_post_appeals_on_creator_ip_addr; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_post_appeals_on_creator_ip_addr ON public.post_appeals USING btree (creator_ip_addr);
--
-- Name: index_post_appeals_on_post_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_post_appeals_on_post_id ON public.post_appeals USING btree (post_id);
--
-- Name: index_post_appeals_on_reason_tsvector; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_post_appeals_on_reason_tsvector ON public.post_appeals USING gin (to_tsvector('english'::regconfig, reason));
--
-- Name: index_post_approvals_on_post_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_post_approvals_on_post_id ON public.post_approvals USING btree (post_id);
--
-- Name: index_post_approvals_on_user_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_post_approvals_on_user_id ON public.post_approvals USING btree (user_id);
--
-- Name: index_post_disapprovals_on_post_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_post_disapprovals_on_post_id ON public.post_disapprovals USING btree (post_id);
--
-- Name: index_post_disapprovals_on_user_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_post_disapprovals_on_user_id ON public.post_disapprovals USING btree (user_id);
--
-- Name: index_post_events_on_creator_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_post_events_on_creator_id ON public.post_events USING btree (creator_id);
--
-- Name: index_post_events_on_post_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_post_events_on_post_id ON public.post_events USING btree (post_id);
--
-- Name: index_post_flags_on_creator_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_post_flags_on_creator_id ON public.post_flags USING btree (creator_id);
--
-- Name: index_post_flags_on_creator_ip_addr; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_post_flags_on_creator_ip_addr ON public.post_flags USING btree (creator_ip_addr);
--
-- Name: index_post_flags_on_post_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_post_flags_on_post_id ON public.post_flags USING btree (post_id);
--
-- Name: index_post_flags_on_reason_tsvector; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_post_flags_on_reason_tsvector ON public.post_flags USING gin (to_tsvector('english'::regconfig, reason));
--
-- Name: index_post_image_hashes_on_post_id; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX index_post_image_hashes_on_post_id ON public.post_image_hashes USING btree (post_id);
--
-- Name: index_post_replacements2_on_creator_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_post_replacements2_on_creator_id ON public.post_replacements2 USING btree (creator_id);
--
-- Name: index_post_replacements2_on_post_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_post_replacements2_on_post_id ON public.post_replacements2 USING btree (post_id);
--
-- Name: index_post_replacements_on_creator_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_post_replacements_on_creator_id ON public.post_replacements USING btree (creator_id);
--
-- Name: index_post_replacements_on_post_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_post_replacements_on_post_id ON public.post_replacements USING btree (post_id);
--
-- Name: index_post_sets_on_post_ids; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_post_sets_on_post_ids ON public.post_sets USING gin (post_ids);
--
-- Name: index_post_versions_on_post_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_post_versions_on_post_id ON public.post_versions USING btree (post_id);
--
-- Name: index_post_versions_on_updated_at; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_post_versions_on_updated_at ON public.post_versions USING btree (updated_at);
--
-- Name: index_post_versions_on_updater_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_post_versions_on_updater_id ON public.post_versions USING btree (updater_id);
--
-- Name: index_post_versions_on_updater_ip_addr; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_post_versions_on_updater_ip_addr ON public.post_versions USING btree (updater_ip_addr);
--
-- Name: index_post_votes_on_post_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_post_votes_on_post_id ON public.post_votes USING btree (post_id);
--
-- Name: index_post_votes_on_user_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_post_votes_on_user_id ON public.post_votes USING btree (user_id);
--
-- Name: index_post_votes_on_user_id_and_post_id; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX index_post_votes_on_user_id_and_post_id ON public.post_votes USING btree (user_id, post_id);
--
-- Name: index_posts_on_change_seq; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX index_posts_on_change_seq ON public.posts USING btree (change_seq);
--
-- Name: index_posts_on_created_at; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_posts_on_created_at ON public.posts USING btree (created_at);
--
-- Name: index_posts_on_is_flagged; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_posts_on_is_flagged ON public.posts USING btree (is_flagged) WHERE (is_flagged = true);
--
-- Name: index_posts_on_is_pending; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_posts_on_is_pending ON public.posts USING btree (is_pending) WHERE (is_pending = true);
--
-- Name: index_posts_on_md5; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX index_posts_on_md5 ON public.posts USING btree (md5);
--
-- Name: index_posts_on_parent_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_posts_on_parent_id ON public.posts USING btree (parent_id);
--
-- Name: index_posts_on_pixiv_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_posts_on_pixiv_id ON public.posts USING btree (pixiv_id) WHERE (pixiv_id IS NOT NULL);
--
-- Name: index_posts_on_tags_index; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_posts_on_tags_index ON public.posts USING gin (tag_index);
--
-- Name: index_posts_on_uploader_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_posts_on_uploader_id ON public.posts USING btree (uploader_id);
--
-- Name: index_posts_on_uploader_ip_addr; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_posts_on_uploader_ip_addr ON public.posts USING btree (uploader_ip_addr);
--
-- Name: index_saved_searches_on_labels; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_saved_searches_on_labels ON public.saved_searches USING gin (labels);
--
-- Name: index_saved_searches_on_query; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_saved_searches_on_query ON public.saved_searches USING btree (query);
--
-- Name: index_saved_searches_on_user_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_saved_searches_on_user_id ON public.saved_searches USING btree (user_id);
--
-- Name: index_staff_audit_logs_on_user_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_staff_audit_logs_on_user_id ON public.staff_audit_logs USING btree (user_id);
--
-- Name: index_staff_notes_on_creator_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_staff_notes_on_creator_id ON public.staff_notes USING btree (creator_id);
--
-- Name: index_staff_notes_on_user_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_staff_notes_on_user_id ON public.staff_notes USING btree (user_id);
--
-- Name: index_tag_aliases_on_antecedent_name; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_tag_aliases_on_antecedent_name ON public.tag_aliases USING btree (antecedent_name);
--
-- Name: index_tag_aliases_on_antecedent_name_pattern; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_tag_aliases_on_antecedent_name_pattern ON public.tag_aliases USING btree (antecedent_name text_pattern_ops);
--
-- Name: index_tag_aliases_on_consequent_name; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_tag_aliases_on_consequent_name ON public.tag_aliases USING btree (consequent_name);
--
-- Name: index_tag_aliases_on_forum_post_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_tag_aliases_on_forum_post_id ON public.tag_aliases USING btree (forum_post_id);
--
-- Name: index_tag_aliases_on_post_count; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_tag_aliases_on_post_count ON public.tag_aliases USING btree (post_count);
--
-- Name: index_tag_implications_on_antecedent_name; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_tag_implications_on_antecedent_name ON public.tag_implications USING btree (antecedent_name);
--
-- Name: index_tag_implications_on_consequent_name; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_tag_implications_on_consequent_name ON public.tag_implications USING btree (consequent_name);
--
-- Name: index_tag_implications_on_forum_post_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_tag_implications_on_forum_post_id ON public.tag_implications USING btree (forum_post_id);
--
-- Name: index_tag_rel_undos_on_tag_rel_type_and_tag_rel_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_tag_rel_undos_on_tag_rel_type_and_tag_rel_id ON public.tag_rel_undos USING btree (tag_rel_type, tag_rel_id);
--
-- Name: index_tag_type_versions_on_creator_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_tag_type_versions_on_creator_id ON public.tag_type_versions USING btree (creator_id);
--
-- Name: index_tag_type_versions_on_tag_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_tag_type_versions_on_tag_id ON public.tag_type_versions USING btree (tag_id);
--
-- Name: index_tags_on_name; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX index_tags_on_name ON public.tags USING btree (name);
--
-- Name: index_tags_on_name_pattern; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_tags_on_name_pattern ON public.tags USING btree (name text_pattern_ops);
--
-- Name: index_tags_on_name_prefix; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_tags_on_name_prefix ON public.tags USING gin (regexp_replace((name)::text, '([a-z0-9])[a-z0-9'']*($|[^a-z0-9'']+)'::text, '\1'::text, 'g'::text) public.gin_trgm_ops);
--
-- Name: index_tags_on_name_trgm; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_tags_on_name_trgm ON public.tags USING gin (name public.gin_trgm_ops);
--
-- Name: index_uploads_on_referer_url; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_uploads_on_referer_url ON public.uploads USING btree (referer_url);
--
-- Name: index_uploads_on_source; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_uploads_on_source ON public.uploads USING btree (source);
--
-- Name: index_uploads_on_uploader_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_uploads_on_uploader_id ON public.uploads USING btree (uploader_id);
--
-- Name: index_uploads_on_uploader_ip_addr; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_uploads_on_uploader_ip_addr ON public.uploads USING btree (uploader_ip_addr);
--
-- Name: index_user_feedback_on_created_at; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_user_feedback_on_created_at ON public.user_feedback USING btree (created_at);
--
-- Name: index_user_feedback_on_creator_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_user_feedback_on_creator_id ON public.user_feedback USING btree (creator_id);
--
-- Name: index_user_feedback_on_creator_ip_addr; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_user_feedback_on_creator_ip_addr ON public.user_feedback USING btree (creator_ip_addr);
--
-- Name: index_user_feedback_on_user_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_user_feedback_on_user_id ON public.user_feedback USING btree (user_id);
--
-- Name: index_user_lower_email; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_user_lower_email ON public.users USING btree (lower((email)::text));
--
-- Name: index_user_name_change_requests_on_original_name; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_user_name_change_requests_on_original_name ON public.user_name_change_requests USING btree (original_name);
--
-- Name: index_user_name_change_requests_on_user_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_user_name_change_requests_on_user_id ON public.user_name_change_requests USING btree (user_id);
--
-- Name: index_user_statuses_on_user_id; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX index_user_statuses_on_user_id ON public.user_statuses USING btree (user_id);
--
-- Name: index_users_on_email; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX index_users_on_email ON public.users USING btree (email);
--
-- Name: index_users_on_last_ip_addr; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_users_on_last_ip_addr ON public.users USING btree (last_ip_addr) WHERE (last_ip_addr IS NOT NULL);
--
-- Name: index_users_on_name; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX index_users_on_name ON public.users USING btree (lower((name)::text));
--
-- Name: index_users_on_name_trgm; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_users_on_name_trgm ON public.users USING gin (lower((name)::text) public.gin_trgm_ops);
--
-- Name: index_wiki_page_versions_on_created_at; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_wiki_page_versions_on_created_at ON public.wiki_page_versions USING btree (created_at);
--
-- Name: index_wiki_page_versions_on_updater_ip_addr; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_wiki_page_versions_on_updater_ip_addr ON public.wiki_page_versions USING btree (updater_ip_addr);
--
-- Name: index_wiki_page_versions_on_wiki_page_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_wiki_page_versions_on_wiki_page_id ON public.wiki_page_versions USING btree (wiki_page_id);
--
-- Name: index_wiki_pages_on_body_index_index; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_wiki_pages_on_body_index_index ON public.wiki_pages USING gin (body_index);
--
-- Name: index_wiki_pages_on_other_names; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_wiki_pages_on_other_names ON public.wiki_pages USING gin (other_names);
--
-- Name: index_wiki_pages_on_title; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX index_wiki_pages_on_title ON public.wiki_pages USING btree (title);
--
-- Name: index_wiki_pages_on_title_pattern; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_wiki_pages_on_title_pattern ON public.wiki_pages USING btree (title text_pattern_ops);
--
-- Name: index_wiki_pages_on_updated_at; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_wiki_pages_on_updated_at ON public.wiki_pages USING btree (updated_at);
--
-- Name: post_image_hashes_index; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX post_image_hashes_index ON public.post_image_hashes USING btree (nw, ne, sw, se);
--
-- Name: posts posts_update_change_seq; Type: TRIGGER; Schema: public; Owner: -
--
CREATE TRIGGER posts_update_change_seq BEFORE UPDATE ON public.posts FOR EACH ROW EXECUTE FUNCTION public.posts_trigger_change_seq();
--
-- Name: blips trigger_blips_on_update; Type: TRIGGER; Schema: public; Owner: -
--
CREATE TRIGGER trigger_blips_on_update BEFORE INSERT OR UPDATE ON public.blips FOR EACH ROW EXECUTE FUNCTION tsvector_update_trigger('body_index', 'pg_catalog.english', 'body');
--
-- Name: comments trigger_comments_on_update; Type: TRIGGER; Schema: public; Owner: -
--
CREATE TRIGGER trigger_comments_on_update BEFORE INSERT OR UPDATE ON public.comments FOR EACH ROW EXECUTE FUNCTION tsvector_update_trigger('body_index', 'pg_catalog.english', 'body');
--
-- Name: dmails trigger_dmails_on_update; Type: TRIGGER; Schema: public; Owner: -
--
CREATE TRIGGER trigger_dmails_on_update BEFORE INSERT OR UPDATE ON public.dmails FOR EACH ROW EXECUTE FUNCTION tsvector_update_trigger('message_index', 'pg_catalog.english', 'title', 'body');
--
-- Name: forum_posts trigger_forum_posts_on_update; Type: TRIGGER; Schema: public; Owner: -
--
CREATE TRIGGER trigger_forum_posts_on_update BEFORE INSERT OR UPDATE ON public.forum_posts FOR EACH ROW EXECUTE FUNCTION tsvector_update_trigger('text_index', 'pg_catalog.english', 'body');
--
-- Name: forum_topics trigger_forum_topics_on_update; Type: TRIGGER; Schema: public; Owner: -
--
CREATE TRIGGER trigger_forum_topics_on_update BEFORE INSERT OR UPDATE ON public.forum_topics FOR EACH ROW EXECUTE FUNCTION tsvector_update_trigger('text_index', 'pg_catalog.english', 'title');
--
-- Name: notes trigger_notes_on_update; Type: TRIGGER; Schema: public; Owner: -
--
CREATE TRIGGER trigger_notes_on_update BEFORE INSERT OR UPDATE ON public.notes FOR EACH ROW EXECUTE FUNCTION tsvector_update_trigger('body_index', 'pg_catalog.english', 'body');
--
-- Name: posts trigger_posts_on_tag_index_update; Type: TRIGGER; Schema: public; Owner: -
--
CREATE TRIGGER trigger_posts_on_tag_index_update BEFORE INSERT OR UPDATE ON public.posts FOR EACH ROW EXECUTE FUNCTION tsvector_update_trigger('tag_index', 'public.danbooru', 'tag_string', 'fav_string', 'pool_string');
--
-- Name: wiki_pages trigger_wiki_pages_on_update; Type: TRIGGER; Schema: public; Owner: -
--
CREATE TRIGGER trigger_wiki_pages_on_update BEFORE INSERT OR UPDATE ON public.wiki_pages FOR EACH ROW EXECUTE FUNCTION tsvector_update_trigger('body_index', 'public.danbooru', 'body', 'title');
--
-- Name: staff_audit_logs fk_rails_02329e5ef9; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.staff_audit_logs
ADD CONSTRAINT fk_rails_02329e5ef9 FOREIGN KEY (user_id) REFERENCES public.users(id);
--
-- Name: post_image_hashes fk_rails_2b7afcc2f0; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.post_image_hashes
ADD CONSTRAINT fk_rails_2b7afcc2f0 FOREIGN KEY (post_id) REFERENCES public.posts(id);
--
-- Name: favorites fk_rails_a7668ef613; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.favorites
ADD CONSTRAINT fk_rails_a7668ef613 FOREIGN KEY (user_id) REFERENCES public.users(id);
--
-- Name: staff_notes fk_rails_bab7e2d92a; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.staff_notes
ADD CONSTRAINT fk_rails_bab7e2d92a FOREIGN KEY (user_id) REFERENCES public.users(id);
--
-- Name: post_events fk_rails_bd327ccee6; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.post_events
ADD CONSTRAINT fk_rails_bd327ccee6 FOREIGN KEY (creator_id) REFERENCES public.users(id);
--
-- Name: favorites fk_rails_d20e53bb68; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.favorites
ADD CONSTRAINT fk_rails_d20e53bb68 FOREIGN KEY (post_id) REFERENCES public.posts(id);
--
-- PostgreSQL database dump complete
--
SET search_path TO "$user", public;
INSERT INTO "schema_migrations" (version) VALUES
('20100204211522'),
('20100204214746'),
('20100205162521'),
('20100205163027'),
('20100205224030'),
('20100211025616'),
('20100211181944'),
('20100211191709'),
('20100211191716'),
('20100213181847'),
('20100213183712'),
('20100214080549'),
('20100214080557'),
('20100214080605'),
('20100215182234'),
('20100215213756'),
('20100215223541'),
('20100215224629'),
('20100215224635'),
('20100215225710'),
('20100215230642'),
('20100219230537'),
('20100221003655'),
('20100221005812'),
('20100223001012'),
('20100224171915'),
('20100224172146'),
('20100307073438'),
('20100309211553'),
('20100318213503'),
('20100826232512'),
('20110328215652'),
('20110328215701'),
('20110607194023'),
('20110717010705'),
('20110722211855'),
('20110815233456'),
('20111101212358'),
('20130106210658'),
('20130114154400'),
('20130219171111'),
('20130219184743'),
('20130221032344'),
('20130221035518'),
('20130221214811'),
('20130302214500'),
('20130305005138'),
('20130307225324'),
('20130308204213'),
('20130318002652'),
('20130318012517'),
('20130318030619'),
('20130318231740'),
('20130320070700'),
('20130322162059'),
('20130322173202'),
('20130322173859'),
('20130323160259'),
('20130326035904'),
('20130328092739'),
('20130331180246'),
('20130331182719'),
('20130401013601'),
('20130409191950'),
('20130417221643'),
('20130424121410'),
('20130506154136'),
('20130606224559'),
('20130618230158'),
('20130620215658'),
('20130712162600'),
('20130914175431'),
('20131006193238'),
('20131117150705'),
('20131118153503'),
('20131130190411'),
('20131209181023'),
('20131217025233'),
('20131225002748'),
('20140111191413'),
('20140204233337'),
('20140221213349'),
('20140428015134'),
('20140505000956'),
('20140603225334'),
('20140604002414'),
('20140613004559'),
('20140701224800'),
('20140722225753'),
('20140725003232'),
('20141009231234'),
('20141017231608'),
('20141120045943'),
('20150119191042'),
('20150120005624'),
('20150128005954'),
('20150403224949'),
('20150613010904'),
('20150623191904'),
('20150629235905'),
('20150705014135'),
('20150721214646'),
('20150728170433'),
('20150805010245'),
('20151217213321'),
('20160219004022'),
('20160219010854'),
('20160219172840'),
('20160222211328'),
('20160526174848'),
('20160820003534'),
('20160822230752'),
('20160919234407'),
('20161018221128'),
('20161024220345'),
('20161101003139'),
('20161221225849'),
('20161227003428'),
('20161229001201'),
('20170106012138'),
('20170112021922'),
('20170112060921'),
('20170117233040'),
('20170218104710'),
('20170302014435'),
('20170314235626'),
('20170316224630'),
('20170319000519'),
('20170329185605'),
('20170330230231'),
('20170413000209'),
('20170414005856'),
('20170414233426'),
('20170414233617'),
('20170416224142'),
('20170428220448'),
('20170512221200'),
('20170515235205'),
('20170519204506'),
('20170526183928'),
('20170608043651'),
('20170613200356'),
('20170709190409'),
('20170914200122'),
('20171106075030'),
('20171127195124'),
('20171218213037'),
('20171219001521'),
('20171230220225'),
('20180113211343'),
('20180116001101'),
('20180403231351'),
('20180413224239'),
('20180425194016'),
('20180516222413'),
('20180517190048'),
('20180518175154'),
('20180804203201'),
('20180816230604'),
('20180912185624'),
('20180913184128'),
('20180916002448'),
('20181108162204'),
('20181108205842'),
('20181113174914'),
('20181114180205'),
('20181114185032'),
('20181114202744'),
('20181130004740'),
('20181202172145'),
('20190109210822'),
('20190129012253'),
('20190202155518'),
('20190206023508'),
('20190209212716'),
('20190214040324'),
('20190214090126'),
('20190220025517'),
('20190220041928'),
('20190222082952'),
('20190228144206'),
('20190305165101'),
('20190313221440'),
('20190317024446'),
('20190324111703'),
('20190331193644'),
('20190403174011'),
('20190409195837'),
('20190410022203'),
('20190413055451'),
('20190418093745'),
('20190427163107'),
('20190427181805'),
('20190428132152'),
('20190430120155'),
('20190510184237'),
('20190510184245'),
('20190602115848'),
('20190604125828'),
('20190613025850'),
('20190623070654'),
('20190714122705'),
('20190717205018'),
('20190718201354'),
('20190801210547'),
('20190804010156'),
('20190810064211'),
('20190815131908'),
('20190827223818'),
('20190827233008'),
('20190829044313'),
('20190905111159'),
('20190916204908'),
('20190919213915'),
('20190924233432'),
('20191003070653'),
('20191006073950'),
('20191006143246'),
('20191013233447'),
('20191116032230'),
('20191231162515'),
('20200113022639'),
('20200420032714'),
('20200713053034'),
('20200806101238'),
('20200910015420'),
('20201113073842'),
('20201220172926'),
('20201220190335'),
('20210117173030'),
('20210405040522'),
('20210425020131'),
('20210426025625'),
('20210430201028'),
('20210506235640'),
('20210625155528'),
('20210718172512'),
('20211223070707'),
('20220106081415'),
('20220203154846'),
('20220219202441');
|
CREATE TABLE `users` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(100),
`email` varchar(100),
`mobile` varchar(15),
`alamat` varchar(100),
PRIMARY KEY (`id`)
);
|
-- @testpoint:openGauss关键字reset(非保留),作为列名带引号并且更新时使用该列,建表成功,reset的值更新为100
drop table if exists reset_test;
create table reset_test(
c_id int, c_int int, c_integer integer, c_bool int, c_boolean int, c_bigint integer,
c_real real, c_double real,
c_decimal decimal(38), c_number number(38), c_numeric numeric(38),
c_char char(50) default null, c_varchar varchar(20), c_varchar2 varchar2(4000),
c_date date, c_datetime date, c_timestamp timestamp,
"reset" varchar(100) default 'reset'
)
PARTITION BY RANGE (c_integer)
(
partition P_20180121 values less than (0),
partition P_20190122 values less than (50000),
partition P_20200123 values less than (100000),
partition P_max values less than (maxvalue)
);
insert into reset_test(c_id,"reset") values(1,'hello');
update reset_test set "reset"=100;
select * from reset_test order by "reset";
drop table reset_test;
|
-- MySQL dump 10.13 Distrib 8.0.22, for Linux (x86_64)
--
-- Host: 127.0.0.1 Database: fromDb
-- ------------------------------------------------------
-- Server version 8.0.21
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!50503 SET NAMES 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 `emptyTable`
--
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `emptyTable` IF NOT EXISTS (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`modification_date` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2011640 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `dataTable` IF NOT EXISTS (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`modification_date` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2011640 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `otherTable` IF NOT EXISTS (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`modification_date` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2011640 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Dumping routines for database 'fromDb'
--
/*!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 2021-01-18 22:52:14
COMMIT;
SET AUTOCOMMIT=@OLD_AUTOCOMMIT;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
|
CREATE TABLE subdivision_NE (id VARCHAR(6) NOT NULL, name VARCHAR(255), level VARCHAR(64) NOT NULL, PRIMARY KEY(id));
INSERT INTO "subdivision_NE" ("id", "name", "level") VALUES ('NE-1', 'Agadez', 'region');
INSERT INTO "subdivision_NE" ("id", "name", "level") VALUES ('NE-2', 'Diffa', 'region');
INSERT INTO "subdivision_NE" ("id", "name", "level") VALUES ('NE-3', 'Dosso', 'region');
INSERT INTO "subdivision_NE" ("id", "name", "level") VALUES ('NE-4', 'Maradi', 'region');
INSERT INTO "subdivision_NE" ("id", "name", "level") VALUES ('NE-8', 'Niamey', 'capital district');
INSERT INTO "subdivision_NE" ("id", "name", "level") VALUES ('NE-5', 'Tahoua', 'region');
INSERT INTO "subdivision_NE" ("id", "name", "level") VALUES ('NE-6', 'Tillabéri', 'region');
INSERT INTO "subdivision_NE" ("id", "name", "level") VALUES ('NE-7', 'Zinder', 'region');
|
alter table cd_stage drop column jenkins_step_name;
|
INSERT INTO department (id, name)
VALUES (1, 'Customer Service'),
(2, 'Development'),
(3, 'Marketing'),
(4, 'Accounting'),
(5, 'Human Resources');
INSERT INTO role (id, title, salary, department_id)
VALUES (1, 'Representative', 55000.00, 1),
(2, 'Junior Developer', 75000.00, 2),
(3, 'Senior Developer', 90000.00, 2),
(4, 'Accountant', 80000.00, 4),
(5, 'Strategist', 120000.00, 3),
(6, 'Administrator', 60000.00, 5),
(7, 'Supervisor', 100000.00, 4),
(8, 'Project Manager', 180000.00, 2),
(9, 'CEO', 350000.00, 2);
INSERT INTO employee (id, first_name, last_name, role_id, manager_id)
VALUES (1, 'Charlie', 'Buckets', 1, NULL),
(2, 'Melanie', 'Flowers', 2, NULL),
(3, 'Blaine', 'Overwood', 6, NULL),
(4, 'Exeter', 'Flexitor', 5, NULL),
(5, 'Fiora', 'Truffles', 3, NULL),
(6, 'Bokeem', 'Woodbine', 7, NULL),
(7, 'Tee', 'X', 1, NULL),
(8, 'Fan', 'Bing-Bing', 4, NULL),
(9, 'Harry', 'Zhou', 8, NULL),
(10, 'Andy', 'Rooh', 9, NULL);
|
/* contrib/pg_stat_monitor/pg_stat_monitor--1.4.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION pg_stat_monitor" to load this file. \quit
-- Register functions.
CREATE FUNCTION pg_stat_monitor_reset()
RETURNS void
AS 'MODULE_PATHNAME'
LANGUAGE C PARALLEL SAFE;
CREATE FUNCTION pg_stat_monitor(IN showtext boolean,
OUT userid oid,
OUT dbid oid,
OUT queryid bigint,
OUT query text,
OUT calls int8,
OUT total_time float8,
OUT min_time float8,
OUT max_time float8,
OUT mean_time float8,
OUT stddev_time float8,
OUT rows int8,
OUT shared_blks_hit int8,
OUT shared_blks_read int8,
OUT shared_blks_dirtied int8,
OUT shared_blks_written int8,
OUT local_blks_hit int8,
OUT local_blks_read int8,
OUT local_blks_dirtied int8,
OUT local_blks_written int8,
OUT temp_blks_read int8,
OUT temp_blks_written int8,
OUT blk_read_time float8,
OUT blk_write_time float8,
OUT host bigint,
OUT hist_calls text,
OUT hist_min_time text,
OUT hist_max_time text,
OUT hist_mean_time text,
OUT slow_query text,
OUT cpu_user_time float8,
OUT cpu_sys_time float8
)
RETURNS SETOF record
AS 'MODULE_PATHNAME', 'pg_stat_monitor_1_3'
LANGUAGE C STRICT VOLATILE PARALLEL SAFE;
CREATE FUNCTION pg_stat_agg(
OUT queryid bigint,
OUT id bigint,
OUT type bigint,
OUT total_calls int,
OUT first_call_time timestamptz,
OUT last_call_time timestamptz)
RETURNS SETOF record
AS 'MODULE_PATHNAME', 'pg_stat_agg'
LANGUAGE C STRICT VOLATILE PARALLEL SAFE;
-- Register a view on the function for ease of use.
CREATE VIEW pg_stat_monitor AS
SELECT * FROM pg_stat_monitor(true);
GRANT SELECT ON pg_stat_monitor TO PUBLIC;
CREATE VIEW pg_stat_agg_database AS
SELECT
agg.queryid,
agg.id AS dbid,
ss.userid,
'0.0.0.0'::inet + ss.host AS host,
agg.total_calls,
ss.min_time,
ss.max_time,
ss.mean_time,
(string_to_array(hist_calls, ',')) hist_calls,
(string_to_array(hist_min_time, ',')) hist_min_time,
(string_to_array(hist_max_time, ',')) hist_max_time,
(string_to_array(hist_mean_time, ',')) hist_mean_time,
agg.first_call_time AS first_log_time,
agg.last_call_time AS last_log_time,
ss.cpu_user_time,
ss.cpu_sys_time,
ss.query,
ss.slow_query
FROM pg_stat_agg() agg
INNER JOIN (SELECT DISTINCT queryid, dbid, userid, query, host, min_time, max_time, mean_time, hist_calls, hist_min_time, hist_max_time,hist_mean_time,slow_query,cpu_user_time,cpu_sys_time
FROM pg_stat_monitor) ss
ON agg.queryid = ss.queryid AND agg.type = 0 AND id = dbid;
CREATE VIEW pg_stat_agg_user AS
SELECT
agg.queryid,
agg.id AS dbid,
ss.userid,
'0.0.0.0'::inet + ss.host AS host,
agg.total_calls,
ss.min_time,
ss.max_time,
ss.mean_time,
(string_to_array(hist_calls, ',')) hist_calls,
(string_to_array(hist_min_time, ',')) hist_min_time,
(string_to_array(hist_max_time, ',')) hist_max_time,
(string_to_array(hist_mean_time, ',')) hist_mean_time,
agg.first_call_time AS first_log_time,
agg.last_call_time AS last_log_time,
ss.cpu_user_time,
ss.cpu_sys_time,
ss.query,
ss.slow_query
FROM pg_stat_agg() agg
INNER JOIN (SELECT DISTINCT queryid, userid, query, host, min_time, max_time, mean_time, hist_calls, hist_min_time, hist_max_time,hist_mean_time,slow_query,cpu_user_time,cpu_sys_time FROM pg_stat_monitor) ss
ON agg.queryid = ss.queryid AND agg.type = 1 AND id = userid;
CREATE VIEW pg_stat_agg_host AS
SELECT
agg.queryid,
agg.id AS dbid,
ss.userid,
'0.0.0.0'::inet + ss.host AS host,
agg.total_calls,
ss.min_time,
ss.max_time,
ss.mean_time,
(string_to_array(hist_calls, ',')) hist_calls,
(string_to_array(hist_min_time, ',')) hist_min_time,
(string_to_array(hist_max_time, ',')) hist_max_time,
(string_to_array(hist_mean_time, ',')) hist_mean_time,
agg.first_call_time AS first_log_time,
agg.last_call_time AS last_log_time,
ss.cpu_user_time,
ss.cpu_sys_time,
ss.query,
ss.slow_query
FROM pg_stat_agg() agg
INNER JOIN (SELECT DISTINCT queryid, userid, query, host, min_time, max_time, mean_time, hist_calls, hist_min_time, hist_max_time,hist_mean_time,slow_query,cpu_user_time,cpu_sys_time FROM pg_stat_monitor) ss
ON agg.queryid = ss.queryid AND agg.type = 2 AND id = host;
GRANT SELECT ON pg_stat_agg_database TO PUBLIC;
-- Don't want this to be available to non-superusers.
REVOKE ALL ON FUNCTION pg_stat_monitor_reset() FROM PUBLIC;
|
CREATE UNIQUE INDEX UX_PhoneNumber_PhoneNumber ON dbo.PhoneNumber (PhoneNumber)
GO
|
-- phpMyAdmin SQL Dump
-- version 3.4.9
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Feb 20, 2012 at 03:23 PM
-- Server version: 5.1.52
-- PHP Version: 5.3.3
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: `zpanel_proftpd`
--
CREATE DATABASE `zpanel_proftpd`;
USE `zpanel_proftpd`;
-- --------------------------------------------------------
--
-- Table structure for table `ftpgroup`
--
CREATE TABLE IF NOT EXISTS `ftpgroup` (
`groupname` varchar(16) NOT NULL DEFAULT '',
`gid` smallint(6) NOT NULL DEFAULT '5500',
`members` varchar(16) NOT NULL DEFAULT '',
KEY `groupname` (`groupname`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='ProFTP group table';
--
-- Dumping data for table `ftpgroup`
--
INSERT INTO `ftpgroup` (`groupname`, `gid`, `members`) VALUES
('ftpgroup', 2001, 'ftpuser');
-- --------------------------------------------------------
--
-- Table structure for table `ftpquotalimits`
--
CREATE TABLE IF NOT EXISTS `ftpquotalimits` (
`name` varchar(30) DEFAULT NULL,
`quota_type` enum('user','group','class','all') NOT NULL DEFAULT 'user',
`per_session` enum('false','true') NOT NULL DEFAULT 'false',
`limit_type` enum('soft','hard') NOT NULL DEFAULT 'soft',
`bytes_in_avail` int(10) unsigned NOT NULL DEFAULT '0',
`bytes_out_avail` int(10) unsigned NOT NULL DEFAULT '0',
`bytes_xfer_avail` int(10) unsigned NOT NULL DEFAULT '0',
`files_in_avail` int(10) unsigned NOT NULL DEFAULT '0',
`files_out_avail` int(10) unsigned NOT NULL DEFAULT '0',
`files_xfer_avail` int(10) unsigned NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `ftpquotatallies`
--
CREATE TABLE IF NOT EXISTS `ftpquotatallies` (
`name` varchar(30) NOT NULL DEFAULT '',
`quota_type` enum('user','group','class','all') NOT NULL DEFAULT 'user',
`bytes_in_used` int(10) unsigned NOT NULL DEFAULT '0',
`bytes_out_used` int(10) unsigned NOT NULL DEFAULT '0',
`bytes_xfer_used` int(10) unsigned NOT NULL DEFAULT '0',
`files_in_used` int(10) unsigned NOT NULL DEFAULT '0',
`files_out_used` int(10) unsigned NOT NULL DEFAULT '0',
`files_xfer_used` int(10) unsigned NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `ftpuser`
--
CREATE TABLE IF NOT EXISTS `ftpuser` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`userid` varchar(32) NOT NULL DEFAULT '',
`passwd` varchar(32) NOT NULL DEFAULT '',
`uid` smallint(6) NOT NULL DEFAULT '33',
`gid` smallint(6) NOT NULL DEFAULT '33',
`homedir` varchar(255) NOT NULL DEFAULT '',
`shell` varchar(16) NOT NULL DEFAULT '/sbin/nologin',
`count` int(11) NOT NULL DEFAULT '0',
`accessed` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`),
UNIQUE KEY `userid` (`userid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='ProFTP user table' AUTO_INCREMENT=1 ;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
--Drop schema if exists quickstats cascade;
--create schema quickstats;
set search_path=quickstats,public;
create table usda_api (
year text,
commodity_desc text,
statisticcat_desc text,
county_code text,
source_desc text,
unit_desc text,
prodn_practice_desc text,
freq_desc text,
domain_desc text,
util_practice_desc text,
value text,
reference_period_desc text,
class_desc text,
asd_code text,
agg_level_desc text,
domaincat_desc text,
state_fips_code text,
state_alpha text,
group_desc text);
create table usda_region (
state_alpha text,
state_fips_code text,
county_code text,
county_name text,
asd_code text,
asd_name text);
create table quickstats_raw (
Program text,
Year integer,
Period text,
WeekEnding text,
GeoLevel text,
State text,
StateFips char(2),
AgDistrict text,
AgDistrictCode text,
County text,
CountyCode char(5),
ZipCode varchar(5),
Region text,
WatershedCode text,
Watershed text,
Commodity text,
DataItem text,
Domain text,
DomainCategory text,
Value text,
CV Text
);
create table quickstats as
select * from quickstats_raw limit 0;
create or replace function updateQuickStats() RETURNS bigint
AS $$
update quickstats_raw
set Program=trim(both from Program),
Period=trim(both from Period),
WeekEnding=trim(both from WeekEnding),
GeoLevel=trim(both from GeoLevel),
State=trim(both from State),
StateFips=trim(both from StateFips),
AgDistrict=trim(both from AgDistrict),
AgDistrictCode=trim(both from AgDistrictCode),
County=trim(both from County),
CountyCode=trim(both from CountyCode),
ZipCode=trim(both from ZipCode),
Region=trim(both from Region),
WatershedCode=trim(both from WatershedCode),
Watershed=trim(both from Watershed),
Commodity=trim(both from Commodity),
DataItem=trim(both from DataItem),
Domain=trim(both from Domain),
DomainCategory=trim(both from DomainCategory),
Value=trim(both from Value),
CV=trim(both from CV);
select count(*) from quickstats_raw;
$$ LANGUAGE SQL;
create or replace function makeQuickStats() RETURNS bigint
AS $$
select * from updateQuickStats();
truncate quickstats.quickstats;
insert into quickstats.quickstats
select distinct * from quickstats.quickstats_raw;
select count(*) from quickstats.quickstats;
$$ LANGUAGE SQL;
--select "Value"::float from quickstats where "Value" not in (' (NA)',' (D)','',' (S)');
|
SELECT MIN("CommonGovernment_13"."naics_name") AS "TEMP(attr:naics_name:nk)(3709532549)(0)", MAX("CommonGovernment_13"."naics_name") AS "TEMP(attr:naics_name:nk)(766450649)(0)", "CommonGovernment_13"."naics_code" AS "naics_code", SUM(CAST("CommonGovernment_13"."Number of Records" AS SIGNED)) AS "sum:Number of Records:ok", SUM("CommonGovernment_13"."obligatedamount") AS "sum:obligatedamount:ok" FROM "CommonGovernment_13" GROUP BY "CommonGovernment_13"."naics_code";
|
-- SPDX-License-Identifier: Apache-2.0
-- Licensed to the Ed-Fi Alliance under one or more agreements.
-- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0.
-- See the LICENSE and NOTICES files in the project root for more information.
CREATE OR REPLACE VIEW analytics.rls_UserDim
AS
SELECT
Staff.StaffUniqueId AS UserKey,
StaffElectronicMail.ElectronicMailAddress AS UserEmail,
( SELECT
MAX(MaxLastModifiedDate)
FROM
(VALUES(Staff.LastModifiedDate)
-- StaffElectronicMail does not have a LastModifiedDate
, (StaffElectronicMail.CreateDate)
, (ElectronicMailType.LastModifiedDate)
) AS VALUE(MaxLastModifiedDate)
) AS LastModifiedDate
FROM
edfi.Staff
INNER JOIN
edfi.StaffElectronicMail ON
Staff.StaffUSI = StaffElectronicMail.StaffUSI
INNER JOIN
edfi.Descriptor AS ElectronicMailType ON
StaffElectronicMail.ElectronicMailTypeDescriptorId = ElectronicMailType.DescriptorId
INNER JOIN
analytics_config.DescriptorMap ON
ElectronicMailType.DescriptorId = DescriptorMap.DescriptorId
INNER JOIN
analytics_config.DescriptorConstant ON
DescriptorConstant.DescriptorConstantId = DescriptorMap.DescriptorConstantId
WHERE
DescriptorConstant.ConstantName = 'Email.Work';
|
begin;
select round_id as rd,
school_name as name,
p::numeric(4,3) as p
from ncaa_sr.rounds
where TRUE --round_id=2
and p<1.0
order by round_id asc,p desc;
copy
(
select round_id as rd,
school_name as name,
p::numeric(4,3) as p
from ncaa_sr.rounds
where TRUE --round_id=2
and p<1.0
order by round_id asc,p desc
)
to '/tmp/round_p.csv' csv header;
commit;
|
--
CREATE EXTENSION IF NOT EXISTS plpgsql;
CREATE OR REPLACE TRUSTED PROCEDURAL LANGUAGE 'plpgsql'
HANDLER plpgsql_call_handler
VALIDATOR plpgsql_validator;
--
|
-- 1112.Highest Grade For Each Student
-- Table: Enrollments
-- +---------------+---------+
-- | Column Name | Type |
-- +---------------+---------+
-- | student_id | int |
-- | course_id | int |
-- | grade | int |
-- +---------------+---------+
-- (student_id, course_id) is the primary key of this table.
-- Write a SQL query to find the highest grade with its corresponding course for each student. In case of a tie, you should find the course with the smallest course_id. The output must be sorted by increasing student_id.
-- The query result format is in the following example:
-- Enrollments table:
-- +------------+-------------------+
-- | student_id | course_id | grade |
-- +------------+-----------+-------+
-- | 2 | 2 | 95 |
-- | 2 | 3 | 95 |
-- | 1 | 1 | 90 |
-- | 1 | 2 | 99 |
-- | 3 | 1 | 80 |
-- | 3 | 2 | 75 |
-- | 3 | 3 | 82 |
-- +------------+-----------+-------+
-- Result table:
-- +------------+-------------------+
-- | student_id | course_id | grade |
-- +------------+-----------+-------+
-- | 1 | 2 | 99 |
-- | 2 | 2 | 95 |
-- | 3 | 3 | 82 |
-- +------------+-----------+-------+
# V0
select student_id, min(course_id) as course_id, grade
from Enrollments
where (student_id, grade) in
(select student_id, max(grade)
from Enrollments
group by student_id)
group by student_id, grade
order by student_id asc
# V1
# https://code.dennyzhang.com/highest-grade-for-each-student
select student_id, min(course_id) as course_id, grade
from Enrollments
where (student_id, grade) in
(select student_id, max(grade)
from Enrollments
group by student_id)
group by student_id
order by student_id asc
# V2
# Time: O(nlogn)
# Space: O(n)
SELECT student_id,
Min(course_id) AS course_id,
grade
FROM enrollments
WHERE ( student_id, grade ) IN (SELECT student_id,
Max(grade)
FROM enrollments
GROUP BY student_id
ORDER BY NULL)
GROUP BY student_id
ORDER BY student_id
|
-- CUISINE Table
CREATE TABLE cuisine (
id BIGSERIAL PRIMARY KEY NOT NULL,
name VARCHAR(100) NOT NULL,
created_at TIMESTAMP WITHOUT TIME ZONE DEFAULT current_timestamp NOT NULL,
updated_at TIMESTAMP WITHOUT TIME ZONE DEFAULT current_timestamp NOT NULL
);
-- USERS Table
CREATE TABLE users (
id BIGSERIAL PRIMARY KEY NOT NULL,
email VARCHAR(100),
name VARCHAR(100),
password VARCHAR(100),
created_at TIMESTAMP WITHOUT TIME ZONE DEFAULT current_timestamp NOT NULL,
updated_at TIMESTAMP WITHOUT TIME ZONE DEFAULT current_timestamp NOT NULL
);
CREATE UNIQUE INDEX index_users_on_email ON users USING BTREE (email);
-- PRICERANGE Table
CREATE TABLE price_range (
id BIGSERIAL PRIMARY KEY NOT NULL,
range VARCHAR(100) NOT NULL,
created_at TIMESTAMP WITHOUT TIME ZONE DEFAULT current_timestamp NOT NULL,
updated_at TIMESTAMP WITHOUT TIME ZONE DEFAULT current_timestamp NOT NULL
);
-- RESTAURANT Table
CREATE TABLE restaurant (
id BIGSERIAL PRIMARY KEY NOT NULL,
name VARCHAR(100) NOT NULL,
address VARCHAR(255),
nearest_station VARCHAR(255),
place_id VARCHAR(255),
latitude NUMERIC,
longitude NUMERIC,
notes VARCHAR(1000),
cuisine_id BIGINT REFERENCES cuisine(id) NOT NULL DEFAULT 0,
price_range_id BIGINT REFERENCES price_range(id) NOT NULL DEFAULT 0,
created_by_user_id BIGINT REFERENCES users(id) NOT NULL,
created_at TIMESTAMP WITHOUT TIME ZONE DEFAULT current_timestamp NOT NULL,
updated_at TIMESTAMP WITHOUT TIME ZONE DEFAULT current_timestamp NOT NULL
);
-- COMMENT Table
CREATE TABLE comment (
id BIGSERIAL PRIMARY KEY NOT NULL,
content VARCHAR(500) NOT NULL,
restaurant_id BIGINT REFERENCES restaurant(id) ON DELETE CASCADE NOT NULL,
created_by_user_id BIGINT REFERENCES users(id) NOT NULL,
created_at TIMESTAMP WITHOUT TIME ZONE DEFAULT current_timestamp NOT NULL,
updated_at TIMESTAMP WITHOUT TIME ZONE DEFAULT current_timestamp NOT NULL
);
-- PHOTO_URL Table
CREATE TABLE photo_url (
id BIGSERIAL PRIMARY KEY NOT NULL,
url VARCHAR(500) NOT NULL,
restaurant_id BIGINT REFERENCES restaurant(id) ON DELETE CASCADE NOT NULL,
created_at TIMESTAMP WITHOUT TIME ZONE DEFAULT current_timestamp NOT NULL,
updated_at TIMESTAMP WITHOUT TIME ZONE DEFAULT current_timestamp NOT NULL
);
-- SESSION Table
CREATE TABLE session (
token VARCHAR(255) PRIMARY KEY NOT NULL,
user_id BIGINT REFERENCES users(id) ON DELETE CASCADE NOT NULL,
created_at TIMESTAMP WITHOUT TIME ZONE DEFAULT current_timestamp NOT NULL,
updated_at TIMESTAMP WITHOUT TIME ZONE DEFAULT current_timestamp NOT NULL
);
CREATE UNIQUE INDEX index_session_on_token ON session USING BTREE (token);
-- LIKES table
CREATE TABLE likes (
id BIGSERIAL PRIMARY KEY NOT NULL,
restaurant_id BIGINT REFERENCES restaurant(id) ON DELETE CASCADE NOT NULL,
user_id BIGINT REFERENCES users(id) ON DELETE CASCADE NOT NULL
);
CREATE UNIQUE INDEX restaurant_id_user_id on likes (restaurant_id, user_id);
|
SELECT
EMPLOYEES.NAME, EMPLOYEE_PAN.UIN
FROM EMPLOYEES INNER JOIN EMPLOYEE_PAN
ON EMPLOYEES.ID = EMPLOYEE_PAN.ID;
SELECT
CONCAT(DEPARTMENTS.DEPT_NAME, " " ,COUNT(STUDENTS.STUDENT_ID))
FROM STUDENTS INNER JOIN DEPARTMENTS
ON STUDENTS.DEPT_ID = DEPARTMENTS.DEPT_ID
GROUP BY DEPARTMENTS.DEPT_ID
ORDER BY COUNT(STUDENTS.STUDENT_ID) DESC, DEPARTMENTS.DEPT_NAME ASC;
|
ALTER TABLE db_version CHANGE COLUMN required_2008_12_22_11_mangos_player_classlevelstats required_2008_12_22_12_mangos_player_levelstats bit;
DELETE FROM `player_levelstats`;
INSERT INTO `player_levelstats` VALUES
(1,1,1,23,20,22,20,20),
(1,1,2,24,21,23,20,20),
(1,1,3,26,22,24,20,21),
(1,1,4,27,22,26,20,21),
(1,1,5,28,23,27,20,21),
(1,1,6,30,24,28,20,21),
(1,1,7,31,25,29,21,22),
(1,1,8,32,26,30,21,22),
(1,1,9,34,26,32,21,22),
(1,1,10,35,27,33,21,23),
(1,1,11,36,28,34,21,23),
(1,1,12,38,29,35,21,23),
(1,1,13,39,30,37,21,24),
(1,1,14,41,31,38,21,24),
(1,1,15,42,32,39,21,24),
(1,1,16,44,33,41,21,25),
(1,1,17,45,34,42,22,25),
(1,1,18,47,34,43,22,25),
(1,1,19,48,35,45,22,26),
(1,1,20,50,36,46,22,26),
(1,1,21,51,37,48,22,26),
(1,1,22,53,38,49,22,27),
(1,1,23,54,39,51,22,27),
(1,1,24,56,40,52,23,28),
(1,1,25,58,41,53,23,28),
(1,1,26,59,42,55,23,28),
(1,1,27,61,43,56,23,29),
(1,1,28,63,44,58,23,29),
(1,1,29,64,45,59,23,30),
(1,1,30,66,46,61,24,30),
(1,1,31,68,47,62,24,30),
(1,1,32,69,48,64,24,31),
(1,1,33,71,50,66,24,31),
(1,1,34,73,51,67,24,32),
(1,1,35,74,52,69,24,32),
(1,1,36,76,53,70,25,33),
(1,1,37,78,54,72,25,33),
(1,1,38,80,55,74,25,34),
(1,1,39,82,56,75,25,34),
(1,1,40,83,57,77,25,35),
(1,1,41,85,58,79,26,35),
(1,1,42,87,60,80,26,35),
(1,1,43,89,61,82,26,36),
(1,1,44,91,62,84,26,36),
(1,1,45,93,63,85,26,37),
(1,1,46,95,64,87,27,37),
(1,1,47,97,66,89,27,38),
(1,1,48,99,67,91,27,38),
(1,1,49,101,68,93,27,39),
(1,1,50,103,69,94,28,40),
(1,1,51,105,71,96,28,40),
(1,1,52,107,72,98,28,41),
(1,1,53,109,73,100,28,41),
(1,1,54,111,74,102,29,42),
(1,1,55,113,76,103,29,42),
(1,1,56,115,77,105,29,43),
(1,1,57,117,78,107,29,43),
(1,1,58,119,79,109,30,44),
(1,1,59,121,81,111,30,44),
(1,1,60,123,82,113,30,45),
(1,1,61,125,83,115,30,46),
(1,1,62,127,85,117,31,46),
(1,1,63,129,86,119,31,47),
(1,1,64,132,88,121,31,47),
(1,1,65,134,89,123,32,48),
(1,1,66,136,90,125,32,49),
(1,1,67,138,92,127,32,49),
(1,1,68,140,93,129,32,50),
(1,1,69,143,95,131,33,50),
(1,1,70,145,96,133,33,51),
(1,1,71,148,97,140,33,53),
(1,1,72,156,99,143,33,54),
(1,1,73,162,101,148,33,55),
(1,1,74,162,102,148,34,55),
(1,1,75,165,104,150,34,56),
(1,1,76,171,106,156,34,57),
(1,1,77,171,108,157,35,58),
(1,1,78,174,109,159,35,58),
(1,1,79,181,111,165,35,59),
(1,1,80,184,113,168,36,60),
(1,2,1,22,20,22,20,21),
(1,2,2,23,21,23,21,22),
(1,2,3,24,21,24,21,22),
(1,2,4,25,22,25,22,23),
(1,2,5,26,22,26,23,24),
(1,2,6,28,23,27,23,25),
(1,2,7,29,24,28,24,25),
(1,2,8,30,24,29,25,26),
(1,2,9,31,25,30,25,27),
(1,2,10,32,25,32,26,27),
(1,2,11,33,26,33,27,28),
(1,2,12,35,27,34,27,29),
(1,2,13,36,27,35,28,30),
(1,2,14,37,28,36,29,31),
(1,2,15,38,29,37,30,31),
(1,2,16,40,29,38,30,32),
(1,2,17,41,30,40,31,33),
(1,2,18,42,31,41,32,34),
(1,2,19,43,31,42,33,35),
(1,2,20,45,32,43,33,35),
(1,2,21,46,33,45,34,36),
(1,2,22,47,33,46,35,37),
(1,2,23,49,34,47,36,38),
(1,2,24,50,35,48,37,39),
(1,2,25,51,36,50,37,40),
(1,2,26,53,36,51,38,41),
(1,2,27,54,37,52,39,42),
(1,2,28,56,38,54,40,43),
(1,2,29,57,39,55,41,43),
(1,2,30,58,39,56,42,44),
(1,2,31,60,40,58,43,45),
(1,2,32,61,41,59,43,46),
(1,2,33,63,42,60,44,47),
(1,2,34,64,43,62,45,48),
(1,2,35,66,44,63,46,49),
(1,2,36,67,44,65,47,50),
(1,2,37,69,45,66,48,51),
(1,2,38,70,46,67,49,52),
(1,2,39,72,47,69,50,53),
(1,2,40,73,48,70,51,54),
(1,2,41,75,49,72,52,55),
(1,2,42,77,49,73,53,56),
(1,2,43,78,50,75,54,57),
(1,2,44,80,51,76,55,58),
(1,2,45,81,52,78,56,59),
(1,2,46,83,53,79,57,61),
(1,2,47,85,54,81,58,62),
(1,2,48,86,55,83,59,63),
(1,2,49,88,56,84,60,64),
(1,2,50,90,57,86,61,65),
(1,2,51,91,58,87,62,66),
(1,2,52,93,59,89,63,67),
(1,2,53,95,60,91,64,68),
(1,2,54,97,61,92,65,69),
(1,2,55,98,61,94,66,71),
(1,2,56,100,62,95,67,72),
(1,2,57,102,63,97,68,73),
(1,2,58,104,64,99,69,74),
(1,2,59,105,65,101,70,75),
(1,2,60,107,66,102,71,77),
(1,2,61,109,67,104,73,78),
(1,2,62,111,69,106,74,79),
(1,2,63,113,70,107,75,80),
(1,2,64,115,71,109,76,81),
(1,2,65,116,72,111,77,83),
(1,2,66,118,73,113,78,84),
(1,2,67,120,74,115,79,85),
(1,2,68,122,75,116,81,86),
(1,2,69,124,76,118,82,88),
(1,2,70,126,77,120,83,89),
(1,2,71,148,78,122,84,92),
(1,2,72,150,79,125,86,94),
(1,2,73,152,80,127,87,96),
(1,2,74,156,82,129,89,97),
(1,2,75,158,83,131,90,99),
(1,2,76,162,84,134,92,100),
(1,2,77,164,86,136,93,103),
(1,2,78,167,87,138,95,105),
(1,2,79,170,88,153,96,106),
(1,2,80,173,90,160,98,108),
(1,4,1,21,23,21,20,20),
(1,4,2,22,24,22,20,20),
(1,4,3,23,26,22,20,21),
(1,4,4,23,27,23,20,21),
(1,4,5,24,29,24,21,21),
(1,4,6,25,30,25,21,22),
(1,4,7,26,32,25,21,22),
(1,4,8,26,33,26,21,23),
(1,4,9,27,35,27,21,23),
(1,4,10,28,36,27,21,23),
(1,4,11,29,38,28,22,24),
(1,4,12,30,39,29,22,24),
(1,4,13,31,41,30,22,25),
(1,4,14,31,43,31,22,25),
(1,4,15,32,44,31,22,25),
(1,4,16,33,46,32,23,26),
(1,4,17,34,48,33,23,26),
(1,4,18,35,49,34,23,27),
(1,4,19,36,51,35,23,27),
(1,4,20,37,53,35,23,28),
(1,4,21,38,54,36,24,28),
(1,4,22,39,56,37,24,29),
(1,4,23,40,58,38,24,29),
(1,4,24,41,60,39,24,30),
(1,4,25,42,61,40,25,30),
(1,4,26,43,63,41,25,31),
(1,4,27,44,65,42,25,31),
(1,4,28,45,67,43,25,32),
(1,4,29,46,69,43,25,32),
(1,4,30,47,71,44,26,33),
(1,4,31,48,72,45,26,33),
(1,4,32,49,74,46,26,34),
(1,4,33,50,76,47,27,34),
(1,4,34,51,78,48,27,35),
(1,4,35,52,80,49,27,35),
(1,4,36,53,82,50,27,36),
(1,4,37,54,84,51,28,36),
(1,4,38,55,86,52,28,37),
(1,4,39,56,88,53,28,38),
(1,4,40,57,90,54,28,38),
(1,4,41,58,92,55,29,39),
(1,4,42,60,94,56,29,39),
(1,4,43,61,96,57,29,40),
(1,4,44,62,98,58,30,40),
(1,4,45,63,100,59,30,41),
(1,4,46,64,103,61,30,42),
(1,4,47,65,105,62,31,42),
(1,4,48,66,107,63,31,43),
(1,4,49,68,109,64,31,44),
(1,4,50,69,111,65,32,44),
(1,4,51,70,113,66,32,45),
(1,4,52,71,116,67,32,45),
(1,4,53,73,118,68,33,46),
(1,4,54,74,120,69,33,47),
(1,4,55,75,122,71,33,47),
(1,4,56,76,125,72,34,48),
(1,4,57,78,127,73,34,49),
(1,4,58,79,129,74,34,49),
(1,4,59,80,131,75,35,50),
(1,4,60,81,134,77,35,51),
(1,4,61,83,136,78,35,51),
(1,4,62,84,138,79,36,52),
(1,4,63,85,141,80,36,53),
(1,4,64,87,143,81,37,54),
(1,4,65,88,146,83,37,54),
(1,4,66,89,148,84,37,55),
(1,4,67,91,151,85,38,56),
(1,4,68,92,153,86,38,57),
(1,4,69,94,156,88,39,57),
(1,4,70,95,158,89,39,58),
(1,4,71,97,161,90,39,60),
(1,4,72,99,164,92,40,60),
(1,4,73,100,167,94,40,61),
(1,4,74,102,170,95,41,62),
(1,4,75,104,173,97,41,63),
(1,4,76,105,176,98,41,64),
(1,4,77,107,179,100,42,65),
(1,4,78,109,183,106,42,66),
(1,4,79,111,186,107,43,67),
(1,4,80,113,189,109,43,69),
(1,5,1,20,20,20,22,23),
(1,5,2,20,20,20,23,24),
(1,5,3,20,20,21,25,26),
(1,5,4,20,21,21,26,27),
(1,5,5,21,21,21,27,28),
(1,5,6,21,21,22,29,30),
(1,5,7,21,21,22,30,31),
(1,5,8,21,22,23,31,33),
(1,5,9,21,22,23,33,34),
(1,5,10,21,22,23,34,36),
(1,5,11,22,22,24,36,37),
(1,5,12,22,23,24,37,39),
(1,5,13,22,23,25,38,40),
(1,5,14,22,23,25,40,42),
(1,5,15,22,23,25,41,43),
(1,5,16,23,24,26,43,45),
(1,5,17,23,24,26,44,46),
(1,5,18,23,24,27,46,48),
(1,5,19,23,24,27,47,49),
(1,5,20,23,25,28,49,51),
(1,5,21,24,25,28,51,53),
(1,5,22,24,25,29,52,54),
(1,5,23,24,26,29,54,56),
(1,5,24,24,26,30,55,58),
(1,5,25,25,26,30,57,59),
(1,5,26,25,27,31,59,61),
(1,5,27,25,27,31,60,63),
(1,5,28,25,27,32,62,65),
(1,5,29,25,28,32,64,66),
(1,5,30,26,28,33,65,68),
(1,5,31,26,28,33,67,70),
(1,5,32,26,29,34,69,72),
(1,5,33,27,29,34,70,73),
(1,5,34,27,29,35,72,75),
(1,5,35,27,30,35,74,77),
(1,5,36,27,30,36,76,79),
(1,5,37,28,30,36,78,81),
(1,5,38,28,31,37,79,83),
(1,5,39,28,31,38,81,85),
(1,5,40,28,31,38,83,87),
(1,5,41,29,32,39,85,88),
(1,5,42,29,32,39,87,90),
(1,5,43,29,33,40,89,92),
(1,5,44,30,33,40,91,94),
(1,5,45,30,33,41,92,96),
(1,5,46,30,34,42,94,98),
(1,5,47,31,34,42,96,100),
(1,5,48,31,35,43,98,102),
(1,5,49,31,35,44,100,104),
(1,5,50,32,36,44,102,106),
(1,5,51,32,36,45,104,109),
(1,5,52,32,36,45,106,111),
(1,5,53,33,37,46,108,113),
(1,5,54,33,37,47,110,115),
(1,5,55,33,38,47,112,117),
(1,5,56,34,38,48,114,119),
(1,5,57,34,39,49,117,121),
(1,5,58,34,39,49,119,124),
(1,5,59,35,40,50,121,126),
(1,5,60,35,40,51,123,128),
(1,5,61,35,41,51,125,130),
(1,5,62,36,41,52,127,132),
(1,5,63,36,41,53,129,135),
(1,5,64,37,42,54,132,137),
(1,5,65,37,42,54,134,139),
(1,5,66,37,43,55,136,142),
(1,5,67,38,43,56,138,144),
(1,5,68,38,44,57,140,146),
(1,5,69,39,44,57,143,149),
(1,5,70,39,45,58,145,151),
(1,5,71,39,46,59,148,158),
(1,5,72,40,46,59,151,161),
(1,5,73,40,47,60,154,164),
(1,5,74,41,47,61,156,167),
(1,5,75,41,48,62,159,170),
(1,5,76,41,49,63,162,174),
(1,5,77,42,49,64,165,177),
(1,5,78,42,50,65,168,180),
(1,5,79,43,50,66,171,183),
(1,5,80,43,51,67,174,186),
(1,6,1,23,20,22,20,20),
(1,6,2,24,21,23,20,20),
(1,6,3,26,22,24,20,21),
(1,6,4,27,22,26,20,21),
(1,6,5,28,23,27,20,21),
(1,6,6,30,24,28,20,21),
(1,6,7,31,25,29,21,22),
(1,6,8,32,26,30,21,22),
(1,6,9,34,26,32,21,22),
(1,6,10,35,27,33,21,23),
(1,6,11,36,28,34,21,23),
(1,6,12,38,29,35,21,23),
(1,6,13,39,30,37,21,24),
(1,6,14,41,31,38,21,24),
(1,6,15,42,32,39,21,24),
(1,6,16,44,33,41,21,25),
(1,6,17,45,34,42,22,25),
(1,6,18,47,34,43,22,25),
(1,6,19,48,35,45,22,26),
(1,6,20,50,36,46,22,26),
(1,6,21,51,37,48,22,26),
(1,6,22,53,38,49,22,27),
(1,6,23,54,39,51,22,27),
(1,6,24,56,40,52,23,28),
(1,6,25,58,41,53,23,28),
(1,6,26,59,42,55,23,28),
(1,6,27,61,43,56,23,29),
(1,6,28,63,44,58,23,29),
(1,6,29,64,45,59,23,30),
(1,6,30,66,46,61,24,30),
(1,6,31,68,47,62,24,30),
(1,6,32,69,48,64,24,31),
(1,6,33,71,50,66,24,31),
(1,6,34,73,51,67,24,32),
(1,6,35,74,52,69,24,32),
(1,6,36,76,53,70,25,33),
(1,6,37,78,54,72,25,33),
(1,6,38,80,55,74,25,34),
(1,6,39,82,56,75,25,34),
(1,6,40,83,57,77,25,35),
(1,6,41,85,58,79,26,35),
(1,6,42,87,60,80,26,35),
(1,6,43,89,61,82,26,36),
(1,6,44,91,62,84,26,36),
(1,6,45,93,63,85,26,37),
(1,6,46,95,64,87,27,37),
(1,6,47,97,66,89,27,38),
(1,6,48,99,67,91,27,38),
(1,6,49,101,68,93,27,39),
(1,6,50,103,69,94,28,40),
(1,6,51,105,71,96,28,40),
(1,6,52,106,72,97,28,41),
(1,6,53,107,72,98,28,41),
(1,6,54,107,73,98,29,42),
(1,6,55,108,73,99,29,43),
(1,6,56,111,75,102,29,44),
(1,6,57,113,76,104,29,44),
(1,6,58,118,77,106,30,45),
(1,6,59,118,79,108,30,45),
(1,6,60,123,80,110,30,46),
(1,6,61,125,81,112,30,47),
(1,6,62,128,83,114,30,47),
(1,6,63,130,84,117,31,48),
(1,6,64,130,86,119,31,48),
(1,6,65,140,87,128,31,49),
(1,6,66,143,89,131,31,50),
(1,6,67,146,90,133,32,50),
(1,6,68,148,92,135,32,51),
(1,6,69,151,93,138,32,52),
(1,6,70,154,95,140,32,52),
(1,6,71,162,97,144,33,53),
(1,6,72,164,98,146,33,54),
(1,6,73,165,100,148,33,55),
(1,6,74,166,102,151,33,55),
(1,6,75,169,103,154,34,56),
(1,6,76,172,105,157,34,57),
(1,6,77,175,107,157,34,58),
(1,6,78,176,108,157,34,58),
(1,6,79,177,110,157,35,59),
(1,6,80,180,112,160,35,60),
(1,8,1,20,20,20,23,22),
(1,8,2,20,20,20,24,23),
(1,8,3,20,20,21,26,25),
(1,8,4,20,20,21,27,26),
(1,8,5,20,21,21,28,27),
(1,8,6,20,21,21,30,29),
(1,8,7,21,21,22,31,30),
(1,8,8,21,21,22,33,31),
(1,8,9,21,21,22,34,33),
(1,8,10,21,21,23,36,34),
(1,8,11,21,22,23,37,36),
(1,8,12,21,22,23,39,37),
(1,8,13,21,22,24,40,38),
(1,8,14,21,22,24,42,40),
(1,8,15,21,22,24,43,41),
(1,8,16,21,23,25,45,43),
(1,8,17,22,23,25,46,44),
(1,8,18,22,23,25,48,46),
(1,8,19,22,23,26,49,47),
(1,8,20,22,23,26,51,49),
(1,8,21,22,24,26,53,51),
(1,8,22,22,24,27,54,52),
(1,8,23,22,24,27,56,54),
(1,8,24,23,24,28,58,55),
(1,8,25,23,25,28,59,57),
(1,8,26,23,25,28,61,59),
(1,8,27,23,25,29,63,60),
(1,8,28,23,25,29,65,62),
(1,8,29,23,25,30,66,64),
(1,8,30,24,26,30,68,65),
(1,8,31,24,26,30,70,67),
(1,8,32,24,26,31,72,69),
(1,8,33,24,27,31,73,70),
(1,8,34,24,27,32,75,72),
(1,8,35,24,27,32,77,74),
(1,8,36,25,27,33,79,76),
(1,8,37,25,28,33,81,78),
(1,8,38,25,28,34,83,79),
(1,8,39,25,28,34,85,81),
(1,8,40,25,28,35,87,83),
(1,8,41,26,29,35,88,85),
(1,8,42,26,29,35,90,87),
(1,8,43,26,29,36,92,89),
(1,8,44,26,30,36,94,91),
(1,8,45,26,30,37,96,92),
(1,8,46,27,30,37,98,94),
(1,8,47,27,31,38,100,96),
(1,8,48,27,31,38,102,98),
(1,8,49,27,31,39,104,100),
(1,8,50,28,32,40,106,102),
(1,8,51,28,32,40,109,104),
(1,8,52,28,32,41,111,106),
(1,8,53,28,33,41,113,108),
(1,8,54,29,33,42,115,110),
(1,8,55,29,33,42,117,112),
(1,8,56,29,34,43,119,114),
(1,8,57,29,34,43,121,117),
(1,8,58,30,34,44,124,119),
(1,8,59,30,35,44,126,121),
(1,8,60,30,35,45,128,123),
(1,8,61,30,35,46,130,125),
(1,8,62,31,36,46,132,127),
(1,8,63,31,36,47,135,129),
(1,8,64,31,37,47,137,132),
(1,8,65,32,37,48,139,134),
(1,8,66,32,37,49,142,136),
(1,8,67,32,38,49,144,138),
(1,8,68,32,38,50,146,140),
(1,8,69,33,39,50,149,143),
(1,8,70,33,39,51,151,145),
(1,8,71,33,39,52,154,152),
(1,8,72,33,40,53,160,155),
(1,8,73,33,40,54,160,158),
(1,8,74,34,41,54,163,160),
(1,8,75,34,41,55,166,163),
(1,8,76,34,41,56,169,166),
(1,8,77,35,42,57,172,169),
(1,8,78,35,42,57,175,173),
(1,8,79,35,43,58,178,176),
(1,8,80,36,43,59,181,179),
(1,9,1,20,20,21,22,22),
(1,9,2,20,20,22,23,23),
(1,9,3,21,21,22,24,24),
(1,9,4,21,21,23,26,25),
(1,9,5,21,21,23,27,27),
(1,9,6,21,22,24,28,28),
(1,9,7,22,22,24,29,29),
(1,9,8,22,23,25,30,30),
(1,9,9,22,23,26,32,31),
(1,9,10,23,23,26,33,33),
(1,9,11,23,24,27,34,34),
(1,9,12,23,24,27,35,35),
(1,9,13,24,25,28,37,36),
(1,9,14,24,25,29,38,38),
(1,9,15,24,25,29,39,39),
(1,9,16,25,26,30,41,40),
(1,9,17,25,26,31,42,42),
(1,9,18,25,27,31,43,43),
(1,9,19,26,27,32,45,44),
(1,9,20,26,28,33,46,46),
(1,9,21,26,28,33,48,47),
(1,9,22,27,29,34,49,49),
(1,9,23,27,29,35,51,50),
(1,9,24,28,30,35,52,51),
(1,9,25,28,30,36,53,53),
(1,9,26,28,31,37,55,54),
(1,9,27,29,31,37,56,56),
(1,9,28,29,32,38,58,57),
(1,9,29,30,32,39,59,59),
(1,9,30,30,33,40,61,60),
(1,9,31,30,33,40,62,62),
(1,9,32,31,34,41,64,63),
(1,9,33,31,34,42,66,65),
(1,9,34,32,35,43,67,66),
(1,9,35,32,35,44,69,68),
(1,9,36,33,36,44,70,69),
(1,9,37,33,36,45,72,71),
(1,9,38,34,37,46,74,73),
(1,9,39,34,38,47,75,74),
(1,9,40,35,38,48,77,76),
(1,9,41,35,39,48,79,78),
(1,9,42,35,39,49,80,79),
(1,9,43,36,40,50,82,81),
(1,9,44,36,40,51,84,83),
(1,9,45,37,41,52,85,84),
(1,9,46,37,42,53,87,86),
(1,9,47,38,42,54,89,88),
(1,9,48,38,43,55,91,89),
(1,9,49,39,44,55,93,91),
(1,9,50,40,44,56,94,93),
(1,9,51,40,45,57,96,95),
(1,9,52,41,45,58,98,97),
(1,9,53,41,46,59,100,98),
(1,9,54,42,47,60,102,100),
(1,9,55,42,47,61,103,102),
(1,9,56,43,48,62,105,104),
(1,9,57,43,49,63,107,106),
(1,9,58,44,49,64,109,108),
(1,9,59,44,50,65,111,109),
(1,9,60,45,51,66,113,111),
(1,9,61,46,51,67,115,113),
(1,9,62,46,52,68,117,115),
(1,9,63,47,53,69,119,117),
(1,9,64,47,54,70,121,119),
(1,9,65,48,54,71,123,121),
(1,9,66,49,55,72,125,123),
(1,9,67,49,56,73,127,125),
(1,9,68,50,57,74,129,127),
(1,9,69,50,57,75,131,129),
(1,9,70,51,58,76,133,131),
(1,9,71,52,59,78,135,146),
(1,9,72,53,59,79,138,148),
(1,9,73,54,60,80,140,151),
(1,9,74,54,61,89,143,154),
(1,9,75,55,62,91,145,156),
(1,9,76,56,63,92,148,159),
(1,9,77,57,64,93,151,162),
(1,9,78,57,65,95,153,165),
(1,9,79,58,66,96,156,168),
(1,9,80,59,67,97,159,170),
(2,1,1,26,17,24,17,23),
(2,1,2,27,18,25,17,23),
(2,1,3,29,19,26,17,24),
(2,1,4,30,19,27,17,24),
(2,1,5,31,20,29,17,24),
(2,1,6,32,21,30,17,24),
(2,1,7,34,22,31,18,25),
(2,1,8,35,23,32,18,25),
(2,1,9,37,24,34,18,25),
(2,1,10,38,24,35,18,26),
(2,1,11,39,25,36,18,26),
(2,1,12,41,26,37,18,26),
(2,1,13,42,27,39,18,27),
(2,1,14,44,28,40,18,27),
(2,1,15,45,29,41,18,27),
(2,1,16,47,30,43,19,28),
(2,1,17,48,31,44,19,28),
(2,1,18,50,32,45,19,28),
(2,1,19,51,33,47,19,29),
(2,1,20,53,34,48,19,29),
(2,1,21,54,34,50,19,29),
(2,1,22,56,35,51,19,30),
(2,1,23,57,36,52,20,30),
(2,1,24,59,37,54,20,30),
(2,1,25,60,38,55,20,31),
(2,1,26,62,39,57,20,31),
(2,1,27,64,40,58,20,32),
(2,1,28,65,41,60,20,32),
(2,1,29,67,43,61,21,32),
(2,1,30,69,44,63,21,33),
(2,1,31,70,45,64,21,33),
(2,1,32,72,46,66,21,34),
(2,1,33,74,47,67,21,34),
(2,1,34,76,48,69,21,35),
(2,1,35,77,49,71,22,35),
(2,1,36,79,50,72,22,36),
(2,1,37,81,51,74,22,36),
(2,1,38,83,52,76,22,36),
(2,1,39,84,53,77,22,37),
(2,1,40,86,55,79,23,37),
(2,1,41,88,56,81,23,38),
(2,1,42,90,57,82,23,38),
(2,1,43,92,58,84,23,39),
(2,1,44,94,59,86,23,39),
(2,1,45,96,60,87,24,40),
(2,1,46,98,62,89,24,40),
(2,1,47,100,63,91,24,41),
(2,1,48,101,64,93,24,41),
(2,1,49,103,65,94,25,42),
(2,1,50,105,66,96,25,42),
(2,1,51,107,68,98,25,43),
(2,1,52,109,69,100,25,43),
(2,1,53,111,70,102,25,44),
(2,1,54,113,71,104,26,45),
(2,1,55,115,73,105,26,45),
(2,1,56,118,74,107,26,46),
(2,1,57,120,75,109,26,46),
(2,1,58,122,77,111,27,47),
(2,1,59,124,78,113,27,47),
(2,1,60,126,79,115,27,48),
(2,1,61,128,81,117,27,48),
(2,1,62,130,82,119,28,49),
(2,1,63,132,83,121,28,50),
(2,1,64,135,85,123,28,50),
(2,1,65,137,86,125,29,51),
(2,1,66,139,87,127,29,52),
(2,1,67,141,89,129,29,52),
(2,1,68,143,90,131,29,53),
(2,1,69,146,92,133,30,53),
(2,1,70,148,93,135,30,54),
(2,1,71,157,94,142,30,55),
(2,1,72,162,96,148,30,56),
(2,1,73,165,98,150,30,57),
(2,1,74,168,99,153,31,57),
(2,1,75,170,101,154,31,58),
(2,1,76,172,103,156,31,59),
(2,1,77,174,105,159,32,60),
(2,1,78,179,106,162,32,60),
(2,1,79,184,108,167,32,61),
(2,1,80,187,110,170,33,62),
(2,3,1,23,20,23,17,24),
(2,3,2,23,21,24,18,25),
(2,3,3,24,23,25,18,25),
(2,3,4,24,24,26,19,26),
(2,3,5,25,25,27,19,26),
(2,3,6,25,27,28,20,27),
(2,3,7,26,28,28,21,28),
(2,3,8,26,30,29,21,28),
(2,3,9,26,31,30,22,29),
(2,3,10,27,33,31,22,30),
(2,3,11,27,34,32,23,30),
(2,3,12,28,36,33,24,31),
(2,3,13,28,37,34,24,32),
(2,3,14,29,39,35,25,33),
(2,3,15,29,40,36,26,33),
(2,3,16,30,42,37,26,34),
(2,3,17,30,43,39,27,35),
(2,3,18,31,45,40,28,35),
(2,3,19,31,47,41,28,36),
(2,3,20,32,48,42,29,37),
(2,3,21,32,50,43,30,38),
(2,3,22,33,51,44,31,39),
(2,3,23,34,53,45,31,39),
(2,3,24,34,55,46,32,40),
(2,3,25,35,57,47,33,41),
(2,3,26,35,58,48,34,42),
(2,3,27,36,60,50,34,43),
(2,3,28,36,62,51,35,43),
(2,3,29,37,63,52,36,44),
(2,3,30,38,65,53,37,45),
(2,3,31,38,67,54,37,46),
(2,3,32,39,69,56,38,47),
(2,3,33,39,71,57,39,48),
(2,3,34,40,72,58,40,49),
(2,3,35,41,74,59,41,49),
(2,3,36,41,76,61,42,50),
(2,3,37,42,78,62,42,51),
(2,3,38,43,80,63,43,52),
(2,3,39,43,82,64,44,53),
(2,3,40,44,84,66,45,54),
(2,3,41,45,86,67,46,55),
(2,3,42,45,88,68,47,56),
(2,3,43,46,90,70,47,57),
(2,3,44,47,91,71,48,58),
(2,3,45,47,93,72,49,59),
(2,3,46,48,95,74,50,60),
(2,3,47,49,98,75,51,61),
(2,3,48,50,100,77,52,62),
(2,3,49,50,102,78,53,63),
(2,3,50,51,104,79,54,64),
(2,3,51,52,106,81,55,65),
(2,3,52,52,108,82,56,66),
(2,3,53,53,110,84,57,67),
(2,3,54,54,112,85,58,68),
(2,3,55,55,114,87,59,69),
(2,3,56,55,116,88,60,70),
(2,3,57,56,118,90,61,71),
(2,3,58,57,121,91,62,72),
(2,3,59,58,123,93,63,73),
(2,3,60,59,125,94,64,74),
(2,3,61,59,127,96,65,76),
(2,3,62,60,130,97,66,77),
(2,3,63,61,132,99,67,78),
(2,3,64,62,134,100,68,79),
(2,3,65,63,136,102,69,80),
(2,3,66,64,139,104,70,81),
(2,3,67,64,141,105,71,82),
(2,3,68,65,143,107,72,84),
(2,3,69,66,146,108,73,85),
(2,3,70,67,148,110,74,86),
(2,3,71,68,151,112,75,87),
(2,3,72,69,154,114,76,88),
(2,3,73,70,157,116,77,90),
(2,3,74,71,160,118,79,91),
(2,3,75,72,163,120,80,93),
(2,3,76,73,166,122,81,94),
(2,3,77,74,169,124,83,96),
(2,3,78,75,172,126,84,97),
(2,3,79,76,175,128,85,99),
(2,3,80,77,178,130,87,100),
(2,4,1,24,20,23,17,23),
(2,4,2,25,21,24,17,23),
(2,4,3,25,23,24,17,24),
(2,4,4,26,24,25,17,24),
(2,4,5,27,26,26,18,24),
(2,4,6,28,27,26,18,25),
(2,4,7,29,29,27,18,25),
(2,4,8,29,30,28,18,26),
(2,4,9,30,32,29,18,26),
(2,4,10,31,33,29,19,26),
(2,4,11,32,35,30,19,27),
(2,4,12,33,37,31,19,27),
(2,4,13,34,38,32,19,28),
(2,4,14,34,40,32,19,28),
(2,4,15,35,41,33,19,28),
(2,4,16,36,43,34,20,29),
(2,4,17,37,45,35,20,29),
(2,4,18,38,46,36,20,30),
(2,4,19,39,48,37,20,30),
(2,4,20,40,50,37,21,31),
(2,4,21,41,52,38,21,31),
(2,4,22,42,53,39,21,31),
(2,4,23,43,55,40,21,32),
(2,4,24,43,57,41,21,32),
(2,4,25,44,59,42,22,33),
(2,4,26,45,60,43,22,33),
(2,4,27,46,62,44,22,34),
(2,4,28,47,64,44,22,34),
(2,4,29,48,66,45,23,35),
(2,4,30,49,68,46,23,35),
(2,4,31,50,70,47,23,36),
(2,4,32,51,72,48,23,36),
(2,4,33,53,73,49,24,37),
(2,4,34,54,75,50,24,38),
(2,4,35,55,77,51,24,38),
(2,4,36,56,79,52,24,39),
(2,4,37,57,81,53,25,39),
(2,4,38,58,83,54,25,40),
(2,4,39,59,85,55,25,40),
(2,4,40,60,87,56,26,41),
(2,4,41,61,89,57,26,41),
(2,4,42,62,91,58,26,42),
(2,4,43,63,93,59,27,43),
(2,4,44,65,95,60,27,43),
(2,4,45,66,98,61,27,44),
(2,4,46,67,100,62,27,44),
(2,4,47,68,102,64,28,45),
(2,4,48,69,104,65,28,46),
(2,4,49,71,106,66,28,46),
(2,4,50,72,108,67,29,47),
(2,4,51,73,110,68,29,48),
(2,4,52,74,113,69,29,48),
(2,4,53,75,115,70,30,49),
(2,4,54,77,117,71,30,50),
(2,4,55,78,119,73,30,50),
(2,4,56,79,122,74,31,51),
(2,4,57,80,124,75,31,52),
(2,4,58,82,126,76,31,52),
(2,4,59,83,129,77,32,53),
(2,4,60,84,131,78,32,54),
(2,4,61,86,133,80,33,54),
(2,4,62,87,136,81,33,55),
(2,4,63,88,138,82,33,56),
(2,4,64,90,140,83,34,57),
(2,4,65,91,143,85,34,57),
(2,4,66,92,145,86,34,58),
(2,4,67,94,148,87,35,59),
(2,4,68,95,150,88,35,59),
(2,4,69,97,153,90,36,60),
(2,4,70,98,155,91,36,61),
(2,4,71,100,158,92,36,62),
(2,4,72,102,161,94,37,62),
(2,4,73,103,164,99,37,63),
(2,4,74,105,167,100,38,64),
(2,4,75,107,170,102,38,65),
(2,4,76,108,173,102,38,66),
(2,4,77,110,176,102,39,67),
(2,4,78,112,180,103,39,68),
(2,4,79,114,183,105,40,69),
(2,4,80,116,186,107,40,70),
(2,6,1,26,17,24,17,23),
(2,6,2,27,18,25,17,23),
(2,6,3,29,19,26,17,24),
(2,6,4,30,19,27,17,24),
(2,6,5,31,20,29,17,24),
(2,6,6,32,21,30,17,24),
(2,6,7,34,22,31,18,25),
(2,6,8,35,23,32,18,25),
(2,6,9,37,24,34,18,25),
(2,6,10,38,24,35,18,26),
(2,6,11,39,25,36,18,26),
(2,6,12,41,26,37,18,26),
(2,6,13,42,27,39,18,27),
(2,6,14,44,28,40,18,27),
(2,6,15,45,29,41,18,27),
(2,6,16,47,30,43,19,28),
(2,6,17,48,31,44,19,28),
(2,6,18,50,32,45,19,28),
(2,6,19,51,33,47,19,29),
(2,6,20,53,34,48,19,29),
(2,6,21,54,34,50,19,29),
(2,6,22,56,35,51,19,30),
(2,6,23,57,36,52,20,30),
(2,6,24,59,37,54,20,30),
(2,6,25,60,38,55,20,31),
(2,6,26,62,39,57,20,31),
(2,6,27,64,40,58,20,32),
(2,6,28,65,41,60,20,32),
(2,6,29,67,43,61,21,32),
(2,6,30,69,44,63,21,33),
(2,6,31,70,45,64,21,33),
(2,6,32,72,46,66,21,34),
(2,6,33,74,47,67,21,34),
(2,6,34,76,48,69,21,35),
(2,6,35,77,49,71,22,35),
(2,6,36,79,50,72,22,36),
(2,6,37,81,51,74,22,36),
(2,6,38,83,52,76,22,36),
(2,6,39,84,53,77,22,37),
(2,6,40,86,55,79,23,37),
(2,6,41,88,56,81,23,38),
(2,6,42,90,57,82,23,38),
(2,6,43,92,58,84,23,39),
(2,6,44,94,59,86,23,39),
(2,6,45,96,60,87,24,40),
(2,6,46,98,62,89,24,40),
(2,6,47,100,63,91,24,41),
(2,6,48,101,64,93,24,41),
(2,6,49,103,65,94,25,42),
(2,6,50,105,66,96,25,42),
(2,6,51,107,68,98,25,43),
(2,6,52,109,69,100,25,43),
(2,6,53,110,69,100,25,44),
(2,6,54,111,70,101,26,45),
(2,6,55,111,70,101,26,45),
(2,6,56,114,72,104,26,46),
(2,6,57,116,73,106,26,46),
(2,6,58,118,74,108,27,47),
(2,6,59,124,76,110,27,47),
(2,6,60,126,77,112,27,48),
(2,6,61,128,78,114,27,49),
(2,6,62,131,80,116,27,49),
(2,6,63,133,81,119,28,50),
(2,6,64,136,83,121,28,50),
(2,6,65,136,84,123,28,51),
(2,6,66,142,86,126,28,52),
(2,6,67,145,87,128,29,52),
(2,6,68,147,89,130,29,53),
(2,6,69,150,90,133,29,54),
(2,6,70,157,92,135,29,54),
(2,6,71,160,94,138,30,55),
(2,6,72,163,95,140,30,56),
(2,6,73,166,97,151,30,57),
(2,6,74,169,99,154,30,57),
(2,6,75,172,100,156,31,58),
(2,6,76,175,102,160,31,59),
(2,6,77,179,104,162,31,60),
(2,6,78,182,105,165,31,60),
(2,6,79,191,107,168,32,61),
(2,6,80,194,109,171,32,62),
(2,7,1,24,17,23,18,25),
(2,7,2,25,17,24,19,26),
(2,7,3,26,18,25,20,27),
(2,7,4,26,18,26,21,28),
(2,7,5,27,19,27,22,29),
(2,7,6,28,19,28,23,30),
(2,7,7,29,20,29,24,31),
(2,7,8,30,20,30,25,32),
(2,7,9,31,21,31,26,33),
(2,7,10,32,21,32,27,34),
(2,7,11,33,22,33,28,36),
(2,7,12,34,22,34,29,37),
(2,7,13,34,23,35,30,38),
(2,7,14,35,23,36,31,39),
(2,7,15,36,24,37,32,40),
(2,7,16,37,24,39,33,41),
(2,7,17,38,25,40,34,43),
(2,7,18,39,25,41,35,44),
(2,7,19,40,26,42,36,45),
(2,7,20,41,26,43,37,46),
(2,7,21,42,27,44,38,47),
(2,7,22,43,27,45,39,49),
(2,7,23,44,28,47,40,50),
(2,7,24,45,28,48,41,51),
(2,7,25,47,29,49,43,52),
(2,7,26,48,30,50,44,54),
(2,7,27,49,30,52,45,55),
(2,7,28,50,31,53,46,56),
(2,7,29,51,31,54,47,58),
(2,7,30,52,32,55,48,59),
(2,7,31,53,33,57,50,60),
(2,7,32,54,33,58,51,62),
(2,7,33,55,34,59,52,63),
(2,7,34,57,34,61,53,65),
(2,7,35,58,35,62,55,66),
(2,7,36,59,36,63,56,67),
(2,7,37,60,36,65,57,69),
(2,7,38,61,37,66,58,70),
(2,7,39,62,38,67,60,72),
(2,7,40,64,38,69,61,73),
(2,7,41,65,39,70,62,75),
(2,7,42,66,40,72,64,76),
(2,7,43,67,40,73,65,78),
(2,7,44,69,41,74,66,79),
(2,7,45,70,42,76,68,81),
(2,7,46,71,42,77,69,82),
(2,7,47,72,43,79,70,84),
(2,7,48,74,44,80,72,85),
(2,7,49,75,45,82,73,87),
(2,7,50,76,45,83,75,89),
(2,7,51,78,46,85,76,90),
(2,7,52,79,47,86,77,92),
(2,7,53,80,47,88,79,93),
(2,7,54,82,48,90,80,95),
(2,7,55,83,49,91,82,97),
(2,7,56,85,50,93,83,98),
(2,7,57,86,50,94,85,100),
(2,7,58,87,51,96,86,102),
(2,7,59,89,52,97,88,103),
(2,7,60,90,53,99,89,105),
(2,7,61,92,54,101,91,107),
(2,7,62,93,54,102,92,109),
(2,7,63,95,55,104,94,110),
(2,7,64,96,56,106,95,112),
(2,7,65,97,57,107,97,114),
(2,7,66,99,58,109,99,116),
(2,7,67,100,58,111,100,118),
(2,7,68,102,59,113,102,119),
(2,7,69,103,60,114,103,121),
(2,7,70,105,61,116,105,123),
(2,7,71,106,62,118,117,125),
(2,7,72,108,63,120,119,128),
(2,7,73,110,64,122,122,130),
(2,7,74,112,65,125,124,132),
(2,7,75,114,66,127,126,134),
(2,7,76,116,67,129,128,137),
(2,7,77,117,68,131,128,139),
(2,7,78,119,69,133,133,141),
(2,7,79,121,70,136,135,144),
(2,7,80,123,71,138,137,146),
(2,9,1,23,17,23,19,25),
(2,9,2,23,17,24,20,26),
(2,9,3,24,18,24,21,27),
(2,9,4,24,18,25,23,28),
(2,9,5,24,18,25,24,30),
(2,9,6,24,19,26,25,31),
(2,9,7,25,19,26,26,32),
(2,9,8,25,20,27,27,33),
(2,9,9,25,20,27,29,34),
(2,9,10,26,20,28,30,36),
(2,9,11,26,21,29,31,37),
(2,9,12,26,21,29,33,38),
(2,9,13,27,22,30,34,39),
(2,9,14,27,22,31,35,41),
(2,9,15,27,23,31,37,42),
(2,9,16,28,23,32,38,43),
(2,9,17,28,23,32,39,45),
(2,9,18,28,24,33,41,46),
(2,9,19,29,24,34,42,47),
(2,9,20,29,25,34,43,49),
(2,9,21,29,25,35,45,50),
(2,9,22,30,26,36,46,51),
(2,9,23,30,26,37,48,53),
(2,9,24,30,27,37,49,54),
(2,9,25,31,27,38,51,56),
(2,9,26,31,28,39,52,57),
(2,9,27,32,28,39,54,59),
(2,9,28,32,29,40,55,60),
(2,9,29,32,29,41,57,62),
(2,9,30,33,30,42,58,63),
(2,9,31,33,30,42,60,65),
(2,9,32,34,31,43,61,66),
(2,9,33,34,31,44,63,68),
(2,9,34,35,32,45,64,69),
(2,9,35,35,32,45,66,71),
(2,9,36,36,33,46,68,72),
(2,9,37,36,34,47,69,74),
(2,9,38,36,34,48,71,76),
(2,9,39,37,35,49,72,77),
(2,9,40,37,35,50,74,79),
(2,9,41,38,36,50,76,80),
(2,9,42,38,36,51,77,82),
(2,9,43,39,37,52,79,84),
(2,9,44,39,38,53,81,85),
(2,9,45,40,38,54,83,87),
(2,9,46,40,39,55,84,89),
(2,9,47,41,39,56,86,91),
(2,9,48,41,40,56,88,92),
(2,9,49,42,41,57,90,94),
(2,9,50,42,41,58,91,96),
(2,9,51,43,42,59,93,98),
(2,9,52,43,43,60,95,99),
(2,9,53,44,43,61,97,101),
(2,9,54,45,44,62,99,103),
(2,9,55,45,45,63,101,105),
(2,9,56,46,45,64,102,107),
(2,9,57,46,46,65,104,109),
(2,9,58,47,47,66,106,110),
(2,9,59,47,47,67,108,112),
(2,9,60,48,48,68,110,114),
(2,9,61,48,49,69,112,116),
(2,9,62,49,49,70,114,118),
(2,9,63,50,50,71,116,120),
(2,9,64,50,51,72,118,122),
(2,9,65,51,51,73,120,124),
(2,9,66,52,52,74,122,126),
(2,9,67,52,53,75,124,128),
(2,9,68,53,54,76,126,130),
(2,9,69,53,54,77,128,132),
(2,9,70,54,55,78,130,134),
(2,9,71,55,56,88,134,145),
(2,9,72,56,56,89,135,147),
(2,9,73,57,57,90,137,150),
(2,9,74,57,58,91,142,153),
(2,9,75,58,59,93,142,155),
(2,9,76,59,60,94,145,158),
(2,9,77,60,61,95,148,161),
(2,9,78,60,62,97,150,164),
(2,9,79,61,63,98,153,167),
(2,9,80,62,64,99,156,169),
(3,1,1,25,16,25,19,19),
(3,1,2,26,17,26,19,19),
(3,1,3,28,18,27,19,20),
(3,1,4,29,18,28,19,20),
(3,1,5,30,19,30,19,20),
(3,1,6,31,20,31,19,20),
(3,1,7,33,21,32,20,21),
(3,1,8,34,22,33,20,21),
(3,1,9,36,23,35,20,21),
(3,1,10,37,23,36,20,22),
(3,1,11,38,24,37,20,22),
(3,1,12,40,25,38,20,22),
(3,1,13,41,26,40,20,23),
(3,1,14,43,27,41,20,23),
(3,1,15,44,28,42,20,23),
(3,1,16,46,29,44,21,24),
(3,1,17,47,30,45,21,24),
(3,1,18,49,31,46,21,24),
(3,1,19,50,32,48,21,25),
(3,1,20,52,33,49,21,25),
(3,1,21,53,34,51,21,26),
(3,1,22,55,34,52,21,26),
(3,1,23,56,35,53,21,26),
(3,1,24,58,36,55,22,27),
(3,1,25,59,37,56,22,27),
(3,1,26,61,38,58,22,27),
(3,1,27,63,39,59,22,28),
(3,1,28,64,41,61,22,28),
(3,1,29,66,42,62,22,29),
(3,1,30,68,43,64,23,29),
(3,1,31,69,44,65,23,30),
(3,1,32,71,45,67,23,30),
(3,1,33,73,46,68,23,30),
(3,1,34,75,47,70,23,31),
(3,1,35,76,48,72,24,31),
(3,1,36,78,49,73,24,32),
(3,1,37,80,50,75,24,32),
(3,1,38,82,51,76,24,33),
(3,1,39,84,52,78,24,33),
(3,1,40,85,54,80,24,34),
(3,1,41,87,55,81,25,34),
(3,1,42,89,56,83,25,35),
(3,1,43,91,57,85,25,35),
(3,1,44,93,58,87,25,36),
(3,1,45,95,59,88,26,36),
(3,1,46,97,61,90,26,37),
(3,1,47,99,62,92,26,37),
(3,1,48,101,63,94,26,38),
(3,1,49,102,64,95,26,38),
(3,1,50,104,65,97,27,39),
(3,1,51,106,67,99,27,39),
(3,1,52,108,68,101,27,40),
(3,1,53,110,69,103,27,40),
(3,1,54,112,70,104,28,41),
(3,1,55,115,72,106,28,41),
(3,1,56,117,73,108,28,42),
(3,1,57,119,74,110,28,42),
(3,1,58,121,76,112,29,43),
(3,1,59,123,77,114,29,43),
(3,1,60,125,78,116,29,44),
(3,1,61,127,80,118,29,45),
(3,1,62,129,81,120,30,45),
(3,1,63,131,82,122,30,46),
(3,1,64,134,84,124,30,46),
(3,1,65,136,85,126,31,47),
(3,1,66,138,86,128,31,48),
(3,1,67,140,88,130,31,48),
(3,1,68,142,89,132,31,49),
(3,1,69,145,91,134,32,49),
(3,1,70,147,92,136,32,50),
(3,1,71,150,93,138,32,51),
(3,1,72,152,95,141,32,52),
(3,1,73,164,97,151,32,53),
(3,1,74,164,98,151,33,53),
(3,1,75,170,100,156,33,54),
(3,1,76,173,102,160,33,55),
(3,1,77,173,104,160,34,56),
(3,1,78,176,105,162,34,56),
(3,1,79,183,107,168,34,57),
(3,1,80,186,109,171,35,58),
(3,2,1,24,16,25,19,20),
(3,2,2,25,17,26,20,21),
(3,2,3,26,17,27,20,21),
(3,2,4,27,18,28,21,22),
(3,2,5,28,18,29,22,23),
(3,2,6,29,19,30,22,24),
(3,2,7,31,20,31,23,24),
(3,2,8,32,20,32,24,25),
(3,2,9,33,21,33,24,26),
(3,2,10,34,21,34,25,26),
(3,2,11,35,22,36,26,27),
(3,2,12,36,23,37,26,28),
(3,2,13,38,23,38,27,29),
(3,2,14,39,24,39,28,30),
(3,2,15,40,25,40,29,30),
(3,2,16,41,25,41,29,31),
(3,2,17,43,26,43,30,32),
(3,2,18,44,27,44,31,33),
(3,2,19,45,28,45,32,34),
(3,2,20,47,28,46,32,35),
(3,2,21,48,29,47,33,35),
(3,2,22,49,30,49,34,36),
(3,2,23,51,30,50,35,37),
(3,2,24,52,31,51,36,38),
(3,2,25,53,32,52,36,39),
(3,2,26,55,33,54,37,40),
(3,2,27,56,33,55,38,41),
(3,2,28,57,34,56,39,42),
(3,2,29,59,35,58,40,43),
(3,2,30,60,36,59,41,43),
(3,2,31,62,37,60,42,44),
(3,2,32,63,37,62,42,45),
(3,2,33,65,38,63,43,46),
(3,2,34,66,39,65,44,47),
(3,2,35,68,40,66,45,48),
(3,2,36,69,41,67,46,49),
(3,2,37,71,41,69,47,50),
(3,2,38,72,42,70,48,51),
(3,2,39,74,43,72,49,52),
(3,2,40,75,44,73,50,53),
(3,2,41,77,45,75,51,54),
(3,2,42,78,46,76,52,55),
(3,2,43,80,47,78,53,56),
(3,2,44,82,47,79,54,57),
(3,2,45,83,48,81,55,59),
(3,2,46,85,49,82,56,60),
(3,2,47,87,50,84,57,61),
(3,2,48,88,51,85,58,62),
(3,2,49,90,52,87,59,63),
(3,2,50,92,53,89,60,64),
(3,2,51,93,54,90,61,65),
(3,2,52,95,55,92,62,66),
(3,2,53,97,56,93,63,67),
(3,2,54,98,57,95,64,69),
(3,2,55,100,58,97,65,70),
(3,2,56,102,59,98,66,71),
(3,2,57,104,60,100,67,72),
(3,2,58,106,61,102,68,73),
(3,2,59,107,62,103,69,74),
(3,2,60,109,63,105,70,76),
(3,2,61,111,64,107,72,77),
(3,2,62,113,65,109,73,78),
(3,2,63,115,66,110,74,79),
(3,2,64,117,67,112,75,80),
(3,2,65,118,68,114,76,82),
(3,2,66,120,69,116,77,83),
(3,2,67,122,70,118,78,84),
(3,2,68,124,71,119,80,85),
(3,2,69,126,72,121,81,87),
(3,2,70,128,73,123,82,88),
(3,2,71,150,74,125,83,89),
(3,2,72,152,75,128,85,91),
(3,2,73,156,76,130,86,93),
(3,2,74,158,78,132,88,94),
(3,2,75,161,79,134,89,96),
(3,2,76,164,80,137,91,97),
(3,2,77,166,82,139,92,99),
(3,2,78,170,83,141,94,101),
(3,2,79,172,84,144,95,102),
(3,2,80,175,86,146,97,104),
(3,3,1,22,19,24,19,20),
(3,3,2,22,20,25,20,21),
(3,3,3,23,22,26,20,21),
(3,3,4,23,23,27,21,22),
(3,3,5,24,25,28,21,23),
(3,3,6,24,26,29,22,23),
(3,3,7,25,27,29,23,24),
(3,3,8,25,29,30,23,25),
(3,3,9,25,30,31,24,25),
(3,3,10,26,32,32,24,26),
(3,3,11,26,33,33,25,27),
(3,3,12,27,35,34,26,27),
(3,3,13,27,36,35,26,28),
(3,3,14,28,38,36,27,29),
(3,3,15,28,39,37,28,29),
(3,3,16,29,41,38,28,30),
(3,3,17,29,42,39,29,31),
(3,3,18,30,44,41,30,32),
(3,3,19,30,46,42,30,32),
(3,3,20,31,47,43,31,33),
(3,3,21,32,49,44,32,34),
(3,3,22,32,51,45,33,35),
(3,3,23,33,52,46,33,36),
(3,3,24,33,54,47,34,36),
(3,3,25,34,56,48,35,37),
(3,3,26,34,57,49,35,38),
(3,3,27,35,59,51,36,39),
(3,3,28,35,61,52,37,40),
(3,3,29,36,63,53,38,40),
(3,3,30,37,64,54,39,41),
(3,3,31,37,66,55,39,42),
(3,3,32,38,68,57,40,43),
(3,3,33,38,70,58,41,44),
(3,3,34,39,71,59,42,45),
(3,3,35,40,73,60,43,46),
(3,3,36,40,75,62,43,47),
(3,3,37,41,77,63,44,47),
(3,3,38,42,79,64,45,48),
(3,3,39,42,81,65,46,49),
(3,3,40,43,83,67,47,50),
(3,3,41,44,85,68,48,51),
(3,3,42,44,87,69,49,52),
(3,3,43,45,89,71,49,53),
(3,3,44,46,91,72,50,54),
(3,3,45,46,93,73,51,55),
(3,3,46,47,95,75,52,56),
(3,3,47,48,97,76,53,57),
(3,3,48,49,99,78,54,58),
(3,3,49,49,101,79,55,59),
(3,3,50,50,103,80,56,60),
(3,3,51,51,105,82,57,61),
(3,3,52,51,107,83,58,62),
(3,3,53,52,109,85,59,63),
(3,3,54,53,111,86,60,64),
(3,3,55,54,113,88,61,65),
(3,3,56,55,115,89,62,66),
(3,3,57,55,118,91,62,67),
(3,3,58,56,120,92,63,68),
(3,3,59,57,122,94,64,70),
(3,3,60,58,124,95,65,71),
(3,3,61,58,126,97,67,72),
(3,3,62,59,129,98,68,73),
(3,3,63,60,131,100,69,74),
(3,3,64,61,133,101,70,75),
(3,3,65,62,135,103,71,76),
(3,3,66,63,138,105,72,77),
(3,3,67,63,140,106,73,78),
(3,3,68,64,142,108,74,80),
(3,3,69,65,145,109,75,81),
(3,3,70,66,147,111,76,82),
(3,3,71,67,150,113,77,83),
(3,3,72,68,153,115,78,84),
(3,3,73,69,156,117,79,86),
(3,3,74,70,159,119,81,87),
(3,3,75,71,162,121,82,89),
(3,3,76,72,165,123,83,90),
(3,3,77,73,168,125,85,92),
(3,3,78,74,171,127,86,93),
(3,3,79,75,174,129,87,95),
(3,3,80,76,177,131,89,96),
(3,4,1,23,19,24,19,19),
(3,4,2,24,20,25,19,19),
(3,4,3,24,22,25,19,20),
(3,4,4,25,23,26,19,20),
(3,4,5,26,25,27,20,20),
(3,4,6,27,26,27,20,21),
(3,4,7,28,28,28,20,21),
(3,4,8,28,29,29,20,22),
(3,4,9,29,31,30,20,22),
(3,4,10,30,32,30,20,22),
(3,4,11,31,34,31,21,23),
(3,4,12,32,36,32,21,23),
(3,4,13,33,37,33,21,24),
(3,4,14,33,39,33,21,24),
(3,4,15,34,40,34,21,25),
(3,4,16,35,42,35,22,25),
(3,4,17,36,44,36,22,25),
(3,4,18,37,45,37,22,26),
(3,4,19,38,47,38,22,26),
(3,4,20,39,49,38,22,27),
(3,4,21,40,51,39,23,27),
(3,4,22,41,52,40,23,28),
(3,4,23,42,54,41,23,28),
(3,4,24,43,56,42,23,29),
(3,4,25,44,58,43,24,29),
(3,4,26,44,59,44,24,30),
(3,4,27,45,61,44,24,30),
(3,4,28,46,63,45,24,31),
(3,4,29,47,65,46,25,31),
(3,4,30,48,67,47,25,32),
(3,4,31,49,69,48,25,32),
(3,4,32,51,71,49,25,33),
(3,4,33,52,72,50,26,33),
(3,4,34,53,74,51,26,34),
(3,4,35,54,76,52,26,34),
(3,4,36,55,78,53,26,35),
(3,4,37,56,80,54,27,35),
(3,4,38,57,82,55,27,36),
(3,4,39,58,84,56,27,37),
(3,4,40,59,86,57,28,37),
(3,4,41,60,88,58,28,38),
(3,4,42,61,90,59,28,38),
(3,4,43,63,92,60,28,39),
(3,4,44,64,95,61,29,39),
(3,4,45,65,97,62,29,40),
(3,4,46,66,99,63,29,41),
(3,4,47,67,101,64,30,41),
(3,4,48,68,103,66,30,42),
(3,4,49,70,105,67,30,43),
(3,4,50,71,107,68,31,43),
(3,4,51,72,110,69,31,44),
(3,4,52,73,112,70,31,44),
(3,4,53,74,114,71,32,45),
(3,4,54,76,116,72,32,46),
(3,4,55,77,118,73,32,46),
(3,4,56,78,121,75,33,47),
(3,4,57,80,123,76,33,48),
(3,4,58,81,125,77,33,48),
(3,4,59,82,128,78,34,49),
(3,4,60,83,130,79,34,50),
(3,4,61,85,132,81,34,51),
(3,4,62,86,135,82,35,51),
(3,4,63,87,137,83,35,52),
(3,4,64,89,139,84,36,53),
(3,4,65,90,142,86,36,53),
(3,4,66,91,144,87,36,54),
(3,4,67,93,147,88,37,55),
(3,4,68,94,149,89,37,56),
(3,4,69,96,152,91,38,56),
(3,4,70,97,154,92,38,57),
(3,4,71,99,157,93,38,58),
(3,4,72,101,160,96,39,58),
(3,4,73,102,163,97,39,59),
(3,4,74,104,166,98,40,60),
(3,4,75,106,169,100,40,61),
(3,4,76,107,172,101,40,62),
(3,4,77,109,175,103,41,63),
(3,4,78,111,179,105,41,64),
(3,4,79,113,182,106,42,65),
(3,4,80,115,185,108,42,66),
(3,5,1,22,16,23,21,22),
(3,5,2,22,16,23,22,23),
(3,5,3,22,16,24,24,25),
(3,5,4,22,17,24,25,26),
(3,5,5,23,17,24,26,27),
(3,5,6,23,17,25,28,29),
(3,5,7,23,17,25,29,30),
(3,5,8,23,18,26,30,32),
(3,5,9,23,18,26,32,33),
(3,5,10,23,18,26,33,35),
(3,5,11,24,18,27,35,36),
(3,5,12,24,19,27,36,38),
(3,5,13,24,19,28,37,39),
(3,5,14,24,19,28,39,41),
(3,5,15,24,19,28,40,42),
(3,5,16,24,20,29,42,44),
(3,5,17,25,20,29,43,45),
(3,5,18,25,20,30,45,47),
(3,5,19,25,21,30,46,49),
(3,5,20,25,21,31,48,50),
(3,5,21,25,21,31,50,52),
(3,5,22,26,22,31,51,53),
(3,5,23,26,22,32,53,55),
(3,5,24,26,22,32,54,57),
(3,5,25,26,22,33,56,58),
(3,5,26,27,23,33,58,60),
(3,5,27,27,23,34,59,62),
(3,5,28,27,23,34,61,64),
(3,5,29,27,24,35,63,65),
(3,5,30,28,24,35,64,67),
(3,5,31,28,24,36,66,69),
(3,5,32,28,25,36,68,71),
(3,5,33,28,25,37,70,72),
(3,5,34,29,26,38,71,74),
(3,5,35,29,26,38,73,76),
(3,5,36,29,26,39,75,78),
(3,5,37,29,27,39,77,80),
(3,5,38,30,27,40,78,82),
(3,5,39,30,27,40,80,84),
(3,5,40,30,28,41,82,86),
(3,5,41,31,28,41,84,88),
(3,5,42,31,29,42,86,89),
(3,5,43,31,29,43,88,91),
(3,5,44,32,29,43,90,93),
(3,5,45,32,30,44,92,95),
(3,5,46,32,30,44,93,97),
(3,5,47,32,30,45,95,99),
(3,5,48,33,31,46,97,101),
(3,5,49,33,31,46,99,103),
(3,5,50,33,32,47,101,106),
(3,5,51,34,32,48,103,108),
(3,5,52,34,33,48,105,110),
(3,5,53,35,33,49,107,112),
(3,5,54,35,33,50,109,114),
(3,5,55,35,34,50,111,116),
(3,5,56,36,34,51,113,118),
(3,5,57,36,35,52,116,120),
(3,5,58,36,35,52,118,123),
(3,5,59,37,36,53,120,125),
(3,5,60,37,36,54,122,127),
(3,5,61,37,37,54,124,129),
(3,5,62,38,37,55,126,131),
(3,5,63,38,38,56,128,134),
(3,5,64,39,38,57,131,136),
(3,5,65,39,39,57,133,138),
(3,5,66,39,39,58,135,141),
(3,5,67,40,40,59,137,143),
(3,5,68,40,40,59,139,145),
(3,5,69,41,40,60,142,148),
(3,5,70,41,41,61,144,150),
(3,5,71,41,42,62,147,153),
(3,5,72,42,42,62,150,163),
(3,5,73,42,43,63,153,166),
(3,5,74,43,43,64,155,170),
(3,5,75,43,44,65,158,173),
(3,5,76,43,45,66,161,176),
(3,5,77,44,45,67,164,179),
(3,5,78,44,46,68,167,182),
(3,5,79,45,46,69,170,184),
(3,5,80,45,47,70,173,189),
(3,6,1,25,16,25,19,19),
(3,6,2,26,17,26,19,19),
(3,6,3,28,18,27,19,20),
(3,6,4,29,18,28,19,20),
(3,6,5,30,19,30,19,20),
(3,6,6,31,20,31,19,20),
(3,6,7,33,21,32,20,21),
(3,6,8,34,22,33,20,21),
(3,6,9,36,23,35,20,21),
(3,6,10,37,23,36,20,22),
(3,6,11,38,24,37,20,22),
(3,6,12,40,25,38,20,22),
(3,6,13,41,26,40,20,23),
(3,6,14,43,27,41,20,23),
(3,6,15,44,28,42,20,23),
(3,6,16,46,29,44,21,24),
(3,6,17,47,30,45,21,24),
(3,6,18,49,31,46,21,24),
(3,6,19,50,32,48,21,25),
(3,6,20,52,33,49,21,25),
(3,6,21,53,34,51,21,26),
(3,6,22,55,34,52,21,26),
(3,6,23,56,35,53,21,26),
(3,6,24,58,36,55,22,27),
(3,6,25,59,37,56,22,27),
(3,6,26,61,38,58,22,27),
(3,6,27,63,39,59,22,28),
(3,6,28,64,41,61,22,28),
(3,6,29,66,42,62,22,29),
(3,6,30,68,43,64,23,29),
(3,6,31,69,44,65,23,30),
(3,6,32,71,45,67,23,30),
(3,6,33,73,46,68,23,30),
(3,6,34,75,47,70,23,31),
(3,6,35,76,48,72,24,31),
(3,6,36,78,49,73,24,32),
(3,6,37,80,50,75,24,32),
(3,6,38,82,51,76,24,33),
(3,6,39,84,52,78,24,33),
(3,6,40,85,54,80,24,34),
(3,6,41,87,55,81,25,34),
(3,6,42,89,56,83,25,35),
(3,6,43,91,57,85,25,35),
(3,6,44,93,58,87,25,36),
(3,6,45,95,59,88,26,36),
(3,6,46,97,61,90,26,37),
(3,6,47,99,62,92,26,37),
(3,6,48,101,63,94,26,38),
(3,6,49,102,64,95,26,38),
(3,6,50,104,65,97,27,39),
(3,6,51,106,67,99,27,39),
(3,6,52,108,68,99,27,40),
(3,6,53,109,68,101,27,40),
(3,6,54,110,69,101,28,41),
(3,6,55,110,69,102,28,41),
(3,6,56,113,71,105,28,42),
(3,6,57,118,72,107,28,42),
(3,6,58,120,73,109,29,43),
(3,6,59,123,75,111,29,43),
(3,6,60,125,76,113,29,44),
(3,6,61,126,77,115,29,45),
(3,6,62,127,79,117,29,45),
(3,6,63,129,80,120,30,46),
(3,6,64,132,82,122,30,46),
(3,6,65,135,83,124,30,47),
(3,6,66,137,85,127,30,48),
(3,6,67,144,86,129,31,48),
(3,6,68,146,88,131,31,49),
(3,6,69,149,89,133,31,50),
(3,6,70,152,91,136,31,50),
(3,6,71,154,93,139,32,51),
(3,6,72,157,94,141,32,52),
(3,6,73,160,96,144,32,53),
(3,6,74,163,98,146,32,53),
(3,6,75,166,99,150,33,54),
(3,6,76,169,101,152,33,55),
(3,6,77,172,103,155,33,56),
(3,6,78,176,104,157,33,56),
(3,6,79,179,106,160,34,57),
(3,6,80,182,108,163,34,58),
(4,1,1,20,25,21,20,20),
(4,1,2,21,26,22,20,20),
(4,1,3,23,27,23,20,21),
(4,1,4,24,27,25,20,21),
(4,1,5,25,28,26,20,21),
(4,1,6,27,29,27,20,21),
(4,1,7,28,30,28,21,22),
(4,1,8,29,31,29,21,22),
(4,1,9,31,31,31,21,22),
(4,1,10,32,32,32,21,23),
(4,1,11,33,33,33,21,23),
(4,1,12,35,34,34,21,23),
(4,1,13,36,35,36,21,24),
(4,1,14,38,36,37,21,24),
(4,1,15,39,37,38,21,24),
(4,1,16,41,37,40,21,25),
(4,1,17,42,38,41,22,25),
(4,1,18,44,39,43,22,25),
(4,1,19,45,40,44,22,26),
(4,1,20,47,41,45,22,26),
(4,1,21,48,42,47,22,26),
(4,1,22,50,43,48,22,27),
(4,1,23,52,44,50,22,27),
(4,1,24,53,45,51,23,28),
(4,1,25,55,46,52,23,28),
(4,1,26,56,47,54,23,28),
(4,1,27,58,48,55,23,29),
(4,1,28,60,49,57,23,29),
(4,1,29,61,50,58,23,30),
(4,1,30,63,51,60,24,30),
(4,1,31,65,52,62,24,30),
(4,1,32,66,53,63,24,31),
(4,1,33,68,54,65,24,31),
(4,1,34,70,55,66,24,32),
(4,1,35,72,56,68,24,32),
(4,1,36,73,58,69,25,33),
(4,1,37,75,59,71,25,33),
(4,1,38,77,60,73,25,34),
(4,1,39,79,61,74,25,34),
(4,1,40,81,62,76,25,35),
(4,1,41,82,63,78,26,35),
(4,1,42,84,64,79,26,35),
(4,1,43,86,66,81,26,36),
(4,1,44,88,67,83,26,36),
(4,1,45,90,68,85,26,37),
(4,1,46,92,69,86,27,37),
(4,1,47,94,70,88,27,38),
(4,1,48,96,72,90,27,38),
(4,1,49,98,73,92,27,39),
(4,1,50,100,74,93,28,40),
(4,1,51,102,75,95,28,40),
(4,1,52,104,77,97,28,41),
(4,1,53,106,78,99,28,41),
(4,1,54,108,79,101,29,42),
(4,1,55,110,80,103,29,42),
(4,1,56,112,82,104,29,43),
(4,1,57,114,83,106,29,43),
(4,1,58,116,84,108,30,44),
(4,1,59,118,86,110,30,44),
(4,1,60,120,87,112,30,45),
(4,1,61,122,88,114,30,46),
(4,1,62,124,90,116,31,46),
(4,1,63,127,91,118,31,47),
(4,1,64,129,92,120,31,47),
(4,1,65,131,94,122,32,48),
(4,1,66,133,95,124,32,49),
(4,1,67,135,97,126,32,49),
(4,1,68,138,98,128,32,50),
(4,1,69,140,100,130,33,50),
(4,1,70,142,101,132,33,51),
(4,1,71,145,102,134,33,52),
(4,1,72,147,104,137,33,53),
(4,1,73,150,106,139,33,54),
(4,1,74,153,107,142,34,54),
(4,1,75,156,109,144,34,55),
(4,1,76,159,111,148,34,56),
(4,1,77,162,113,150,35,57),
(4,1,78,165,114,152,35,57),
(4,1,79,178,116,164,35,58),
(4,1,80,181,118,167,36,59),
(4,3,1,17,28,20,20,21),
(4,3,2,17,29,21,21,22),
(4,3,3,18,31,22,21,22),
(4,3,4,18,32,23,22,23),
(4,3,5,19,33,24,22,24),
(4,3,6,19,35,25,23,24),
(4,3,7,20,36,26,24,25),
(4,3,8,20,38,27,24,25),
(4,3,9,21,39,27,25,26),
(4,3,10,21,40,28,25,27),
(4,3,11,22,42,29,26,28),
(4,3,12,22,43,30,27,28),
(4,3,13,23,45,31,27,29),
(4,3,14,23,46,32,28,30),
(4,3,15,24,48,34,29,30),
(4,3,16,24,50,35,29,31),
(4,3,17,25,51,36,30,32),
(4,3,18,25,53,37,31,33),
(4,3,19,26,54,38,31,33),
(4,3,20,26,56,39,32,34),
(4,3,21,27,57,40,33,35),
(4,3,22,27,59,41,33,36),
(4,3,23,28,61,42,34,36),
(4,3,24,28,62,43,35,37),
(4,3,25,29,64,44,36,38),
(4,3,26,30,66,46,36,39),
(4,3,27,30,68,47,37,40),
(4,3,28,31,69,48,38,41),
(4,3,29,31,71,49,39,41),
(4,3,30,32,73,50,39,42),
(4,3,31,33,75,52,40,43),
(4,3,32,33,76,53,41,44),
(4,3,33,34,78,54,42,45),
(4,3,34,34,80,55,43,46),
(4,3,35,35,82,57,44,47),
(4,3,36,36,84,58,44,48),
(4,3,37,36,86,59,45,48),
(4,3,38,37,87,60,46,49),
(4,3,39,38,89,62,47,50),
(4,3,40,38,91,63,48,51),
(4,3,41,39,93,64,49,52),
(4,3,42,40,95,66,49,53),
(4,3,43,40,97,67,50,54),
(4,3,44,41,99,68,51,55),
(4,3,45,42,101,70,52,56),
(4,3,46,42,103,71,53,57),
(4,3,47,43,105,72,54,58),
(4,3,48,44,107,74,55,59),
(4,3,49,45,109,75,56,60),
(4,3,50,45,111,77,57,61),
(4,3,51,46,113,78,58,62),
(4,3,52,47,115,79,59,63),
(4,3,53,47,118,81,60,64),
(4,3,54,48,120,82,61,65),
(4,3,55,49,122,84,61,66),
(4,3,56,50,124,85,62,67),
(4,3,57,50,126,87,63,68),
(4,3,58,51,128,88,64,69),
(4,3,59,52,131,90,65,70),
(4,3,60,53,133,91,66,72),
(4,3,61,54,135,93,67,73),
(4,3,62,54,137,94,69,74),
(4,3,63,55,140,96,70,75),
(4,3,64,56,142,97,71,76),
(4,3,65,57,144,99,72,77),
(4,3,66,58,147,101,73,78),
(4,3,67,58,149,102,74,79),
(4,3,68,59,151,104,75,81),
(4,3,69,60,154,105,76,82),
(4,3,70,61,156,107,77,83),
(4,3,71,62,159,109,78,84),
(4,3,72,63,162,111,79,85),
(4,3,73,64,165,113,80,87),
(4,3,74,65,168,115,82,88),
(4,3,75,66,171,117,83,90),
(4,3,76,67,174,119,84,91),
(4,3,77,68,177,121,86,93),
(4,3,78,69,180,123,87,94),
(4,3,79,70,190,125,91,96),
(4,3,80,71,193,127,93,97),
(4,4,1,18,28,20,20,20),
(4,4,2,19,29,21,20,20),
(4,4,3,20,31,21,20,21),
(4,4,4,20,32,22,20,21),
(4,4,5,21,34,23,21,21),
(4,4,6,22,35,24,21,22),
(4,4,7,23,37,24,21,22),
(4,4,8,24,38,25,21,23),
(4,4,9,24,40,26,21,23),
(4,4,10,25,41,26,21,23),
(4,4,11,26,43,27,22,24),
(4,4,12,27,44,28,22,24),
(4,4,13,28,46,29,22,25),
(4,4,14,29,48,30,22,25),
(4,4,15,29,49,30,22,25),
(4,4,16,30,51,31,23,26),
(4,4,17,31,52,32,23,26),
(4,4,18,32,54,33,23,27),
(4,4,19,33,56,34,23,27),
(4,4,20,34,57,35,23,28),
(4,4,21,35,59,35,24,28),
(4,4,22,36,61,36,24,29),
(4,4,23,37,63,37,24,29),
(4,4,24,38,64,38,24,30),
(4,4,25,39,66,39,25,30),
(4,4,26,40,68,40,25,31),
(4,4,27,41,70,41,25,31),
(4,4,28,42,72,42,25,32),
(4,4,29,43,73,43,25,32),
(4,4,30,44,75,43,26,33),
(4,4,31,45,77,44,26,33),
(4,4,32,46,79,45,26,34),
(4,4,33,47,81,46,27,34),
(4,4,34,48,83,47,27,35),
(4,4,35,49,85,48,27,35),
(4,4,36,50,87,49,27,36),
(4,4,37,51,89,50,28,36),
(4,4,38,52,91,51,28,37),
(4,4,39,53,93,52,28,38),
(4,4,40,54,95,53,28,38),
(4,4,41,56,97,54,29,39),
(4,4,42,57,99,55,29,39),
(4,4,43,58,101,56,29,40),
(4,4,44,59,103,57,30,40),
(4,4,45,60,105,59,30,41),
(4,4,46,61,107,60,30,42),
(4,4,47,62,109,61,31,42),
(4,4,48,64,112,62,31,43),
(4,4,49,65,114,63,31,44),
(4,4,50,66,116,64,32,44),
(4,4,51,67,118,65,32,45),
(4,4,52,68,120,66,32,45),
(4,4,53,70,123,67,33,46),
(4,4,54,71,125,69,33,47),
(4,4,55,72,127,70,33,47),
(4,4,56,73,129,71,34,48),
(4,4,57,75,132,72,34,49),
(4,4,58,76,134,73,34,49),
(4,4,59,77,136,74,35,50),
(4,4,60,79,139,76,35,51),
(4,4,61,80,141,77,35,51),
(4,4,62,81,143,78,36,52),
(4,4,63,82,146,79,36,53),
(4,4,64,84,148,80,37,54),
(4,4,65,85,151,82,37,54),
(4,4,66,87,153,83,37,55),
(4,4,67,88,156,84,38,56),
(4,4,68,89,158,85,38,57),
(4,4,69,91,160,87,39,57),
(4,4,70,92,163,88,39,58),
(4,4,71,94,166,90,39,59),
(4,4,72,96,169,91,40,59),
(4,4,73,97,172,93,40,60),
(4,4,74,99,175,94,41,61),
(4,4,75,101,178,96,41,62),
(4,4,76,102,181,97,41,63),
(4,4,77,104,184,99,42,64),
(4,4,78,106,188,101,42,65),
(4,4,79,108,191,102,43,66),
(4,4,80,110,194,104,43,67),
(4,5,1,17,25,19,22,23),
(4,5,2,17,25,19,23,24),
(4,5,3,17,25,20,25,26),
(4,5,4,17,26,20,26,27),
(4,5,5,18,26,20,27,28),
(4,5,6,18,26,21,29,30),
(4,5,7,18,26,21,30,31),
(4,5,8,18,26,22,31,33),
(4,5,9,18,27,22,33,34),
(4,5,10,19,27,22,34,36),
(4,5,11,19,27,23,36,37),
(4,5,12,19,27,23,37,39),
(4,5,13,19,28,24,38,40),
(4,5,14,19,28,24,40,42),
(4,5,15,19,28,25,41,43),
(4,5,16,20,28,25,43,45),
(4,5,17,20,29,25,44,46),
(4,5,18,20,29,26,46,48),
(4,5,19,20,29,26,47,49),
(4,5,20,21,30,27,49,51),
(4,5,21,21,30,27,51,53),
(4,5,22,21,30,28,52,54),
(4,5,23,21,30,28,54,56),
(4,5,24,21,31,29,55,58),
(4,5,25,22,31,29,57,59),
(4,5,26,22,31,30,59,61),
(4,5,27,22,32,30,60,63),
(4,5,28,22,32,31,62,65),
(4,5,29,23,32,31,64,66),
(4,5,30,23,33,32,65,68),
(4,5,31,23,33,32,67,70),
(4,5,32,23,33,33,69,72),
(4,5,33,24,34,33,70,73),
(4,5,34,24,34,34,72,75),
(4,5,35,24,34,34,74,77),
(4,5,36,24,35,35,76,79),
(4,5,37,25,35,35,78,81),
(4,5,38,25,35,36,79,83),
(4,5,39,25,36,37,81,85),
(4,5,40,26,36,37,83,87),
(4,5,41,26,37,38,85,88),
(4,5,42,26,37,38,87,90),
(4,5,43,27,37,39,89,92),
(4,5,44,27,38,39,91,94),
(4,5,45,27,38,40,92,96),
(4,5,46,27,39,41,94,98),
(4,5,47,28,39,41,96,100),
(4,5,48,28,39,42,98,102),
(4,5,49,28,40,43,100,104),
(4,5,50,29,40,43,102,106),
(4,5,51,29,41,44,104,109),
(4,5,52,29,41,44,106,111),
(4,5,53,30,42,45,108,113),
(4,5,54,30,42,46,110,115),
(4,5,55,30,43,46,112,117),
(4,5,56,31,43,47,114,119),
(4,5,57,31,43,48,117,121),
(4,5,58,31,44,48,119,124),
(4,5,59,32,44,49,121,126),
(4,5,60,32,45,50,123,128),
(4,5,61,33,45,51,125,130),
(4,5,62,33,46,51,127,132),
(4,5,63,33,46,52,129,135),
(4,5,64,34,47,53,132,137),
(4,5,65,34,47,53,134,139),
(4,5,66,34,48,54,136,142),
(4,5,67,35,48,55,138,144),
(4,5,68,35,49,56,140,146),
(4,5,69,36,49,56,143,149),
(4,5,70,36,50,57,145,151),
(4,5,71,36,51,58,148,161),
(4,5,72,37,51,58,151,164),
(4,5,73,37,52,59,154,168),
(4,5,74,38,52,60,156,171),
(4,5,75,38,53,61,159,174),
(4,5,76,38,54,62,162,177),
(4,5,77,39,54,63,165,180),
(4,5,78,39,55,64,168,183),
(4,5,79,40,55,65,171,186),
(4,5,80,40,56,66,200,191),
(4,6,1,20,25,21,20,20),
(4,6,2,21,26,22,20,20),
(4,6,3,23,27,23,20,21),
(4,6,4,24,27,25,20,21),
(4,6,5,25,28,26,20,21),
(4,6,6,27,29,27,20,21),
(4,6,7,28,30,28,21,22),
(4,6,8,29,31,29,21,22),
(4,6,9,31,31,31,21,22),
(4,6,10,32,32,32,21,23),
(4,6,11,33,33,33,21,23),
(4,6,12,35,34,34,21,23),
(4,6,13,36,35,36,21,24),
(4,6,14,38,36,37,21,24),
(4,6,15,39,37,38,21,24),
(4,6,16,41,37,40,21,25),
(4,6,17,42,38,41,22,25),
(4,6,18,44,39,43,22,25),
(4,6,19,45,40,44,22,26),
(4,6,20,47,41,45,22,26),
(4,6,21,48,42,47,22,26),
(4,6,22,50,43,48,22,27),
(4,6,23,52,44,50,22,27),
(4,6,24,53,45,51,23,28),
(4,6,25,55,46,52,23,28),
(4,6,26,56,47,54,23,28),
(4,6,27,58,48,55,23,29),
(4,6,28,60,49,57,23,29),
(4,6,29,61,50,58,23,30),
(4,6,30,63,51,60,24,30),
(4,6,31,65,52,62,24,30),
(4,6,32,66,53,63,24,31),
(4,6,33,68,54,65,24,31),
(4,6,34,70,55,66,24,32),
(4,6,35,72,56,68,24,32),
(4,6,36,73,58,69,25,33),
(4,6,37,75,59,71,25,33),
(4,6,38,77,60,73,25,34),
(4,6,39,79,61,74,25,34),
(4,6,40,81,62,76,25,35),
(4,6,41,82,63,78,26,35),
(4,6,42,84,64,79,26,35),
(4,6,43,86,66,81,26,36),
(4,6,44,88,67,83,26,36),
(4,6,45,90,68,85,26,37),
(4,6,46,92,69,86,27,37),
(4,6,47,94,70,88,27,38),
(4,6,48,96,72,90,27,38),
(4,6,49,98,73,92,27,39),
(4,6,50,100,74,93,28,40),
(4,6,51,101,75,94,28,40),
(4,6,52,102,76,95,28,41),
(4,6,53,103,77,96,28,41),
(4,6,54,104,77,97,29,42),
(4,6,55,105,78,98,29,42),
(4,6,56,108,80,101,29,43),
(4,6,57,113,81,103,29,43),
(4,6,58,115,82,105,30,44),
(4,6,59,115,84,107,30,44),
(4,6,60,120,85,109,30,45),
(4,6,61,122,86,111,30,46),
(4,6,62,122,88,113,30,46),
(4,6,63,127,89,116,31,47),
(4,6,64,127,91,118,31,47),
(4,6,65,133,92,120,31,48),
(4,6,66,135,94,123,31,49),
(4,6,67,136,95,125,32,49),
(4,6,68,137,97,127,32,50),
(4,6,69,140,98,130,32,51),
(4,6,70,147,100,132,32,51),
(4,6,71,154,102,135,33,52),
(4,6,72,156,103,137,33,53),
(4,6,73,157,105,140,33,54),
(4,6,74,158,107,142,33,54),
(4,6,75,161,108,145,34,55),
(4,6,76,164,110,148,34,56),
(4,6,77,167,112,150,34,57),
(4,6,78,170,113,153,34,57),
(4,6,79,172,115,156,35,58),
(4,6,80,177,117,159,35,59),
(4,11,1,18,25,19,22,22),
(4,11,2,19,25,20,23,23),
(4,11,3,19,26,20,24,24),
(4,11,4,20,26,21,25,26),
(4,11,5,20,27,22,26,27),
(4,11,6,21,27,22,27,28),
(4,11,7,21,28,23,28,29),
(4,11,8,22,28,24,29,30),
(4,11,9,23,29,24,30,32),
(4,11,10,23,29,25,32,33),
(4,11,11,24,30,26,33,34),
(4,11,12,24,31,26,34,35),
(4,11,13,25,31,27,35,37),
(4,11,14,26,32,28,36,38),
(4,11,15,26,32,29,37,39),
(4,11,16,27,33,29,38,41),
(4,11,17,28,33,30,40,42),
(4,11,18,28,34,31,41,43),
(4,11,19,29,35,32,42,45),
(4,11,20,30,35,32,43,46),
(4,11,21,30,36,33,45,48),
(4,11,22,31,36,34,46,49),
(4,11,23,32,37,35,47,51),
(4,11,24,32,38,36,48,52),
(4,11,25,33,38,36,50,53),
(4,11,26,34,39,37,51,55),
(4,11,27,35,40,38,52,56),
(4,11,28,35,40,39,54,58),
(4,11,29,36,41,40,55,59),
(4,11,30,37,42,41,56,61),
(4,11,31,38,42,42,58,62),
(4,11,32,38,43,42,59,64),
(4,11,33,39,44,43,60,66),
(4,11,34,40,44,44,62,67),
(4,11,35,41,45,45,63,69),
(4,11,36,42,46,46,65,70),
(4,11,37,42,47,47,66,72),
(4,11,38,43,47,48,67,74),
(4,11,39,44,48,49,69,75),
(4,11,40,45,49,50,70,77),
(4,11,41,46,50,51,72,79),
(4,11,42,46,50,52,73,80),
(4,11,43,47,51,53,75,82),
(4,11,44,48,52,54,76,84),
(4,11,45,49,53,55,78,85),
(4,11,46,50,54,56,79,87),
(4,11,47,51,54,57,81,89),
(4,11,48,52,55,58,83,91),
(4,11,49,53,56,59,84,93),
(4,11,50,53,57,60,86,94),
(4,11,51,54,58,61,87,96),
(4,11,52,55,59,62,89,98),
(4,11,53,56,59,63,91,100),
(4,11,54,57,60,64,92,102),
(4,11,55,58,61,65,94,103),
(4,11,56,59,62,66,95,105),
(4,11,57,60,63,67,97,107),
(4,11,58,61,64,68,99,109),
(4,11,59,62,65,69,101,111),
(4,11,60,63,66,70,102,113),
(4,11,61,64,66,72,104,115),
(4,11,62,65,67,73,106,117),
(4,11,63,66,68,74,107,119),
(4,11,64,67,69,75,109,121),
(4,11,65,68,70,76,111,123),
(4,11,66,69,71,77,113,125),
(4,11,67,70,72,78,115,127),
(4,11,68,71,73,80,116,129),
(4,11,69,72,74,81,118,131),
(4,11,70,73,75,82,120,133),
(4,11,71,75,76,83,122,135),
(4,11,72,76,78,85,125,138),
(4,11,73,77,79,86,127,140),
(4,11,74,78,80,88,131,143),
(4,11,75,80,81,89,133,145),
(4,11,76,81,82,91,134,148),
(4,11,77,82,83,92,136,151),
(4,11,78,84,85,94,138,153),
(4,11,79,85,86,95,141,156),
(4,11,80,86,87,97,143,159),
(5,1,1,22,18,23,18,25),
(5,1,2,23,19,24,18,25),
(5,1,3,25,20,25,18,26),
(5,1,4,26,20,26,18,26),
(5,1,5,27,21,28,18,26),
(5,1,6,29,22,29,18,26),
(5,1,7,30,23,30,19,27),
(5,1,8,31,24,31,19,27),
(5,1,9,33,25,33,19,27),
(5,1,10,34,25,34,19,28),
(5,1,11,35,26,35,19,28),
(5,1,12,37,27,36,19,28),
(5,1,13,38,28,38,19,28),
(5,1,14,40,29,39,19,29),
(5,1,15,41,30,40,19,29),
(5,1,16,43,31,42,20,29),
(5,1,17,44,32,43,20,30),
(5,1,18,46,33,44,20,30),
(5,1,19,47,34,46,20,31),
(5,1,20,49,34,47,20,31),
(5,1,21,50,35,49,20,31),
(5,1,22,52,36,50,20,32),
(5,1,23,53,37,51,21,32),
(5,1,24,55,38,53,21,32),
(5,1,25,57,39,54,21,33),
(5,1,26,58,40,56,21,33),
(5,1,27,60,41,57,21,34),
(5,1,28,62,42,59,21,34),
(5,1,29,63,43,60,21,34),
(5,1,30,65,44,62,22,35),
(5,1,31,67,46,63,22,35),
(5,1,32,68,47,65,22,36),
(5,1,33,70,48,67,22,36),
(5,1,34,72,49,68,22,36),
(5,1,35,74,50,70,23,37),
(5,1,36,75,51,71,23,37),
(5,1,37,77,52,73,23,38),
(5,1,38,79,53,75,23,38),
(5,1,39,81,54,76,23,39),
(5,1,40,83,55,78,24,39),
(5,1,41,84,57,80,24,40),
(5,1,42,86,58,81,24,40),
(5,1,43,88,59,83,24,41),
(5,1,44,90,60,85,24,41),
(5,1,45,92,61,86,25,42),
(5,1,46,94,62,88,25,42),
(5,1,47,96,64,90,25,43),
(5,1,48,98,65,92,25,43),
(5,1,49,100,66,93,25,44),
(5,1,50,102,67,95,26,44),
(5,1,51,104,69,97,26,45),
(5,1,52,106,70,99,26,45),
(5,1,53,108,71,101,26,46),
(5,1,54,110,72,103,27,46),
(5,1,55,112,74,104,27,47),
(5,1,56,114,75,106,27,48),
(5,1,57,116,76,108,27,48),
(5,1,58,118,78,110,28,49),
(5,1,59,120,79,112,28,49),
(5,1,60,122,80,114,28,50),
(5,1,61,124,82,116,28,50),
(5,1,62,126,83,118,29,51),
(5,1,63,128,84,120,29,52),
(5,1,64,131,86,122,29,52),
(5,1,65,133,87,124,30,53),
(5,1,66,135,88,126,30,53),
(5,1,67,137,90,128,30,54),
(5,1,68,139,91,130,30,55),
(5,1,69,142,93,132,31,55),
(5,1,70,144,94,134,31,56),
(5,1,71,147,95,136,31,57),
(5,1,72,150,97,139,31,58),
(5,1,73,152,99,141,31,59),
(5,1,74,155,100,144,32,59),
(5,1,75,158,102,146,32,60),
(5,1,76,163,104,149,32,61),
(5,1,77,167,106,152,33,62),
(5,1,78,167,107,154,33,62),
(5,1,79,170,109,157,33,63),
(5,1,80,173,111,160,34,64),
(5,4,1,20,21,22,18,25),
(5,4,2,21,22,23,18,25),
(5,4,3,22,24,23,18,26),
(5,4,4,22,25,24,18,26),
(5,4,5,23,27,25,19,26),
(5,4,6,24,28,25,19,27),
(5,4,7,25,30,26,19,27),
(5,4,8,25,31,27,19,27),
(5,4,9,26,33,28,19,28),
(5,4,10,27,34,28,19,28),
(5,4,11,28,36,29,20,29),
(5,4,12,29,38,30,20,29),
(5,4,13,30,39,31,20,29),
(5,4,14,31,41,32,20,30),
(5,4,15,31,42,32,20,30),
(5,4,16,32,44,33,21,31),
(5,4,17,33,46,34,21,31),
(5,4,18,34,47,35,21,32),
(5,4,19,35,49,36,21,32),
(5,4,20,36,51,36,21,32),
(5,4,21,37,52,37,22,33),
(5,4,22,38,54,38,22,33),
(5,4,23,39,56,39,22,34),
(5,4,24,40,58,40,22,34),
(5,4,25,41,60,41,23,35),
(5,4,26,42,61,42,23,35),
(5,4,27,43,63,43,23,36),
(5,4,28,44,65,44,23,36),
(5,4,29,45,67,44,24,37),
(5,4,30,46,69,45,24,37),
(5,4,31,47,71,46,24,38),
(5,4,32,48,72,47,24,38),
(5,4,33,49,74,48,25,39),
(5,4,34,50,76,49,25,39),
(5,4,35,51,78,50,25,40),
(5,4,36,52,80,51,25,41),
(5,4,37,53,82,52,26,41),
(5,4,38,54,84,53,26,42),
(5,4,39,55,86,54,26,42),
(5,4,40,56,88,55,27,43),
(5,4,41,57,90,56,27,43),
(5,4,42,59,92,57,27,44),
(5,4,43,60,94,58,27,45),
(5,4,44,61,96,59,28,45),
(5,4,45,62,99,60,28,46),
(5,4,46,63,101,61,28,46),
(5,4,47,64,103,63,29,47),
(5,4,48,66,105,64,29,48),
(5,4,49,67,107,65,29,48),
(5,4,50,68,109,66,30,49),
(5,4,51,69,111,67,30,50),
(5,4,52,70,114,68,30,50),
(5,4,53,72,116,69,31,51),
(5,4,54,73,118,70,31,52),
(5,4,55,74,120,72,31,52),
(5,4,56,75,123,73,32,53),
(5,4,57,77,125,74,32,54),
(5,4,58,78,127,75,32,54),
(5,4,59,79,130,76,33,55),
(5,4,60,81,132,77,33,56),
(5,4,61,82,134,79,34,56),
(5,4,62,83,137,80,34,57),
(5,4,63,84,139,81,34,58),
(5,4,64,86,141,82,35,59),
(5,4,65,87,144,84,35,59),
(5,4,66,88,146,85,35,60),
(5,4,67,90,149,86,36,61),
(5,4,68,91,151,87,36,61),
(5,4,69,93,154,89,37,62),
(5,4,70,94,156,90,37,63),
(5,4,71,96,159,91,37,64),
(5,4,72,98,162,93,38,64),
(5,4,73,99,165,95,38,65),
(5,4,74,101,168,96,39,66),
(5,4,75,103,171,98,39,67),
(5,4,76,104,174,99,39,68),
(5,4,77,106,177,101,40,69),
(5,4,78,108,181,103,40,70),
(5,4,79,110,184,104,41,71),
(5,4,80,112,187,106,41,72),
(5,5,1,19,18,21,20,28),
(5,5,2,19,18,21,21,29),
(5,5,3,19,18,22,23,31),
(5,5,4,19,19,22,24,32),
(5,5,5,20,19,22,25,33),
(5,5,6,20,19,23,27,35),
(5,5,7,20,19,23,28,36),
(5,5,8,20,20,24,29,38),
(5,5,9,20,20,24,31,39),
(5,5,10,20,20,24,32,40),
(5,5,11,21,20,25,34,42),
(5,5,12,21,21,25,35,43),
(5,5,13,21,21,26,37,45),
(5,5,14,21,21,26,38,46),
(5,5,15,21,21,26,39,48),
(5,5,16,22,22,27,41,50),
(5,5,17,22,22,27,42,51),
(5,5,18,22,22,28,44,53),
(5,5,19,22,23,28,46,54),
(5,5,20,22,23,29,47,56),
(5,5,21,23,23,29,49,57),
(5,5,22,23,23,30,50,59),
(5,5,23,23,24,30,52,61),
(5,5,24,23,24,31,53,62),
(5,5,25,24,24,31,55,64),
(5,5,26,24,25,32,57,66),
(5,5,27,24,25,32,58,68),
(5,5,28,24,25,33,60,69),
(5,5,29,25,26,33,62,71),
(5,5,30,25,26,34,63,73),
(5,5,31,25,26,34,65,75),
(5,5,32,25,27,35,67,76),
(5,5,33,26,27,35,69,78),
(5,5,34,26,27,36,70,80),
(5,5,35,26,28,36,72,82),
(5,5,36,26,28,37,74,84),
(5,5,37,27,28,37,76,86),
(5,5,38,27,29,38,77,87),
(5,5,39,27,29,38,79,89),
(5,5,40,28,30,39,81,91),
(5,5,41,28,30,40,83,93),
(5,5,42,28,30,40,85,95),
(5,5,43,28,31,41,87,97),
(5,5,44,29,31,41,89,99),
(5,5,45,29,32,42,91,101),
(5,5,46,29,32,43,92,103),
(5,5,47,30,32,43,94,105),
(5,5,48,30,33,44,96,107),
(5,5,49,30,33,44,98,109),
(5,5,50,31,34,45,100,111),
(5,5,51,31,34,46,102,113),
(5,5,52,31,35,46,104,115),
(5,5,53,32,35,47,106,118),
(5,5,54,32,35,48,108,120),
(5,5,55,32,36,48,110,122),
(5,5,56,33,36,49,113,124),
(5,5,57,33,37,50,115,126),
(5,5,58,33,37,50,117,128),
(5,5,59,34,38,51,119,131),
(5,5,60,34,38,52,121,133),
(5,5,61,34,39,52,123,135),
(5,5,62,35,39,53,125,137),
(5,5,63,35,40,54,127,140),
(5,5,64,36,40,55,130,142),
(5,5,65,36,41,55,132,144),
(5,5,66,36,41,56,134,147),
(5,5,67,37,41,57,136,149),
(5,5,68,37,42,58,138,151),
(5,5,69,38,42,58,141,154),
(5,5,70,38,43,59,143,156),
(5,5,71,38,44,60,146,159),
(5,5,72,39,44,60,149,162),
(5,5,73,39,45,61,152,165),
(5,5,74,40,45,62,157,168),
(5,5,75,40,46,63,157,171),
(5,5,76,40,47,64,160,174),
(5,5,77,41,47,65,163,177),
(5,5,78,41,48,66,166,180),
(5,5,79,42,48,67,169,183),
(5,5,80,42,49,68,172,186),
(5,6,1,22,18,23,18,25),
(5,6,2,23,19,24,18,25),
(5,6,3,25,20,25,18,26),
(5,6,4,26,20,26,18,26),
(5,6,5,27,21,28,18,26),
(5,6,6,29,22,29,18,26),
(5,6,7,30,23,30,19,27),
(5,6,8,31,24,31,19,27),
(5,6,9,33,25,33,19,27),
(5,6,10,34,25,34,19,28),
(5,6,11,35,26,35,19,28),
(5,6,12,37,27,36,19,28),
(5,6,13,38,28,38,19,28),
(5,6,14,40,29,39,19,29),
(5,6,15,41,30,40,19,29),
(5,6,16,43,31,42,20,29),
(5,6,17,44,32,43,20,30),
(5,6,18,46,33,44,20,30),
(5,6,19,47,34,46,20,31),
(5,6,20,49,34,47,20,31),
(5,6,21,50,35,49,20,31),
(5,6,22,52,36,50,20,32),
(5,6,23,53,37,51,21,32),
(5,6,24,55,38,53,21,32),
(5,6,25,57,39,54,21,33),
(5,6,26,58,40,56,21,33),
(5,6,27,60,41,57,21,34),
(5,6,28,62,42,59,21,34),
(5,6,29,63,43,60,21,34),
(5,6,30,65,44,62,22,35),
(5,6,31,67,46,63,22,35),
(5,6,32,68,47,65,22,36),
(5,6,33,70,48,67,22,36),
(5,6,34,72,49,68,22,36),
(5,6,35,74,50,70,23,37),
(5,6,36,75,51,71,23,37),
(5,6,37,77,52,73,23,38),
(5,6,38,79,53,75,23,38),
(5,6,39,81,54,76,23,39),
(5,6,40,83,55,78,24,39),
(5,6,41,84,57,80,24,40),
(5,6,42,86,58,81,24,40),
(5,6,43,88,59,83,24,41),
(5,6,44,90,60,85,24,41),
(5,6,45,92,61,86,25,42),
(5,6,46,94,62,88,25,42),
(5,6,47,96,64,90,25,43),
(5,6,48,98,65,92,25,43),
(5,6,49,100,66,93,25,44),
(5,6,50,102,67,95,26,44),
(5,6,51,103,67,96,26,45),
(5,6,52,104,68,97,26,45),
(5,6,53,105,69,98,26,46),
(5,6,54,106,70,99,27,46),
(5,6,55,107,71,100,27,47),
(5,6,56,110,73,103,27,48),
(5,6,57,112,74,105,27,48),
(5,6,58,114,75,107,28,49),
(5,6,59,119,77,109,28,49),
(5,6,60,122,78,111,28,50),
(5,6,61,124,79,113,28,51),
(5,6,62,127,81,115,28,51),
(5,6,63,129,82,118,29,52),
(5,6,64,136,84,120,29,52),
(5,6,65,137,85,123,29,53),
(5,6,66,138,87,125,29,54),
(5,6,67,141,88,127,30,54),
(5,6,68,143,90,129,30,55),
(5,6,69,146,91,132,30,56),
(5,6,70,149,93,134,30,56),
(5,6,71,152,95,137,31,57),
(5,6,72,154,96,139,31,58),
(5,6,73,157,98,142,31,59),
(5,6,74,158,100,145,31,59),
(5,6,75,159,101,147,32,60),
(5,6,76,162,103,150,32,61),
(5,6,77,167,105,152,32,62),
(5,6,78,173,106,155,32,62),
(5,6,79,174,108,158,33,63),
(5,6,80,174,110,161,33,64),
(5,8,1,19,18,21,21,27),
(5,8,2,19,18,21,22,28),
(5,8,3,19,18,22,24,30),
(5,8,4,19,18,22,25,31),
(5,8,5,19,19,22,26,32),
(5,8,6,19,19,22,28,34),
(5,8,7,20,19,23,29,35),
(5,8,8,20,19,23,31,36),
(5,8,9,20,19,23,32,38),
(5,8,10,20,19,24,34,39),
(5,8,11,20,20,24,35,40),
(5,8,12,20,20,24,37,42),
(5,8,13,20,20,25,38,43),
(5,8,14,20,20,25,40,45),
(5,8,15,20,20,25,41,46),
(5,8,16,21,21,26,43,48),
(5,8,17,21,21,26,44,49),
(5,8,18,21,21,26,46,51),
(5,8,19,21,21,27,48,52),
(5,8,20,21,21,27,49,54),
(5,8,21,21,22,27,51,55),
(5,8,22,21,22,28,52,57),
(5,8,23,21,22,28,54,58),
(5,8,24,22,22,29,56,60),
(5,8,25,22,23,29,57,62),
(5,8,26,22,23,29,59,63),
(5,8,27,22,23,30,61,65),
(5,8,28,22,23,30,63,67),
(5,8,29,22,24,31,64,68),
(5,8,30,23,24,31,66,70),
(5,8,31,23,24,31,68,72),
(5,8,32,23,24,32,70,73),
(5,8,33,23,25,32,72,75),
(5,8,34,23,25,33,73,77),
(5,8,35,24,25,33,75,79),
(5,8,36,24,25,34,77,80),
(5,8,37,24,26,34,79,82),
(5,8,38,24,26,35,81,84),
(5,8,39,24,26,35,83,86),
(5,8,40,24,27,35,85,88),
(5,8,41,25,27,36,87,90),
(5,8,42,25,27,36,89,91),
(5,8,43,25,27,37,90,93),
(5,8,44,25,28,37,92,95),
(5,8,45,26,28,38,94,97),
(5,8,46,26,28,38,96,99),
(5,8,47,26,29,39,98,101),
(5,8,48,26,29,39,100,103),
(5,8,49,26,29,40,103,105),
(5,8,50,27,30,40,105,107),
(5,8,51,27,30,41,107,109),
(5,8,52,27,30,42,109,111),
(5,8,53,27,31,42,111,113),
(5,8,54,28,31,43,113,115),
(5,8,55,28,31,43,115,117),
(5,8,56,28,32,44,117,119),
(5,8,57,28,32,44,119,121),
(5,8,58,29,32,45,122,123),
(5,8,59,29,33,45,124,126),
(5,8,60,29,33,46,126,128),
(5,8,61,29,34,47,128,130),
(5,8,62,30,34,47,131,132),
(5,8,63,30,34,48,133,134),
(5,8,64,30,35,48,135,136),
(5,8,65,31,35,49,137,139),
(5,8,66,31,35,50,140,141),
(5,8,67,31,36,50,142,143),
(5,8,68,31,36,51,144,145),
(5,8,69,32,37,51,147,148),
(5,8,70,32,37,52,149,150),
(5,8,71,32,37,53,152,153),
(5,8,72,32,38,54,155,156),
(5,8,73,32,38,55,158,159),
(5,8,74,33,39,55,161,161),
(5,8,75,33,39,56,164,164),
(5,8,76,33,39,57,167,167),
(5,8,77,34,40,58,170,170),
(5,8,78,34,40,58,173,173),
(5,8,79,34,41,59,176,176),
(5,8,80,35,41,60,179,179),
(5,9,1,19,18,22,20,27),
(5,9,2,19,18,23,21,28),
(5,9,3,20,19,23,22,29),
(5,9,4,20,19,24,24,30),
(5,9,5,20,19,24,25,32),
(5,9,6,20,20,25,26,33),
(5,9,7,21,20,25,27,34),
(5,9,8,21,21,26,28,35),
(5,9,9,21,21,26,30,36),
(5,9,10,22,21,27,31,38),
(5,9,11,22,22,28,32,39),
(5,9,12,22,22,28,34,40),
(5,9,13,23,23,29,35,41),
(5,9,14,23,23,30,36,43),
(5,9,15,23,24,30,37,44),
(5,9,16,24,24,31,39,45),
(5,9,17,24,24,31,40,47),
(5,9,18,24,25,32,42,48),
(5,9,19,25,25,33,43,49),
(5,9,20,25,26,33,44,51),
(5,9,21,26,26,34,46,52),
(5,9,22,26,27,35,47,53),
(5,9,23,26,27,36,49,55),
(5,9,24,27,28,36,50,56),
(5,9,25,27,28,37,52,58),
(5,9,26,27,29,38,53,59),
(5,9,27,28,29,38,55,60),
(5,9,28,28,30,39,56,62),
(5,9,29,29,30,40,58,63),
(5,9,30,29,31,41,59,65),
(5,9,31,30,31,41,61,66),
(5,9,32,30,32,42,62,68),
(5,9,33,30,32,43,64,69),
(5,9,34,31,33,44,65,71),
(5,9,35,31,33,45,67,73),
(5,9,36,32,34,45,69,74),
(5,9,37,32,34,46,70,76),
(5,9,38,33,35,47,72,77),
(5,9,39,33,36,48,73,79),
(5,9,40,34,36,49,75,81),
(5,9,41,34,37,49,77,82),
(5,9,42,35,37,50,78,84),
(5,9,43,35,38,51,80,86),
(5,9,44,36,39,52,82,87),
(5,9,45,36,39,53,84,89),
(5,9,46,37,40,54,85,91),
(5,9,47,37,40,55,87,92),
(5,9,48,38,41,55,89,94),
(5,9,49,38,42,56,91,96),
(5,9,50,39,42,57,92,98),
(5,9,51,39,43,58,94,100),
(5,9,52,40,44,59,96,101),
(5,9,53,40,44,60,98,103),
(5,9,54,41,45,61,100,105),
(5,9,55,41,45,62,102,107),
(5,9,56,42,46,63,103,109),
(5,9,57,42,47,64,105,111),
(5,9,58,43,47,65,107,112),
(5,9,59,43,48,66,109,114),
(5,9,60,44,49,67,111,116),
(5,9,61,45,50,68,113,118),
(5,9,62,45,50,69,115,120),
(5,9,63,46,51,70,117,122),
(5,9,64,46,52,71,119,124),
(5,9,65,47,52,72,121,126),
(5,9,66,48,53,73,123,128),
(5,9,67,48,54,74,125,130),
(5,9,68,49,55,75,127,132),
(5,9,69,49,55,76,129,134),
(5,9,70,50,56,77,131,136),
(5,9,71,51,57,86,135,147),
(5,9,72,52,57,88,136,149),
(5,9,73,53,58,89,138,152),
(5,9,74,53,59,90,141,155),
(5,9,75,54,60,92,143,157),
(5,9,76,55,61,93,146,160),
(5,9,77,56,62,94,149,163),
(5,9,78,56,63,96,151,166),
(5,9,79,57,64,97,154,169),
(5,9,80,58,65,99,157,171),
(6,1,1,28,15,24,15,22),
(6,1,2,29,16,25,15,22),
(6,1,3,31,17,26,15,23),
(6,1,4,32,17,27,15,23),
(6,1,5,33,18,29,15,23),
(6,1,6,34,19,30,15,23),
(6,1,7,36,20,31,16,24),
(6,1,8,37,21,32,16,24),
(6,1,9,38,22,34,16,24),
(6,1,10,40,22,35,16,25),
(6,1,11,41,23,36,16,25),
(6,1,12,43,24,37,16,25),
(6,1,13,44,25,39,16,26),
(6,1,14,46,26,40,16,26),
(6,1,15,47,27,41,17,26),
(6,1,16,48,28,43,17,27),
(6,1,17,50,29,44,17,27),
(6,1,18,51,30,45,17,27),
(6,1,19,53,31,47,17,28),
(6,1,20,54,32,48,17,28),
(6,1,21,56,33,50,17,28),
(6,1,22,58,34,51,18,29),
(6,1,23,59,35,52,18,29),
(6,1,24,61,36,54,18,30),
(6,1,25,62,37,55,18,30),
(6,1,26,64,38,57,18,30),
(6,1,27,66,39,58,18,31),
(6,1,28,67,40,60,18,31),
(6,1,29,69,41,61,19,32),
(6,1,30,71,42,63,19,32),
(6,1,31,72,43,64,19,32),
(6,1,32,74,44,66,19,33),
(6,1,33,76,45,67,19,33),
(6,1,34,77,46,69,20,34),
(6,1,35,79,47,71,20,34),
(6,1,36,81,48,72,20,35),
(6,1,37,83,49,74,20,35),
(6,1,38,85,50,76,20,35),
(6,1,39,86,51,77,21,36),
(6,1,40,88,53,79,21,36),
(6,1,41,90,54,81,21,37),
(6,1,42,92,55,82,21,37),
(6,1,43,94,56,84,21,38),
(6,1,44,96,57,86,22,38),
(6,1,45,98,58,87,22,39),
(6,1,46,99,60,89,22,39),
(6,1,47,101,61,91,22,40),
(6,1,48,103,62,93,22,40),
(6,1,49,105,63,94,23,41),
(6,1,50,107,65,96,23,41),
(6,1,51,109,66,98,23,42),
(6,1,52,111,67,100,23,42),
(6,1,53,113,68,102,24,43),
(6,1,54,115,70,104,24,44),
(6,1,55,117,71,105,24,44),
(6,1,56,119,72,107,24,45),
(6,1,57,122,73,109,25,45),
(6,1,58,124,75,111,25,46),
(6,1,59,126,76,113,25,46),
(6,1,60,128,77,115,25,47),
(6,1,61,130,79,117,26,48),
(6,1,62,132,80,119,26,48),
(6,1,63,134,81,121,26,49),
(6,1,64,137,83,123,26,49),
(6,1,65,139,84,125,27,50),
(6,1,66,141,85,127,27,51),
(6,1,67,143,87,129,27,51),
(6,1,68,145,88,131,27,52),
(6,1,69,148,90,133,28,52),
(6,1,70,150,91,135,28,53),
(6,1,71,153,92,137,28,54),
(6,1,72,155,94,140,28,55),
(6,1,73,158,96,142,28,56),
(6,1,74,161,97,145,29,56),
(6,1,75,164,99,147,29,57),
(6,1,76,167,101,150,29,58),
(6,1,77,170,103,153,30,59),
(6,1,78,173,104,155,30,59),
(6,1,79,176,106,164,30,60),
(6,1,80,179,108,170,31,61),
(6,3,1,25,18,23,15,23),
(6,3,2,25,19,24,16,24),
(6,3,3,26,21,25,16,24),
(6,3,4,26,22,26,17,25),
(6,3,5,27,24,27,17,25),
(6,3,6,27,25,28,18,26),
(6,3,7,28,26,28,19,27),
(6,3,8,28,28,29,19,27),
(6,3,9,28,29,30,20,28),
(6,3,10,29,31,31,20,29),
(6,3,11,29,32,32,21,29),
(6,3,12,30,34,33,22,30),
(6,3,13,30,35,34,22,31),
(6,3,14,31,37,35,23,32),
(6,3,15,31,38,36,24,32),
(6,3,16,32,40,37,24,33),
(6,3,17,32,41,39,25,34),
(6,3,18,33,43,40,26,35),
(6,3,19,33,45,41,27,35),
(6,3,20,34,46,42,27,36),
(6,3,21,34,48,43,28,37),
(6,3,22,35,50,44,29,38),
(6,3,23,35,51,45,29,38),
(6,3,24,36,53,46,30,39),
(6,3,25,37,55,47,31,40),
(6,3,26,37,56,48,32,41),
(6,3,27,38,58,50,32,42),
(6,3,28,38,60,51,33,42),
(6,3,29,39,62,52,34,43),
(6,3,30,39,63,53,35,44),
(6,3,31,40,65,54,36,45),
(6,3,32,41,67,56,36,46),
(6,3,33,41,69,57,37,47),
(6,3,34,42,71,58,38,48),
(6,3,35,43,72,59,39,48),
(6,3,36,43,74,61,40,49),
(6,3,37,44,76,62,40,50),
(6,3,38,45,78,63,41,51),
(6,3,39,45,80,64,42,52),
(6,3,40,46,82,66,43,53),
(6,3,41,47,84,67,44,54),
(6,3,42,47,86,68,45,55),
(6,3,43,48,88,70,46,56),
(6,3,44,49,90,71,46,57),
(6,3,45,49,92,72,47,58),
(6,3,46,50,94,74,48,59),
(6,3,47,51,96,75,49,60),
(6,3,48,51,98,77,50,61),
(6,3,49,52,100,78,51,62),
(6,3,50,53,102,79,52,63),
(6,3,51,54,104,81,53,64),
(6,3,52,54,106,82,54,65),
(6,3,53,55,108,84,55,66),
(6,3,54,56,110,85,56,67),
(6,3,55,57,112,87,57,68),
(6,3,56,57,114,88,58,69),
(6,3,57,58,117,90,59,70),
(6,3,58,59,119,91,60,71),
(6,3,59,60,121,93,61,72),
(6,3,60,61,123,94,62,74),
(6,3,61,61,125,96,63,75),
(6,3,62,62,128,97,64,76),
(6,3,63,63,130,99,65,77),
(6,3,64,64,132,100,66,78),
(6,3,65,65,134,102,67,79),
(6,3,66,66,137,104,68,80),
(6,3,67,66,139,105,69,81),
(6,3,68,67,141,107,70,83),
(6,3,69,68,144,108,71,84),
(6,3,70,69,146,110,72,85),
(6,3,71,70,149,112,73,86),
(6,3,72,71,152,114,74,87),
(6,3,73,72,155,116,75,89),
(6,3,74,73,158,118,77,90),
(6,3,75,74,161,120,78,92),
(6,3,76,75,164,122,79,93),
(6,3,77,76,167,124,81,95),
(6,3,78,77,176,126,85,96),
(6,3,79,78,179,128,86,98),
(6,3,80,79,183,130,88,99),
(6,6,1,28,15,24,15,22),
(6,6,2,29,16,25,15,22),
(6,6,3,31,17,26,15,23),
(6,6,4,32,17,27,15,23),
(6,6,5,33,18,29,15,23),
(6,6,6,34,19,30,15,23),
(6,6,7,36,20,31,16,24),
(6,6,8,37,21,32,16,24),
(6,6,9,38,22,34,16,24),
(6,6,10,40,22,35,16,25),
(6,6,11,41,23,36,16,25),
(6,6,12,43,24,37,16,25),
(6,6,13,44,25,39,16,26),
(6,6,14,46,26,40,16,26),
(6,6,15,47,27,41,17,26),
(6,6,16,48,28,43,17,27),
(6,6,17,50,29,44,17,27),
(6,6,18,51,30,45,17,27),
(6,6,19,53,31,47,17,28),
(6,6,20,54,32,48,17,28),
(6,6,21,56,33,50,17,28),
(6,6,22,58,34,51,18,29),
(6,6,23,59,35,52,18,29),
(6,6,24,61,36,54,18,30),
(6,6,25,62,37,55,18,30),
(6,6,26,64,38,57,18,30),
(6,6,27,66,39,58,18,31),
(6,6,28,67,40,60,18,31),
(6,6,29,69,41,61,19,32),
(6,6,30,71,42,63,19,32),
(6,6,31,72,43,64,19,32),
(6,6,32,74,44,66,19,33),
(6,6,33,76,45,67,19,33),
(6,6,34,77,46,69,20,34),
(6,6,35,79,47,71,20,34),
(6,6,36,81,48,72,20,35),
(6,6,37,83,49,74,20,35),
(6,6,38,85,50,76,20,35),
(6,6,39,86,51,77,21,36),
(6,6,40,88,53,79,21,36),
(6,6,41,90,54,81,21,37),
(6,6,42,92,55,82,21,37),
(6,6,43,94,56,84,21,38),
(6,6,44,96,57,86,22,38),
(6,6,45,98,58,87,22,39),
(6,6,46,99,60,89,22,39),
(6,6,47,101,60,91,22,40),
(6,6,48,103,61,93,22,40),
(6,6,49,105,62,94,23,41),
(6,6,50,107,63,96,23,41),
(6,6,51,109,64,97,23,42),
(6,6,52,110,65,98,23,42),
(6,6,53,111,66,99,24,43),
(6,6,54,112,67,100,24,44),
(6,6,55,113,68,101,24,44),
(6,6,56,116,70,104,24,45),
(6,6,57,121,71,106,24,45),
(6,6,58,123,72,108,25,46),
(6,6,59,123,74,110,25,46),
(6,6,60,125,75,112,25,47),
(6,6,61,127,76,114,25,48),
(6,6,62,133,78,116,25,48),
(6,6,63,135,79,119,26,49),
(6,6,64,139,81,121,26,49),
(6,6,65,142,82,123,26,50),
(6,6,66,146,84,126,26,51),
(6,6,67,150,85,132,27,51),
(6,6,68,153,87,137,27,52),
(6,6,69,157,88,140,27,53),
(6,6,70,160,90,143,27,53),
(6,6,71,163,92,146,28,54),
(6,6,72,165,93,148,28,55),
(6,6,73,167,95,150,28,56),
(6,6,74,171,97,153,28,56),
(6,6,75,174,98,156,29,57),
(6,6,76,178,100,156,29,58),
(6,6,77,179,102,156,29,59),
(6,6,78,179,103,156,29,59),
(6,6,79,182,105,159,30,60),
(6,6,80,185,107,162,30,61),
(6,7,1,26,15,23,16,24),
(6,7,2,27,15,24,17,25),
(6,7,3,28,16,25,18,26),
(6,7,4,28,16,26,19,27),
(6,7,5,29,17,27,20,28),
(6,7,6,30,17,28,21,29),
(6,7,7,31,18,29,22,30),
(6,7,8,32,18,30,23,31),
(6,7,9,33,19,31,24,32),
(6,7,10,34,19,32,25,33),
(6,7,11,35,20,33,26,35),
(6,7,12,35,20,34,27,36),
(6,7,13,36,21,35,28,37),
(6,7,14,37,21,36,29,38),
(6,7,15,38,22,37,30,39),
(6,7,16,39,22,39,31,40),
(6,7,17,40,23,40,32,42),
(6,7,18,41,23,41,33,43),
(6,7,19,42,24,42,34,44),
(6,7,20,43,24,43,35,45),
(6,7,21,44,25,44,36,46),
(6,7,22,45,25,45,37,48),
(6,7,23,46,26,47,38,49),
(6,7,24,47,27,48,40,50),
(6,7,25,48,27,49,41,51),
(6,7,26,49,28,50,42,53),
(6,7,27,51,28,52,43,54),
(6,7,28,52,29,53,44,55),
(6,7,29,53,29,54,45,57),
(6,7,30,54,30,55,47,58),
(6,7,31,55,31,57,48,59),
(6,7,32,56,31,58,49,61),
(6,7,33,57,32,59,50,62),
(6,7,34,58,33,61,51,64),
(6,7,35,60,33,62,53,65),
(6,7,36,61,34,63,54,66),
(6,7,37,62,34,65,55,68),
(6,7,38,63,35,66,57,69),
(6,7,39,64,36,67,58,71),
(6,7,40,66,36,69,59,72),
(6,7,41,67,37,70,60,74),
(6,7,42,68,38,72,62,75),
(6,7,43,69,38,73,63,77),
(6,7,44,70,39,74,64,78),
(6,7,45,72,40,76,66,80),
(6,7,46,73,41,77,67,81),
(6,7,47,74,41,79,69,83),
(6,7,48,76,42,80,70,84),
(6,7,49,77,43,82,71,86),
(6,7,50,78,43,83,73,88),
(6,7,51,80,44,85,74,89),
(6,7,52,81,45,86,76,91),
(6,7,53,82,46,88,77,92),
(6,7,54,84,46,90,78,94),
(6,7,55,85,47,91,80,96),
(6,7,56,86,48,93,81,97),
(6,7,57,88,49,94,83,99),
(6,7,58,89,49,96,84,101),
(6,7,59,91,50,97,86,102),
(6,7,60,92,51,99,87,104),
(6,7,61,94,52,101,89,106),
(6,7,62,95,52,102,90,108),
(6,7,63,96,53,104,92,109),
(6,7,64,98,54,106,93,111),
(6,7,65,99,55,107,95,113),
(6,7,66,101,56,109,97,115),
(6,7,67,102,57,111,98,117),
(6,7,68,104,57,113,100,118),
(6,7,69,105,58,114,101,120),
(6,7,70,107,59,116,103,122),
(6,7,71,108,60,118,113,124),
(6,7,72,110,61,120,117,127),
(6,7,73,112,62,122,119,129),
(6,7,74,114,63,125,122,131),
(6,7,75,116,64,127,124,133),
(6,7,76,118,65,129,126,136),
(6,7,77,119,66,131,128,138),
(6,7,78,121,67,133,130,140),
(6,7,79,123,68,136,133,143),
(6,7,80,125,69,138,135,145),
(6,11,1,26,15,22,17,24),
(6,11,2,27,16,23,18,25),
(6,11,3,27,16,23,19,26),
(6,11,4,28,17,24,20,27),
(6,11,5,28,17,25,21,29),
(6,11,6,29,18,25,22,30),
(6,11,7,29,18,26,23,31),
(6,11,8,30,19,27,24,32),
(6,11,9,30,19,27,26,34),
(6,11,10,31,20,28,27,35),
(6,11,11,32,20,29,28,36),
(6,11,12,32,21,29,29,37),
(6,11,13,33,21,30,30,39),
(6,11,14,33,22,31,31,40),
(6,11,15,34,23,32,32,41),
(6,11,16,35,23,32,34,43),
(6,11,17,35,24,33,35,44),
(6,11,18,36,24,34,36,45),
(6,11,19,37,25,35,37,47),
(6,11,20,37,26,35,39,48),
(6,11,21,38,26,36,40,50),
(6,11,22,39,27,37,41,51),
(6,11,23,39,28,38,42,52),
(6,11,24,40,28,39,44,54),
(6,11,25,41,29,39,45,55),
(6,11,26,41,30,40,46,57),
(6,11,27,42,30,41,47,58),
(6,11,28,43,31,42,49,60),
(6,11,29,44,32,43,50,61),
(6,11,30,44,32,44,52,63),
(6,11,31,45,33,44,53,64),
(6,11,32,46,34,45,54,66),
(6,11,33,47,34,46,56,67),
(6,11,34,47,35,47,57,69),
(6,11,35,48,36,48,58,71),
(6,11,36,49,36,49,60,72),
(6,11,37,50,37,50,61,74),
(6,11,38,51,38,51,63,76),
(6,11,39,52,39,52,64,77),
(6,11,40,52,39,53,66,79),
(6,11,41,53,40,54,67,81),
(6,11,42,54,41,55,69,82),
(6,11,43,55,42,56,70,84),
(6,11,44,56,43,57,72,86),
(6,11,45,57,43,57,73,87),
(6,11,46,57,44,58,75,89),
(6,11,47,58,45,60,76,91),
(6,11,48,59,46,61,78,93),
(6,11,49,60,47,62,79,94),
(6,11,50,61,47,63,81,96),
(6,11,51,62,48,64,83,98),
(6,11,52,63,49,65,84,100),
(6,11,53,64,50,66,86,102),
(6,11,54,65,51,67,87,104),
(6,11,55,66,51,68,89,105),
(6,11,56,67,52,69,91,107),
(6,11,57,68,53,70,92,109),
(6,11,58,69,54,71,94,111),
(6,11,59,70,55,72,96,113),
(6,11,60,71,56,73,97,115),
(6,11,61,72,57,74,99,117),
(6,11,62,73,58,76,101,119),
(6,11,63,74,59,77,103,121),
(6,11,64,75,59,78,104,123),
(6,11,65,76,60,79,106,125),
(6,11,66,77,61,80,108,127),
(6,11,67,78,62,81,110,129),
(6,11,68,79,63,83,111,131),
(6,11,69,80,64,84,113,133),
(6,11,70,81,65,85,115,135),
(6,11,71,83,66,86,117,137),
(6,11,72,84,68,88,120,140),
(6,11,73,85,69,89,122,142),
(6,11,74,86,70,91,124,145),
(6,11,75,88,71,92,126,147),
(6,11,76,89,72,94,128,150),
(6,11,77,90,73,95,131,153),
(6,11,78,92,75,97,133,155),
(6,11,79,93,76,98,136,158),
(6,11,80,94,77,100,138,185),
(7,1,1,18,23,21,24,20),
(7,1,2,19,24,22,24,20),
(7,1,3,21,25,23,24,21),
(7,1,4,22,25,25,24,21),
(7,1,5,23,26,26,24,21),
(7,1,6,25,27,27,24,21),
(7,1,7,26,28,28,24,22),
(7,1,8,27,29,29,25,22),
(7,1,9,29,29,31,25,22),
(7,1,10,30,30,32,25,23),
(7,1,11,32,31,33,25,23),
(7,1,12,33,32,34,25,23),
(7,1,13,34,33,36,25,24),
(7,1,14,36,34,37,25,24),
(7,1,15,37,35,38,25,24),
(7,1,16,39,36,40,25,25),
(7,1,17,40,36,41,25,25),
(7,1,18,42,37,43,26,25),
(7,1,19,43,38,44,26,26),
(7,1,20,45,39,45,26,26),
(7,1,21,47,40,47,26,26),
(7,1,22,48,41,48,26,27),
(7,1,23,50,42,50,26,27),
(7,1,24,51,43,51,26,28),
(7,1,25,53,44,52,27,28),
(7,1,26,55,45,54,27,28),
(7,1,27,56,46,55,27,29),
(7,1,28,58,47,57,27,29),
(7,1,29,59,48,58,27,30),
(7,1,30,61,49,60,27,30),
(7,1,31,63,50,62,27,30),
(7,1,32,65,51,63,28,31),
(7,1,33,66,52,65,28,31),
(7,1,34,68,53,66,28,32),
(7,1,35,70,55,68,28,32),
(7,1,36,72,56,69,28,33),
(7,1,37,73,57,71,29,33),
(7,1,38,75,58,73,29,34),
(7,1,39,77,59,74,29,34),
(7,1,40,79,60,76,29,35),
(7,1,41,81,61,78,29,35),
(7,1,42,82,62,79,30,35),
(7,1,43,84,64,81,30,36),
(7,1,44,86,65,83,30,36),
(7,1,45,88,66,85,30,37),
(7,1,46,90,67,86,30,37),
(7,1,47,92,68,88,31,38),
(7,1,48,94,70,90,31,38),
(7,1,49,96,71,92,31,39),
(7,1,50,98,72,93,31,40),
(7,1,51,100,73,95,32,40),
(7,1,52,102,75,97,32,41),
(7,1,53,104,76,99,32,41),
(7,1,54,106,77,101,32,42),
(7,1,55,108,78,103,33,42),
(7,1,56,110,80,104,33,43),
(7,1,57,112,81,106,33,43),
(7,1,58,114,82,108,33,44),
(7,1,59,116,84,110,34,44),
(7,1,60,118,85,112,34,45),
(7,1,61,120,86,114,34,46),
(7,1,62,122,88,116,35,46),
(7,1,63,125,89,118,35,47),
(7,1,64,127,91,120,35,47),
(7,1,65,129,92,122,35,48),
(7,1,66,131,93,124,36,49),
(7,1,67,133,95,126,36,49),
(7,1,68,136,96,128,36,50),
(7,1,69,138,98,130,37,50),
(7,1,70,140,99,132,37,51),
(7,1,71,143,100,134,37,52),
(7,1,72,145,102,137,37,53),
(7,1,73,148,104,139,37,54),
(7,1,74,151,105,142,38,54),
(7,1,75,154,107,144,38,55),
(7,1,76,157,109,147,38,56),
(7,1,77,163,111,153,39,57),
(7,1,78,169,112,158,39,57),
(7,1,79,172,114,161,39,58),
(7,1,80,175,116,164,40,59),
(7,4,1,16,26,20,24,20),
(7,4,2,17,27,21,24,20),
(7,4,3,18,29,21,24,21),
(7,4,4,18,30,22,24,21),
(7,4,5,19,32,23,25,21),
(7,4,6,20,33,24,25,22),
(7,4,7,21,35,24,25,22),
(7,4,8,22,36,25,25,23),
(7,4,9,22,38,26,25,23),
(7,4,10,23,39,26,25,23),
(7,4,11,24,41,27,25,24),
(7,4,12,25,42,28,26,24),
(7,4,13,26,44,29,26,25),
(7,4,14,27,46,30,26,25),
(7,4,15,28,47,30,26,25),
(7,4,16,28,49,31,26,26),
(7,4,17,29,50,32,27,26),
(7,4,18,30,52,33,27,27),
(7,4,19,31,54,34,27,27),
(7,4,20,32,56,35,27,28),
(7,4,21,33,57,35,27,28),
(7,4,22,34,59,36,28,29),
(7,4,23,35,61,37,28,29),
(7,4,24,36,62,38,28,30),
(7,4,25,37,64,39,28,30),
(7,4,26,38,66,40,29,31),
(7,4,27,39,68,41,29,31),
(7,4,28,40,70,42,29,32),
(7,4,29,41,72,43,29,32),
(7,4,30,42,73,43,29,33),
(7,4,31,43,75,44,30,33),
(7,4,32,44,77,45,30,34),
(7,4,33,45,79,46,30,34),
(7,4,34,46,81,47,31,35),
(7,4,35,47,83,48,31,35),
(7,4,36,48,85,49,31,36),
(7,4,37,49,87,50,31,36),
(7,4,38,50,89,51,32,37),
(7,4,39,51,91,52,32,38),
(7,4,40,53,93,53,32,38),
(7,4,41,54,95,54,33,39),
(7,4,42,55,97,55,33,39),
(7,4,43,56,99,56,33,40),
(7,4,44,57,101,57,33,40),
(7,4,45,58,103,59,34,41),
(7,4,46,59,105,60,34,42),
(7,4,47,61,107,61,34,42),
(7,4,48,62,110,62,35,43),
(7,4,49,63,112,63,35,44),
(7,4,50,64,114,64,35,44),
(7,4,51,65,116,65,36,45),
(7,4,52,67,118,66,36,45),
(7,4,53,68,121,67,36,46),
(7,4,54,69,123,69,37,47),
(7,4,55,70,125,70,37,47),
(7,4,56,72,127,71,37,48),
(7,4,57,73,130,72,38,49),
(7,4,58,74,132,73,38,49),
(7,4,59,75,134,74,39,50),
(7,4,60,77,137,76,39,51),
(7,4,61,78,139,77,39,51),
(7,4,62,79,141,78,40,52),
(7,4,63,81,144,79,40,53),
(7,4,64,82,146,80,41,54),
(7,4,65,83,149,82,41,54),
(7,4,66,85,151,83,41,55),
(7,4,67,86,154,84,42,56),
(7,4,68,87,156,85,42,57),
(7,4,69,89,158,87,43,57),
(7,4,70,90,161,88,43,58),
(7,4,71,92,164,89,44,59),
(7,4,72,94,167,91,45,59),
(7,4,73,95,170,93,45,60),
(7,4,74,97,173,94,46,61),
(7,4,75,99,176,96,46,62),
(7,4,76,100,179,97,46,63),
(7,4,77,102,182,102,47,64),
(7,4,78,104,186,105,47,65),
(7,4,79,106,189,106,48,66),
(7,4,80,108,192,108,48,67),
(7,6,1,18,23,21,24,20),
(7,6,2,19,24,22,24,20),
(7,6,3,21,25,23,24,21),
(7,6,4,22,25,25,24,21),
(7,6,5,23,26,26,24,21),
(7,6,6,25,27,27,24,21),
(7,6,7,26,28,28,24,22),
(7,6,8,27,29,29,25,22),
(7,6,9,29,29,31,25,22),
(7,6,10,30,30,32,25,23),
(7,6,11,32,31,33,25,23),
(7,6,12,33,32,34,25,23),
(7,6,13,34,33,36,25,24),
(7,6,14,36,34,37,25,24),
(7,6,15,37,35,38,25,24),
(7,6,16,39,36,40,25,25),
(7,6,17,40,36,41,25,25),
(7,6,18,42,37,43,26,25),
(7,6,19,43,38,44,26,26),
(7,6,20,45,39,45,26,26),
(7,6,21,47,40,47,26,26),
(7,6,22,48,41,48,26,27),
(7,6,23,50,42,50,26,27),
(7,6,24,51,43,51,26,28),
(7,6,25,53,44,52,27,28),
(7,6,26,55,45,54,27,28),
(7,6,27,56,46,55,27,29),
(7,6,28,58,47,57,27,29),
(7,6,29,59,48,58,27,30),
(7,6,30,61,49,60,27,30),
(7,6,31,63,50,62,27,30),
(7,6,32,65,51,63,28,31),
(7,6,33,66,52,65,28,31),
(7,6,34,68,53,66,28,32),
(7,6,35,70,55,68,28,32),
(7,6,36,72,56,69,28,33),
(7,6,37,73,57,71,29,33),
(7,6,38,75,58,73,29,34),
(7,6,39,77,59,74,29,34),
(7,6,40,79,60,76,29,35),
(7,6,41,81,61,78,29,35),
(7,6,42,82,62,79,30,35),
(7,6,43,84,64,81,30,36),
(7,6,44,86,65,83,30,36),
(7,6,45,88,66,85,30,37),
(7,6,46,90,67,86,30,37),
(7,6,47,92,68,88,31,38),
(7,6,48,94,70,90,31,38),
(7,6,49,96,71,92,31,39),
(7,6,50,98,72,93,31,40),
(7,6,51,99,72,93,32,40),
(7,6,52,100,73,95,32,41),
(7,6,53,101,74,96,32,41),
(7,6,54,102,75,97,32,42),
(7,6,55,103,76,98,33,42),
(7,6,56,106,78,101,33,43),
(7,6,57,111,79,103,33,43),
(7,6,58,113,80,105,34,44),
(7,6,59,116,82,107,34,44),
(7,6,60,118,83,109,34,45),
(7,6,61,120,84,111,34,46),
(7,6,62,127,86,119,34,46),
(7,6,63,129,87,122,35,47),
(7,6,64,132,89,125,35,47),
(7,6,65,135,90,127,35,48),
(7,6,66,137,92,130,35,49),
(7,6,67,138,93,130,36,49),
(7,6,68,140,95,131,36,50),
(7,6,69,142,96,131,36,51),
(7,6,70,145,98,132,36,51),
(7,6,71,148,100,135,37,52),
(7,6,72,150,101,137,37,53),
(7,6,73,153,103,140,37,54),
(7,6,74,154,105,142,37,54),
(7,6,75,155,106,145,38,55),
(7,6,76,158,108,151,38,56),
(7,6,77,161,110,157,38,57),
(7,6,78,164,111,162,38,57),
(7,6,79,167,113,165,39,58),
(7,6,80,170,115,168,39,59),
(7,8,1,15,23,19,27,22),
(7,8,2,15,23,19,28,23),
(7,8,3,15,23,20,30,25),
(7,8,4,15,23,20,31,26),
(7,8,5,15,24,20,32,27),
(7,8,6,15,24,20,34,29),
(7,8,7,16,24,21,35,30),
(7,8,8,16,24,21,37,31),
(7,8,9,16,24,21,38,33),
(7,8,10,16,24,22,40,34),
(7,8,11,16,25,22,41,36),
(7,8,12,16,25,22,42,37),
(7,8,13,16,25,23,44,38),
(7,8,14,16,25,23,45,40),
(7,8,15,17,25,23,47,41),
(7,8,16,17,25,24,49,43),
(7,8,17,17,26,24,50,44),
(7,8,18,17,26,24,52,46),
(7,8,19,17,26,25,53,47),
(7,8,20,17,26,25,55,49),
(7,8,21,17,26,26,57,51),
(7,8,22,18,27,26,58,52),
(7,8,23,18,27,26,60,54),
(7,8,24,18,27,27,61,55),
(7,8,25,18,27,27,63,57),
(7,8,26,18,28,27,65,59),
(7,8,27,18,28,28,67,60),
(7,8,28,18,28,28,68,62),
(7,8,29,19,28,29,70,64),
(7,8,30,19,29,29,72,65),
(7,8,31,19,29,30,74,67),
(7,8,32,19,29,30,75,69),
(7,8,33,19,29,30,77,70),
(7,8,34,20,30,31,79,72),
(7,8,35,20,30,31,81,74),
(7,8,36,20,30,32,83,76),
(7,8,37,20,30,32,85,78),
(7,8,38,20,31,33,86,79),
(7,8,39,21,31,33,88,81),
(7,8,40,21,31,34,90,83),
(7,8,41,21,32,34,92,85),
(7,8,42,21,32,35,94,87),
(7,8,43,21,32,35,96,89),
(7,8,44,22,32,36,98,91),
(7,8,45,22,33,36,100,92),
(7,8,46,22,33,37,102,94),
(7,8,47,22,33,37,104,96),
(7,8,48,22,34,38,106,98),
(7,8,49,23,34,38,108,100),
(7,8,50,23,34,39,110,102),
(7,8,51,23,35,39,112,104),
(7,8,52,23,35,40,114,106),
(7,8,53,24,35,40,117,108),
(7,8,54,24,36,41,119,110),
(7,8,55,24,36,41,121,112),
(7,8,56,24,37,42,123,114),
(7,8,57,25,37,42,125,117),
(7,8,58,25,37,43,127,119),
(7,8,59,25,38,43,130,121),
(7,8,60,25,38,44,132,123),
(7,8,61,26,38,45,134,125),
(7,8,62,26,39,45,136,127),
(7,8,63,26,39,46,139,129),
(7,8,64,26,40,46,141,132),
(7,8,65,27,40,47,143,134),
(7,8,66,27,40,48,146,136),
(7,8,67,27,41,48,148,138),
(7,8,68,27,41,49,150,140),
(7,8,69,28,42,49,153,143),
(7,8,70,28,42,50,155,145),
(7,8,71,28,42,51,168,148),
(7,8,72,28,43,52,168,151),
(7,8,73,28,43,53,171,154),
(7,8,74,29,44,53,174,156),
(7,8,75,29,44,54,177,159),
(7,8,76,29,44,55,180,162),
(7,8,77,30,45,56,183,165),
(7,8,78,30,45,56,186,168),
(7,8,79,30,46,57,190,171),
(7,8,80,31,46,58,193,174),
(7,9,1,15,23,20,26,22),
(7,9,2,15,23,21,27,23),
(7,9,3,16,24,21,28,24),
(7,9,4,16,24,22,29,25),
(7,9,5,16,24,22,31,27),
(7,9,6,17,25,23,32,28),
(7,9,7,17,25,23,33,29),
(7,9,8,17,26,24,34,30),
(7,9,9,17,26,25,36,31),
(7,9,10,18,26,25,37,33),
(7,9,11,18,27,26,38,34),
(7,9,12,18,27,26,39,35),
(7,9,13,19,28,27,41,36),
(7,9,14,19,28,28,42,38),
(7,9,15,20,28,28,43,39),
(7,9,16,20,29,29,45,40),
(7,9,17,20,29,30,46,42),
(7,9,18,21,30,30,47,43),
(7,9,19,21,30,31,49,44),
(7,9,20,21,31,32,50,46),
(7,9,21,22,31,32,51,47),
(7,9,22,22,31,33,53,49),
(7,9,23,23,32,34,54,50),
(7,9,24,23,32,34,56,51),
(7,9,25,23,33,35,57,53),
(7,9,26,24,33,36,59,54),
(7,9,27,24,34,37,60,56),
(7,9,28,25,34,37,62,57),
(7,9,29,25,35,38,63,59),
(7,9,30,25,35,39,65,60),
(7,9,31,26,36,40,66,62),
(7,9,32,26,36,40,68,63),
(7,9,33,27,37,41,69,65),
(7,9,34,27,38,42,71,66),
(7,9,35,28,38,43,73,68),
(7,9,36,28,39,43,74,69),
(7,9,37,28,39,44,76,71),
(7,9,38,29,40,45,77,73),
(7,9,39,29,40,46,79,74),
(7,9,40,30,41,47,81,76),
(7,9,41,30,41,48,82,78),
(7,9,42,31,42,48,84,79),
(7,9,43,31,43,49,86,81),
(7,9,44,32,43,50,88,83),
(7,9,45,32,44,51,89,84),
(7,9,46,33,44,52,91,86),
(7,9,47,33,45,53,93,88),
(7,9,48,34,46,54,95,89),
(7,9,49,34,46,54,96,91),
(7,9,50,35,47,55,98,93),
(7,9,51,35,48,56,100,95),
(7,9,52,36,48,57,102,97),
(7,9,53,36,49,58,104,98),
(7,9,54,37,50,59,105,100),
(7,9,55,37,50,60,107,102),
(7,9,56,38,51,61,109,104),
(7,9,57,38,52,62,111,106),
(7,9,58,39,52,63,113,108),
(7,9,59,40,53,64,115,109),
(7,9,60,40,54,65,117,111),
(7,9,61,41,54,66,119,113),
(7,9,62,41,55,67,121,115),
(7,9,63,42,56,68,123,117),
(7,9,64,42,57,69,125,119),
(7,9,65,43,57,70,127,121),
(7,9,66,44,58,71,129,123),
(7,9,67,44,59,72,131,125),
(7,9,68,45,59,73,133,127),
(7,9,69,45,60,74,135,129),
(7,9,70,46,61,75,137,131),
(7,9,71,47,62,84,147,142),
(7,9,72,48,62,85,148,144),
(7,9,73,49,63,85,153,147),
(7,9,74,49,64,88,153,150),
(7,9,75,50,65,90,155,152),
(7,9,76,51,66,91,158,155),
(7,9,77,52,67,92,161,158),
(7,9,78,52,68,93,163,161),
(7,9,79,53,69,95,166,164),
(7,9,80,54,70,96,170,166),
(8,1,1,24,22,23,16,21),
(8,1,2,25,23,24,16,21),
(8,1,3,27,24,25,16,22),
(8,1,4,28,24,26,16,22),
(8,1,5,29,25,28,16,22),
(8,1,6,31,26,29,16,22),
(8,1,7,32,27,30,17,23),
(8,1,8,33,28,31,17,23),
(8,1,9,35,28,33,17,23),
(8,1,10,36,29,34,17,24),
(8,1,11,37,30,35,17,24),
(8,1,12,39,31,36,17,24),
(8,1,13,40,32,38,17,25),
(8,1,14,42,33,39,17,25),
(8,1,15,43,34,40,18,25),
(8,1,16,45,35,42,18,26),
(8,1,17,46,35,43,18,26),
(8,1,18,48,36,44,18,26),
(8,1,19,49,37,46,18,27),
(8,1,20,51,38,47,18,27),
(8,1,21,52,39,49,18,27),
(8,1,22,54,40,50,18,28),
(8,1,23,55,41,51,19,28),
(8,1,24,57,42,53,19,29),
(8,1,25,59,43,54,19,29),
(8,1,26,60,44,56,19,29),
(8,1,27,62,45,57,19,30),
(8,1,28,63,46,59,19,30),
(8,1,29,65,47,60,20,31),
(8,1,30,67,48,62,20,31),
(8,1,31,69,49,63,20,31),
(8,1,32,70,50,65,20,32),
(8,1,33,72,51,67,20,32),
(8,1,34,74,53,68,20,33),
(8,1,35,75,54,70,21,33),
(8,1,36,77,55,71,21,34),
(8,1,37,79,56,73,21,34),
(8,1,38,81,57,75,21,35),
(8,1,39,83,58,76,21,35),
(8,1,40,84,59,78,22,35),
(8,1,41,86,60,80,22,36),
(8,1,42,88,62,81,22,36),
(8,1,43,90,63,83,22,37),
(8,1,44,92,64,85,22,37),
(8,1,45,94,65,86,23,38),
(8,1,46,96,66,88,23,38),
(8,1,47,98,67,90,23,39),
(8,1,48,100,69,92,23,39),
(8,1,49,102,70,93,24,40),
(8,1,50,103,71,95,24,40),
(8,1,51,105,72,97,24,41),
(8,1,52,107,74,99,24,42),
(8,1,53,109,75,101,25,42),
(8,1,54,112,76,103,25,43),
(8,1,55,114,78,104,25,43),
(8,1,56,116,79,106,25,44),
(8,1,57,118,80,108,25,44),
(8,1,58,120,81,110,26,45),
(8,1,59,122,83,112,26,45),
(8,1,60,124,84,114,26,46),
(8,1,61,126,85,116,27,47),
(8,1,62,128,87,118,27,47),
(8,1,63,130,88,120,27,48),
(8,1,64,133,90,122,27,48),
(8,1,65,135,91,124,28,49),
(8,1,66,137,92,126,28,50),
(8,1,67,139,94,128,28,50),
(8,1,68,141,95,130,28,51),
(8,1,69,144,97,132,29,51),
(8,1,70,146,98,134,29,52),
(8,1,71,149,99,136,29,53),
(8,1,72,151,101,139,29,54),
(8,1,73,154,103,141,29,55),
(8,1,74,157,104,144,30,55),
(8,1,75,166,106,151,30,56),
(8,1,76,172,108,157,30,57),
(8,1,77,175,110,161,31,58),
(8,1,78,179,111,163,31,58),
(8,1,79,182,113,164,31,59),
(8,1,80,185,115,169,32,60),
(8,3,1,21,25,22,16,22),
(8,3,2,21,26,23,17,23),
(8,3,3,22,28,24,17,23),
(8,3,4,22,29,25,18,24),
(8,3,5,23,30,26,18,25),
(8,3,6,23,32,27,19,25),
(8,3,7,24,33,28,20,26),
(8,3,8,24,35,28,20,26),
(8,3,9,25,36,29,21,27),
(8,3,10,25,38,30,21,28),
(8,3,11,25,39,31,22,29),
(8,3,12,26,41,32,23,29),
(8,3,13,26,42,33,23,30),
(8,3,14,27,44,34,24,31),
(8,3,15,27,45,35,25,31),
(8,3,16,28,47,36,25,32),
(8,3,17,28,48,38,26,33),
(8,3,18,29,50,39,27,34),
(8,3,19,29,51,40,28,34),
(8,3,20,30,53,41,28,35),
(8,3,21,31,55,42,29,36),
(8,3,22,31,56,43,30,37),
(8,3,23,32,58,44,30,37),
(8,3,24,32,60,45,31,38),
(8,3,25,33,61,46,32,39),
(8,3,26,33,63,48,33,40),
(8,3,27,34,65,49,33,41),
(8,3,28,35,66,50,34,41),
(8,3,29,35,68,51,35,42),
(8,3,30,36,70,52,36,43),
(8,3,31,36,72,53,37,44),
(8,3,32,37,73,55,37,45),
(8,3,33,38,75,56,38,46),
(8,3,34,38,77,57,39,47),
(8,3,35,39,79,58,40,48),
(8,3,36,39,81,60,41,48),
(8,3,37,40,83,61,41,49),
(8,3,38,41,85,62,42,50),
(8,3,39,41,86,63,43,51),
(8,3,40,42,88,65,44,52),
(8,3,41,43,90,66,45,53),
(8,3,42,43,92,67,46,54),
(8,3,43,44,94,69,47,55),
(8,3,44,45,96,70,47,56),
(8,3,45,45,98,71,48,57),
(8,3,46,46,100,73,49,58),
(8,3,47,47,102,74,50,59),
(8,3,48,48,104,76,51,60),
(8,3,49,48,106,77,52,61),
(8,3,50,49,108,78,53,62),
(8,3,51,50,110,80,54,63),
(8,3,52,51,113,81,55,64),
(8,3,53,51,115,83,56,65),
(8,3,54,52,117,84,57,66),
(8,3,55,53,119,86,58,67),
(8,3,56,54,121,87,59,68),
(8,3,57,54,123,89,60,69),
(8,3,58,55,126,90,61,70),
(8,3,59,56,128,92,62,71),
(8,3,60,57,130,93,63,73),
(8,3,61,58,132,95,64,74),
(8,3,62,58,134,96,65,75),
(8,3,63,59,137,98,66,76),
(8,3,64,60,139,99,67,77),
(8,3,65,61,141,101,68,78),
(8,3,66,62,144,103,69,79),
(8,3,67,62,146,104,70,80),
(8,3,68,63,148,106,71,82),
(8,3,69,64,151,107,72,83),
(8,3,70,65,153,109,73,84),
(8,3,71,66,156,111,74,85),
(8,3,72,67,159,113,75,86),
(8,3,73,68,162,115,76,88),
(8,3,74,69,165,117,78,89),
(8,3,75,70,174,119,82,91),
(8,3,76,71,177,121,83,92),
(8,3,77,72,180,123,85,94),
(8,3,78,73,184,125,86,95),
(8,3,79,74,187,127,87,97),
(8,3,80,75,190,129,89,98),
(8,4,1,22,25,22,16,21),
(8,4,2,23,26,23,16,21),
(8,4,3,24,28,23,16,22),
(8,4,4,24,29,24,16,22),
(8,4,5,25,31,25,17,22),
(8,4,6,26,32,25,17,23),
(8,4,7,27,34,26,17,23),
(8,4,8,27,35,27,17,24),
(8,4,9,28,37,28,17,24),
(8,4,10,29,38,28,18,24),
(8,4,11,30,40,29,18,25),
(8,4,12,31,41,30,18,25),
(8,4,13,32,43,31,18,26),
(8,4,14,32,45,32,18,26),
(8,4,15,33,46,32,19,26),
(8,4,16,34,48,33,19,27),
(8,4,17,35,50,34,19,27),
(8,4,18,36,51,35,19,28),
(8,4,19,37,53,36,19,28),
(8,4,20,38,55,36,20,29),
(8,4,21,39,56,37,20,29),
(8,4,22,40,58,38,20,30),
(8,4,23,41,60,39,20,30),
(8,4,24,42,62,40,20,31),
(8,4,25,43,63,41,21,31),
(8,4,26,44,65,42,21,32),
(8,4,27,45,67,43,21,32),
(8,4,28,46,69,44,21,33),
(8,4,29,47,71,44,22,33),
(8,4,30,48,72,45,22,34),
(8,4,31,49,74,46,22,34),
(8,4,32,50,76,47,22,35),
(8,4,33,51,78,48,23,35),
(8,4,34,52,80,49,23,36),
(8,4,35,53,82,50,23,36),
(8,4,36,54,84,51,24,37),
(8,4,37,55,86,52,24,37),
(8,4,38,56,88,53,24,38),
(8,4,39,57,90,54,24,38),
(8,4,40,58,92,55,25,39),
(8,4,41,59,94,56,25,40),
(8,4,42,60,96,57,25,40),
(8,4,43,62,98,58,26,41),
(8,4,44,63,100,59,26,41),
(8,4,45,64,102,60,26,42),
(8,4,46,65,104,61,27,43),
(8,4,47,66,107,63,27,43),
(8,4,48,67,109,64,27,44),
(8,4,49,69,111,65,27,44),
(8,4,50,70,113,66,28,45),
(8,4,51,71,115,67,28,46),
(8,4,52,72,117,68,28,46),
(8,4,53,74,120,69,29,47),
(8,4,54,75,122,70,29,48),
(8,4,55,76,124,72,29,48),
(8,4,56,77,126,73,30,49),
(8,4,57,79,129,74,30,50),
(8,4,58,80,131,75,30,50),
(8,4,59,81,133,76,31,51),
(8,4,60,82,136,77,31,52),
(8,4,61,84,138,79,32,52),
(8,4,62,85,140,80,32,53),
(8,4,63,86,143,81,32,54),
(8,4,64,88,145,82,33,55),
(8,4,65,89,148,84,33,55),
(8,4,66,90,150,85,33,56),
(8,4,67,92,153,86,34,57),
(8,4,68,93,155,87,34,58),
(8,4,69,95,157,89,35,58),
(8,4,70,96,160,90,35,59),
(8,4,71,98,163,94,35,60),
(8,4,72,100,166,96,36,60),
(8,4,73,101,169,96,36,61),
(8,4,74,103,172,97,37,62),
(8,4,75,105,175,98,37,63),
(8,4,76,106,178,99,37,64),
(8,4,77,108,181,105,38,65),
(8,4,78,110,185,107,38,66),
(8,4,79,112,188,109,39,67),
(8,4,80,114,191,110,39,68),
(8,5,1,21,22,21,18,24),
(8,5,2,21,22,21,19,25),
(8,5,3,21,22,22,21,27),
(8,5,4,21,23,22,22,28),
(8,5,5,22,23,22,23,29),
(8,5,6,22,23,23,25,31),
(8,5,7,22,23,23,26,32),
(8,5,8,22,24,24,27,34),
(8,5,9,22,24,24,29,35),
(8,5,10,22,24,24,30,37),
(8,5,11,23,24,25,32,38),
(8,5,12,23,24,25,33,40),
(8,5,13,23,25,26,35,41),
(8,5,14,23,25,26,36,43),
(8,5,15,23,25,26,38,44),
(8,5,16,24,26,27,39,46),
(8,5,17,24,26,27,41,47),
(8,5,18,24,26,28,42,49),
(8,5,19,24,26,28,44,50),
(8,5,20,24,27,29,45,52),
(8,5,21,25,27,29,47,54),
(8,5,22,25,27,30,48,55),
(8,5,23,25,28,30,50,57),
(8,5,24,25,28,31,52,59),
(8,5,25,25,28,31,53,60),
(8,5,26,26,28,32,55,62),
(8,5,27,26,29,32,56,64),
(8,5,28,26,29,33,58,65),
(8,5,29,26,29,33,60,67),
(8,5,30,27,30,34,62,69),
(8,5,31,27,30,34,63,71),
(8,5,32,27,30,35,65,73),
(8,5,33,27,31,35,67,74),
(8,5,34,28,31,36,68,76),
(8,5,35,28,32,36,70,78),
(8,5,36,28,32,37,72,80),
(8,5,37,29,32,37,74,82),
(8,5,38,29,33,38,76,84),
(8,5,39,29,33,38,77,86),
(8,5,40,29,33,39,79,87),
(8,5,41,30,34,40,81,89),
(8,5,42,30,34,40,83,91),
(8,5,43,30,35,41,85,93),
(8,5,44,31,35,41,87,95),
(8,5,45,31,35,42,89,97),
(8,5,46,31,36,43,91,99),
(8,5,47,32,36,43,93,101),
(8,5,48,32,37,44,94,103),
(8,5,49,32,37,44,96,105),
(8,5,50,33,37,45,98,107),
(8,5,51,33,38,46,100,110),
(8,5,52,33,38,46,102,112),
(8,5,53,34,39,47,104,114),
(8,5,54,34,39,48,106,116),
(8,5,55,34,40,48,109,118),
(8,5,56,35,40,49,111,120),
(8,5,57,35,41,50,113,122),
(8,5,58,35,41,50,115,125),
(8,5,59,36,42,51,117,127),
(8,5,60,36,42,52,119,129),
(8,5,61,36,42,52,121,131),
(8,5,62,37,43,53,123,133),
(8,5,63,37,43,54,125,136),
(8,5,64,38,44,55,128,138),
(8,5,65,38,44,55,130,140),
(8,5,66,38,45,56,132,143),
(8,5,67,39,45,57,134,145),
(8,5,68,39,46,58,136,147),
(8,5,69,40,46,58,139,150),
(8,5,70,40,47,59,141,152),
(8,5,71,40,48,60,144,155),
(8,5,72,41,48,60,147,158),
(8,5,73,41,49,61,150,161),
(8,5,74,42,49,62,152,164),
(8,5,75,42,50,63,155,167),
(8,5,76,42,51,64,158,170),
(8,5,77,43,51,65,161,173),
(8,5,78,43,52,66,164,176),
(8,5,79,44,52,67,167,179),
(8,5,80,44,53,68,170,182),
(8,6,1,24,22,23,16,21),
(8,6,2,25,23,24,16,21),
(8,6,3,27,24,25,16,22),
(8,6,4,28,24,26,16,22),
(8,6,5,29,25,28,16,22),
(8,6,6,31,26,29,16,22),
(8,6,7,32,27,30,17,23),
(8,6,8,33,28,31,17,23),
(8,6,9,35,28,33,17,23),
(8,6,10,36,29,34,17,24),
(8,6,11,37,30,35,17,24),
(8,6,12,39,31,36,17,24),
(8,6,13,40,32,38,17,25),
(8,6,14,42,33,39,17,25),
(8,6,15,43,34,40,18,25),
(8,6,16,45,35,42,18,26),
(8,6,17,46,35,43,18,26),
(8,6,18,48,36,44,18,26),
(8,6,19,49,37,46,18,27),
(8,6,20,51,38,47,18,27),
(8,6,21,52,39,49,18,27),
(8,6,22,54,40,50,18,28),
(8,6,23,55,41,51,19,28),
(8,6,24,57,42,53,19,29),
(8,6,25,59,43,54,19,29),
(8,6,26,60,44,56,19,29),
(8,6,27,62,45,57,19,30),
(8,6,28,63,46,59,19,30),
(8,6,29,65,47,60,20,31),
(8,6,30,67,48,62,20,31),
(8,6,31,69,49,63,20,31),
(8,6,32,70,50,65,20,32),
(8,6,33,72,51,67,20,32),
(8,6,34,74,53,68,20,33),
(8,6,35,75,54,70,21,33),
(8,6,36,77,55,71,21,34),
(8,6,37,79,56,73,21,34),
(8,6,38,81,57,75,21,35),
(8,6,39,83,58,76,21,35),
(8,6,40,84,59,78,22,35),
(8,6,41,86,60,80,22,36),
(8,6,42,88,62,81,22,36),
(8,6,43,90,63,83,22,37),
(8,6,44,92,64,85,22,37),
(8,6,45,94,65,86,23,38),
(8,6,46,96,66,88,23,38),
(8,6,47,98,67,90,23,39),
(8,6,48,100,69,92,23,39),
(8,6,49,102,70,93,24,40),
(8,6,50,103,71,95,24,40),
(8,6,51,105,72,96,24,41),
(8,6,52,106,74,97,24,42),
(8,6,53,107,73,98,25,42),
(8,6,54,108,74,99,25,43),
(8,6,55,109,75,100,25,43),
(8,6,56,112,77,103,25,44),
(8,6,57,114,78,105,25,44),
(8,6,58,118,79,107,26,45),
(8,6,59,119,81,109,26,45),
(8,6,60,121,82,111,26,46),
(8,6,61,123,83,113,26,47),
(8,6,62,126,85,115,26,47),
(8,6,63,128,86,118,27,48),
(8,6,64,131,88,120,27,48),
(8,6,65,138,89,122,27,49),
(8,6,66,140,91,125,27,50),
(8,6,67,143,92,127,28,50),
(8,6,68,145,94,129,28,51),
(8,6,69,148,95,132,28,52),
(8,6,70,151,97,134,28,52),
(8,6,71,154,99,137,29,53),
(8,6,72,156,100,139,29,54),
(8,6,73,159,102,142,29,55),
(8,6,74,162,104,144,29,55),
(8,6,75,165,105,147,30,56),
(8,6,76,168,107,150,30,57),
(8,6,77,169,109,153,30,58),
(8,6,78,170,110,155,30,58),
(8,6,79,178,112,158,31,59),
(8,6,80,181,114,161,31,60),
(8,7,1,22,22,22,17,23),
(8,7,2,23,22,23,18,24),
(8,7,3,24,23,24,19,25),
(8,7,4,25,23,25,20,26),
(8,7,5,25,24,26,21,27),
(8,7,6,26,24,27,22,28),
(8,7,7,27,25,28,23,29),
(8,7,8,28,25,29,24,30),
(8,7,9,29,25,30,25,31),
(8,7,10,30,26,31,26,33),
(8,7,11,31,26,32,27,34),
(8,7,12,32,27,33,28,35),
(8,7,13,33,27,34,29,36),
(8,7,14,34,28,35,30,37),
(8,7,15,34,28,36,31,38),
(8,7,16,35,29,38,32,39),
(8,7,17,36,29,39,33,41),
(8,7,18,37,30,40,34,42),
(8,7,19,38,30,41,35,43),
(8,7,20,39,31,42,36,44),
(8,7,21,40,32,43,37,45),
(8,7,22,41,32,45,38,47),
(8,7,23,43,33,46,39,48),
(8,7,24,44,33,47,40,49),
(8,7,25,45,34,48,42,51),
(8,7,26,46,34,49,43,52),
(8,7,27,47,35,51,44,53),
(8,7,28,48,35,52,45,54),
(8,7,29,49,36,53,46,56),
(8,7,30,50,37,54,48,57),
(8,7,31,51,37,56,49,59),
(8,7,32,52,38,57,50,60),
(8,7,33,53,38,58,51,61),
(8,7,34,55,39,60,52,63),
(8,7,35,56,40,61,54,64),
(8,7,36,57,40,62,55,66),
(8,7,37,58,41,64,56,67),
(8,7,38,59,42,65,57,68),
(8,7,39,61,42,66,59,70),
(8,7,40,62,43,68,60,71),
(8,7,41,63,44,69,61,73),
(8,7,42,64,44,71,63,74),
(8,7,43,65,45,72,64,76),
(8,7,44,67,46,74,65,77),
(8,7,45,68,46,75,67,79),
(8,7,46,69,47,76,68,80),
(8,7,47,71,48,78,69,82),
(8,7,48,72,49,79,71,83),
(8,7,49,73,49,81,72,85),
(8,7,50,74,50,82,74,87),
(8,7,51,76,51,84,75,88),
(8,7,52,77,51,85,77,90),
(8,7,53,78,52,87,78,92),
(8,7,54,80,53,89,79,93),
(8,7,55,81,54,90,81,95),
(8,7,56,83,55,92,82,96),
(8,7,57,84,55,93,84,98),
(8,7,58,85,56,95,85,100),
(8,7,59,87,57,97,87,102),
(8,7,60,88,58,98,88,103),
(8,7,61,90,58,100,90,105),
(8,7,62,91,59,101,91,107),
(8,7,63,93,60,103,93,108),
(8,7,64,94,61,105,94,110),
(8,7,65,95,62,106,96,112),
(8,7,66,97,63,108,98,114),
(8,7,67,98,63,110,99,116),
(8,7,68,100,64,112,101,117),
(8,7,69,101,65,113,102,119),
(8,7,70,103,66,115,104,121),
(8,7,71,104,67,117,116,123),
(8,7,72,106,68,119,118,126),
(8,7,73,108,69,121,121,128),
(8,7,74,110,70,124,123,130),
(8,7,75,112,71,126,125,132),
(8,7,76,114,72,128,127,135),
(8,7,77,115,73,130,129,137),
(8,7,78,117,74,132,132,139),
(8,7,79,119,75,135,134,142),
(8,7,80,121,76,137,136,144),
(8,8,1,21,22,21,19,23),
(8,8,2,21,22,21,20,24),
(8,8,3,21,22,22,22,26),
(8,8,4,21,22,22,23,27),
(8,8,5,21,23,22,25,28),
(8,8,6,21,23,22,26,30),
(8,8,7,21,23,23,27,31),
(8,8,8,22,23,23,29,32),
(8,8,9,22,23,23,30,34),
(8,8,10,22,23,24,32,35),
(8,8,11,22,24,24,33,37),
(8,8,12,22,24,24,35,38),
(8,8,13,22,24,25,36,39),
(8,8,14,22,24,25,38,41),
(8,8,15,22,24,25,39,42),
(8,8,16,22,24,26,41,44),
(8,8,17,23,25,26,42,45),
(8,8,18,23,25,26,44,47),
(8,8,19,23,25,27,46,48),
(8,8,20,23,25,27,47,50),
(8,8,21,23,25,27,49,51),
(8,8,22,23,26,28,51,53),
(8,8,23,23,26,28,52,55),
(8,8,24,24,26,29,54,56),
(8,8,25,24,26,29,56,58),
(8,8,26,24,27,29,57,60),
(8,8,27,24,27,30,59,61),
(8,8,28,24,27,30,61,63),
(8,8,29,24,27,31,63,65),
(8,8,30,24,28,31,64,66),
(8,8,31,25,28,31,66,68),
(8,8,32,25,28,32,68,70),
(8,8,33,25,28,32,70,71),
(8,8,34,25,29,33,71,73),
(8,8,35,25,29,33,73,75),
(8,8,36,26,29,34,75,77),
(8,8,37,26,29,34,77,79),
(8,8,38,26,30,35,79,80),
(8,8,39,26,30,35,81,82),
(8,8,40,26,30,35,83,84),
(8,8,41,27,31,36,85,86),
(8,8,42,27,31,36,87,88),
(8,8,43,27,31,37,89,90),
(8,8,44,27,32,37,91,91),
(8,8,45,27,32,38,93,93),
(8,8,46,28,32,38,95,95),
(8,8,47,28,32,39,97,97),
(8,8,48,28,33,39,99,99),
(8,8,49,28,33,40,101,101),
(8,8,50,29,33,40,103,103),
(8,8,51,29,34,41,105,105),
(8,8,52,29,34,42,107,107),
(8,8,53,29,35,42,109,109),
(8,8,54,30,35,43,111,111),
(8,8,55,30,35,43,113,113),
(8,8,56,30,36,44,115,115),
(8,8,57,30,36,44,118,118),
(8,8,58,31,36,45,120,120),
(8,8,59,31,37,45,122,122),
(8,8,60,31,37,46,124,124),
(8,8,61,31,37,47,126,126),
(8,8,62,32,38,47,129,128),
(8,8,63,32,38,48,131,130),
(8,8,64,32,39,48,133,133),
(8,8,65,33,39,49,135,135),
(8,8,66,33,39,50,138,137),
(8,8,67,33,40,50,140,139),
(8,8,68,33,40,51,142,141),
(8,8,69,34,41,51,145,144),
(8,8,70,34,41,52,147,146),
(8,8,71,34,41,53,150,149),
(8,8,72,34,42,54,153,152),
(8,8,73,34,42,55,156,155),
(8,8,74,35,43,55,159,157),
(8,8,75,35,43,56,162,160),
(8,8,76,35,43,57,168,163),
(8,8,77,36,44,58,168,166),
(8,8,78,36,44,58,171,169),
(8,8,79,36,45,59,177,172),
(8,8,80,37,45,60,177,175),
(10,2,1,19,22,21,24,20),
(10,2,2,20,23,22,25,21),
(10,2,3,21,23,23,25,21),
(10,2,4,22,24,24,26,22),
(10,2,5,23,24,25,27,23),
(10,2,6,25,25,26,27,24),
(10,2,7,26,25,27,28,24),
(10,2,8,27,26,28,29,25),
(10,2,9,28,27,29,29,26),
(10,2,10,29,27,31,30,26),
(10,2,11,30,28,32,31,27),
(10,2,12,32,29,33,31,28),
(10,2,13,33,29,34,32,29),
(10,2,14,34,30,35,33,30),
(10,2,15,35,31,36,33,30),
(10,2,16,37,31,37,34,31),
(10,2,17,38,32,39,35,32),
(10,2,18,39,33,40,36,33),
(10,2,19,40,33,41,36,34),
(10,2,20,42,34,42,37,35),
(10,2,21,43,35,44,38,35),
(10,2,22,44,35,45,39,36),
(10,2,23,46,36,46,40,37),
(10,2,24,47,37,47,40,38),
(10,2,25,49,38,49,41,39),
(10,2,26,50,38,50,42,40),
(10,2,27,51,39,51,43,41),
(10,2,28,53,40,53,44,42),
(10,2,29,54,41,54,45,43),
(10,2,30,56,41,55,45,43),
(10,2,31,57,42,57,46,44),
(10,2,32,58,43,58,47,45),
(10,2,33,60,44,59,48,46),
(10,2,34,61,45,61,49,47),
(10,2,35,63,45,62,50,48),
(10,2,36,64,46,64,51,49),
(10,2,37,66,47,65,52,50),
(10,2,38,67,48,67,53,51),
(10,2,39,69,49,68,54,52),
(10,2,40,71,50,69,55,53),
(10,2,41,72,50,71,55,54),
(10,2,42,74,51,72,56,55),
(10,2,43,75,52,74,57,56),
(10,2,44,77,53,75,58,57),
(10,2,45,79,54,77,59,59),
(10,2,46,80,55,78,60,60),
(10,2,47,82,56,80,61,61),
(10,2,48,83,57,82,62,62),
(10,2,49,85,58,83,63,63),
(10,2,50,87,59,85,64,64),
(10,2,51,89,60,86,66,65),
(10,2,52,90,61,88,67,66),
(10,2,53,92,61,90,68,67),
(10,2,54,94,62,91,69,69),
(10,2,55,95,63,93,70,70),
(10,2,56,97,64,95,71,71),
(10,2,57,99,65,96,72,72),
(10,2,58,101,66,98,73,73),
(10,2,59,102,67,100,74,74),
(10,2,60,104,68,101,75,76),
(10,2,61,106,69,103,76,77),
(10,2,62,108,70,105,78,78),
(10,2,63,110,72,106,79,79),
(10,2,64,112,73,108,80,80),
(10,2,65,113,74,110,81,82),
(10,2,66,115,75,112,82,83),
(10,2,67,117,76,114,83,84),
(10,2,68,119,77,115,85,85),
(10,2,69,121,78,117,86,87),
(10,2,70,123,79,119,87,88),
(10,2,71,125,80,120,88,89),
(10,2,72,128,81,123,90,91),
(10,2,73,130,82,125,91,93),
(10,2,74,133,84,127,93,94),
(10,2,75,135,85,129,94,96),
(10,2,76,137,86,132,96,97),
(10,2,77,140,88,134,97,99),
(10,2,78,143,89,136,99,101),
(10,2,79,145,90,139,100,102),
(10,2,80,148,92,141,102,104),
(10,3,1,17,25,20,24,20),
(10,3,2,17,26,21,25,21),
(10,3,3,18,28,22,25,21),
(10,3,4,18,29,23,26,22),
(10,3,5,19,30,24,26,23),
(10,3,6,19,32,25,27,23),
(10,3,7,20,33,26,27,24),
(10,3,8,20,35,27,28,25),
(10,3,9,21,36,27,29,25),
(10,3,10,21,38,28,29,26),
(10,3,11,22,39,29,30,27),
(10,3,12,22,41,30,31,27),
(10,3,13,23,42,31,31,28),
(10,3,14,23,44,32,32,29),
(10,3,15,24,45,34,32,29),
(10,3,16,24,47,35,33,30),
(10,3,17,25,48,36,34,31),
(10,3,18,25,50,37,34,32),
(10,3,19,26,51,38,35,32),
(10,3,20,26,53,39,36,33),
(10,3,21,27,55,40,37,34),
(10,3,22,27,56,41,37,35),
(10,3,23,28,58,42,38,36),
(10,3,24,28,60,43,39,36),
(10,3,25,29,61,44,39,37),
(10,3,26,30,63,46,40,38),
(10,3,27,30,65,47,41,39),
(10,3,28,31,66,48,42,40),
(10,3,29,31,68,49,42,40),
(10,3,30,32,70,50,43,41),
(10,3,31,33,72,52,44,42),
(10,3,32,33,73,53,45,43),
(10,3,33,34,75,54,46,44),
(10,3,34,34,77,55,46,45),
(10,3,35,35,79,57,47,46),
(10,3,36,36,81,58,48,47),
(10,3,37,36,83,59,49,47),
(10,3,38,37,85,60,50,48),
(10,3,39,38,86,62,51,49),
(10,3,40,38,88,63,51,50),
(10,3,41,39,90,64,52,51),
(10,3,42,40,92,66,53,52),
(10,3,43,40,94,67,54,53),
(10,3,44,41,96,68,55,54),
(10,3,45,42,98,70,56,55),
(10,3,46,42,100,71,57,56),
(10,3,47,43,102,72,58,57),
(10,3,48,44,104,74,59,58),
(10,3,49,45,106,75,60,59),
(10,3,50,45,108,77,61,60),
(10,3,51,46,110,78,61,61),
(10,3,52,47,113,79,62,62),
(10,3,53,47,115,81,63,63),
(10,3,54,48,117,82,64,64),
(10,3,55,49,119,84,65,65),
(10,3,56,50,121,85,66,66),
(10,3,57,50,123,87,67,67),
(10,3,58,51,126,88,68,68),
(10,3,59,52,128,90,69,70),
(10,3,60,53,130,91,70,71),
(10,3,61,54,132,93,71,72),
(10,3,62,54,134,94,72,73),
(10,3,63,55,137,96,73,74),
(10,3,64,56,139,97,75,75),
(10,3,65,57,141,99,76,76),
(10,3,66,58,144,101,77,77),
(10,3,67,58,146,102,78,78),
(10,3,68,59,148,104,79,80),
(10,3,69,60,151,105,80,81),
(10,3,70,61,153,107,81,82),
(10,3,71,62,156,108,82,83),
(10,3,72,63,159,110,83,84),
(10,3,73,64,162,112,84,86),
(10,3,74,65,165,114,86,87),
(10,3,75,66,168,116,87,89),
(10,3,76,67,171,118,89,90),
(10,3,77,68,174,120,90,92),
(10,3,78,69,177,122,91,93),
(10,3,79,70,180,124,92,95),
(10,3,80,71,183,126,94,96),
(10,4,1,18,25,20,24,19),
(10,4,2,19,26,21,24,19),
(10,4,3,20,28,21,24,20),
(10,4,4,20,29,22,24,20),
(10,4,5,21,31,23,25,20),
(10,4,6,22,32,24,25,21),
(10,4,7,23,34,24,25,21),
(10,4,8,24,35,25,25,22),
(10,4,9,24,37,26,25,22),
(10,4,10,25,38,26,25,22),
(10,4,11,26,40,27,25,23),
(10,4,12,27,41,28,26,23),
(10,4,13,28,43,29,26,24),
(10,4,14,29,45,30,26,24),
(10,4,15,29,46,30,26,25),
(10,4,16,30,48,31,26,25),
(10,4,17,31,50,32,27,25),
(10,4,18,32,51,33,27,26),
(10,4,19,33,53,34,27,26),
(10,4,20,34,55,35,27,27),
(10,4,21,35,56,35,27,27),
(10,4,22,36,58,36,28,28),
(10,4,23,37,60,37,28,28),
(10,4,24,38,62,38,28,29),
(10,4,25,39,63,39,28,29),
(10,4,26,40,65,40,29,30),
(10,4,27,41,67,41,29,30),
(10,4,28,42,69,42,29,31),
(10,4,29,43,71,43,29,31),
(10,4,30,44,72,43,29,32),
(10,4,31,45,74,44,30,32),
(10,4,32,46,76,45,30,33),
(10,4,33,47,78,46,30,33),
(10,4,34,48,80,47,31,34),
(10,4,35,49,82,48,31,34),
(10,4,36,50,84,49,31,35),
(10,4,37,51,86,50,31,35),
(10,4,38,52,88,51,32,36),
(10,4,39,53,90,52,32,37),
(10,4,40,54,92,53,32,37),
(10,4,41,56,94,54,33,38),
(10,4,42,57,96,55,33,38),
(10,4,43,58,98,56,33,39),
(10,4,44,59,100,57,33,39),
(10,4,45,60,102,59,34,40),
(10,4,46,61,104,60,34,41),
(10,4,47,62,107,61,34,41),
(10,4,48,64,109,62,35,42),
(10,4,49,65,111,63,35,43),
(10,4,50,66,113,64,35,43),
(10,4,51,67,115,65,36,44),
(10,4,52,68,117,66,36,44),
(10,4,53,70,120,67,36,45),
(10,4,54,71,122,69,37,46),
(10,4,55,72,124,70,37,46),
(10,4,56,73,126,71,37,47),
(10,4,57,75,129,72,38,48),
(10,4,58,76,131,73,38,48),
(10,4,59,77,133,74,39,49),
(10,4,60,79,136,76,39,50),
(10,4,61,80,138,77,39,51),
(10,4,62,81,140,78,40,51),
(10,4,63,82,143,79,40,52),
(10,4,64,84,145,80,41,53),
(10,4,65,85,148,82,41,53),
(10,4,66,87,150,83,41,54),
(10,4,67,88,153,84,42,55),
(10,4,68,89,155,85,42,56),
(10,4,69,91,157,87,43,56),
(10,4,70,92,160,88,43,57),
(10,4,71,94,163,88,43,58),
(10,4,72,96,166,90,44,58),
(10,4,73,97,169,92,44,59),
(10,4,74,99,172,93,45,60),
(10,4,75,101,175,95,45,61),
(10,4,76,102,178,96,45,62),
(10,4,77,104,181,101,46,63),
(10,4,78,106,185,104,46,64),
(10,4,79,108,188,105,47,65),
(10,4,80,110,191,107,47,66),
(10,5,1,17,22,19,26,22),
(10,5,2,17,22,19,27,23),
(10,5,3,17,22,20,29,25),
(10,5,4,17,23,20,30,26),
(10,5,5,18,23,20,31,27),
(10,5,6,18,23,21,33,29),
(10,5,7,18,23,21,34,30),
(10,5,8,18,24,22,35,32),
(10,5,9,18,24,22,37,33),
(10,5,10,19,24,22,38,35),
(10,5,11,19,24,23,39,36),
(10,5,12,19,24,23,41,38),
(10,5,13,19,25,24,42,39),
(10,5,14,19,25,24,44,41),
(10,5,15,19,25,25,45,42),
(10,5,16,20,26,25,47,44),
(10,5,17,20,26,25,48,45),
(10,5,18,20,26,26,50,47),
(10,5,19,20,26,26,51,49),
(10,5,20,21,27,27,53,50),
(10,5,21,21,27,27,54,52),
(10,5,22,21,27,28,56,53),
(10,5,23,21,28,28,58,55),
(10,5,24,21,28,29,59,57),
(10,5,25,22,28,29,61,58),
(10,5,26,22,28,30,62,60),
(10,5,27,22,29,30,64,62),
(10,5,28,22,29,31,66,64),
(10,5,29,23,29,31,67,65),
(10,5,30,23,30,32,69,67),
(10,5,31,23,30,32,71,69),
(10,5,32,23,30,33,72,71),
(10,5,33,24,31,33,74,72),
(10,5,34,24,31,34,76,74),
(10,5,35,24,32,34,78,76),
(10,5,36,24,32,35,80,78),
(10,5,37,25,32,35,81,80),
(10,5,38,25,33,36,83,82),
(10,5,39,25,33,37,85,84),
(10,5,40,26,33,37,87,86),
(10,5,41,26,34,38,89,88),
(10,5,42,26,34,38,91,89),
(10,5,43,27,35,39,92,91),
(10,5,44,27,35,39,94,93),
(10,5,45,27,35,40,96,95),
(10,5,46,27,36,41,98,97),
(10,5,47,28,36,41,100,99),
(10,5,48,28,37,42,102,101),
(10,5,49,28,37,43,104,103),
(10,5,50,29,37,43,106,106),
(10,5,51,29,38,44,108,108),
(10,5,52,29,38,44,110,110),
(10,5,53,30,39,45,112,112),
(10,5,54,30,39,46,114,114),
(10,5,55,30,40,46,116,116),
(10,5,56,31,40,47,118,118),
(10,5,57,31,41,48,120,120),
(10,5,58,31,41,48,123,123),
(10,5,59,32,42,49,125,125),
(10,5,60,32,42,50,127,127),
(10,5,61,33,42,51,129,129),
(10,5,62,33,43,51,131,131),
(10,5,63,33,43,52,133,134),
(10,5,64,34,44,53,135,136),
(10,5,65,34,44,53,138,138),
(10,5,66,34,45,54,140,141),
(10,5,67,35,45,55,142,143),
(10,5,68,35,46,56,144,145),
(10,5,69,36,46,56,147,148),
(10,5,70,36,47,57,149,150),
(10,5,71,36,48,57,152,153),
(10,5,72,37,48,57,155,156),
(10,5,73,37,49,58,158,159),
(10,5,74,38,49,59,160,163),
(10,5,75,38,50,60,163,165),
(10,5,76,38,51,61,166,170),
(10,5,77,39,51,62,168,175),
(10,5,78,39,52,63,172,174),
(10,5,79,40,52,64,175,177),
(10,5,80,40,53,65,178,180),
(10,6,1,18,23,21,24,20),
(10,6,2,19,24,22,24,20),
(10,6,3,21,25,23,24,21),
(10,6,4,22,25,25,24,21),
(10,6,5,23,26,26,24,21),
(10,6,6,25,27,27,24,21),
(10,6,7,26,28,28,24,22),
(10,6,8,27,29,29,25,22),
(10,6,9,29,29,31,25,22),
(10,6,10,30,30,32,25,23),
(10,6,11,32,31,33,25,23),
(10,6,12,33,32,34,25,23),
(10,6,13,34,33,36,25,24),
(10,6,14,36,34,37,25,24),
(10,6,15,37,35,38,25,24),
(10,6,16,39,36,40,25,25),
(10,6,17,40,36,41,25,25),
(10,6,18,42,37,43,26,25),
(10,6,19,43,38,44,26,26),
(10,6,20,45,39,45,26,26),
(10,6,21,47,40,47,26,26),
(10,6,22,48,41,48,26,27),
(10,6,23,50,42,50,26,27),
(10,6,24,51,43,51,26,28),
(10,6,25,53,44,52,27,28),
(10,6,26,55,45,54,27,28),
(10,6,27,56,46,55,27,29),
(10,6,28,58,47,57,27,29),
(10,6,29,59,48,58,27,30),
(10,6,30,61,49,60,27,30),
(10,6,31,63,50,62,27,30),
(10,6,32,65,51,63,28,31),
(10,6,33,66,52,65,28,31),
(10,6,34,68,53,66,28,32),
(10,6,35,70,55,68,28,32),
(10,6,36,72,56,69,28,33),
(10,6,37,73,57,71,29,33),
(10,6,38,75,58,73,29,34),
(10,6,39,77,59,74,29,34),
(10,6,40,79,60,76,29,35),
(10,6,41,81,61,78,29,35),
(10,6,42,82,62,79,30,35),
(10,6,43,84,64,81,30,36),
(10,6,44,86,65,83,30,36),
(10,6,45,88,66,85,30,37),
(10,6,46,90,67,86,30,37),
(10,6,47,92,68,88,31,38),
(10,6,48,94,69,90,31,38),
(10,6,49,96,69,92,31,39),
(10,6,50,98,70,93,31,40),
(10,6,51,100,71,95,32,40),
(10,6,52,102,72,96,32,41),
(10,6,53,103,73,97,32,41),
(10,6,54,104,74,98,32,41),
(10,6,55,105,75,97,33,41),
(10,6,56,108,77,100,33,42),
(10,6,57,113,78,102,33,42),
(10,6,58,115,79,104,34,43),
(10,6,59,117,81,106,34,43),
(10,6,60,118,82,108,34,44),
(10,6,61,119,83,110,34,45),
(10,6,62,121,85,112,34,45),
(10,6,63,124,86,115,35,46),
(10,6,64,127,88,117,35,46),
(10,6,65,133,89,119,35,47),
(10,6,66,135,91,122,35,48),
(10,6,67,139,92,124,36,48),
(10,6,68,141,94,126,36,49),
(10,6,69,142,95,129,36,50),
(10,6,70,145,97,131,36,50),
(10,6,71,150,99,134,37,51),
(10,6,72,152,100,136,37,52),
(10,6,73,155,102,139,37,53),
(10,6,74,158,104,141,37,53),
(10,6,75,159,105,144,38,54),
(10,6,76,160,107,147,38,55),
(10,6,77,163,109,149,38,56),
(10,6,78,166,110,152,38,56),
(10,6,79,169,112,155,39,57),
(10,6,80,172,114,158,39,58),
(10,8,1,17,22,19,27,21),
(10,8,2,17,22,19,28,22),
(10,8,3,17,22,20,30,24),
(10,8,4,17,22,20,31,25),
(10,8,5,17,23,20,32,26),
(10,8,6,17,23,20,34,28),
(10,8,7,18,23,21,35,29),
(10,8,8,18,23,21,37,30),
(10,8,9,18,23,21,38,32),
(10,8,10,18,23,22,40,33),
(10,8,11,18,24,22,41,35),
(10,8,12,18,24,22,42,36),
(10,8,13,18,24,23,44,37),
(10,8,14,18,24,23,45,39),
(10,8,15,18,24,23,47,40),
(10,8,16,19,24,24,49,42),
(10,8,17,19,25,24,50,43),
(10,8,18,19,25,24,52,45),
(10,8,19,19,25,25,53,46),
(10,8,20,19,25,25,55,48),
(10,8,21,19,25,26,57,50),
(10,8,22,19,26,26,58,51),
(10,8,23,20,26,26,60,53),
(10,8,24,20,26,27,61,54),
(10,8,25,20,26,27,63,56),
(10,8,26,20,27,27,65,58),
(10,8,27,20,27,28,67,59),
(10,8,28,20,27,28,68,61),
(10,8,29,21,27,29,70,63),
(10,8,30,21,28,29,72,64),
(10,8,31,21,28,30,74,66),
(10,8,32,21,28,30,75,68),
(10,8,33,21,28,30,77,70),
(10,8,34,21,29,31,79,71),
(10,8,35,22,29,31,81,73),
(10,8,36,22,29,32,83,75),
(10,8,37,22,29,32,85,77),
(10,8,38,22,30,33,86,78),
(10,8,39,22,30,33,88,80),
(10,8,40,23,30,34,90,82),
(10,8,41,23,31,34,92,84),
(10,8,42,23,31,35,94,86),
(10,8,43,23,31,35,96,88),
(10,8,44,23,32,36,98,90),
(10,8,45,24,32,36,100,92),
(10,8,46,24,32,37,102,93),
(10,8,47,24,32,37,104,95),
(10,8,48,24,33,38,106,97),
(10,8,49,25,33,38,108,99),
(10,8,50,25,33,39,110,101),
(10,8,51,25,34,39,112,103),
(10,8,52,25,34,40,114,105),
(10,8,53,25,35,40,117,107),
(10,8,54,26,35,41,119,109),
(10,8,55,26,35,41,121,111),
(10,8,56,26,36,42,123,113),
(10,8,57,26,36,42,125,116),
(10,8,58,27,36,43,127,118),
(10,8,59,27,37,43,130,120),
(10,8,60,27,37,44,132,122),
(10,8,61,27,37,45,134,124),
(10,8,62,28,38,45,136,126),
(10,8,63,28,38,46,139,128),
(10,8,64,28,39,46,141,131),
(10,8,65,29,39,47,143,133),
(10,8,66,29,39,48,146,135),
(10,8,67,29,40,48,148,137),
(10,8,68,29,40,49,150,139),
(10,8,69,30,41,49,153,142),
(10,8,70,30,41,50,155,144),
(10,8,71,30,41,50,158,147),
(10,8,72,30,42,51,161,150),
(10,8,73,30,42,52,164,153),
(10,8,74,31,43,52,167,155),
(10,8,75,31,43,53,170,158),
(10,8,76,31,43,54,173,161),
(10,8,77,32,44,55,176,164),
(10,8,78,32,44,55,179,167),
(10,8,79,32,45,56,182,170),
(10,8,80,33,45,57,185,173),
(10,9,1,17,22,20,26,21),
(10,9,2,17,22,21,27,22),
(10,9,3,18,23,21,28,23),
(10,9,4,18,23,22,29,24),
(10,9,5,18,23,22,31,26),
(10,9,6,18,24,23,32,27),
(10,9,7,19,24,23,33,28),
(10,9,8,19,25,24,34,29),
(10,9,9,19,25,25,36,30),
(10,9,10,20,25,25,37,32),
(10,9,11,20,26,26,38,33),
(10,9,12,20,26,26,39,34),
(10,9,13,21,27,27,41,36),
(10,9,14,21,27,28,42,37),
(10,9,15,21,27,28,43,38),
(10,9,16,22,28,29,45,39),
(10,9,17,22,28,30,46,41),
(10,9,18,23,29,30,47,42),
(10,9,19,23,29,31,49,43),
(10,9,20,23,30,32,50,45),
(10,9,21,24,30,32,51,46),
(10,9,22,24,31,33,53,48),
(10,9,23,24,31,34,54,49),
(10,9,24,25,31,34,56,50),
(10,9,25,25,32,35,57,52),
(10,9,26,26,32,36,59,53),
(10,9,27,26,33,37,60,55),
(10,9,28,26,33,37,62,56),
(10,9,29,27,34,38,63,58),
(10,9,30,27,34,39,65,59),
(10,9,31,28,35,40,66,61),
(10,9,32,28,36,40,68,62),
(10,9,33,29,36,41,69,64),
(10,9,34,29,37,42,71,65),
(10,9,35,29,37,43,73,67),
(10,9,36,30,38,43,74,69),
(10,9,37,30,38,44,76,70),
(10,9,38,31,39,45,77,72),
(10,9,39,31,39,46,79,73),
(10,9,40,32,40,47,81,75),
(10,9,41,32,41,48,82,77),
(10,9,42,33,41,48,84,78),
(10,9,43,33,42,49,86,80),
(10,9,44,34,42,50,88,82),
(10,9,45,34,43,51,89,83),
(10,9,46,35,44,52,91,85),
(10,9,47,35,44,53,93,87),
(10,9,48,36,45,54,95,89),
(10,9,49,36,45,54,96,90),
(10,9,50,37,46,55,98,92),
(10,9,51,37,47,56,100,94),
(10,9,52,38,47,57,102,96),
(10,9,53,38,48,58,104,97),
(10,9,54,39,49,59,105,99),
(10,9,55,39,49,60,107,101),
(10,9,56,40,50,61,109,103),
(10,9,57,40,51,62,111,105),
(10,9,58,41,51,63,113,107),
(10,9,59,42,52,64,115,108),
(10,9,60,42,53,65,117,110),
(10,9,61,43,53,66,119,112),
(10,9,62,43,54,67,121,114),
(10,9,63,44,55,68,123,116),
(10,9,64,44,56,69,125,118),
(10,9,65,45,56,70,127,120),
(10,9,66,46,57,71,129,122),
(10,9,67,46,58,72,131,124),
(10,9,68,47,58,73,133,126),
(10,9,69,47,59,74,135,128),
(10,9,70,48,60,75,137,130),
(10,9,71,49,61,83,139,141),
(10,9,72,50,61,84,142,143),
(10,9,73,51,62,84,144,146),
(10,9,74,51,63,86,147,149),
(10,9,75,52,64,89,149,151),
(10,9,76,53,65,90,155,154),
(10,9,77,54,66,91,155,157),
(10,9,78,54,67,93,157,160),
(10,9,79,55,68,94,160,163),
(10,9,80,56,69,95,163,165),
(11,1,1,24,17,21,21,22),
(11,1,2,25,18,22,21,22),
(11,1,3,27,19,23,21,23),
(11,1,4,28,19,25,21,23),
(11,1,5,29,20,26,21,23),
(11,1,6,31,21,27,21,23),
(11,1,7,32,22,28,21,24),
(11,1,8,33,23,29,22,24),
(11,1,9,35,24,31,22,24),
(11,1,10,36,24,32,22,25),
(11,1,11,37,25,33,22,25),
(11,1,12,39,26,34,22,25),
(11,1,13,40,27,36,22,26),
(11,1,14,42,28,37,22,26),
(11,1,15,43,29,38,22,26),
(11,1,16,45,30,40,22,27),
(11,1,17,46,31,41,23,27),
(11,1,18,48,32,43,23,27),
(11,1,19,49,33,44,23,28),
(11,1,20,51,34,45,23,28),
(11,1,21,52,34,47,23,28),
(11,1,22,54,35,48,23,29),
(11,1,23,55,36,50,23,29),
(11,1,24,57,37,51,24,30),
(11,1,25,59,38,52,24,30),
(11,1,26,60,39,54,24,30),
(11,1,27,62,40,55,24,31),
(11,1,28,63,41,57,24,31),
(11,1,29,65,43,58,24,32),
(11,1,30,67,44,60,24,32),
(11,1,31,69,45,62,25,32),
(11,1,32,70,46,63,25,33),
(11,1,33,72,47,65,25,33),
(11,1,34,74,48,66,25,34),
(11,1,35,75,49,68,25,34),
(11,1,36,77,50,69,26,35),
(11,1,37,79,51,71,26,35),
(11,1,38,81,52,73,26,35),
(11,1,39,83,53,74,26,36),
(11,1,40,84,55,76,26,36),
(11,1,41,86,56,78,27,37),
(11,1,42,88,57,79,27,37),
(11,1,43,90,58,81,27,38),
(11,1,44,92,59,83,27,38),
(11,1,45,94,60,85,27,39),
(11,1,46,96,62,86,28,39),
(11,1,47,98,63,88,28,40),
(11,1,48,100,64,90,28,40),
(11,1,49,102,65,92,28,41),
(11,1,50,103,66,93,29,41),
(11,1,51,105,68,95,29,42),
(11,1,52,107,69,97,29,42),
(11,1,53,109,70,99,29,43),
(11,1,54,112,71,101,30,44),
(11,1,55,114,73,103,30,44),
(11,1,56,116,74,104,30,45),
(11,1,57,118,75,106,30,45),
(11,1,58,120,77,108,31,46),
(11,1,59,122,78,110,31,46),
(11,1,60,124,79,112,31,47),
(11,1,61,126,81,114,31,48),
(11,1,62,128,82,116,32,48),
(11,1,63,130,83,118,32,49),
(11,1,64,133,85,120,32,49),
(11,1,65,135,86,122,33,50),
(11,1,66,137,87,124,33,51),
(11,1,67,139,89,126,33,51),
(11,1,68,141,90,128,33,52),
(11,1,69,144,92,130,34,52),
(11,1,70,146,93,132,34,53),
(11,1,71,149,94,134,34,54),
(11,1,72,151,96,137,34,55),
(11,1,73,154,98,139,34,56),
(11,1,74,157,99,142,35,56),
(11,1,75,166,101,149,35,57),
(11,1,76,172,103,155,35,58),
(11,1,77,175,105,159,36,59),
(11,1,78,179,106,161,36,59),
(11,1,79,182,108,164,36,60),
(11,1,80,185,110,167,37,61),
(11,2,1,23,17,21,21,23),
(11,2,2,24,18,22,22,24),
(11,2,3,25,18,23,22,24),
(11,2,4,26,19,24,23,25),
(11,2,5,27,19,25,24,26),
(11,2,6,29,20,26,24,26),
(11,2,7,30,21,27,25,27),
(11,2,8,31,21,28,26,28),
(11,2,9,32,22,29,26,29),
(11,2,10,33,22,31,27,29),
(11,2,11,34,23,32,28,30),
(11,2,12,36,24,33,28,31),
(11,2,13,37,24,34,29,32),
(11,2,14,38,25,35,30,32),
(11,2,15,39,26,36,31,33),
(11,2,16,40,26,37,31,34),
(11,2,17,42,27,39,32,35),
(11,2,18,43,28,40,33,36),
(11,2,19,44,28,41,34,37),
(11,2,20,46,29,42,34,37),
(11,2,21,47,30,44,35,38),
(11,2,22,48,31,45,36,39),
(11,2,23,50,31,46,37,40),
(11,2,24,51,32,47,38,41),
(11,2,25,52,33,49,38,42),
(11,2,26,54,34,50,39,43),
(11,2,27,55,34,51,40,44),
(11,2,28,56,35,53,41,44),
(11,2,29,58,36,54,42,45),
(11,2,30,59,37,55,43,46),
(11,2,31,61,37,57,43,47),
(11,2,32,62,38,58,44,48),
(11,2,33,64,39,59,45,49),
(11,2,34,65,40,61,46,50),
(11,2,35,67,41,62,47,51),
(11,2,36,68,42,64,48,52),
(11,2,37,70,42,65,49,53),
(11,2,38,71,43,67,50,54),
(11,2,39,73,44,68,51,55),
(11,2,40,74,45,69,52,56),
(11,2,41,76,46,71,53,57),
(11,2,42,78,47,72,54,58),
(11,2,43,79,47,74,55,59),
(11,2,44,81,48,75,56,60),
(11,2,45,82,49,77,57,61),
(11,2,46,84,50,78,58,62),
(11,2,47,86,51,80,59,64),
(11,2,48,87,52,82,60,65),
(11,2,49,89,53,83,61,66),
(11,2,50,91,54,85,62,67),
(11,2,51,92,55,86,63,68),
(11,2,52,94,56,88,64,69),
(11,2,53,96,57,90,65,70),
(11,2,54,97,58,91,66,71),
(11,2,55,99,59,93,67,73),
(11,2,56,101,60,95,68,74),
(11,2,57,103,61,96,69,75),
(11,2,58,105,62,98,70,76),
(11,2,59,106,63,100,71,77),
(11,2,60,108,64,101,72,78),
(11,2,61,110,65,103,74,80),
(11,2,62,112,66,105,75,81),
(11,2,63,114,67,106,76,82),
(11,2,64,116,68,108,77,83),
(11,2,65,117,69,110,78,85),
(11,2,66,119,70,112,79,86),
(11,2,67,121,71,114,80,87),
(11,2,68,123,72,115,82,88),
(11,2,69,125,73,117,83,90),
(11,2,70,127,74,119,84,91),
(11,2,71,130,75,121,87,92),
(11,2,72,132,76,124,90,94),
(11,2,73,134,77,126,93,96),
(11,2,74,137,79,128,97,97),
(11,2,75,139,80,130,101,99),
(11,2,76,142,81,133,106,100),
(11,2,77,144,83,135,108,102),
(11,2,78,147,84,137,110,104),
(11,2,79,149,85,140,111,105),
(11,2,80,152,87,142,113,107),
(11,3,1,21,20,20,21,23),
(11,3,2,21,21,21,22,24),
(11,3,3,22,23,22,22,24),
(11,3,4,22,24,23,23,25),
(11,3,5,23,25,24,23,25),
(11,3,6,23,27,25,24,26),
(11,3,7,24,28,26,24,27),
(11,3,8,24,30,27,25,27),
(11,3,9,25,31,27,26,28),
(11,3,10,25,33,28,26,29),
(11,3,11,25,34,29,27,29),
(11,3,12,26,36,30,28,30),
(11,3,13,26,37,31,28,31),
(11,3,14,27,39,32,29,32),
(11,3,15,27,40,34,30,32),
(11,3,16,28,42,35,30,33),
(11,3,17,28,43,36,31,34),
(11,3,18,29,45,37,32,35),
(11,3,19,29,47,38,32,35),
(11,3,20,30,48,39,33,36),
(11,3,21,31,50,40,34,37),
(11,3,22,31,51,41,34,38),
(11,3,23,32,53,42,35,38),
(11,3,24,32,55,43,36,39),
(11,3,25,33,57,44,37,40),
(11,3,26,33,58,46,37,41),
(11,3,27,34,60,47,38,42),
(11,3,28,35,62,48,39,42),
(11,3,29,35,63,49,40,43),
(11,3,30,36,65,50,40,44),
(11,3,31,36,67,52,41,45),
(11,3,32,37,69,53,42,46),
(11,3,33,38,71,54,43,47),
(11,3,34,38,72,55,44,48),
(11,3,35,39,74,57,44,48),
(11,3,36,39,76,58,45,49),
(11,3,37,40,78,59,46,50),
(11,3,38,41,80,60,47,51),
(11,3,39,41,82,62,48,52),
(11,3,40,42,84,63,49,53),
(11,3,41,43,86,64,50,54),
(11,3,42,43,88,66,50,55),
(11,3,43,44,90,67,51,56),
(11,3,44,45,91,68,52,57),
(11,3,45,45,93,70,53,58),
(11,3,46,46,95,71,54,59),
(11,3,47,47,98,72,55,60),
(11,3,48,48,100,74,56,61),
(11,3,49,48,102,75,57,62),
(11,3,50,49,104,77,58,63),
(11,3,51,50,106,78,59,64),
(11,3,52,51,108,79,60,65),
(11,3,53,51,110,81,61,66),
(11,3,54,52,112,82,61,67),
(11,3,55,53,114,84,62,68),
(11,3,56,54,116,85,63,69),
(11,3,57,54,118,87,64,70),
(11,3,58,55,121,88,65,71),
(11,3,59,56,123,90,66,72),
(11,3,60,57,125,91,67,74),
(11,3,61,58,127,93,68,75),
(11,3,62,58,130,94,69,76),
(11,3,63,59,132,96,71,77),
(11,3,64,60,134,97,72,78),
(11,3,65,61,136,99,73,79),
(11,3,66,62,139,101,74,80),
(11,3,67,62,141,102,75,81),
(11,3,68,63,143,104,76,83),
(11,3,69,64,146,105,77,84),
(11,3,70,65,148,107,78,85),
(11,3,71,66,151,109,79,86),
(11,3,72,67,154,111,80,87),
(11,3,73,68,157,113,81,89),
(11,3,74,69,160,115,83,90),
(11,3,75,70,163,117,84,92),
(11,3,76,71,166,119,85,93),
(11,3,77,72,169,121,87,95),
(11,3,78,73,172,123,88,96),
(11,3,79,74,175,125,89,98),
(11,3,80,75,178,127,91,99),
(11,5,1,21,17,19,23,25),
(11,5,2,21,17,19,24,26),
(11,5,3,21,17,20,26,28),
(11,5,4,21,18,20,27,29),
(11,5,5,22,18,20,28,30),
(11,5,6,22,18,21,30,32),
(11,5,7,22,18,21,31,33),
(11,5,8,22,19,22,32,35),
(11,5,9,22,19,22,34,36),
(11,5,10,22,19,22,35,38),
(11,5,11,23,19,23,37,39),
(11,5,12,23,20,23,38,41),
(11,5,13,23,20,24,39,42),
(11,5,14,23,20,24,41,44),
(11,5,15,23,20,25,42,45),
(11,5,16,24,21,25,44,47),
(11,5,17,24,21,25,45,48),
(11,5,18,24,21,26,47,50),
(11,5,19,24,22,26,48,51),
(11,5,20,24,22,27,50,53),
(11,5,21,25,22,27,51,55),
(11,5,22,25,22,28,53,56),
(11,5,23,25,23,28,55,58),
(11,5,24,25,23,29,56,60),
(11,5,25,25,23,29,58,61),
(11,5,26,26,24,30,60,63),
(11,5,27,26,24,30,61,65),
(11,5,28,26,24,31,63,66),
(11,5,29,26,25,31,65,68),
(11,5,30,27,25,32,66,70),
(11,5,31,27,25,32,68,72),
(11,5,32,27,26,33,70,73),
(11,5,33,27,26,33,71,75),
(11,5,34,28,26,34,73,77),
(11,5,35,28,27,34,75,79),
(11,5,36,28,27,35,77,81),
(11,5,37,29,28,35,79,83),
(11,5,38,29,28,36,80,85),
(11,5,39,29,28,37,82,86),
(11,5,40,29,29,37,84,88),
(11,5,41,30,29,38,86,90),
(11,5,42,30,29,38,88,92),
(11,5,43,30,30,39,90,94),
(11,5,44,31,30,39,91,96),
(11,5,45,31,31,40,93,98),
(11,5,46,31,31,41,95,100),
(11,5,47,32,31,41,97,102),
(11,5,48,32,32,42,99,104),
(11,5,49,32,32,43,101,106),
(11,5,50,33,33,43,103,108),
(11,5,51,33,33,44,105,110),
(11,5,52,33,34,44,107,113),
(11,5,53,34,34,45,109,115),
(11,5,54,34,34,46,111,117),
(11,5,55,34,35,46,113,119),
(11,5,56,35,35,47,115,121),
(11,5,57,35,36,48,118,123),
(11,5,58,35,36,48,120,126),
(11,5,59,36,37,49,122,128),
(11,5,60,36,37,50,124,130),
(11,5,61,36,38,51,126,132),
(11,5,62,37,38,51,128,134),
(11,5,63,37,39,52,130,137),
(11,5,64,38,39,53,133,139),
(11,5,65,38,40,53,135,141),
(11,5,66,38,40,54,137,144),
(11,5,67,39,40,55,139,146),
(11,5,68,39,41,56,141,148),
(11,5,69,40,41,56,144,151),
(11,5,70,40,42,57,146,153),
(11,5,71,40,43,58,149,156),
(11,5,72,41,43,58,155,159),
(11,5,73,41,44,59,157,160),
(11,5,74,42,44,61,160,163),
(11,5,75,42,45,62,164,166),
(11,5,76,42,46,62,167,169),
(11,5,77,43,46,63,168,172),
(11,5,78,43,47,64,169,177),
(11,5,79,44,47,65,172,180),
(11,5,80,44,48,66,175,183),
(11,6,1,24,17,21,21,22),
(11,6,2,25,18,22,21,22),
(11,6,3,27,19,23,21,23),
(11,6,4,28,19,25,21,23),
(11,6,5,29,20,26,21,23),
(11,6,6,31,21,27,21,23),
(11,6,7,32,22,28,21,24),
(11,6,8,33,23,29,22,24),
(11,6,9,35,24,31,22,24),
(11,6,10,36,24,32,22,25),
(11,6,11,37,25,33,22,25),
(11,6,12,39,26,34,22,25),
(11,6,13,40,27,36,22,26),
(11,6,14,42,28,37,22,26),
(11,6,15,43,29,38,22,26),
(11,6,16,45,30,40,22,27),
(11,6,17,46,31,41,23,27),
(11,6,18,48,32,43,23,27),
(11,6,19,49,33,44,23,28),
(11,6,20,51,34,45,23,28),
(11,6,21,52,34,47,23,28),
(11,6,22,54,35,48,23,29),
(11,6,23,55,36,50,23,29),
(11,6,24,57,37,51,24,30),
(11,6,25,59,38,52,24,30),
(11,6,26,60,39,54,24,30),
(11,6,27,62,40,55,24,31),
(11,6,28,63,41,57,24,31),
(11,6,29,65,43,58,24,32),
(11,6,30,67,44,60,24,32),
(11,6,31,69,45,62,25,32),
(11,6,32,70,46,63,25,33),
(11,6,33,72,47,65,25,33),
(11,6,34,74,48,66,25,34),
(11,6,35,75,49,68,25,34),
(11,6,36,77,50,69,26,35),
(11,6,37,79,51,71,26,35),
(11,6,38,81,52,73,26,35),
(11,6,39,83,53,74,26,36),
(11,6,40,84,55,76,26,36),
(11,6,41,86,56,78,27,37),
(11,6,42,88,57,79,27,37),
(11,6,43,90,58,81,27,38),
(11,6,44,92,59,83,27,38),
(11,6,45,94,60,85,27,39),
(11,6,46,96,62,86,28,39),
(11,6,47,98,63,88,28,40),
(11,6,48,100,64,90,28,40),
(11,6,49,102,65,92,28,41),
(11,6,50,103,65,93,29,41),
(11,6,51,105,66,94,29,42),
(11,6,52,106,67,95,29,42),
(11,6,53,107,68,96,29,43),
(11,6,54,108,69,97,30,44),
(11,6,55,109,70,98,30,44),
(11,6,56,112,72,101,30,45),
(11,6,57,114,73,103,30,45),
(11,6,58,117,74,105,31,46),
(11,6,59,119,76,107,31,46),
(11,6,60,121,77,109,31,47),
(11,6,61,123,78,111,31,48),
(11,6,62,126,80,113,31,48),
(11,6,63,128,81,116,32,49),
(11,6,64,131,83,118,32,49),
(11,6,65,136,84,120,32,50),
(11,6,66,140,86,123,32,51),
(11,6,67,141,87,125,33,51),
(11,6,68,141,89,127,33,52),
(11,6,69,144,90,130,33,53),
(11,6,70,147,92,132,33,53),
(11,6,71,150,94,135,34,54),
(11,6,72,152,95,137,34,55),
(11,6,73,155,97,140,34,56),
(11,6,74,162,99,142,34,56),
(11,6,75,165,100,145,35,57),
(11,6,76,167,102,146,35,58),
(11,6,77,169,104,150,35,59),
(11,6,78,170,105,152,35,59),
(11,6,79,173,107,156,36,60),
(11,6,80,176,109,159,36,61),
(11,7,1,22,17,20,22,24),
(11,7,2,23,17,21,23,25),
(11,7,3,24,18,22,24,26),
(11,7,4,25,18,23,25,27),
(11,7,5,25,19,24,26,28),
(11,7,6,26,19,25,27,29),
(11,7,7,27,20,26,28,30),
(11,7,8,28,20,27,28,31),
(11,7,9,29,21,28,29,32),
(11,7,10,30,21,29,30,33),
(11,7,11,31,22,30,31,35),
(11,7,12,32,22,31,32,36),
(11,7,13,33,23,32,33,37),
(11,7,14,34,23,33,34,38),
(11,7,15,34,24,35,35,39),
(11,7,16,35,24,36,36,40),
(11,7,17,36,25,37,38,42),
(11,7,18,37,25,38,39,43),
(11,7,19,38,26,39,40,44),
(11,7,20,39,26,40,41,45),
(11,7,21,40,27,41,42,46),
(11,7,22,41,27,43,43,48),
(11,7,23,43,28,44,44,49),
(11,7,24,44,28,45,45,50),
(11,7,25,45,29,46,46,51),
(11,7,26,46,30,47,48,53),
(11,7,27,47,30,49,49,54),
(11,7,28,48,31,50,50,55),
(11,7,29,49,31,51,51,57),
(11,7,30,50,32,53,52,58),
(11,7,31,51,33,54,53,59),
(11,7,32,52,33,55,55,61),
(11,7,33,53,34,56,56,62),
(11,7,34,55,34,58,57,64),
(11,7,35,56,35,59,58,65),
(11,7,36,57,36,60,60,66),
(11,7,37,58,36,62,61,68),
(11,7,38,59,37,63,62,69),
(11,7,39,61,38,65,63,71),
(11,7,40,62,38,66,65,72),
(11,7,41,63,39,67,66,74),
(11,7,42,64,40,69,67,75),
(11,7,43,65,40,70,69,77),
(11,7,44,67,41,72,70,78),
(11,7,45,68,42,73,71,80),
(11,7,46,69,42,75,73,81),
(11,7,47,71,43,76,74,83),
(11,7,48,72,44,78,76,84),
(11,7,49,73,45,79,77,86),
(11,7,50,74,45,81,78,88),
(11,7,51,76,46,82,80,89),
(11,7,52,77,47,84,81,91),
(11,7,53,78,47,85,83,92),
(11,7,54,80,48,87,84,94),
(11,7,55,81,49,88,86,96),
(11,7,56,83,50,90,87,97),
(11,7,57,84,50,91,89,99),
(11,7,58,85,51,93,90,101),
(11,7,59,87,52,95,92,102),
(11,7,60,88,53,96,93,104),
(11,7,61,90,54,98,95,106),
(11,7,62,91,54,99,96,108),
(11,7,63,93,55,101,98,109),
(11,7,64,94,56,103,99,111),
(11,7,65,95,57,104,101,113),
(11,7,66,97,58,106,103,115),
(11,7,67,98,58,108,104,117),
(11,7,68,100,59,110,106,118),
(11,7,69,101,60,111,107,120),
(11,7,70,103,61,113,109,122),
(11,7,71,104,62,115,122,124),
(11,7,72,106,63,117,124,127),
(11,7,73,108,64,119,126,129),
(11,7,74,110,65,122,128,131),
(11,7,75,112,66,124,130,133),
(11,7,76,114,67,126,133,136),
(11,7,77,115,68,128,135,138),
(11,7,78,117,69,130,137,140),
(11,7,79,119,70,133,139,143),
(11,7,80,121,71,135,141,145),
(11,8,1,21,17,19,24,24),
(11,8,2,21,17,19,25,25),
(11,8,3,21,17,20,27,27),
(11,8,4,21,17,20,28,28),
(11,8,5,21,18,20,29,29),
(11,8,6,21,18,20,31,31),
(11,8,7,21,18,21,32,32),
(11,8,8,22,18,21,34,33),
(11,8,9,22,18,21,35,35),
(11,8,10,22,19,22,37,36),
(11,8,11,22,19,22,38,37),
(11,8,12,22,19,22,40,39),
(11,8,13,22,19,23,41,40),
(11,8,14,22,19,23,43,42),
(11,8,15,22,19,23,44,43),
(11,8,16,22,20,24,46,45),
(11,8,17,23,20,24,47,46),
(11,8,18,23,20,24,49,48),
(11,8,19,23,20,25,50,49),
(11,8,20,23,21,25,52,51),
(11,8,21,23,21,26,54,52),
(11,8,22,23,21,26,55,54),
(11,8,23,23,21,26,57,56),
(11,8,24,24,21,27,59,57),
(11,8,25,24,22,27,60,59),
(11,8,26,24,22,27,62,60),
(11,8,27,24,22,28,64,62),
(11,8,28,24,22,28,65,64),
(11,8,29,24,23,29,67,65),
(11,8,30,24,23,29,69,67),
(11,8,31,25,23,30,71,69),
(11,8,32,25,23,30,73,71),
(11,8,33,25,24,30,74,72),
(11,8,34,25,24,31,76,74),
(11,8,35,25,24,31,78,76),
(11,8,36,26,24,32,80,78),
(11,8,37,26,25,32,82,79),
(11,8,38,26,25,33,84,81),
(11,8,39,26,25,33,86,83),
(11,8,40,26,26,34,87,85),
(11,8,41,27,26,34,89,87),
(11,8,42,27,26,35,91,89),
(11,8,43,27,27,35,93,91),
(11,8,44,27,27,36,95,92),
(11,8,45,27,27,36,97,94),
(11,8,46,28,27,37,99,96),
(11,8,47,28,28,37,101,98),
(11,8,48,28,28,38,103,100),
(11,8,49,28,28,38,105,102),
(11,8,50,29,29,39,107,104),
(11,8,51,29,29,39,110,106),
(11,8,52,29,29,40,112,108),
(11,8,53,29,30,40,114,110),
(11,8,54,30,30,41,116,112),
(11,8,55,30,30,41,118,114),
(11,8,56,30,31,42,120,116),
(11,8,57,30,31,42,122,118),
(11,8,58,31,31,43,125,121),
(11,8,59,31,32,43,127,123),
(11,8,60,31,32,44,129,125),
(11,8,61,31,33,45,131,127),
(11,8,62,32,33,45,133,129),
(11,8,63,32,33,46,136,131),
(11,8,64,32,34,46,138,134),
(11,8,65,33,34,47,140,136),
(11,8,66,33,34,48,143,138),
(11,8,67,33,35,48,145,140),
(11,8,68,33,35,49,147,142),
(11,8,69,34,36,49,150,145),
(11,8,70,34,36,50,152,147),
(11,8,71,34,36,51,155,150),
(11,8,72,34,37,52,161,153),
(11,8,73,34,37,53,161,156),
(11,8,74,35,38,53,164,158),
(11,8,75,35,38,54,167,161),
(11,8,76,35,38,55,170,164),
(11,8,77,36,39,56,173,167),
(11,8,78,36,39,56,176,170),
(11,8,79,36,40,57,179,173),
(11,8,80,37,40,58,182,176);
|
-- @(#)16.sql 2.1.8.1
-- TPC-H/TPC-R Parts/Supplier Relationship Query (Q16)
-- Functional Query Definition
-- Approved February 1998
:o
:b
:x
select
p_brand,
p_type,
p_size,
count(distinct ps_suppkey) as supplier_cnt
from
partsupp,
part
where
p_partkey = ps_partkey
and p_brand <> ':1'
and p_type not like ':2%'
and p_size in (:3, :4, :5, :6, :7, :8, :9, :10)
and ps_suppkey not in (
select
s_suppkey
from
supplier
where
s_comment like '%Customer%Complaints%'
)
group by
p_brand,
p_type,
p_size
order by
supplier_cnt desc,
p_brand,
p_type,
p_size;
:e
|
CREATE DATABASE IF NOT EXISTS `teste_mercado` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `teste_mercado`;
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: localhost Database: teste_mercado
-- ------------------------------------------------------
-- Server version 5.7.21-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 `usuario`
--
DROP TABLE IF EXISTS `usuario`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `usuario` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`nome` varchar(45) DEFAULT NULL,
`senha` varchar(45) DEFAULT NULL,
`login` varchar(45) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `usuario`
--
LOCK TABLES `usuario` WRITE;
/*!40000 ALTER TABLE `usuario` DISABLE KEYS */;
INSERT INTO `usuario` VALUES (1,'Carlos Paiva','senha','carlos.paiva');
/*!40000 ALTER TABLE `usuario` 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 2018-06-28 19:57:01
|
DROP DATABASE IF EXISTS geeglo_store;
CREATE DATABASE geeglo_store;
ALTER DATABASE geeglo_store CHARACTER SET utf8 COLLATE utf8_general_ci;
use geeglo_store;
DROP TABLE IF EXISTS country;
create table country (
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
title VARCHAR(128),
phoneCode VARCHAR(10)
);
ALTER TABLE country CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
DROP TABLE IF EXISTS province;
create table province (
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
country_id INT,
title VARCHAR(128),
CONSTRAINT fk_province_country FOREIGN KEY (country_id) REFERENCES country (id)
);
ALTER TABLE province CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
DROP TABLE IF EXISTS city;
create table city (
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
country_id INT,
province_id INT,
title VARCHAR(128),
phoneCode VARCHAR(10),
CONSTRAINT fk_city_country FOREIGN KEY (country_id) REFERENCES country (id),
CONSTRAINT fk_city_province FOREIGN KEY (province_id) REFERENCES province (id)
);
ALTER TABLE city CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
-- create table location (
-- id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
-- country_id INT NOT NULL,
-- province_id INT NOT NULL,
-- city_id INT NOT NULL,
-- title VARCHAR(60) NOT NULL,
-- latitude DOUBLE,
-- longitude DOUBLE,
-- address VARCHAR(255),
-- phone_number VARCHAR(8),
-- post_code VARCHAR(10),
-- CONSTRAINT fk_location_country FOREIGN KEY (country_id) REFERENCES country (id),
-- CONSTRAINT fk_location_province FOREIGN KEY (province_id) REFERENCES province (id),
-- CONSTRAINT fk_location_city FOREIGN KEY (city_id) REFERENCES city (id)
-- );
-- ALTER TABLE location CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
DROP TABLE IF EXISTS user;
create table user (
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
username VARCHAR(128),
gmail VARCHAR(128),
mobile VARCHAR(11),
password VARCHAR(128),
image VARCHAR(128),
enter_date timestamp NOT NULL,
CONSTRAINT uk_user_gmail UNIQUE KEY(gmail),
CONSTRAINT uk_user_mobile UNIQUE KEY(mobile)
);
ALTER TABLE user CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
DROP TABLE IF EXISTS user_info;
create table user_info (
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
user_id INT NOT NULL UNIQUE,
first_name VARCHAR(40),
last_name VARCHAR(40),
full_name VARCHAR(80),
national_code VARCHAR(10),
birthdate CHAR(10),
age INT,
CONSTRAINT fk_user_info_user FOREIGN KEY (user_id) REFERENCES user (id)
);
ALTER TABLE user_info CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
DROP TABLE IF EXISTS address;
create table address (
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
user_id INT NOT NULL,
title VARCHAR(60) NOT NULL,
latitude DOUBLE,
longitude DOUBLE,
detail VARCHAR(255),
phone_number VARCHAR(8),
post_code VARCHAR(10),
CONSTRAINT fk_address_user FOREIGN KEY (user_id) REFERENCES user (id)
);
ALTER TABLE address CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
-- create table user_location (
-- user_id INT NOT NULL,
-- location_id INT NOT NULL,
-- CONSTRAINT fk_user_location_user FOREIGN KEY (user_id) REFERENCES user (id),
-- CONSTRAINT fk_user_location_location FOREIGN KEY (location_id) REFERENCES location (id)
-- );
-- ALTER TABLE user_location CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
DROP TABLE IF EXISTS payment_type;
create table payment_type (
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
title VARCHAR(128) NOT NULL,
image VARCHAR(128),
is_activate BOOLEAN DEFAULT TRUE
);
ALTER TABLE payment_type CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
DROP TABLE IF EXISTS item_group;
create table item_group (
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
title VARCHAR(128) NOT NULL,
icon VARCHAR(128),
image VARCHAR(128)
);
ALTER TABLE item_group CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
create table item (
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
item_group_id INT NOT NULL,
title VARCHAR(128) NOT NULL,
price INT DEFAULT 0,
count INT DEFAULT 0,
unit VARCHAR(128),
image VARCHAR(128),
CONSTRAINT fk_item_item_group FOREIGN KEY (item_group_id) REFERENCES item_group (id)
);
ALTER TABLE item CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
DROP TABLE IF EXISTS delivery_status;
CREATE TABLE delivery_status (
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
title VARCHAR(60),
image VARCHAR(128)
);
ALTER TABLE delivery_status CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
DROP TABLE IF EXISTS cart_detail;
DROP TABLE IF EXISTS cart;
create table cart (
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
user_id INT NOT NULL,
delivery_status_id INT NOT NULL,
payment_type_id INT NOT NULL,
reference_no CHAR(10) NOT NULL,
creation_time TIMESTAMP,
register_time TIMESTAMP,
delivery_time TIMESTAMP,
total_price INT,
register_date CHAR(10),
delivery_date CHAR(10),
address_title VARCHAR(60),
payment_type_title VARCHAR(60),
is_paid BOOLEAN DEFAULT FALSE,
is_received BOOLEAN DEFAULT FALSE,
CONSTRAINT fk_cart_user FOREIGN KEY (user_id) REFERENCES user (id)
);
ALTER TABLE cart CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
DROP TABLE IF EXISTS cart_detail;
create table cart_detail (
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
cart_id INT NOT NULL,
reference_no CHAR(10) NOT NULL,
history TEXT,
CONSTRAINT fk_cart_detail_cart FOREIGN KEY (cart_id) REFERENCES cart (id)
);
ALTER TABLE cart_detail CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
DROP TABLE IF EXISTS open_cart;
create table open_cart (
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
user_id INT NOT NULL,
creation_time TIMESTAMP,
items TEXT
);
ALTER TABLE open_cart CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
INSERT INTO country (title, phoneCode) VALUES ('ایران', '+98');
INSERT INTO province (country_id, title) VALUES (1, 'تهران');
INSERT INTO city (country_id, province_id, title, phoneCode) VALUES (1, 1, 'تهران', '21');
INSERT INTO item_group (title, image) VALUES
('سبزیجات', 'vegetable.png'),
('مرکبات', 'lemon.png'),
('میوه', 'fruit.png'),
('صیفی جات', 'carrot.png'),
('استوایی', 'ananas.png');
INSERT INTO item (item_group_id, title, price, unit, image) VALUES
(1, 'کالای 1', 3000, 'کیلوگرم', 'goods.png'),
(1, 'کالای 2', 7000, 'لیتر', 'goods.png'),
(1, 'کالای 3', 3800, 'عدد', 'goods.png'),
(1, 'کالای 4', 4000, 'نیم کیلو', 'goods.png'),
(1, 'کالای 5', 15000, 'جین', 'goods.png');
INSERT INTO item (item_group_id, title, price, unit, image) VALUES
(2, 'کالای 1', 3000, 'کیلوگرم', 'goods.png'),
(2, 'کالای 5', 15000, 'جین', 'goods.png');
INSERT INTO item (item_group_id, title, price, unit, image) VALUES
(3, 'کالای 1', 3000, 'کیلوگرم', 'goods.png'),
(3, 'کالای 5', 15000, 'جین', 'goods.png'),
(3, 'کالای 4', 4000, 'نیم کیلو', 'goods.png');
INSERT INTO payment_type (title, image, is_activate) VALUES
('پرداخت اینترنتی', 'internet.png', false),
('پرداخت نقدی', 'cash.png', true),
('پرداخت با کارت خوان', 'pos.png', true);
INSERT INTO delivery_status (title, image) VALUES
('در حال بررسی', 'pending.png'),
('تایید شده', 'confirm.png'),
('در حال تامین', 'supplying.png'),
('آماده ارسال', 'ready-to-send.png'),
('در راه مقصد', 'on-way.png'),
('تحویل شده', 'delivered.png'),
('عدم حضور خریدار', 'absence.png');
INSERT INTO country (title, phoneCode) VALUES ('iran', '+98');
INSERT INTO province (country_id, title) VALUES (1, 'tehran');
INSERT INTO city (country_id, province_id, title, phoneCode) VALUES (1, 1, 'tehran', '21');
INSERT INTO item_group (title, image) VALUES
('Vegetables', 'vegetable.png'),
('Citrus', 'lemon.png'),
('Fruit', 'fruit.png'),
('Siffy', 'carrot.png'),
('Tropical', 'ananas.png');
INSERT INTO item (item_group_id, title, price, unit, image) VALUES
(1, 'goods 1', 3000, 'kg', 'goods.png'),
(1, 'goods 2', 7000, 'lit', 'goods.png'),
(1, 'goods 3', 3800, 'count', 'goods.png'),
(1, 'goods 4', 4000, 'kg', 'goods.png'),
(1, 'goods 5', 15000, 'jin', 'goods.png');
INSERT INTO item (item_group_id, title, price, unit, image) VALUES
(2, 'goods 6', 3000, 'kg', 'goods.png'),
(2, 'goods 7', 15000, 'jin', 'goods.png');
INSERT INTO item (item_group_id, title, price, unit, image) VALUES
(3, 'goods 8', 3000, 'kg', 'goods.png'),
(3, 'goods 9', 15000, 'jin', 'goods.png'),
(3, 'goods 10', 4000, 'lit', 'goods.png');
INSERT INTO payment_type (title, image, is_activate) VALUES
('internet', 'internet.png', false),
('cash', 'cash.png', true),
('pos', 'pos.png', true);
INSERT INTO delivery_status (title, image) VALUES
('pending', 'pending.png'),
('confirm', 'confirm.png'),
('supplying', 'supplying.png'),
('ready', 'ready-to-send.png'),
('onway', 'on-way.png'),
('delivered', 'delivered.png'),
('absence', 'absence.png');
|
/* Modelagem Básica -
ENTIDADE=TABELA
CAMPOS = ATRIBUTOS */
/*MODELAGEM CONCEITUAL - RASCUNHO */
CLIENTE
NOME - CARACTER(30)
CPF - NUMERICO(11)
EMAIL - CARACTER(30)
TELEFONE - CARACTER(30)
ENDERECO - CARACTER(100)
SEXO - CARACTER(1)
/* PROCESSOS DE MODELAGEM */
/*MODELAGEM CONCEITUAL - RASCUNHO
MODELAGEM LÓGICA - FAZ O DIAGRAMA DE CLASSSES
MODELAGEM LÓGICA - PROGRAMAS COMO BRMODELO */
/* FASE 03 - DBA / AD */
/*MODELAGEM FÍSICA - QUANDO É PASSADO PARA UMA SGBD
MODELAGEM FISICA - SCRIPT DE BANCO */
/* INICIANDO A MODELAGEM FISICA */
/* CRIANDO O BANCO DE DADOS */
CREATE DATABSE EXEMPLO;
CREATE DATABSE PROJETO;
/* CONECTANDO-SE AO BANCO */
USE PROJETO;
/* CRIANDO A TABELA DE CLIENTE */
CREATE TABLE CLIENTE (
NOME VARCHAR(30),
SEXO CHAR(1),
EMAIL VARCHAR(30),
CPF INT(11),
TELEFONE VARCHAR(30),
ENDERECO VARCHAR(100)
);
/* VERIFICANDO AS TABELAS DO BANCO */
SHOW TABLES;
/* COMO É A ESTRUTURA DE UMA TABELA */
/* DESCREVENDO TABELAS */
DESC CLIENTE;
/* TIPAGEM DE TABELAS DE BANCO DE DADOS
IMAGENS BLOB
PALAVRAS CHAR E VARCHAR
NUMEROS INTEIROS E QUEBRADOS FLOAT E INT
EXEMPLO FLOAT (TOTAL, VIRGULA) NUMERO QUE VAI SER PASSADO E QUANTOS
APÓS O PONTO E INT SÓ ACEITA NUMEROS INTEIROS
PARA TEXTOS GRANDES TEXT
*/
/* SINTAXE BASICA DE INSERÇÃO - INSERT INTO TABELA... */
/* FORMA 01 - OMITINDO AS COLUNAS */
INSERT INTO CLIENTE VALUES
('JOAO','M','JOAO@GMAIL.COM',992192121,'22923110','MAIA LACERDA - CENTRO - RIO DE JANEIRO - RJ' );
INSERT INTO CLIENTE VALUES
('PEDRO','M','JEDO@GMAIL.COM',832192121,'44923110','PELE - BARRA DA TIJUCA - RIO DE JANEIRO - RJ' );
INSERT INTO CLIENTE VALUES
('JOSEVALDO','M','JOSEVALDO@GMAIL.COM',212192121,'21923110','ANTONIO FRANCISCO - FLAMENGO - RIO DE JANEIRO - RJ' );
/* FORMA 02 - COLOCANDO AS COLUNAS */
INSERT INTO CLIENTE (NOME,SEXO,CPF,TELEFONE,ENDERECO) VALUES
('LILIAN','F',482192121,'44423110','PELE - COPACANABA - RIO DE JANEIRO - RJ' );
/*FORMA 03 - INSERT COMPACTO - SOMENTE MYSQL */
INSERT INTO CLIENTE VALUES('ANA','F','ANA@GLOBO.COM',85548962,'548556985','PRES ANTONIO CENTRO GOVERNADOR VALADARES-MG'),
('PAMELA','F','PAM@GLOBO.COM',21248962,'898782985','PRES ANTONIO CENTRO BALNEARIO CAMBURIU-MG');
/* O COMANDO SELECT selecao projecao e juncao */
SELECT NOW() AS DATA_HORA, 'FELIPE MAFRA' AS PROFESSOR;
SELECT 'FELIPE MAFRA';
SELECT 'BANCO DE DADOS';
/* ALIAS DE COLUNAS */
SELECT NOME AS CLIENTE, SEXO , EMAIL FROM CLIENTE;
SELECT NOME, SEXO, EMAIL, ENDERECO FROM CLIENTE;
SELECT NOME, SEXO, EMAIL, ENDERECO , NOW() AS DATA_HORA FROM CLIENTE;
/* APENAS PARA FINS ACADEMICOS */
/* NÃO DIGITE DIRETAMENTE NO BANCO */
SELECT * FROM CLIENTE;
/* FILTRANDO */
SELECT NOME, SEXO FROM CLIENTE WHERE SEXO = 'M';
SELECT NOME, ENDERECO FROM CLIENTE WHERE SEXO = 'F';
/* ULTILIZANDO O LIKE */
/* LIKE É ULTILIZADO PARA ACHAR UMA PARTE ESPECIFICA DO CAMPO */
/* % SE COLOCAR NO COMEÇO É QUANDO TERMINA SE COLOCAR ENTRE
A PARTE QUE DIZER QUE ESTÁ NO CAMPO EX %CENTRO% USAR LIKE
DE VEZ EM QUANDO*/
SELECT NOME, SEXO FROM CLIENTE WHERE ENDERECO LIKE 'RJ';
/* CARACTER CORINGA % -> QUALQUER COISA */
SELECT NOME, SEXO FROM CLIENTE
WHERE ENDERECO LIKE '%RJ';
SELECT NOME, SEXO, ENDERECO FROM CLIENTE
WHERE ENDERECO LIKE '%RJ';
SELECT NOME, SEXO, ENDERECO FROM CLIENTE
WHERE ENDERECO LIKE 'ANTONIO FRANCISCO%';
SELECT NOME, SEXO, ENDERECO FROM CLIENTE
WHERE ENDERECO LIKE '%CENTRO%';
/* EXERCICIOS */
CREATE DATABASE LIVRARIA;
SELECT LIVRO , UF FROM LIVRO WHERE SEXO = 'M';
CREATE TABLE LIVRO (
LIVRO VARCHAR(100),
AUTOR VARCHAR(100),
SEXO CHAR(1),
PAGINAS INT(5),
EDITORA VARCHAR(30),
VALOR FLOAT(10,2),
UF CHAR(2),
ANO INT(4)
);
/*INSERINDO INFORMAÇÕES */
INSERT INTO LIVRO VALUES('CAVALEIRO REAL','ANA CLAUDIA','F',465,'ATLAS',49.9,'RJ',2009);
INSERT INTO LIVRO VALUES('JAVA DEITEL','DEITEL','M',485,'JAVA',249.9,'SP',2019);
INSERT INTO LIVRO VALUES('LIDERANÇA JAVA','ERNESTO','M',265,'CASA DE CÓDIGO',49.9,'RS',2012);
INSERT INTO LIVRO VALUES('PRODUCT OWNER','PAULA CLAUDIA','F',465,'ATLAS',49.9,'RJ',2009);
INSERT INTO LIVRO VALUES('BIG DATA','CAIO MOUTA','M',465,'ATLAS',49.9,'RJ',2009);
INSERT INTO LIVRO VALUES('BUSSINESS INTELIGENCE','LANDERLAN','M',465,'ATLAS',49.9,'RJ',2009);
INSERT INTO LIVRO VALUES('MACHINE LEARNING','MAX VERSTAPPEN','M',465,'ATLAS',49.9,'RJ',2009);
/* SABER ONDE ESTÁ CONECTADO */
STATUS
/* MOSTRAR QUANTOS BANCOS FORAM CRIADOS */
SHOW DATABASES;
/* trazer todos os dados */
SELECT * FROM LIVROS;
/* TRAZER NOME DO LIVRO E O NOME DA EDITORA */
SELECT LIVRO,EDITORA FROM LIVRO;
/*TRAZER O NOME DO LIVRO E A UF DOS LIVROS PUBLICADOS POR AUTORES DO SEXO MASCULINO */
SELECT LIVRO,UF,SEXO FROM LIVRO WHERE SEXO = 'M';
/* TRAZER O NOME DO LIVRO E O NÚMERO DE PÁGINAS DOS LIVROS PUBLICANOS POR AUTORES DO SEXO FEMININO */
SELECT LIVRO,PAGINAS,SEXO FROM LIVRO WHERE SEXO = 'F';
/* TRAZER OS VALORES DOS LIVROS DAS EDITORAS DE SÃO PAULO */
SELECT VALOR FROM LIVRO WHERE UF = 'SP';
/* TRAZER OS VALORES DOS AUTORES DO SEXO MASCULINO QUE TIVERAM LIVROS PUBLICADOS POR SÃO PAULO OU RIO DE JANEIRO */
SELECT AUTOR,SEXO, UF FROM LIVRO WHERE SEXO = 'M' AND (UF = 'SP' OR UF = 'RJ');
/* OPERADORES LÓGICOS
OR-> BASTA QUE UMA SEJA VERDADEIRA PARA QUE SEJA VERDADEIRA */
SELECT NOME, SEXO, ENDERECO FROM CLIENTE
WHERE SEXO = 'M' OR ENDERECO LIKE '%RJ';
SELECT NOME, SEXO , ENDERECO FROM CLIENTE WHERE SEXO = 'F' OR ENDERECO LIKE '%PRES ANTONIO';
/* AND QUANDO AMBAS SÃO VERDADEIRAS */
SELECT NOME, SEXO, ENDERECO FROM CLIENTE WHERE SEXO = 'M' AND ENDERECO LIKE '%RJ';
SELECT NOME, SEXO , ENDERECO FROM CLIENTE WHERE SEXO = 'F' AND ENDERECO LIKE '%PRES ANTONIO';
/* CONTANDO OS REGISTROS DE UMA TABELA */
SELECT COUNT(*) AS "QUANTIDADE DE REGISTROS" FROM CLIENTES
/* OPERADOR GROUP BY */
SELECT SEXO, COUNT(*) FROM CLIENTE;
SELECT SEXO, COUNT(*) FROM CLIENTE GROUP BY SEXO;
CREATE DATABASE EXERCICIO;
USE EXERCICIO;
create table funcionarios
(
idFuncionario integer,
nome varchar(100),
email varchar(200),
sexo varchar(10),
departamento varchar(100),
admissao varchar (10),
salario integer,
cargo varchar(100),
idRegiao int,
primary key (idFuncionario)
);
insert into funcionarios values (1,'Kelley','rkelley0@soundcloud.com','Feminino','Computadores','10/2/2009',67470,'Structural Engineer',2);
insert into funcionarios values (2,'Armstrong','sarmstrong1@infoseek.co.jp','Masculino','Esporte','3/31/2008',71869,'Financial Advisor',2);
insert into funcionarios values (3,'Carr','fcarr2@woothemes.com','Masculino','Automotivo','7/12/2009',101768,'Recruiting Manager',3);
insert into funcionarios values (4,'Murray','jmurray3@gov.uk','Feminino','Joalheria','12/25/2014',96897,'Desktop Support Technician',3);
insert into funcionarios values (5,'Ellis','jellis4@sciencedirect.com','Feminino','Alimentícios','9/19/2002',63702,'Software Engineer III',7);
insert into funcionarios values (6,'Phillips','bphillips5@time.com','Masculino','Ferramentas','8/21/2013',118497,'Executive Secretary',1);
insert into funcionarios values (7,'Williamson','rwilliamson6@ted.com','Masculino','Computadores','5/14/2006',65889,'Dental Hygienist',6);
insert into funcionarios values (8,'Harris','aharris7@ucoz.com','Feminino','Brinquedos','8/12/2003',84427,'Safety Technician I',4);
insert into funcionarios values (9,'James','rjames8@prnewswire.com','Masculino','Joalheria','9/7/2005',108657,'Sales Associate',2);
insert into funcionarios values (10,'Sanchez','rsanchez9@cloudflare.com','Masculino','Filmes','3/13/2013',108093,'Sales Representative',1);
insert into funcionarios values (11,'Jacobs','jjacobsa@sbwire.com','Feminino','Joalheria','11/27/2003',121966,'Community Outreach Specialist',7);
insert into funcionarios values (12,'Black','mblackb@edublogs.org','Masculino','Roupas','2/4/2003',44179,'Data Coordiator',7);
insert into funcionarios values (13,'Schmidt','sschmidtc@state.gov','Masculino','Bebês','10/13/2002',85227,'Compensation Analyst',3);
insert into funcionarios values (14,'Webb','awebbd@baidu.com','Feminino','Computadores','10/22/2006',59763,'Software Test Engineer III',4);
insert into funcionarios values (15,'Jacobs','ajacobse@google.it','Feminino','Games','3/4/2007',141139,'Community Outreach Specialist',7);
insert into funcionarios values (16,'Medina','smedinaf@amazonaws.com','Feminino','Bebês','3/14/2008',106659,'Web Developer III',1);
insert into funcionarios values (17,'Morgan','dmorgang@123-reg.co.uk','Feminino','Crianças','5/4/2011',148952,'Programmer IV',6);
insert into funcionarios values (18,'Nguyen','jnguyenh@google.com','Masculino','Lar','11/3/2014',93804,'Geologist II',5);
insert into funcionarios values (19,'Day','rdayi@chronoengine.com','Masculino','Eletronicos','9/22/2004',109890,'VP Sales',3);
insert into funcionarios values (20,'Carr','dcarrj@ocn.ne.jp','Feminino','Filmes','11/22/2007',115274,'VP Quality Control',5);
insert into funcionarios values (21,'Bryant','sbryantk@wunderground.com','Feminino','Industrial','8/12/2005',78052,'Software Consultant',3);
insert into funcionarios values (22,'Alexander','kalexanderl@marketwatch.com','Masculino','Automotivo','12/26/2011',144724,'Marketing Assistant',2);
insert into funcionarios values (23,'Chapman','jchapmanm@archive.org','Feminino','Joalheria','4/12/2001',126103,'Senior Developer',4);
insert into funcionarios values (24,'Kelly','ekellyn@weibo.com','Masculino','Jardim','6/29/2006',144965,'Nurse Practicioner',2);
insert into funcionarios values (25,'Stephens','jstephenso@ow.ly','Masculino','Brinquedos','6/4/2004',70613,'Business Systems Development Analyst',1);
insert into funcionarios values (26,'Porter','vporterp@yelp.com','Feminino','Lar','5/30/2011',90746,'Dental Hygienist',2);
insert into funcionarios values (27,'Owens','cowensq@shareasale.com','Feminino','Lar','5/26/2005',78698,'Executive Secretary',2);
insert into funcionarios values (28,'Scott','cscottr@sphinn.com','Feminino','Books','3/2/2008',63336,'Sales Representative',4);
insert into funcionarios values (29,'Price','cprices@Brasil.gov','Feminino','Roupas','7/5/2013',95436,'Quality Engineer',3);
insert into funcionarios values (30,'Weaver','dweavert@shinystat.com','Masculino','Beleza','2/17/2012',83144,'Account Representative III',2);
insert into funcionarios values (31,'Willis','hwillisu@army.mil','Feminino','Ferramentas','10/21/2012',113507,'Accountant I',7);
insert into funcionarios values (32,'Torres','ltorresv@amazon.de','Masculino','Games','4/7/2014',78245,'Nuclear Power Engineer',6);
insert into funcionarios values (33,'Greene','wgreenew@blogspot.com','Masculino','Filmes','3/21/2000',87057,'Assistant Manager',1);
insert into funcionarios values (34,'Reed','areedx@cisco.com','Masculino','Filmes','11/28/2002',120579,'Assistant Media Planner',6);
insert into funcionarios values (35,'Smith','bsmithy@statcounter.com','Feminino','Books','6/13/2013',94884,'Librarian',7);
insert into funcionarios values (36,'Bradley','nbradleyz@goodreads.com','Masculino','Outdoors','12/28/2008',107222,'Payment Adjustment Coordinator',3);
insert into funcionarios values (37,'Cruz','rcruz10@blinklist.com','Feminino','Lar','5/20/2000',61739,'Quality Engineer',1);
insert into funcionarios values (38,'Williamson','dwilliamson11@rediff.com','Feminino','Jardim','1/25/2012',82026,'Nurse',2);
insert into funcionarios values (39,'Kennedy','skennedy12@rediff.com','Masculino','Bebês','7/2/2011',79339,'Civil Engineer',1);
insert into funcionarios values (40,'Hawkins','phawkins13@twitpic.com','Feminino','Roupas','8/20/2011',76809,'Quality Engineer',6);
insert into funcionarios values (41,'Allen','jallen14@ustream.tv','Feminino','Bebês','5/10/2001',89680,'Web Developer III',6);
insert into funcionarios values (42,'Watkins','mwatkins15@wiley.com','Masculino','Computadores','4/1/2008',125668,'Executive Secretary',7);
insert into funcionarios values (43,'Ferguson','mferguson16@qq.com','Masculino','Esporte','5/29/2009',82960,'Account Representative III',6);
insert into funcionarios values (44,'Simmons','asimmons17@csmonitor.com','Masculino','Filmes','12/21/2013',113857,'Developer III',2);
insert into funcionarios values (45,'Nguyen','mnguyen18@biblegateway.com','Masculino','Automotivo','1/24/2002',108378,'Electrical Engineer',7);
insert into funcionarios values (46,'Lawrence','jlawrence19@linkedin.com','Masculino','Outdoors','12/11/2011',133424,'Junior Executive',7);
insert into funcionarios values (47,'Oliver','joliver1a@cnbc.com','Feminino','Roupas','8/30/2013',42797,'Software Engineer III',5);
insert into funcionarios values (48,'Johnson','jjohnson1b@usgs.gov','Masculino','Computadores','4/26/2004',134940,'Financial Advisor',4);
insert into funcionarios values (49,'Crawford','hcrawford1c@dell.com','Masculino','Lar','12/21/2008',119471,'Editor',6);
insert into funcionarios values (50,'Armstrong','parmstrong1d@hc360.com','Feminino','Automotivo','3/16/2010',89969,'Senior Editor',4);
insert into funcionarios values (51,'Dixon','jdixon1e@dot.gov','Masculino','Bebês','9/26/2006',106281,'Senior Developer',3);
insert into funcionarios values (52,'Snyder','ssnyder1f@ca.gov','Feminino','Crianças','9/26/2002',141678,'Design Engineer',3);
insert into funcionarios values (53,'Coleman','dcoleman1g@dedecms.com','Masculino','Computadores','6/14/2008',110839,'Automation Specialist I',1);
insert into funcionarios values (54,'Reed','sreed1h@intel.com','Feminino','Brinquedos','4/15/2001',84275,'VP Marketing',5);
insert into funcionarios values (55,'Ross','jross1i@infoseek.co.jp','Masculino','Automotivo','4/21/2004',71363,'Environmental Tech',3);
insert into funcionarios values (56,'Watkins','kwatkins1j@youtu.be','Masculino','Jardim','12/2/2002',93680,'VP Accounting',3);
insert into funcionarios values (57,'Allen','jallen1k@google.cn','Feminino','Outdoors','11/20/2000',73755,'Geologist II',3);
insert into funcionarios values (58,'Baker','jbaker1l@usnews.com','Masculino','Games','3/2/2007',68857,'Information Systems Manager',2);
insert into funcionarios values (59,'Garcia','vgarcia1m@deviantart.com','Feminino','Saúde','3/19/2002',48360,'Registered Nurse',6);
insert into funcionarios values (60,'Lane','elane1n@un.org','Masculino','Outdoors','7/15/2004',104896,'Financial Advisor',5);
insert into funcionarios values (61,'Watson','cwatson1o@paypal.com','Feminino','Ferramentas','8/10/2009',81870,'Occupational Therapist',7);
insert into funcionarios values (62,'Boyd','aboyd1p@artisteer.com','Masculino','Automotivo','5/29/2007',69936,'Senior Editor',7);
insert into funcionarios values (63,'Young','hyoung1q@cisco.com','Feminino','Alimentícios','12/11/2007',138844,'Mechanical Systems Engineer',6);
insert into funcionarios values (64,'Cooper','tcooper1r@umich.edu','Masculino','Jardim','11/12/2011',139796,'Office Assistant IV',1);
insert into funcionarios values (65,'Jordan','jjordan1s@about.me','Feminino','Automotivo','1/27/2000',86939,'Tax Accountant',3);
insert into funcionarios values (66,'Rodriguez','lrodriguez1t@narod.ru','Masculino','Beleza','9/27/2003',141949,'Product Engineer',4);
insert into funcionarios values (67,'Mills','jmills1u@printfriendly.com','Feminino','Alimentícios','8/8/2004',114200,'Senior Sales Associate',7);
insert into funcionarios values (68,'Coleman','kcoleman1v@360.cn','Masculino','Beleza','9/2/2012',121378,'Web Developer I',7);
insert into funcionarios values (69,'Stewart','dstewart1w@usnews.com','Masculino','Brinquedos','8/22/2000',148144,'Data Coordiator',4);
insert into funcionarios values (70,'Jordan','ajordan1x@moonfruit.com','Feminino','Games','11/13/2004',93839,'Database Administrator III',2);
insert into funcionarios values (71,'Vasquez','evasquez1y@behance.net','Masculino','Bebês','10/20/2002',77285,'Operator',6);
insert into funcionarios values (72,'Knight','tknight1z@weibo.com','Feminino','Música','10/13/2002',135688,'Statistician I',4);
insert into funcionarios values (73,'Palmer','ipalmer20@newsvine.com','Masculino','Esporte','4/3/2002',78828,'Director of Sales',2);
insert into funcionarios values (74,'Washington','jwashington21@squidoo.com','Feminino','Lar','7/11/2000',47206,'Programmer III',3);
insert into funcionarios values (75,'Sanchez','dsanchez22@blog.com','Feminino','Outdoors','10/6/2013',78157,'Senior Financial Analyst',1);
insert into funcionarios values (76,'Grant','egrant23@prlog.org','Feminino','Eletronicos','7/23/2000',49296,'Software Test Engineer II',6);
insert into funcionarios values (77,'Daniels','ndaniels24@google.ca','Masculino','Ferramentas','2/7/2013',139061,'Environmental Specialist',3);
insert into funcionarios values (78,'Medina','jmedina25@dot.gov','Feminino','Games','9/16/2005',114989,'Marketing Assistant',3);
insert into funcionarios values (79,'Cunningham','acunningham26@simplemachines.org','Masculino','Roupas','9/15/2002',88345,'Junior Executive',6);
insert into funcionarios values (80,'Little','klittle27@un.org','Masculino','Música','9/12/2001',114647,'Editor',5);
insert into funcionarios values (81,'Welch','jwelch28@1und1.de','Masculino','Outdoors','7/24/2004',118514,'Accounting Assistant III',5);
insert into funcionarios values (82,'Gilbert','hgilbert29@xrea.com','Feminino','Lar','5/11/2003',93712,'Junior Executive',7);
insert into funcionarios values (83,'George','ageorge2a@gmpg.org','Masculino','Industrial','5/2/2009',86373,'Compensation Analyst',7);
insert into funcionarios values (84,'Hughes','mhughes2b@youtube.com','Masculino','Crianças','1/28/2013',122110,'Structural Engineer',6);
insert into funcionarios values (85,'Williams','jwilliams2c@businesswire.com','Feminino','Games','3/26/2006',95542,'Nurse',2);
insert into funcionarios values (86,'Martinez','wmartinez2d@barnesandnoble.com','Feminino','Outdoors','5/25/2013',131392,'Systems Administrator II',2);
insert into funcionarios values (87,'Hamilton','hhamilton2e@google.de','Masculino','Música','10/23/2010',98401,'VP Quality Control',1);
insert into funcionarios values (88,'Gomez','jgomez2f@mtv.com','Feminino','Ferramentas','9/19/2004',103806,'Accounting Assistant I',3);
insert into funcionarios values (89,'Webb','awebb2g@springer.com','Masculino','Saúde','4/10/2014',73686,'Tax Accountant',2);
insert into funcionarios values (90,'Thomas','tthomas2h@webnode.com','Masculino','Games','11/3/2011',55002,'Research Assistant IV',6);
insert into funcionarios values (91,'Wallace','swallace2i@state.tx.us','Masculino','Bebês','3/7/2005',65216,'Registered Nurse',4);
insert into funcionarios values (92,'Ortiz','aortiz2j@jigsy.com','Feminino','Automotivo','6/22/2010',113231,'Senior Editor',7);
insert into funcionarios values (93,'Knight','nknight2k@cafepress.com','Feminino','Eletronicos','4/3/2014',125847,'Chemical Engineer',5);
insert into funcionarios values (94,'Hunt','thunt2l@twitpic.com','Feminino','Música','5/31/2000',140430,'Senior Cost Accountant',2);
insert into funcionarios values (95,'Franklin','sfranklin2m@wordpress.com','Masculino','Filmes','11/6/2013',117105,'VP Quality Control',5);
insert into funcionarios values (96,'Mason','wmason2n@xrea.com','Masculino','Beleza','2/21/2004',96673,'Accounting Assistant I',1);
insert into funcionarios values (97,'Williams','wwilliams2o@berkeley.edu','Feminino','Games','3/14/2013',79267,'VP Quality Control',7);
insert into funcionarios values (98,'Freeman','lfreeman2p@tiny.cc','Feminino','Crianças','10/11/2007',109154,'Accountant I',4);
insert into funcionarios values (99,'Palmer','ipalmer2q@youku.com','Feminino','Books','4/24/2002',138815,'Physical Therapy Assistant',3);
insert into funcionarios values (100,'Bell','rbell2r@utexas.edu','Masculino','Esporte','8/3/2007',68210,'Registered Nurse',4);
insert into funcionarios values (101,'Rivera','jrivera2s@oakley.com','Masculino','Games','11/16/2002',137281,'VP Sales',3);
insert into funcionarios values (102,'Matthews','kmatthews2t@oaic.gov.au','Masculino','Saúde','8/9/2008',114970,'Statistician IV',2);
insert into funcionarios values (103,'Reed','dreed2u@arstechnica.com','Masculino','Automotivo','7/19/2003',126001,'Structural Engineer',6);
insert into funcionarios values (104,'Adams','eadams2v@yandex.ru','Masculino','Alimentícios','9/16/2003',78736,'Financial Analyst',6);
insert into funcionarios values (105,'Young','syoung2w@cmu.edu','Masculino','Calçados','9/16/2009',80830,'Quality Control Specialist',4);
insert into funcionarios values (106,'Gardner','rgardner2x@theguardian.com','Masculino','Crianças','8/6/2009',47879,'Product Engineer',5);
insert into funcionarios values (107,'Castillo','bcastillo2y@cornell.edu','Feminino','Computadores','3/31/2004',132634,'Civil Engineer',2);
insert into funcionarios values (108,'Perkins','jperkins2z@prlog.org','Masculino','Roupas','7/14/2005',68344,'Senior Cost Accountant',7);
insert into funcionarios values (109,'Freeman','bfreeman30@fda.gov','Feminino','Roupas','10/14/2007',147868,'General Manager',6);
insert into funcionarios values (110,'Howell','whowell31@free.fr','Masculino','Books','4/15/2011',67255,'Geologist III',4);
insert into funcionarios values (111,'Austin','naustin32@discuz.net','Feminino','Computadores','6/13/2012',47494,'Help Desk Operator',6);
insert into funcionarios values (112,'Morris','amorris33@irs.gov','Feminino','Filmes','7/19/2013',127645,'Legal Assistant',1);
insert into funcionarios values (113,'Moore','kmoore34@shareasale.com','Masculino','Bebês','3/1/2000',54413,'Operator',5);
insert into funcionarios values (114,'Sims','msims35@i2i.jp','Masculino','Alimentícios','12/6/2012',136790,'Nuclear Power Engineer',2);
insert into funcionarios values (115,'Nguyen','rnguyen36@bandcamp.com','Feminino','Roupas','6/30/2007',58420,'Graphic Designer',1);
insert into funcionarios values (116,'Wells','awells37@theatlantic.com','Masculino','Industrial','1/17/2002',73813,'Occupational Therapist',3);
insert into funcionarios values (117,'Martin','jmartin38@chron.com','Masculino','Filmes','10/2/2012',49644,'Senior Developer',4);
insert into funcionarios values (118,'Fox','pfox39@discovery.com','Masculino','Automotivo','9/3/2009',87134,'Assistant Manager',3);
insert into funcionarios values (119,'Washington','wwashington3a@dot.gov','Feminino','Roupas','10/6/2008',148408,'Speech Pathologist',3);
insert into funcionarios values (120,'Evans','wevans3b@scientificamerican.com','Feminino','Brinquedos','1/23/2008',77335,'Chemical Engineer',4);
insert into funcionarios values (121,'Elliott','belliott3c@jiathis.com','Feminino','Esporte','8/5/2007',131409,'Technical Writer',7);
insert into funcionarios values (122,'Wagner','jwagner3d@fotki.com','Masculino','Bebês','2/26/2001',77530,'Librarian',1);
insert into funcionarios values (123,'Griffin','agriffin3e@mtv.com','Feminino','Jardim','4/26/2002',101875,'Business Systems Development Analyst',4);
insert into funcionarios values (124,'Chavez','mchavez3f@sohu.com','Feminino','Alimentícios','12/7/2005',144028,'Executive Secretary',6);
insert into funcionarios values (125,'Dean','ldean3g@blogspot.com','Feminino','Filmes','5/5/2012',140708,'Nurse',1);
insert into funcionarios values (126,'Burton','bburton3h@360.cn','Masculino','Calçados','7/11/2013',79172,'Associate Professor',7);
insert into funcionarios values (127,'Harper','sharper3i@slideshare.net','Feminino','Outdoors','5/18/2000',144639,'VP Quality Control',7);
insert into funcionarios values (128,'Gibson','tgibson3j@ucoz.com','Masculino','Computadores','3/24/2003',109449,'Engineer II',7);
insert into funcionarios values (129,'Grant','lgrant3k@live.com','Feminino','Computadores','10/15/2006',108441,'Nurse',6);
insert into funcionarios values (130,'Nichols','bnichols3l@dropbox.com','Feminino','Games','7/3/2008',145692,'Recruiting Manager',5);
insert into funcionarios values (131,'Kelley','wkelley3m@domainmarket.com','Masculino','Calçados','2/24/2000',120377,'Research Nurse',4);
insert into funcionarios values (132,'Montgomery','rmontgomery3n@chicagotribune.com','Feminino','Lar','5/14/2003',63929,'Research Assistant IV',5);
insert into funcionarios values (133,'Martinez','dmartinez3o@deviantart.com','Masculino','Games','2/1/2001',124853,'Systems Administrator III',2);
insert into funcionarios values (134,'Harvey','jharvey3p@angelfire.com','Feminino','Outdoors','6/3/2010',99854,'VP Marketing',6);
insert into funcionarios values (135,'Hicks','ahicks3q@pcworld.com','Feminino','Crianças','8/11/2013',58675,'Technical Writer',3);
insert into funcionarios values (136,'Rose','lrose3r@slideshare.net','Feminino','Beleza','5/16/2007',50060,'Accountant IV',1);
insert into funcionarios values (137,'Simmons','jsimmons3s@imageshack.us','Feminino','Esporte','8/9/2014',72748,'Quality Control Specialist',3);
insert into funcionarios values (138,'Montgomery','wmontgomery3t@taobao.com','Masculino','Eletronicos','9/1/2005',71082,'Geologist III',7);
insert into funcionarios values (139,'Hart','rhart3u@wsj.com','Masculino','Joalheria','1/8/2012',119773,'Pharmacist',3);
insert into funcionarios values (140,'Wheeler','bwheeler3v@google.co.uk','Masculino','Computadores','1/22/2001',82358,'Information Systems Manager',4);
insert into funcionarios values (141,'Williamson','rwilliamson3w@amazon.co.jp','Masculino','Games','12/12/2005',145575,'VP Accounting',1);
insert into funcionarios values (142,'Burton','gburton3x@umich.edu','Masculino','Industrial','12/6/2009',105810,'Recruiter',5);
insert into funcionarios values (143,'Gutierrez','jgutierrez3y@tuttocitta.it','Masculino','Ferramentas','5/6/2014',58805,'Database Administrator I',1);
insert into funcionarios values (144,'Barnes','lbarnes3z@indiegogo.com','Feminino','Bebês','12/8/2008',112837,'Clinical Specialist',5);
insert into funcionarios values (145,'Day','lday40@upenn.edu','Feminino','Bebês','4/14/2013',125914,'Junior Executive',6);
insert into funcionarios values (146,'Thompson','athompson41@booking.com','Masculino','Filmes','2/4/2009',133281,'Account Executive',6);
insert into funcionarios values (147,'Hernandez','ahernandez42@pagesperso-orange.fr','Feminino','Música','10/6/2012',96169,'Civil Engineer',1);
insert into funcionarios values (148,'Sanders','lsanders43@linkedin.com','Masculino','Filmes','5/9/2013',146970,'funcionarios Accountant III',3);
insert into funcionarios values (149,'Meyer','jmeyer44@facebook.com','Feminino','Brinquedos','5/3/2008',76352,'Human Resources Assistant IV',4);
insert into funcionarios values (150,'Diaz','pdiaz45@who.int','Masculino','Saúde','10/15/2006',128748,'Web Developer III',1);
insert into funcionarios values (151,'Larson','blarson46@newsvine.com','Masculino','Books','8/9/2011',50066,'Operator',1);
insert into funcionarios values (152,'Roberts','droberts47@jimdo.com','Masculino','Música','7/22/2011',105319,'Compensation Analyst',4);
insert into funcionarios values (153,'Carroll','jcarroll48@cisco.com','Masculino','Lar','10/30/2003',110622,'Safety Technician IV',4);
insert into funcionarios values (154,'Russell','mrussell49@exblog.jp','Feminino','Eletronicos','10/16/2009',87422,'Help Desk Operator',7);
insert into funcionarios values (155,'Robinson','trobinson4a@amazon.com','Masculino','Books','9/6/2007',45456,'Chemical Engineer',1);
insert into funcionarios values (156,'Hayes','ahayes4b@guardian.co.uk','Masculino','Industrial','5/21/2004',52298,'Analyst Programmer',7);
insert into funcionarios values (157,'Henry','dhenry4c@yelp.com','Masculino','Calçados','5/14/2007',131252,'Account Representative III',1);
insert into funcionarios values (158,'Chavez','mchavez4d@baidu.com','Masculino','Jardim','2/23/2001',128766,'Desktop Support Technician',2);
insert into funcionarios values (159,'Harvey','eharvey4e@opera.com','Masculino','Ferramentas','9/12/2009',138179,'Analog Circuit Design manager',3);
insert into funcionarios values (160,'Gutierrez','cgutierrez4f@usnews.com','Feminino','Industrial','6/22/2003',85012,'Financial Analyst',1);
insert into funcionarios values (161,'Cruz','mcruz4g@dedecms.com','Masculino','Saúde','8/24/2001',131479,'Senior Cost Accountant',7);
insert into funcionarios values (162,'Sullivan','jsullivan4h@cloudflare.com','Feminino','Saúde','12/28/2005',103182,'Accounting Assistant I',2);
insert into funcionarios values (163,'Robertson','jrobertson4i@live.com','Masculino','Jardim','6/7/2000',96996,'Software Test Engineer I',4);
insert into funcionarios values (164,'Robertson','trobertson4j@youtu.be','Feminino','Computadores','8/30/2008',106607,'Automation Specialist I',2);
insert into funcionarios values (165,'Lawson','jlawson4k@prnewswire.com','Masculino','Automotivo','12/5/2012',130993,'Administrative Officer',2);
insert into funcionarios values (166,'Meyer','kmeyer4l@bloglovin.com','Masculino','Industrial','3/5/2006',87097,'Safety Technician IV',7);
insert into funcionarios values (167,'Lopez','rlopez4m@foxnews.com','Masculino','Outdoors','1/25/2013',131961,'Legal Assistant',4);
insert into funcionarios values (168,'Burns','pburns4n@networksolutions.com','Feminino','Joalheria','6/9/2014',88093,'Editor',7);
insert into funcionarios values (169,'Sanders','rsanders4o@salon.com','Masculino','Filmes','12/24/2010',41898,'Tax Accountant',6);
insert into funcionarios values (170,'Martinez','cmartinez4p@facebook.com','Masculino','Eletronicos','6/28/2004',52808,'Human Resources Assistant I',2);
insert into funcionarios values (171,'Harris','mharris4q@squarespace.com','Feminino','Filmes','9/27/2004',110912,'Geologist I',5);
insert into funcionarios values (172,'Fields','rfields4r@amazon.co.uk','Masculino','Books','9/5/2009',101520,'Project Manager',1);
insert into funcionarios values (173,'Fox','ffox4s@geocities.com','Feminino','Books','11/21/2005',55633,'Systems Administrator IV',1);
insert into funcionarios values (174,'Reynolds','dreynolds4t@biglobe.ne.jp','Feminino','Books','10/8/2010',91561,'VP Product Management',7);
insert into funcionarios values (175,'Daniels','cdaniels4u@rambler.ru','Masculino','Alimentícios','11/7/2013',77307,'Biostatistician IV',7);
insert into funcionarios values (176,'Fisher','rfisher4v@jigsy.com','Masculino','Roupas','10/14/2012',67942,'Financial Advisor',6);
insert into funcionarios values (177,'Ferguson','nferguson4w@networksolutions.com','Feminino','Roupas','9/18/2008',80397,'Compensation Analyst',1);
insert into funcionarios values (178,'Butler','cbutler4x@amazon.de','Feminino','Esporte','2/17/2003',78157,'Librarian',1);
insert into funcionarios values (179,'Reynolds','rreynolds4y@miitbeian.gov.cn','Feminino','Jardim','1/29/2004',121836,'VP Accounting',7);
insert into funcionarios values (180,'Williamson','nwilliamson4z@dropbox.com','Masculino','Outdoors','11/8/2008',76063,'Administrative Assistant II',6);
insert into funcionarios values (181,'Shaw','sshaw50@instagram.com','Feminino','Jardim','5/2/2001',56923,'Social Worker',2);
insert into funcionarios values (182,'Gomez','rgomez51@baidu.com','Feminino','Industrial','4/4/2009',76932,'Legal Assistant',5);
insert into funcionarios values (183,'Harrison','jharrison52@scientificamerican.com','Feminino','Games','8/3/2002',64410,'Senior Developer',2);
insert into funcionarios values (184,'Watson','ewatson53@latimes.com','Feminino','Books','2/2/2008',111873,'Payment Adjustment Coordinator',2);
insert into funcionarios values (185,'Watson','rwatson54@webeden.co.uk','Feminino','Roupas','9/22/2001',74648,'Saúde Coach III',2);
insert into funcionarios values (186,'Larson','dlarson55@technorati.com','Feminino','Brinquedos','9/17/2011',144991,'Technical Writer',7);
insert into funcionarios values (187,'Gordon','kgordon56@techcrunch.com','Feminino','Outdoors','11/4/2005',107407,'Systems Administrator II',3);
insert into funcionarios values (188,'Rose','erose57@guardian.co.uk','Masculino','Alimentícios','3/17/2012',120225,'Editor',7);
insert into funcionarios values (189,'Anderson','banderson58@wsj.com','Masculino','Lar','12/2/2014',122272,'Environmental Specialist',2);
insert into funcionarios values (190,'Powell','hpowell59@geocities.com','Feminino','Saúde','11/13/2002',120577,'Web Designer III',1);
insert into funcionarios values (191,'Woods','dwoods5a@businesswire.com','Feminino','Eletronicos','4/29/2008',148986,'Structural Analysis Engineer',1);
insert into funcionarios values (192,'Morales','jmorales5b@joomla.org','Masculino','Games','2/10/2000',101855,'Engineer IV',4);
insert into funcionarios values (193,'Stanley','dstanley5c@is.gd','Feminino','Industrial','2/17/2006',140850,'Financial Analyst',4);
insert into funcionarios values (194,'Wagner','ewagner5d@cornell.edu','Masculino','Brinquedos','2/1/2006',142516,'Professor',1);
insert into funcionarios values (195,'Meyer','nmeyer5e@about.me','Masculino','Calçados','11/9/2012',48829,'Accountant I',1);
insert into funcionarios values (196,'Jacobs','rjacobs5f@oracle.com','Masculino','Outdoors','9/16/2006',81270,'Geological Engineer',1);
insert into funcionarios values (197,'Hayes','jhayes5g@jiathis.com','Feminino','Beleza','1/3/2011',130097,'Office Assistant IV',5);
insert into funcionarios values (198,'Sanders','esanders5h@ihg.com','Feminino','Industrial','1/24/2000',117905,'Dental Hygienist',4);
insert into funcionarios values (199,'Reed','sreed5i@bloglovin.com','Feminino','Calçados','11/12/2010',142483,'Social Worker',3);
insert into funcionarios values (200,'George','mgeorge5j@cdc.gov','Masculino','Filmes','9/20/2004',89633,'Software Consultant',4);
insert into funcionarios values (201,'Andrews','jandrews5k@free.fr','Masculino','Lar','3/18/2009',48684,'Nurse Practicioner',6);
insert into funcionarios values (202,'Morris','lmorris5l@patch.com','Feminino','Automotivo','1/23/2004',91932,'Analyst Programmer',1);
insert into funcionarios values (203,'Moreno','jmoreno5m@xing.com','Feminino','Alimentícios','10/7/2005',112004,'Internal Auditor',7);
insert into funcionarios values (204,'Powell','cpowell5n@cocolog-nifty.com','Feminino','Beleza','9/25/2000',116013,'Tax Accountant',4);
insert into funcionarios values (205,'Graham','jgraham5o@printfriendly.com','Feminino','Games','9/10/2008',109058,'Chemical Engineer',7);
insert into funcionarios values (206,'Riley','hriley5p@dailymotion.com','Masculino','Brinquedos','5/6/2012',61992,'Sales Representative',4);
insert into funcionarios values (207,'Harris','mharris5q@utexas.edu','Feminino','Filmes','10/2/2008',129527,'Statistician II',2);
insert into funcionarios values (208,'Gilbert','rgilbert5r@domainmarket.com','Feminino','Alimentícios','12/15/2001',67746,'Director of Sales',2);
insert into funcionarios values (209,'Peterson','jpeterson5s@t-online.de','Masculino','Books','3/14/2010',104530,'VP Marketing',2);
insert into funcionarios values (210,'Foster','jfoster5t@icq.com','Feminino','Música','1/17/2008',42759,'Social Worker',4);
insert into funcionarios values (211,'Fowler','afowler5u@parallels.com','Feminino','Crianças','2/25/2011',43097,'Associate Professor',2);
insert into funcionarios values (212,'Matthews','fmatthews5v@theatlantic.com','Feminino','Outdoors','11/22/2005',123936,'Internal Auditor',1);
insert into funcionarios values (213,'Thomas','gthomas5w@slate.com','Masculino','Ferramentas','11/28/2006',128239,'Teacher',6);
insert into funcionarios values (214,'West','gwest5x@hao123.com','Masculino','Computadores','10/31/2003',66084,'Electrical Engineer',6);
insert into funcionarios values (215,'Stevens','estevens5y@salon.com','Masculino','Games','3/14/2009',106729,'Occupational Therapist',5);
insert into funcionarios values (216,'Howard','dhoward5z@soundcloud.com','Masculino','Joalheria','3/15/2009',87269,'General Manager',4);
insert into funcionarios values (217,'Boyd','mboyd60@jimdo.com','Masculino','Lar','12/1/2004',128765,'Senior Financial Analyst',2);
insert into funcionarios values (218,'Ross','iross61@jimdo.com','Masculino','Games','5/25/2003',104671,'VP Marketing',7);
insert into funcionarios values (219,'Harrison','vharrison62@networkadvertising.org','Masculino','Calçados','5/1/2011',55073,'Assistant Professor',4);
insert into funcionarios values (220,'Ellis','lellis63@ucla.edu','Feminino','Outdoors','11/21/2007',146256,'Paralegal',1);
insert into funcionarios values (221,'Diaz','sdiaz64@disqus.com','Feminino','Lar','1/15/2005',55077,'Registered Nurse',7);
insert into funcionarios values (222,'Snyder','asnyder65@soundcloud.com','Feminino','Alimentícios','4/11/2011',124215,'Recruiting Manager',2);
insert into funcionarios values (223,'Gibson','bgibson66@lulu.com','Masculino','Computadores','4/28/2008',105444,'Human Resources Assistant II',6);
insert into funcionarios values (224,'Hanson','dhanson67@cmu.edu','Feminino','Esporte','5/1/2010',141513,'funcionarios Accountant I',1);
insert into funcionarios values (225,'Peterson','mpeterson68@Lar.pl','Feminino','Calçados','3/13/2008',97623,'Technical Writer',1);
insert into funcionarios values (226,'Gonzalez','tgonzalez69@umich.edu','Masculino','Saúde','11/12/2005',106833,'Registered Nurse',7);
insert into funcionarios values (227,'Rivera','crivera6a@amazon.co.jp','Feminino','Beleza','4/18/2006',69045,'Accounting Assistant IV',2);
insert into funcionarios values (228,'Washington','cwashington6b@cargocollective.com','Masculino','Outdoors','7/4/2008',113311,'Programmer III',2);
insert into funcionarios values (229,'Ruiz','lruiz6c@thetimes.co.uk','Feminino','Outdoors','11/2/2013',116301,'Design Engineer',3);
insert into funcionarios values (230,'Ford','sford6d@flavors.me','Feminino','Industrial','1/5/2006',138459,'Geological Engineer',1);
insert into funcionarios values (231,'Day','lday6e@usgs.gov','Feminino','Roupas','7/3/2005',87800,'Sales Associate',7);
insert into funcionarios values (232,'Peterson','apeterson6f@sina.com.cn','Feminino','Crianças','5/27/2000',52572,'Compensation Analyst',7);
insert into funcionarios values (233,'Gonzalez','rgonzalez6g@europa.eu','Masculino','Eletronicos','4/24/2009',44917,'Biostatistician IV',5);
insert into funcionarios values (234,'Walker','jwalker6h@google.es','Feminino','Calçados','2/2/2010',110896,'Accountant II',2);
insert into funcionarios values (235,'Griffin','sgriffin6i@123-reg.co.uk','Masculino','Books','12/22/2001',108970,'Senior Cost Accountant',2);
insert into funcionarios values (236,'Tucker','jtucker6j@dailymail.co.uk','Masculino','Joalheria','4/27/2009',83543,'Programmer II',5);
insert into funcionarios values (237,'Armstrong','aarmstrong6k@redcross.org','Feminino','Música','7/14/2013',63598,'Budget/Accounting Analyst II',1);
insert into funcionarios values (238,'Gonzales','cgonzales6l@berkeley.edu','Masculino','Filmes','4/6/2014',131274,'Clinical Specialist',2);
insert into funcionarios values (239,'Williamson','jwilliamson6m@arizona.edu','Feminino','Computadores','2/16/2005',149085,'Software Engineer III',7);
insert into funcionarios values (240,'Spencer','wspencer6n@marriott.com','Masculino','Games','9/21/2013',143223,'funcionarios Accountant IV',6);
insert into funcionarios values (241,'Rose','jrose6o@dion.ne.jp','Feminino','Roupas','12/22/2010',107207,'Web Developer II',3);
insert into funcionarios values (242,'Robinson','probinson6p@ucla.edu','Masculino','Saúde','11/30/2003',137594,'Operator',6);
insert into funcionarios values (243,'Gutierrez','kgutierrez6q@bravesites.com','Masculino','Lar','1/26/2006',139845,'Director of Sales',4);
insert into funcionarios values (244,'Alvarez','jalvarez6r@geocities.com','Feminino','Esporte','9/7/2012',65563,'Help Desk Technician',4);
insert into funcionarios values (245,'Webb','swebb6s@people.com.cn','Feminino','Crianças','1/2/2014',142988,'Marketing Manager',6);
insert into funcionarios values (246,'Ellis','tellis6t@squarespace.com','Feminino','Industrial','1/22/2000',134074,'Product Engineer',6);
insert into funcionarios values (247,'Romero','jromero6u@cafepress.com','Masculino','Brinquedos','1/21/2010',80654,'Geological Engineer',2);
insert into funcionarios values (248,'White','jwhite6v@tripadvisor.com','Masculino','Jardim','12/13/2005',118834,'Financial Analyst',6);
insert into funcionarios values (249,'Miller','jmiller6w@businesswire.com','Masculino','Crianças','3/3/2013',85559,'Pharmacist',2);
insert into funcionarios values (250,'Fowler','mfowler6x@geocities.jp','Masculino','Books','9/15/2001',84049,'Information Systems Manager',5);
insert into funcionarios values (251,'Duncan','pduncan6y@sina.com.cn','Feminino','Joalheria','1/16/2011',47439,'Tax Accountant',7);
insert into funcionarios values (252,'Johnston','jjohnston6z@irs.gov','Masculino','Ferramentas','12/16/2000',87072,'Structural Engineer',7);
insert into funcionarios values (253,'Marshall','mmarshall70@hibu.com','Feminino','Computadores','5/12/2003',123401,'Computer Systems Analyst I',4);
insert into funcionarios values (254,'Lawrence','alawrence71@unicef.org','Feminino','Alimentícios','4/2/2001',131681,'Account Executive',7);
insert into funcionarios values (255,'Lynch','rlynch72@sitemeter.com','Feminino','Crianças','8/29/2014',96118,'Social Worker',5);
insert into funcionarios values (256,'Stone','gstone73@google.es','Feminino','Books','12/1/2006',87816,'Administrative Assistant I',2);
insert into funcionarios values (257,'Freeman','gfreeman74@bloomberg.com','Feminino','Lar','6/5/2012',83804,'Operator',1);
insert into funcionarios values (258,'Schmidt','dschmidt75@sitemeter.com','Masculino','Automotivo','10/26/2007',133612,'VP Product Management',4);
insert into funcionarios values (259,'Wallace','gwallace76@technorati.com','Feminino','Computadores','4/14/2010',47007,'Internal Auditor',3);
insert into funcionarios values (260,'Fuller','ffuller77@ustream.tv','Masculino','Saúde','12/13/2005',142967,'GIS Technical Architect',5);
insert into funcionarios values (261,'Bennett','jbennett78@surveymonkey.com','Feminino','Crianças','12/6/2011',71433,'Food Chemist',4);
insert into funcionarios values (262,'Lewis','dlewis79@parallels.com','Feminino','Beleza','3/8/2000',74191,'Business Systems Development Analyst',1);
insert into funcionarios values (263,'Snyder','dsnyder7a@digg.com','Masculino','Filmes','1/29/2005',109004,'Account Coordinator',5);
insert into funcionarios values (264,'Sanders','ksanders7b@pinterest.com','Masculino','Industrial','4/20/2014',102211,'Senior Cost Accountant',3);
insert into funcionarios values (265,'Fox','wfox7c@yelp.com','Masculino','Computadores','8/3/2000',75862,'Electrical Engineer',5);
insert into funcionarios values (266,'Burke','cburke7d@ameblo.jp','Masculino','Joalheria','3/5/2000',61446,'Environmental Specialist',2);
insert into funcionarios values (267,'Murphy','dmurphy7e@patch.com','Masculino','Lar','6/2/2011',146432,'VP Quality Control',2);
insert into funcionarios values (268,'Bowman','hbowman7f@reddit.com','Feminino','Alimentícios','2/18/2002',50623,'Biostatistician III',7);
insert into funcionarios values (269,'Cunningham','kcunningham7g@squidoo.com','Masculino','Outdoors','12/11/2014',108248,'Safety Technician I',3);
insert into funcionarios values (270,'Torres','ttorres7h@telegraph.co.uk','Feminino','Automotivo','8/6/2005',120875,'Software Consultant',1);
insert into funcionarios values (271,'Jordan','pjordan7i@squidoo.com','Feminino','Esporte','8/7/2001',123843,'Senior Sales Associate',7);
insert into funcionarios values (272,'Banks','jbanks7j@dion.ne.jp','Masculino','Música','5/16/2014',43940,'Saúde Coach I',2);
insert into funcionarios values (273,'Gordon','egordon7k@yellowbook.com','Feminino','Filmes','1/6/2013',142840,'Account Coordinator',1);
insert into funcionarios values (274,'Bennett','abennett7l@guardian.co.uk','Masculino','Jardim','8/1/2006',125713,'Account Representative III',3);
insert into funcionarios values (275,'Rivera','arivera7m@comcast.net','Feminino','Books','4/26/2010',122219,'Engineer I',6);
insert into funcionarios values (276,'Ellis','dellis7n@seesaa.net','Feminino','Eletronicos','5/21/2000',46259,'Help Desk Technician',6);
insert into funcionarios values (277,'Richardson','lrichardson7o@fc2.com','Feminino','Roupas','7/14/2003',142403,'Engineer III',3);
insert into funcionarios values (278,'Ortiz','wortiz7p@reddit.com','Masculino','Jardim','1/26/2000',88165,'Librarian',4);
insert into funcionarios values (279,'Clark','mclark7q@privacy.gov.au','Masculino','Jardim','6/26/2007',86291,'Dental Hygienist',7);
insert into funcionarios values (280,'Chavez','rchavez7r@youtu.be','Masculino','Crianças','6/4/2008',139163,'Legal Assistant',5);
insert into funcionarios values (281,'Holmes','aholmes7s@last.fm','Masculino','Música','11/5/2006',48892,'Accounting Assistant I',1);
insert into funcionarios values (282,'Fowler','rfowler7t@ameblo.jp','Feminino','Outdoors','12/24/2014',120540,'Junior Executive',6);
insert into funcionarios values (283,'George','ageorge7u@1und1.de','Feminino','Saúde','3/13/2000',47450,'Automation Specialist I',1);
insert into funcionarios values (284,'Murray','kmurray7v@ca.gov','Feminino','Saúde','8/25/2008',142255,'Quality Engineer',4);
insert into funcionarios values (285,'Hunter','rhunter7w@buzzfeed.com','Masculino','Jardim','8/16/2000',62441,'Environmental Specialist',3);
insert into funcionarios values (286,'Long','elong7x@nymag.com','Feminino','Games','3/11/2007',142529,'Librarian',2);
insert into funcionarios values (287,'Andrews','tandrews7y@ycombinator.com','Feminino','Beleza','3/19/2010',142103,'Associate Professor',4);
insert into funcionarios values (288,'Moore','bmoore7z@twitpic.com','Masculino','Eletronicos','8/11/2002',102395,'Account Coordinator',6);
insert into funcionarios values (289,'Sanders','csanders80@blog.com','Masculino','Lar','10/9/2009',44593,'Engineer III',2);
insert into funcionarios values (290,'Carter','scarter81@cargocollective.com','Masculino','Alimentícios','2/9/2007',120800,'Accountant III',5);
insert into funcionarios values (291,'Moreno','rmoreno82@alibaba.com','Feminino','Books','11/26/2003',121238,'Senior Developer',4);
insert into funcionarios values (292,'Ortiz','dortiz83@themeforest.net','Feminino','Automotivo','12/8/2011',91296,'Environmental Tech',6);
insert into funcionarios values (293,'Castillo','pcastillo84@1688.com','Feminino','Saúde','8/24/2011',86070,'Clinical Specialist',3);
insert into funcionarios values (294,'Cooper','icooper85@w3.org','Feminino','Filmes','1/31/2009',61519,'Human Resources Assistant III',7);
insert into funcionarios values (295,'Harris','lharris86@ibm.com','Feminino','Books','9/20/2005',47131,'Developer IV',6);
insert into funcionarios values (296,'Edwards','aedwards87@webeden.co.uk','Masculino','Crianças','4/7/2008',93962,'funcionarios Scientist',3);
insert into funcionarios values (297,'Harrison','nharrison88@imageshack.us','Masculino','Calçados','11/12/2014',133845,'Executive Secretary',4);
insert into funcionarios values (298,'Berry','lberry89@gov.uk','Masculino','Roupas','6/17/2010',43067,'Research Assistant I',7);
insert into funcionarios values (299,'Stephens','cstephens8a@imdb.com','Feminino','Beleza','9/1/2001',88972,'Paralegal',7);
insert into funcionarios values (300,'Arnold','barnold8b@thetimes.co.uk','Masculino','Roupas','11/15/2005',77635,'VP Product Management',3);
insert into funcionarios values (301,'Myers','amyers8c@ibm.com','Masculino','Alimentícios','5/16/2011',148993,'Speech Pathologist',1);
insert into funcionarios values (302,'Jenkins','rjenkins8d@wufoo.com','Feminino','Ferramentas','8/15/2002',113599,'Geological Engineer',2);
insert into funcionarios values (303,'West','jwest8e@berkeley.edu','Masculino','Eletronicos','3/15/2012',76943,'General Manager',7);
insert into funcionarios values (304,'Mccoy','mmccoy8f@wisc.edu','Feminino','Books','5/26/2007',77486,'Community Outreach Specialist',4);
insert into funcionarios values (305,'Johnson','fjohnson8g@wikipedia.org','Masculino','Eletronicos','11/20/2013',135001,'Recruiting Manager',4);
insert into funcionarios values (306,'Sanders','ssanders8h@mtv.com','Masculino','Bebês','11/10/2008',52171,'Data Coordiator',2);
insert into funcionarios values (307,'Cunningham','acunningham8i@wikimedia.org','Feminino','Jardim','6/22/2006',139302,'Engineer IV',5);
insert into funcionarios values (308,'Lynch','slynch8j@123-reg.co.uk','Feminino','Saúde','8/9/2000',126683,'Librarian',4);
insert into funcionarios values (309,'Riley','driley8k@dell.com','Masculino','Esporte','7/4/2006',143781,'Product Engineer',4);
insert into funcionarios values (310,'Ray','aray8l@cbc.ca','Masculino','Books','3/5/2008',51761,'Cost Accountant',5);
insert into funcionarios values (311,'Lane','plane8m@pbs.org','Masculino','Calçados','5/26/2011',45463,'Marketing Manager',5);
insert into funcionarios values (312,'Jordan','pjordan8n@adobe.com','Feminino','Roupas','11/15/2003',133498,'Nuclear Power Engineer',7);
insert into funcionarios values (313,'Gibson','bgibson8o@pen.io','Feminino','Lar','3/21/2011',81273,'Saúde Coach II',4);
insert into funcionarios values (314,'Elliott','telliott8p@mozilla.org','Masculino','Computadores','2/27/2008',77921,'Environmental Specialist',7);
insert into funcionarios values (315,'Smith','bsmith8q@mysql.com','Masculino','Games','7/25/2012',59580,'General Manager',2);
insert into funcionarios values (316,'Peters','cpeters8r@epa.gov','Masculino','Esporte','9/16/2010',40418,'VP Marketing',2);
insert into funcionarios values (317,'Tucker','htucker8s@photobucket.com','Masculino','Alimentícios','8/5/2004',104844,'Structural Analysis Engineer',3);
insert into funcionarios values (318,'Moore','jmoore8t@umich.edu','Masculino','Computadores','4/27/2003',139304,'Help Desk Technician',3);
insert into funcionarios values (319,'Crawford','mcrawford8u@parallels.com','Feminino','Lar','12/20/2011',140996,'Software Engineer IV',3);
insert into funcionarios values (320,'Gilbert','egilbert8v@nydailynews.com','Masculino','Jardim','4/12/2010',52430,'Assistant Media Planner',5);
insert into funcionarios values (321,'Wheeler','jwheeler8w@whitehouse.gov','Feminino','Books','8/24/2001',145284,'Information Systems Manager',7);
insert into funcionarios values (322,'Marshall','jmarshall8x@va.gov','Masculino','Computadores','11/7/2013',66063,'Web Designer III',2);
insert into funcionarios values (323,'Robinson','rrobinson8y@businessinsider.com','Masculino','Eletronicos','4/10/2008',134422,'Occupational Therapist',4);
insert into funcionarios values (324,'Stevens','astevens8z@si.edu','Feminino','Computadores','5/19/2012',106229,'Research Associate',4);
insert into funcionarios values (325,'Wright','kwright90@buzzfeed.com','Feminino','Roupas','5/13/2012',107727,'Computer Systems Analyst I',2);
insert into funcionarios values (326,'Castillo','bcastillo91@hc360.com','Feminino','Joalheria','12/12/2007',130188,'Social Worker',3);
insert into funcionarios values (327,'Edwards','medwards92@mail.ru','Masculino','Automotivo','10/4/2002',140194,'Programmer IV',5);
insert into funcionarios values (328,'Hanson','bhanson93@blinklist.com','Feminino','Computadores','1/6/2005',58719,'Media Manager I',4);
insert into funcionarios values (329,'Mccoy','hmccoy94@miitbeian.gov.cn','Feminino','Calçados','7/27/2004',86803,'Administrative Assistant III',4);
insert into funcionarios values (330,'Dunn','cdunn95@ft.com','Masculino','Industrial','6/23/2010',68334,'Administrative Officer',7);
insert into funcionarios values (331,'Hudson','jhudson96@thetimes.co.uk','Feminino','Esporte','12/23/2008',91906,'Food Chemist',4);
insert into funcionarios values (332,'Garza','lgarza97@bing.com','Feminino','Games','12/20/2006',48064,'Office Assistant II',5);
insert into funcionarios values (333,'Garza','pgarza98@go.com','Masculino','Industrial','6/30/2004',75281,'Data Coordiator',7);
insert into funcionarios values (334,'Mills','fmills99@ameblo.jp','Masculino','Industrial','3/24/2009',91659,'VP Accounting',4);
insert into funcionarios values (335,'Gilbert','pgilbert9a@wiley.com','Feminino','Esporte','10/3/2001',52792,'Pharmacist',2);
insert into funcionarios values (336,'Campbell','pcampbell9b@istockphoto.com','Feminino','Lar','8/30/2001',40415,'Food Chemist',4);
insert into funcionarios values (337,'Spencer','dspencer9c@ed.gov','Masculino','Filmes','6/16/2008',83256,'Senior Editor',5);
insert into funcionarios values (338,'Garrett','kgarrett9d@wordpress.com','Feminino','Eletronicos','12/30/2012',145181,'Programmer Analyst III',1);
insert into funcionarios values (339,'Hudson','rhudson9e@geocities.com','Feminino','Joalheria','7/23/2004',78294,'Software Consultant',4);
insert into funcionarios values (340,'Williams','jwilliams9f@canalblog.com','Masculino','Eletronicos','7/3/2007',90120,'Biostatistician I',2);
insert into funcionarios values (341,'Ellis','cellis9g@ibm.com','Masculino','Lar','9/24/2008',80284,'VP Accounting',3);
insert into funcionarios values (342,'Carroll','scarroll9h@yellowbook.com','Feminino','Calçados','7/26/2009',85511,'Business Systems Development Analyst',5);
insert into funcionarios values (343,'Long','along9i@ocn.ne.jp','Feminino','Brinquedos','6/13/2008',40138,'Payment Adjustment Coordinator',6);
insert into funcionarios values (344,'Owens','eowens9j@skyrock.com','Masculino','Books','6/17/2010',42714,'Electrical Engineer',7);
insert into funcionarios values (345,'Perez','jperez9k@bloglines.com','Masculino','Música','6/21/2005',65767,'Programmer Analyst I',4);
insert into funcionarios values (346,'Freeman','lfreeman9l@cpanel.net','Feminino','Crianças','2/13/2013',149351,'Design Engineer',7);
insert into funcionarios values (347,'Frazier','dfrazier9m@amazon.co.uk','Feminino','Ferramentas','1/3/2012',88470,'Associate Professor',1);
insert into funcionarios values (348,'Thomas','athomas9n@answers.com','Feminino','Eletronicos','11/26/2009',90317,'Saúde Coach I',4);
insert into funcionarios values (349,'Crawford','acrawford9o@cpanel.net','Masculino','Jardim','10/10/2012',142149,'Compensation Analyst',2);
insert into funcionarios values (350,'Hawkins','ahawkins9p@hud.gov','Masculino','Eletronicos','5/21/2000',144073,'Programmer I',1);
insert into funcionarios values (351,'Fuller','jfuller9q@merriam-webster.com','Feminino','Books','8/17/2001',54410,'Programmer Analyst II',7);
insert into funcionarios values (352,'Moreno','smoreno9r@slate.com','Masculino','Lar','6/28/2000',107907,'Financial Advisor',5);
insert into funcionarios values (353,'Gonzales','jgonzales9s@sourceforge.net','Feminino','Lar','7/10/2010',91249,'Mechanical Systems Engineer',2);
insert into funcionarios values (354,'Hudson','shudson9t@shareasale.com','Masculino','Outdoors','12/20/2005',78478,'Compensation Analyst',5);
insert into funcionarios values (355,'Murray','cmurray9u@reverbnation.com','Masculino','Esporte','7/7/2005',48812,'Human Resources Assistant III',7);
insert into funcionarios values (356,'Stephens','estephens9v@bbc.co.uk','Feminino','Alimentícios','4/27/2000',147440,'Sales Associate',2);
insert into funcionarios values (357,'Reynolds','dreynolds9w@angelfire.com','Masculino','Outdoors','5/18/2003',87978,'Senior Financial Analyst',1);
insert into funcionarios values (358,'Gutierrez','jgutierrez9x@telegraph.co.uk','Masculino','Automotivo','6/17/2002',67800,'Desktop Support Technician',2);
insert into funcionarios values (359,'Tucker','gtucker9y@instagram.com','Masculino','Bebês','5/14/2010',42944,'Tax Accountant',3);
insert into funcionarios values (360,'Jenkins','jjenkins9z@w3.org','Feminino','Automotivo','7/18/2004',84356,'Marketing Assistant',2);
insert into funcionarios values (361,'Rice','dricea0@hubpages.com','Feminino','Jardim','12/6/2006',144724,'Senior Quality Engineer',7);
insert into funcionarios values (362,'Burke','jburkea1@mayoclinic.com','Masculino','Alimentícios','9/8/2003',147290,'Analyst Programmer',6);
insert into funcionarios values (363,'Hall','jhalla2@prweb.com','Masculino','Automotivo','12/28/2001',83177,'Community Outreach Specialist',3);
insert into funcionarios values (364,'Ryan','rryana3@twitter.com','Masculino','Saúde','5/31/2014',83252,'Civil Engineer',3);
insert into funcionarios values (365,'Gonzales','jgonzalesa4@cpanel.net','Masculino','Roupas','8/30/2000',127393,'Help Desk Technician',7);
insert into funcionarios values (366,'Jacobs','bjacobsa5@domainmarket.com','Masculino','Industrial','1/29/2006',67186,'Research Nurse',1);
insert into funcionarios values (367,'Ramos','jramosa6@cdbaby.com','Feminino','Beleza','3/5/2002',102361,'Computer Systems Analyst III',5);
insert into funcionarios values (368,'Rivera','driveraa7@typepad.com','Feminino','Crianças','8/15/2001',60688,'Paralegal',1);
insert into funcionarios values (369,'Lawrence','llawrencea8@mozilla.com','Feminino','Eletronicos','4/24/2013',44704,'Data Coordiator',2);
insert into funcionarios values (370,'Austin','eaustina9@answers.com','Masculino','Lar','1/9/2002',110627,'Teacher',7);
insert into funcionarios values (371,'Sims','bsimsaa@privacy.gov.au','Masculino','Esporte','6/4/2000',127223,'Operator',5);
insert into funcionarios values (372,'Harper','rharperab@china.com.cn','Feminino','Crianças','8/31/2001',96163,'Safety Technician IV',3);
insert into funcionarios values (373,'Sims','jsimsac@a8.net','Masculino','Joalheria','4/24/2012',86524,'Developer IV',5);
insert into funcionarios values (374,'Mcdonald','jmcdonaldad@sbwire.com','Feminino','Bebês','9/19/2005',141464,'Programmer IV',4);
insert into funcionarios values (375,'Hudson','mhudsonae@ihg.com','Feminino','Industrial','8/27/2014',88029,'Help Desk Operator',4);
insert into funcionarios values (376,'Harper','charperaf@google.pl','Masculino','Lar','3/21/2007',47281,'VP Quality Control',6);
insert into funcionarios values (377,'Alexander','valexanderag@amazon.co.uk','Feminino','Eletronicos','1/15/2002',93245,'funcionarios Scientist',1);
insert into funcionarios values (378,'Nichols','bnicholsah@networkadvertising.org','Masculino','Automotivo','7/30/2012',110589,'Cost Accountant',7);
insert into funcionarios values (379,'Hicks','ghicksai@weibo.com','Masculino','Joalheria','4/3/2003',63735,'VP Accounting',6);
insert into funcionarios values (380,'Turner','bturneraj@samsung.com','Feminino','Industrial','11/23/2013',91182,'Compensation Analyst',5);
insert into funcionarios values (381,'Welch','dwelchak@printfriendly.com','Masculino','Música','9/9/2012',133007,'Software Test Engineer I',7);
insert into funcionarios values (382,'Payne','jpayneal@comsenz.com','Feminino','Lar','8/10/2012',92879,'Nurse',2);
insert into funcionarios values (383,'Young','pyoungam@theguardian.com','Masculino','Roupas','12/10/2002',104079,'Systems Administrator IV',4);
insert into funcionarios values (384,'Butler','dbutleran@eventbrite.com','Feminino','Beleza','11/1/2005',63918,'Structural Engineer',4);
insert into funcionarios values (385,'Carroll','ecarrollao@newsvine.com','Feminino','Automotivo','5/2/2011',128885,'Office Assistant III',5);
insert into funcionarios values (386,'Griffin','tgriffinap@reddit.com','Masculino','Games','2/27/2011',140567,'Research Associate',2);
insert into funcionarios values (387,'Burke','mburkeaq@360.cn','Feminino','Jardim','8/9/2003',95726,'Registered Nurse',4);
insert into funcionarios values (388,'Kelley','akelleyar@list-manage.com','Feminino','Música','1/24/2008',84261,'Senior Editor',5);
insert into funcionarios values (389,'Ortiz','gortizas@w3.org','Masculino','Bebês','6/22/2013',42924,'Marketing Assistant',2);
insert into funcionarios values (390,'Olson','aolsonat@cpanel.net','Masculino','Computadores','9/14/2008',86670,'Web Designer II',2);
insert into funcionarios values (391,'White','cwhiteau@amazon.de','Feminino','Roupas','11/4/2003',147702,'VP Quality Control',4);
insert into funcionarios values (392,'Peters','apetersav@loc.gov','Feminino','Beleza','2/2/2013',132470,'Database Administrator II',6);
insert into funcionarios values (393,'Sullivan','ksullivanaw@slideshare.net','Feminino','Música','9/11/2000',63341,'Research Associate',7);
insert into funcionarios values (394,'Washington','rwashingtonax@gmpg.org','Feminino','Beleza','10/23/2002',91651,'funcionarios Accountant III',4);
insert into funcionarios values (395,'Ward','jwarday@quantcast.com','Masculino','Bebês','9/11/2013',48927,'Sales Representative',6);
insert into funcionarios values (396,'Kelly','bkellyaz@bandcamp.com','Feminino','Crianças','11/17/2013',143433,'Web Developer II',1);
insert into funcionarios values (397,'Martin','hmartinb0@homestead.com','Masculino','Brinquedos','10/2/2006',81998,'Product Engineer',5);
insert into funcionarios values (398,'Cooper','scooperb1@cmu.edu','Feminino','Lar','5/8/2001',68584,'Quality Engineer',2);
insert into funcionarios values (399,'Holmes','jholmesb2@uol.com.br','Feminino','Computadores','7/4/2009',88216,'Accountant III',3);
insert into funcionarios values (400,'Harrison','jharrisonb3@google.de','Masculino','Saúde','12/24/2011',86046,'Nuclear Power Engineer',5);
insert into funcionarios values (401,'Parker','jparkerb4@mit.edu','Feminino','Outdoors','3/5/2008',148906,'Project Manager',5);
insert into funcionarios values (402,'Marshall','emarshallb5@yahoo.co.jp','Feminino','Roupas','11/10/2007',93266,'Recruiter',7);
insert into funcionarios values (403,'Chapman','schapmanb6@nhs.uk','Feminino','Lar','3/9/2002',69702,'Food Chemist',1);
insert into funcionarios values (404,'Harvey','aharveyb7@who.int','Feminino','Outdoors','12/28/2010',43366,'Administrative Assistant IV',4);
insert into funcionarios values (405,'Morgan','dmorganb8@moonfruit.com','Masculino','Industrial','5/19/2005',101945,'Web Developer I',2);
insert into funcionarios values (406,'Foster','pfosterb9@intel.com','Masculino','Brinquedos','2/1/2003',54007,'Geological Engineer',5);
insert into funcionarios values (407,'Vasquez','jvasquezba@dion.ne.jp','Masculino','Bebês','4/9/2013',54704,'Analog Circuit Design manager',3);
insert into funcionarios values (408,'Moore','jmoorebb@liveinternet.ru','Feminino','Computadores','11/13/2007',93954,'Project Manager',5);
insert into funcionarios values (409,'Williams','swilliamsbc@bing.com','Feminino','Lar','4/22/2007',58235,'Analog Circuit Design manager',6);
insert into funcionarios values (410,'Harris','lharrisbd@ow.ly','Feminino','Ferramentas','1/7/2012',148940,'Senior Financial Analyst',6);
insert into funcionarios values (411,'Hayes','chayesbe@usnews.com','Masculino','Crianças','4/9/2003',110615,'Paralegal',6);
insert into funcionarios values (412,'Vasquez','jvasquezbf@dailymail.co.uk','Masculino','Joalheria','1/14/2012',94596,'Web Developer I',1);
insert into funcionarios values (413,'Brooks','lbrooksbg@storify.com','Feminino','Saúde','9/19/2008',94502,'Executive Secretary',1);
insert into funcionarios values (414,'Peterson','epetersonbh@reverbnation.com','Masculino','Games','8/10/2011',72505,'Registered Nurse',3);
insert into funcionarios values (415,'Holmes','dholmesbi@jugem.jp','Masculino','Brinquedos','6/18/2001',147150,'Analog Circuit Design manager',6);
insert into funcionarios values (416,'Butler','dbutlerbj@wix.com','Feminino','Beleza','2/9/2002',66313,'Food Chemist',5);
insert into funcionarios values (417,'Hanson','shansonbk@ted.com','Masculino','Eletronicos','11/4/2002',97372,'Systems Administrator I',6);
insert into funcionarios values (418,'Morales','dmoralesbl@mit.edu','Feminino','Lar','10/2/2013',149598,'VP Product Management',3);
insert into funcionarios values (419,'Dixon','jdixonbm@indiatimes.com','Masculino','Saúde','2/22/2008',104224,'Clinical Specialist',5);
insert into funcionarios values (420,'Henry','hhenrybn@privacy.gov.au','Feminino','Ferramentas','9/24/2007',95583,'Civil Engineer',2);
insert into funcionarios values (421,'Harper','rharperbo@webeden.co.uk','Feminino','Música','1/5/2001',92043,'Assistant Manager',3);
insert into funcionarios values (422,'Torres','ctorresbp@yahoo.com','Feminino','Computadores','9/17/2009',118307,'funcionarios Accountant II',1);
insert into funcionarios values (423,'Walker','awalkerbq@wsj.com','Feminino','Joalheria','5/11/2011',145281,'VP Accounting',4);
insert into funcionarios values (424,'Berry','jberrybr@discuz.net','Feminino','Lar','8/20/2013',148640,'Internal Auditor',4);
insert into funcionarios values (425,'Carpenter','lcarpenterbs@xrea.com','Feminino','Computadores','9/7/2000',125523,'Financial Advisor',7);
insert into funcionarios values (426,'Graham','tgrahambt@mediafire.com','Masculino','Crianças','1/12/2009',49503,'Occupational Therapist',5);
insert into funcionarios values (427,'Clark','aclarkbu@npr.org','Feminino','Esporte','9/10/2000',146611,'Systems Administrator III',7);
insert into funcionarios values (428,'Schmidt','rschmidtbv@tumblr.com','Feminino','Esporte','2/8/2012',125465,'Teacher',1);
insert into funcionarios values (429,'Ortiz','jortizbw@t.co','Feminino','Roupas','1/23/2003',75024,'Structural Analysis Engineer',6);
insert into funcionarios values (430,'Hall','ehallbx@google.com.br','Masculino','Esporte','10/25/2011',60793,'Registered Nurse',7);
insert into funcionarios values (431,'Bishop','kbishopby@loc.gov','Feminino','Ferramentas','6/6/2010',110744,'Accountant I',2);
insert into funcionarios values (432,'Murphy','nmurphybz@jiathis.com','Feminino','Joalheria','8/21/2006',46653,'Registered Nurse',4);
insert into funcionarios values (433,'Parker','dparkerc0@webeden.co.uk','Masculino','Games','5/4/2014',114919,'Database Administrator III',7);
insert into funcionarios values (434,'Lee','rleec1@ibm.com','Feminino','Computadores','7/24/2000',98733,'Payment Adjustment Coordinator',4);
insert into funcionarios values (435,'Ellis','kellisc2@cafepress.com','Feminino','Saúde','8/23/2008',139775,'Chemical Engineer',1);
insert into funcionarios values (436,'Bishop','abishopc3@e-recht24.de','Feminino','Joalheria','5/10/2005',69559,'Programmer Analyst III',3);
insert into funcionarios values (437,'Roberts','arobertsc4@businessweek.com','Masculino','Filmes','7/10/2007',48934,'Electrical Engineer',6);
insert into funcionarios values (438,'Moreno','bmorenoc5@addtoany.com','Masculino','Alimentícios','4/25/2014',79980,'Recruiter',5);
insert into funcionarios values (439,'Boyd','eboydc6@unc.edu','Masculino','Roupas','4/1/2002',108854,'Senior Editor',4);
insert into funcionarios values (440,'Murphy','amurphyc7@wikia.com','Masculino','Books','1/23/2007',128105,'Help Desk Technician',7);
insert into funcionarios values (441,'Bailey','jbaileyc8@newsvine.com','Masculino','Books','6/10/2008',71676,'GIS Technical Architect',4);
insert into funcionarios values (442,'Bryant','jbryantc9@zdnet.com','Feminino','Música','9/11/2007',139347,'Data Coordiator',1);
insert into funcionarios values (443,'Powell','cpowellca@samsung.com','Feminino','Industrial','2/28/2002',80491,'GIS Technical Architect',7);
insert into funcionarios values (444,'Ferguson','jfergusoncb@sphinn.com','Feminino','Ferramentas','12/30/2010',119385,'Assistant Media Planner',4);
insert into funcionarios values (445,'Greene','dgreenecc@reuters.com','Masculino','Brinquedos','3/23/2002',149835,'Geologist III',1);
insert into funcionarios values (446,'Kennedy','pkennedycd@google.cn','Feminino','Saúde','12/2/2008',80137,'Business Systems Development Analyst',2);
insert into funcionarios values (447,'Brooks','cbrooksce@washingtonpost.com','Masculino','Lar','8/25/2000',79724,'Developer IV',7);
insert into funcionarios values (448,'Brooks','jbrookscf@ucla.edu','Masculino','Books','6/25/2009',102458,'Occupational Therapist',1);
insert into funcionarios values (449,'Gray','tgraycg@fotki.com','Feminino','Roupas','4/20/2014',134205,'Biostatistician I',4);
insert into funcionarios values (450,'Morgan','kmorganch@reddit.com','Feminino','Beleza','5/21/2004',76052,'Technical Writer',5);
insert into funcionarios values (451,'Robinson','arobinsonci@mapy.cz','Feminino','Música','11/17/2004',144608,'Research Associate',4);
insert into funcionarios values (452,'Kennedy','ckennedycj@boston.com','Feminino','Brinquedos','5/10/2000',111072,'Senior Quality Engineer',4);
insert into funcionarios values (453,'Anderson','aandersonck@whitehouse.gov','Masculino','Automotivo','1/24/2010',126485,'Computer Systems Analyst I',6);
insert into funcionarios values (454,'Price','jpricecl@liveinternet.ru','Feminino','Bebês','9/22/2006',96388,'Graphic Designer',6);
insert into funcionarios values (455,'Hawkins','jhawkinscm@furl.net','Feminino','Automotivo','6/13/2002',115506,'Product Engineer',2);
insert into funcionarios values (456,'Watson','swatsoncn@wufoo.com','Feminino','Industrial','3/10/2012',115679,'Editor',2);
insert into funcionarios values (457,'Cole','bcoleco@parallels.com','Feminino','Joalheria','12/11/2001',133040,'Research Associate',6);
insert into funcionarios values (458,'Little','dlittlecp@usatoday.com','Feminino','Filmes','5/14/2000',91660,'Research Assistant I',5);
insert into funcionarios values (459,'Robertson','erobertsoncq@prweb.com','Feminino','Computadores','9/20/2009',136406,'Chemical Engineer',7);
insert into funcionarios values (460,'Sanchez','lsanchezcr@rediff.com','Masculino','Automotivo','4/28/2005',146167,'Assistant Professor',5);
insert into funcionarios values (461,'Lane','llanecs@free.fr','Feminino','Books','4/4/2003',94299,'Media Manager III',4);
insert into funcionarios values (462,'Perry','rperryct@answers.com','Masculino','Industrial','7/31/2004',56382,'Executive Secretary',3);
insert into funcionarios values (463,'Mason','dmasoncu@about.com','Masculino','Ferramentas','12/21/2010',120160,'Database Administrator II',3);
insert into funcionarios values (464,'Brooks','dbrookscv@biblegateway.com','Feminino','Calçados','4/23/2008',77060,'Marketing Manager',3);
insert into funcionarios values (465,'White','dwhitecw@exblog.jp','Masculino','Computadores','10/17/2007',122540,'Administrative Officer',2);
insert into funcionarios values (466,'Carroll','fcarrollcx@ucoz.ru','Feminino','Games','5/29/2008',128562,'Senior Developer',7);
insert into funcionarios values (467,'Ford','efordcy@elpais.com','Feminino','Esporte','3/15/2002',60674,'Software Engineer I',3);
insert into funcionarios values (468,'Ross','grosscz@blogtalkradio.com','Masculino','Joalheria','4/16/2005',93609,'Environmental Specialist',6);
insert into funcionarios values (469,'Hicks','rhicksd0@histats.com','Feminino','Crianças','8/8/2010',97913,'Occupational Therapist',3);
insert into funcionarios values (470,'Rice','triced1@examiner.com','Feminino','Alimentícios','8/13/2005',108380,'Data Coordiator',5);
insert into funcionarios values (471,'Lewis','plewisd2@businessinsider.com','Feminino','Bebês','11/16/2007',50448,'Database Administrator III',4);
insert into funcionarios values (472,'Arnold','larnoldd3@webeden.co.uk','Feminino','Books','2/25/2012',133781,'Office Assistant I',4);
insert into funcionarios values (473,'Jordan','djordand4@trellian.com','Feminino','Books','11/14/2009',90409,'Research Assistant II',3);
insert into funcionarios values (474,'Reed','creedd5@bloglines.com','Masculino','Jardim','1/7/2004',144953,'Registered Nurse',7);
insert into funcionarios values (475,'Jenkins','sjenkinsd6@bloglovin.com','Masculino','Outdoors','12/22/2001',46072,'Nurse',2);
insert into funcionarios values (476,'Matthews','jmatthewsd7@economist.com','Masculino','Books','2/1/2012',119602,'Actuary',5);
insert into funcionarios values (477,'Gonzalez','lgonzalezd8@fastcompany.com','Masculino','Computadores','10/17/2010',122231,'Director of Sales',5);
insert into funcionarios values (478,'Mason','jmasond9@networkadvertising.org','Masculino','Esporte','4/16/2003',147166,'Systems Administrator I',6);
insert into funcionarios values (479,'Nelson','lnelsonda@example.com','Masculino','Alimentícios','9/8/2009',56465,'Programmer IV',6);
insert into funcionarios values (480,'Miller','amillerdb@reddit.com','Masculino','Eletronicos','2/7/2001',78158,'Programmer Analyst I',5);
insert into funcionarios values (481,'Moore','kmooredc@simplemachines.org','Masculino','Joalheria','6/5/2013',62815,'Compensation Analyst',4);
insert into funcionarios values (482,'Harris','rharrisdd@paypal.com','Masculino','Brinquedos','6/10/2007',126468,'Budget/Accounting Analyst III',4);
insert into funcionarios values (483,'Brown','mbrownde@bizjournals.com','Feminino','Beleza','5/10/2012',79419,'Senior Developer',3);
insert into funcionarios values (484,'Little','glittledf@xrea.com','Masculino','Computadores','3/23/2009',83093,'Registered Nurse',1);
insert into funcionarios values (485,'Austin','caustindg@pen.io','Feminino','Crianças','11/3/2014',90797,'Help Desk Operator',1);
insert into funcionarios values (486,'Young','fyoungdh@npr.org','Feminino','Crianças','7/6/2008',78755,'Desktop Support Technician',5);
insert into funcionarios values (487,'Fox','hfoxdi@acquirethisname.com','Feminino','Crianças','4/18/2003',128726,'Business Systems Development Analyst',3);
insert into funcionarios values (488,'Brooks','ebrooksdj@berkeley.edu','Masculino','Música','12/15/2011',69026,'Nuclear Power Engineer',6);
insert into funcionarios values (489,'Parker','lparkerdk@salon.com','Feminino','Jardim','1/16/2014',78109,'Research Nurse',5);
insert into funcionarios values (490,'Griffin','bgriffindl@pbs.org','Masculino','Filmes','4/8/2000',116480,'Nurse Practicioner',5);
insert into funcionarios values (491,'Stevens','bstevensdm@aol.com','Feminino','Brinquedos','6/13/2004',108444,'Environmental Tech',7);
insert into funcionarios values (492,'Evans','levansdn@house.gov','Masculino','Computadores','2/8/2010',106535,'funcionarios Scientist',1);
insert into funcionarios values (493,'Banks','bbanksdo@bravesites.com','Masculino','Computadores','6/24/2008',137025,'Research Nurse',5);
insert into funcionarios values (494,'Sullivan','ksullivandp@ucoz.com','Masculino','Industrial','3/3/2005',71663,'Analog Circuit Design manager',3);
insert into funcionarios values (495,'Black','eblackdq@ihg.com','Feminino','Books','10/8/2004',80073,'Senior Developer',3);
insert into funcionarios values (496,'Andrews','dandrewsdr@patch.com','Masculino','Beleza','3/14/2008',40254,'Quality Control Specialist',5);
insert into funcionarios values (497,'Jenkins','bjenkinsds@kickstarter.com','Feminino','Alimentícios','3/10/2011',80027,'VP Sales',3);
insert into funcionarios values (498,'Gutierrez','jgutierrezdt@woothemes.com','Feminino','Jardim','8/22/2001',106994,'Technical Writer',3);
insert into funcionarios values (499,'Hansen','jhansendu@timesonline.co.uk','Masculino','Brinquedos','4/29/2001',145559,'Office Assistant III',2);
insert into funcionarios values (500,'Rodriguez','drodriguezdv@histats.com','Masculino','Industrial','3/21/2001',91994,'Actuary',5);
insert into funcionarios values (501,'Bailey','hbaileydw@networksolutions.com','Masculino','Música','8/5/2001',138540,'Geologist IV',7);
insert into funcionarios values (502,'Banks','gbanksdx@berkeley.edu','Feminino','Computadores','10/17/2010',136034,'Product Engineer',4);
insert into funcionarios values (503,'Rose','jrosedy@squarespace.com','Feminino','Bebês','1/19/2004',127291,'Accounting Assistant III',7);
insert into funcionarios values (504,'Weaver','mweaverdz@ft.com','Masculino','Industrial','3/19/2000',131283,'funcionarios Scientist',4);
insert into funcionarios values (505,'Walker','jwalkere0@oakley.com','Masculino','Computadores','6/20/2005',122108,'Analog Circuit Design manager',7);
insert into funcionarios values (506,'Cox','ncoxe1@1und1.de','Feminino','Lar','1/1/2008',49048,'Sales Associate',1);
insert into funcionarios values (507,'Reed','preede2@who.int','Feminino','Bebês','11/1/2012',97427,'Occupational Therapist',6);
insert into funcionarios values (508,'Marshall','dmarshalle3@about.me','Masculino','Computadores','5/14/2007',90960,'Software Test Engineer II',7);
insert into funcionarios values (509,'Gonzalez','rgonzaleze4@furl.net','Masculino','Saúde','12/30/2011',43986,'Geologist IV',3);
insert into funcionarios values (510,'Lawrence','rlawrencee5@hhs.gov','Masculino','Outdoors','11/21/2014',108748,'Senior Editor',4);
insert into funcionarios values (511,'Medina','tmedinae6@g.co','Feminino','Industrial','12/3/2006',102149,'Sales Representative',5);
insert into funcionarios values (512,'Carpenter','rcarpentere7@blog.com','Masculino','Outdoors','6/13/2008',133360,'Research Nurse',7);
insert into funcionarios values (513,'Carter','mcartere8@twitpic.com','Feminino','Jardim','7/9/2004',70814,'Account Representative I',4);
insert into funcionarios values (514,'Peters','gpeterse9@people.com.cn','Masculino','Alimentícios','12/18/2010',132037,'Web Developer IV',6);
insert into funcionarios values (515,'Gomez','kgomezea@bloglovin.com','Masculino','Roupas','5/1/2002',55747,'Human Resources Assistant I',1);
insert into funcionarios values (516,'Stanley','rstanleyeb@alibaba.com','Feminino','Brinquedos','6/9/2006',89324,'Systems Administrator IV',3);
insert into funcionarios values (517,'Carpenter','lcarpenterec@technorati.com','Masculino','Computadores','2/8/2011',124418,'Chief Design Engineer',7);
insert into funcionarios values (518,'Peters','cpetersed@goo.ne.jp','Feminino','Alimentícios','12/25/2005',138093,'Human Resources Assistant I',3);
insert into funcionarios values (519,'Hamilton','chamiltonee@google.es','Masculino','Eletronicos','8/26/2003',141340,'Budget/Accounting Analyst III',4);
insert into funcionarios values (520,'Owens','sowensef@ted.com','Masculino','Industrial','6/2/2006',54672,'Structural Engineer',4);
insert into funcionarios values (521,'Williamson','dwilliamsoneg@creativecommons.org','Masculino','Roupas','10/6/2003',118602,'Director of Sales',5);
insert into funcionarios values (522,'Flores','lfloreseh@tinyurl.com','Masculino','Joalheria','2/4/2000',97745,'Electrical Engineer',7);
insert into funcionarios values (523,'Johnston','ajohnstonei@php.net','Feminino','Saúde','6/10/2012',143855,'Internal Auditor',5);
insert into funcionarios values (524,'Edwards','pedwardsej@businessinsider.com','Feminino','Saúde','6/15/2009',43431,'Physical Therapy Assistant',6);
insert into funcionarios values (525,'Payne','tpayneek@newyorker.com','Feminino','Ferramentas','3/1/2002',94016,'VP Quality Control',2);
insert into funcionarios values (526,'Allen','lallenel@nyu.edu','Feminino','Bebês','9/9/2011',66847,'Assistant Media Planner',2);
insert into funcionarios values (527,'Richards','jrichardsem@1688.com','Masculino','Roupas','4/20/2005',69705,'Senior Developer',3);
insert into funcionarios values (528,'Cole','fcoleen@msn.com','Masculino','Esporte','2/8/2012',96739,'Product Engineer',2);
insert into funcionarios values (529,'Meyer','lmeyereo@storify.com','Feminino','Jardim','9/1/2006',52956,'Senior Developer',3);
insert into funcionarios values (530,'Reyes','lreyesep@foxnews.com','Feminino','Computadores','12/14/2012',71559,'Librarian',1);
insert into funcionarios values (531,'Hudson','rhudsoneq@fotki.com','Masculino','Lar','11/17/2010',143226,'Food Chemist',7);
insert into funcionarios values (532,'Rice','rriceer@wired.com','Masculino','Books','2/14/2011',145747,'Financial Advisor',3);
insert into funcionarios values (533,'Castillo','dcastilloes@cocolog-nifty.com','Feminino','Industrial','10/15/2013',72001,'Automation Specialist IV',2);
insert into funcionarios values (534,'Harrison','jharrisonet@mapquest.com','Feminino','Música','9/20/2000',50308,'Compensation Analyst',6);
insert into funcionarios values (535,'Morris','rmorriseu@yahoo.com','Feminino','Lar','7/25/2007',131662,'Help Desk Operator',3);
insert into funcionarios values (536,'Castillo','acastilloev@cnet.com','Feminino','Crianças','5/19/2011',55730,'Speech Pathologist',7);
insert into funcionarios values (537,'Webb','rwebbew@twitter.com','Feminino','Games','2/12/2005',63836,'Occupational Therapist',1);
insert into funcionarios values (538,'Freeman','gfreemanex@nps.gov','Masculino','Calçados','10/24/2005',121296,'Civil Engineer',2);
insert into funcionarios values (539,'Kelley','rkelleyey@feedburner.com','Masculino','Filmes','3/20/2012',110660,'Senior Financial Analyst',4);
insert into funcionarios values (540,'Matthews','lmatthewsez@edublogs.org','Masculino','Games','12/19/2001',89114,'GIS Technical Architect',5);
insert into funcionarios values (541,'Mendoza','tmendozaf0@google.nl','Feminino','Música','8/28/2007',48769,'Nurse',5);
insert into funcionarios values (542,'Rice','ericef1@cpanel.net','Masculino','Música','2/1/2008',90069,'Assistant Professor',5);
insert into funcionarios values (543,'Walker','kwalkerf2@vinaora.com','Feminino','Lar','9/7/2013',120085,'Human Resources Assistant III',6);
insert into funcionarios values (544,'Moore','mmooref3@oakley.com','Feminino','Eletronicos','11/15/2007',41697,'Automation Specialist I',7);
insert into funcionarios values (545,'Lynch','jlynchf4@jimdo.com','Masculino','Crianças','5/4/2009',44093,'Saúde Coach IV',5);
insert into funcionarios values (546,'Fox','mfoxf5@jimdo.com','Feminino','Joalheria','11/1/2006',59294,'Senior Editor',6);
insert into funcionarios values (547,'Moreno','bmorenof6@vkontakte.ru','Masculino','Industrial','8/21/2013',140858,'Cost Accountant',7);
insert into funcionarios values (548,'Simpson','dsimpsonf7@engadget.com','Feminino','Brinquedos','1/10/2009',46444,'Desktop Support Technician',6);
insert into funcionarios values (549,'Reynolds','kreynoldsf8@vistaprint.com','Feminino','Books','9/26/2012',85855,'Financial Advisor',4);
insert into funcionarios values (550,'Watson','lwatsonf9@alexa.com','Masculino','Calçados','5/1/2000',72334,'Developer IV',3);
insert into funcionarios values (551,'Cruz','bcruzfa@nbcnews.com','Masculino','Música','10/4/2011',69246,'Web Developer III',6);
insert into funcionarios values (552,'Gomez','cgomezfb@reddit.com','Masculino','Beleza','3/18/2011',107389,'Community Outreach Specialist',2);
insert into funcionarios values (553,'George','rgeorgefc@youtube.com','Masculino','Automotivo','12/16/2009',141505,'Associate Professor',6);
insert into funcionarios values (554,'Frazier','mfrazierfd@tripod.com','Masculino','Brinquedos','1/6/2008',60318,'Engineer I',5);
insert into funcionarios values (555,'Bryant','cbryantfe@phpbb.com','Feminino','Outdoors','6/12/2014',148260,'Executive Secretary',7);
insert into funcionarios values (556,'Ferguson','mfergusonff@trellian.com','Feminino','Eletronicos','12/20/2006',73199,'Payment Adjustment Coordinator',2);
insert into funcionarios values (557,'Frazier','dfrazierfg@twitter.com','Masculino','Crianças','8/26/2002',111244,'Environmental Specialist',6);
insert into funcionarios values (558,'Hudson','jhudsonfh@soundcloud.com','Masculino','Bebês','3/21/2012',103845,'Nurse Practicioner',1);
insert into funcionarios values (559,'Murphy','jmurphyfi@naver.com','Feminino','Computadores','10/19/2008',88666,'Senior Editor',7);
insert into funcionarios values (560,'Kim','jkimfj@dropbox.com','Masculino','Roupas','1/22/2014',67845,'Administrative Officer',7);
insert into funcionarios values (561,'Rodriguez','jrodriguezfk@cafepress.com','Masculino','Esporte','4/8/2004',62527,'Recruiter',1);
insert into funcionarios values (562,'Perez','jperezfl@seesaa.net','Masculino','Ferramentas','5/17/2003',73412,'Librarian',5);
insert into funcionarios values (563,'Graham','bgrahamfm@usatoday.com','Masculino','Beleza','4/21/2011',123391,'Financial Advisor',7);
insert into funcionarios values (564,'Martinez','amartinezfn@people.com.cn','Feminino','Saúde','2/23/2005',99508,'VP Quality Control',5);
insert into funcionarios values (565,'Pierce','jpiercefo@cnet.com','Feminino','Joalheria','4/17/2014',55726,'Geologist III',7);
insert into funcionarios values (566,'Lynch','mlynchfp@reverbnation.com','Masculino','Eletronicos','12/10/2011',67140,'Systems Administrator III',3);
insert into funcionarios values (567,'Myers','dmyersfq@amazon.com','Feminino','Lar','5/27/2010',139060,'Assistant Professor',7);
insert into funcionarios values (568,'Day','kdayfr@wix.com','Masculino','Lar','7/20/2004',135993,'Geologist IV',4);
insert into funcionarios values (569,'Little','jlittlefs@bravesites.com','Feminino','Books','11/12/2010',80788,'Programmer I',4);
insert into funcionarios values (570,'James','rjamesft@jiathis.com','Feminino','Roupas','3/21/2001',136377,'Software Engineer I',7);
insert into funcionarios values (571,'Ortiz','eortizfu@java.com','Feminino','Eletronicos','6/19/2009',46247,'VP Accounting',3);
insert into funcionarios values (572,'Duncan','jduncanfv@etsy.com','Masculino','Automotivo','3/17/2014',45774,'Electrical Engineer',2);
insert into funcionarios values (573,'Kennedy','jkennedyfw@nasa.gov','Feminino','Esporte','4/23/2010',100741,'Senior Cost Accountant',1);
insert into funcionarios values (574,'Pierce','dpiercefx@marketwatch.com','Masculino','Alimentícios','9/20/2005',45534,'Senior Sales Associate',1);
insert into funcionarios values (575,'Bowman','abowmanfy@devhub.com','Masculino','Games','4/26/2002',75399,'VP Quality Control',7);
insert into funcionarios values (576,'Taylor','staylorfz@issuu.com','Masculino','Roupas','7/13/2006',50235,'Assistant Media Planner',1);
insert into funcionarios values (577,'Jones','jjonesg0@g.co','Masculino','Bebês','1/27/2011',128048,'Programmer III',5);
insert into funcionarios values (578,'Lynch','hlynchg1@washingtonpost.com','Masculino','Roupas','5/2/2006',111318,'Technical Writer',3);
insert into funcionarios values (579,'Barnes','jbarnesg2@hubpages.com','Feminino','Jardim','12/23/2000',100763,'Database Administrator I',7);
insert into funcionarios values (580,'Weaver','kweaverg3@wikia.com','Masculino','Computadores','5/23/2012',54231,'Accounting Assistant II',3);
insert into funcionarios values (581,'Cunningham','pcunninghamg4@example.com','Feminino','Esporte','3/25/2010',92334,'GIS Technical Architect',3);
insert into funcionarios values (582,'Ramirez','hramirezg5@merriam-webster.com','Masculino','Joalheria','3/16/2005',58111,'Research Associate',5);
insert into funcionarios values (583,'Hunter','ehunterg6@ucsd.edu','Feminino','Calçados','12/12/2000',112048,'Software Engineer II',5);
insert into funcionarios values (584,'Cook','ccookg7@blog.com','Feminino','Música','5/13/2008',109404,'Chief Design Engineer',6);
insert into funcionarios values (585,'Lopez','nlopezg8@fema.gov','Masculino','Jardim','7/19/2007',138776,'Senior Editor',2);
insert into funcionarios values (586,'Olson','folsong9@acquirethisname.com','Feminino','Lar','7/1/2003',110411,'Compensation Analyst',3);
insert into funcionarios values (587,'Martin','pmartinga@webnode.com','Feminino','Brinquedos','9/7/2002',74973,'General Manager',7);
insert into funcionarios values (588,'Day','edaygb@google.nl','Feminino','Ferramentas','10/15/2002',129890,'Software Consultant',4);
insert into funcionarios values (589,'Arnold','sarnoldgc@parallels.com','Masculino','Filmes','1/27/2005',135786,'Account Representative I',7);
insert into funcionarios values (590,'Allen','rallengd@cnet.com','Feminino','Alimentícios','6/15/2007',132998,'Business Systems Development Analyst',3);
insert into funcionarios values (591,'Sims','wsimsge@vinaora.com','Feminino','Bebês','2/28/2014',84318,'Software Test Engineer I',2);
insert into funcionarios values (592,'Duncan','aduncangf@behance.net','Masculino','Calçados','4/11/2004',110407,'Sales Associate',5);
insert into funcionarios values (593,'Evans','aevansgg@wordpress.org','Feminino','Lar','6/15/2000',94980,'Financial Advisor',4);
insert into funcionarios values (594,'Chapman','schapmangh@arstechnica.com','Feminino','Industrial','3/7/2004',125843,'Web Designer II',4);
insert into funcionarios values (595,'Price','rpricegi@flavors.me','Feminino','Alimentícios','1/27/2000',66180,'funcionarios Scientist',5);
insert into funcionarios values (596,'Ford','jfordgj@nyu.edu','Feminino','Joalheria','11/27/2014',88854,'Account Representative I',4);
insert into funcionarios values (597,'Lynch','alynchgk@tumblr.com','Feminino','Beleza','2/10/2004',71448,'Electrical Engineer',1);
insert into funcionarios values (598,'Diaz','jdiazgl@hhs.gov','Feminino','Esporte','11/2/2002',60547,'Community Outreach Specialist',2);
insert into funcionarios values (599,'Watkins','rwatkinsgm@independent.co.uk','Feminino','Outdoors','11/21/2010',128805,'Occupational Therapist',5);
insert into funcionarios values (600,'Ruiz','sruizgn@reddit.com','Feminino','Outdoors','5/11/2006',96782,'Database Administrator II',5);
insert into funcionarios values (601,'Lopez','blopezgo@sourceforge.net','Masculino','Saúde','3/12/2001',125944,'Office Assistant II',2);
insert into funcionarios values (602,'Henderson','chendersongp@sina.com.cn','Masculino','Ferramentas','9/17/2011',101937,'Teacher',7);
insert into funcionarios values (603,'Webb','lwebbgq@last.fm','Masculino','Joalheria','12/6/2000',127569,'Analyst Programmer',7);
insert into funcionarios values (604,'Greene','agreenegr@cmu.edu','Masculino','Roupas','6/30/2004',104517,'Research Assistant III',2);
insert into funcionarios values (605,'Stephens','estephensgs@phoca.cz','Feminino','Alimentícios','12/11/2010',110366,'Research Nurse',6);
insert into funcionarios values (606,'Parker','rparkergt@1688.com','Feminino','Industrial','2/8/2003',136917,'Assistant Professor',4);
insert into funcionarios values (607,'Reyes','hreyesgu@gnu.org','Masculino','Esporte','7/21/2007',130563,'Nuclear Power Engineer',7);
insert into funcionarios values (608,'Garza','hgarzagv@webmd.com','Masculino','Saúde','11/13/2004',73553,'Accountant IV',6);
insert into funcionarios values (609,'Fisher','dfishergw@myspace.com','Masculino','Eletronicos','1/21/2007',93995,'Teacher',2);
insert into funcionarios values (610,'Hicks','hhicksgx@ifeng.com','Masculino','Saúde','8/23/2009',45270,'VP Marketing',7);
insert into funcionarios values (611,'Ford','jfordgy@earthlink.net','Feminino','Calçados','10/29/2009',147739,'Safety Technician I',5);
insert into funcionarios values (612,'Fowler','cfowlergz@joomla.org','Feminino','Saúde','9/10/2003',142211,'Software Test Engineer IV',4);
insert into funcionarios values (613,'Coleman','hcolemanh0@feedburner.com','Feminino','Beleza','9/26/2006',48791,'Teacher',1);
insert into funcionarios values (614,'Ramirez','jramirezh1@php.net','Feminino','Eletronicos','11/2/2008',112929,'Account Coordinator',5);
insert into funcionarios values (615,'Alexander','falexanderh2@irs.gov','Feminino','Roupas','12/25/2009',72854,'Marketing Assistant',7);
insert into funcionarios values (616,'Marshall','hmarshallh3@com.com','Feminino','Automotivo','10/10/2006',47281,'VP Sales',6);
insert into funcionarios values (617,'Mills','hmillsh4@lulu.com','Feminino','Saúde','6/12/2013',49410,'Account Representative II',1);
insert into funcionarios values (618,'Phillips','wphillipsh5@economist.com','Masculino','Roupas','6/7/2001',128205,'Sales Representative',6);
insert into funcionarios values (619,'Cole','jcoleh6@php.net','Masculino','Ferramentas','6/2/2014',133190,'Research Nurse',7);
insert into funcionarios values (620,'Olson','aolsonh7@psu.edu','Feminino','Books','8/14/2009',59644,'Systems Administrator III',1);
insert into funcionarios values (621,'Reynolds','nreynoldsh8@redcross.org','Masculino','Crianças','10/31/2004',111427,'Programmer I',4);
insert into funcionarios values (622,'Wright','rwrighth9@jimdo.com','Masculino','Eletronicos','3/15/2002',98339,'Assistant Manager',3);
insert into funcionarios values (623,'Ford','mfordha@youku.com','Masculino','Beleza','2/27/2006',72948,'Teacher',6);
insert into funcionarios values (624,'Garza','mgarzahb@elegantthemes.com','Masculino','Books','11/26/2008',60203,'Product Engineer',2);
insert into funcionarios values (625,'Andrews','handrewshc@salon.com','Feminino','Outdoors','12/2/2007',147003,'Chemical Engineer',1);
insert into funcionarios values (626,'Ruiz','sruizhd@slashdot.org','Feminino','Jardim','1/12/2009',83706,'Assistant Media Planner',2);
insert into funcionarios values (627,'Watkins','swatkinshe@wunderground.com','Feminino','Alimentícios','1/21/2000',80245,'VP Product Management',6);
insert into funcionarios values (628,'Diaz','rdiazhf@nih.gov','Masculino','Joalheria','8/11/2008',65110,'Compensation Analyst',5);
insert into funcionarios values (629,'Watkins','mwatkinshg@bbb.org','Masculino','Joalheria','7/29/2011',128617,'Senior Editor',4);
insert into funcionarios values (630,'Pierce','spiercehh@google.nl','Masculino','Outdoors','2/9/2002',96107,'Actuary',5);
insert into funcionarios values (631,'Perez','wperezhi@yahoo.co.jp','Feminino','Ferramentas','6/14/2014',44788,'Project Manager',2);
insert into funcionarios values (632,'Lopez','clopezhj@mediafire.com','Feminino','Jardim','1/1/2004',86207,'Accountant II',4);
insert into funcionarios values (633,'Freeman','mfreemanhk@walmart.com','Masculino','Calçados','10/25/2000',79845,'Teacher',1);
insert into funcionarios values (634,'Fowler','wfowlerhl@people.com.cn','Feminino','Outdoors','4/6/2011',104264,'funcionarios Scientist',6);
insert into funcionarios values (635,'Rodriguez','mrodriguezhm@wiley.com','Feminino','Ferramentas','12/27/2010',77005,'Systems Administrator IV',1);
insert into funcionarios values (636,'Wheeler','lwheelerhn@skyrock.com','Feminino','Industrial','9/25/2011',69564,'Senior Editor',6);
insert into funcionarios values (637,'Knight','dknightho@buzzfeed.com','Feminino','Calçados','7/25/2007',84549,'Senior Cost Accountant',5);
insert into funcionarios values (638,'Walker','bwalkerhp@dropbox.com','Masculino','Games','6/9/2006',134488,'Software Consultant',1);
insert into funcionarios values (639,'Porter','eporterhq@amazon.com','Masculino','Calçados','2/13/2007',140243,'Financial Advisor',5);
insert into funcionarios values (640,'Washington','hwashingtonhr@bbc.co.uk','Masculino','Joalheria','2/22/2003',44096,'Geologist IV',4);
insert into funcionarios values (641,'Hayes','rhayeshs@loc.gov','Feminino','Saúde','4/7/2010',69454,'Web Designer II',1);
insert into funcionarios values (642,'Warren','awarrenht@addthis.com','Feminino','Filmes','5/15/2009',126201,'Electrical Engineer',2);
insert into funcionarios values (643,'Johnston','cjohnstonhu@psu.edu','Masculino','Joalheria','3/21/2014',123820,'Computer Systems Analyst IV',4);
insert into funcionarios values (644,'Carroll','jcarrollhv@over-blog.com','Masculino','Alimentícios','4/6/2002',52956,'Compensation Analyst',7);
insert into funcionarios values (645,'Webb','twebbhw@google.com.br','Masculino','Ferramentas','6/1/2007',143595,'Geological Engineer',6);
insert into funcionarios values (646,'Harvey','lharveyhx@plala.or.jp','Masculino','Beleza','8/14/2014',124707,'Registered Nurse',6);
insert into funcionarios values (647,'Washington','mwashingtonhy@icio.us','Masculino','Eletronicos','10/15/2009',57092,'Internal Auditor',2);
insert into funcionarios values (648,'Long','rlonghz@list-manage.com','Masculino','Beleza','2/12/2007',149099,'Executive Secretary',3);
insert into funcionarios values (649,'Russell','krusselli0@posterous.com','Masculino','Calçados','11/18/2007',99352,'Recruiting Manager',1);
insert into funcionarios values (650,'Frazier','rfrazieri1@github.com','Masculino','Alimentícios','1/22/2013',44919,'Quality Engineer',7);
insert into funcionarios values (651,'Freeman','tfreemani2@soundcloud.com','Feminino','Saúde','8/28/2006',55034,'Administrative Officer',4);
insert into funcionarios values (652,'Rivera','criverai3@github.io','Masculino','Joalheria','6/16/2006',60396,'Senior Quality Engineer',7);
insert into funcionarios values (653,'Ramirez','vramirezi4@yellowpages.com','Masculino','Brinquedos','7/6/2013',147862,'Chemical Engineer',5);
insert into funcionarios values (654,'Mcdonald','hmcdonaldi5@4shared.com','Masculino','Automotivo','11/3/2002',69594,'Recruiting Manager',3);
insert into funcionarios values (655,'Meyer','emeyeri6@friendfeed.com','Feminino','Esporte','6/8/2014',145363,'GIS Technical Architect',3);
insert into funcionarios values (656,'Campbell','kcampbelli7@prnewswire.com','Masculino','Books','4/3/2008',70804,'Quality Engineer',2);
insert into funcionarios values (657,'Reid','areidi8@wunderground.com','Feminino','Roupas','6/29/2013',65154,'Sales Representative',5);
insert into funcionarios values (658,'Gilbert','agilberti9@parallels.com','Masculino','Eletronicos','10/8/2013',61332,'Marketing Assistant',3);
insert into funcionarios values (659,'Ramos','kramosia@ed.gov','Feminino','Outdoors','9/7/2003',72319,'Quality Control Specialist',1);
insert into funcionarios values (660,'Nelson','mnelsonib@ibm.com','Masculino','Calçados','12/8/2001',139564,'Pharmacist',7);
insert into funcionarios values (661,'Foster','pfosteric@smugmug.com','Feminino','Automotivo','9/21/2004',63364,'Community Outreach Specialist',4);
insert into funcionarios values (662,'Scott','bscottid@mashable.com','Masculino','Bebês','1/18/2000',86497,'Administrative Officer',6);
insert into funcionarios values (663,'Lynch','tlynchie@bloglovin.com','Feminino','Outdoors','1/25/2003',117248,'funcionarios Accountant III',1);
insert into funcionarios values (664,'Watkins','ewatkinsif@ask.com','Feminino','Esporte','2/9/2013',133507,'Budget/Accounting Analyst II',1);
insert into funcionarios values (665,'Garcia','pgarciaig@macromedia.com','Feminino','Saúde','11/4/2008',135132,'Research Assistant III',7);
insert into funcionarios values (666,'Arnold','jarnoldih@tripod.com','Feminino','Calçados','4/22/2013',52041,'Database Administrator I',2);
insert into funcionarios values (667,'Willis','nwillisii@sohu.com','Feminino','Música','3/12/2012',73425,'Human Resources Manager',3);
insert into funcionarios values (668,'Burton','jburtonij@webmd.com','Feminino','Computadores','3/17/2001',46960,'Financial Advisor',4);
insert into funcionarios values (669,'Owens','sowensik@prlog.org','Masculino','Brinquedos','5/6/2001',104373,'Graphic Designer',6);
insert into funcionarios values (670,'Moreno','rmorenoil@gizmodo.com','Feminino','Calçados','9/17/2014',102493,'Senior Quality Engineer',5);
insert into funcionarios values (671,'Fuller','jfullerim@theguardian.com','Masculino','Calçados','12/11/2007',55568,'Senior Cost Accountant',7);
insert into funcionarios values (672,'Fowler','cfowlerin@yelp.com','Masculino','Esporte','5/5/2006',75159,'Biostatistician III',2);
insert into funcionarios values (673,'Thomas','lthomasio@pagesperso-orange.fr','Masculino','Saúde','10/27/2014',51782,'Operator',6);
insert into funcionarios values (674,'Adams','jadamsip@cisco.com','Masculino','Brinquedos','8/28/2009',41855,'Payment Adjustment Coordinator',7);
insert into funcionarios values (675,'Snyder','ssnyderiq@vkontakte.ru','Masculino','Games','6/22/2005',143846,'Web Developer III',3);
insert into funcionarios values (676,'Sullivan','rsullivanir@xinhuanet.com','Masculino','Música','9/29/2013',101756,'Programmer IV',5);
insert into funcionarios values (677,'Robertson','lrobertsonis@forbes.com','Masculino','Computadores','8/4/2014',136492,'Compensation Analyst',4);
insert into funcionarios values (678,'Mills','jmillsit@webs.com','Masculino','Música','4/17/2011',82979,'Senior Quality Engineer',6);
insert into funcionarios values (679,'Stone','pstoneiu@narod.ru','Masculino','Eletronicos','5/15/2014',40218,'Paralegal',2);
insert into funcionarios values (680,'Simmons','gsimmonsiv@cocolog-nifty.com','Feminino','Games','12/9/2001',60695,'Chemical Engineer',2);
insert into funcionarios values (681,'Butler','dbutleriw@discuz.net','Masculino','Lar','11/30/2008',47994,'Senior Quality Engineer',4);
insert into funcionarios values (682,'Scott','kscottix@ycombinator.com','Masculino','Jardim','9/3/2004',50057,'Account Executive',2);
insert into funcionarios values (683,'Torres','jtorresiy@4shared.com','Feminino','Games','3/11/2006',135886,'Assistant Media Planner',3);
insert into funcionarios values (684,'Hall','lhalliz@smh.com.au','Masculino','Joalheria','7/15/2009',77924,'Senior Sales Associate',7);
insert into funcionarios values (685,'White','jwhitej0@usnews.com','Feminino','Beleza','12/7/2008',136356,'Office Assistant IV',1);
insert into funcionarios values (686,'Watkins','mwatkinsj1@myspace.com','Masculino','Brinquedos','3/24/2004',104444,'Business Systems Development Analyst',2);
insert into funcionarios values (687,'Gardner','agardnerj2@blogs.com','Feminino','Computadores','12/3/2000',49693,'Chemical Engineer',2);
insert into funcionarios values (688,'Cruz','kcruzj3@shinystat.com','Masculino','Lar','6/29/2012',90829,'Recruiter',6);
insert into funcionarios values (689,'Austin','aaustinj4@walmart.com','Feminino','Eletronicos','10/31/2007',62293,'Administrative Officer',4);
insert into funcionarios values (690,'Perkins','rperkinsj5@ehow.com','Masculino','Música','5/9/2000',57988,'Web Developer I',4);
insert into funcionarios values (691,'Hansen','chansenj6@uiuc.edu','Feminino','Beleza','2/4/2010',113893,'Clinical Specialist',7);
insert into funcionarios values (692,'Owens','dowensj7@hibu.com','Masculino','Calçados','3/11/2013',58265,'Nurse Practicioner',3);
insert into funcionarios values (693,'Carr','hcarrj8@latimes.com','Masculino','Jardim','1/17/2005',143570,'Actuary',4);
insert into funcionarios values (694,'Chavez','rchavezj9@uiuc.edu','Feminino','Alimentícios','4/19/2007',116894,'Chief Design Engineer',6);
insert into funcionarios values (695,'Morales','rmoralesja@vinaora.com','Feminino','Automotivo','1/24/2006',82244,'Administrative Assistant III',2);
insert into funcionarios values (696,'Anderson','dandersonjb@linkedin.com','Masculino','Games','10/7/2012',92640,'Executive Secretary',7);
insert into funcionarios values (697,'Woods','twoodsjc@ucoz.ru','Masculino','Beleza','6/23/2000',123995,'Assistant Media Planner',5);
insert into funcionarios values (698,'Cook','tcookjd@blinklist.com','Masculino','Jardim','12/12/2005',97351,'Saúde Coach I',4);
insert into funcionarios values (699,'Price','bpriceje@icio.us','Feminino','Roupas','1/25/2003',133091,'VP Accounting',7);
insert into funcionarios values (700,'Stone','tstonejf@com.com','Masculino','Jardim','7/15/2004',100746,'VP Quality Control',6);
insert into funcionarios values (701,'Williams','jwilliamsjg@rediff.com','Masculino','Joalheria','10/13/2002',101599,'Developer II',7);
insert into funcionarios values (702,'Wells','dwellsjh@is.gd','Masculino','Esporte','6/2/2014',77293,'Structural Analysis Engineer',5);
insert into funcionarios values (703,'Hernandez','ahernandezji@ucoz.ru','Feminino','Games','3/4/2014',119787,'Speech Pathologist',1);
insert into funcionarios values (704,'Burke','eburkejj@godaddy.com','Masculino','Computadores','6/12/2013',114690,'funcionarios Scientist',2);
insert into funcionarios values (705,'Clark','pclarkjk@joomla.org','Masculino','Filmes','10/25/2009',97150,'VP Accounting',6);
insert into funcionarios values (706,'Mendoza','rmendozajl@g.co','Feminino','Lar','12/5/2011',91655,'Cost Accountant',5);
insert into funcionarios values (707,'Perry','jperryjm@Lar.pl','Masculino','Industrial','11/8/2006',124296,'Developer III',1);
insert into funcionarios values (708,'Rose','crosejn@cnbc.com','Feminino','Automotivo','12/24/2011',66063,'Software Test Engineer I',7);
insert into funcionarios values (709,'Payne','cpaynejo@tinyurl.com','Feminino','Books','1/12/2007',138137,'Developer IV',2);
insert into funcionarios values (710,'Mills','jmillsjp@yahoo.com','Feminino','Música','1/22/2005',49326,'Chemical Engineer',7);
insert into funcionarios values (711,'Roberts','jrobertsjq@ed.gov','Masculino','Roupas','8/21/2009',80743,'Geological Engineer',4);
insert into funcionarios values (712,'Torres','dtorresjr@state.tx.us','Masculino','Joalheria','12/23/2007',105686,'Senior Developer',6);
insert into funcionarios values (713,'Hicks','ahicksjs@arstechnica.com','Feminino','Esporte','12/23/2013',65650,'Project Manager',1);
insert into funcionarios values (714,'Cooper','kcooperjt@salon.com','Masculino','Games','9/26/2003',86446,'Statistician II',4);
insert into funcionarios values (715,'Henry','rhenryju@answers.com','Feminino','Games','6/26/2010',132421,'Human Resources Manager',1);
insert into funcionarios values (716,'Jacobs','bjacobsjv@thetimes.co.uk','Masculino','Eletronicos','6/18/2004',69855,'Payment Adjustment Coordinator',4);
insert into funcionarios values (717,'Greene','rgreenejw@so-net.ne.jp','Feminino','Outdoors','7/8/2007',80999,'funcionarios Accountant II',6);
insert into funcionarios values (718,'Armstrong','darmstrongjx@cafepress.com','Masculino','Saúde','1/3/2003',66447,'Account Coordinator',2);
insert into funcionarios values (719,'Wagner','ewagnerjy@jalbum.net','Masculino','Beleza','1/4/2013',135445,'Operator',2);
insert into funcionarios values (720,'Rice','hricejz@blinklist.com','Feminino','Joalheria','11/8/2010',57781,'Dental Hygienist',4);
insert into funcionarios values (721,'Smith','hsmithk0@4shared.com','Feminino','Saúde','9/21/2005',83802,'Research Assistant II',7);
insert into funcionarios values (722,'Hill','khillk1@about.me','Feminino','Roupas','8/31/2002',73262,'Information Systems Manager',5);
insert into funcionarios values (723,'Howard','rhowardk2@cnet.com','Feminino','Bebês','3/3/2002',89035,'Senior Editor',5);
insert into funcionarios values (724,'Elliott','delliottk3@who.int','Masculino','Industrial','5/20/2001',125115,'Senior Quality Engineer',3);
insert into funcionarios values (725,'Richards','krichardsk4@bloglines.com','Masculino','Bebês','10/2/2003',80939,'Analyst Programmer',1);
insert into funcionarios values (726,'Welch','dwelchk5@mapquest.com','Masculino','Lar','9/11/2008',49463,'Research Nurse',1);
insert into funcionarios values (727,'Johnson','mjohnsonk6@sciencedaily.com','Masculino','Filmes','5/21/2012',83165,'Account Representative I',5);
insert into funcionarios values (728,'Larson','slarsonk7@sakura.ne.jp','Feminino','Outdoors','4/21/2006',125574,'Research Associate',1);
insert into funcionarios values (729,'Banks','hbanksk8@nifty.com','Masculino','Joalheria','11/15/2013',119747,'Graphic Designer',5);
insert into funcionarios values (730,'Johnston','ejohnstonk9@liveinternet.ru','Feminino','Esporte','11/24/2008',57651,'Help Desk Operator',6);
insert into funcionarios values (731,'Ferguson','gfergusonka@geocities.jp','Feminino','Lar','6/28/2009',70524,'VP Accounting',2);
insert into funcionarios values (732,'Murray','amurraykb@blinklist.com','Masculino','Roupas','8/15/2004',50511,'Senior Cost Accountant',3);
insert into funcionarios values (733,'Diaz','jdiazkc@china.com.cn','Masculino','Lar','11/20/2000',58847,'Community Outreach Specialist',4);
insert into funcionarios values (734,'Simmons','tsimmonskd@chicagotribune.com','Feminino','Automotivo','2/20/2005',58555,'Biostatistician I',2);
insert into funcionarios values (735,'Richards','jrichardske@hatena.ne.jp','Masculino','Roupas','11/14/2014',116333,'Legal Assistant',5);
insert into funcionarios values (736,'Morgan','emorgankf@businessinsider.com','Masculino','Bebês','8/27/2009',80813,'Senior Quality Engineer',6);
insert into funcionarios values (737,'Price','bpricekg@xinhuanet.com','Masculino','Saúde','7/26/2004',142794,'Recruiting Manager',1);
insert into funcionarios values (738,'Hudson','chudsonkh@google.co.uk','Feminino','Computadores','1/4/2003',65083,'Marketing Assistant',6);
insert into funcionarios values (739,'Carroll','lcarrollki@example.com','Feminino','Bebês','3/13/2014',125398,'Assistant Professor',2);
insert into funcionarios values (740,'Long','jlongkj@dailymail.co.uk','Feminino','Crianças','1/13/2008',98502,'Structural Analysis Engineer',7);
insert into funcionarios values (741,'Parker','cparkerkk@foxnews.com','Feminino','Calçados','12/31/2002',90086,'Research Associate',4);
insert into funcionarios values (742,'Nguyen','lnguyenkl@goodreads.com','Masculino','Esporte','12/3/2007',77382,'Design Engineer',6);
insert into funcionarios values (743,'Garza','agarzakm@miitbeian.gov.cn','Feminino','Eletronicos','12/23/2014',113278,'Statistician IV',2);
insert into funcionarios values (744,'Gordon','pgordonkn@mac.com','Masculino','Automotivo','9/18/2001',129324,'Developer I',4);
insert into funcionarios values (745,'Reed','lreedko@wikipedia.org','Feminino','Outdoors','11/21/2005',108504,'Pharmacist',1);
insert into funcionarios values (746,'Baker','bbakerkp@list-manage.com','Masculino','Industrial','10/4/2001',145283,'Payment Adjustment Coordinator',1);
insert into funcionarios values (747,'Carroll','mcarrollkq@whitehouse.gov','Masculino','Crianças','7/30/2006',82674,'Junior Executive',4);
insert into funcionarios values (748,'Elliott','delliottkr@dot.gov','Masculino','Roupas','12/9/2009',119097,'Administrative Assistant I',2);
insert into funcionarios values (749,'Parker','aparkerks@godaddy.com','Feminino','Joalheria','9/5/2012',60498,'Accountant I',4);
insert into funcionarios values (750,'Ward','kwardkt@wikipedia.org','Masculino','Música','7/16/2014',108228,'VP Sales',3);
insert into funcionarios values (751,'Kelley','ckelleyku@gravatar.com','Masculino','Eletronicos','5/7/2005',106602,'Occupational Therapist',2);
insert into funcionarios values (752,'Gonzales','rgonzaleskv@meetup.com','Feminino','Lar','1/24/2011',95810,'Food Chemist',4);
insert into funcionarios values (753,'King','bkingkw@friendfeed.com','Feminino','Eletronicos','2/5/2005',149597,'Structural Analysis Engineer',1);
insert into funcionarios values (754,'Mendoza','smendozakx@java.com','Feminino','Eletronicos','3/17/2000',57331,'Occupational Therapist',3);
insert into funcionarios values (755,'Tucker','ctuckerky@1688.com','Masculino','Industrial','8/17/2011',49113,'Business Systems Development Analyst',7);
insert into funcionarios values (756,'Fox','dfoxkz@foxnews.com','Feminino','Alimentícios','7/17/2005',80417,'Assistant Media Planner',7);
insert into funcionarios values (757,'Evans','aevansl0@nba.com','Masculino','Games','4/5/2012',122595,'Automation Specialist I',6);
insert into funcionarios values (758,'Ray','nrayl1@mail.ru','Masculino','Brinquedos','10/23/2013',126661,'Systems Administrator I',2);
insert into funcionarios values (759,'Vasquez','jvasquezl2@edublogs.org','Masculino','Jardim','4/2/2000',127695,'Systems Administrator I',7);
insert into funcionarios values (760,'Bell','sbelll3@goo.gl','Masculino','Bebês','7/24/2008',66608,'General Manager',1);
insert into funcionarios values (761,'Burke','eburkel4@newsvine.com','Feminino','Lar','12/14/2014',106033,'Quality Control Specialist',1);
insert into funcionarios values (762,'Stanley','cstanleyl5@springer.com','Masculino','Eletronicos','8/9/2013',103237,'Account Executive',7);
insert into funcionarios values (763,'Bell','dbelll6@wisc.edu','Masculino','Computadores','4/22/2002',122843,'Accountant IV',2);
insert into funcionarios values (764,'Jacobs','mjacobsl7@ibm.com','Feminino','Música','7/6/2004',51771,'Accountant III',3);
insert into funcionarios values (765,'Williams','dwilliamsl8@google.com.br','Masculino','Ferramentas','11/7/2009',107709,'Nuclear Power Engineer',1);
insert into funcionarios values (766,'Elliott','kelliottl9@hhs.gov','Masculino','Books','12/18/2009',104149,'Food Chemist',2);
insert into funcionarios values (767,'Hall','jhallla@hao123.com','Masculino','Books','8/2/2004',91501,'Editor',7);
insert into funcionarios values (768,'Meyer','jmeyerlb@yandex.ru','Feminino','Automotivo','7/24/2014',42602,'Programmer IV',2);
insert into funcionarios values (769,'Kelly','jkellylc@linkedin.com','Feminino','Crianças','11/24/2013',132676,'Dental Hygienist',4);
insert into funcionarios values (770,'Burton','jburtonld@delicious.com','Feminino','Games','5/4/2006',140688,'Programmer Analyst III',3);
insert into funcionarios values (771,'Clark','rclarkle@ted.com','Feminino','Jardim','9/9/2014',51792,'Software Consultant',4);
insert into funcionarios values (772,'Elliott','delliottlf@fda.gov','Masculino','Filmes','10/13/2004',100570,'Senior Financial Analyst',5);
insert into funcionarios values (773,'Dixon','rdixonlg@parallels.com','Masculino','Ferramentas','7/2/2007',60383,'VP Product Management',1);
insert into funcionarios values (774,'Richards','vrichardslh@forbes.com','Masculino','Calçados','3/21/2006',68761,'Graphic Designer',1);
insert into funcionarios values (775,'Gonzalez','egonzalezli@naver.com','Feminino','Ferramentas','10/14/2009',131830,'GIS Technical Architect',2);
insert into funcionarios values (776,'Olson','kolsonlj@friendfeed.com','Feminino','Roupas','9/27/2013',107535,'Office Assistant III',7);
insert into funcionarios values (777,'Sims','jsimslk@angelfire.com','Masculino','Industrial','11/15/2001',95548,'Sales Associate',3);
insert into funcionarios values (778,'Thomas','ethomasll@aol.com','Masculino','Automotivo','5/16/2013',116487,'Graphic Designer',1);
insert into funcionarios values (779,'Gonzalez','mgonzalezlm@illinois.edu','Masculino','Alimentícios','2/3/2005',148106,'Sales Representative',2);
insert into funcionarios values (780,'Cox','dcoxln@studiopress.com','Masculino','Games','4/4/2007',135719,'Database Administrator I',5);
insert into funcionarios values (781,'Schmidt','rschmidtlo@harvard.edu','Feminino','Automotivo','4/4/2010',121300,'Human Resources Assistant II',5);
insert into funcionarios values (782,'Weaver','jweaverlp@unblog.fr','Masculino','Filmes','11/9/2011',120226,'Software Engineer II',4);
insert into funcionarios values (783,'Burns','kburnslq@163.com','Masculino','Automotivo','8/13/2004',44377,'Technical Writer',4);
insert into funcionarios values (784,'Burns','aburnslr@squidoo.com','Masculino','Eletronicos','2/15/2008',102001,'Developer III',4);
insert into funcionarios values (785,'Miller','nmillerls@behance.net','Masculino','Música','3/10/2009',99151,'Information Systems Manager',1);
insert into funcionarios values (786,'Willis','jwillislt@instagram.com','Masculino','Jardim','10/8/2000',123427,'General Manager',4);
insert into funcionarios values (787,'Williamson','twilliamsonlu@ow.ly','Feminino','Ferramentas','3/9/2003',135695,'Budget/Accounting Analyst III',6);
insert into funcionarios values (788,'Phillips','dphillipslv@domainmarket.com','Feminino','Brinquedos','4/29/2004',102793,'Editor',4);
insert into funcionarios values (789,'James','kjameslw@yellowbook.com','Masculino','Roupas','3/20/2005',130188,'Structural Analysis Engineer',1);
insert into funcionarios values (790,'Murray','cmurraylx@icio.us','Feminino','Lar','4/25/2013',97607,'Accountant IV',3);
insert into funcionarios values (791,'Phillips','tphillipsly@globo.com','Feminino','Esporte','12/11/2013',93534,'Saúde Coach IV',1);
insert into funcionarios values (792,'Mccoy','jmccoylz@samsung.com','Masculino','Industrial','9/20/2007',95787,'Engineer IV',2);
insert into funcionarios values (793,'Kelly','akellym0@unblog.fr','Feminino','Games','4/16/2011',120086,'Professor',6);
insert into funcionarios values (794,'Larson','mlarsonm1@blinklist.com','Feminino','Outdoors','1/1/2009',119414,'Research Assistant II',1);
insert into funcionarios values (795,'Hansen','dhansenm2@thetimes.co.uk','Feminino','Jardim','9/12/2008',79952,'Compensation Analyst',4);
insert into funcionarios values (796,'Owens','jowensm3@mail.ru','Masculino','Beleza','8/17/2004',138682,'Analyst Programmer',7);
insert into funcionarios values (797,'Ramos','aramosm4@issuu.com','Feminino','Saúde','5/20/2003',49667,'Help Desk Technician',6);
insert into funcionarios values (798,'Kim','akimm5@vimeo.com','Masculino','Jardim','7/13/2008',83798,'Technical Writer',5);
insert into funcionarios values (799,'Sims','asimsm6@lycos.com','Feminino','Roupas','3/9/2013',146024,'Actuary',7);
insert into funcionarios values (800,'Peterson','apetersonm7@eepurl.com','Masculino','Outdoors','9/8/2000',144841,'Web Developer I',4);
insert into funcionarios values (801,'Gomez','tgomezm8@ucoz.ru','Feminino','Filmes','9/20/2012',101582,'Biostatistician II',7);
insert into funcionarios values (802,'Knight','dknightm9@quantcast.com','Feminino','Filmes','5/30/2006',100716,'Help Desk Operator',3);
insert into funcionarios values (803,'Hunt','ahuntma@g.co','Feminino','Beleza','3/16/2011',72016,'Computer Systems Analyst I',4);
insert into funcionarios values (804,'Hunter','hhuntermb@reverbnation.com','Feminino','Books','7/31/2005',123156,'Social Worker',1);
insert into funcionarios values (805,'Gordon','pgordonmc@creativecommons.org','Masculino','Bebês','8/13/2014',110058,'Business Systems Development Analyst',1);
insert into funcionarios values (806,'Hill','shillmd@ca.gov','Masculino','Calçados','12/15/2011',117092,'VP Product Management',5);
insert into funcionarios values (807,'Gibson','hgibsonme@ox.ac.uk','Masculino','Industrial','12/15/2005',148816,'Operator',4);
insert into funcionarios values (808,'Mills','jmillsmf@seesaa.net','Feminino','Games','4/14/2009',79031,'Electrical Engineer',3);
insert into funcionarios values (809,'Butler','rbutlermg@netvibes.com','Masculino','Automotivo','8/9/2006',128448,'Technical Writer',3);
insert into funcionarios values (810,'Foster','lfostermh@blog.com','Feminino','Saúde','1/7/2013',138478,'Software Test Engineer IV',4);
insert into funcionarios values (811,'Harrison','eharrisonmi@cdbaby.com','Masculino','Joalheria','10/8/2010',41026,'Professor',1);
insert into funcionarios values (812,'Harvey','jharveymj@yandex.ru','Masculino','Beleza','9/25/2006',131816,'Sales Representative',1);
insert into funcionarios values (813,'Collins','dcollinsmk@salon.com','Feminino','Alimentícios','11/11/2013',85647,'Speech Pathologist',6);
insert into funcionarios values (814,'Hayes','shayesml@usda.gov','Masculino','Joalheria','2/28/2000',49457,'Compensation Analyst',4);
insert into funcionarios values (815,'Burton','rburtonmm@ow.ly','Feminino','Jardim','10/1/2014',80763,'Community Outreach Specialist',3);
insert into funcionarios values (816,'Jackson','pjacksonmn@dailymotion.com','Feminino','Beleza','12/29/2013',107093,'Electrical Engineer',3);
insert into funcionarios values (817,'Dixon','sdixonmo@marriott.com','Masculino','Bebês','1/15/2008',138970,'Structural Analysis Engineer',7);
insert into funcionarios values (818,'Rice','jricemp@columbia.edu','Feminino','Filmes','4/5/2002',82077,'Data Coordiator',4);
insert into funcionarios values (819,'Murray','jmurraymq@spiegel.de','Masculino','Industrial','12/6/2014',83237,'Editor',4);
insert into funcionarios values (820,'Baker','jbakermr@cafepress.com','Masculino','Brinquedos','1/20/2002',107749,'Graphic Designer',2);
insert into funcionarios values (821,'Riley','rrileyms@uiuc.edu','Masculino','Joalheria','6/19/2012',149114,'Business Systems Development Analyst',7);
insert into funcionarios values (822,'Gonzalez','jgonzalezmt@nsw.gov.au','Masculino','Saúde','8/9/2007',107240,'Financial Analyst',4);
insert into funcionarios values (823,'Harrison','mharrisonmu@guardian.co.uk','Feminino','Bebês','5/30/2008',134334,'Accountant II',7);
insert into funcionarios values (824,'Morris','mmorrismv@tumblr.com','Masculino','Alimentícios','9/26/2002',72008,'GIS Technical Architect',2);
insert into funcionarios values (825,'Turner','jturnermw@mapy.cz','Masculino','Books','4/3/2000',89285,'Community Outreach Specialist',5);
insert into funcionarios values (826,'Garcia','cgarciamx@vistaprint.com','Feminino','Alimentícios','8/10/2003',131075,'Help Desk Operator',2);
insert into funcionarios values (827,'Fowler','hfowlermy@nps.gov','Masculino','Bebês','5/7/2009',110383,'Chief Design Engineer',4);
insert into funcionarios values (828,'Allen','wallenmz@gnu.org','Feminino','Ferramentas','7/18/2005',149586,'Account Coordinator',1);
insert into funcionarios values (829,'Parker','bparkern0@weibo.com','Masculino','Saúde','11/27/2002',89503,'Research Associate',2);
insert into funcionarios values (830,'Stewart','cstewartn1@hugedomains.com','Feminino','Computadores','3/14/2010',149336,'Senior Sales Associate',1);
insert into funcionarios values (831,'Rodriguez','drodriguezn2@guardian.co.uk','Feminino','Outdoors','8/30/2006',140276,'Electrical Engineer',5);
insert into funcionarios values (832,'Turner','hturnern3@tumblr.com','Feminino','Games','4/8/2001',127875,'Accountant III',7);
insert into funcionarios values (833,'Chavez','rchavezn4@tamu.edu','Feminino','Música','5/29/2009',137704,'Help Desk Technician',4);
insert into funcionarios values (834,'Cox','kcoxn5@dyndns.org','Feminino','Games','1/17/2013',149221,'Senior Financial Analyst',2);
insert into funcionarios values (835,'Tucker','btuckern6@ovh.net','Masculino','Bebês','6/4/2014',148573,'Nurse Practicioner',4);
insert into funcionarios values (836,'Vasquez','svasquezn7@1und1.de','Feminino','Games','9/20/2002',125378,'Senior Developer',4);
insert into funcionarios values (837,'Cole','wcolen8@php.net','Feminino','Joalheria','9/12/2006',66420,'Clinical Specialist',7);
insert into funcionarios values (838,'Black','rblackn9@sun.com','Masculino','Brinquedos','9/28/2008',117171,'Electrical Engineer',4);
insert into funcionarios values (839,'Richardson','trichardsonna@cbsnews.com','Feminino','Saúde','10/23/2008',145962,'Cost Accountant',3);
insert into funcionarios values (840,'Hamilton','phamiltonnb@earthlink.net','Masculino','Books','10/19/2001',73778,'Sales Representative',2);
insert into funcionarios values (841,'Sullivan','ssullivannc@clickbank.net','Masculino','Crianças','3/4/2008',76731,'Accounting Assistant II',2);
insert into funcionarios values (842,'Carpenter','acarpenternd@prlog.org','Feminino','Beleza','7/13/2008',101653,'Web Designer II',6);
insert into funcionarios values (843,'Ross','rrossne@salon.com','Masculino','Jardim','1/11/2001',62534,'Senior Editor',3);
insert into funcionarios values (844,'Hall','jhallnf@1und1.de','Masculino','Outdoors','4/30/2013',100428,'Web Designer I',3);
insert into funcionarios values (845,'Washington','iwashingtonng@freewebs.com','Masculino','Crianças','12/2/2001',109828,'VP Quality Control',6);
insert into funcionarios values (846,'Moreno','dmorenonh@webs.com','Feminino','Joalheria','3/21/2001',63133,'Clinical Specialist',5);
insert into funcionarios values (847,'Knight','dknightni@unc.edu','Feminino','Roupas','3/22/2008',91532,'Operator',4);
insert into funcionarios values (848,'Austin','jaustinnj@gov.uk','Feminino','Calçados','1/26/2005',101646,'Environmental Tech',1);
insert into funcionarios values (849,'Rice','kricenk@cyberchimps.com','Masculino','Alimentícios','8/2/2002',68034,'Senior Financial Analyst',4);
insert into funcionarios values (850,'Kelley','pkelleynl@biglobe.ne.jp','Masculino','Crianças','4/4/2012',55214,'Senior Quality Engineer',2);
insert into funcionarios values (851,'Gordon','bgordonnm@imdb.com','Feminino','Automotivo','12/29/2002',136448,'Media Manager II',4);
insert into funcionarios values (852,'Rose','srosenn@flavors.me','Masculino','Calçados','5/1/2010',76086,'Statistician I',7);
insert into funcionarios values (853,'Mendoza','emendozano@edublogs.org','Masculino','Beleza','8/3/2013',128947,'Help Desk Operator',5);
insert into funcionarios values (854,'Hanson','ghansonnp@free.fr','Masculino','Ferramentas','10/14/2006',113354,'VP Quality Control',4);
insert into funcionarios values (855,'Perry','eperrynq@imdb.com','Masculino','Jardim','5/21/2012',75125,'VP Marketing',7);
insert into funcionarios values (856,'Roberts','trobertsnr@over-blog.com','Feminino','Roupas','2/21/2004',139714,'Help Desk Operator',2);
insert into funcionarios values (857,'Nichols','dnicholsns@ifeng.com','Masculino','Brinquedos','10/20/2003',43537,'Help Desk Operator',4);
insert into funcionarios values (858,'Wright','lwrightnt@house.gov','Feminino','Automotivo','11/23/2001',127521,'Nurse',4);
insert into funcionarios values (859,'Clark','mclarknu@bigcartel.com','Masculino','Saúde','2/19/2007',112510,'Information Systems Manager',4);
insert into funcionarios values (860,'Anderson','landersonnv@sakura.ne.jp','Masculino','Esporte','12/26/2004',115009,'Structural Engineer',4);
insert into funcionarios values (861,'Foster','kfosternw@a8.net','Feminino','Eletronicos','5/1/2013',64381,'Professor',7);
insert into funcionarios values (862,'Stanley','bstanleynx@phoca.cz','Feminino','Alimentícios','2/10/2001',149929,'Director of Sales',6);
insert into funcionarios values (863,'Gonzales','fgonzalesny@squarespace.com','Feminino','Automotivo','9/7/2001',101006,'Sales Associate',2);
insert into funcionarios values (864,'Jones','sjonesnz@chron.com','Feminino','Beleza','9/1/2013',47716,'Quality Engineer',2);
insert into funcionarios values (865,'Dixon','mdixono0@cbc.ca','Feminino','Esporte','12/29/2008',126420,'Structural Analysis Engineer',6);
insert into funcionarios values (866,'Kelly','jkellyo1@ameblo.jp','Feminino','Esporte','9/1/2011',55265,'Paralegal',1);
insert into funcionarios values (867,'Johnson','bjohnsono2@toplist.cz','Feminino','Books','3/18/2012',95679,'Associate Professor',3);
insert into funcionarios values (868,'Price','jpriceo3@google.it','Masculino','Filmes','1/24/2003',52612,'Analyst Programmer',7);
insert into funcionarios values (869,'Turner','pturnero4@tamu.edu','Feminino','Calçados','12/10/2010',130849,'Desktop Support Technician',5);
insert into funcionarios values (870,'Howard','ghowardo5@ow.ly','Masculino','Outdoors','8/21/2006',141753,'Assistant Professor',3);
insert into funcionarios values (871,'Hanson','thansono6@paginegialle.it','Masculino','Saúde','8/27/2007',133492,'Accountant II',3);
insert into funcionarios values (872,'Hall','thallo7@hud.gov','Masculino','Crianças','12/28/2004',112126,'Information Systems Manager',3);
insert into funcionarios values (873,'Alexander','aalexandero8@histats.com','Feminino','Brinquedos','7/5/2006',140078,'Environmental Specialist',3);
insert into funcionarios values (874,'Spencer','kspencero9@eventbrite.com','Masculino','Books','9/29/2012',119769,'Director of Sales',2);
insert into funcionarios values (875,'Jenkins','rjenkinsoa@answers.com','Feminino','Saúde','2/15/2007',115911,'Civil Engineer',7);
insert into funcionarios values (876,'Montgomery','amontgomeryob@dmoz.org','Masculino','Calçados','12/22/2003',75676,'Recruiting Manager',3);
insert into funcionarios values (877,'Webb','rwebboc@a8.net','Masculino','Outdoors','4/13/2005',144932,'Marketing Assistant',4);
insert into funcionarios values (878,'Williamson','pwilliamsonod@utexas.edu','Masculino','Industrial','10/25/2010',80102,'Graphic Designer',2);
insert into funcionarios values (879,'Hill','shilloe@ft.com','Masculino','Ferramentas','10/3/2011',144661,'Registered Nurse',3);
insert into funcionarios values (880,'Grant','kgrantof@phoca.cz','Feminino','Música','9/26/2001',60268,'Registered Nurse',3);
insert into funcionarios values (881,'Wright','cwrightog@trellian.com','Feminino','Ferramentas','9/10/2014',94072,'Social Worker',3);
insert into funcionarios values (882,'George','wgeorgeoh@mail.ru','Masculino','Calçados','2/23/2006',85249,'Engineer I',2);
insert into funcionarios values (883,'George','lgeorgeoi@jigsy.com','Masculino','Alimentícios','10/12/2007',66059,'Software Test Engineer IV',5);
insert into funcionarios values (884,'Ford','bfordoj@spiegel.de','Feminino','Eletronicos','11/26/2005',80931,'Cost Accountant',1);
insert into funcionarios values (885,'Wallace','mwallaceok@abc.net.au','Feminino','Brinquedos','9/17/2011',118793,'Research Assistant III',3);
insert into funcionarios values (886,'Murphy','fmurphyol@tumblr.com','Feminino','Bebês','9/26/2014',62114,'Analyst Programmer',7);
insert into funcionarios values (887,'Vasquez','jvasquezom@networksolutions.com','Masculino','Beleza','5/3/2014',131811,'Social Worker',4);
insert into funcionarios values (888,'Collins','bcollinson@google.pl','Feminino','Outdoors','9/30/2007',143034,'Budget/Accounting Analyst III',3);
insert into funcionarios values (889,'Jackson','ajacksonoo@slate.com','Masculino','Games','5/7/2013',41516,'Nurse',1);
insert into funcionarios values (890,'Howell','ehowellop@dailymotion.com','Feminino','Bebês','11/26/2012',72534,'Account Executive',4);
insert into funcionarios values (891,'Richards','arichardsoq@so-net.ne.jp','Masculino','Bebês','6/9/2011',140004,'Design Engineer',7);
insert into funcionarios values (892,'Crawford','pcrawfordor@gnu.org','Masculino','Beleza','6/23/2004',114436,'Account Representative IV',5);
insert into funcionarios values (893,'Dixon','jdixonos@msu.edu','Masculino','Alimentícios','3/31/2009',68684,'funcionarios Scientist',3);
insert into funcionarios values (894,'Owens','jowensot@gmpg.org','Masculino','Automotivo','9/18/2000',135326,'Graphic Designer',1);
insert into funcionarios values (895,'Moore','kmooreou@slate.com','Masculino','Industrial','2/23/2014',40194,'Environmental Specialist',5);
insert into funcionarios values (896,'Carpenter','rcarpenterov@pagesperso-orange.fr','Feminino','Lar','10/28/2010',134813,'Saúde Coach I',7);
insert into funcionarios values (897,'Reid','sreidow@smugmug.com','Masculino','Beleza','3/9/2002',79718,'Marketing Manager',4);
insert into funcionarios values (898,'Lee','kleeox@nature.com','Feminino','Industrial','12/9/2010',115085,'Senior Quality Engineer',7);
insert into funcionarios values (899,'Burton','kburtonoy@army.mil','Feminino','Calçados','3/5/2005',67758,'Chemical Engineer',2);
insert into funcionarios values (900,'Jordan','tjordanoz@instagram.com','Masculino','Brinquedos','2/23/2012',115776,'Database Administrator I',2);
insert into funcionarios values (901,'Perry','kperryp0@chron.com','Masculino','Books','12/15/2013',146701,'Research Assistant II',7);
insert into funcionarios values (902,'Wright','bwrightp1@deviantart.com','Masculino','Calçados','12/16/2011',109233,'Mechanical Systems Engineer',4);
insert into funcionarios values (903,'Burns','eburnsp2@discuz.net','Feminino','Outdoors','1/7/2007',113654,'Saúde Coach IV',1);
insert into funcionarios values (904,'Roberts','drobertsp3@ed.gov','Feminino','Ferramentas','8/25/2004',90937,'Cost Accountant',6);
insert into funcionarios values (905,'Webb','dwebbp4@about.com','Masculino','Automotivo','10/10/2007',111689,'GIS Technical Architect',5);
insert into funcionarios values (906,'Spencer','sspencerp5@mtv.com','Masculino','Eletronicos','4/18/2014',110881,'Electrical Engineer',1);
insert into funcionarios values (907,'Frazier','kfrazierp6@dailymail.co.uk','Feminino','Ferramentas','9/22/2009',104326,'Assistant Manager',5);
insert into funcionarios values (908,'Hanson','jhansonp7@1688.com','Feminino','Eletronicos','11/27/2003',144767,'Executive Secretary',5);
insert into funcionarios values (909,'Mcdonald','hmcdonaldp8@facebook.com','Masculino','Automotivo','12/26/2009',111041,'Research Assistant II',6);
insert into funcionarios values (910,'Reyes','freyesp9@ft.com','Feminino','Jardim','12/21/2005',148860,'Product Engineer',4);
insert into funcionarios values (911,'Peterson','jpetersonpa@unblog.fr','Masculino','Automotivo','1/20/2002',53964,'Pharmacist',1);
insert into funcionarios values (912,'Fisher','sfisherpb@answers.com','Feminino','Beleza','3/1/2007',131152,'Database Administrator IV',2);
insert into funcionarios values (913,'Kelley','mkelleypc@sourceforge.net','Feminino','Roupas','2/20/2012',116266,'Marketing Assistant',6);
insert into funcionarios values (914,'Armstrong','carmstrongpd@4shared.com','Feminino','Beleza','6/7/2006',143853,'Design Engineer',2);
insert into funcionarios values (915,'Bell','cbellpe@npr.org','Masculino','Ferramentas','5/26/2010',92561,'Senior Sales Associate',1);
insert into funcionarios values (916,'Payne','bpaynepf@cbsnews.com','Feminino','Alimentícios','8/10/2006',45486,'GIS Technical Architect',1);
insert into funcionarios values (917,'Gutierrez','sgutierrezpg@bloglovin.com','Masculino','Beleza','12/11/2004',95424,'VP Product Management',2);
insert into funcionarios values (918,'Miller','amillerph@skype.com','Feminino','Bebês','9/30/2004',73905,'Design Engineer',7);
insert into funcionarios values (919,'Bishop','kbishoppi@ovh.net','Feminino','Filmes','12/18/2010',53798,'Mechanical Systems Engineer',1);
insert into funcionarios values (920,'Cole','scolepj@odnoklassniki.ru','Feminino','Ferramentas','5/2/2010',116766,'Account Representative IV',4);
insert into funcionarios values (921,'Moore','jmoorepk@Lar.pl','Feminino','Beleza','6/23/2013',142101,'Paralegal',2);
insert into funcionarios values (922,'Watkins','swatkinspl@google.fr','Feminino','Beleza','4/19/2000',41299,'Computer Systems Analyst IV',5);
insert into funcionarios values (923,'White','jwhitepm@elpais.com','Masculino','Alimentícios','1/7/2003',122130,'Project Manager',1);
insert into funcionarios values (924,'Wilson','bwilsonpn@chron.com','Masculino','Beleza','3/6/2003',122446,'Systems Administrator II',6);
insert into funcionarios values (925,'Phillips','dphillipspo@adobe.com','Feminino','Jardim','10/3/2011',127367,'Recruiting Manager',4);
insert into funcionarios values (926,'Austin','raustinpp@house.gov','Masculino','Brinquedos','4/1/2014',50161,'Account Executive',3);
insert into funcionarios values (927,'Howard','dhowardpq@ocn.ne.jp','Masculino','Música','11/10/2003',82080,'Analog Circuit Design manager',2);
insert into funcionarios values (928,'Young','lyoungpr@psu.edu','Feminino','Crianças','12/21/2009',62799,'Operator',1);
insert into funcionarios values (929,'Rice','ericeps@reference.com','Feminino','Roupas','8/8/2003',66357,'Cost Accountant',3);
insert into funcionarios values (930,'Hansen','jhansenpt@slate.com','Feminino','Jardim','4/26/2013',129746,'Geological Engineer',1);
insert into funcionarios values (931,'Burton','jburtonpu@wufoo.com','Feminino','Brinquedos','8/24/2004',63682,'Recruiting Manager',5);
insert into funcionarios values (932,'Reyes','lreyespv@tuttocitta.it','Feminino','Jardim','5/27/2009',134114,'Accounting Assistant IV',2);
insert into funcionarios values (933,'Williams','gwilliamspw@columbia.edu','Masculino','Bebês','3/23/2014',131273,'Web Developer IV',6);
insert into funcionarios values (934,'Morrison','tmorrisonpx@free.fr','Masculino','Brinquedos','9/22/2005',93714,'Social Worker',5);
insert into funcionarios values (935,'Hudson','mhudsonpy@altervista.org','Masculino','Books','12/8/2001',146745,'Assistant Media Planner',1);
insert into funcionarios values (936,'Weaver','mweaverpz@delicious.com','Feminino','Computadores','12/20/2010',126307,'Professor',4);
insert into funcionarios values (937,'Hawkins','chawkinsq0@bravesites.com','Masculino','Esporte','9/25/2011',134931,'Tax Accountant',1);
insert into funcionarios values (938,'Jones','djonesq1@tamu.edu','Feminino','Lar','2/10/2002',73668,'Environmental Specialist',2);
insert into funcionarios values (939,'Austin','kaustinq2@soup.io','Masculino','Industrial','1/19/2012',48840,'Product Engineer',1);
insert into funcionarios values (940,'Turner','lturnerq3@ycombinator.com','Masculino','Alimentícios','3/9/2014',146952,'Dental Hygienist',2);
insert into funcionarios values (941,'Cunningham','gcunninghamq4@webmd.com','Feminino','Jardim','5/7/2006',73565,'Mechanical Systems Engineer',7);
insert into funcionarios values (942,'Lopez','llopezq5@usgs.gov','Masculino','Calçados','6/7/2010',64443,'Senior Sales Associate',6);
insert into funcionarios values (943,'Phillips','kphillipsq6@soup.io','Feminino','Eletronicos','1/5/2008',127171,'Cost Accountant',4);
insert into funcionarios values (944,'Adams','jadamsq7@aol.com','Feminino','Automotivo','2/11/2002',79045,'VP Product Management',3);
insert into funcionarios values (945,'Lee','pleeq8@noaa.gov','Feminino','Joalheria','3/16/2006',117147,'funcionarios Accountant III',1);
insert into funcionarios values (946,'Phillips','dphillipsq9@stanford.edu','Feminino','Outdoors','1/6/2014',69807,'Account Representative IV',3);
insert into funcionarios values (947,'Kelly','ckellyqa@boston.com','Feminino','Calçados','1/9/2004',128646,'Senior Editor',1);
insert into funcionarios values (948,'James','bjamesqb@hubpages.com','Masculino','Ferramentas','2/13/2008',47271,'Programmer Analyst IV',1);
insert into funcionarios values (949,'Woods','jwoodsqc@patch.com','Masculino','Calçados','12/25/2005',59363,'Programmer Analyst IV',1);
insert into funcionarios values (950,'Kennedy','jkennedyqd@nba.com','Feminino','Calçados','7/22/2008',68364,'Professor',5);
insert into funcionarios values (951,'Lewis','jlewisqe@etsy.com','Feminino','Brinquedos','12/17/2012',115975,'Social Worker',7);
insert into funcionarios values (952,'Cole','acoleqf@unblog.fr','Feminino','Calçados','10/21/2008',53905,'Editor',7);
insert into funcionarios values (953,'Edwards','pedwardsqg@cnbc.com','Masculino','Alimentícios','9/3/2003',115360,'Social Worker',6);
insert into funcionarios values (954,'Cooper','ncooperqh@wp.com','Feminino','Eletronicos','7/19/2011',120108,'Computer Systems Analyst II',5);
insert into funcionarios values (955,'Marshall','wmarshallqi@fastcompany.com','Masculino','Roupas','4/18/2005',59234,'VP Product Management',7);
insert into funcionarios values (956,'Austin','saustinqj@vimeo.com','Feminino','Alimentícios','1/28/2007',76812,'Biostatistician III',7);
insert into funcionarios values (957,'Franklin','cfranklinqk@dyndns.org','Feminino','Games','5/8/2012',42347,'VP Product Management',3);
insert into funcionarios values (958,'Wood','bwoodql@epa.gov','Masculino','Ferramentas','12/5/2003',82164,'Compensation Analyst',1);
insert into funcionarios values (959,'Young','jyoungqm@xing.com','Masculino','Música','11/29/2000',114695,'Statistician IV',1);
insert into funcionarios values (960,'Lane','glaneqn@google.fr','Masculino','Computadores','12/31/2002',47541,'Payment Adjustment Coordinator',2);
insert into funcionarios values (961,'Bowman','rbowmanqo@auda.org.au','Feminino','Bebês','11/14/2011',116355,'Structural Engineer',5);
insert into funcionarios values (962,'Hayes','ahayesqp@npr.org','Feminino','Saúde','10/13/2000',48339,'Engineer III',5);
insert into funcionarios values (963,'Burton','cburtonqq@github.io','Feminino','Roupas','6/20/2012',58697,'Teacher',4);
insert into funcionarios values (964,'Ramos','mramosqr@is.gd','Masculino','Jardim','3/2/2002',127268,'Nurse Practicioner',4);
insert into funcionarios values (965,'Butler','sbutlerqs@ow.ly','Masculino','Games','4/2/2014',115541,'Pharmacist',6);
insert into funcionarios values (966,'Kelly','ckellyqt@canalblog.com','Feminino','Industrial','2/13/2008',54876,'Research Associate',2);
insert into funcionarios values (967,'Lawson','clawsonqu@cargocollective.com','Feminino','Beleza','8/13/2012',55081,'Mechanical Systems Engineer',5);
insert into funcionarios values (968,'Moreno','nmorenoqv@chronoengine.com','Masculino','Beleza','9/26/2009',123017,'Speech Pathologist',6);
insert into funcionarios values (969,'Richards','jrichardsqw@blog.com','Masculino','Roupas','7/5/2014',85294,'Media Manager I',4);
insert into funcionarios values (970,'James','pjamesqx@nymag.com','Masculino','Crianças','8/5/2004',54470,'Accounting Assistant IV',2);
insert into funcionarios values (971,'Dunn','mdunnqy@chronoengine.com','Feminino','Outdoors','6/11/2011',148889,'Help Desk Operator',4);
insert into funcionarios values (972,'Bailey','mbaileyqz@howstuffworks.com','Feminino','Bebês','1/10/2008',94049,'Senior Financial Analyst',7);
insert into funcionarios values (973,'Walker','swalkerr0@sina.com.cn','Feminino','Filmes','5/11/2009',51132,'Assistant Manager',4);
insert into funcionarios values (974,'Welch','rwelchr1@eventbrite.com','Masculino','Brinquedos','6/14/2002',87422,'Research Nurse',3);
insert into funcionarios values (975,'Fowler','kfowlerr2@wp.com','Feminino','Jardim','9/15/2014',88439,'Media Manager III',2);
insert into funcionarios values (976,'Chapman','achapmanr3@list-manage.com','Masculino','Beleza','2/25/2005',110749,'Legal Assistant',7);
insert into funcionarios values (977,'Collins','acollinsr4@jiathis.com','Masculino','Beleza','10/26/2006',137911,'Accountant IV',4);
insert into funcionarios values (978,'Hunt','ghuntr5@moonfruit.com','Masculino','Eletronicos','6/18/2009',93665,'Saúde Coach I',3);
insert into funcionarios values (979,'Medina','bmedinar6@1688.com','Masculino','Bebês','12/31/2009',90068,'Quality Control Specialist',6);
insert into funcionarios values (980,'Sanchez','tsanchezr7@lycos.com','Feminino','Lar','12/19/2014',83704,'Editor',5);
insert into funcionarios values (981,'Simmons','dsimmonsr8@craigslist.org','Masculino','Beleza','6/27/2011',116767,'Environmental Tech',3);
insert into funcionarios values (982,'Mendoza','bmendozar9@reference.com','Feminino','Brinquedos','8/26/2000',54599,'Assistant Media Planner',3);
insert into funcionarios values (983,'Lopez','llopezra@blogger.com','Feminino','Esporte','2/17/2014',94685,'Research Nurse',4);
insert into funcionarios values (984,'Williams','hwilliamsrb@webnode.com','Masculino','Joalheria','10/20/2004',91608,'funcionarios Scientist',5);
insert into funcionarios values (985,'Stevens','hstevensrc@hugedomains.com','Masculino','Eletronicos','2/28/2006',118791,'Safety Technician IV',1);
insert into funcionarios values (986,'Ryan','hryanrd@networkadvertising.org','Masculino','Beleza','11/27/2002',115888,'Librarian',6);
insert into funcionarios values (987,'Lawrence','slawrencere@cdbaby.com','Feminino','Ferramentas','12/17/2000',60743,'Civil Engineer',5);
insert into funcionarios values (988,'Cole','ecolerf@scientificamerican.com','Feminino','Beleza','4/17/2005',117962,'Accountant III',7);
insert into funcionarios values (989,'Fields','dfieldsrg@examiner.com','Feminino','Música','3/7/2004',67817,'Registered Nurse',7);
insert into funcionarios values (990,'Thomas','lthomasrh@elegantthemes.com','Masculino','Crianças','8/6/2003',76229,'Business Systems Development Analyst',4);
insert into funcionarios values (991,'Turner','rturnerri@a8.net','Feminino','Eletronicos','12/13/2009',62286,'Senior Sales Associate',2);
insert into funcionarios values (992,'Edwards','nedwardsrj@wikimedia.org','Masculino','Outdoors','10/30/2006',121713,'Director of Sales',5);
insert into funcionarios values (993,'Anderson','sandersonrk@businesswire.com','Feminino','Books','3/7/2009',139486,'Product Engineer',7);
insert into funcionarios values (994,'Hamilton','rhamiltonrl@skype.com','Feminino','Saúde','10/29/2002',141375,'Desktop Support Technician',7);
insert into funcionarios values (995,'Wood','kwoodrm@indiegogo.com','Feminino','Joalheria','4/5/2010',83404,'Pharmacist',2);
insert into funcionarios values (996,'James','tjamesrn@soundcloud.com','Feminino','Games','11/17/2013',78433,'Accountant II',7);
insert into funcionarios values (997,'Reynolds','dreynoldsro@blogtalkradio.com','Feminino','Computadores','4/16/2007',120138,'Statistician IV',1);
insert into funcionarios values (998,'Walker','kwalkerrp@unicef.org','Feminino','Games','2/13/2010',60363,'Account Coordinator',1);
insert into funcionarios values (999,'Kennedy','lkennedyrq@edublogs.org','Masculino','Industrial','9/22/2004',48050,'Graphic Designer',2);
insert into funcionarios values (1000,'Howard','showardrr@addtoany.com','Masculino','Bebês','11/7/2003',148687,'General Manager',3);
SELECT COUNT(*) FROM FUNCTIONARIOS;
SELECT COUNT(*) , DEPARTAMENTO FROM FUNCIONARIOS GROUP BY DEPARTAMENTO;
SELECT NOME,DEPARTAMENTO FROM FUNCIONARIOS WHERE DEPARTAMENTO = 'ROUPAS' OR DEPARTAMENTO = 'FILMES';
SELECT COUNT(*), SEXO FROM FUNCIONARIOS GROUP BY SEXO;
SELECT NOME, SEXO FROM FUNCIONARIOS WHERE (DEPARTAMENTO = 'LAR' AND SEXO = 'FEMININO') OR (DEPARTAMENTO = 'FILMES' AND SEXO = 'FEMININO');
SELECT * FROM FUNCIONARIOS WHERE SEXO = 'MASCULINO' OR DEPARTAMENTO = 'Jardim';
/* QUE NÃO TEM EMAIL */
SELECT EMAIL FROM CLIENTE WHERE EMAIL IS NULL;
/* QUE TEM EMAIL */
SELECT EMAIL FROM CLIENTE WHERE EMAIL IS NOT NULL;
/* ULTILIZANDO O UPDATE PARA ATUALIZAR VALORES */
UPDATE CLIENTE SET = "CAIO.DEV.MOUTA@GMMAIL.COM";
/* WHERE VAI SER O SEU MELHOR AMIGO PARA VIDA INTEIRA */
/* ALTERANDO */
SELECT * FROM CLIENTE WHERE NOME = "LILIAN";
UPDATE CLIENTE
SET EMAIL = 'JOAOLIMA@IGCOM.BR'
WHERE NOME = 'JOAO';
UPDATE CLIENTE
SET EMAIL = 'PEDRINHO13@GMAIL.COM.BR'
WHERE NOME = 'PEDRO';
UPDATE CLIENTE
SET EMAIL = 'LILIANGATINHA@GMAIL.COM.BR'
WHERE NOME = 'LILIAN';
UPDATE CLIENTE
SET EMAIL = 'JEDO@GMAIL.COM.BR'
WHERE NOME = 'JOSEVALDO';
/*DELETANDO REGISTROS - NUNCA USE SEM WHERE */
SELECT COUNT(*) FROM CLIENTE
WHERE NOME = 'ANA';
DELETE FROM CLIENTE WHERE NOME = 'ANA';
DELETE FROM CLIENTE WHERE NOME = 'CARLA'
AND EMAIL = 'LILIAN@HOTMAIL.COM';
INSERT INTO CLIENTE VALUES('CARLA','F','LILIAN@HOTMAIL.COM',999031232,'8832-3221','RUA CAIO MOUTA 221 SANTINHO FLORIANOPOLIS-SC');
/* COMMIT E ROLBACK PARA VOLTAR */
/* PRIMEIRA FORMA NORMAL */
/*
1 - TODO CAMPO VETORIZADO SE TORNARA OUTRA TABELA
(AMARELO , AZUL, LARANJA , VERDE) -> CORES
(KA , FIESTA, UNO, CIVIC) -> CARROS
2 - TODO CAMPO MULTIVALORADO SE TORNARA PUTRA TABELA
QUANDO O CAMPO FOR DIVISIVEL
3 - TODA TABELA NECESSITA DE PELO MENOS UM CAMPO QUE INDENTIFIQUE
TODO REGISTRO COMO SENDO UNICO
ISSO É O QUE CHAMAMOS DE CHAVE PRIMÁRIA OU PRIMARY KEY
*/
CREATE DATABASE COMERCIO;
USE COMERCIO;
/*NÃO A VIRGULA APÓS A ÚLTIMA COLUNA DA TABELA */
/* COLOCA UNIQUE NÃO SE REPETE */
DROP TABLE CLIENTE;
CREATE TABLE CLIENTE (
IDCLIENTE INT PRIMARY KEY AUTO_INCREMENT,
NOME VARCHAR(30) NOT NULL,
SEXO ENUM('M','F') NOT NULL,
EMAIL VARCHAR(50) UNIQUE,
CPF VARCHAR(15) UNIQUE
);
CREATE TABLE ENDERECO (
IDENDERECO INT PRIMARY KEY AUTO_INCREMENT,
RUA VARCHAR(30) NOT NULL,
BAIRRO VARCHAR(30) NOT NULL,
CIDADE VARCHAR(30) NOT NULL,
ESTADO CHAR(2) NOT NULL,
ID_CLIENTE INT UNIQUE,
FOREIGN KEY (ID_CLIENTE)
REFERENCES CLIENTE(IDCLIENTE)
);
CREATE TABLE TELEFONE (
IDTELEFONE INT PRIMARY KEY AUTO_INCREMENT,
TIPO ENUM('RES','COM','CEL') NOT NULL,
NUMERO VARCHAR(10) NOT NULL,
ID_CLIENTE INT,
FOREIGN KEY (ID_CLIENTE)
REFERENCES CLIENTE(IDCLIENTE)
);
/* ENDERECO - OBRIGATORIO CADASTRO DE SOMENTE UM
TELEFONE - NÃO OBRIGATORIO CADASTRO DE MAIS DE UM (OPCIONAL) /*
/* CHAVE ESTRANGEIRA É A CHAVE PRIMARIA DE UMA TABELA QUE VAI ATÉ A
OUTRA TABELA PARA FAZER REFERÊNCIA ENTRE REGISTROS * /
/* EM RELACIONAMENTO 1 X 1 A CHAVE ESTRANGEIRA FICA NA TABELA MAIS FRACA */
/* EM RELACIONAMENTO 1 * n A CHAVE ESTRANGEIRA FICA DO LADO N */
/* CRIAR NO BANCO DE DADOS FOREIGN KEY */
/* INSERINDO NO BANCO DE DADOS */
INSERT INTO CLIENTE VALUES(NULL,'JOÃO','M','JOÃO@IG.COM','784994874');
INSERT INTO CLIENTE VALUES(NULL,'CARLOS','M','CARLOS@IG.COM','784994872');
INSERT INTO CLIENTE VALUES(NULL,'ANA','F','ANINHA@IG.COM','784994901');
INSERT INTO CLIENTE VALUES(NULL,'CLARA','F','CLARA@IG.COM','784994789');
INSERT INTO CLIENTE VALUES(NULL,'JORGE','M','JORGE@IG.COM','784994322');
INSERT INTO CLIENTE VALUES(NULL,'CELIA','F','CELIA@IG.COM','784994234');
INSERT INTO CLIENTE VALUES(NULL,'MAGNO','M','MAGNO@IG.COM','784994623');
+-----------+--------+------+---------------+-----------+
| IDCLIENTE | NOME | SEXO | EMAIL | CPF |
+-----------+--------+------+---------------+-----------+
| 1 | JOÃO | M | JOÃO@IG.COM | 784994284 |
| 2 | CARLOS | M | CARLOS@IG.COM | 784994872 |
| 3 | ANA | F | ANINHA@IG.COM | 784994901 |
| 4 | CLARA | F | CLARA@IG.COM | 784994789 |
| 5 | JORGE | M | JORGE@IG.COM | 784994322 |
| 6 | CELIA | F | CELIA@IG.COM | 784994234 |
| 7 | MAGNO | M | MAGNO@IG.COM | 784994623 |
+-----------+--------+------+---------------+-----------+
INSERT INTO ENDERECO VALUES(NULL,'RUA ANTONIO SÁ','CENTRO','BELO HORIZONTE','MG',1);
INSERT INTO ENDERECO VALUES(NULL,'RUA IMPERADOR','FLAMENGO','RIO DE JANEIRO','RJ',2);
INSERT INTO ENDERECO VALUES(NULL,'RUA RPES VARGAS','BAIXADA SANTISTA','SANTOS','SP',3);
INSERT INTO ENDERECO VALUES(NULL,'RUA ALFANDEGA','CURUÇA','SÃO PAULO','SP',4);
INSERT INTO ENDERECO VALUES(NULL,'RUA DO OUVIDOR','CANAASVIEIRAS','FLOARIANOPOLIS','SC',5);
INSERT INTO ENDERECO VALUES(NULL,'RUA URUGUAIANA','JURERE INTERNACIONAL','PENHA','SC',6);
SELECT * FROM ENDERECO;
INSERT INTO TELEFONE VALUES(NULL,'CEL','4323-4212',1);
INSERT INTO TELEFONE VALUES(NULL,'COM','5323-4212',1);
INSERT INTO TELEFONE VALUES(NULL,'RES','6423-4212',2);
INSERT INTO TELEFONE VALUES(NULL,'COM','3123-4212',2);
INSERT INTO TELEFONE VALUES(NULL,'CEL','3323-4212',3);
INSERT INTO TELEFONE VALUES(NULL,'RES','3923-4212',3);
INSERT INTO TELEFONE VALUES(NULL,'RES','9887-4212',5);
INSERT INTO TELEFONE VALUES(NULL,'CEL','4992-4212',5);
INSERT INTO TELEFONE VALUES(NULL,'CEL','8872-4212',2);
/* SELEÇÃO , PROJEÇÃO E JUNÇÃO */
/* PROJEÇÃO -> TUDO QUE VOCÊ QUE VER NA TELA */
/* SELECAO É UM SUBCONJUNTO DO CONJUNTO TOTAL DE REGISTROS DE UMA
TABELA A CLAUSULA DE SELEÇÃO É O WHERE
*/
SELECT NOME, SEXO,EMAIL /*PROJECAO */
FROM CLIENTE /*ORIGEM */
WHERE SEXO = 'F'; /*SELECAO */
SELECT NUMERO
FROM TELEFONE
WHERE TIPO = 'CEL';
/*JUNÇÃO -> JOIN */
SELECT NOME, EMAIL, IDCLIENTE
FROM CLIENTE;
SELECT ID_CLIENTE, BAIRRO, CIDADE FROM ENDERECO;
+--------+---------------+-----------+
| NOME | EMAIL | IDCLIENTE |
+--------+---------------+-----------+
| JOÃO | JOÃO@IG.COM | 1 |
| CARLOS | CARLOS@IG.COM | 2 |
| ANA | ANINHA@IG.COM | 3 |
| CLARA | CLARA@IG.COM | 4 |
| JORGE | JORGE@IG.COM | 5 |
| CELIA | CELIA@IG.COM | 6 |
| MAGNO | MAGNO@IG.COM | 7 |
+--------+---------------+-----------+
+------------+----------------------+----------------+
| ID_CLIENTE | BAIRRO | CIDADE |
+------------+----------------------+----------------+
| 1 | CENTRO | BELO HORIZONTE |
| 2 | FLAMENGO | RIO DE JANEIRO |
| 3 | BAIXADA SANTISTA | SANTOS |
| 4 | CURUÇA | SÃO PAULO |
| 5 | CANAASVIEIRAS | FLOARIANOPOLIS |
| 6 | JURERE INTERNACIONAL | PENHA |
+------------+----------------------+----------------+
SELECT NOME, SEXO, BAIRRO, CIDADE
FROM CLIENTE , ENDERECO
WHERE IDCLIENTE = ID_CLIENTE;
+--------+------+----------------------+----------------+
| NOME | SEXO | BAIRRO | CIDADE |
+--------+------+----------------------+----------------+
| JOÃO | M | CENTRO | BELO HORIZONTE |
| CARLOS | M | FLAMENGO | RIO DE JANEIRO |
| ANA | F | BAIXADA SANTISTA | SANTOS |
| CLARA | F | CURUÇA | SÃO PAULO |
| JORGE | M | CANAASVIEIRAS | FLOARIANOPOLIS |
| CELIA | F | JURERE INTERNACIONAL | PENHA |
+--------+------+----------------------+----------------+
SELECT NOME, SEXO, BAIRRO, CIDADE
FROM CLIENTE , ENDERECO
WHERE IDCLIENTE = ID_CLIENTE
AND SEXO = 'F';
+-------+------+----------------------+-----------+
| NOME | SEXO | BAIRRO | CIDADE |
+-------+------+----------------------+-----------+
| ANA | F | BAIXADA SANTISTA | SANTOS |
| CLARA | F | CURUÇA | SÃO PAULO |
| CELIA | F | JURERE INTERNACIONAL | PENHA |
+-------+------+----------------------+-----------+
/* ESCREVER QUERY POR PARTES */
SELECT NOME, SEXO, BAIRRO, CIDADE
FROM CLIENTE
INNER JOIN ENDERECO
ON IDCLIENTE = ID_CLIENTE
WHERE SEXO = 'F';
/* NOME, SEXO , EMAIL, TIPO , NUMERO */
SELECT NOME, SEXO , EMAIL, TIPO , NUMERO
FROM CLIENTE
INNER JOIN TELEFONE
ON IDCLIENTE = ID_CLIENTE;
/* NOME, SEXO , BAIRRO , CIDADE , TIPO , NUMERO */
SELECT CLIENTE.NOME, CLIENTE.SEXO, ENDERECO.BAIRRO, ENDERECO.CIDADE,
TELEFONE.TIPO , TELEFONE.NUMERO
FROM CLIENTE
INNER JOIN ENDERECO
ON CLIENTE.IDCLIENTE = ENDERECO.ID_CLIENTE
INNER JOIN TELEFONE
ON CLIENTE.IDCLIENTE = TELEFONE.ID_CLIENTE;
+--------+------+------------------+----------------+------+-----------+
| NOME | SEXO | BAIRRO | CIDADE | TIPO | NUMERO |
+--------+------+------------------+----------------+------+-----------+
| JOÃO | M | CENTRO | BELO HORIZONTE | CEL | 4323-4212 |
| JOÃO | M | CENTRO | BELO HORIZONTE | COM | 5323-4212 |
| CARLOS | M | FLAMENGO | RIO DE JANEIRO | RES | 6423-4212 |
| CARLOS | M | FLAMENGO | RIO DE JANEIRO | COM | 3123-4212 |
| CARLOS | M | FLAMENGO | RIO DE JANEIRO | CEL | 8872-4212 |
| ANA | F | BAIXADA SANTISTA | SANTOS | CEL | 3323-4212 |
| ANA | F | BAIXADA SANTISTA | SANTOS | RES | 3923-4212 |
| JORGE | M | CANAASVIEIRAS | FLOARIANOPOLIS | RES | 9887-4212 |
| JORGE | M | CANAASVIEIRAS | FLOARIANOPOLIS | CEL | 4992-4212 |
+--------+------+------------------+----------------+------+-----------+
/*PONTEIRAMENTO */
SELECT C.NOME, C.SEXO, E.BAIRRO, E.CIDADE,
T.TIPO , T.NUMERO
FROM CLIENTE C
INNER JOIN ENDERECO E
ON C.IDCLIENTE = E.ID_CLIENTE
INNER JOIN TELEFONE T
ON C.IDCLIENTE = T.ID_CLIENTE;
/*
DML - DATA MANIPULATION LANGUAGE
DDL - DATA DEFINITION LANGUAGE
DCL - DATA CONTROL LANGUAGE
TCL - TRANSACTION CONTROL LANGUAGE
*/
/* INSERT */
INSERT INTO CLIENTE VALUES(NULL,'PAULA','M',NULL,'774023311')
INSERT INTO ENDERECO VALUES (NULL,'RUA JOÃO SILVA','PRAIA','BUZIOS','RJ',8);
/* FILTROS */
SELECT * FROM CLIENTE
WHERE SEXO = 'M';
/*UPDATE SEMPRE ULTILIZAR COM A CLAUSULA WHERE*/
UPDATE CLIENTE
SET SEXO = 'F'
WHERE IDCLIENTE = 8;
/* DDL DATA DEFINITION LANGUAGE */
/*
PRIMEIRA FN
ATOMICIDADE - UM CAMPO NAO PODE SER DIVISIVEL
UM CAMPO NAO PODE SER VETORIZADO
PK CHAVE PRIMARIA
*/
CREATE TABLE PRODUTO (
IDPRODUTO INT PRIMARY KEY AUTO_INCREMENT,
NOME_PRODUTO VARCHAR(30) NOT NULL,
PRECO INT,
FRETE FLOAT(10,2) NOT NULL
);
/* ALTER TABLE */
/* ALTERANDO O NOME DE UMA COLUNA - CHANGE */
ALTER TABLE PRODUTO
CHANGE PRECO VALOR_UNITARIO INT NOT NULL;
ALTER TABLE PRODUTO
CHANGE VALOR_UNITARIO
/* MODIFY */
ALTER TABLE PRODUTO
MODIFY VALOR_UNITARIO VARCHAR(50) NOT NULL;
/* ADICIONANDO COLUNAS */
ALTER TABLE PRODUTO
ADD PESO FLOAT(10, 2) NOT NULL;
/* APAGANDO UMA COLUNA */
ALTER TABLE PRODUTO
DROP COLUMN PESO;
/* ADICIONANDO UMA COLUNA NA ORDEM ESPECIFICA */
ALTER TABLE PRODUTO
ADD COLUMN PESO FLOAT(10,2) NOT NULL
AFTER NOME_PRODUTO;
/*RELATORIO DE GERAL */
SELECT C.NOME , C.SEXO , C.EMAIL, C.CPF , E.RUA , E.BAIRRO , E.CIDADE,
E.ESTADO , T.TIPO , T.NUMERO
FROM CLIENTE C
INNER JOIN ENDERECO E
ON C.IDCLIENTE = E.ID_CLIENTE
INNER JOIN TELEFONE T
ON C.IDCLIENTE = E.ID_CLIENTE;
/* RELATORIOS DAS MULHERES */
SELECT C.NOME , C.SEXO , C.EMAIL, C.CPF ,
E.RUA , E.BAIRRO , E.CIDADE,
E.ESTADO , T.TIPO , T.NUMERO
FROM CLIENTE C
INNER JOIN ENDERECO E
ON C.IDCLIENTE = E.ID_CLIENTE
INNER JOIN TELEFONE T
ON C.IDCLIENTE = E.ID_CLIENTE;
WHERE SEXO = 'F';
/* RELATORIOS DOS HOMENS */
SELECT C.NOME , C.SEXO , C.EMAIL, C.CPF ,
E.RUA , E.BAIRRO , E.CIDADE, E.ESTADO ,
T.TIPO , T.NUMERO
FROM CLIENTE C
INNER JOIN ENDERECO E
ON C.IDCLIENTE = E.ID_CLIENTE
INNER JOIN TELEFONE T
ON C.IDCLIENTE = E.ID_CLIENTE;
WHERE SEXO = 'M';
/* BUSCAR IDCLIENTE PELO IN */
SELECT * FROM CLIENTE
WHERE IDCLIENTE IN(12,13,18,19);
UPDATE CLIENTE SET SEXO = 'F'
WHERE IDCLIENTE IN (12,13,18,19);
/*QUANTIDADE DE HOMENS E MULHERES */
SELECT COUNT(*) AS QUANTIDADE, SEXO FROM CLIENTE
GROUP BY SEXO;
/* IDS E EMAIL DAS MULHERES QUE MOREM NO CENTRO DO RIO DE JANEIRO
E NÃO TENHAM CELULAR */
/* DEIXAR O OR DENTRO DE PARENTESIS */
SELECT C.IDCLIENTE, C.EMAIL, C.NOME
FROM CLIENTE C
INNER JOIN ENDERECO E
ON C.IDCLIENTE = E.ID_CLIENTE
INNER JOIN TELEFONE T
ON C.IDCLIENTE = T.ID_CLIENTE
WHERE SEXO = 'F' AND
BAIRRO LIKE '%CENTRO'
AND ESTADO LIKE '%RJ'
AND (TIPO = 'RES' OR TIPO = 'COM');
SELECT C.NOME , C.EMAIL,
T.NUMERO AS CELULAR , T.TIPO
FROM CLIENTE C
INNER JOIN ENDERECO E
ON C.IDCLIENTE = E.ID_CLIENTE
INNER JOIN TELEFONE T
ON C.IDCLIENTE = E.ID_CLIENTE
WHERE TIPO = 'CEL' AND ESTADO = 'RJ';
/* NOME, EMAIL, NUMERO , ESTADO */
SELECT C.NOME, C.EMAIL ,E.ESTADO , T.NUMERO
FROM CLIENTE C
INNER JOIN ENDERECO E
ON C.IDCLIENTE = E.ID_CLIENTE
INNER JOIN TELEFONE T
ON C.IDCLIENTE = T.ID_CLIENTE;
SELECT C.NOME, IFNULL(C.EMAIL, 'NÃO TEM EMAIL') AS 'E-MAIL'
,E.ESTADO , T.NUMERO
FROM CLIENTE C
INNER JOIN ENDERECO E
ON C.IDCLIENTE = E.ID_CLIENTE
INNER JOIN TELEFONE T
ON C.IDCLIENTE = T.ID_CLIENTE;
/* VIEW */
SELECT C.NOME ,
C.SEXO ,
C.EMAIL,
T.TIPO ,
T.NUMERO ,
E.BAIRRO,
E.CIDADE,
E.ESTADO
FROM CLIENTE C
INNER JOIN TELEFONE T
ON C.IDCLIENTE = T.ID_CLIENTE
INNER JOIN ENDERECO E
ON C.IDCLIENTE = E.ID_CLIENTE;
/* CRIAÇÃO DA VIEW */
CREATE VIEW RELATORIO AS
SELECT C.NOME ,
C.SEXO ,
C.EMAIL,
T.TIPO ,
T.NUMERO ,
E.RUA,
E.BAIRRO,
E.CIDADE,
E.ESTADO
FROM CLIENTE C
INNER JOIN TELEFONE T
ON C.IDCLIENTE = T.ID_CLIENTE
INNER JOIN ENDERECO E
ON C.IDCLIENTE = E.ID_CLIENTE;
SELECT * FROM RELATORIO;
/* APAGAR UMA VIEW */
DROP VIEW RELATORIO ;
SELECT NOME, NUMERO , ESTADO FROM RELATORIO;
SELECT C.IDCLIENTE, C.NOME, E.RUA , T.NUMERO
FROM CLIENTE C
INNER JOIN ENDERECO E
ON C.IDCLIENTE = E.ID_CLIENTE
INNER JOIN TELEFONE T
ON C.IDCLIENTE = T.ID_CLIENTE;
SELECT NOME, RUA , NUMERO FROM RELATORIO;
CREATE TABLE ALUNOS (
NUMERO INT,
NOME VARCHAR(30)
);
INSERT INTO ALUNOS VALUES (1,'JOAO');
INSERT INTO ALUNOS VALUES (1,'MARIA');
INSERT INTO ALUNOS VALUES (2,'ZOE');
INSERT INTO ALUNOS VALUES (2,'ANDRE');
INSERT INTO ALUNOS VALUES (3,'CLARA');
INSERT INTO ALUNOS VALUES (5,'JANAINA');
INSERT INTO ALUNOS VALUES (1,'JANAINA');
INSERT INTO ALUNOS VALUES (3,'MARCELO');
INSERT INTO ALUNOS VALUES (4,'GIOVANI');
INSERT INTO ALUNOS VALUES (5,'ANTONIO');
INSERT INTO ALUNOS VALUES (6,'ANA');
INSERT INTO ALUNOS VALUES (6,'VIVIANE');
SELECT * FROM ALUNOS
ORDER BY NUMERO;
SELECT * FROM ALUNOS
ORDER BY 1;
SELECT * FROM ALUNOS
ORDER BY 2;
/* É PERMITIDO FAZER UPDATE EM VIEWS COM JOINS , MAS NÃO PODE
DELETAR E FAZER INSERT */
/* ORDENANDO POR MAIS DE UMA COLUNA */
SELECT * FROM ALUNOS
ORDER BY NUMERO, NOME;
SELECT * FROM ALUNOS
ORDER BY 1, 2;
/* MESCLANDO ORDER BY COM PROJEÇÃO */
SELECT NOME FROM ALUNOS
ORDER BY 1,2;
/* ORDER BY DESC/ ASC */
SELECT * FROM ALUNOS
ORDER BY 1, 2;
SELECT * FROM ALUNOS
ORDER BY 1 ASC;
SELECT * FROM ALUNOS
ORDER BY 1 DESC;
SELECT * FROM ALUNOS
ORDER BY 1 DESC, 2 DES;
SELECT C.NOME ,
C.SEXO ,
C.EMAIL,
T.TIPO ,
T.NUMERO ,
E.BAIRRO,
E.CIDADE,
E.ESTADO
FROM CLIENTE C
INNER JOIN TELEFONE T
ON C.IDCLIENTE = T.ID_CLIENTE
INNER JOIN ENDERECO E
ON C.IDCLIENTE = E.ID_CLIENTE
ORDER BY 1;
/*DELIMITADOR */
SELECT C.NOME ,
C.SEXO ,
C.EMAIL,
T.TIPO ,
T.NUMERO ,
E.BAIRRO,
E.CIDADE,
E.ESTADO
FROM CLIENTE C
INNER JOIN TELEFONE T
ON C.IDCLIENTE = T.ID_CLIENTE
INNER JOIN ENDERECO E
ON C.IDCLIENTE = E.ID_CLIENTE
ORDER BY 1
STATUS
/* MUDANDO O DELIMITADOR TEM QUE TER ESPAÇO SE COLOCAR TUDO
JUNTO NÃO MUDA E APENAS UM ESPAÇO*/
DELIMITER $
/* STORED PROCEDURE */
DELIMITER $
CREATE PROCEDURE NOME()
BEGIN
QUALQUER PROGRAMACAO;
END
$
CREATE PROCEDURE NOME_EMPRESA()
BEGIN
SELECT 'UNIVERSIDADE DOS DADOS' AS EMPRESA;
END
$
/* CHAMANDO UMA PROCEDURE */
CALL NOME_EMPRESA()$
DELIMITER $
CREATE PROCEDURE CONTA()
BEGIN
SELECT 10 + 30 AS CONTA;
END
$
DELIMITER ;
CALL CONTA();
DROP PROCEDURE CONTA;
DELIMITER $
CREATE PROCEDURE CONTA(NUMERO1 INT, NUMERO2 INT)
BEGIN
SELECT NUMERO1 + NUMERO2 AS CONTA;
END
$
CALL CONTA(100, 50)$
DELIMITER $
/* PROCEDURES */
CREATE DATABASE PROJETO;
USE PROJETO;
CREATE TABLE CURSOS (
IDCURSO INT PRIMARY KEY AUTO_INCREMENT,
NOME VARCHAR(30) NOT NULL,
HORAS INT(3) NOT NULL,
VALOR FLOAT(10,2) NOT NULL
);
INSERT INTO CURSOS VALUES(NULL,'JAVA',30,500.00);
INSERT INTO CURSOS VALUES(NULL, 'FUNDAMENTOS DE BANCO DE DADOS',40,700.00);
DELIMITER #
CREATE PROCEDURE CAD_CURSO(P_NOME VARCHAR(30),
P_HORAS INT(30),
P_PRECO FLOAT(10,2))
BEGIN
INSERT INTO CURSOS VALUES(NULL,P_NOME,P_HORAS,P_PRECO);
END
#
CALL CAD_CURSO('BI SQL SERVER',35,3000.00);
CALL CAD_CURSO('POWER BI',20,1000.00);
CALL CAD_CURSO('TABLEAU',30,1200.00);
/* NUNCA USE APENAS PARA FINS ACADEMICOS */
SELECT * FROM CURSOS;
/* o que separa o numero flutuante é o ponto não a virgula */
-- BANCO DE DADOS ORACLE 11G
SEGMENTOS SÃO OS OBJETOS DOS BANCO DE DADOS ORACLE
TABLEAS - INDICES - VIEWS - PROCEDURES
DATABLOCKS - UNIDADE MINIMA DE ARMAZENAMENTO
OLTP - INSERT , DEELETE , UPDATE
OLAP - SELECT
EXTENTS - O CONJUNTO DE DATABLOKS
DATAFLIES - ESTRUTURAS FISICAS DE ARMAZENAMENTO DO BANCO DE DADOS
ORACLE . OS DATAFILES COMPÔEM AS TABLESPACES E A SOMA DOS SEUS TAMANHOS
É O TOTAL DE TAMANHO DE TABLESPACE
TABLESPACE - PERMANENTE DICIONARIO DE DADOS , DADOS DE APLICAÇÕES E
TEMPORARIA DADOS TEMPORARIOS
CONTROLFILE RESPONSAVEL PELO CONTROLE DE FUNCIONAMENTO DA BASE DE DADOS
COMMIT GRAVAR OS DADOS*/
/* Como os redolog funcionam de maneira circular , os dados são sobrescritos em
determinado momento. Para evitar perdade de dados, podemos colocar o banco de
dados em modo Archive , onde um arquivo é gerado com a cópia dos redo a cada
mudança de arquivo. O arquivo de Archive não é obrigatório no Oracle, porém é
amplamente utilizado em ambiente de produção */
/* SPFILE É BINÁRIO E É LIDO */
/*PFILE É UM ARQUIVO DE TEXTO ELE PODE SER DIGITADO */
/* PASSWORDFILE ARQUIVOS DE SENHAS CRIPTOGRADAS PARA AUTENTICAÇÃO NO BANCO
DE DADOS */
/* ARQUIVOS DE BACKUPS - GERALMENTE COMPOSTOS DE DBFS , CONTROLFILES ,
ARCHIVELOGS E O ARQUIVOS DE INICIALIZAÇÃO */
/* ARQUIVOS DE LOG - SÃO OS ARQUIVOS TRACE , OU .TRC , QUE SERVEM PARA MONITORAR
O BANCO DE DADOS */
/* ARQUIVOS DE ALERTA - ALERT LOGS , ARQUIVOS DE LAERTA AUTOMÁTICOS DE TODAS
AS SITUAÇÕES QUE OCORREM NO BANCO DE DADOS */
/* SGA - MEMORIA COMPARTILHADA
SHARED POOL - VERIFICA SE O COMANDO ESTÁ CORRETO
DATABASE BUFFER CACHE - ARMAZENA OS DADOS COMITADOS PELO USUÁRIO
JAVA POOL - ARMAZENA CÓDIGOS JAVA E JVM*/
/* PGA - CADA USUARIO TEM A SUA MEMORIA */
/* PROCESSOS
PMON - RESPONSABEL POR MONITORAR TODOS OS OUTROS , QUANDO UM PROCESSO TERMINA
IRREGULARMENTE , É O PMON QUE LIBERA OS DADOS LOCK E RECUPERA ESSE PROCESSO
SMON TAREFA DIVERSAS , MAS COMO PRINCIPAL , A RECUPERAÇÃO AUTOMÁTICA DA
INSTANCIA NO STARTUP
DBWRITERN - GRAVA CONTEUDOS DOS DATABASE BUFFER CACHE
RECO - RECUPERA OU FINALIZA FALHAS DE TRANSAÇÕES . SOMENTE BASES DE DADOS
DISTRIBUIDOS
LGWR - TEM QUE FAZER COMMIT PARA UMA NOVA APLICAÇÃO
*/
/* CRIANDO O BANCO DE DADOS ORACLE */
-- USUARIO DO BANCO DE DADOS
SHOW USER;
-- TABELA DUMMY
/* TUDO DO ORACLE TEM QUE VIM DE UMA TABELA */
SELECT 1 + 1 AS SOMA FROM DUAL; -- FAZER DESSA FORMA
-- VERIFICANDO O AMBIENTE
-- B023 -> 32 BITS
-- B047 -> 64 BITS
SELECT METADATA FROM SYS.KOPM$;
-- DICIONARIO DE DADOS
-- CONSULTANDO O DICIONARIO DE DADOS
SELECT * FROM DICT;
-- UNICA - RAC
SELECT PARALLEL FROM V$INSTANCE;
-- ESTRUTURA DE MEMORIA
SELECT COMPONENT , CURRENT_SIZE , MIN_SIZE, MAX_SIZE
FROM V$SGA_DYNAMIC_COMPONENTS;
-- CONECTANDO A OUTRO BANCO DE DADOS
SQLPLUS SYSTEM/SENHA@NOMEDOBANCO
ORACLE_SID=BANCO1
-- NOME DO BANCO DE DADOS
SELECT NAME FROM V$DATABASE;
--VERSÃO DO BANCO
SELECT BANNER FROM V$VERSION;
-- VERIFICAR PRIVILEGIOS DOS USUARIO
SELECT * FROM USER_SYS_PRIVS;
--TABELAS DO USUARIO
SELECT TABLE_NAME FROM USER_TABLES;
/* ARMAZENAMENTO
LOGICO - TABLESPACES -> SEGMENTOS(OBJETOS) -> EXTENSOES (ESPAÇO) -> BLOCOS
(DO SISTEMA OPERACIONAL)
FISICO -> DATAFILES
*/
/* NÃO PODEMOS DETERMINAR EM QUAL ARQUIVO FISICO UM OBJETO FICARÁ */
CREATE TABLE CURSOS (
IDCURSO INT PRIMARY KEY,
NOME VARCHAR2(30),
CARGA INT
) TABLESPACE USERS;
CREATE TABLE TESTE (
IDTESTE INT,
NOME VARCHAR2(30)
);
/* DICIONARIO DE DADOS */
SELECT TABLE_NAME, TABLESPACE_NAME
FROM USER_TABLES
SELECT TABLE_NAME, TABLESPACE_NAME
FROM USER_TABLES
WHERE TABLE_NAME = 'CURSOS';
SELECT TABLE_NAME, TABLESPACE_NAME
FROM USER_TABLES
WHERE TABLE_NAME = 'TESTE';
/* TODO OBJETO É CRIADO POR PADRÃO NA TABLESPACE USERS
EXCETO QUANDO SE ESTA LOGADO COM O USUARIO SYSTEM - ENTAO
O OBJETO SERA CRIADO NA TABLESPACE SYSTEM */
SELECT SEGMENT_NAME , SEGMENT_TYPE, TABLESPACE_NAME,
BYTES, BLOCKS, EXTENTS FROM USER_SEGMENTS;
WHERE SEGMENT_NAME = 'CURSOS';
/* FORMATAÇÃO DE COLUNAS */
COLUMN TABLESPACE_NAME FORMAT A20;
COLUMN SEGMENT_NAME FORMAT A20;
COLUMN SEGMENT_TYPE FORMAT A10;
CREATE TABLESPACE RECURSOS_HUMANOS
DATAFILE 'C:/DATA/RH_01.DBF'
SIZE 100M AUTOEXTEND
ON NEXT 100M
MAXSIZE 4096M;
SELECT TABLESPACE_NAME, FILE_NAME FROM DBA_DATA_FILES;
-- SEQUENCES
CREATE SEQUENCE SEQ_GERAL
START WITH 100
INCREMENT BY 10;
-- CRIANDO UMA TABELA NA TABLESPACE
CREATE TABLE FUNCIONARIOS(
IDFUNCIONARIO INT PRIMARY KEY,
NOME VARCHAR2(30)
)TABLESPACE RECURSOS_HUMANOS;
INSERT INTO FUNCIONARIOS VALUES (SEQ_GERAL, NEXTVAL, 'JOAO');
INSERT INTO FUNCIONARIOS VALUES (SEQ_GERAL, NEXTVAL, 'CLARA');
INSERT INTO FUNCIONARIOS VALUES (SEQ_GERAL, NEXTVAL, 'LILIAN');
SELECT * FROM FUNCIONARIOS;
-- CRIANDO TABLESPACE DE MARKETING
CREATE TABLESPACE MARKETING
DATAFILE 'C:/DATA/MKT_01.DBF'
SIZE 100M AUTOEXTEND
ON NEXT 100M
MAXSIZE 4096M;
CREATE TABLE CAMPANHAS(
IDCAMPANHA INT PRIMARY KEY,
NOME VARCHAR2(30)
)TABLESPACE MARKETING;
INSERT INTO CAMPANHAS VALUES(SEQ_GERAL.NEXTVAL, 'PRIMAVERA');
INSERT INTO CAMPANHAS VALUES(SEQ_GERAL.NEXTVAL, 'VERÃO');
INSERT INTO CAMPANHAS VALUES(SEQ_GERAL.NEXTVAL, 'INVERNO');
SELECT * FROM CAMPANHAS;
-- COLOCANDO A TS OFFLINE
ALTER TABLESPACE RECURSOS_HUMANOS OFFLINE;
--APONTAR O DICIONARIO DE DADOS
ALTER TABLESPACE RECURSOS_HUMANOS
RENAME DATAFILE 'C:/DATA/RH_01.DBF' TO 'C:/PRODUCAO/RH_01.DBF';
ALTER TABLESPACE RECURSOS_HUMANOS
RENAME DATAFILE 'C:/DATA/RH_02.DBF' TO 'C:/PRODUCAO/RH_02.DBF';
-- TORNANDO A TABLESPACE ONLINE
ALTER TABLESPACE RECURSOS_HUMANOS ONLINE
SELECT * FROM FUNCIONARIOS;
SELECT * FROM CAMPANHAS;
DROP TABLE ALUNO;
CREATE TABLE ALUNO (
IDALUNO INT PRIMARY KEY,
NOME VARCHAR2(30),
EMAIL VARCHAR2(30),
SALARIO NUMBRT(10,2)
);
/* SEQUENCE É PARECIDO COM AUTO_INCREMENT DO MYSQL E
INTITY DO SQL SERVER */
CREATE SEQUENCE SEQ_EXEMPLO;
INSERT INTO ALUNO VALUES(SEQ_EXEMPLO.NEXTVAL,'JOAO','JOAO@GMAIL.COM',1000.00);
INSERT INTO ALUNO VALUES(SEQ_EXEMPLO.NEXTVAL,'CLARA','CLARA@GMAIL.COM'2000.00);
INSERT INTO ALUNO VALUES(SEQ_EXEMPLO.NEXTVAL,'CELIA','CELIA@GMAIL.COM',3000.00);
SELECT ROWID,ROWNUM,IDALUNO, NOME , EMAIL FROM ALUNO;
SELECT NOME, EMAIL FROM ALUNO WHERE ROWNUM <= 2;
/* PROCEDURE */
CREATE OR REPLACE PROCEDURE BONUS1(
P_IDALUNO ALUNO.IDALUNO%TYPE,
P_PERCENT NUMBER)
AS
BEGIN
UPDATE ALUNO SET SALARIO = SALARIO + (SALARIO * (P_PERCENT /100))
WHERE P_IDALUNO = P_IDALUNO;
END;
/
SELECT * FROM ALUNO;
CALL BONUS (2,10);
/* TRIGGERS DEVEM TER O TAMANHO MÁXIMO DE 32K NÃO EXECUTAM
NÃO EXECUTAM COMANDOS DE DTL - COMMIT ,ROLLBACK E SAVEPOINTS
*/
CREATE OR REPLACE TRIGGER CHECK_SALARIO
BEFORE INSERT OR UPDATE ON ALUNO
FOR EACH ROW
BEGIN
IF :NEW.SALARIO > 2000 THEN
RAISE_APPLICATION_ERROR(-20000, 'VALOR INCORRETO');
END IF;
END;
/
--MOSTRA ONDE ESTÁ O ÚLTIMO ERRO
SHOW ERRORS;
INSERT INTO ALUNO VALUES(SEQ_EXEMPLO.NEXTVAL,'MAFRA','MAFRA@GMAIL.COM',100.00);
/* MOSTRANDO AS TRIGGERS QUE TEM NO BANCO E SEU CÓDIGO PARA SER REUTILIZADO */
SELECT TRIGGER_NAME AS NOME , TRIGGER_BODY AS CODIGO
FROM USER_TRIGGERS;
--TRIGGER DE EVENTOS
CREATE TABLE AUDITORIA (
DATA_LOGIN DATE,
LOGIN VARCHAR2(30)
);
CREATE OR REPLACE PROCEDURE LOGPROC IS
BEGIN
INSERT INTO AUDITORIA(DATA_LOGIN,LOGIN)
VALUES(SYSDATE, USER);
END LOGPROC;
/
SELECT USER FROM DUAL;
CREATE OR REPLACE TRIGGER LOGTRIGGER
AFTER LOGON ON DATABASE
CALL LOGPROC
--FALHA DE LOGON
CREATE OR REPLACE TRIGGER FALHA_LOGON
AFTER SERVERERROR
ON DATABASE
BEGIN
IF (IS_SERVERERROR(1017)) THEN
INSERT INTO AUDITORIA (DATA_LOGIN, LOGIN)
VALUES(SYSDATE, 'ORA-1017');
END IF;
END FALHA_LOGON;
/
-- 1004 DEFAULT USERNAME FEATUE NOT SUPPORTED
-- 1005 PASSWORD NULO
-- 1045 PRIVILEGIO INSUFICIENTE
CREATE TABLE USUARIO (
ID INT,
NOME VARCHAR2(30)
);
CREATE TABLE BKP_USER (
ID INT,
NOME VARCHAR2(30)
);
INSERT INTO USUARIO VALUES(1,'JOAO');
INSERT INTO USUARIO VALUES(2,'CLARA');
COMMIT;
SELECT * FROM USUARIO;
CREATE OR REPLACE TRIGGER LOG_USUARIO
BEFORE DELETE ON USUARIO
FOR EACH ROW
BEGIN
INSERT INTO BKP_USER VALUES
(:OLD.ID, :OLD.NOME);
END;
/
DELETE FROM USUARIO WHERE ID = 1;
SELECT * FROM BKP_USER;
-- OPERAÇÕES EM VIEWS
CREATE TABLE CLIENTE (
IDCLIENTE INT PRIMARY KEY,
NOME VARCHAR2(30),
SEXO CHAR(1)
);
INSERT INTO CLIENTE VALUES(1007, 'MAFRA', 'M');
COMMIT;
SELECT * FROM CLIENTE;
CREATE OR REPLACE VIEW V_CLIENTE
AS
SELECT IDCLIENTE, NOME, SEXO
FROM
CLIENTE;
INSERT INTO V_CLIENTE VALUES(1008,'CLARA','F');
SELECT * FROM V_CLIENTE;
CREATE OR REPLACE VIEW V_CLIENTE_RO
AS
SELECT IDCLIENTE, NOME, SEXO
FROM CLIENTE
WITH READ ONLY;
-- IMPEDE A INSERÇÃO PORQUE É SOMENTE LEITURA
INSERT INTO V_CLIENTE_RO
VALUES(1009,'LILIAN','F');
-- VIEW DE JOIN
CREATE OR REPLACE VIEW RELATORIO
AS
SELECT NOME, SEXO, NUMERO
FROM CLIENTE
INNER JOIN TELEFONE
ON IDCLIENTE = ID_CLIENTE;
-- FORCE CRIADA COM ERRO DE COMPILAÇÃO
CREATE OR REPLACE FORCE VIEW RELATORIO
AS
SELECT NOME, SEXO, NUMERO
FROM CLIENTE
INNER JOIN TELEFONE
ON IDCLIENTE = ID_CLIENTE;
SELECT * FROM RELATORIO;
CREATE TABLE TELEFONE (
IDTELEFONE INT PRIMARY KEY,
NUMERO VARCHAR2(10),
ID_CLIENTE INT
);
ALTER TABLE TELEFONE ADD CONSTRAINT FK_CLIENTE_TELEFONE
FOREIGN KEY(ID_CLIENTE) REFERENCES CLIENTE;
INSERT INTO TELEFONE VALUES (1,'34533355',1007);
SELECT * FROM RELATORIO;
-- DEFARRABLE CONSTRAINTS
CREATE TABLE FUNCIONARIO (
IDFUNCIONARIO INT CONSTRAINT PK_FUNCIONARIO PRIMARY KEY,
NOME VARCHAR2(100)
);
DROP TABLE TELEFONE;
CREATE TABLE TELEFONE (
IDTELEFONE INT PRIMARY KEY,
NUMERO VARCHAR2(10),
ID_FUNCIONARIO INT
);
ALTER TABLE TELEFONE ADD CONSTRAINT FK_TELEFONE
FOREIGN KEY(ID_FUNCIONARIO) REFERENCES FUNCIONARIO;
INSERT INTO FUNCIONARIO VALUES(2,'MARIO');
INSERT INTO TELEFONE VALUES(11,'33447766',2);
SELECT * FROM TELEFONE;
SELECT * FROM FUNCIONARIO;
/* A CONSTRAINT DE INTEGRIDADE REFERENCIAL CHECA A
INTEGRIDADE APÓS O COMANDO DE DML INSERT DELETE E UPDATE -
NÃO POSSIBILITANDO ASSIM A INSERÇÃO DE REGISTROS SEM
REFERÊNCIA */
-- VERIFICANDO O ESTADO DAS CONSTRAINTS
SELECT CONSTRAINT_NAME , DEFERRABLE , DEFERRED
FROM USER_CONSTRAINTS
WHERE TABLE_NAME IN('FUNCIONARIO','TELEFONE');
/* APAGANDO A CONSTRAINT */
ALTER TABLE TELEFONE DROP CONSTRAINT FK_TELEFONE;
/* RECRIANDO A CONSTRAINT */
ALTER TABLE TELEFONE ADD CONSTRAINT FK_TELEFONE
FOREIGN KEY(ID_FUNCIONARIO) REFERENCES FUNCIONARIO
DEFERRABLE;
SELECT CONSTRAINT_NAME , DEFERRABLE AS ATRASADA ,
DEFERRED AS VERIFICACAO
FROM USER_CONSTRAINTS
WHERE TABLE_NAME IN('FUNCIONARIO','TELEFONE');
INSERT INTO TELEFONE VALUES(4,'44558811',10);
SELECT * FROM TELEFONE;
SELECT * FROM FUNCIONARIO;
/* MUDANDO PARA A DTL */
SET CONSTRAINT ALL DEFERRED;
-- FAZ COMMIT DE QUEM NÃO ESTÁ COM INTEGRIDADE
COMMIT;
CREATE TABLE categories (
id numeric PRIMARY KEY,
name varchar
);
CREATE TABLE providers (
id numeric PRIMARY KEY,
name varchar(50),
street varchar(50),
city varchar(50),
state varchar(2)
);
CREATE TABLE products (
id numeric PRIMARY KEY,
name varchar(50),
amount numeric,
price numeric(7,2),
id_providers numeric REFERENCES providers (id),
id_categories numeric REFERENCES categories (id)
);
INSERT INTO categories (id , name)
VALUES
(1, 'old stock'),
(2, 'new stock'),
(3, 'modern'),
(4, 'commercial'),
(5, 'recyclable'),
(6, 'executive'),
(7, 'superior'),
(8, 'wood'),
(9, 'super luxury'),
(10, 'vintage');
INSERT INTO providers (id, name, street, city, state)
VALUES
(1, 'Henrique' ,'Av Brasil', 'Rio de Janeiro', 'RJ'),
(2, 'Marcelo Augusto', 'Rua Imigrantes', 'Belo Horizonte', 'MG'),
(3, 'Caroline Silva', 'Av São Paulo', 'Salvador', 'BA'),
(4, 'Guilerme Staff', 'Rua Central', 'Porto Alegre', 'RS'),
(5, 'Isabela Moraes', 'Av Juiz Grande', 'Curitiba', 'PR'),
(6, 'Francisco Accerr', 'Av Paulista', 'São Paulo', 'SP');
INSERT INTO products (id, name, amount, price, id_providers, id_categories)
VALUES
(1, 'Two-door wardrobe', 100, 800, 6, 8),
(2, 'Dining table', 1000, 560, 1, 9),
(3, 'Towel holder', 10000, 25.50, 5, 1),
(4, 'Computer desk', 350, 320.50, 4, 6),
(5, 'Chair', 3000, 210.64, 3, 6),
(6, 'Single bed', 750, 460, 1, 2);
select p.name, pr.name, pr.id_categories FROM providers p
INNER JOIN products pr
ON p.id = pr.id_providers
WHERE id_categories = 6
select p.id , p.name FROM products p
inner join categories c
on c.id = p.id_categories
WHERE c.name LIKE 'super%';
select distinct city from providers order by city;
select max(price), min(price) from products;
select c.name, sum(p.amount) as sum
from products p
inner join categories c
on c.id = p.id_categories
order by id_categories;
select avg(price), format(price 2,2) as 'price'
from products
select avg(round(price,2)) from products
SELECT ROUND(avg(convert(float, price)) * 100, 2)
from products
select m.id , m.name from movies m
inner join genres g
on m.id_genres = g.id
WHERE g.description LIKE '%action%';
select m.id, m.name from movies m
inner join prices p
on m.id_prices = p.id
where value < 2;
select c.name , r.rentals_date
from customers c
inner join rentals r
on r.id_customers = c.id
where extract
(month from rentals_date) = 9
and extract (year from rentals_date) = 2016;
select distinct city from customers;
select c.id,c.name from customers c
inner join location l
on c.id = l.id_customers
where l.location_date = is null;
select p.name , pr.name from products p
inner join providers pr
on p.id_providers = pr.id
where pr.name LIKE '%Ajax SA%';
select p.name , pr.name, c.name
from products p
inner join providers pr
on p.id_providers = pr.id
inner join categories c
on c.id = p.id_categories
where pr.name LIKE '%Sansul SA%' and
c.name LIKE '%Imported%';
select p.name , pr.name, p.price
from products p
inner join providers pr
on p.id_providers = pr.id
inner join categories c
on c.id = p.id_categories
where p.price > 1000 and
c.name LIKE '%Super Luxury%';
select c.name , o.id
from customers c
inner join orders o
on o.id_customers = c.id
where o.orders_date between
TO_DATE('2016/01/01','yyyy/mm/dd') and
TO_DATE('2016/06/30','yyyy/mm/dd');
select p.name
from products p
inner join providers pr
on p.id_providers = pr.id
where pr.name LIKE 'P%'
and p.amount BETWEEN 10 AND 20;
select c.name
from customers c
inner join legal_person l
on c.id = l.id_customers
where l.cnpj is not null
select p.name , c.name
from products p
inner join categories c
on p.id_categories = c.id
where
p.amount > 100 and
p.id_categories in(1,2,3,6 or 9)
order by p.id_categories asc;
select count(distinct city) from customers;
SELECT SUBSTRING(cpf,1,3) FROM natural_person where LEN(documento) = 11
|
drop table winner;
CREATE TABLE winner
(
id INTEGER NOT NULL PRIMARY KEY,
name TEXT NOT NULL,
how INTEGER NOT NULL,
'when' TEXT NOT NULL DEFAULT (datetime('now','localtime'))
)
|
CREATE PROCEDURE [dbo].[usp_sqlwatch_internal_run_job]
@job_name sysname,
@fail_on_error bit = 1
as
set nocount on ;
declare @job_id uniqueidentifier,
@job_owner sysname;
declare @xp_results table (
job_id UNIQUEIDENTIFIER NOT NULL,
last_run_date INT NOT NULL,
last_run_time INT NOT NULL,
next_run_date INT NOT NULL,
next_run_time INT NOT NULL,
next_run_schedule_id INT NOT NULL,
requested_to_run INT NOT NULL, -- BOOL
request_source INT NOT NULL,
request_source_id sysname COLLATE database_default NULL,
running INT NOT NULL, -- BOOL
current_step INT NOT NULL,
current_retry_attempt INT NOT NULL,
job_state INT NOT NULL);
select @job_id = job_id, @job_owner = owner_sid
from msdb.dbo.sysjobs where name = @job_name;
insert into @xp_results
exec master.dbo.xp_sqlagent_enum_jobs 1, @job_owner, @job_id;
if exists (select top 1 * FROM @xp_results where running = 1)
begin
--job is running, quit
raiserror('Job ''%s'' is already running.',10, 1, @job_name);
return;
end
declare @startime datetime2(7) = current_timestamp;
exec msdb.dbo.sp_start_job @job_name = @job_name;
waitfor delay '00:00:01'; --without it we get incorrect results from enum_jobs as it does not register immedially
insert into @xp_results
exec master.dbo.xp_sqlagent_enum_jobs 1, @job_owner, @job_id;
while exists (select * from @xp_results where running = 1)
begin
waitfor delay '00:00:00.500';
delete from @xp_results;
insert into @xp_results
exec master.dbo.xp_sqlagent_enum_jobs 1, @job_owner, @job_id;
end
if (select top 1 run_status
from msdb.dbo.sysjobhistory
where job_id = @job_id and step_id = 0
order by run_date desc, run_time desc) = 1
begin
Print 'Job ''' + @job_name + ''' finished successfully in ' + convert(varchar(1000),datediff(millisecond,@startime,current_timestamp)) + 'ms.';
end
else
begin
declare @msg nvarchar(512);
set @msg = 'Job ' + quotename(@job_name) + ' has not finished successfuly or the state is not known. This does not necessarily mean that the job has failed.';
if @fail_on_error = 1
begin
raiserror(@msg,16, 1, @job_name);
end
else
begin
print @msg;
end;
end;
|
CREATE INDEX idx_round_product_round_id ON vetd.round_product (round_id)
|
-- Insert security deposit return test data for lease id = 2
INSERT INTO [dbo].[PIMS_SECURITY_DEPOSIT_RETURN]
(
[LEASE_ID]
,[SECURITY_DEPOSIT_TYPE_CODE]
,[TERMINATION_DATE]
,[DEPOSIT_TOTAL]
,[CLAIMS_AGAINST]
,[RETURN_AMOUNT]
,[RETURN_DATE]
,[CHEQUE_NUMBER]
,[PAYEE_NAME]
,[PAYEE_ADDRESS]
,[CONCURRENCY_CONTROL_NUMBER]
)
VALUES
(
2
, 'PET'
, GETDATE()
, 1000
, 500
, 250
, GETDATE()
, '1234'
, 'Chester Tester'
, '1234 Fake St.'
, 1
),
(
2
, 'SECURITY'
, GETDATE()
, 1230
, 500
, 270
, GETDATE()
, '1234'
, 'Les McTester'
, '1234 Faker St.'
, 1
)
|
CREATE TABLE [dbo].[Standard_Import]
(
[StandardUId] VARCHAR(20) PRIMARY KEY,
[IfateReferenceNumber] VARCHAR(10) NOT NULL,
[LarsCode] INT NULL,
[Status] VARCHAR(100) NOT NULL,
[VersionEarliestStartDate] DATETIME NULL,
[VersionLatestStartDate] DATETIME NULL,
[VersionLatestEndDate] DATETIME NULL,
[Title] VARCHAR(1000) NOT NULL,
[Level] INT NOT NULL,
[ProposedTypicalDuration] INT NOT NULL,
[ProposedMaxFunding] INT NOT NULL,
[IntegratedDegree] VARCHAR(100) NULL,
[OverviewOfRole] VARCHAR(MAX) NOT NULL,
[RouteCode] INT NOT NULL DEFAULT 0,
[AssessmentPlanUrl] VARCHAR(500) NULL,
[ApprovedForDelivery] DATETIME NULL,
[TrailBlazerContact] VARCHAR(200) NULL,
[EqaProviderName] VARCHAR(200) NULL,
[EqaProviderContactName] VARCHAR(200) NULL,
[EqaProviderContactEmail] VARCHAR(200) NULL,
[EqaProviderWebLink] VARCHAR(500) NULL,
[Keywords] VARCHAR(MAX) NULL,
[TypicalJobTitles] VARCHAR(MAX) NULL,
[StandardPageUrl] VARCHAR(500) NOT NULL,
[Version] VARCHAR(20) NULL,
[RegulatedBody] VARCHAR(1000) NULL,
[Skills] NVARCHAR(MAX) NULL,
[Knowledge] NVARCHAR(MAX) NULL,
[Behaviours] NVARCHAR(MAX) NULL,
[Duties] NVARCHAR(MAX) NULL,
[CoreDuties] NVARCHAR(MAX) NULL,
[CoreAndOptions] BIT NOT NULL DEFAULT 0,
[IntegratedApprenticeship] BIT NOT NULL DEFAULT 0,
[Options] NVARCHAR(MAX) NULL,
[OptionsUnstructuredTemplate] NVARCHAR(MAX) NULL,
[CreatedDate] DATETIME NULL,
[EPAChanged] BIT NOT NULL DEFAULT 0,
[VersionMajor] INT NOT NULL DEFAULT 0,
[VersionMinor] INT NOT NULL DEFAULT 0,
CONSTRAINT [AK_StandardImport_Column] UNIQUE ([StandardUId])
)
GO
|
CREATE OR REPLACE VIEW roles_overview AS
SELECT
r.app_id AS out_app_id,
r.role_id AS out_role_id,
--
r.app_id,
r.role_id,
r.role_name,
r.role_group,
r.description_,
r.is_active,
r.order#,
--
u.count_users,
--
r.updated_by,
r.updated_at
FROM roles r
LEFT JOIN (
SELECT
u.role_id,
COUNT(*) AS count_users
FROM user_roles u
WHERE u.app_id = app.get_app_id()
GROUP BY u.role_id
) u
ON u.role_id = r.role_id
WHERE r.app_id = app.get_app_id();
--
COMMENT ON TABLE roles_overview IS '[CORE - DASHBOARD] Roles';
|
-- 菜单
CREATE TABLE sys_menu (
menu_id NUMBER(20, 0) NOT NULL,
parent_id NUMBER(20, 0) NOT NULL,
name varchar2(50),
url varchar2(200),
perms varchar2(500),
type NUMBER(2, 0),
icon varchar2(50),
order_num int,
PRIMARY KEY (menu_id)
);
-- 部门
CREATE TABLE sys_dept (
dept_id NUMBER(20, 0) NOT NULL,
parent_id NUMBER(20, 0) NOT NULL,
name varchar2(50),
order_num NUMBER(10, 0) NOT NULL,
del_flag NUMBER(2, 0) DEFAULT 0 NOT NULL,
PRIMARY KEY (dept_id)
);
-- 系统用户
CREATE TABLE sys_user (
user_id NUMBER(20, 0) NOT NULL,
username varchar2(50) NOT NULL,
password varchar2(100),
salt varchar2(20),
email varchar2(100),
mobile varchar2(100),
status NUMBER(2, 0) NOT NULL,
dept_id NUMBER(20, 0),
create_time timestamp,
PRIMARY KEY (user_id)
);
CREATE UNIQUE INDEX index_username on sys_user(username);
-- 角色
CREATE TABLE sys_role (
role_id NUMBER(20, 0) NOT NULL,
role_name varchar2(100),
remark varchar2(100),
dept_id NUMBER(20, 0) NOT NULL,
create_time timestamp,
PRIMARY KEY (role_id)
);
-- 用户与角色对应关系
CREATE TABLE sys_user_role (
id NUMBER(20, 0) NOT NULL,
user_id NUMBER(20, 0) NOT NULL,
role_id NUMBER(20, 0) NOT NULL,
PRIMARY KEY (id)
);
-- 角色与菜单对应关系
CREATE TABLE sys_role_menu (
id NUMBER(20, 0) NOT NULL,
role_id NUMBER(20, 0) NOT NULL,
menu_id NUMBER(20, 0) NOT NULL,
PRIMARY KEY (id)
);
-- 角色与部门对应关系
CREATE TABLE sys_role_dept (
id NUMBER(20, 0) NOT NULL,
role_id NUMBER(20, 0) NOT NULL,
dept_id NUMBER(20, 0) NOT NULL,
PRIMARY KEY (id)
);
-- 系统配置信息
CREATE TABLE sys_config (
id NUMBER(20, 0) NOT NULL,
param_key varchar2(50),
param_value varchar2(4000),
status NUMBER(2, 0) DEFAULT 1 NOT NULL,
remark varchar2(500),
PRIMARY KEY (id)
);
CREATE UNIQUE INDEX index_param_key on sys_config(param_key);
-- 数据字典
CREATE TABLE sys_dict (
id NUMBER(20, 0) NOT NULL,
name varchar2(100) NOT NULL,
type varchar2(100) NOT NULL,
code varchar2(100) NOT NULL,
value varchar2(1000) NOT NULL,
order_num NUMBER(10, 0) DEFAULT 0 NOT NULL,
remark varchar2(255),
del_flag NUMBER(2, 0) DEFAULT 0 NOT NULL,
PRIMARY KEY (id)
);
CREATE UNIQUE INDEX index_type_code on sys_dict(type, code);
-- 系统日志
CREATE TABLE sys_log (
id NUMBER(20, 0) NOT NULL,
username varchar2(50),
operation varchar2(50),
method varchar2(200),
params clob,
time NUMBER(20, 0) NOT NULL,
ip varchar2(64),
create_date timestamp,
PRIMARY KEY (id)
);
-- 文件上传
CREATE TABLE sys_oss (
id NUMBER(20, 0) NOT NULL,
url varchar2(200),
create_date timestamp,
PRIMARY KEY (id)
);
-- 定时任务
CREATE TABLE schedule_job (
job_id NUMBER(20, 0) NOT NULL,
bean_name varchar2(200),
params varchar2(2000),
cron_expression varchar2(100),
status NUMBER(2, 0) NOT NULL,
remark varchar2(255),
create_time timestamp,
PRIMARY KEY (job_id)
);
-- 定时任务日志
CREATE TABLE schedule_job_log (
log_id NUMBER(20, 0) NOT NULL,
job_id NUMBER(20, 0) NOT NULL,
bean_name varchar2(200),
params varchar2(2000),
status NUMBER(2, 0) NOT NULL,
error varchar2(2000),
times NUMBER(10, 0) NOT NULL,
create_time timestamp,
PRIMARY KEY (log_id)
);
CREATE INDEX index_job_id on schedule_job_log(job_id);
-- 初始数据
INSERT INTO sys_user (user_id, username, password, salt, email, mobile, status, dept_id, create_time) VALUES ('1', 'admin', 'e1153123d7d180ceeb820d577ff119876678732a68eef4e6ffc0b1f06a01f91b', 'YzcmCZNvbXocrsz9dm8e', 'root@draftex', '13612345678', '1', '1', CURRENT_DATE);
INSERT INTO sys_menu (menu_id, parent_id, name, url, perms, type, icon, order_num) VALUES ('1', '0', '系统管理', NULL, NULL, '0', 'fa fa-cog', '0');
INSERT INTO sys_menu (menu_id, parent_id, name, url, perms, type, icon, order_num) VALUES ('2', '1', '管理员管理', 'modules/sys/user.html', NULL, '1', 'fa fa-user', '1');
INSERT INTO sys_menu (menu_id, parent_id, name, url, perms, type, icon, order_num) VALUES ('3', '1', '角色管理', 'modules/sys/role.html', NULL, '1', 'fa fa-user-secret', '2');
INSERT INTO sys_menu (menu_id, parent_id, name, url, perms, type, icon, order_num) VALUES ('4', '1', '菜单管理', 'modules/sys/menu.html', NULL, '1', 'fa fa-th-list', '3');
INSERT INTO sys_menu (menu_id, parent_id, name, url, perms, type, icon, order_num) VALUES ('5', '1', 'SQL监控', 'druid/sql.html', NULL, '1', 'fa fa-bug', '4');
-- 初始化菜单数据
INSERT INTO sys_menu (menu_id, parent_id, name, url, perms, type, icon, order_num) VALUES ('6', '1', '定时任务', 'modules/job/schedule.html', NULL, '1', 'fa fa-tasks', '5');
INSERT INTO sys_menu (menu_id, parent_id, name, url, perms, type, icon, order_num) VALUES ('7', '6', '查看', NULL, 'sys:schedule:list,sys:schedule:info', '2', NULL, '0');
INSERT INTO sys_menu (menu_id, parent_id, name, url, perms, type, icon, order_num) VALUES ('8', '6', '新增', NULL, 'sys:schedule:save', '2', NULL, '0');
INSERT INTO sys_menu (menu_id, parent_id, name, url, perms, type, icon, order_num) VALUES ('9', '6', '修改', NULL, 'sys:schedule:update', '2', NULL, '0');
INSERT INTO sys_menu (menu_id, parent_id, name, url, perms, type, icon, order_num) VALUES ('10', '6', '删除', NULL, 'sys:schedule:delete', '2', NULL, '0');
INSERT INTO sys_menu (menu_id, parent_id, name, url, perms, type, icon, order_num) VALUES ('11', '6', '暂停', NULL, 'sys:schedule:pause', '2', NULL, '0');
INSERT INTO sys_menu (menu_id, parent_id, name, url, perms, type, icon, order_num) VALUES ('12', '6', '恢复', NULL, 'sys:schedule:resume', '2', NULL, '0');
INSERT INTO sys_menu (menu_id, parent_id, name, url, perms, type, icon, order_num) VALUES ('13', '6', '立即执行', NULL, 'sys:schedule:run', '2', NULL, '0');
INSERT INTO sys_menu (menu_id, parent_id, name, url, perms, type, icon, order_num) VALUES ('14', '6', '日志列表', NULL, 'sys:schedule:log', '2', NULL, '0');
INSERT INTO sys_menu (menu_id, parent_id, name, url, perms, type, icon, order_num) VALUES ('15', '2', '查看', NULL, 'sys:user:list,sys:user:info', '2', NULL, '0');
INSERT INTO sys_menu (menu_id, parent_id, name, url, perms, type, icon, order_num) VALUES ('16', '2', '新增', NULL, 'sys:user:save,sys:role:select', '2', NULL, '0');
INSERT INTO sys_menu (menu_id, parent_id, name, url, perms, type, icon, order_num) VALUES ('17', '2', '修改', NULL, 'sys:user:update,sys:role:select', '2', NULL, '0');
INSERT INTO sys_menu (menu_id, parent_id, name, url, perms, type, icon, order_num) VALUES ('18', '2', '删除', NULL, 'sys:user:delete', '2', NULL, '0');
INSERT INTO sys_menu (menu_id, parent_id, name, url, perms, type, icon, order_num) VALUES ('19', '3', '查看', NULL, 'sys:role:list,sys:role:info', '2', NULL, '0');
INSERT INTO sys_menu (menu_id, parent_id, name, url, perms, type, icon, order_num) VALUES ('20', '3', '新增', NULL, 'sys:role:save,sys:menu:perms', '2', NULL, '0');
INSERT INTO sys_menu (menu_id, parent_id, name, url, perms, type, icon, order_num) VALUES ('21', '3', '修改', NULL, 'sys:role:update,sys:menu:perms', '2', NULL, '0');
INSERT INTO sys_menu (menu_id, parent_id, name, url, perms, type, icon, order_num) VALUES ('22', '3', '删除', NULL, 'sys:role:delete', '2', NULL, '0');
INSERT INTO sys_menu (menu_id, parent_id, name, url, perms, type, icon, order_num) VALUES ('23', '4', '查看', NULL, 'sys:menu:list,sys:menu:info', '2', NULL, '0');
INSERT INTO sys_menu (menu_id, parent_id, name, url, perms, type, icon, order_num) VALUES ('24', '4', '新增', NULL, 'sys:menu:save,sys:menu:select', '2', NULL, '0');
INSERT INTO sys_menu (menu_id, parent_id, name, url, perms, type, icon, order_num) VALUES ('25', '4', '修改', NULL, 'sys:menu:update,sys:menu:select', '2', NULL, '0');
INSERT INTO sys_menu (menu_id, parent_id, name, url, perms, type, icon, order_num) VALUES ('26', '4', '删除', NULL, 'sys:menu:delete', '2', NULL, '0');
INSERT INTO sys_menu (menu_id, parent_id, name, url, perms, type, icon, order_num) VALUES ('27', '1', '参数管理', 'modules/sys/config.html', 'sys:config:list,sys:config:info,sys:config:save,sys:config:update,sys:config:delete', '1', 'fa fa-sun-o', '6');
INSERT INTO sys_menu (menu_id, parent_id, name, url, perms, type, icon, order_num) VALUES ('29', '1', '系统日志', 'modules/sys/log.html', 'sys:log:list', '1', 'fa fa-file-text-o', '7');
INSERT INTO sys_menu (menu_id, parent_id, name, url, perms, type, icon, order_num) VALUES ('31', '1', '部门管理', 'modules/sys/dept.html', NULL, '1', 'fa fa-file-code-o', '1');
INSERT INTO sys_menu (menu_id, parent_id, name, url, perms, type, icon, order_num) VALUES ('32', '31', '查看', NULL, 'sys:dept:list,sys:dept:info', '2', NULL, '0');
INSERT INTO sys_menu (menu_id, parent_id, name, url, perms, type, icon, order_num) VALUES ('33', '31', '新增', NULL, 'sys:dept:save,sys:dept:select', '2', NULL, '0');
INSERT INTO sys_menu (menu_id, parent_id, name, url, perms, type, icon, order_num) VALUES ('34', '31', '修改', NULL, 'sys:dept:update,sys:dept:select', '2', NULL, '0');
INSERT INTO sys_menu (menu_id, parent_id, name, url, perms, type, icon, order_num) VALUES ('35', '31', '删除', NULL, 'sys:dept:delete', '2', NULL, '0');
INSERT INTO sys_menu(menu_id, parent_id, name, url, perms, type, icon, order_num) VALUES (36, 1, '字典管理', 'modules/sys/dict.html', NULL, 1, 'fa fa-bookmark-o', 6);
INSERT INTO sys_menu(menu_id, parent_id, name, url, perms, type, icon, order_num) VALUES (37, 36, '查看', NULL, 'sys:dict:list,sys:dict:info', 2, NULL, 6);
INSERT INTO sys_menu(menu_id, parent_id, name, url, perms, type, icon, order_num) VALUES (38, 36, '新增', NULL, 'sys:dict:save', 2, NULL, 6);
INSERT INTO sys_menu(menu_id, parent_id, name, url, perms, type, icon, order_num) VALUES (39, 36, '修改', NULL, 'sys:dict:update', 2, NULL, 6);
INSERT INTO sys_menu(menu_id, parent_id, name, url, perms, type, icon, order_num) VALUES (40, 36, '删除', NULL, 'sys:dict:delete', 2, NULL, 6);
INSERT INTO sys_menu (menu_id, parent_id, name, url, perms, type, icon, order_num) VALUES ('30', '1', '文件上传', 'modules/oss/oss.html', 'sys:oss:all', '1', 'fa fa-file-image-o', '6');
INSERT INTO sys_dept (dept_id, parent_id, name, order_num, del_flag) VALUES ('1', '0', '有票么集团', '0', '0');
INSERT INTO sys_dept (dept_id, parent_id, name, order_num, del_flag) VALUES ('2', '1', '长沙分公司', '1', '0');
INSERT INTO sys_dept (dept_id, parent_id, name, order_num, del_flag) VALUES ('3', '1', '上海分公司', '2', '0');
INSERT INTO sys_dept (dept_id, parent_id, name, order_num, del_flag) VALUES ('4', '3', '技术部', '0', '0');
INSERT INTO sys_dept (dept_id, parent_id, name, order_num, del_flag) VALUES ('5', '3', '销售部', '1', '0');
INSERT INTO sys_dict(id, name, type, code, value, order_num, remark, del_flag) VALUES (1, '性别', 'sex', '0', '女', 0, NULL, 0);
INSERT INTO sys_dict(id, name, type, code, value, order_num, remark, del_flag) VALUES (2, '性别', 'sex', '1', '男', 1, NULL, 0);
INSERT INTO sys_dict(id, name, type, code, value, order_num, remark, del_flag) VALUES (3, '性别', 'sex', '2', '未知', 3, NULL, 0);
INSERT INTO sys_config (id, param_key, param_value, status, remark) VALUES (1, 'CLOUD_STORAGE_CONFIG_KEY', '{"aliyunAccessKeyId":"","aliyunAccessKeySecret":"","aliyunBucketName":"","aliyunDomain":"","aliyunEndPoint":"","aliyunPrefix":"","qcloudBucketName":"","qcloudDomain":"","qcloudPrefix":"","qcloudSecretId":"","qcloudSecretKey":"","qiniuAccessKey":"NrgMfABZxWLo5B-YYSjoE8-AZ1EISdi1Z3ubLOeZ","qiniuBucketName":"mall","qiniuDomain":"http://7xlij2.com1.z0.glb.clouddn.com","qiniuPrefix":"upload","qiniuSecretKey":"uIwJHevMRWU0VLxFvgy0tAcOdGqasdtVlJkdy6vV","type":1}', '0', '云存储配置信息');
INSERT INTO schedule_job (job_id, bean_name, params, cron_expression, status, remark, create_time) VALUES (1, 'testTask', 'platform', '0 0/30 * * * ?', '0', '参数测试', CURRENT_DATE);
-- quartz自带表结构
CREATE TABLE qrtz_job_details
(
SCHED_NAME VARCHAR2(120) NOT NULL,
JOB_NAME VARCHAR2(200) NOT NULL,
JOB_GROUP VARCHAR2(200) NOT NULL,
DESCRIPTION VARCHAR2(250) NULL,
JOB_CLASS_NAME VARCHAR2(250) NOT NULL,
IS_DURABLE VARCHAR2(1) NOT NULL,
IS_NONCONCURRENT VARCHAR2(1) NOT NULL,
IS_UPDATE_DATA VARCHAR2(1) NOT NULL,
REQUESTS_RECOVERY VARCHAR2(1) NOT NULL,
JOB_DATA BLOB NULL,
CONSTRAINT QRTZ_JOB_DETAILS_PK PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
);
CREATE TABLE qrtz_triggers
(
SCHED_NAME VARCHAR2(120) NOT NULL,
TRIGGER_NAME VARCHAR2(200) NOT NULL,
TRIGGER_GROUP VARCHAR2(200) NOT NULL,
JOB_NAME VARCHAR2(200) NOT NULL,
JOB_GROUP VARCHAR2(200) NOT NULL,
DESCRIPTION VARCHAR2(250) NULL,
NEXT_FIRE_TIME NUMBER(13) NULL,
PREV_FIRE_TIME NUMBER(13) NULL,
PRIORITY NUMBER(13) NULL,
TRIGGER_STATE VARCHAR2(16) NOT NULL,
TRIGGER_TYPE VARCHAR2(8) NOT NULL,
START_TIME NUMBER(13) NOT NULL,
END_TIME NUMBER(13) NULL,
CALENDAR_NAME VARCHAR2(200) NULL,
MISFIRE_INSTR NUMBER(2) NULL,
JOB_DATA BLOB NULL,
CONSTRAINT QRTZ_TRIGGERS_PK PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
CONSTRAINT QRTZ_TRIGGER_TO_JOBS_FK FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
);
CREATE TABLE qrtz_simple_triggers
(
SCHED_NAME VARCHAR2(120) NOT NULL,
TRIGGER_NAME VARCHAR2(200) NOT NULL,
TRIGGER_GROUP VARCHAR2(200) NOT NULL,
REPEAT_COUNT NUMBER(7) NOT NULL,
REPEAT_INTERVAL NUMBER(12) NOT NULL,
TIMES_TRIGGERED NUMBER(10) NOT NULL,
CONSTRAINT QRTZ_SIMPLE_TRIG_PK PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
CONSTRAINT QRTZ_SIMPLE_TRIG_TO_TRIG_FK FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
);
CREATE TABLE qrtz_cron_triggers
(
SCHED_NAME VARCHAR2(120) NOT NULL,
TRIGGER_NAME VARCHAR2(200) NOT NULL,
TRIGGER_GROUP VARCHAR2(200) NOT NULL,
CRON_EXPRESSION VARCHAR2(120) NOT NULL,
TIME_ZONE_ID VARCHAR2(80),
CONSTRAINT QRTZ_CRON_TRIG_PK PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
CONSTRAINT QRTZ_CRON_TRIG_TO_TRIG_FK FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
);
CREATE TABLE qrtz_simprop_triggers
(
SCHED_NAME VARCHAR2(120) NOT NULL,
TRIGGER_NAME VARCHAR2(200) NOT NULL,
TRIGGER_GROUP VARCHAR2(200) NOT NULL,
STR_PROP_1 VARCHAR2(512) NULL,
STR_PROP_2 VARCHAR2(512) NULL,
STR_PROP_3 VARCHAR2(512) NULL,
INT_PROP_1 NUMBER(10) NULL,
INT_PROP_2 NUMBER(10) NULL,
LONG_PROP_1 NUMBER(13) NULL,
LONG_PROP_2 NUMBER(13) NULL,
DEC_PROP_1 NUMERIC(13,4) NULL,
DEC_PROP_2 NUMERIC(13,4) NULL,
BOOL_PROP_1 VARCHAR2(1) NULL,
BOOL_PROP_2 VARCHAR2(1) NULL,
CONSTRAINT QRTZ_SIMPROP_TRIG_PK PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
CONSTRAINT QRTZ_SIMPROP_TRIG_TO_TRIG_FK FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
);
CREATE TABLE qrtz_blob_triggers
(
SCHED_NAME VARCHAR2(120) NOT NULL,
TRIGGER_NAME VARCHAR2(200) NOT NULL,
TRIGGER_GROUP VARCHAR2(200) NOT NULL,
BLOB_DATA BLOB NULL,
CONSTRAINT QRTZ_BLOB_TRIG_PK PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
CONSTRAINT QRTZ_BLOB_TRIG_TO_TRIG_FK FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
);
CREATE TABLE qrtz_calendars
(
SCHED_NAME VARCHAR2(120) NOT NULL,
CALENDAR_NAME VARCHAR2(200) NOT NULL,
CALENDAR BLOB NOT NULL,
CONSTRAINT QRTZ_CALENDARS_PK PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
);
CREATE TABLE qrtz_paused_trigger_grps
(
SCHED_NAME VARCHAR2(120) NOT NULL,
TRIGGER_GROUP VARCHAR2(200) NOT NULL,
CONSTRAINT QRTZ_PAUSED_TRIG_GRPS_PK PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
);
CREATE TABLE qrtz_fired_triggers
(
SCHED_NAME VARCHAR2(120) NOT NULL,
ENTRY_ID VARCHAR2(95) NOT NULL,
TRIGGER_NAME VARCHAR2(200) NOT NULL,
TRIGGER_GROUP VARCHAR2(200) NOT NULL,
INSTANCE_NAME VARCHAR2(200) NOT NULL,
FIRED_TIME NUMBER(13) NOT NULL,
SCHED_TIME NUMBER(13) NOT NULL,
PRIORITY NUMBER(13) NOT NULL,
STATE VARCHAR2(16) NOT NULL,
JOB_NAME VARCHAR2(200) NULL,
JOB_GROUP VARCHAR2(200) NULL,
IS_NONCONCURRENT VARCHAR2(1) NULL,
REQUESTS_RECOVERY VARCHAR2(1) NULL,
CONSTRAINT QRTZ_FIRED_TRIGGER_PK PRIMARY KEY (SCHED_NAME,ENTRY_ID)
);
CREATE TABLE qrtz_scheduler_state
(
SCHED_NAME VARCHAR2(120) NOT NULL,
INSTANCE_NAME VARCHAR2(200) NOT NULL,
LAST_CHECKIN_TIME NUMBER(13) NOT NULL,
CHECKIN_INTERVAL NUMBER(13) NOT NULL,
CONSTRAINT QRTZ_SCHEDULER_STATE_PK PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
);
CREATE TABLE qrtz_locks
(
SCHED_NAME VARCHAR2(120) NOT NULL,
LOCK_NAME VARCHAR2(40) NOT NULL,
CONSTRAINT QRTZ_LOCKS_PK PRIMARY KEY (SCHED_NAME,LOCK_NAME)
);
create index idx_qrtz_j_req_recovery on qrtz_job_details(SCHED_NAME,REQUESTS_RECOVERY);
create index idx_qrtz_j_grp on qrtz_job_details(SCHED_NAME,JOB_GROUP);
create index idx_qrtz_t_j on qrtz_triggers(SCHED_NAME,JOB_NAME,JOB_GROUP);
create index idx_qrtz_t_jg on qrtz_triggers(SCHED_NAME,JOB_GROUP);
create index idx_qrtz_t_c on qrtz_triggers(SCHED_NAME,CALENDAR_NAME);
create index idx_qrtz_t_g on qrtz_triggers(SCHED_NAME,TRIGGER_GROUP);
create index idx_qrtz_t_state on qrtz_triggers(SCHED_NAME,TRIGGER_STATE);
create index idx_qrtz_t_n_state on qrtz_triggers(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_STATE);
create index idx_qrtz_t_n_g_state on qrtz_triggers(SCHED_NAME,TRIGGER_GROUP,TRIGGER_STATE);
create index idx_qrtz_t_next_fire_time on qrtz_triggers(SCHED_NAME,NEXT_FIRE_TIME);
create index idx_qrtz_t_nft_st on qrtz_triggers(SCHED_NAME,TRIGGER_STATE,NEXT_FIRE_TIME);
create index idx_qrtz_t_nft_misfire on qrtz_triggers(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME);
create index idx_qrtz_t_nft_st_misfire on qrtz_triggers(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_STATE);
create index idx_qrtz_t_nft_st_misfire_grp on qrtz_triggers(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_GROUP,TRIGGER_STATE);
create index idx_qrtz_ft_trig_inst_name on qrtz_fired_triggers(SCHED_NAME,INSTANCE_NAME);
create index idx_qrtz_ft_inst_job_req_rcvry on qrtz_fired_triggers(SCHED_NAME,INSTANCE_NAME,REQUESTS_RECOVERY);
create index idx_qrtz_ft_j_g on qrtz_fired_triggers(SCHED_NAME,JOB_NAME,JOB_GROUP);
create index idx_qrtz_ft_jg on qrtz_fired_triggers(SCHED_NAME,JOB_GROUP);
create index idx_qrtz_ft_t_g on qrtz_fired_triggers(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP);
create index idx_qrtz_ft_tg on qrtz_fired_triggers(SCHED_NAME,TRIGGER_GROUP);
|
explain plan for select c1, c2, c3 from dfs.drillTestDir.`parquet_storage/DRILL_6174/DRILL_6174_test_data` where c2 = false and c3 is not null;
|
--====================================================================================================================================
--============================================= DROP TABLE [dbo].[Customer] ==========================================================
--====================================================================================================================================
USE [POC_GrpcTest]
IF OBJECT_ID('dbo.Customer', 'U') IS NOT NULL
DROP TABLE dbo.Customer
|
-- create database
create user '${MYSQL_USER}'@'localhost' identified by 'password';
create database if not exists ${MYSQL_DB_NAME};
grant all privileges on `${MYSQL_DB_NAME}`.* to 'myUser'@'localhost';
flush privileges;
-- create liquibase user
grant all privileges on `${MYSQL_DB_NAME}`.* to 'liquibase'@'localhost';
flush privileges;
|
-- DROP USER LJSA CASCADE;
-- DROP TABLESPACE LJSA_DATA INCLUDING CONTENTS AND DATAFILES;
-- DROP TABLESPACE LJSA_TEMP INCLUDING CONTENTS AND DATAFILES;
-- SELECT * FROM v$version;
CREATE TABLESPACE LJSA_DATA DATAFILE '/u02/app/oracle/oradata/ORCL/LJSA_DATA.dbf' SIZE 20M REUSE AUTOEXTEND ON NEXT 512K MAXSIZE 8192M;
CREATE TEMPORARY TABLESPACE LJSA_TEMP TEMPFILE '/u02/app/oracle/oradata/ORCL/LJSA_TEMP.dbf' SIZE 5M AUTOEXTEND ON;
-- SELECT * FROM V$DATAFILE
-- alter system set DEFERRED_SEGMENT_CREATION=FALSE scope=both; // To include empty tables in export
-- To create user LJSA without prefix C## in Oracle 12:
ALTER SESSION SET "_ORACLE_SCRIPT"=true;
-- USER SQL
CREATE USER LJSA IDENTIFIED BY PASS123 DEFAULT TABLESPACE "LJSA_DATA" TEMPORARY TABLESPACE "LJSA_TEMP";
-- ROLE
GRANT "RESOURCE" TO LJSA WITH ADMIN OPTION;
GRANT "CONNECT" TO LJSA WITH ADMIN OPTION;
ALTER USER LJSA DEFAULT ROLE "RESOURCE","CONNECT";
-- SYSTEM PRIVILEGES
GRANT CREATE SESSION TO LJSA WITH ADMIN OPTION;
GRANT CREATE TABLE TO LJSA WITH ADMIN OPTION;
GRANT CREATE PROCEDURE TO LJSA WITH ADMIN OPTION;
GRANT CREATE SEQUENCE TO LJSA WITH ADMIN OPTION;
GRANT CREATE ANY TRIGGER TO LJSA WITH ADMIN OPTION;
GRANT DROP ANY TRIGGER TO LJSA WITH ADMIN OPTION;
GRANT CREATE ANY INDEX TO LJSA WITH ADMIN OPTION;
GRANT DROP ANY INDEX TO LJSA WITH ADMIN OPTION;
GRANT CREATE ANY VIEW TO LJSA WITH ADMIN OPTION;
GRANT DROP ANY VIEW TO LJSA WITH ADMIN OPTION;
-- To prevent ora-01950 in Oracle 12:
GRANT UNLIMITED TABLESPACE TO LJSA;
-- PURGE RECYCLEBIN;
|
##查询
#macro($taskQuery(subjectCode,classId,calDate,classIds))
select t.* from class_statistics_report t where t.subject_code=:subjectCode
#if(classId)
AND t.class_id=:classId
#end
#if(classIds)
AND t.class_id in (:classIds)
#end
#if(calDate)
AND t.cal_date=:calDate
#end
#end
##查询知识点分析情况
#macro($getKnowpointAnalysis(clazzId,textbookCode,startTime,endTime))
select LEFT(d.section_code,10) section_code,d.knowledge_code,sum(b.wrong_count) wrong_count,sum(b.right_count) right_count from homework a
inner join homework_question b on a.id = b.homework_id
and a.homework_class_id = :clazzId AND a.STATUS = 3 and a.right_rate is not null
and a.start_time >= :startTime and a.start_time < :endTime
inner join question_knowledge c on b.question_id = c.question_id
inner join knowledge_section d on d.knowledge_code = c.knowledge_code and d.section_code like :textbookCode
group by LEFT(d.section_code,10),d.knowledge_code
order by LEFT(d.section_code,10)
#end
##查询章节分析情况
#macro($getSectionAnalysis(clazzId,textbookCode,startTime,endTime))
select d.section_code,sum(b.wrong_count) wrong_count,sum(b.right_count) right_count from homework a
inner join homework_question b on a.id = b.homework_id
and a.homework_class_id = :clazzId AND a.STATUS = 3 and a.right_rate is not null
and a.start_time >= :startTime and a.start_time < :endTime
inner join question_knowledge c on b.question_id = c.question_id
inner join knowledge_section d on d.knowledge_code = c.knowledge_code and d.section_code like :textbookCode
group by d.section_code
order by LEFT(d.section_code,12) asc
#end
|
create function fv.${query}_insert() returns void
language plpgsql
as
$$
declare
entries stream_lineitem[];
start_counter int := 1;
end_counter int := 0;
begin
select max(counter)
into end_counter
from base_lineitem;
while start_counter <= end_counter
loop
entries := array(
select row (l_orderkey, l_partkey, l_suppkey, l_linenumber, l_quantity, l_extendedprice, l_discount, l_tax, l_returnflag, l_linestatus , l_shipdate, l_commitdate, l_receiptdate, l_shipinstruct,l_shipmode, l_comment)::stream_lineitem
from base_lineitem
where counter >= start_counter
and counter < start_counter + ${batch_size});
perform fv.lineitem_insert(entries);
start_counter := start_counter + ${batch_size};
end loop;
end
$$;
|
CREATE SCHEMA [aspnet_Personalization_FullAccess]
AUTHORIZATION [aspnet_Personalization_FullAccess];
|
USE [master]
GO
/****** Object: Database [Multek_SZ_New] Script Date: 11/06/2014 15:47:39 ******/
CREATE DATABASE [Multek_SZ_New] ON PRIMARY
( NAME = N'Multek_SZ_New', FILENAME = N'D:\Multek_Database\Multek_SZ_New.mdf' , SIZE = 5233728KB , MAXSIZE = UNLIMITED, FILEGROWTH = 102400KB )
LOG ON
( NAME = N'Multek_SZ_New_log', FILENAME = N'D:\Multek_Database\Multek_SZ_New_log.LDF' , SIZE = 12016128KB , MAXSIZE = UNLIMITED, FILEGROWTH = 10%)
GO
ALTER DATABASE [Multek_SZ_New] SET COMPATIBILITY_LEVEL = 80
GO
IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
begin
EXEC [Multek_SZ_New].[dbo].[sp_fulltext_database] @action = 'enable'
end
GO
ALTER DATABASE [Multek_SZ_New] SET ANSI_NULL_DEFAULT OFF
GO
ALTER DATABASE [Multek_SZ_New] SET ANSI_NULLS OFF
GO
ALTER DATABASE [Multek_SZ_New] SET ANSI_PADDING OFF
GO
ALTER DATABASE [Multek_SZ_New] SET ANSI_WARNINGS OFF
GO
ALTER DATABASE [Multek_SZ_New] SET ARITHABORT OFF
GO
ALTER DATABASE [Multek_SZ_New] SET AUTO_CLOSE OFF
GO
ALTER DATABASE [Multek_SZ_New] SET AUTO_CREATE_STATISTICS ON
GO
ALTER DATABASE [Multek_SZ_New] SET AUTO_SHRINK OFF
GO
ALTER DATABASE [Multek_SZ_New] SET AUTO_UPDATE_STATISTICS ON
GO
ALTER DATABASE [Multek_SZ_New] SET CURSOR_CLOSE_ON_COMMIT OFF
GO
ALTER DATABASE [Multek_SZ_New] SET CURSOR_DEFAULT GLOBAL
GO
ALTER DATABASE [Multek_SZ_New] SET CONCAT_NULL_YIELDS_NULL OFF
GO
ALTER DATABASE [Multek_SZ_New] SET NUMERIC_ROUNDABORT OFF
GO
ALTER DATABASE [Multek_SZ_New] SET QUOTED_IDENTIFIER OFF
GO
ALTER DATABASE [Multek_SZ_New] SET RECURSIVE_TRIGGERS OFF
GO
ALTER DATABASE [Multek_SZ_New] SET DISABLE_BROKER
GO
ALTER DATABASE [Multek_SZ_New] SET AUTO_UPDATE_STATISTICS_ASYNC OFF
GO
ALTER DATABASE [Multek_SZ_New] SET DATE_CORRELATION_OPTIMIZATION OFF
GO
ALTER DATABASE [Multek_SZ_New] SET TRUSTWORTHY OFF
GO
ALTER DATABASE [Multek_SZ_New] SET ALLOW_SNAPSHOT_ISOLATION OFF
GO
ALTER DATABASE [Multek_SZ_New] SET PARAMETERIZATION SIMPLE
GO
ALTER DATABASE [Multek_SZ_New] SET READ_COMMITTED_SNAPSHOT OFF
GO
ALTER DATABASE [Multek_SZ_New] SET HONOR_BROKER_PRIORITY OFF
GO
ALTER DATABASE [Multek_SZ_New] SET READ_WRITE
GO
ALTER DATABASE [Multek_SZ_New] SET RECOVERY SIMPLE
GO
ALTER DATABASE [Multek_SZ_New] SET MULTI_USER
GO
ALTER DATABASE [Multek_SZ_New] SET PAGE_VERIFY CHECKSUM
GO
ALTER DATABASE [Multek_SZ_New] SET DB_CHAINING OFF
GO
EXEC sys.sp_db_vardecimal_storage_format N'Multek_SZ_New', N'ON'
GO
|
DROP TABLE IF EXISTS "message";
DROP TABLE IF EXISTS "template";
DROP TABLE IF EXISTS "mailer";
DROP TABLE IF EXISTS "owner";
|
/*
Forgot that we had unique constraints on the name of the metatypes/relationships - this won't
work unless we also include the ontology version number in there.
*/
ALTER TABLE metatypes DROP CONSTRAINT metatypes_container_id_name_key;
ALTER TABLE metatype_relationships DROP CONSTRAINT metatype_relationships_container_id_name_key;
ALTER TABLE metatypes ADD CONSTRAINT metatype_container_id_name_version_key UNIQUE (container_id, name, ontology_version);
ALTER TABLE metatype_relationships ADD CONSTRAINT metatype_relationship_container_id_name_version_key UNIQUE (container_id, name, ontology_version);
|
select Email
from Person
group by Email
having count(Email) > 1;
|
SELECT m.name FROM member m, checkout_item c
WHERE c.member_id = m.id
GROUP BY m.name
HAVING COUNT(c.member_id) >1
|
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.5.1
-- Dumped by pg_dump version 9.5.1
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
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 search_path = public, pg_catalog;
SET default_tablespace = '';
SET default_with_oids = false;
--
-- Name: test; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE test (
test character(5) NOT NULL,
title character varying(40) NOT NULL,
did integer NOT NULL
);
ALTER TABLE test OWNER TO postgres;
--
-- Data for Name: test; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY test (test, title, did) FROM stdin;
\.
--
-- Name: firstkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY test
ADD CONSTRAINT firstkey PRIMARY KEY (test);
--
-- Name: public; Type: ACL; Schema: -; Owner: arkel
--
REVOKE ALL ON SCHEMA public FROM PUBLIC;
REVOKE ALL ON SCHEMA public FROM arkel;
GRANT ALL ON SCHEMA public TO arkel;
GRANT ALL ON SCHEMA public TO PUBLIC;
--
-- PostgreSQL database dump complete
--
|
# Write your MySQL query statement below
select Name as Customers from Customers where Id not in
(select distinct CustomerId from Orders);
|
CREATE TABLE users
(
password TEXT NOT NULL,
username TEXT NOT NULL,
token TEXT,
CONSTRAINT username PRIMARY KEY (username)
);
CREATE TABLE files
(
id TEXT NOT NULL,
owner TEXT NOT NULL,
extension TEXT,
created integer NOT NULL DEFAULT (strftime('%s','now')),
CONSTRAINT files_pkey PRIMARY KEY (id),
CONSTRAINT fk_owner FOREIGN KEY (owner)
REFERENCES users (username) MATCH SIMPLE
ON UPDATE NO ACTION
ON DELETE CASCADE
);
CREATE TABLE links
(
id TEXT NOT NULL,
url TEXT NOT NULL,
owner TEXT NOT NULL,
created integer NOT NULL DEFAULT (strftime('%s','now')),
CONSTRAINT main PRIMARY KEY (id),
CONSTRAINT owner_check FOREIGN KEY (owner)
REFERENCES users (username) MATCH SIMPLE
ON UPDATE NO ACTION
ON DELETE CASCADE
);
|
DROP TABLE IF EXISTS QRTZ_TIMED_TASK;
DROP TABLE IF EXISTS QRTZ_TIMED_TASK_PARAM;
CREATE TABLE QRTZ_TIMED_TASK
(
TASK_NAME VARCHAR(200),
TASK_DESC VARCHAR(500),
TASK_EXPRES VARCHAR(100),
TASK_METHOD VARCHAR(200),
TASK_CLASS VARCHAR(200),
TASK_GROUP VARCHAR(200) DEFAULT 0,
STATUS VARCHAR(100) DEFAULT 'U',
CREATE_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
CREATER VARCHAR(200),
MODIFY_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
MODIFIER VARCHAR(200),
PRIMARY KEY(TASK_NAME)
);
CREATE TABLE QRTZ_TIMED_TASK_PARAM
(
PARAM_KEY VARCHAR(100) NOT NULL,
PARAM_VALUE VARCHAR(1000) NOT NULL,
PARAM_TYPE VARCHAR(100),
PARAM_DESC VARCHAR(1000),
TASK_NAME VARCHAR(200) NOT NULL,
SORT_ID INTEGER DEFAULT 0,
PRIMARY KEY(PARAM_KEY, TASK_NAME)
);
|
create table LINKS_TO_BE_PROCESSED(
link varchar(2000)
);
create table LINKS_ALREADY_PROCESSED(
link varchar(2000)
);
create table news(
id bigint primary key auto_increment,
title text,
content text,
url varchar(1000),
created_at timestamp default now(),
modified_at timestamp default now()
);
|
-- Occupations
-- https://www.hackerrank.com/challenges/occupations/problem
SELECT
D.Name,
P.Name,
S.Name,
A.Name
FROM (
SELECT
@rownum:=@rownum+1 AS rownum,
Name
FROM (SELECT @rownum:=0) r,
Occupations
WHERE Occupation = 'Doctor'
ORDER BY Name
) AS D
RIGHT JOIN (
SELECT
@rownumP:=@rownumP+1 AS rownumP,
Name
FROM (SELECT @rownumP:=0) r, Occupations
WHERE Occupation = 'Professor' ORDER BY Name
) AS P ON D.rownum = P.rownumP LEFT JOIN (SELECT @rownumS:=@rownumS+1 AS rownumS, Name FROM (SELECT @rownumS:=0) r, Occupations WHERE Occupation = 'Singer' ORDER BY Name) AS S ON P.rownumP = S.rownumS LEFT JOIN (SELECT @rownumA:=@rownumA+1 AS rownumA, Name FROM (SELECT @rownumA:=0) r, Occupations WHERE Occupation = 'Actor' ORDER BY Name) AS A ON P.rownumP = A.rownumA;
|
CREATE OR REPLACE VIEW lookup_terms AS
SELECT tt.id AS id, tt.meaning_id, tt.termlist_id, t.term
FROM termlists_terms tt
JOIN terms t ON tt.term_id = t.id AND t.deleted = false
WHERE tt.deleted = false;
|
/*
SQLyog Ultimate v12.2.6 (64 bit)
MySQL - 5.7.19-0ubuntu0.16.04.1 : Database - alipay
*********************************************************************
*/
CREATE DATABASE /*!32312 IF NOT EXISTS*/`alipay` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
USE `alipay`;
/*Table structure for table `alipay` */
DROP TABLE IF EXISTS `alipay`;
CREATE TABLE `alipay` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`name` varchar(20) NOT NULL,
`amount` decimal(4,0) NOT NULL,
`create_time` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8mb4;
CREATE DATABASE /*!32312 IF NOT EXISTS*/`pay` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
USE `pay`;
/*Table structure for table `pay` */
DROP TABLE IF EXISTS `pay`;
CREATE TABLE `pay` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`name` varchar(20) NOT NULL,
`total_amount` decimal(6,0) NOT NULL,
`create_time` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8mb4;
CREATE DATABASE /*!32312 IF NOT EXISTS*/`wechat` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
USE `wechat`;
/*Table structure for table `wechat` */
DROP TABLE IF EXISTS `wechat`;
CREATE TABLE `wechat` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`name` varchar(20) NOT NULL,
`amount` decimal(4,0) NOT NULL,
`create_time` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4;
|
set global time_zone = '+8:00';
create database `ccsu_test`;
use ccsu_test;
create table ccsu_score_student_data(
`id` varchar(14) not null comment '学生学号',
`total_score` decimal(10,1) default '0.0' comment '综测分数',
primary key (`id`)
)engine = InnoDB default charset utf8MB4;
create table ccsu_score_event(
`id` varchar(14) not null comment '学生学号',
`record_time` datetime not null comment '事件发生的时间',
`event` longtext not null comment '原因',
`score` decimal(10,1) default '0.0' comment '综测分数',
foreign key (`id`) references ccsu_score_student_data(`id`),
primary key (`record_time`)
)engine = InnoDB default charset utf8MB4;
|
create table accounts (
id varchar not null PRIMARY KEY,
first_name varchar not null,
last_name varchar not null,
email varchar not null unique,
password varchar not null,
password_salt varchar,
verified boolean not null DEFAULT false,
verified_token varchar not null DEFAULT '',
two_factor_auth varchar,
last_ip_login varchar,
current_ip_login varchar,
sign_in_count int not null DEFAULT 0,
failed_attempts int not null DEFAULT 0,
unlock_token varchar,
locked boolean not null DEFAULT false,
locked_at date,
profile jsonb not null default '{}'::jsonb,
created_at date not null DEFAULT NOW(),
updated_at date not null DEFAULT NOW()
);
create type node_status_type as enum('OFFLINE', 'ONLINE', 'ERROR', 'UPGRADING', 'PENDING');
drop type node_status_type;
create table nodes (
id varchar not null PRIMARY KEY,
account_id varchar not null,
node_name varchar not null,
seen_last_at timestamp,
node_status smallint not null DEFAULT 0,
created_at timestamp not null DEFAULT NOW(),
updated_at timestamp not null DEFAULT NOW()
);
ALTER TABLE nodes ADD CONSTRAINT fk_nodes_accounts FOREIGN KEY(account_id) REFERENCES accounts(id);
create type build_status_type as enum('SCHEDULED', 'PENDING', 'BUILDING', 'FAILED', 'SUCESSS');
create table builds (
id varchar not null PRIMARY KEY,
node_id varchar not null,
build_hash varchar not null,
build_path varchar not null,
configs jsonb not null default '{}'::jsonb,
created_at date not null DEFAULT NOW(),
updated_at date not null DEFAULT NOW()
);
|
/*
* Project:Easy Web Framework
* Description:
* EasyFK stands for Easy Web Framework.It's an open source product for E-Business / E-Commerce.It
* was launched by a chinese Hezhiping(QQ:110476592) in 2015.The goal of EasyFK is to provide a
* foundation and starting point for reliable, secure , simple-to-use ,cost-effective ,scalable
* and suitable-for-Chinese E-Business / E-Commerce solutions. With EasyFK, you can get started
* right away without the huge deployment and maintenance costs of E-Business / E-Commerce systems.
* Of course, you can customize it or use it as a framework to implement your most challenging business needs.
* EasyFk is licensed under the Apache License Version 2.0. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Author:hezhiping Email:110476592@qq.com
*/
INSERT INTO `contact_mech_type` VALUES ('DOMAIN_NAME', 'ELECTRONIC_ADDRESS', 'N', '网络域名', '2015-01-29 16:09:29', '2015-01-29 16:09:28', '2015-01-29 16:09:29', '2015-01-29 16:09:28');
INSERT INTO `contact_mech_type` VALUES ('ELECTRONIC_ADDRESS', null, 'N', '电子地址', '2015-01-29 16:09:29', '2015-01-29 16:09:28', '2015-01-29 16:09:29', '2015-01-29 16:09:28');
INSERT INTO `contact_mech_type` VALUES ('EMAIL_ADDRESS', 'ELECTRONIC_ADDRESS', 'N', '电子邮件', '2015-01-29 16:09:29', '2015-01-29 16:09:28', '2015-01-29 16:09:29', '2015-01-29 16:09:28');
INSERT INTO `contact_mech_type` VALUES ('IP_ADDRESS', 'ELECTRONIC_ADDRESS', 'N', '网络IP地址', '2015-01-29 16:09:29', '2015-01-29 16:09:28', '2015-01-29 16:09:29', '2015-01-29 16:09:28');
INSERT INTO `contact_mech_type` VALUES ('POSTAL_ADDRESS', null, 'Y', '邮政地址', '2015-01-29 16:09:29', '2015-01-29 16:09:28', '2015-01-29 16:09:29', '2015-01-29 16:09:28');
INSERT INTO `contact_mech_type` VALUES ('TELECOM_NUMBER', null, 'Y', '电话号码', '2015-01-29 16:09:29', '2015-01-29 16:09:28', '2015-01-29 16:09:29', '2015-01-29 16:09:28');
INSERT INTO `contact_mech_type` VALUES ('INTERNAL_NUMBER', null, 'N', '网络号码', '2015-01-29 16:09:29', '2015-01-29 16:09:28', '2015-01-29 16:09:29', '2015-01-29 16:09:28');
INSERT INTO `contact_mech_type` VALUES ('WEB_ADDRESS', 'ELECTRONIC_ADDRESS', 'N', '网址', '2015-01-29 16:09:29', '2015-01-29 16:09:28', '2015-01-29 16:09:29', '2015-01-29 16:09:28');
INSERT INTO `contact_mech_purpose_type` VALUES ('PHONE_HOME', '家庭电话号码', '2015-01-29 16:09:28', '2015-01-29 16:09:28', '2015-01-29 16:09:28', '2015-01-29 16:09:28');
INSERT INTO `contact_mech_purpose_type` VALUES ('PHONE_WORK', '办公电话', '2015-01-29 16:09:28', '2015-01-29 16:09:28', '2015-01-29 16:09:28', '2015-01-29 16:09:28');
INSERT INTO `contact_mech_purpose_type` VALUES ('PHONE_MOBILE', '手机号码', '2015-01-29 16:09:28', '2015-01-29 16:09:28', '2015-01-29 16:09:28', '2015-01-29 16:09:28');
INSERT INTO `contact_mech_purpose_type` VALUES ('PRIMARY_EMAIL', '电子邮件', '2015-01-29 16:09:28', '2015-01-29 16:09:28', '2015-01-29 16:09:28', '2015-01-29 16:09:28');
INSERT INTO `contact_mech_purpose_type` VALUES ('LOCATION_HOME', '家庭地址', '2015-01-29 16:09:28', '2015-01-29 16:09:28', '2015-01-29 16:09:28', '2015-01-29 16:09:28');
INSERT INTO `contact_mech_purpose_type` VALUES ('LOCATION_WORK', '办公地址', '2015-01-29 16:09:28', '2015-01-29 16:09:28', '2015-01-29 16:09:28', '2015-01-29 16:09:28');
INSERT INTO `contact_mech_purpose_type` VALUES ('WEIXIN_NUMBER', '微信号', '2015-01-29 16:09:28', '2015-01-29 16:09:28', '2015-01-29 16:09:28', '2015-01-29 16:09:28');
INSERT INTO `contact_mech_purpose_type` VALUES ('QQ_NUMBER', 'QQ号', '2015-01-29 16:09:28', '2015-01-29 16:09:28', '2015-01-29 16:09:28', '2015-01-29 16:09:28');
INSERT INTO `contact_mech_type_purpose` VALUES ('TELECOM_NUMBER', 'PHONE_HOME', '2015-01-29 16:09:29', '2015-01-29 16:09:28', '2015-01-29 16:09:29', '2015-01-29 16:09:28');
INSERT INTO `contact_mech_type_purpose` VALUES ('TELECOM_NUMBER', 'PHONE_WORK', '2015-01-29 16:09:29', '2015-01-29 16:09:28', '2015-01-29 16:09:29', '2015-01-29 16:09:28');
INSERT INTO `contact_mech_type_purpose` VALUES ('TELECOM_NUMBER', 'PHONE_MOBILE', '2015-01-29 16:09:29', '2015-01-29 16:09:28', '2015-01-29 16:09:29', '2015-01-29 16:09:28');
INSERT INTO `contact_mech_type_purpose` VALUES ('EMAIL_ADDRESS', 'PRIMARY_EMAIL', '2015-01-29 16:09:29', '2015-01-29 16:09:28', '2015-01-29 16:09:29', '2015-01-29 16:09:28');
INSERT INTO `contact_mech_type_purpose` VALUES ('POSTAL_ADDRESS', 'LOCATION_HOME', '2015-01-29 16:09:29', '2015-01-29 16:09:28', '2015-01-29 16:09:29', '2015-01-29 16:09:28');
INSERT INTO `contact_mech_type_purpose` VALUES ('POSTAL_ADDRESS', 'LOCATION_WORK', '2015-01-29 16:09:29', '2015-01-29 16:09:28', '2015-01-29 16:09:29', '2015-01-29 16:09:28');
INSERT INTO `contact_mech_type_purpose` VALUES ('INTERNAL_NUMBER', 'WEIXIN_NUMBER', '2015-01-29 16:09:29', '2015-01-29 16:09:28', '2015-01-29 16:09:29', '2015-01-29 16:09:28');
INSERT INTO `contact_mech_type_purpose` VALUES ('INTERNAL_NUMBER', 'QQ_NUMBER', '2015-01-29 16:09:29', '2015-01-29 16:09:28', '2015-01-29 16:09:29', '2015-01-29 16:09:28');
|
------------------START------------------
CREATE TABLE egadtax_agency (
id bigint NOT NULL,
code character varying(50) NOT NULL,
name character varying(250) NOT NULL,
ssid character varying(50),
emailid character varying(100),
mobilenumber character varying(10) NOT NULL,
address character varying(250),
createddate timestamp without time zone DEFAULT ('now'::text)::date NOT NULL,
lastmodifieddate timestamp without time zone,
createdby bigint NOT NULL,
lastmodifiedby bigint,
version bigint DEFAULT 0,
depositamount double precision NOT NULL,
status character varying(50) NOT NULL
);
CREATE SEQUENCE SEQ_egadtax_AGENCY;
ALTER TABLE ONLY egadtax_agency
ADD CONSTRAINT pk_adtax_agency PRIMARY KEY (id);
ALTER TABLE ONLY egadtax_agency
ADD CONSTRAINT unq_adtax_agency_code UNIQUE (code);
ALTER TABLE ONLY egadtax_agency
ADD CONSTRAINT unq_adtax_agency_name UNIQUE (name);
CREATE INDEX idx_adtax_agency_code ON egadtax_agency USING btree (code);
CREATE INDEX idx_adtax_agency_name ON egadtax_agency USING btree (name);
ALTER TABLE ONLY egadtax_agency
ADD CONSTRAINT fk_adtax_agency_createdby FOREIGN KEY (createdby) REFERENCES eg_user(id);
ALTER TABLE ONLY egadtax_agency
ADD CONSTRAINT fk_adtax_agency_lastmodifiedby FOREIGN KEY (lastmodifiedby) REFERENCES eg_user(id);
-------------------END-------------------
------------------START------------------
CREATE TABLE egadtax_category (
id bigint NOT NULL,
code character varying(50) NOT NULL,
name character varying(250) NOT NULL,
active boolean DEFAULT true NOT NULL,
createddate timestamp without time zone DEFAULT ('now'::text)::date NOT NULL,
createdby bigint NOT NULL,
version bigint DEFAULT 0,
lastmodifieddate timestamp without time zone,
lastmodifiedby bigint
);
CREATE SEQUENCE SEQ_egadtax_CATEGORY;
ALTER TABLE ONLY egadtax_category
ADD CONSTRAINT pk_adtax_category PRIMARY KEY (id);
ALTER TABLE ONLY egadtax_category
ADD CONSTRAINT unq_adtax_category_code UNIQUE (code);
ALTER TABLE ONLY egadtax_category
ADD CONSTRAINT unq_adtax_category_name UNIQUE (name);
ALTER TABLE ONLY egadtax_category
ADD CONSTRAINT fk_adtax_category_createdby FOREIGN KEY (createdby) REFERENCES eg_user(id);
-------------------END-------------------
------------------START------------------
CREATE TABLE egadtax_document_files (
document numeric,
filestore numeric
);
-------------------END-------------------
------------------START------------------
CREATE TABLE egadtax_hoarding (
id bigint NOT NULL,
applicationnumber character varying(25) NOT NULL,
applicationdate timestamp without time zone NOT NULL,
permissionnumber character varying(25) NOT NULL,
hoardingnumber character varying(25) NOT NULL,
hoardingname character varying(125) NOT NULL,
agency bigint NOT NULL,
advertiser character varying(125) NOT NULL,
advertisementparticular character varying(512) NOT NULL,
propertytype bigint NOT NULL,
propertynumber character varying(50),
ownerdetail character varying(125) NOT NULL,
category bigint NOT NULL,
subcategory bigint NOT NULL,
measurement bigint NOT NULL,
unitofmeasure bigint NOT NULL,
length bigint,
width bigint,
breadth bigint,
totalheight bigint,
class bigint,
revenueinspector bigint NOT NULL,
revenueboundary bigint,
adminboundry bigint NOT NULL,
address character varying(512) NOT NULL,
advertisementduration character varying(25) NOT NULL,
taxamount bigint NOT NULL,
encroachmentfee bigint,
demandid bigint,
version bigint DEFAULT 0,
createddate timestamp without time zone DEFAULT ('now'::text)::date NOT NULL,
lastmodifieddate timestamp without time zone,
createdby bigint NOT NULL,
lastmodifiedby bigint,
status bigint NOT NULL,
type bigint NOT NULL,
longitude double precision,
latitude double precision,
legacy boolean DEFAULT false,
penaltyCalculationDate timestamp without time zone,
pendingTax bigint DEFAULT 0
);
CREATE SEQUENCE SEQ_egadtax_hoarding;
ALTER TABLE ONLY egadtax_hoarding
ADD CONSTRAINT pk_adtax_hoarding PRIMARY KEY (id);
CREATE INDEX idx_adtax_hoarding_adminboundry ON egadtax_hoarding USING btree (adminboundry);
CREATE INDEX idx_adtax_hoarding_agency ON egadtax_hoarding USING btree (agency);
CREATE INDEX idx_adtax_hoarding_appnumber ON egadtax_hoarding USING btree (applicationnumber);
CREATE INDEX idx_adtax_hoarding_category ON egadtax_hoarding USING btree (category);
CREATE INDEX idx_adtax_hoarding_demandid ON egadtax_hoarding USING btree (demandid);
CREATE INDEX idx_adtax_hoarding_name ON egadtax_hoarding USING btree (hoardingname);
CREATE INDEX idx_adtax_hoarding_number ON egadtax_hoarding USING btree (hoardingnumber);
ALTER TABLE ONLY egadtax_hoarding
ADD CONSTRAINT fk_adtax_hoarding_adminboundry FOREIGN KEY (adminboundry) REFERENCES eg_boundary(id);
ALTER TABLE ONLY egadtax_hoarding
ADD CONSTRAINT fk_adtax_hoarding_agency FOREIGN KEY (agency) REFERENCES egadtax_agency(id);
ALTER TABLE ONLY egadtax_hoarding
ADD CONSTRAINT fk_adtax_hoarding_category FOREIGN KEY (category) REFERENCES egadtax_category(id);
ALTER TABLE ONLY egadtax_hoarding
ADD CONSTRAINT fk_adtax_hoarding_demand FOREIGN KEY (demandid) REFERENCES eg_demand(id);
ALTER TABLE ONLY egadtax_hoarding
ADD CONSTRAINT fk_adtax_hoarding_revenueboundary FOREIGN KEY (revenueboundary) REFERENCES eg_boundary(id);
-------------------END-------------------
------------------START------------------
CREATE TABLE egadtax_hoarding_docs (
hoarding bigint,
document bigint
);
-------------------END-------------------
------------------START------------------
CREATE TABLE egadtax_hoardingdocument (
id numeric NOT NULL,
doctype numeric,
description character varying(100),
docdate date,
enclosed boolean,
createddate timestamp without time zone,
createdby numeric,
lastmodifieddate timestamp without time zone,
lastmodifiedby numeric,
version numeric DEFAULT 0
);
create sequence SEQ_egadtax_document;
ALTER TABLE ONLY egadtax_hoardingdocument
ADD CONSTRAINT egadtax_document_pkey PRIMARY KEY (id);
-------------------END-------------------
------------------START------------------
CREATE TABLE egadtax_hoardingdocument_type (
id numeric NOT NULL,
name character varying(100),
mandatory boolean,
version numeric DEFAULT 0
);
create sequence SEQ_egadtax_document_TYPE;
ALTER TABLE ONLY egadtax_hoardingdocument_type
ADD CONSTRAINT egadtax_document_type_pkey PRIMARY KEY (id);
ALTER TABLE ONLY egadtax_hoardingdocument
ADD CONSTRAINT fk_adtax_document_doctype FOREIGN KEY (doctype) REFERENCES egadtax_hoardingdocument_type(id);
-------------------END-------------------
------------------START------------------
CREATE TABLE egadtax_rates (
id bigint NOT NULL,
category bigint NOT NULL,
subcategory bigint NOT NULL,
unitofmeasure bigint NOT NULL,
active boolean DEFAULT true NOT NULL,
validfromdate timestamp without time zone DEFAULT ('now'::text)::date,
validtodate timestamp without time zone,
version bigint DEFAULT 0,
createddate timestamp without time zone DEFAULT ('now'::text)::date NOT NULL,
lastmodifieddate timestamp without time zone,
createdby bigint NOT NULL,
lastmodifiedby bigint,
class bigint NOT NULL
);
CREATE SEQUENCE SEQ_egadtax_rates;
ALTER TABLE ONLY egadtax_rates
ADD CONSTRAINT pk_adtax_rates PRIMARY KEY (id);
ALTER TABLE ONLY egadtax_rates
ADD CONSTRAINT unq_adtax_rates_cat_subcat_uom_class UNIQUE (category, subcategory, unitofmeasure, class);
CREATE INDEX idx_adtax_rates_category ON egadtax_rates USING btree (category);
CREATE INDEX idx_adtax_rates_subcategory ON egadtax_rates USING btree (subcategory);
CREATE INDEX idx_adtax_rates_unitofmeasure ON egadtax_rates USING btree (unitofmeasure);
ALTER TABLE ONLY egadtax_rates
ADD CONSTRAINT fk_adtax_rates_category FOREIGN KEY (category) REFERENCES egadtax_category(id);
-------------------END-------------------
------------------START------------------
CREATE TABLE egadtax_rates_class (
id bigint NOT NULL,
description character varying(50) NOT NULL,
active boolean DEFAULT true NOT NULL,
version bigint DEFAULT 0
);
CREATE SEQUENCE SEQ_egadtax_ratesClass;
ALTER TABLE ONLY egadtax_rates_class
ADD CONSTRAINT pk_adtax_ratesclass PRIMARY KEY (id);
ALTER TABLE ONLY egadtax_rates
ADD CONSTRAINT fk_adtax_rates_class FOREIGN KEY (class) REFERENCES egadtax_rates_class(id);
ALTER TABLE ONLY egadtax_hoarding
ADD CONSTRAINT fk_adtax_hoarding_class FOREIGN KEY (class) REFERENCES egadtax_rates_class(id);
-------------------END-------------------
------------------START------------------
CREATE TABLE egadtax_rates_details (
id bigint NOT NULL,
unitfrom bigint DEFAULT 0 NOT NULL,
unitto bigint DEFAULT 1 NOT NULL,
rate bigint NOT NULL,
version bigint DEFAULT 0,
amount bigint DEFAULT 0 NOT NULL
);
CREATE SEQUENCE SEQ_egadtax_ratesdetails;
ALTER TABLE ONLY egadtax_rates_details
ADD CONSTRAINT pk_adtax_ratesdetails PRIMARY KEY (id);
CREATE INDEX idx_adtax_ratedtl_unitfrom ON egadtax_rates_details USING btree (unitfrom);
CREATE INDEX idx_adtax_ratedtl_unitto ON egadtax_rates_details USING btree (unitto);
ALTER TABLE ONLY egadtax_rates_details
ADD CONSTRAINT fk_adtax_ratesdetail_rate FOREIGN KEY (rate) REFERENCES egadtax_rates(id);
-------------------END-------------------
------------------START------------------
CREATE TABLE egadtax_revenueinspectors (
id bigint NOT NULL,
name character varying(50) NOT NULL,
active boolean DEFAULT true NOT NULL,
version bigint DEFAULT 0
);
CREATE SEQUENCE SEQ_egadtax_revenueinspectors;
ALTER TABLE ONLY egadtax_revenueinspectors
ADD CONSTRAINT pk_adtax_ri PRIMARY KEY (id);
ALTER TABLE ONLY egadtax_hoarding
ADD CONSTRAINT fk_adtax_hoarding_revenueinsptor FOREIGN KEY (revenueinspector) REFERENCES egadtax_revenueinspectors(id);
-------------------END-------------------
------------------START------------------
CREATE TABLE egadtax_subcategory (
id bigint NOT NULL,
category bigint NOT NULL,
code character varying(50) NOT NULL,
description character varying(512) NOT NULL,
active boolean DEFAULT true NOT NULL,
createddate timestamp without time zone DEFAULT ('now'::text)::date NOT NULL,
createdby bigint NOT NULL,
version bigint DEFAULT 0,
lastmodifieddate timestamp without time zone,
lastmodifiedby bigint
);
CREATE SEQUENCE SEQ_egadtax_SUBCATEGORY;
ALTER TABLE ONLY egadtax_subcategory
ADD CONSTRAINT pk_adtax_subcategory PRIMARY KEY (id);
ALTER TABLE ONLY egadtax_subcategory
ADD CONSTRAINT unq_adtax_subcategory_code UNIQUE (code);
ALTER TABLE ONLY egadtax_subcategory
ADD CONSTRAINT unq_adtax_subcategory_description UNIQUE (description);
ALTER TABLE ONLY egadtax_hoarding
ADD CONSTRAINT fk_adtax_hoarding_subcategory FOREIGN KEY (subcategory) REFERENCES egadtax_subcategory(id);
ALTER TABLE ONLY egadtax_rates
ADD CONSTRAINT fk_adtax_rates_subcategory FOREIGN KEY (subcategory) REFERENCES egadtax_subcategory(id);
ALTER TABLE ONLY egadtax_subcategory
ADD CONSTRAINT fk_adtax_subcategory_category FOREIGN KEY (category) REFERENCES egadtax_category(id);
ALTER TABLE ONLY egadtax_subcategory
ADD CONSTRAINT fk_adtax_subcategory_createdby FOREIGN KEY (createdby) REFERENCES eg_user(id);
-------------------END-------------------
------------------START------------------
CREATE TABLE egadtax_unitofmeasure (
id bigint NOT NULL,
code character varying(50) NOT NULL,
description character varying(50) NOT NULL,
active boolean DEFAULT true NOT NULL,
createdby bigint NOT NULL,
createddate timestamp without time zone DEFAULT ('now'::text)::date NOT NULL,
version bigint DEFAULT 0,
lastmodifieddate timestamp without time zone,
lastmodifiedby bigint
);
CREATE SEQUENCE SEQ_egadtax_UnitOfMeasure;
ALTER TABLE ONLY egadtax_unitofmeasure
ADD CONSTRAINT pk_adtax_unitofmeasure PRIMARY KEY (id);
CREATE SEQUENCE SEQ_egadtax_propertytype;
ALTER TABLE ONLY egadtax_hoarding
ADD CONSTRAINT fk_adtax_hoarding_uom FOREIGN KEY (unitofmeasure) REFERENCES egadtax_unitofmeasure(id);
ALTER TABLE ONLY egadtax_rates
ADD CONSTRAINT fk_adtax_rates_uom FOREIGN KEY (unitofmeasure) REFERENCES egadtax_unitofmeasure(id);
ALTER TABLE ONLY egadtax_unitofmeasure
ADD CONSTRAINT fk_adtax_unitofmeasure_createdby FOREIGN KEY (createdby) REFERENCES eg_user(id);
create sequence SEQ_advertisementbill_NUMBER;
-------------------END-------------------
|
-- file:json.sql ln:422 expect:true
select * from json_populate_record(row('x',3,'2012-12-31 15:30:56')::jpop,'{"a":[100,200,false],"x":43.2}') q
|
--ZAD9
CREATE OR REPLACE FUNCTION bilans_kont()
RETURNS TABLE (
konto numeric(11),
suma_wplat numeric(11,2),
suma_wyplat numeric(11,2)
)
AS $$
BEGIN
RETURN QUERY
SELECT nr_konta as "Konto",
COALESCE((SELECT SUM(kwota) as d FROM transakcje WHERE na_konto=nr_konta GROUP BY na_konto), 0),
COALESCE((SELECT SUM(kwota) as c FROM transakcje WHERE z_konta=nr_konta GROUP BY z_konta), 0)
FROM konta;
END; $$
LANGUAGE 'plpgsql';
SELECT konto, suma_wplat-suma_wyplat as bilans FROM bilans_kont();
|
SELECT * FROM KNOWLEDGE_EDIT_GROUPS
WHERE
GROUP_ID = ?
AND DELETE_FLAG = 0;
;
|
select p.*
from product p
join transformation_output t_out
on t_out.product = p.id
join transformation t
on t.id = t_out.transformation
left join sale_input si
on si.product = p.id
left join transformation_input ti
on ti.product = p.id
where si.sale is null and ti.transformation is null
and t.emitter = $1
and p.type != 'WEIGHT_LOSS'
union
select p.*
from product p
join sale_input si
on si.product = p.id
join sale s
on s.id = si.sale and s.buyer = $1
join sale_confirmation sc
on sc.sale = s.id
left join
(select si_sub.product, s_sub.timestamp
from sale s_sub
join sale_input si_sub
on s_sub.id = si_sub.sale) s_out
on s_out.product = p.id and s_out.timestamp > s.timestamp
left join transformation_input ti
on ti.product = p.id
where s_out.timestamp is null and ti.transformation is null
and p.type != 'WEIGHT_LOSS';
|
/*Listar código, nombre, continente y población de todos los países.
(Se esperan 4 columnas y 239 registros).*/
SELECT
country.Code,
country.Name,
country.Continent,
country.Population
FROM
world.country;
|
CREATE OR REPLACE PACKAGE child_bonus AS FUNCTION get_child_bonus(employee IN INTEGER, x1 IN REAL, x2 IN REAL, x3 IN REAL) RETURN REAL;
PROCEDURE add_child_bonus(x1 IN REAL, x2 IN REAL, x3 IN REAL);
END child_bonus;
/
CREATE OR REPLACE PACKAGE BODY child_bonus AS
PROCEDURE add_child_bonus(x1 IN REAL, x2 IN REAL, x3 IN REAL) IS
CURSOR child_bonus_cursor IS
SELECT salaryempno,
nvl(salary, 0) + nvl(bonusearnings, 0)
FROM
( SELECT career.empno AS salaryempno,
nvl(sum(nvl(minsalary, 0)), 0) AS salary
FROM career
JOIN job ON job.jobno = career.jobno
WHERE ( extract(YEAR
FROM career.startdate) <= 2016 )
AND ( ( career.enddate IS NULL )
OR ( ( extract(YEAR
FROM career.enddate) = 2016 )
AND ( extract(MONTH
FROM career.enddate) = 12 ) )
OR ( extract(YEAR
FROM career.enddate) > 2016 ) )
GROUP BY career.empno )
LEFT OUTER JOIN
( SELECT empno AS bonusempno,
nvl(sum(nvl(bonvalue, 0)), 0) AS bonusearnings
FROM bonus
WHERE bonus.year = 2016
GROUP BY empno ) ON salaryempno = bonusempno;
employee INTEGER := 0;
earnings REAL := 0;
children INTEGER := 0;
child_bonus REAL := 0;
BEGIN
OPEN child_bonus_cursor;
LOOP
FETCH child_bonus_cursor INTO employee, earnings;
EXIT WHEN child_bonus_cursor % NOTFOUND;
SELECT nchild INTO children
FROM emp
WHERE empno = employee;
IF (children > 0) THEN
IF children = 1 THEN child_bonus := earnings * x1 / 100;
ELSIF children = 2 THEN child_bonus := earnings * x2 / 100;
ELSIF children > 2 THEN child_bonus := earnings * x3 / 100;
END IF;
INSERT INTO bonus
VALUES (employee, 12, 2016, child_bonus, NULL);
END IF;
END LOOP;
CLOSE child_bonus_cursor;
END add_child_bonus;
FUNCTION get_child_bonus(
employee IN INTEGER, x1 IN REAL, x2 IN REAL, x3 IN REAL
) RETURN REAL IS bonusearnings REAL := 0;
salary REAL := 0;
total REAL := 0;
children INTEGER := 0;
child_bonus REAL := 0;
BEGIN
BEGIN
SELECT nvl(sum(nvl(bonvalue, 0)), 0) INTO bonusearnings
FROM bonus
WHERE empno = employee
AND bonus.year = 2015
GROUP BY empno;
EXCEPTION WHEN no_data_found THEN bonusearnings := 0;
END;
BEGIN
SELECT nvl(sum(nvl(minsalary, 0)), 0) INTO salary
FROM career
JOIN job ON job.jobno = career.jobno
WHERE ( career.empno = employee )
AND ( extract(YEAR
FROM career.startdate) <= 2016 )
AND ( ( career.enddate IS NULL )
OR ( ( extract(YEAR
FROM career.enddate) = 2016 )
AND ( extract(MONTH
FROM career.enddate) = 12 ) )
OR ( extract(YEAR
FROM career.enddate) > 2016 ) )
GROUP BY career.empno;
EXCEPTION WHEN no_data_found THEN salary := 0;
END;
BEGIN
SELECT nchild INTO children
FROM emp
WHERE empno = employee;
EXCEPTION WHEN no_data_found THEN children := 0;
END;
total := bonusearnings + salary;
IF children = 1 THEN child_bonus := total * x1 / 100;
ELSIF children = 2 THEN child_bonus := total * x2 / 100;
ELSIF children > 2 THEN child_bonus := total * x3 / 100;
END IF;
RETURN child_bonus;
END get_child_bonus;
END child_bonus;
--- PROCEDURE CALL
BEGIN
child_bonus.add_child_bonus(10, 20, 30);
END;
--- FUNCTION CALL
DECLARE
v REAL;
BEGIN
v := child_bonus.get_child_bonus(102, 11, 21, 31);
DBMS_OUTPUT.PUT_LINE(v);
END;
|
CREATE TABLE IF NOT EXISTS `%TABLE_PREFIX%redactor2_profiles` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(30) NOT NULL DEFAULT '',
`description` varchar(255) NOT NULL DEFAULT '',
`urltype` varchar(50) NOT NULL,
`minheight` smallint(5) unsigned NOT NULL,
`maxheight` smallint(5) unsigned NOT NULL,
`characterlimit` smallint(5) unsigned NOT NULL,
`toolbarfixed` tinyint(1) unsigned NOT NULL,
`shortcuts` tinyint(1) unsigned NOT NULL,
`redactor_plugins` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT IGNORE INTO `%TABLE_PREFIX%redactor2_profiles` (`id`, `name`, `description`, `minheight`, `maxheight`, `characterlimit`, `urltype`, `redactor_plugins`) VALUES
(1, 'full', 'Standard Redactor-Konfiguration', '300', '800', '0', 'relative', 'alignment,blockquote,bold,cleaner,clips[Snippetname1=Snippettext1|Snippetname2=Snippettext2],deleted,emaillink,externallink,fontcolor[Weiss=#ffffff|Schwarz=#000000],fontfamily[Arial|Times],fontsize[12px|15pt|120%],fullscreen,groupheading[1|2|3|4|5|6],grouplink[email|external|internal|media],grouplist[unorderedlist|orderedlist|indent|outdent],heading1,heading2,heading3,heading4,heading5,heading6,horizontalrule,internallink,italic,media,medialink,orderedlist,paragraph,properties,redo,source,styles[code=Code|kbd=Shortcut|mark=Markiert|samp=Sample|var=Variable],sub,sup,table,textdirection,underline,undo,unorderedlist');
|
DELIMITER $$
CREATE TRIGGER `tr_delete_user`
BEFORE DELETE
ON `users`
FOR EACH ROW
BEGIN
IF(SELECT u.`id` FROM `users` AS u WHERE u.`id` = OLD.`id`) THEN
DELETE FROM `users_chats`
WHERE `user_id` = OLD.`id`;
DELETE FROM `messages`
WHERE `user_id` = OLD.`id`;
DELETE FROM `messages_log`
WHERE `user_id` = OLD.`id`;
END IF;
END$$
DELIMITER ;
|
SET QUOTED_IDENTIFIER ON
GO
DROP PROCEDURE IF EXISTS test_regression_models
GO
-- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date,,>
-- Description: <Description,,>
-- =============================================
CREATE PROCEDURE [test_regression_models] @connectionString varchar(300)
AS
BEGIN
declare @inquery NVARCHAR(max) = N'SELECT * FROM test';
declare @model_rf varbinary(max) = (select top 1 model from [RetailForecasting_models_rf]);
declare @model_btree varbinary(max) = (select top 1 model from [RetailForecasting_models_btree]);
EXEC sp_execute_external_script @language = N'R',
@script = N'
####################################################################################################
## Compute context
####################################################################################################
sql_share_directory <- paste("c:\\AllShare\\", Sys.getenv("USERNAME"), sep = "")
dir.create(sql_share_directory, recursive = TRUE)
sql <- RxInSqlServer(connectionString = connection_string,
shareDir = sql_share_directory)
local <- RxLocalSeq()
####################################################################################################
## Import test into data frame for faster prediction and model evaluation
####################################################################################################
test_table <- RxSqlServerData(table = "test",
connectionString = connection_string)
prediction_df <- InputDataSet
####################################################################################################
## Regression model evaluation metrics
####################################################################################################
evaluate_model <- function(data, observed, predicted, model_name) {
data <- data[, c(observed, predicted)]
data <- data[complete.cases(data), ]
mean_observed <- mean(data[[observed]])
data$se <- (data[[observed]] - data[[predicted]])^2
data$ae <- abs(data[[observed]] - data[[predicted]])
data$sem <- (data[[observed]] - mean(data[[observed]]))^2
data$aem <- abs(data[[observed]] - mean(data[[observed]]))
mae <- mean(data$ae)
rmse <- sqrt(mean(data$se))
rae <- sum(data$ae) / sum(data$aem)
rse <- sum(data$se) / sum(data$sem)
rsq <- 1 - rse
metrics <- c("Model Name" = model_name,
"Mean Absolute Error" = mae,
"Root Mean Squared Error" = rmse,
"Relative Absolute Error" = rae,
"Relative Squared Error" = rse,
"Coefficient of Determination" = rsq)
return(metrics)
}
####################################################################################################
## Boosted tree modeling
####################################################################################################
boosted_model <- unserialize(boosted_model)
predictions <- rxPredict(modelObject = boosted_model,
data = prediction_df,
predVarNames = "forecast.BstDecTree",
overwrite = TRUE)
prediction_df <- cbind(prediction_df, predictions)
boosted_metrics <- evaluate_model(data = prediction_df,
observed = "value",
predicted = "forecast.BstDecTree",
"boosted tree")
prediction_df$forecast.BstDecTree <- exp(prediction_df$forecast.BstDecTree)
####################################################################################################
## Decision forest modeling
####################################################################################################
forest_model <- unserialize(forest_model)
predictions <- rxPredict(modelObject = forest_model,
data = prediction_df,
predVarNames = "forecast.DecFore",
overwrite = TRUE)
prediction_df <- cbind(prediction_df, predictions)
forest_metrics <- evaluate_model(data = prediction_df,
observed = "value",
predicted = "forecast.DecFore",
"decision forest")
prediction_df$forecast.DecFore <- exp(prediction_df$forecast.DecFore)
####################################################################################################
## Write test predictions and metrics to SQL
####################################################################################################
rxSetComputeContext(local)
metrics_df <- as.data.frame(rbind(boosted_metrics, forest_metrics))
metrics_table <- RxSqlServerData(table = "regression_forecasts_metrics",
connectionString = connection_string)
rxDataStep(inData = metrics_df,
outFile = metrics_table,
overwrite = TRUE)
prediction_df <- prediction_df[, c("ID1", "ID2", "time", "forecast.BstDecTree", "forecast.DecFore")]
prediction_table <- RxSqlServerData(table = "regression_forecasts",
connectionString = connection_string)
rxDataStep(inData = prediction_df,
outFile = prediction_table,
overwrite = TRUE)'
, @input_data_1 = @inquery
, @params = N'@forest_model varbinary(max), @boosted_model varbinary(max), @connection_string varchar(300)'
, @forest_model = @model_rf
, @boosted_model = @model_btree
, @connection_string = @connectionString
END
GO
|
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
select
distinct
(SELECT text FROM sys.dm_exec_sql_text(sql_handle)) as txt,
request_session_id as spid,
(SELECT count(*) FROM sys.sysprocesses with(nolock) WHERE blocked = request_session_id) as blocked_process_cnt
from
sys.dm_tran_locks with(nolock)
join master..sysprocesses with(nolock) on request_session_id = spid
where
not (resource_type = 'DATABASE' and request_mode = 'S')
and open_tran > 0
and status = 'sleeping'
and datediff(SECOND, last_batch, getdate()) > 5
order by
blocked_process_cnt desc
|
-- 206 Distribution of age by visit_concept_id
--insert into @results_schema.heracles_results_dist (cohort_definition_id, analysis_id, stratum_1, stratum_2, count_value, min_value, max_value, avg_value, stdev_value, median_value, p10_value, p25_value, p75_value, p90_value)
select vo1.cohort_definition_id,
vo1.subject_id,
vo1.visit_concept_id stratum_1,
p1.gender_concept_id stratum_2,
vo1.visit_start_year - p1.year_of_birth as count_value
INTO #raw_206
from @CDM_schema.person p1
inner join (
select c1.cohort_definition_id, c1.subject_id,
{@CDM_version == '4'} ? {vo0.place_of_service_CONCEPT_ID visit_concept_id,} : {{@CDM_version == '5'}?{vo0.visit_CONCEPT_ID visit_concept_id,}}
min(year(vo0.visit_start_date)) as visit_start_year
from @CDM_schema.visit_occurrence vo0
{@cohort_period_only == 'true'} ? {
inner join #HERACLES_cohort c1 on vo0.person_id = c1.subject_id
WHERE vo0.visit_start_date>=c1.cohort_start_date and vo0.visit_end_date<=c1.cohort_end_date }
: { inner join #HERACLES_cohort_subject c1 on vo0.person_id = c1.subject_id}
group by c1.cohort_definition_id, c1.subject_id,
{@CDM_version == '4'} ? {vo0.place_of_service_CONCEPT_ID} : {{@CDM_version == '5'} ? {vo0.visit_CONCEPT_ID}}
) vo1 on p1.person_id = vo1.subject_id
;
WITH cteRawData (cohort_definition_id, stratum_1, stratum_2, count_value) as
(
select cohort_definition_id, stratum_1, stratum_2, count_value FROM #raw_206
),
overallStats (cohort_definition_id, stratum_1, stratum_2, avg_value, stdev_value, min_value, max_value, total) as
(
select cohort_definition_id,
stratum_1,
stratum_2,
avg(1.0 * count_value) as avg_value,
stdev(count_value) as stdev_value,
min(count_value) as min_value,
max(count_value) as max_value,
count_big(*) as total
from cteRawData
group by cohort_definition_id, stratum_1, stratum_2
),
valueStats (cohort_definition_id, stratum_1, stratum_2, count_value, total, accumulated) as
(
select cohort_definition_id,
stratum_1,
stratum_2,
count_value,
total,
SUM(total) over (partition by cohort_definition_id, stratum_1, stratum_2 order by count_value ROWS UNBOUNDED PRECEDING) as accumulated
FROM (
select cohort_definition_id, stratum_1, stratum_2, count_value, count_big(*) as total
FROM cteRawData
GROUP BY cohort_definition_id, stratum_1, stratum_2, count_value
) D
)
select o.cohort_definition_id,
206 as analysis_id,
CAST(o.stratum_1 as VARCHAR) as stratum_1,
CAST(o.stratum_2 as VARCHAR) as stratum_2,
cast( '' as varchar(1) ) as stratum_3,cast( '' as varchar(1) ) as stratum_4, cast( '' as varchar(1) ) as stratum_5,
o.total as count_value,
o.min_value,
o.max_value,
o.avg_value,
coalesce(o.stdev_value, 0.0) as stdev_value,
MIN(case when s.accumulated >= .50 * o.total then count_value else o.max_value end) as median_value,
MIN(case when s.accumulated >= .10 * o.total then count_value else o.max_value end) as p10_value,
MIN(case when s.accumulated >= .25 * o.total then count_value else o.max_value end) as p25_value,
MIN(case when s.accumulated >= .75 * o.total then count_value else o.max_value end) as p75_value,
MIN(case when s.accumulated >= .90 * o.total then count_value else o.max_value end) as p90_value
into #results_dist_206
from valueStats s
join overallStats o on s.cohort_definition_id = o.cohort_definition_id and s.stratum_1 = o.stratum_1 and s.stratum_2 = o.stratum_2
GROUP BY o.cohort_definition_id, o.stratum_1, o.stratum_2, o.total, o.min_value, o.max_value, o.avg_value, o.stdev_value
;
TRUNCATE TABLE #raw_206;
DROP TABLE #raw_206;
|
SELECT id, boardId, color, title
FROM main.Categories
WHERE boardId = :boardId
|
-- agg by author
-- not very useful because tends to just mimic the top publishing users
select author, count(*) as c from (
select distinct second as package from npm_edit_distances e
where e.distance < 2
union all
select distinct first from npm_edit_distances e
where e.distance < 2
) pAll
inner join npm_authors a
on a.package = pAll.package
group by author
order by c desc
;
-- agg by author only including the packages where the name is similar to a top package name but not
select author, count(*) as c from (
select distinct package from (
select distinct second as package from npm_edit_distances e
inner join (select * from npm_interesting_packages where description = 'PopularPackageName') p
on e.first = p.package
where e.distance < 2
union all
select distinct first from npm_edit_distances e
inner join (select * from npm_interesting_packages where description = 'PopularPackageName') p
on e.second= p.package
where e.distance < 2
)
) pAll
inner join npm_authors a
on a.package = pAll.package
where pAll.package not in (
select distinct package from npm_interesting_packages where description = 'PopularPackageName'
)
group by author
order by c desc
;
|
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.6.15
-- Dumped by pg_dump version 9.6.16
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;
--
-- Data for Name: bsu_eformsschemamaster; Type: TABLE DATA; Schema: public; Owner: odyssey
--
INSERT INTO public.bsu_eformsschemamaster VALUES (4, 'DMSTEMPL', 'CU-CENTRIC - Template Real Estate', '', NULL);
INSERT INTO public.bsu_eformsschemamaster VALUES (5, 'DMSTEMPL', 'CU-CENTRIC - Template Open Ended', '', NULL);
INSERT INTO public.bsu_eformsschemamaster VALUES (6, 'DMSTEMPL', 'CU-CENTRIC - Template Closed Ended', '', NULL);
INSERT INTO public.bsu_eformsschemamaster VALUES (7, 'DMSTEMPL', 'CRUISE - ALL FIELDS LOAN APPLICATION', '', '2016-06-27');
INSERT INTO public.bsu_eformsschemamaster VALUES (8, 'DMSTEMPL', 'CRUISE - COMMON FIELDS LOAN APPLICATION', '', '2017-02-14');
INSERT INTO public.bsu_eformsschemamaster VALUES (10, 'DMSTEMPL', 'CUPRODIGY - SAMPLE APPLICATION', '', '2017-02-14');
INSERT INTO public.bsu_eformsschemamaster VALUES (1001, 'CRUISECU', 'Sample Loan Application', '', '2020-02-14');
--
-- Name: lnappschemamaster_loanid_seq; Type: SEQUENCE SET; Schema: public; Owner: odyssey
--
-- SELECT pg_catalog.setval('public.lnappschemamaster_loanid_seq', 1001, true);
--
-- PostgreSQL database dump complete
--
|
CREATE TABLE IF NOT EXISTS statistics (
ID INT PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,
name varchar(20) UNIQUE NOT NULL,
count INT NOT NULL DEFAULT 0
)
|
/* Replace with your SQL commands */
delete from
crm_v2.document_roles dr
using crm_v2.roles r
where dr.role_id=r.role_id and r.name='billing';
|
-- =============================================
-- Mapping NULL values into numbers
-- =============================================
EXEC UpdateNullValues
EXEC GetColumnsWithNullValues
|
--
-- Be carefull to requests order.
-- This file must be loaded by calling /install/index.php page
-- when current version is 3.9.0 or higher.
--
-- To rename a table: ALTER TABLE llx_table RENAME TO llx_table_new;
-- To add a column: ALTER TABLE llx_table ADD COLUMN newcol varchar(60) NOT NULL DEFAULT '0' AFTER existingcol;
-- To rename a column: ALTER TABLE llx_table CHANGE COLUMN oldname newname varchar(60);
-- To drop a column: ALTER TABLE llx_table DROP COLUMN oldname;
-- To change type of field: ALTER TABLE llx_table MODIFY COLUMN name varchar(60);
-- To drop a foreign key: ALTER TABLE llx_table DROP FOREIGN KEY fk_name;
-- To drop an index: -- VMYSQL4.0 DROP INDEX nomindex on llx_table
-- To drop an index: -- VPGSQL8.0 DROP INDEX nomindex
-- To restrict request to Mysql version x.y minimum use -- VMYSQLx.y
-- To restrict request to Pgsql version x.y minimum use -- VPGSQLx.y
-- To make pk to be auto increment (mysql): VMYSQL4.3 ALTER TABLE llx_c_shipment_mode CHANGE COLUMN rowid rowid INTEGER NOT NULL AUTO_INCREMENT;
-- To make pk to be auto increment (postgres): VPGSQL8.2 NOT POSSIBLE. MUST DELETE/CREATE TABLE
-- To set a field as NULL: VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN name DROP NOT NULL;
-- To set a field as default NULL: VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN name SET DEFAULT NULL;
-- Note: fields with type BLOB/TEXT can't have default value.
-- -- VPGSQL8.2 DELETE FROM llx_usergroup_user WHERE fk_user NOT IN (SELECT rowid from llx_user);
-- -- VMYSQL4.1 DELETE FROM llx_usergroup_user WHERE fk_usergroup NOT IN (SELECT rowid from llx_usergroup);
insert into llx_const (name, value, type, note, visible, entity) values (__ENCRYPT('MAIN_ENABLE_LOG_TO_HTML')__,__ENCRYPT('0')__,'chaine','If this option is set to 1, it is possible to see log output at end of HTML sources by adding paramater logtohtml=1 on URL',1,0);
-- Was done into a 3.8 fix, so we must do it also in 3.9
ALTER TABLE llx_don ADD COLUMN fk_country integer NOT NULL DEFAULT 0 after country;
ALTER TABLE llx_product ADD COLUMN localtax1_type varchar(10) NOT NULL DEFAULT '0' after localtax1_tx;
ALTER TABLE llx_product ADD COLUMN localtax2_type varchar(10) NOT NULL DEFAULT '0' after localtax2_tx;
ALTER TABLE llx_product_price ADD COLUMN localtax1_type varchar(10) NOT NULL DEFAULT '0' after localtax1_tx;
ALTER TABLE llx_product_price ADD COLUMN localtax2_type varchar(10) NOT NULL DEFAULT '0' after localtax2_tx;
ALTER TABLE llx_product_customer_price ADD COLUMN localtax1_type varchar(10) NOT NULL DEFAULT '0' after localtax1_tx;
ALTER TABLE llx_product_customer_price ADD COLUMN localtax2_type varchar(10) NOT NULL DEFAULT '0' after localtax2_tx;
ALTER TABLE llx_product_customer_price_log ADD COLUMN localtax1_type varchar(10) NOT NULL DEFAULT '0' after localtax1_tx;
ALTER TABLE llx_product_customer_price_log ADD COLUMN localtax2_type varchar(10) NOT NULL DEFAULT '0' after localtax2_tx;
UPDATE llx_user set api_key = null where api_key = '';
ALTER TABLE llx_actioncomm ADD COLUMN email_subject varchar(255) after email_msgid;
ALTER TABLE llx_actioncomm ADD COLUMN email_tocc varchar(255) after email_to;
ALTER TABLE llx_actioncomm ADD COLUMN email_tobcc varchar(255) after email_tocc;
ALTER TABLE llx_user MODIFY COLUMN pass varchar(128);
ALTER TABLE llx_user MODIFY COLUMN pass_temp varchar(128);
ALTER TABLE llx_askpricesupplier RENAME TO llx_supplier_proposal;
ALTER TABLE llx_askpricesupplierdet RENAME TO llx_supplier_proposaldet;
ALTER TABLE llx_askpricesupplier_extrafields RENAME TO llx_supplier_proposal_extrafields;
ALTER TABLE llx_askpricesupplierdet_extrafields RENAME TO llx_supplier_proposaldet_extrafields;
ALTER TABLE llx_supplier_proposaldet CHANGE COLUMN fk_askpricesupplier fk_supplier_proposal integer NOT NULL;
-- Fix bad data
update llx_opensurvey_sondage set format = 'D' where format = 'D+';
update llx_opensurvey_sondage set format = 'A' where format = 'A+';
INSERT INTO llx_const (name, value, type, note, visible) values (__ENCRYPT('MAIN_DELAY_EXPENSEREPORTS_TO_PAY')__,__ENCRYPT('31')__,'chaine','Tolérance de retard avant alerte (en jours) sur les notes de frais impayées',0);
INSERT INTO llx_const (name, value, type, note, visible) values (__ENCRYPT('MAIN_SIZE_SHORTLISTE_LIMIT')__,__ENCRYPT('3')__,'chaine','Max length for small lists (tabs)',0);
ALTER TABLE llx_accounting_system MODIFY COLUMN pcg_version varchar(32);
ALTER TABLE llx_accountingaccount MODIFY COLUMN fk_pcg_version varchar(32);
ALTER TABLE llx_accountingaccount RENAME TO llx_accounting_account;
--VPGSQL8.2 ALTER SEQUENCE llx_accountingaccount_rowid_seq RENAME TO llx_accounting_account_rowid_seq;
ALTER TABLE llx_accounting_account ADD INDEX idx_accounting_account_account_number (account_number);
UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_EXPORT_PREFIX_SPEC')__ WHERE __DECRYPT('name')__ = 'EXPORT_PREFIX_SPEC';
UPDATE llx_const set value = __ENCRYPT('eldy')__ WHERE __DECRYPT('value')__ = 'auguria';
UPDATE llx_const set value = __ENCRYPT('eldy')__ WHERE __DECRYPT('value')__ = 'bureau2crea';
UPDATE llx_const set value = __ENCRYPT('eldy')__ WHERE __DECRYPT('value')__ = 'amarok';
UPDATE llx_const set value = __ENCRYPT('eldy')__ WHERE __DECRYPT('value')__ = 'cameleo';
ALTER TABLE llx_societe ADD COLUMN model_pdf varchar(255);
ALTER TABLE llx_societe_commerciaux ADD COLUMN import_key varchar(14) AFTER fk_user;
ALTER TABLE llx_categorie ADD COLUMN color varchar(8);
ALTER TABLE llx_cronjob ADD COLUMN maxrun integer NOT NULL DEFAULT 0;
ALTER TABLE llx_cronjob ADD COLUMN autodelete integer DEFAULT 0;
ALTER TABLE llx_cronjob ADD COLUMN fk_mailing integer DEFAULT NULL;
create table llx_overwrite_trans
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
lang varchar(5), -- en_US, fr_FR ...
transkey varchar(128),
transvalue text
)ENGINE=innodb;
ALTER TABLE llx_payment_salary ADD COLUMN datec datetime AFTER tms;
ALTER TABLE llx_payment_salary CHANGE COLUMN fk_user_creat fk_user_author integer;
ALTER TABLE llx_adherent ADD COLUMN pass_crypted varchar(128) AFTER pass;
ALTER TABLE llx_paiement ADD COLUMN ref varchar(30) NOT NULL DEFAULT '' AFTER rowid;
ALTER TABLE llx_socpeople ADD COLUMN photo varchar(255) AFTER skype;
UPDATE llx_user_param SET param='ToDelete' WHERE param IS NULL;
ALTER TABLE llx_user_param MODIFY COLUMN param varchar(255) NOT NULL;
ALTER TABLE llx_user_param MODIFY COLUMN value text NOT NULL;
ALTER TABLE llx_expedition ADD COLUMN import_key varchar(14);
ALTER TABLE llx_expedition ADD COLUMN extraparams varchar(255);
ALTER TABLE llx_bank_account MODIFY COLUMN code_banque varchar(128);
ALTER TABLE llx_prelevement_facture_demande MODIFY COLUMN code_banque varchar(128);
ALTER TABLE llx_prelevement_lignes MODIFY COLUMN code_banque varchar(128);
ALTER TABLE llx_societe_rib MODIFY COLUMN code_banque varchar(128);
ALTER TABLE llx_contrat ADD COLUMN ref_customer varchar(30);
ALTER TABLE llx_commande ADD COLUMN fk_warehouse integer DEFAULT NULL AFTER fk_shipping_method;
ALTER TABLE llx_commande_fournisseur ADD COLUMN billed smallint DEFAULT 0 AFTER fk_statut;
ALTER TABLE llx_commande_fournisseur ADD INDEX billed (billed);
UPDATE llx_commande_fournisseur set billed=1 where statut = 8;
UPDATE llx_commande_fournisseur set statut=5 where statut = 8 and billed=1;
ALTER TABLE llx_product ADD COLUMN cost_price double(24,8) DEFAULT NULL;
ALTER TABLE llx_ecm_directories MODIFY COLUMN fullpath varchar(750);
ALTER TABLE llx_ecm_directories DROP INDEX idx_ecm_directories;
ALTER TABLE llx_ecm_directories ADD UNIQUE INDEX uk_ecm_directories (label, fk_parent, entity);
--ALTER TABLE llx_ecm_directories ADD UNIQUE INDEX uk_ecm_directories_fullpath(fullpath);
CREATE TABLE llx_ecm_files
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
label varchar(64) NOT NULL,
entity integer DEFAULT 1 NOT NULL, -- multi company id
filename varchar(255) NOT NULL, -- file name only without any directory
fullpath varchar(750) NOT NULL, -- relative to dolibarr document dir. example abc/def/myfile. restricted to 750 because of unique key index on it.
fullpath_orig varchar(2048), -- full path of original filename, when file is uploaded from a local computer
description text,
keywords text, -- list of keywords, separated with comma
cover text, -- is this file a file to use for a cover
extraparams varchar(255), -- for stock other parameters with json format
date_c datetime,
date_m timestamp,
fk_user_c integer,
fk_user_m integer,
acl text -- for future permission 'per file'
) ENGINE=innodb;
ALTER TABLE llx_ecm_files ADD UNIQUE INDEX uk_ecm_files (label, entity);
--ALTER TABLE llx_ecm_files ADD UNIQUE INDEX uk_ecm_files_fullpath(fullpath);
ALTER TABLE llx_product ADD COLUMN onportal smallint DEFAULT 0 AFTER tobuy;
ALTER TABLE llx_user ADD COLUMN employee smallint DEFAULT 1 AFTER ref_int;
ALTER TABLE llx_user ADD COLUMN fk_establishment integer DEFAULT 0 AFTER employee;
CREATE TABLE IF NOT EXISTS llx_c_hrm_function
(
rowid integer PRIMARY KEY,
pos smallint DEFAULT 0 NOT NULL,
code varchar(16) NOT NULL,
label varchar(50),
c_level smallint DEFAULT 0 NOT NULL,
active smallint DEFAULT 1 NOT NULL
)ENGINE=innodb;
INSERT INTO llx_c_hrm_function (rowid, pos, code, label, c_level, active) VALUES(1, 5, 'EXECBOARD', 'Executive board', 0, 1);
INSERT INTO llx_c_hrm_function (rowid, pos, code, label, c_level, active) VALUES(2, 10, 'MANAGDIR', 'Managing director', 1, 1);
INSERT INTO llx_c_hrm_function (rowid, pos, code, label, c_level, active) VALUES(3, 15, 'ACCOUNTMANAG', 'Account manager', 0, 1);
INSERT INTO llx_c_hrm_function (rowid, pos, code, label, c_level, active) VALUES(4, 20, 'ENGAGDIR', 'Engagement director', 1, 1);
INSERT INTO llx_c_hrm_function (rowid, pos, code, label, c_level, active) VALUES(5, 25, 'DIRECTOR', 'Director', 1, 1);
INSERT INTO llx_c_hrm_function (rowid, pos, code, label, c_level, active) VALUES(6, 30, 'PROJMANAG', 'Project manager', 0, 1);
INSERT INTO llx_c_hrm_function (rowid, pos, code, label, c_level, active) VALUES(7, 35, 'DEPHEAD', 'Department head', 0, 1);
INSERT INTO llx_c_hrm_function (rowid, pos, code, label, c_level, active) VALUES(8, 40, 'SECRETAR', 'Secretary', 0, 1);
INSERT INTO llx_c_hrm_function (rowid, pos, code, label, c_level, active) VALUES(9, 45, 'EMPLOYEE', 'Department employee', 0, 1);
CREATE TABLE IF NOT EXISTS llx_c_hrm_department
(
rowid integer PRIMARY KEY,
pos smallint DEFAULT 0 NOT NULL,
code varchar(16) NOT NULL,
label varchar(50),
active smallint DEFAULT 1 NOT NULL
)ENGINE=innodb;
INSERT INTO llx_c_hrm_department (rowid, pos, code, label, active) VALUES(1, 5,'MANAGEMENT', 'Management', 1);
INSERT INTO llx_c_hrm_department (rowid, pos, code, label, active) VALUES(2, 10,'GESTION', 'Gestion', 1);
INSERT INTO llx_c_hrm_department (rowid, pos, code, label, active) VALUES(3, 15,'TRAINING', 'Training', 1);
INSERT INTO llx_c_hrm_department (rowid, pos, code, label, active) VALUES(4, 20,'IT', 'Inform. Technology (IT)', 1);
INSERT INTO llx_c_hrm_department (rowid, pos, code, label, active) VALUES(5, 25,'MARKETING', 'Marketing', 1);
INSERT INTO llx_c_hrm_department (rowid, pos, code, label, active) VALUES(6, 30,'SALES', 'Sales', 1);
INSERT INTO llx_c_hrm_department (rowid, pos, code, label, active) VALUES(7, 35,'LEGAL', 'Legal', 1);
INSERT INTO llx_c_hrm_department (rowid, pos, code, label, active) VALUES(8, 40,'FINANCIAL', 'Financial accounting', 1);
INSERT INTO llx_c_hrm_department (rowid, pos, code, label, active) VALUES(9, 45,'HUMANRES', 'Human resources', 1);
INSERT INTO llx_c_hrm_department (rowid, pos, code, label, active) VALUES(10, 50,'PURCHASING', 'Purchasing', 1);
INSERT INTO llx_c_hrm_department (rowid, pos, code, label, active) VALUES(11, 55,'SERVICES', 'Services', 1);
INSERT INTO llx_c_hrm_department (rowid, pos, code, label, active) VALUES(12, 60,'CUSTOMSERV', 'Customer service', 1);
INSERT INTO llx_c_hrm_department (rowid, pos, code, label, active) VALUES(13, 65,'CONSULTING', 'Consulting', 1);
INSERT INTO llx_c_hrm_department (rowid, pos, code, label, active) VALUES(14, 70,'LOGISTIC', 'Logistics', 1);
INSERT INTO llx_c_hrm_department (rowid, pos, code, label, active) VALUES(15, 75,'CONSTRUCT', 'Engineering/design', 1);
INSERT INTO llx_c_hrm_department (rowid, pos, code, label, active) VALUES(16, 80,'PRODUCTION', 'Manufacturing', 1);
INSERT INTO llx_c_hrm_department (rowid, pos, code, label, active) VALUES(17, 85,'QUALITY', 'Quality assurance', 1);
INSERT INTO llx_c_hrm_department (rowid, pos, code, label, active) VALUES(18, 85,'MAINT', 'Plant assurance', 1);
CREATE TABLE IF NOT EXISTS llx_establishment (
rowid integer NOT NULL auto_increment PRIMARY KEY,
entity integer NOT NULL DEFAULT 1,
name varchar(50),
address varchar(255),
zip varchar(25),
town varchar(50),
fk_state integer DEFAULT 0,
fk_country integer DEFAULT 0,
profid1 varchar(20),
profid2 varchar(20),
profid3 varchar(20),
phone varchar(20),
fk_user_author integer NOT NULL,
fk_user_mod integer NOT NULL,
datec datetime NOT NULL,
tms timestamp NOT NULL,
status smallint DEFAULT 1
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS llx_user_rib (
rowid integer AUTO_INCREMENT PRIMARY KEY,
fk_user integer NOT NULL,
entity integer DEFAULT 1 NOT NULL, -- multi company id
datec datetime,
tms timestamp,
label varchar(30),
bank varchar(255), -- bank name
code_banque varchar(128), -- bank code
code_guichet varchar(6), -- desk code
number varchar(255), -- account number
cle_rib varchar(5), -- key of bank account
bic varchar(11), -- 11 according to ISO 9362
iban_prefix varchar(34), -- full iban. 34 according to ISO 13616
domiciliation varchar(255),
proprio varchar(60),
owner_address varchar(255)
)ENGINE=innodb;
ALTER TABLE llx_projet_task_time ADD COLUMN invoice_id integer DEFAULT NULL;
ALTER TABLE llx_projet_task_time ADD COLUMN invoice_line_id integer DEFAULT NULL;
create table llx_stock_lotserial
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
entity integer,
fk_product integer NOT NULL, -- Id of product
batch varchar(30) DEFAULT NULL, -- Lot or serial number
eatby date DEFAULT NULL, -- Eatby date
sellby date DEFAULT NULL, -- Sellby date
datec datetime,
tms timestamp,
fk_user_creat integer,
fk_user_modif integer,
import_key integer
) ENGINE=innodb;
-- Add budget tables
create table llx_budget
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
entity integer NOT NULL DEFAULT 1,
label varchar(255) NOT NULL,
status integer,
note text,
date_start date,
date_end date,
datec datetime,
tms timestamp,
fk_user_creat integer,
fk_user_modif integer,
import_key integer
)ENGINE=innodb;
create table llx_budget_lines
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
fk_budget integer NOT NULL,
fk_project_ids varchar(255) NOT NULL, -- List of project ids related to this budget. If budget is dedicated to projects not yet started, we recommand to create a project 'Projects to come'.
amount double(24,8) NOT NULL,
datec datetime,
tms timestamp,
fk_user_creat integer,
fk_user_modif integer,
import_key integer
)ENGINE=innodb;
ALTER TABLE llx_budget_lines ADD UNIQUE INDEX uk_budget_lines (fk_budget, fk_project_ids);
-- Supprime orphelins pour permettre montee de la cle
-- MYSQL V4 DELETE llx_budget_lines FROM llx_budget_lines LEFT JOIN llx_budget ON llx_budget.rowid = llx_budget_lines.fk_budget WHERE llx_budget_lines.rowid IS NULL;
-- POSTGRESQL V8 DELETE FROM llx_budget_lines USING llx_budget WHERE llx_budget_lines.fk_budget NOT IN (SELECT llx_budget.rowid FROM llx_budget);
ALTER TABLE llx_budget_lines ADD CONSTRAINT fk_budget_lines_budget FOREIGN KEY (fk_budget) REFERENCES llx_budget (rowid);
-- Add position field
ALTER TABLE llx_c_typent ADD COLUMN position integer NOT NULL DEFAULT 0;
ALTER TABLE llx_c_forme_juridique ADD COLUMN position integer NOT NULL DEFAULT 0;
ALTER TABLE llx_c_type_fees ADD COLUMN position integer NOT NULL DEFAULT 0;
-- NEW Level multiprice generator based on per cent variations over base price
CREATE TABLE llx_product_pricerules
(
rowid INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
level INT NOT NULL, -- Which price level is this rule for?
fk_level INT NOT NULL, -- Price variations are made over price of X
var_percent FLOAT NOT NULL, -- Price variation over based price
var_min_percent FLOAT NOT NULL -- Min price discount over general price
);
ALTER TABLE llx_product ADD COLUMN price_autogen smallint DEFAULT 0;
ALTER TABLE llx_product_pricerules ADD CONSTRAINT unique_level UNIQUE (level);
-- Delete deprecated fields
ALTER TABLE llx_opensurvey_sondage DROP COLUMN survey_link_visible;
ALTER TABLE llx_opensurvey_sondage DROP INDEX idx_id_sondage_admin;
ALTER TABLE llx_opensurvey_sondage DROP COLUMN id_sondage_admin;
ALTER TABLE llx_opensurvey_sondage DROP COLUMN canedit;
ALTER TABLE llx_opensurvey_sondage DROP COLUMN origin;
DROP TABLE llx_opensurvey_sujet_studs;
CREATE TABLE llx_opensurvey_formquestions (
rowid INTEGER AUTO_INCREMENT NOT NULL PRIMARY KEY,
id_sondage VARCHAR(16),
question TEXT,
available_answers TEXT -- List of available answers
) ENGINE=InnoDB;
CREATE TABLE llx_opensurvey_user_formanswers (
fk_user_survey INTEGER NOT NULL,
fk_question INTEGER NOT NULL,
reponses TEXT
) ENGINE=InnoDB;
create table llx_categorie_project
(
fk_categorie integer NOT NULL,
fk_project integer NOT NULL,
import_key varchar(14)
)ENGINE=innodb;
-- Extrafields Expedition (shipment)
create table llx_expedition_extrafields
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
fk_object integer NOT NULL,
import_key varchar(14) -- import key
) ENGINE=innodb;
ALTER TABLE llx_expedition_extrafields ADD INDEX idx_expedition_extrafields (fk_object);
create table llx_expeditiondet_extrafields
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
fk_object integer NOT NULL, -- object id
import_key varchar(14) -- import key
)ENGINE=innodb;
ALTER TABLE llx_expeditiondet_extrafields ADD INDEX idx_expeditiondet_extrafields (fk_object);
-- Extrafields Expedition (delivery receipts)
create table llx_livraison_extrafields
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
fk_object integer NOT NULL,
import_key varchar(14) -- import key
) ENGINE=innodb;
ALTER TABLE llx_livraison_extrafields ADD INDEX idx_livraison_extrafields (fk_object);
create table llx_livraisondet_extrafields
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
fk_object integer NOT NULL, -- object id
import_key varchar(14) -- import key
)ENGINE=innodb;
ALTER TABLE llx_livraisondet_extrafields ADD INDEX idx_livraisondet_extrafields (fk_object);
ALTER TABLE llx_categorie_project ADD PRIMARY KEY pk_categorie_project (fk_categorie, fk_project);
ALTER TABLE llx_categorie_project ADD INDEX idx_categorie_project_fk_categorie (fk_categorie);
ALTER TABLE llx_categorie_project ADD INDEX idx_categorie_project_fk_project (fk_project);
ALTER TABLE llx_categorie_project ADD CONSTRAINT fk_categorie_project_categorie_rowid FOREIGN KEY (fk_categorie) REFERENCES llx_categorie (rowid);
ALTER TABLE llx_categorie_project ADD CONSTRAINT fk_categorie_project_fk_project FOREIGN KEY (fk_project) REFERENCES llx_projet (rowid);
ALTER TABLE llx_c_tva ADD COLUMN code varchar(10) DEFAULT '' after fk_pays;
-- VMYSQL4.0 DROP INDEX uk_c_tva_id ON llx_c_tva;
-- VPGSQL8.0 DROP INDEX uk_c_tva_id;
ALTER TABLE llx_c_tva ADD UNIQUE INDEX uk_c_tva_id (fk_pays, code, taux, recuperableonly);
-- Regions Bolivia (id country=52)
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5201, '', 0, 'Chuquisaca', 1);
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5202, '', 0, 'La Paz', 1);
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5203, '', 0, 'Cochabamba', 1);
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5204, '', 0, 'Oruro', 1);
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5205, '', 0, 'Potosí', 1);
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5206, '', 0, 'Tarija', 1);
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5207, '', 0, 'Santa Cruz', 1);
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5208, '', 0, 'El Beni', 1);
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5209, '', 0, 'Pando', 1);
-- Provinces Bolivia (id country=52)
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('001', 5201, '', 0, '', 'Belisario Boeto', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('002', 5201, '', 0, '', 'Hernando Siles', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('003', 5201, '', 0, '', 'Jaime Zudáñez', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('004', 5201, '', 0, '', 'Juana Azurduy de Padilla', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('005', 5201, '', 0, '', 'Luis Calvo', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('006', 5201, '', 0, '', 'Nor Cinti', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('007', 5201, '', 0, '', 'Oropeza', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('008', 5201, '', 0, '', 'Sud Cinti', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('009', 5201, '', 0, '', 'Tomina', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('010', 5201, '', 0, '', 'Yamparáez', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('011', 5202, '', 0, '', 'Abel Iturralde', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('012', 5202, '', 0, '', 'Aroma', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('013', 5202, '', 0, '', 'Bautista Saavedra', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('014', 5202, '', 0, '', 'Caranavi', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('015', 5202, '', 0, '', 'Eliodoro Camacho', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('016', 5202, '', 0, '', 'Franz Tamayo', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('017', 5202, '', 0, '', 'Gualberto Villarroel', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('018', 5202, '', 0, '', 'Ingaví', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('019', 5202, '', 0, '', 'Inquisivi', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('020', 5202, '', 0, '', 'José Ramón Loayza', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('021', 5202, '', 0, '', 'Larecaja', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('022', 5202, '', 0, '', 'Los Andes (Bolivia)', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('023', 5202, '', 0, '', 'Manco Kapac', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('024', 5202, '', 0, '', 'Muñecas', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('025', 5202, '', 0, '', 'Nor Yungas', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('026', 5202, '', 0, '', 'Omasuyos', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('027', 5202, '', 0, '', 'Pacajes', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('028', 5202, '', 0, '', 'Pedro Domingo Murillo', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('029', 5202, '', 0, '', 'Sud Yungas', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('030', 5202, '', 0, '', 'General José Manuel Pando', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('031', 5203, '', 0, '', 'Arani', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('032', 5203, '', 0, '', 'Arque', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('033', 5203, '', 0, '', 'Ayopaya', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('034', 5203, '', 0, '', 'Bolívar (Bolivia)', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('035', 5203, '', 0, '', 'Campero', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('036', 5203, '', 0, '', 'Capinota', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('037', 5203, '', 0, '', 'Cercado (Cochabamba)', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('038', 5203, '', 0, '', 'Esteban Arze', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('039', 5203, '', 0, '', 'Germán Jordán', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('040', 5203, '', 0, '', 'José Carrasco', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('041', 5203, '', 0, '', 'Mizque', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('042', 5203, '', 0, '', 'Punata', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('043', 5203, '', 0, '', 'Quillacollo', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('044', 5203, '', 0, '', 'Tapacarí', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('045', 5203, '', 0, '', 'Tiraque', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('046', 5203, '', 0, '', 'Chapare', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('047', 5204, '', 0, '', 'Carangas', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('048', 5204, '', 0, '', 'Cercado (Oruro)', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('049', 5204, '', 0, '', 'Eduardo Avaroa', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('050', 5204, '', 0, '', 'Ladislao Cabrera', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('051', 5204, '', 0, '', 'Litoral de Atacama', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('052', 5204, '', 0, '', 'Mejillones', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('053', 5204, '', 0, '', 'Nor Carangas', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('054', 5204, '', 0, '', 'Pantaleón Dalence', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('055', 5204, '', 0, '', 'Poopó', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('056', 5204, '', 0, '', 'Sabaya', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('057', 5204, '', 0, '', 'Sajama', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('058', 5204, '', 0, '', 'San Pedro de Totora', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('059', 5204, '', 0, '', 'Saucarí', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('060', 5204, '', 0, '', 'Sebastián Pagador', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('061', 5204, '', 0, '', 'Sud Carangas', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('062', 5204, '', 0, '', 'Tomás Barrón', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('063', 5205, '', 0, '', 'Alonso de Ibáñez', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('064', 5205, '', 0, '', 'Antonio Quijarro', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('065', 5205, '', 0, '', 'Bernardino Bilbao', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('066', 5205, '', 0, '', 'Charcas (Potosí)', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('067', 5205, '', 0, '', 'Chayanta', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('068', 5205, '', 0, '', 'Cornelio Saavedra', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('069', 5205, '', 0, '', 'Daniel Campos', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('070', 5205, '', 0, '', 'Enrique Baldivieso', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('071', 5205, '', 0, '', 'José María Linares', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('072', 5205, '', 0, '', 'Modesto Omiste', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('073', 5205, '', 0, '', 'Nor Chichas', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('074', 5205, '', 0, '', 'Nor Lípez', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('075', 5205, '', 0, '', 'Rafael Bustillo', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('076', 5205, '', 0, '', 'Sud Chichas', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('077', 5205, '', 0, '', 'Sud Lípez', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('078', 5205, '', 0, '', 'Tomás Frías', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('079', 5206, '', 0, '', 'Aniceto Arce', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('080', 5206, '', 0, '', 'Burdet O''Connor', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('081', 5206, '', 0, '', 'Cercado (Tarija)', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('082', 5206, '', 0, '', 'Eustaquio Méndez', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('083', 5206, '', 0, '', 'José María Avilés', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('084', 5206, '', 0, '', 'Gran Chaco', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('085', 5207, '', 0, '', 'Andrés Ibáñez', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('086', 5207, '', 0, '', 'Caballero', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('087', 5207, '', 0, '', 'Chiquitos', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('088', 5207, '', 0, '', 'Cordillera (Bolivia)', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('089', 5207, '', 0, '', 'Florida', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('090', 5207, '', 0, '', 'Germán Busch', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('091', 5207, '', 0, '', 'Guarayos', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('092', 5207, '', 0, '', 'Ichilo', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('093', 5207, '', 0, '', 'Obispo Santistevan', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('094', 5207, '', 0, '', 'Sara', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('095', 5207, '', 0, '', 'Vallegrande', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('096', 5207, '', 0, '', 'Velasco', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('097', 5207, '', 0, '', 'Warnes', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('098', 5207, '', 0, '', 'Ángel Sandóval', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('099', 5207, '', 0, '', 'Ñuflo de Chaves', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('100', 5208, '', 0, '', 'Cercado (Beni)', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('101', 5208, '', 0, '', 'Iténez', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('102', 5208, '', 0, '', 'Mamoré', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('103', 5208, '', 0, '', 'Marbán', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('104', 5208, '', 0, '', 'Moxos', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('105', 5208, '', 0, '', 'Vaca Díez', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('106', 5208, '', 0, '', 'Yacuma', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('107', 5208, '', 0, '', 'General José Ballivián Segurola', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('108', 5209, '', 0, '', 'Abuná', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('109', 5209, '', 0, '', 'Madre de Dios', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('110', 5209, '', 0, '', 'Manuripi', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('111', 5209, '', 0, '', 'Nicolás Suárez', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('112', 5209, '', 0, '', 'General Federico Román', 1);
-- Regions Austria (id country=41)
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 41, 4101, '', 0, 'Österreich', 1);
-- Provinces Austria (id country=41)
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (4101,'B','BURGENLAND','Burgenland',1);
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (4101,'K','KAERNTEN','Kärnten',1);
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (4101,'N','NIEDEROESTERREICH','Niederösterreich',1);
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (4101,'O','OBEROESTERREICH','Oberösterreich',1);
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (4101,'S','SALZBURG','Salzburg',1);
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (4101,'ST','STEIERMARK','Steiermark',1);
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (4101,'T','TIROL','Tirol',1);
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (4101,'V','VORARLBERG','Vorarlberg',1);
INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (4101,'W','WIEN','Wien',1);
-- Juridical status Austria
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (41, '4100', 'GmbH - Gesellschaft mit beschränkter Haftung', 1);
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (41, '4101', 'GesmbH - Gesellschaft mit beschränkter Haftung', 1);
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (41, '4102', 'AG - Aktiengesellschaft', 1);
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (41, '4103', 'EWIV - Europäische wirtschaftliche Interessenvereinigung', 1);
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (41, '4104', 'KEG - Kommanditerwerbsgesellschaft', 1);
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (41, '4105', 'OEG - Offene Erwerbsgesellschaft', 1);
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (41, '4106', 'OHG - Offene Handelsgesellschaft', 1);
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (41, '4107', 'AG & Co KG - Kommanditgesellschaft', 1);
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (41, '4108', 'GmbH & Co KG - Kommanditgesellschaft', 1);
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (41, '4109', 'KG - Kommanditgesellschaft', 1);
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (41, '4110', 'OG - Offene Gesellschaft', 1);
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (41, '4111', 'GbR - Gesellschaft nach bürgerlichem Recht', 1);
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (41, '4112', 'GesbR - Gesellschaft nach bürgerlichem Recht', 1);
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (41, '4113', 'GesnbR - Gesellschaft nach bürgerlichem Recht', 1);
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (41, '4114', 'e.U. - eingetragener Einzelunternehmer', 1);
-- Social contributions Austria
insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values (4101, 'Krankenversicherung', 1,1,'TAXATKV' ,'41');
insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values (4102, 'Unfallversicherung', 1,1,'TAXATUV' ,'41');
insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values (4103, 'Pensionsversicherung', 1,1,'TAXATPV' ,'41');
insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values (4104, 'Arbeitslosenversicherung', 1,1,'TAXATAV' ,'41');
insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values (4105, 'Insolvenzentgeltsicherungsfond', 1,1,'TAXATIESG' ,'41');
insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values (4106, 'Wohnbauförderung', 1,1,'TAXATWF' ,'41');
insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values (4107, 'Arbeiterkammerumlage', 1,1,'TAXATAK' ,'41');
insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values (4108, 'Mitarbeitervorsorgekasse', 1,1,'TAXATMVK' ,'41');
insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values (4109, 'Familienlastenausgleichsfond', 1,1,'TAXATFLAF' ,'41');
ALTER TABLE llx_accounting_bookkeeping MODIFY COLUMN doc_ref varchar(300) NOT NULL;
ALTER TABLE llx_holiday ADD COLUMN tms timestamp;
ALTER TABLE llx_holiday ADD COLUMN entity integer DEFAULT 1 NOT NULL;
ALTER TABLE llx_holiday ADD INDEX idx_holiday_entity (entity);
-- Fix Argentina provences
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2326', 2305, '', 0, 'MISIONES', 'Misiones', 1);
UPDATE llx_c_departements SET ncc = 'FORMOSA', nom = 'Formosa' WHERE nom = 'Formosa Misiones';
-- MALTA VATS (id country=148)
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (1481, 148, '18','0','VAT standard rate',1);
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (1482, 148, '7','0','VAT reduced rate',1);
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (1483, 148, '5','0','VAT super-reduced rate', 1);
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (1484, 148, '0','0','VAT Rate 0', 1);
-- VMYSQL4.1 ALTER TABLE llx_c_type_resource CHANGE COLUMN rowid rowid integer NOT NULL AUTO_INCREMENT;
ALTER TABLE llx_import_model MODIFY COLUMN type varchar(50);
-- Negative buying prices
UPDATE llx_facturedet SET buy_price_ht = ABS(buy_price_ht)
|
----------------------------------------------------------------
-- [vds_spm_id_map] Table
--
Create or replace FUNCTION Insertvds_spm_id_map(v_storage_pool_id UUID,
v_vds_id UUID,
v_vds_spm_id INTEGER)
RETURNS VOID
AS $procedure$
BEGIN
INSERT INTO vds_spm_id_map(storage_pool_id, vds_id, vds_spm_id)
VALUES(v_storage_pool_id, v_vds_id, v_vds_spm_id);
END; $procedure$
LANGUAGE plpgsql;
Create or replace FUNCTION Deletevds_spm_id_map(v_vds_id UUID)
RETURNS VOID
AS $procedure$
BEGIN
DELETE FROM vds_spm_id_map
WHERE vds_id = v_vds_id;
END; $procedure$
LANGUAGE plpgsql;
Create or replace FUNCTION DeleteByPoolvds_spm_id_map(v_vds_id UUID, v_storage_pool_id UUID)
RETURNS VOID
AS $procedure$
BEGIN
DELETE FROM vds_spm_id_map
WHERE vds_id = v_vds_id AND storage_pool_id = v_storage_pool_id;
END; $procedure$
LANGUAGE plpgsql;
Create or replace FUNCTION GetAllFromvds_spm_id_map() RETURNS SETOF vds_spm_id_map
AS $procedure$
BEGIN
RETURN QUERY SELECT vds_spm_id_map.*
FROM vds_spm_id_map;
END; $procedure$
LANGUAGE plpgsql;
Create or replace FUNCTION Getvds_spm_id_mapBystorage_pool_idAndByvds_spm_id(v_storage_pool_id UUID,
v_vds_spm_id INTEGER) RETURNS SETOF vds_spm_id_map
AS $procedure$
BEGIN
RETURN QUERY SELECT vds_spm_id_map.*
FROM vds_spm_id_map
WHERE storage_pool_id = v_storage_pool_id AND vds_spm_id = v_vds_spm_id;
END; $procedure$
LANGUAGE plpgsql;
Create or replace FUNCTION Getvds_spm_id_mapBystorage_pool_id(v_storage_pool_id UUID) RETURNS SETOF vds_spm_id_map
AS $procedure$
BEGIN
RETURN QUERY SELECT vds_spm_id_map.*
FROM vds_spm_id_map
WHERE storage_pool_id = v_storage_pool_id;
END; $procedure$
LANGUAGE plpgsql;
Create or replace FUNCTION Getvds_spm_id_mapByvds_id(v_vds_id UUID) RETURNS SETOF vds_spm_id_map
AS $procedure$
BEGIN
RETURN QUERY SELECT vds_spm_id_map.*
FROM vds_spm_id_map
WHERE vds_id = v_vds_id;
END; $procedure$
LANGUAGE plpgsql;
|
/*
* Business Process Definition: Project Approval (project_approval_wf)
* Auto-generated by ACS Workflow Export, version 4.3
*/
/*
* Cases table
*/
create table project_approval_wf_cases (
case_id integer primary key
references wf_cases on delete cascade
);
/*
* Declare the object type
*/
create function inline_0 () returns integer as '
begin
PERFORM workflow__create_workflow (
''project_approval_wf'',
''Project Approval'',
''Project Approval'',
'''',
''project_approval_wf_cases'',
''case_id''
);
return null;
end;' language 'plpgsql';
select inline_0 ();
drop function inline_0 ();
/*****
* Places
*****/
select workflow__add_place(
'project_approval_wf',
'start',
'Ready to Modify',
null
);
select workflow__add_place(
'project_approval_wf',
'before_approve',
'Ready to Approve',
null
);
select workflow__add_place(
'project_approval_wf',
'before_approved',
'Ready to Approved',
null
);
select workflow__add_place(
'project_approval_wf',
'before_deleted',
'Ready to Deleted',
null
);
select workflow__add_place(
'project_approval_wf',
'end',
'Process finished',
null
);
/*****
* Roles
*****/
select workflow__add_role (
'project_approval_wf',
'modify',
'Modify',
1
);
select workflow__add_role (
'project_approval_wf',
'approve',
'Approve',
2
);
select workflow__add_role (
'project_approval_wf',
'approved',
'Approved',
3
);
select workflow__add_role (
'project_approval_wf',
'deleted',
'Deleted',
4
);
/*****
* Transitions
*****/
select workflow__add_transition (
'project_approval_wf',
'modify',
'Modify',
'modify',
1,
'user'
);
select workflow__add_transition (
'project_approval_wf',
'approve',
'Approve',
'approve',
2,
'user'
);
select workflow__add_transition (
'project_approval_wf',
'approved',
'Approved',
'approved',
3,
'automatic'
);
select workflow__add_transition (
'project_approval_wf',
'deleted',
'Deleted',
'deleted',
4,
'automatic'
);
/*****
* Arcs
*****/
select workflow__add_arc (
'project_approval_wf',
'approve',
'start',
'out',
'#',
'',
'Not Approve this Project Bundle'
);
select workflow__add_arc (
'project_approval_wf',
'approve',
'before_approved',
'out',
'wf_callback__guard_attribute_true',
'approve_approve_this_project_bundle_p',
'Approve this Project Bundle'
);
select workflow__add_arc (
'project_approval_wf',
'approve',
'before_approve',
'in',
'',
'',
''
);
select workflow__add_arc (
'project_approval_wf',
'approved',
'end',
'out',
'',
'',
''
);
select workflow__add_arc (
'project_approval_wf',
'approved',
'before_approved',
'in',
'',
'',
''
);
select workflow__add_arc (
'project_approval_wf',
'deleted',
'before_deleted',
'in',
'',
'',
''
);
select workflow__add_arc (
'project_approval_wf',
'deleted',
'end',
'out',
'',
'',
''
);
select workflow__add_arc (
'project_approval_wf',
'modify',
'start',
'in',
'',
'',
''
);
select workflow__add_arc (
'project_approval_wf',
'modify',
'before_approve',
'out',
'',
'',
''
);
/*****
* Attributes
*****/
select workflow__create_attribute(
'project_approval_wf',
'approve_approve_this_project_bundle_p',
'boolean',
'Approve this Project Bundle',
null,
null,
null,
't',
1,
1,
null,
'generic'
);
select workflow__add_trans_attribute_map(
'project_approval_wf',
'approve',
'approve_approve_this_project_bundle_p',
1
);
/*
* Context/Transition info
* (for context = default)
*/
insert into wf_context_transition_info (
context_key,
workflow_key,
transition_key,
estimated_minutes,
instructions,
enable_callback,
enable_custom_arg,
fire_callback,
fire_custom_arg,
time_callback,
time_custom_arg,
deadline_callback,
deadline_custom_arg,
deadline_attribute_name,
hold_timeout_callback,
hold_timeout_custom_arg,
notification_callback,
notification_custom_arg,
unassigned_callback,
unassigned_custom_arg
) values (
'default',
'project_approval_wf',
'deleted',
0,
'',
'',
'',
'im_workflow__set_object_status_id',
'3812',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
''
);
insert into wf_context_transition_info(
context_key,
workflow_key,
transition_key,
estimated_minutes,
instructions,
enable_callback,
enable_custom_arg,
fire_callback,
fire_custom_arg,
time_callback,
time_custom_arg,
deadline_callback,
deadline_custom_arg,
deadline_attribute_name,
hold_timeout_callback,
hold_timeout_custom_arg,
notification_callback,
notification_custom_arg,
unassigned_callback,
unassigned_custom_arg
) values (
'default',
'project_approval_wf',
'approved',
0,
'',
'',
'',
'im_workflow__set_object_status_id',
'3802',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
''
);
insert into wf_context_transition_info (
context_key,
workflow_key,
transition_key,
estimated_minutes,
instructions,
enable_callback,
enable_custom_arg,
fire_callback,
fire_custom_arg,
time_callback,
time_custom_arg,
deadline_callback,
deadline_custom_arg,
deadline_attribute_name,
hold_timeout_callback,
hold_timeout_custom_arg,
notification_callback,
notification_custom_arg,
unassigned_callback,
unassigned_custom_arg
) values (
'default',
'project_approval_wf',
'modify',
5,
'',
'',
'',
'im_workflow__set_object_status_id',
'3816',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'im_workflow__assign_to_owner',
''
);
insert into wf_context_transition_info (
context_key,
workflow_key,
transition_key,
estimated_minutes,
instructions,
enable_callback,
enable_custom_arg,
fire_callback,
fire_custom_arg,
time_callback,
time_custom_arg,
deadline_callback,
deadline_custom_arg,
deadline_attribute_name,
hold_timeout_callback,
hold_timeout_custom_arg,
notification_callback,
notification_custom_arg,
unassigned_callback,
unassigned_custom_arg
) values (
'default',
'project_approval_wf',
'approve',
5,
'',
'',
'',
'im_workflow__set_object_status_id',
'3818',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'im_workflow__assign_to_supervisor',
''
);
/*
* Context Task Panels
* (for context = default)
*/
insert into wf_context_task_panels (
context_key,
workflow_key,
transition_key,
sort_order,
header,
template_url,
overrides_action_p,
overrides_both_panels_p,
only_display_when_started_p
) values (
'default',
'project_approval_wf',
'approve',
1,
'Approve Project Bundle',
'/packages/intranet-projects-workflow/www/bundle-panel',
'f',
'f',
'f'
);
insert into wf_context_task_panels (
context_key,
workflow_key,
transition_key,
sort_order,
header,
template_url,
overrides_action_p,
overrides_both_panels_p,
only_display_when_started_p
) values (
'default',
'project_approval_wf',
'modify',
1,
'Modify Project Bundle',
'/packages/intranet-projects-workflow/www/bundle-panel',
'f',
't',
'f'
);
|
--
-- This script performs initial setup of the database.
--
CREATE TABLE User
(
user_id INT AUTO_INCREMENT NOT NULL,
username VARCHAR(32) NOT NULL,
password BINARY(60) NOT NULL,
wins INT DEFAULT 0 NOT NULL,
losses INT DEFAULT 0 NOT NULL,
CONSTRAINT User_pk
PRIMARY KEY (user_id)
);
CREATE UNIQUE INDEX User_username_uindex ON User (username);
-- A User record is equivalent to a player
CREATE TABLE Game
(
game_id INT AUTO_INCREMENT NOT NULL,
player_north INT DEFAULT NULL,
player_south INT DEFAULT NULL,
player_east INT DEFAULT NULL,
player_west INT DEFAULT NULL,
last_activity DATETIME NOT NULL,
state ENUM('FILLING','IN_PROGRESS','ABANDONED','FORFEITED','COMPLETED') NOT NULL DEFAULT 'FILLING',
ns_win TINYINT(1) DEFAULT NULL,
CONSTRAINT Game_pk
PRIMARY KEY (game_id),
CONSTRAINT Game_User_fk1
FOREIGN KEY (player_north) REFERENCES User (`user_id`)
ON UPDATE CASCADE ON DELETE SET NULL,
CONSTRAINT Game_User_fk2
FOREIGN KEY (player_south) REFERENCES User (`user_id`)
ON UPDATE CASCADE ON DELETE SET NULL,
CONSTRAINT Game_User_fk3
FOREIGN KEY (player_east) REFERENCES User (`user_id`)
ON UPDATE CASCADE ON DELETE SET NULL,
CONSTRAINT Game_User_fk4
FOREIGN KEY (player_west) REFERENCES User (`user_id`)
ON UPDATE CASCADE ON DELETE SET NULL
);
-- Each record in the Game table is a single instance of a game of spades
-- last_activity represents last time at which game had an update
-- updates include player joining game, card being played, and game changing state
-- 'ABANDONED' state denotes a game which never filled all four player slots
-- 'FORFEITED' state denotes a game in which some player timed out on their turn
-- Games in the 'FILLING' state should time out some amount of time relative to last_activity
-- Who won? When state is 'FORFEITED' or 'COMPLETED', check ns_win value to see if North/South team won.
-- If ns_win=True, then North/South team won. If ns_win=False, then East/West team won.
-- There are no ties/draws. The only end state without a win or loss is 'ABANDONED' which does not count towards total games played for a player.
CREATE TABLE Hand
(
game_id INT NOT NULL,
hand_number INT NOT NULL,
dealer ENUM('NORTH','SOUTH','EAST','WEST') NOT NULL,
north_bid INT DEFAULT NULL,
south_bid INT DEFAULT NULL,
east_bid INT DEFAULT NULL,
west_bid INT DEFAULT NULL,
spades_broken TINYINT(1) NOT NULL DEFAULT FALSE,
ns_bags_at_end INT DEFAULT NULL,
ew_bags_at_end INT DEFAULT NULL,
ns_score_after_bags INT DEFAULT NULL,
ew_score_after_bags INT DEFAULT NULL,
CONSTRAINT Hand_pk
PRIMARY KEY (game_id, hand_number),
CONSTRAINT Hand_Game_fk
FOREIGN KEY (game_id) REFERENCES Game (`game_id`)
ON UPDATE CASCADE ON DELETE CASCADE
);
-- Each record in the Hand table is a single hand (or "round") of a specific Game of spades
-- hand_number starts at 1 (one), marks the order of hands in a Game
-- Blind bidding is not supported in this model. Players can bid Nil (0), or 1 through 13.
-- dealer for hand_number=1 should be determined randomly. Thereafter, dealer rotates clockwise.
CREATE TABLE HandCard
(
game_id INT NOT NULL,
hand_number INT NOT NULL,
user_id INT NOT NULL,
card CHAR(3) NOT NULL,
played TINYINT(1) NOT NULL DEFAULT FALSE,
CONSTRAINT HandCard_pk
PRIMARY KEY (game_id, hand_number, user_id, card),
CONSTRAINT HandCard_Hand_fk
FOREIGN KEY (game_id, hand_number) REFERENCES Hand (game_id, hand_number),
CONSTRAINT HandCard_User_fk
FOREIGN KEY (user_id) REFERENCES User (user_id)
);
CREATE TABLE Trick
(
game_id INT NOT NULL,
hand_number INT NOT NULL,
trick_number INT NOT NULL,
lead_player ENUM('NORTH','SOUTH','EAST','WEST') NOT NULL,
lead_suit ENUM('S','H','C','D') DEFAULT NULL,
north_play CHAR(3) DEFAULT NULL,
south_play CHAR(3) DEFAULT NULL,
east_play CHAR(3) DEFAULT NULL,
west_play CHAR(3) DEFAULT NULL,
winner ENUM('NORTH','SOUTH','EAST','WEST') DEFAULT NULL,
CONSTRAINT Trick_pk
PRIMARY KEY (game_id, hand_number, trick_number),
CONSTRAINT Trick_Hand_fk
FOREIGN KEY (game_id, hand_number) REFERENCES Hand (game_id, hand_number)
);
-- trick_number works just like hand_number from Hand description
-- lead_player is 1 clockwise of Hand.dealer for trick_number==1
--
-- This event manages timing out games due to inactivity
--
CREATE EVENT spades_game_timeout
ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO
BEGIN
DECLARE done INT DEFAULT FALSE;
DECLARE gameid INT;
DECLARE pnorth, psouth, peast, pwest INT;
DECLARE leaddir ENUM('NORTH','SOUTH','EAST','WEST');
DECLARE nplay, splay, eplay, wplay CHAR(3);
DECLARE cur1 CURSOR FOR SELECT game_id, player_north, player_south, player_east, player_west
FROM Game WHERE state='IN_PROGRESS' AND last_activity + INTERVAL 1 HOUR < CURRENT_TIMESTAMP;
DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
UPDATE Game SET state='ABANDONED' WHERE state='FILLING' AND last_activity + INTERVAL 1 HOUR < CURRENT_TIMESTAMP;
OPEN cur1;
read_loop: LOOP
FETCH cur1 INTO gameid, pnorth, psouth, peast, pwest;
IF done THEN
LEAVE read_loop;
END IF;
SELECT lead_player, north_play, south_play, east_play, west_play
INTO leaddir, nplay, splay, eplay, wplay
FROM Trick
WHERE game_id=gameid
ORDER BY hand_number DESC, trick_number DESC LIMIT 1;
IF nplay IS NULL AND splay IS NULL AND eplay IS NULL AND wplay IS NULL THEN
-- Trick leader timed out
IF leaddir = 'NORTH' OR leaddir = 'SOUTH' THEN
UPDATE Game SET state='FORFEITED', ns_win=0 WHERE game_id=gameid;
UPDATE User SET losses=losses+1 WHERE user_id IN (pnorth, psouth);
UPDATE User SET wins=wins+1 WHERE user_id IN (peast, pwest);
ELSEIF leaddir = 'EAST' OR leaddir = 'WEST' THEN
UPDATE Game SET state='FORFEITED', ns_win=1 WHERE game_id=gameid;
UPDATE User SET losses=losses+1 WHERE user_id IN (peast, pwest);
UPDATE User SET wins=wins+1 WHERE user_id IN (pnorth, psouth);
END IF;
ELSEIF nplay IS NOT NULL AND eplay IS NULL THEN
-- East timed out
UPDATE Game SET state='FORFEITED', ns_win=1 WHERE game_id=gameid;
UPDATE User SET losses=losses+1 WHERE user_id IN (peast, pwest);
UPDATE User SET wins=wins+1 WHERE user_id IN (pnorth, psouth);
ELSEIF splay IS NOT NULL AND wplay IS NULL THEN
-- West timed out
UPDATE Game SET state='FORFEITED', ns_win=1 WHERE game_id=gameid;
UPDATE User SET losses=losses+1 WHERE user_id IN (peast, pwest);
UPDATE User SET wins=wins+1 WHERE user_id IN (pnorth, psouth);
ELSEIF eplay IS NOT NULL AND splay IS NULL THEN
-- South timed out
UPDATE Game SET state='FORFEITED', ns_win=0 WHERE game_id=gameid;
UPDATE User SET losses=losses+1 WHERE user_id IN (pnorth, psouth);
UPDATE User SET wins=wins+1 WHERE user_id IN (peast, pwest);
ELSEIF wplay IS NOT NULL AND nplay IS NULL THEN
-- North timed out
UPDATE Game SET state='FORFEITED', ns_win=0 WHERE game_id=gameid;
UPDATE User SET losses=losses+1 WHERE user_id IN (pnorth, psouth);
UPDATE User SET wins=wins+1 WHERE user_id IN (peast, pwest);
END IF;
END LOOP;
CLOSE cur1;
END;
|
-- ########## TIME STATIC TESTS ##########
\set ON_ERROR_ROLLBACK 1
\set ON_ERROR_STOP true
BEGIN;
SELECT set_config('search_path','partman, public',false);
SELECT plan(128);
CREATE SCHEMA partman_test;
CREATE ROLE partman_basic;
CREATE ROLE partman_revoke;
CREATE ROLE partman_owner;
CREATE TABLE partman_test.time_static_table (col1 int primary key, col2 text, col3 timestamptz NOT NULL DEFAULT now());
INSERT INTO partman_test.time_static_table (col1, col3) VALUES (generate_series(1,10), CURRENT_TIMESTAMP);
GRANT SELECT,INSERT,UPDATE ON partman_test.time_static_table TO partman_basic;
GRANT ALL ON partman_test.time_static_table TO partman_revoke;
SELECT create_parent('partman_test.time_static_table', 'col3', 'time-static', 'quarterly');
SELECT has_table('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP, 'YYYY"q"Q'), 'Check time_static_table_'||to_char(CURRENT_TIMESTAMP, 'YYYY"q"Q')||' exists');
SELECT has_table('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'3 months'::interval, 'YYYY"q"Q'),
'Check time_static_table_'||to_char(CURRENT_TIMESTAMP+'3 months'::interval, 'YYYY"q"Q')||' exists');
SELECT has_table('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'6 months'::interval, 'YYYY"q"Q'),
'Check time_static_table_'||to_char(CURRENT_TIMESTAMP+'6 months'::interval, 'YYYY"q"Q')||' exists');
SELECT has_table('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'9 months'::interval, 'YYYY"q"Q'),
'Check time_static_table_'||to_char(CURRENT_TIMESTAMP+'9 months'::interval, 'YYYY"q"Q')||' exists');
SELECT has_table('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'12 months'::interval, 'YYYY"q"Q'),
'Check time_static_table_'||to_char(CURRENT_TIMESTAMP+'12 months'::interval, 'YYYY"q"Q')||' exists');
SELECT hasnt_table('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'15 months'::interval, 'YYYY"q"Q'),
'Check time_static_table_'||to_char(CURRENT_TIMESTAMP+'15 months'::interval, 'YYYY"q"Q')||' does not exist');
SELECT has_table('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP-'3 months'::interval, 'YYYY"q"Q'),
'Check time_static_table_'||to_char(CURRENT_TIMESTAMP-'3 months'::interval, 'YYYY"q"Q')||' exists');
SELECT has_table('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP-'6 months'::interval, 'YYYY"q"Q'),
'Check time_static_table_'||to_char(CURRENT_TIMESTAMP-'6 months'::interval, 'YYYY"q"Q')||' exists');
SELECT has_table('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP-'9 months'::interval, 'YYYY"q"Q'),
'Check time_static_table_'||to_char(CURRENT_TIMESTAMP-'9 months'::interval, 'YYYY"q"Q')||' exists');
SELECT has_table('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP-'12 months'::interval, 'YYYY"q"Q'),
'Check time_static_table_'||to_char(CURRENT_TIMESTAMP-'12 months'::interval, 'YYYY"q"Q')||' exists');
SELECT hasnt_table('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP-'15 months'::interval, 'YYYY"q"Q'),
'Check time_static_table_'||to_char(CURRENT_TIMESTAMP-'15 months'::interval, 'YYYY"q"Q')||' does not exist');
SELECT col_is_pk('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP, 'YYYY"q"Q'), ARRAY['col1'],
'Check for primary key in time_static_table_p'||to_char(CURRENT_TIMESTAMP, 'YYYY"q"Q'));
SELECT col_is_pk('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'3 months'::interval, 'YYYY"q"Q'), ARRAY['col1'],
'Check for primary key in time_static_table_p'||to_char(CURRENT_TIMESTAMP+'3 months'::interval, 'YYYY"q"Q'));
SELECT col_is_pk('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'6 months'::interval, 'YYYY"q"Q'), ARRAY['col1'],
'Check for primary key in time_static_table_p'||to_char(CURRENT_TIMESTAMP+'6 months'::interval, 'YYYY"q"Q'));
SELECT col_is_pk('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'9 months'::interval, 'YYYY"q"Q'), ARRAY['col1'],
'Check for primary key in time_static_table_p'||to_char(CURRENT_TIMESTAMP+'9 months'::interval, 'YYYY"q"Q'));
SELECT col_is_pk('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'12 months'::interval, 'YYYY"q"Q'), ARRAY['col1'],
'Check for primary key in time_static_table_p'||to_char(CURRENT_TIMESTAMP+'12 months'::interval, 'YYYY"q"Q'));
SELECT col_is_pk('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP, 'YYYY"q"Q'), ARRAY['col1'],
'Check for primary key in time_static_table_p'||to_char(CURRENT_TIMESTAMP, 'YYYY"q"Q'));
SELECT col_is_pk('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP-'3 months'::interval, 'YYYY"q"Q'), ARRAY['col1'],
'Check for primary key in time_static_table_p'||to_char(CURRENT_TIMESTAMP-'3 months'::interval, 'YYYY"q"Q'));
SELECT col_is_pk('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP-'6 months'::interval, 'YYYY"q"Q'), ARRAY['col1'],
'Check for primary key in time_static_table_p'||to_char(CURRENT_TIMESTAMP-'6 months'::interval, 'YYYY"q"Q'));
SELECT col_is_pk('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP-'9 months'::interval, 'YYYY"q"Q'), ARRAY['col1'],
'Check for primary key in time_static_table_p'||to_char(CURRENT_TIMESTAMP-'9 months'::interval, 'YYYY"q"Q'));
SELECT col_is_pk('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP-'12 months'::interval, 'YYYY"q"Q'), ARRAY['col1'],
'Check for primary key in time_static_table_p'||to_char(CURRENT_TIMESTAMP-'12 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP, 'YYYY"q"Q'), 'partman_basic',
ARRAY['SELECT','INSERT','UPDATE'],
'Check partman_basic privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'3 months'::interval, 'YYYY"q"Q'), 'partman_basic',
ARRAY['SELECT','INSERT','UPDATE'],
'Check partman_basic privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP+'3 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'6 months'::interval, 'YYYY"q"Q'), 'partman_basic',
ARRAY['SELECT','INSERT','UPDATE'],
'Check partman_basic privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP+'6 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'9 months'::interval, 'YYYY"q"Q'), 'partman_basic',
ARRAY['SELECT','INSERT','UPDATE'],
'Check partman_basic privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP+'9 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'12 months'::interval, 'YYYY"q"Q'), 'partman_basic',
ARRAY['SELECT','INSERT','UPDATE'],
'Check partman_basic privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP+'12 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP-'3 months'::interval, 'YYYY"q"Q'), 'partman_basic',
ARRAY['SELECT','INSERT','UPDATE'],
'Check partman_basic privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP-'3 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP-'6 months'::interval, 'YYYY"q"Q'), 'partman_basic',
ARRAY['SELECT','INSERT','UPDATE'],
'Check partman_basic privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP-'6 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP-'9 months'::interval, 'YYYY"q"Q'), 'partman_basic',
ARRAY['SELECT','INSERT','UPDATE'],
'Check partman_basic privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP-'9 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP-'12 months'::interval, 'YYYY"q"Q'), 'partman_basic',
ARRAY['SELECT','INSERT','UPDATE'],
'Check partman_basic privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP-'12 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP, 'YYYY"q"Q'), 'partman_revoke',
ARRAY['SELECT', 'INSERT', 'UPDATE', 'DELETE', 'TRUNCATE', 'REFERENCES', 'TRIGGER'],
'Check partman_revoke privileges of time_static_table_'||to_char(CURRENT_TIMESTAMP, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'3 months'::interval, 'YYYY"q"Q'), 'partman_revoke',
ARRAY['SELECT', 'INSERT', 'UPDATE', 'DELETE', 'TRUNCATE', 'REFERENCES', 'TRIGGER'],
'Check partman_revoke privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP+'3 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'6 months'::interval, 'YYYY"q"Q'), 'partman_revoke',
ARRAY['SELECT', 'INSERT', 'UPDATE', 'DELETE', 'TRUNCATE', 'REFERENCES', 'TRIGGER'],
'Check partman_revoke privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP+'6 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'9 months'::interval, 'YYYY"q"Q'), 'partman_revoke',
ARRAY['SELECT', 'INSERT', 'UPDATE', 'DELETE', 'TRUNCATE', 'REFERENCES', 'TRIGGER'],
'Check partman_revoke privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP+'9 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'12 months'::interval, 'YYYY"q"Q'), 'partman_revoke',
ARRAY['SELECT', 'INSERT', 'UPDATE', 'DELETE', 'TRUNCATE', 'REFERENCES', 'TRIGGER'],
'Check partman_revoke privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP+'12 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP-'3 months'::interval, 'YYYY"q"Q'), 'partman_revoke',
ARRAY['SELECT', 'INSERT', 'UPDATE', 'DELETE', 'TRUNCATE', 'REFERENCES', 'TRIGGER'],
'Check partman_revoke privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP-'3 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP-'6 months'::interval, 'YYYY"q"Q'), 'partman_revoke',
ARRAY['SELECT', 'INSERT', 'UPDATE', 'DELETE', 'TRUNCATE', 'REFERENCES', 'TRIGGER'],
'Check partman_revoke privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP-'6 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP-'9 months'::interval, 'YYYY"q"Q'), 'partman_revoke',
ARRAY['SELECT', 'INSERT', 'UPDATE', 'DELETE', 'TRUNCATE', 'REFERENCES', 'TRIGGER'],
'Check partman_revoke privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP-'9 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP-'12 months'::interval, 'YYYY"q"Q'), 'partman_revoke',
ARRAY['SELECT', 'INSERT', 'UPDATE', 'DELETE', 'TRUNCATE', 'REFERENCES', 'TRIGGER'],
'Check partman_revoke privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP-'12 months'::interval, 'YYYY"q"Q'));
SELECT results_eq('SELECT partition_data_time(''partman_test.time_static_table'')::int', ARRAY[10], 'Check that partitioning function returns correct count of rows moved');
SELECT is_empty('SELECT * FROM ONLY partman_test.time_static_table', 'Check that parent table has had data moved to partition');
SELECT results_eq('SELECT count(*)::int FROM partman_test.time_static_table', ARRAY[10], 'Check count from parent table');
SELECT results_eq('SELECT count(*)::int FROM partman_test.time_static_table_p'||to_char(CURRENT_TIMESTAMP, 'YYYY"q"Q'),
ARRAY[10], 'Check count from time_static_table_p'||to_char(CURRENT_TIMESTAMP, 'YYYY"q"Q'));
REVOKE INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER ON partman_test.time_static_table FROM partman_revoke;
INSERT INTO partman_test.time_static_table (col1, col3) VALUES (generate_series(11,20), CURRENT_TIMESTAMP + '3 months'::interval);
INSERT INTO partman_test.time_static_table (col1, col3) VALUES (generate_series(21,25), CURRENT_TIMESTAMP + '6 months'::interval);
INSERT INTO partman_test.time_static_table (col1, col3) VALUES (generate_series(26,30), CURRENT_TIMESTAMP + '9 months'::interval);
INSERT INTO partman_test.time_static_table (col1, col3) VALUES (generate_series(31,37), CURRENT_TIMESTAMP + '12 months'::interval);
INSERT INTO partman_test.time_static_table (col1, col3) VALUES (generate_series(40,49), CURRENT_TIMESTAMP - '3 months'::interval);
INSERT INTO partman_test.time_static_table (col1, col3) VALUES (generate_series(50,70), CURRENT_TIMESTAMP - '6 months'::interval);
INSERT INTO partman_test.time_static_table (col1, col3) VALUES (generate_series(71,85), CURRENT_TIMESTAMP - '9 months'::interval);
INSERT INTO partman_test.time_static_table (col1, col3) VALUES (generate_series(86,100), CURRENT_TIMESTAMP - '12 months'::interval);
SELECT is_empty('SELECT * FROM ONLY partman_test.time_static_table', 'Check that parent table has had no data inserted to it');
SELECT results_eq('SELECT count(*)::int FROM partman_test.time_static_table_p'||to_char(CURRENT_TIMESTAMP+'3 months'::interval, 'YYYY"q"Q'),
ARRAY[10], 'Check count from time_static_table_p'||to_char(CURRENT_TIMESTAMP+'3 months'::interval, 'YYYY"q"Q'));
SELECT results_eq('SELECT count(*)::int FROM partman_test.time_static_table_p'||to_char(CURRENT_TIMESTAMP+'6 months'::interval, 'YYYY"q"Q'),
ARRAY[5], 'Check count from time_static_table_p'||to_char(CURRENT_TIMESTAMP+'6 months'::interval, 'YYYY"q"Q'));
SELECT results_eq('SELECT count(*)::int FROM partman_test.time_static_table_p'||to_char(CURRENT_TIMESTAMP+'9 months'::interval, 'YYYY"q"Q'),
ARRAY[5], 'Check count from time_static_table_p'||to_char(CURRENT_TIMESTAMP+'9 months'::interval, 'YYYY"q"Q'));
SELECT results_eq('SELECT count(*)::int FROM partman_test.time_static_table_p'||to_char(CURRENT_TIMESTAMP+'12 months'::interval, 'YYYY"q"Q'),
ARRAY[7], 'Check count from time_static_table_p'||to_char(CURRENT_TIMESTAMP+'12 months'::interval, 'YYYY"q"Q'));
SELECT results_eq('SELECT count(*)::int FROM partman_test.time_static_table_p'||to_char(CURRENT_TIMESTAMP-'3 months'::interval, 'YYYY"q"Q'),
ARRAY[10], 'Check count from time_static_table_p'||to_char(CURRENT_TIMESTAMP-'3 months'::interval, 'YYYY"q"Q'));
SELECT results_eq('SELECT count(*)::int FROM partman_test.time_static_table_p'||to_char(CURRENT_TIMESTAMP-'6 months'::interval, 'YYYY"q"Q'),
ARRAY[21], 'Check count from time_static_table_p'||to_char(CURRENT_TIMESTAMP-'6 months'::interval, 'YYYY"q"Q'));
SELECT results_eq('SELECT count(*)::int FROM partman_test.time_static_table_p'||to_char(CURRENT_TIMESTAMP-'9 months'::interval, 'YYYY"q"Q'),
ARRAY[15], 'Check count from time_static_table_p'||to_char(CURRENT_TIMESTAMP-'9 months'::interval, 'YYYY"q"Q'));
SELECT results_eq('SELECT count(*)::int FROM partman_test.time_static_table_p'||to_char(CURRENT_TIMESTAMP-'12 months'::interval, 'YYYY"q"Q'),
ARRAY[15], 'Check count from time_static_table_p'||to_char(CURRENT_TIMESTAMP-'12 months'::interval, 'YYYY"q"Q'));
UPDATE part_config SET premake = 5 WHERE parent_table = 'partman_test.time_static_table';
SELECT run_maintenance();
INSERT INTO partman_test.time_static_table (col1, col3) VALUES (generate_series(101,122), CURRENT_TIMESTAMP + '15 months'::interval);
SELECT has_table('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'15 months'::interval, 'YYYY"q"Q'),
'Check time_static_table_'||to_char(CURRENT_TIMESTAMP+'15 months'::interval, 'YYYY"q"Q')||' exists');
SELECT hasnt_table('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'18 months'::interval, 'YYYY"q"Q'),
'Check time_static_table_'||to_char(CURRENT_TIMESTAMP+'18 months'::interval, 'YYYY"q"Q')||' exists');
SELECT col_is_pk('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'15 months'::interval, 'YYYY"q"Q'), ARRAY['col1'],
'Check for primary key in time_static_table_p'||to_char(CURRENT_TIMESTAMP+'15 months'::interval, 'YYYY"q"Q'));
SELECT is_empty('SELECT * FROM ONLY partman_test.time_static_table', 'Check that parent table has had no data inserted to it');
SELECT results_eq('SELECT count(*)::int FROM partman_test.time_static_table_p'||to_char(CURRENT_TIMESTAMP+'15 months'::interval, 'YYYY"q"Q'),
ARRAY[22], 'Check count from time_static_table_p'||to_char(CURRENT_TIMESTAMP+'15 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP, 'YYYY"q"Q'), 'partman_basic', ARRAY['SELECT','INSERT','UPDATE'],
'Check partman_basic privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'3 months'::interval, 'YYYY"q"Q'), 'partman_basic',
ARRAY['SELECT','INSERT','UPDATE'],
'Check partman_basic privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP+'3 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'6 months'::interval, 'YYYY"q"Q'), 'partman_basic',
ARRAY['SELECT','INSERT','UPDATE'],
'Check partman_basic privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP+'6 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'9 months'::interval, 'YYYY"q"Q'), 'partman_basic',
ARRAY['SELECT','INSERT','UPDATE'],
'Check partman_basic privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP+'9 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'12 months'::interval, 'YYYY"q"Q'), 'partman_basic',
ARRAY['SELECT','INSERT','UPDATE'],
'Check partman_basic privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP+'12 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP-'3 months'::interval, 'YYYY"q"Q'), 'partman_basic',
ARRAY['SELECT','INSERT','UPDATE'],
'Check partman_basic privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP-'3 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP-'6 months'::interval, 'YYYY"q"Q'), 'partman_basic',
ARRAY['SELECT','INSERT','UPDATE'],
'Check partman_basic privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP-'6 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP-'9 months'::interval, 'YYYY"q"Q'), 'partman_basic',
ARRAY['SELECT','INSERT','UPDATE'],
'Check partman_basic privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP-'9 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP-'12 months'::interval, 'YYYY"q"Q'), 'partman_basic',
ARRAY['SELECT','INSERT','UPDATE'],
'Check partman_basic privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP-'12 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'15 months'::interval, 'YYYY"q"Q'), 'partman_revoke',
ARRAY['SELECT'], 'Check partman_revoke privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP+'15 months'::interval, 'YYYY"q"Q'));
GRANT DELETE ON partman_test.time_static_table TO partman_basic;
REVOKE ALL ON partman_test.time_static_table FROM partman_revoke;
ALTER TABLE partman_test.time_static_table OWNER TO partman_owner;
UPDATE part_config SET premake = 6 WHERE parent_table = 'partman_test.time_static_table';
SELECT run_maintenance();
INSERT INTO partman_test.time_static_table (col1, col3) VALUES (generate_series(123,150), CURRENT_TIMESTAMP + '18 months'::interval);
SELECT is_empty('SELECT * FROM ONLY partman_test.time_static_table', 'Check that parent table has had no data inserted to it');
SELECT results_eq('SELECT count(*)::int FROM partman_test.time_static_table', ARRAY[148], 'Check count from parent table');
SELECT results_eq('SELECT count(*)::int FROM partman_test.time_static_table_p'||to_char(CURRENT_TIMESTAMP+'18 months'::interval, 'YYYY"q"Q'),
ARRAY[28], 'Check count from time_static_table_p'||to_char(CURRENT_TIMESTAMP+'18 months'::interval, 'YYYY"q"Q'));
SELECT has_table('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'18 months'::interval, 'YYYY"q"Q'),
'Check time_static_table_'||to_char(CURRENT_TIMESTAMP+'18 months'::interval, 'YYYY"q"Q')||' exists');
SELECT hasnt_table('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'21 months'::interval, 'YYYY"q"Q'),
'Check time_static_table_'||to_char(CURRENT_TIMESTAMP+'21 months'::interval, 'YYYY"q"Q')||' exists');
SELECT col_is_pk('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'18 months'::interval, 'YYYY"q"Q'), ARRAY['col1'],
'Check for primary key in time_static_table_p'||to_char(CURRENT_TIMESTAMP+'18 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP, 'YYYY"q"Q'), 'partman_basic', ARRAY['SELECT','INSERT','UPDATE'],
'Check partman_basic privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'3 months'::interval, 'YYYY"q"Q'), 'partman_basic',
ARRAY['SELECT','INSERT','UPDATE'],
'Check partman_basic privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP+'3 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'6 months'::interval, 'YYYY"q"Q'), 'partman_basic',
ARRAY['SELECT','INSERT','UPDATE'],
'Check partman_basic privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP+'6 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'9 months'::interval, 'YYYY"q"Q'), 'partman_basic',
ARRAY['SELECT','INSERT','UPDATE'],
'Check partman_basic privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP+'9 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'12 months'::interval, 'YYYY"q"Q'), 'partman_basic',
ARRAY['SELECT','INSERT','UPDATE'],
'Check partman_basic privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP+'12 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP-'3 months'::interval, 'YYYY"q"Q'), 'partman_basic',
ARRAY['SELECT','INSERT','UPDATE'],
'Check partman_basic privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP-'3 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP-'6 months'::interval, 'YYYY"q"Q'), 'partman_basic',
ARRAY['SELECT','INSERT','UPDATE'],
'Check partman_basic privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP-'6 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP-'9 months'::interval, 'YYYY"q"Q'), 'partman_basic',
ARRAY['SELECT','INSERT','UPDATE'],
'Check partman_basic privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP-'9 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP-'12 months'::interval, 'YYYY"q"Q'), 'partman_basic',
ARRAY['SELECT','INSERT','UPDATE'],
'Check partman_basic privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP-'12 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'15 months'::interval, 'YYYY"q"Q'), 'partman_revoke',
ARRAY['SELECT'], 'Check partman_revoke privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP+'15 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'18 months'::interval, 'YYYY"q"Q'), 'partman_revoke',
'{}'::text[], 'Check partman_revoke privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP+'18 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'18 months'::interval, 'YYYY"q"Q'), 'partman_basic',
ARRAY['SELECT','INSERT','UPDATE', 'DELETE'],
'Check partman_basic privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP+'18 months'::interval, 'YYYY"q"Q'));
SELECT table_owner_is ('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'18 months'::interval, 'YYYY"q"Q'), 'partman_owner',
'Check that ownership change worked for time_static_table_p'||to_char(CURRENT_TIMESTAMP+'18 months'::interval, 'YYYY"q"Q'));
INSERT INTO partman_test.time_static_table (col1, col3) VALUES (generate_series(200,210), CURRENT_TIMESTAMP + '60 months'::interval);
SELECT results_eq('SELECT count(*)::int FROM ONLY partman_test.time_static_table', ARRAY[11], 'Check that data outside trigger scope goes to parent');
SELECT reapply_privileges('partman_test.time_static_table');
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP, 'YYYY"q"Q'), 'partman_basic',
ARRAY['SELECT','INSERT','UPDATE', 'DELETE'],
'Check partman_basic privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'3 months'::interval, 'YYYY"q"Q'), 'partman_basic',
ARRAY['SELECT','INSERT','UPDATE', 'DELETE'],
'Check partman_basic privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP+'3 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'6 months'::interval, 'YYYY"q"Q'), 'partman_basic',
ARRAY['SELECT','INSERT','UPDATE', 'DELETE'],
'Check partman_basic privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP+'6 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'9 months'::interval, 'YYYY"q"Q'), 'partman_basic',
ARRAY['SELECT','INSERT','UPDATE', 'DELETE'],
'Check partman_basic privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP+'9 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'12 months'::interval, 'YYYY"q"Q'), 'partman_basic',
ARRAY['SELECT','INSERT','UPDATE', 'DELETE'],
'Check partman_basic privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP+'12 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'15 months'::interval, 'YYYY"q"Q'), 'partman_basic',
ARRAY['SELECT','INSERT','UPDATE', 'DELETE'],
'Check partman_basic privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP+'15 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'18 months'::interval, 'YYYY"q"Q'), 'partman_basic',
ARRAY['SELECT','INSERT','UPDATE', 'DELETE'],
'Check partman_basic privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP+'18 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP-'3 months'::interval, 'YYYY"q"Q'), 'partman_basic',
ARRAY['SELECT','INSERT','UPDATE', 'DELETE'],
'Check partman_basic privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP-'3 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP-'6 months'::interval, 'YYYY"q"Q'), 'partman_basic',
ARRAY['SELECT','INSERT','UPDATE', 'DELETE'],
'Check partman_basic privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP-'6 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP-'9 months'::interval, 'YYYY"q"Q'), 'partman_basic',
ARRAY['SELECT','INSERT','UPDATE', 'DELETE'],
'Check partman_basic privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP-'9 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP-'12 months'::interval, 'YYYY"q"Q'), 'partman_basic',
ARRAY['SELECT','INSERT','UPDATE', 'DELETE'],
'Check partman_basic privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP-'12 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP, 'YYYY"q"Q'), 'partman_revoke',
'{}'::text[], 'Check partman_revoke privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'3 months'::interval, 'YYYY"q"Q'), 'partman_revoke',
'{}'::text[], 'Check partman_revoke privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP+'3 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'6 months'::interval, 'YYYY"q"Q'), 'partman_revoke',
'{}'::text[], 'Check partman_revoke privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP+'6 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'9 months'::interval, 'YYYY"q"Q'), 'partman_revoke',
'{}'::text[], 'Check partman_revoke privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP+'9 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'12 months'::interval, 'YYYY"q"Q'), 'partman_revoke',
'{}'::text[], 'Check partman_revoke privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP+'12 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'15 months'::interval, 'YYYY"q"Q'), 'partman_revoke',
'{}'::text[], 'Check partman_revoke privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP+'15 months'::interval, 'YYYY"q"Q'));
SELECT table_privs_are('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'18 months'::interval, 'YYYY"q"Q'), 'partman_revoke',
'{}'::text[], 'Check partman_revoke privileges of time_static_table_p'||to_char(CURRENT_TIMESTAMP+'18 months'::interval, 'YYYY"q"Q'));
SELECT table_owner_is ('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP, 'YYYY"q"Q'), 'partman_owner',
'Check that ownership change worked for time_static_table_p'||to_char(CURRENT_TIMESTAMP, 'YYYY"q"Q'));
SELECT table_owner_is ('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'3 months'::interval, 'YYYY"q"Q'), 'partman_owner',
'Check that ownership change worked for time_static_table_p'||to_char(CURRENT_TIMESTAMP+'3 months'::interval, 'YYYY"q"Q'));
SELECT table_owner_is ('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'6 months'::interval, 'YYYY"q"Q'), 'partman_owner',
'Check that ownership change worked for time_static_table_p'||to_char(CURRENT_TIMESTAMP+'6 months'::interval, 'YYYY"q"Q'));
SELECT table_owner_is ('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'9 months'::interval, 'YYYY"q"Q'), 'partman_owner',
'Check that ownership change worked for time_static_table_p'||to_char(CURRENT_TIMESTAMP+'9 months'::interval, 'YYYY"q"Q'));
SELECT table_owner_is ('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'12 months'::interval, 'YYYY"q"Q'), 'partman_owner',
'Check that ownership change worked for time_static_table_p'||to_char(CURRENT_TIMESTAMP+'12 months'::interval, 'YYYY"q"Q'));
SELECT table_owner_is ('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'15 months'::interval, 'YYYY"q"Q'), 'partman_owner',
'Check that ownership change worked for time_static_table_p'||to_char(CURRENT_TIMESTAMP+'15 months'::interval, 'YYYY"q"Q'));
SELECT table_owner_is ('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'18 months'::interval, 'YYYY"q"Q'), 'partman_owner',
'Check that ownership change worked for time_static_table_p'||to_char(CURRENT_TIMESTAMP+'18 months'::interval, 'YYYY"q"Q'));
SELECT table_owner_is ('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP-'3 months'::interval, 'YYYY"q"Q'), 'partman_owner',
'Check that ownership change worked for time_static_table_p'||to_char(CURRENT_TIMESTAMP-'3 months'::interval, 'YYYY"q"Q'));
SELECT table_owner_is ('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP-'6 months'::interval, 'YYYY"q"Q'), 'partman_owner',
'Check that ownership change worked for time_static_table_p'||to_char(CURRENT_TIMESTAMP-'6 months'::interval, 'YYYY"q"Q'));
SELECT table_owner_is ('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP-'9 months'::interval, 'YYYY"q"Q'), 'partman_owner',
'Check that ownership change worked for time_static_table_p'||to_char(CURRENT_TIMESTAMP-'9 months'::interval, 'YYYY"q"Q'));
SELECT table_owner_is ('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP-'12 months'::interval, 'YYYY"q"Q'), 'partman_owner',
'Check that ownership change worked for time_static_table_p'||to_char(CURRENT_TIMESTAMP-'12 months'::interval, 'YYYY"q"Q'));
-- Currently unable to do drop_partition test reliably for monthly due to differing month lengths (sometimes drops 2 partitions instead of 1)
SELECT undo_partition_time('partman_test.time_static_table', 20, p_keep_table := false);
SELECT results_eq('SELECT count(*)::int FROM ONLY partman_test.time_static_table', ARRAY[159], 'Check count from parent table after undo');
SELECT hasnt_table('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP, 'YYYY"q"Q'),
'Check time_static_table_'||to_char(CURRENT_TIMESTAMP, 'YYYY"q"Q')||' does not exist');
SELECT hasnt_table('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'3 months'::interval, 'YYYY"q"Q'),
'Check time_static_table_'||to_char(CURRENT_TIMESTAMP+'3 months'::interval, 'YYYY"q"Q')||' does not exist');
SELECT hasnt_table('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'6 months'::interval, 'YYYY"q"Q'),
'Check time_static_table_'||to_char(CURRENT_TIMESTAMP+'6 months'::interval, 'YYYY"q"Q')||' does not exist');
SELECT hasnt_table('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'9 months'::interval, 'YYYY"q"Q'),
'Check time_static_table_'||to_char(CURRENT_TIMESTAMP+'9 months'::interval, 'YYYY"q"Q')||' does not exist');
SELECT hasnt_table('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'12 months'::interval, 'YYYY"q"Q'),
'Check time_static_table_'||to_char(CURRENT_TIMESTAMP+'12 months'::interval, 'YYYY"q"Q')||' does not exist');
SELECT hasnt_table('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'15 months'::interval, 'YYYY"q"Q'),
'Check time_static_table_'||to_char(CURRENT_TIMESTAMP+'15 months'::interval, 'YYYY"q"Q')||' does not exist');
SELECT hasnt_table('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP+'18 months'::interval, 'YYYY"q"Q'),
'Check time_static_table_'||to_char(CURRENT_TIMESTAMP+'18 months'::interval, 'YYYY"q"Q')||' does not exist');
SELECT hasnt_table('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP-'3 months'::interval, 'YYYY"q"Q'),
'Check time_static_table_'||to_char(CURRENT_TIMESTAMP-'3 months'::interval, 'YYYY"q"Q')||' does not exist');
SELECT hasnt_table('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP-'6 months'::interval, 'YYYY"q"Q'),
'Check time_static_table_'||to_char(CURRENT_TIMESTAMP-'6 months'::interval, 'YYYY"q"Q')||' does not exist');
SELECT hasnt_table('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP-'9 months'::interval, 'YYYY"q"Q'),
'Check time_static_table_'||to_char(CURRENT_TIMESTAMP-'9 months'::interval, 'YYYY"q"Q')||' does not exist');
SELECT hasnt_table('partman_test', 'time_static_table_p'||to_char(CURRENT_TIMESTAMP-'12 months'::interval, 'YYYY"q"Q'),
'Check time_static_table_'||to_char(CURRENT_TIMESTAMP-'12 months'::interval, 'YYYY"q"Q')||' does not exist');
SELECT * FROM finish();
ROLLBACK;
|
CREATE TABLE IF NOT EXISTS `SES_NOTIFICATIONS` (
`ID` BIGINT NOT NULL,
`CREATED_ON` TIMESTAMP(3) NOT NULL,
`INSTANCE_NUMBER` INT NOT NULL,
`SES_MESSAGE_ID` VARCHAR(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
`SES_FEEDBACK_ID` VARCHAR(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
`NOTIFICATION_TYPE` ENUM('BOUNCE', 'COMPLAINT', 'DELIVERY', 'UNKNOWN') NOT NULL,
`NOTIFICATION_SUBTYPE` VARCHAR(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
`NOTIFICATION_REASON` VARCHAR(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
`NOTIFICATION_BODY` JSON NOT NULL,
PRIMARY KEY (`ID`),
INDEX `SES_NOTIFICATIONS_CREATED_ON_INDEX` (`CREATED_ON`),
INDEX `SES_NOTIFICATIONS_SES_MESSAGE_ID_INDEX` (`SES_MESSAGE_ID`)
)
|
--
-- Table structure for table `gliders`
--
DROP TABLE IF EXISTS `gliders`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `gliders` (
`glider_id` int(11) NOT NULL AUTO_INCREMENT,
`callsign` char(32) NOT NULL,
PRIMARY KEY (`glider_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
|
-- current titles on sale, ordered by discount; additional filtering may be added to narrow down currency and region
SELECT gpr_id, gpr_product_title, gpr_country_code, gpr_currency, gpr_base_price, gpr_final_price,
CAST(ROUND((gpr_base_price - gpr_final_price) * 100 / gpr_base_price) AS INTEGER) AS gpr_discount_percent
FROM gog_prices WHERE gpr_final_price < gpr_base_price AND gpr_int_outdated_on IS NULL ORDER BY 7 DESC
|
SELECT TR_UID AS [UID], TR_InDate [Task In],TR_Productivity AS [Productivity]
FROM tbl_TaskRecordDetail
INNER JOIN [NTLILO].[dbo].[LILO] LILO ON
WHERE TR_Apporval = 2 AND TR_Productivity> 150 AND TR_PIC = 'ZDQ' AND
TR_InDate BETWEEN '01-01-2018 00:00:00' AND '11-01-2018 23:59:59' ORDER BY TR_UID desc
-----/--------
--DECLARE @TempProductivity TABLE
--(
-- Task nvarchar(100),
-- Productivity float
--);
--DECLARE @TotalAge int;
--INSERT INTO @TempProductivity
--SELECT TaskDetail.Task_Description,SUM(d.TR_Productivity)
--FROM tbl_TaskRecordDetail d
--INNER JOIN tbl_PCPDetail PCPDetail ON PCPDetail.PCP_ID = d.PCP_ID AND d.Task_ID = PCPDetail.Task_ID
--INNER JOIN tbl_TaskDetail TaskDetail ON TaskDetail.Task_ID = PCPDetail.Task_ID AND TaskDetail.PC_ProcessCode = PCPDetail.PC_ProcessCode
--WHERE d.TR_PIC = 'ZDQ' AND TR_Status = '3' AND d.TR_Apporval = '2' AND d.TR_InDate BETWEEN '01-01-2018 00:00:00' AND '11-01-2018 23:59:59' GROUP BY TaskDetail.Task_Description
--set @TotalAge=(select sum(Productivity) from @TempProductivity)
--SELECT Task,ROUND(((Productivity/@TotalAge)*100),2) AS Productivity
--FROM @TempProductivity
--ORDER BY Productivity DESC
--DECLARE @TempProjectProductivity_@mPIC TABLE
--( Project nvarchar(100), Productivity float );
--DECLARE @TotalProductivity int;
--INSERT INTO @TempProjectProductivity_@mPIC
--SELECT PCPDetail.PCP_Project, SUM(d.TR_Productivity)
--FROM tbl_TaskRecordDetail d
--INNER JOIN tbl_PCPDetail PCPDetail ON PCPDetail.PCP_ID = d.PCP_ID AND d.Task_ID = PCPDetail.Task_ID
--INNER JOIN tbl_TaskDetail TaskDetail ON TaskDetail.Task_ID = PCPDetail.Task_ID AND TaskDetail.PC_ProcessCode = PCPDetail.PC_ProcessCode
--WHERE d.TR_PIC = 'ZDQ' AND TR_Status = '3' AND d.TR_Apporval = '2' AND d.TR_InDate BETWEEN '01-01-2018 00:00:00' AND '11-01-2018 23:59:59'
--GROUP BY PCPDetail.PCP_Project
--set @TotalProductivity = (select sum(Productivity) from @TempProjectProductivity_@mPIC)
--SELECT Project,ROUND(((Productivity/@TotalProductivity)*100),2) AS Productivity FROM @TempProjectProductivity_@mPIC
--ORDER BY Productivity DESC
--DECLARE @TempTeamProductivity_@mPIC TABLE (Project nvarchar(100), Productivity float);
--DECLARE @TeamProductivity int;
--INSERT INTO @TempTeamProductivity_@mPIC
--SELECT d.TR_MID, SUM(d.TR_Productivity)
--FROM tbl_TaskRecordDetail d
--INNER JOIN tbl_PCPDetail PCPDetail ON PCPDetail.PCP_ID = d.PCP_ID AND d.Task_ID = PCPDetail.Task_ID
--INNER JOIN tbl_TaskDetail TaskDetail ON TaskDetail.Task_ID = PCPDetail.Task_ID AND TaskDetail.PC_ProcessCode = PCPDetail.PC_ProcessCode
--WHERE d.TR_PIC = 'ZDQ' AND TR_Status = '3' AND d.TR_Apporval = '2' AND d.TR_InDate BETWEEN '01-01-2018 00:00:00' AND '11-01-2018 23:59:59'
--GROUP BY d.TR_MID
--set @TeamProductivity = (select sum(Productivity) from @TempTeamProductivity_@mPIC)
--SELECT Project, ROUND(((Productivity / @TeamProductivity) * 100), 2) AS Productivity
--FROM @TempTeamProductivity_@mPIC
--ORDER BY Productivity DESC
|
DROP TABLE user;
DROP TABLE event;
DROP TABLE organization;
DROP TABLE event_user_junction;
CREATE TABLE user (
username character(100),
name character(100),
points integer,
location character(1000),
constraint user_pkey PRIMARY KEY (username)
);
CREATE TABLE event (
location character(1000),
num_people integer,
pph integer,
start_time DATETIME,
end_time DATETIME,
name character(1000),
eid integer,
host_org character(1000),
constraint event_pkey PRIMARY KEY (eid),
constraint organization_fkey FOREIGN KEY (host_org) REFERENCES organization (username)
);
CREATE TABLE organization (
name character(1000),
username character(1000),
location character(1000),
constraint organization_pkey PRIMARY KEY (username)
);
CREATE TABLE event_user_junction (
username character(100),
eid integer,
constraint event_user_pkey PRIMARY KEY (username,eid),
constraint event_fkey FOREIGN KEY (eid) REFERENCES event (eid),
constraint user_fkey FOREIGN KEY (username) REFERENCES user (username)
);
|
-- @testpoint:opengauss关键字Lc_Ctype(非保留),作为数据库名
--关键字不带引号-成功
drop database if exists Lc_Ctype;
create database Lc_Ctype;
drop database Lc_Ctype;
--关键字带双引号-成功
drop database if exists "Lc_Ctype";
create database "Lc_Ctype";
drop database "Lc_Ctype";
--关键字带单引号-合理报错
drop database if exists 'Lc_Ctype';
create database 'Lc_Ctype';
--关键字带反引号-合理报错
drop database if exists `Lc_Ctype`;
create database `Lc_Ctype`;
|
-- @testpoint:openGauss关键字duplicate(非保留),同时作为表名和列名带引号,并进行dml操作,duplicate列的值最终显示为1000
drop table if exists "duplicate";
create table "duplicate"(
c_id int, c_int int, c_integer integer, c_bool int, c_boolean int, c_bigint integer,
c_real real, c_double real,
c_decimal decimal(38), c_number number(38), c_numeric numeric(38),
c_char char(50) default null, c_varchar varchar(20), c_varchar2 varchar2(4000),
c_date date, c_datetime date, c_timestamp timestamp,
"duplicate" varchar(100) default 'duplicate'
)
PARTITION BY RANGE (c_integer)
(
partition P_20180121 values less than (0),
partition P_20190122 values less than (50000),
partition P_20200123 values less than (100000),
partition P_max values less than (maxvalue)
);
insert into "duplicate"(c_id,"duplicate") values(1,'hello');
insert into "duplicate"(c_id,"duplicate") values(2,'china');
update "duplicate" set "duplicate"=1000 where "duplicate"='hello';
delete from "duplicate" where "duplicate"='china';
select "duplicate" from "duplicate" where "duplicate"!='hello' order by "duplicate";
drop table "duplicate";
|
-- MySQL dump 10.13 Distrib 5.7.19, for Linux (x86_64)
--
-- Host: localhost Database: javavirtual
-- ------------------------------------------------------
-- Server version 5.7.19-0ubuntu0.16.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `knowledge`
--
DROP TABLE IF EXISTS `knowledge`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `knowledge` (
`id` bigint(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
`level` varchar(255) NOT NULL COMMENT '目录级别',
`super_level` varchar(255) DEFAULT NULL COMMENT '父目录级别',
`sub_num` varchar(255) NOT NULL COMMENT '子目录数目',
`number` varchar(255) NOT NULL COMMENT '同级别序号',
`description` varchar(255) NOT NULL COMMENT '描述',
`content` text COMMENT '具体内容',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=61 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `knowledge`
--
LOCK TABLES `knowledge` WRITE;
/*!40000 ALTER TABLE `knowledge` DISABLE KEYS */;
INSERT INTO `knowledge` VALUES (1,'1',NULL,'3','1','1. 认识Java',''),(2,'2','1','0','1','1.1 Java概述','1'),(3,'2','1','0','2','1.2 Java开发环境','2'),(4,'2','1','0','3','1.3 编写第一个Java程序','1'),(5,'1',NULL,'8','2','2. Java基本语法',''),(6,'2','2','0','1','2.1 Java的数据类型','5'),(7,'2','2','0','2','2.2 常量与变量','4'),(8,'2','2','0','3','2.3 运算符与表达式','3'),(9,'2','2','0','4','2.4 流程控制语句(1)','6'),(10,'2','2','0','5','2.5 流程控制语句(2)','1'),(11,'2','2','0','6','2.6 跳转语句','1'),(12,'2','2','0','7','2.7 一维数组','1'),(13,'2','2','0','8','2.8 二维数组','1'),(14,'1',NULL,'5','3','3. Java的类',''),(15,'2','3','0','1','3.1 类与对象','7'),(16,'2','3','0','2','3.2 参数传递','8'),(17,'2','3','0','3','3.3 方法的重载','9'),(18,'2','3','0','4','3.4 构造方法','1'),(19,'2','3','0','5','3.5 静态成员','1'),(20,'1',NULL,'7','4','4. Java中扩展的类',''),(21,'2','4','0','1','4.1 类的继承','10'),(22,'2','4','0','2','4.2 方法的覆盖','11'),(23,'2','4','0','3','4.3 抽象类','12'),(24,'2','4','0','4','4.4 接口基础','13'),(25,'2','4','0','5','4.5 接口的高级应用','14'),(26,'2','4','0','6','4.6 包','1'),(27,'2','4','0','7','4.7 Java基础类库','1'),(28,'1',NULL,'2','5','5. Java中各种修饰符汇总',''),(29,'2','5','0','1','5.1 访问控制符','15'),(30,'2','5','0','2','5.2 非访问控制符','16'),(31,'1',NULL,'2','6','6. 异常处理',''),(32,'2','6','0','1','6.1 异常处理类','17'),(33,'2','6','0','2','6.2 自定义异常类','18'),(34,'1',NULL,'3','7','7. 数据的输入与输出',''),(35,'2','7','0','1','7.1 字符流','19'),(36,'2','7','0','2','7.2 字节流','20'),(37,'2','7','0','3','7.3 随机存取文件','21'),(38,'1',NULL,'4','8','8. 图形用户界面的建立GUI',''),(39,'2','8','0','1','8.1 认识组件和容器','22'),(40,'2','8','0','2','8.2 创建组件的方法','23'),(41,'2','8','0','3','8.3 布局管理器','24'),(42,'2','8','0','4','8.4 向窗口添加菜单','25'),(43,'1',NULL,'5','9','9. 事件处理',''),(44,'2','9','0','1','9.1 委托事件模型','26'),(45,'2','9','0','2','9.2 组件与事件处理(1)','27'),(46,'2','9','0','3','9.3 组件与事件处理(2)','28'),(47,'2','9','0','4','9.4 适配器类','29'),(48,'2','9','0','5','9.5工具栏','30'),(49,'1',NULL,'4','10','10. 扩展的GUI',''),(50,'2','10','0','1','10.1 菜单','31'),(51,'2','10','0','2','10.2 对话框','32'),(52,'2','10','0','3','10.3 文件选择框','33'),(53,'2','10','0','4','10.4 工具栏','1'),(54,'1',NULL,'3','11','11. 多线程',''),(55,'2','11','0','1','11.1 认识线程','1'),(56,'2','11','0','2','11.2 用Thread类创建线程','1'),(57,'2','11','0','3','11.3 用Runnable接口创建线程','1'),(58,'1',NULL,'2','12','12. 小程序',''),(59,'2','12','0','1','12.1 小程序的工作原理','1'),(60,'2','12','0','2','12.2 小程序编程应用','1');
/*!40000 ALTER TABLE `knowledge` 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-09 17:37:18
|
---------------------------------------------------------------------------------------------
----------------------------------USING WHEN CLAUSE ON TRIGGERS------------------------------
---------------------------------------------------------------------------------------------
create or replace trigger prevent_high_salary
before insert or update of salary on employees_copy
for each row
when (new.salary > 50000)
begin
raise_application_error(-20006,'A salary cannot be higher than 50000!.');
end;
|
DROP DATABASE IF EXISTS burgers_db;
CREATE DATABASE burgers_db;
USE burgers_db;
DROP TABLE IF EXISTS burgers;
CREATE TABLE burgers (
id INTEGER AUTO_INCREMENT NOT NULL PRIMARY KEY,
burger_name VARCHAR (50),
devoured BOOLEAN
);
|
/* Replace with your SQL commands */
alter table water.billing_volumes
drop constraint uniq_charge_element_id_financial_year;
alter table water.billing_volumes
add constraint uniq_charge_element_id_financial_year_season unique (charge_element_id, financial_year, is_summer);
|
--
-- Copyright 2005-2013 The Kuali Foundation
--
-- Licensed under the Educational Community License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.opensource.org/licenses/ecl2.php
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
--
INSERT INTO KRIM_GRP_MBR_T (GRP_ID,GRP_MBR_ID,MBR_ID,MBR_TYP_CD,OBJ_ID,VER_NBR)
VALUES ('2001','1100','testuser1','P','5B97C50B04B56110E0404F8189D85213',1)
/
INSERT INTO KRIM_GRP_MBR_T (GRP_ID,GRP_MBR_ID,MBR_ID,MBR_TYP_CD,OBJ_ID,VER_NBR)
VALUES ('2001','1101','testuser2','P','5B97C50B04B66110E0404F8189D85213',1)
/
INSERT INTO KRIM_GRP_MBR_T (GRP_ID,GRP_MBR_ID,MBR_ID,MBR_TYP_CD,OBJ_ID,VER_NBR)
VALUES ('2002','1102','testuser2','P','5B97C50B04B76110E0404F8189D85213',1)
/
INSERT INTO KRIM_GRP_MBR_T (GRP_ID,GRP_MBR_ID,MBR_ID,MBR_TYP_CD,OBJ_ID,VER_NBR)
VALUES ('2002','1103','testuser3','P','5B97C50B04B86110E0404F8189D85213',1)
/
INSERT INTO KRIM_GRP_MBR_T (GRP_ID,GRP_MBR_ID,MBR_ID,MBR_TYP_CD,OBJ_ID,VER_NBR)
VALUES ('2003','1104','testuser1','P','5B97C50B04B96110E0404F8189D85213',1)
/
INSERT INTO KRIM_GRP_MBR_T (GRP_ID,GRP_MBR_ID,MBR_ID,MBR_TYP_CD,OBJ_ID,VER_NBR)
VALUES ('2003','1105','testuser2','P','5B97C50B04BA6110E0404F8189D85213',1)
/
INSERT INTO KRIM_GRP_MBR_T (GRP_ID,GRP_MBR_ID,MBR_ID,MBR_TYP_CD,OBJ_ID,VER_NBR)
VALUES ('2003','1106','testuser6','P','5B97C50B04BB6110E0404F8189D85213',1)
/
INSERT INTO KRIM_GRP_MBR_T (GRP_ID,GRP_MBR_ID,MBR_ID,MBR_TYP_CD,OBJ_ID,VER_NBR)
VALUES ('2003','1107','testuser4','P','5B97C50B04BC6110E0404F8189D85213',1)
/
INSERT INTO KRIM_GRP_MBR_T (GRP_ID,GRP_MBR_ID,MBR_ID,MBR_TYP_CD,OBJ_ID,VER_NBR)
VALUES ('2003','1108','testuser5','P','5B97C50B04BD6110E0404F8189D85213',1)
/
INSERT INTO KRIM_GRP_MBR_T (GRP_ID,GRP_MBR_ID,MBR_ID,MBR_TYP_CD,OBJ_ID,VER_NBR)
VALUES ('2003','1109','quickstart','P','5B97C50B04BE6110E0404F8189D85213',1)
/
INSERT INTO KRIM_GRP_MBR_T (GRP_ID,GRP_MBR_ID,MBR_ID,MBR_TYP_CD,OBJ_ID,VER_NBR)
VALUES ('2004','1110','quickstart','P','5B97C50B04BF6110E0404F8189D85213',1)
/
INSERT INTO KRIM_GRP_MBR_T (GRP_ID,GRP_MBR_ID,MBR_ID,MBR_TYP_CD,OBJ_ID,VER_NBR)
VALUES ('2004','1111','user1','P','5B97C50B04C06110E0404F8189D85213',1)
/
INSERT INTO KRIM_GRP_MBR_T (GRP_ID,GRP_MBR_ID,MBR_ID,MBR_TYP_CD,OBJ_ID,VER_NBR)
VALUES ('2004','1112','user2','P','5B97C50B04C16110E0404F8189D85213',1)
/
INSERT INTO KRIM_GRP_MBR_T (GRP_ID,GRP_MBR_ID,MBR_ID,MBR_TYP_CD,OBJ_ID,VER_NBR)
VALUES ('2005','1113','user3','P','5B97C50B04C26110E0404F8189D85213',1)
/
INSERT INTO KRIM_GRP_MBR_T (GRP_ID,GRP_MBR_ID,MBR_ID,MBR_TYP_CD,OBJ_ID,VER_NBR)
VALUES ('2006','1114','user2','P','5B97C50B04C36110E0404F8189D85213',1)
/
INSERT INTO KRIM_GRP_MBR_T (GRP_ID,GRP_MBR_ID,MBR_ID,MBR_TYP_CD,OBJ_ID,VER_NBR)
VALUES ('2007','1115','idm1','P','5B97C50B04C46110E0404F8189D85213',1)
/
INSERT INTO KRIM_GRP_MBR_T (GRP_ID,GRP_MBR_ID,MBR_ID,MBR_TYP_CD,OBJ_ID,VER_NBR)
VALUES ('2007','1116','idm2','P','5B97C50B04C56110E0404F8189D85213',1)
/
INSERT INTO KRIM_GRP_MBR_T (GRP_ID,GRP_MBR_ID,MBR_ID,MBR_TYP_CD,OBJ_ID,VER_NBR)
VALUES ('2007','1117','idm3','P','5B97C50B04C66110E0404F8189D85213',1)
/
INSERT INTO KRIM_GRP_MBR_T (GRP_ID,GRP_MBR_ID,MBR_ID,MBR_TYP_CD,OBJ_ID,VER_NBR)
VALUES ('2008','1118','admin1','P','5B97C50B04C76110E0404F8189D85213',1)
/
INSERT INTO KRIM_GRP_MBR_T (GRP_ID,GRP_MBR_ID,MBR_ID,MBR_TYP_CD,OBJ_ID,VER_NBR)
VALUES ('2008','1119','admin2','P','5B97C50B04C86110E0404F8189D85213',1)
/
INSERT INTO KRIM_GRP_MBR_T (GRP_ID,GRP_MBR_ID,MBR_ID,MBR_TYP_CD,OBJ_ID,VER_NBR)
VALUES ('2009','1120','dev1','P','5B97C50B04C96110E0404F8189D85213',1)
/
INSERT INTO KRIM_GRP_MBR_T (GRP_ID,GRP_MBR_ID,MBR_ID,MBR_TYP_CD,OBJ_ID,VER_NBR)
VALUES ('2009','1121','dev2','P','5B97C50B04CA6110E0404F8189D85213',1)
/
INSERT INTO KRIM_GRP_MBR_T (GRP_ID,GRP_MBR_ID,MBR_ID,MBR_TYP_CD,OBJ_ID,VER_NBR)
VALUES ('2000','1122','notsysadm','P','5B97C50B04CB6110E0404F8189D85213',1)
/
INSERT INTO KRIM_GRP_MBR_T (GRP_ID,GRP_MBR_ID,MBR_ID,MBR_TYP_CD,OBJ_ID,VER_NBR)
VALUES ('1','1123','admin','P','5B97C50B04CC6110E0404F8189D85213',1)
/
INSERT INTO KRIM_GRP_MBR_T (GRP_ID,GRP_MBR_ID,MBR_ID,MBR_TYP_CD,OBJ_ID,VER_NBR)
VALUES ('1','1124','notsys','P','5B97C50B04CD6110E0404F8189D85213',1)
/
INSERT INTO KRIM_GRP_MBR_T (GRP_ID,GRP_MBR_ID,MBR_ID,MBR_TYP_CD,OBJ_ID,VER_NBR)
VALUES ('2036','1125','user2','P','5B97C50B04CE6110E0404F8189D85213',1)
/
INSERT INTO KRIM_GRP_MBR_T (GRP_ID,GRP_MBR_ID,MBR_ID,MBR_TYP_CD,OBJ_ID,VER_NBR)
VALUES ('2060','1126','user1','P','5B97C50B04CF6110E0404F8189D85213',1)
/
INSERT INTO KRIM_GRP_MBR_T (GRP_ID,GRP_MBR_ID,MBR_ID,MBR_TYP_CD,OBJ_ID,VER_NBR)
VALUES ('2060','1127','user2','P','5B97C50B04D06110E0404F8189D85213',1)
/
INSERT INTO KRIM_GRP_MBR_T (GRP_ID,GRP_MBR_ID,MBR_ID,MBR_TYP_CD,OBJ_ID,VER_NBR)
VALUES ('2122','1128','admin','P','5B97C50B04D16110E0404F8189D85213',1)
/
INSERT INTO KRIM_GRP_MBR_T (GRP_ID,GRP_MBR_ID,MBR_ID,MBR_TYP_CD,OBJ_ID,VER_NBR)
VALUES ('2180','1129','admin','P','5B97C50B04D26110E0404F8189D85213',1)
/
INSERT INTO KRIM_GRP_MBR_T (GRP_ID,GRP_MBR_ID,MBR_ID,MBR_TYP_CD,OBJ_ID,VER_NBR)
VALUES ('2200','1130','user1','P','5B97C50B04D36110E0404F8189D85213',1)
/
INSERT INTO KRIM_GRP_MBR_T (GRP_ID,GRP_MBR_ID,MBR_ID,MBR_TYP_CD,OBJ_ID,VER_NBR)
VALUES ('2200','1131','user3','P','5B97C50B04D46110E0404F8189D85213',1)
/
INSERT INTO KRIM_GRP_MBR_T (GRP_ID,GRP_MBR_ID,MBR_ID,MBR_TYP_CD,OBJ_ID,VER_NBR)
VALUES ('2201','1132','user2','P','5B97C50B04D56110E0404F8189D85213',1)
/
INSERT INTO KRIM_GRP_MBR_T (GRP_ID,GRP_MBR_ID,MBR_ID,MBR_TYP_CD,OBJ_ID,VER_NBR)
VALUES ('2201','1133','user4','P','5B97C50B04D66110E0404F8189D85213',1)
/
INSERT INTO KRIM_GRP_MBR_T (GRP_ID,GRP_MBR_ID,MBR_ID,MBR_TYP_CD,OBJ_ID,VER_NBR)
VALUES ('2202','1134','user1','P','5B97C50B04D76110E0404F8189D85213',1)
/
INSERT INTO KRIM_GRP_MBR_T (GRP_ID,GRP_MBR_ID,MBR_ID,MBR_TYP_CD,OBJ_ID,VER_NBR)
VALUES ('2202','1135','user2','P','5B97C50B04D86110E0404F8189D85213',1)
/
INSERT INTO KRIM_GRP_MBR_T (GRP_ID,GRP_MBR_ID,MBR_ID,MBR_TYP_CD,OBJ_ID,VER_NBR)
VALUES ('2203','1136','user3','P','5B97C50B04D96110E0404F8189D85213',1)
/
INSERT INTO KRIM_GRP_MBR_T (GRP_ID,GRP_MBR_ID,MBR_ID,MBR_TYP_CD,OBJ_ID,VER_NBR)
VALUES ('2203','1137','user4','P','5B97C50B04DA6110E0404F8189D85213',1)
/
INSERT INTO KRIM_GRP_MBR_T (GRP_ID,GRP_MBR_ID,MBR_ID,MBR_TYP_CD,OBJ_ID,VER_NBR)
VALUES ('2260','1138','admin','P','5B97C50B04DB6110E0404F8189D85213',1)
/
|
# Select info about users with max salary in each company
# Subquery is used due to enabled only_full_group_by.
# In case only_full_group_by is disabled -
# current query can be shorter and only unique users can be shown
# In case more than 1 user has same max salary - all these users will be shown
Select e.sJob AS jobTitle
, sq.salary AS salary
, u.sFirstName AS fName
, c.sName AS companyName
from tutorial.employee AS e
Inner Join tutorial.user AS u
On u.id = e.user_id
Inner Join tutorial.company AS c
On c.id = e.company_id
Inner Join (
Select max(nSalary) AS salary
, company_id AS companyID
from tutorial.employee
Group By companyID)
AS sq
On sq.companyID = c.id
AND sq.salary = e.nSalary;
|
CREATE TABLE `tb_bbvvzzczcw` (
`col_ruygkecjzp` longblob,
`col_orycjbfrss` year(4) DEFAULT '2019',
`col_aqqnunnega` varbinary(225) DEFAULT NULL,
`col_pxwauaruqw` enum('enum_or_set_0','enum_or_set_1','enum_or_set_2') DEFAULT 'enum_or_set_0',
UNIQUE KEY `col_ruygkecjzp` (`col_ruygkecjzp`(14),`col_orycjbfrss`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `tb_hcvvpyqbtd` (
`col_ruygkecjzp` longblob,
`col_orycjbfrss` year(4) DEFAULT '2019',
`col_aqqnunnega` varbinary(225) DEFAULT NULL,
`col_pxwauaruqw` enum('enum_or_set_0','enum_or_set_1','enum_or_set_2') DEFAULT 'enum_or_set_0',
UNIQUE KEY `col_ruygkecjzp` (`col_ruygkecjzp`(14),`col_orycjbfrss`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `tb_ljqeyzesru` (
`col_qmvlxemsmt` datetime(6) DEFAULT NULL,
`col_wcntsrfsjf` int(11) DEFAULT '1',
`col_kekvofvtus` int(70) unsigned DEFAULT '1',
`col_bhbfokpfhm` float DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE `tb_rpuyybsdob` (
`col_qmvlxemsmt` datetime(6) DEFAULT NULL,
`col_wcntsrfsjf` int(11) DEFAULT '1',
`col_kekvofvtus` int(70) unsigned DEFAULT '1',
`col_bhbfokpfhm` float DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE `tb_wewsxxqmxd` (
`col_zmjbwpsrnw` timestamp(3) NULL DEFAULT CURRENT_TIMESTAMP(3),
`col_qqzmxlmztj` set('enum_or_set_0','enum_or_set_1','enum_or_set_2') CHARACTER SET utf8mb4 DEFAULT 'enum_or_set_0',
`col_hwnlilelpf` smallint(5) unsigned DEFAULT '1',
`col_oyeoemafea` date DEFAULT '2019-07-04',
UNIQUE KEY `symb_biynehpjlu` (`col_hwnlilelpf`,`col_oyeoemafea`),
UNIQUE KEY `uk_ztxuhpyaxo` (`col_zmjbwpsrnw`,`col_oyeoemafea`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `tb_yfjonexaag` (
`col_hfydymybbg` tinytext,
UNIQUE KEY `symb_gpchhhvhwm` (`col_hfydymybbg`(20))
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
--
-- YB_FEATURE Testsuite: CREATE LANGUAGE
--
DROP EXTENSION plpgsql CASCADE;
CREATE LANGUAGE plpgsql;
CREATE FUNCTION test() RETURNS INTEGER AS $$begin return 1; end$$ LANGUAGE plpgsql;
SELECT * FROM test();
DROP LANGUAGE plpgsql CASCADE;
-- leave the cluster in a clean state
CREATE EXTENSION plpgsql;
|
IF $(OneTimeLoad) = 1
BEGIN
DECLARE @Section TABLE
(
SectionKey INT NOT NULL PRIMARY KEY,
PartKey INT NOT NULL,
ParentSectionKey INT NULL,
SectionName NVARCHAR(250) NOT NULL,
PageReference NVARCHAR(50) NULL,
DisplayOrder FLOAT NOT NULL,
SectionSlug VARCHAR(50) NULL
);
INSERT INTO @Section
(
SectionKey,
PartKey,
ParentSectionKey,
SectionName,
PageReference,
DisplayOrder,
SectionSlug
)
VALUES
(2901, 17, NULL, N'History', NULL, 1, 'History'),
(2902, 17, NULL, N'Weapons and Equipment', NULL, 2, 'Weapons'),
(2903, 17, NULL, N'General Discussion', NULL, 3, 'General-Discussion'),
(2904, 17, NULL, N'Misc. Drills and Lessons', NULL, 4, 'Misc');
MERGE INTO Sources.Section t
USING @Section s
ON t.SectionKey = s.SectionKey
WHEN NOT MATCHED THEN
INSERT
(
SectionKey,
PartKey,
ParentSectionKey,
SectionName,
PageReference,
DisplayOrder,
SectionSlug
)
VALUES
(s.SectionKey, s.PartKey, s.ParentSectionKey, s.SectionName, s.PageReference, s.DisplayOrder, s.SectionSlug)
WHEN MATCHED THEN
UPDATE SET PartKey = s.PartKey,
ParentSectionKey = s.ParentSectionKey,
SectionName = s.SectionName,
PageReference = s.PageReference,
DisplayOrder = s.DisplayOrder,
SectionSlug = s.SectionSlug;
END;
GO
|
-- Create tables for our ingredients and favorite recipes, plus the cache tables to save our results
CREATE TABLE IF NOT EXISTS favoriterecipes(
favoriterecipe_id VARCHAR(32) PRIMARY KEY,
title VARCHAR(256),
image_url VARCHAR(256),
directions_url VARCHAR(256),
source_title VARCHAR(256),
calories INT,
total_time INT
);
CREATE TABLE IF NOT EXISTS ingredients(
recipe_ref_id VARCHAR(32) REFERENCES favoriterecipes (favoriterecipe_id),
ingredient_desc VARCHAR(256),
weight INT
);
CREATE TABLE IF NOT EXISTS resultscache(
resultsrecipe_id VARCHAR(32) PRIMARY KEY,
title VARCHAR(256),
image_url VARCHAR(256),
directions_url VARCHAR(256),
source_title VARCHAR(256),
calories INT,
total_time INT
);
CREATE TABLE IF NOT EXISTS ingredientscache(
recipe_ref_id VARCHAR(32) REFERENCES resultscache (resultsrecipe_id),
ingredient_desc VARCHAR(256),
weight INT
);
|
USE employee_db;
INSERT INTO department
(name)
VALUES
('Sales'),
('Engineering'),
('Finance'),
('Legal');
INSERT INTO role
(title, salary, department_id)
VALUES
('Salesperson',100, 1),
('Software Engineer', 900, 2),
('Accountant', 300, 3),
('Lawyer', 600, 4);
INSERT INTO employee
(first_name, last_name, role_id, manager_id)
VALUES
('Emin', 'Quliyev', 1, NULL),
('Ceyhun', 'Nuriyev', 2, NULL),
('Rasim', 'Aliyev', 3, NULL),
('Sahin', 'Valiyev', 4, NULL);
|
IF OBJECT_ID(N'tempdb..#DropLegacyObjects') IS NOT NULL DROP PROCEDURE #DropLegacyObjects;
GO
CREATE PROCEDURE #DropLegacyObjects
(
@ObjectName NVARCHAR(128),
@ObjectType CHAR(2)
)
AS
BEGIN
DECLARE @DDLType NVARCHAR(128)
IF EXISTS
(
SELECT
*
FROM
sys.objects o
INNER JOIN sys.schemas s
ON o.[schema_id] = s.[schema_id]
WHERE
o.[Name] = @ObjectName
AND s.[name] = 'procfwk'
AND o.[type] = @ObjectType
)
BEGIN
SELECT
@DDLType = CASE @ObjectType
WHEN 'P' THEN 'PROCEDURE'
WHEN 'V' THEN 'VIEW'
WHEN 'FN' THEN 'FUNCTION'
END;
EXEC('DROP ' + @DDLType + ' [procfwk].[' + @ObjectName + '];')
END;
END;
GO
EXEC #DropLegacyObjects 'AddProperty', 'P';
EXEC #DropLegacyObjects 'GetExecutionDetails', 'P';
EXEC #DropLegacyObjects 'AddRecipientPipelineAlerts', 'P';
EXEC #DropLegacyObjects 'DeleteRecipientAlerts', 'P';
EXEC #DropLegacyObjects 'CheckStageAndPiplineIntegrity', 'P';
EXEC #DropLegacyObjects 'AddPipelineDependant', 'P';
EXEC #DropLegacyObjects 'AddServicePrincipalWrapper', 'P';
EXEC #DropLegacyObjects 'AddServicePrincipalUrls', 'P';
EXEC #DropLegacyObjects 'AddServicePrincipal', 'P';
EXEC #DropLegacyObjects 'DeleteServicePrincipal', 'P';
EXEC #DropLegacyObjects 'CheckForValidURL', 'FN';
EXEC #DropLegacyObjects 'PipelineDependencyChains', 'V';
EXEC #DropLegacyObjects 'AverageStageDuration', 'V';
EXEC #DropLegacyObjects 'CompleteExecutionErrorLog', 'V';
EXEC #DropLegacyObjects 'CompleteExecutionLog', 'V';
EXEC #DropLegacyObjects 'CurrentExecutionSummary', 'V';
EXEC #DropLegacyObjects 'LastExecution', 'V';
EXEC #DropLegacyObjects 'LastExecutionSummary', 'V';
EXEC #DropLegacyObjects 'WorkerParallelismOverTime', 'V';
--replaced with new precursor concept in v1.8.5:
IF OBJECT_ID(N'[dbo].[SetRandomWaitValues]') IS NOT NULL DROP PROCEDURE [dbo].[SetRandomWaitValues];
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.