sql stringlengths 6 1.05M |
|---|
select * from ehrms2.eip_edEmp_profile; -- 員工自我維護檔(新問候語,問候語大頭貼)
select * from information_schema.columns where TABLE_NAME='eip_edEmp_profile';
select * from ehrms2.ac_pwd_rule; -- 密碼原則設定檔
select * from ehrms2.ac_group; -- 成員群組檔
select * from ehrms2.ac_group_rule; -- 成員群組-規則檔
select * from ehrms2.ac_group_expand; -- 成員群組-員工展開檔
select * from ehrms2.ac_role; -- 角色資料檔
select * from information_schema.columns where TABLE_NAME='ac_role';
select * from ehrms2.ac_role_right; -- 角色-功能權限
select * from ehrms2.ac_role_field; -- 角色-個資欄位
select * from ehrms2.ac_user; -- 使用者資料檔
select * from information_schema.columns where TABLE_NAME='ac_user';
select * from ehrms2.ac_user_role; -- 使用者 - 擁有角色
select * from ehrms2.ac_user_cmp; -- 使用者 - 可管理公司
select * from ehrms2.ac_user_role_give; -- 使用者 - 角色授權
select * from ehrms2_log.sys_log_login; -- 帳號登入紀錄
select * from ehrms2_log.sys_log_pwd_change; -- 帳號密碼變更紀錄
select * from information_schema.tables where TABLE_NAME='ac_group'; -- 也可以查看table的狀況
select * from information_schema.columns where TABLE_NAME='ac_user'; -- 確定一下schema結構 --
-- auto increment sample
/*
CREATE TABLE animals (
id MEDIUMINT NOT NULL AUTO_INCREMENT,
name CHAR(30) NOT NULL,
PRIMARY KEY (id)
);
INSERT INTO animals (name) VALUES
('dog'),('cat'),('penguin'),
('fox'),('whale'),('ostrich');
*/
SELECT 2 /* +1 */;
SELECT 1 /*! +1 */;
SELECT 1 /*!50101 +1 */;
SELECT 2 /*M! +1 */;
SELECT 2 /*M!50101 +1 */;
use ehrms2;
drop table animals;
create table animals (
id MEDIUMINT NOT NULL AUTO_INCREMENT COMMENT 'id-這個是欄位說明註解',
name CHAR(30) NOT NULL COMMENT 'name-這個是欄位名稱註解',
primary key (ID)
);
select * from information_schema.columns where table_name = 'animals';
INSERT INTO `ehrms2`.`animals` (`id`, `name`) VALUES ('50', 'aa');
INSERT INTO `ehrms2`.`animals` (`name`) VALUES ('bb');
INSERT INTO `ehrms2`.`animals` (`name`) VALUES ('cc');
INSERT INTO `ehrms2`.`animals` (`name`) VALUES ('dd');
INSERT INTO `ehrms2`.`animals` (`name`) VALUES ('ee');
select * from animals;
UPDATE `ehrms2`.`animals` SET `name` = 'aaddd' WHERE (`id` = '50');
DELETE FROM `ehrms2`.`animals` WHERE (`id` = '50'); |
<gh_stars>0
delete from course c
where c.subject in (select subject
from enroll
group by subject, num
having count(stuid) <=1)
AND c.num in (select num
from enroll
group by subject, num
having count(stuid) <=1)
; |
insert into users(oid, username, password, last_password_reset, authorities,version) values('19c0f5b8149811e793ae92361f002671', 'user', '$2a$08$UkVvwpULis18S19S5pZFn.YHPZt3oaqHZnDwqbCW9pft6uFtkXKDC', null, 'USER',0)
insert into users(oid, username, password, last_password_reset, authorities,version) values('<PASSWORD>', 'admin', '$2a$08$lDnHPz7eUkSi6ao14Twuau08mzhWrL4kyZGGU5xfiGALO/Vxd5DOi', null, 'ADMIN, ROOT',0)
insert into users(oid, username, password, last_password_reset, authorities,version) values('<PASSWORD>', 'expired', '$2a$10$PZ.A0IuNG958aHnKDzILyeD9k44EOi1Ny0VlAn.ygrGcgmVcg8PRK', parsedatetime('01-JAN-2050','dd-MMM-yyyy'), 'USER',0)
|
USE [AIDE]
GO
/****** Object: StoredProcedure [dbo].[sp_InsertAttendanceForLeaves] Script Date: 04/22/2020 5:28:36 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[sp_InsertAttendanceForLeaves]
@from DATETIME,
@to DATETIME,
@EMP_ID INT,
@STATUS INT
AS
DECLARE @DEPTID INT = (SELECT DEPT_ID FROM EMPLOYEE WHERE EMP_ID = @EMP_ID),
@DIVID INT = (SELECT DIV_ID FROM EMPLOYEE WHERE EMP_ID = @EMP_ID)
DECLARE @COUNT FLOAT
IF @STATUS IN (5, 6, 9, 12, 14) -- For Halfday status count
SET @COUNT = 0.5
ELSE
SET @COUNT = 1
DECLARE @HOLIDAY_FLG SMALLINT = (SELECT HOLIDAY_FLG FROM CONTACTS c INNER JOIN LOCATION l
ON l.LOCATION_ID = c.LOCATION
AND EMP_ID = @EMP_ID)
WHILE @from <= @to
BEGIN
-- For Holiday Status, insert all employee by division and department
IF @STATUS = 7
BEGIN
-- Delete attendance for the employees filed leave on holiday
IF EXISTS (SELECT * FROM ATTENDANCE a
INNER JOIN EMPLOYEE e
ON e.EMP_ID = a.EMP_ID
INNER JOIN CONTACTS c
ON e.EMP_ID = c.EMP_ID
INNER JOIN LOCATION l
ON c.LOCATION = l.LOCATION_ID
WHERE DATE_ENTRY = CONVERT(VARCHAR, @from, 101)
AND DIV_ID = @DIVID
AND DEPT_ID = @DEPTID
AND HOLIDAY_FLG = @HOLIDAY_FLG)
BEGIN
DELETE FROM ATTENDANCE
WHERE DATE_ENTRY = CONVERT(VARCHAR, @from, 101)
AND EMP_ID IN (SELECT e.EMP_ID FROM EMPLOYEE e
INNER JOIN CONTACTS c
ON e.EMP_ID = c.EMP_ID
INNER JOIN LOCATION l
ON c.LOCATION = l.LOCATION_ID
WHERE DIV_ID = @DIVID AND DEPT_ID = @DEPTID AND HOLIDAY_FLG = @HOLIDAY_FLG)
END
INSERT INTO [dbo].[ATTENDANCE] ([EMP_ID], [DATE_ENTRY], [STATUS], [COUNTS])
SELECT E.EMP_ID, @from, @STATUS, @COUNT
FROM dbo.EMPLOYEE E
INNER JOIN CONTACTS C
ON E.EMP_ID = C.EMP_ID
INNER JOIN LOCATION l
ON c.LOCATION = l.LOCATION_ID
WHERE HOLIDAY_FLG = @HOLIDAY_FLG
AND DEPT_ID = @DEPTID
AND DIV_ID = @DIVID
AND ACTIVE = 1
AND GRP_ID <> 5
END
ELSE
BEGIN
DECLARE @COUNT_LEAVES SMALLINT = (SELECT COUNT(DATE_ENTRY)
FROM ATTENDANCE
WHERE EMP_ID = @EMP_ID
AND STATUS = @STATUS
AND DATE_ENTRY = @from)
-- Get date entry for present status
DECLARE @attDate as DATETIME = (SELECT DATE_ENTRY FROM ATTENDANCE
WHERE CONVERT(DATE, DATE_ENTRY) = CONVERT(DATE, @from)
AND EMP_ID = @EMP_ID
AND STATUS IN (1,2,11))
IF @attDate IS NOT NULL
SET @from = (SELECT DATEADD(HOUR, 4, @attDate))
IF @COUNT_LEAVES > 0
BEGIN
UPDATE ATTENDANCE SET STATUS_CD = 1
WHERE EMP_ID = @EMP_ID
AND STATUS = @STATUS
AND DATE_ENTRY = @from
END
ELSE
BEGIN
IF EXISTS (SELECT (1) FROM ATTENDANCE WHERE EMP_ID = @EMP_ID AND DATE_ENTRY = @from AND STATUS = @STATUS)
UPDATE ATTENDANCE SET STATUS_CD = 1
WHERE EMP_ID = @EMP_ID AND DATE_ENTRY = @from AND STATUS = @STATUS
ELSE
-- Insert Leave
INSERT INTO [dbo].[ATTENDANCE] ([EMP_ID], [DATE_ENTRY], [STATUS], [COUNTS])
VALUES (@EMP_ID, @from, @STATUS, @COUNT)
END
END
SET @from = DATEADD(DAY, 1, @from)
END
|
-- +goose Up
-- SQL in this section is executed when the migration is applied.
CREATE TABLE am.certificate_queries_subdomains (
etld_id serial not null primary key,
etld varchar(512) not null unique,
query_timestamp bigint
);
CREATE TABLE am.certificate_subdomains (
subdomain_id bigserial not null primary key,
etld_id int references am.certificate_queries_subdomains (etld_id) on delete cascade,
inserted_timestamp bigint,
common_name text
);
grant select, insert, update, delete on am.certificate_queries_subdomains to bigdataservice;
grant select, insert, update, delete on am.certificate_subdomains to bigdataservice;
-- +goose Down
-- SQL in this section is executed when the migration is rolled back.
revoke select, insert, update, delete on am.certificate_queries_subdomains from bigdataservice;
revoke select, insert, update, delete on am.certificate_subdomains from bigdataservice;
DROP TABLE am.certificate_subdomains;
DROP TABLE am.certificate_queries_subdomains;
|
-- upgrade --
ALTER TABLE "lottery" ADD "number_of_winning_tickets" INT NOT NULL DEFAULT 1;
-- downgrade --
ALTER TABLE "lottery" DROP COLUMN "number_of_winning_tickets";
|
-- file:roleattributes.sql ln:23 expect:true
SELECT * FROM pg_authid WHERE rolname = 'regress_test_def_createrole'
|
<filename>src/test/resources/sql/revoke/6023e6e4.sql
-- file:privileges.sql ln:480 expect:true
REVOKE ALL ON FUNCTION int8(integer) FROM PUBLIC
|
<reponame>jaime-carrillo/sql-challenge<gh_stars>0
-- List the following details of each employee: employee number, last name, first name, sex, and salary.
SELECT e.emp_no, e.last_name, e.first_name, e.sex, s.salary
FROM salaries AS s
INNER JOIN employees AS e ON
e.emp_no=s.emp_no;
-- List first name, last name, and hire date for employees who were hired in 1986.
SELECT first_name, last_name, hire_date
FROM employees
WHERE (hire_date >= '1986-01-01' AND hire_date <= '1986-12-31')
-- List the manager of each department with the following information: department number, department name, the manager's employee number, last name, first name.
SELECT departments.dept_no, departments.dept_name, dept_manager.emp_no, employees.last_name, employees.first_name
FROM departments
LEFT JOIN dept_manager
ON dept_manager.dept_no = departments.dept_no
LEFT JOIN employees
ON dept_manager.emp_no = employees.emp_no;
-- List the department of each employee with the following information: employee number, last name, first name, and department name.
SELECT employees.emp_no, employees.last_name, employees.first_name, departments.dept_name
FROM employees
LEFT JOIN dept_emp
ON dept_emp.emp_no = employees.emp_no
LEFT JOIN departments
ON departments.dept_no = dept_emp.dept_no;
-- List first name, last name, and sex for employees whose first name is "Hercules" and last names begin with "B."
SELECT first_name, last_name, sex from employees
WHERE first_name = 'Hercules' AND last_name LIKE 'B%'
-- List all employees in the Sales department, including their employee number, last name, first name, and department name.
SELECT employees.emp_no, employees.last_name, employees.first_name, departments.dept_name
FROM employees
LEFT JOIN dept_emp
ON dept_emp.emp_no = employees.emp_no
LEFT JOIN departments
ON departments.dept_no = dept_emp.dept_no
WHERE dept_name = 'Sales';
-- List all employees in the Sales and Development departments, including their employee number, last name, first name, and department name.
SELECT employees.emp_no, employees.last_name, employees.first_name, departments.dept_name
FROM employees
LEFT JOIN dept_emp
ON dept_emp.emp_no = employees.emp_no
LEFT JOIN departments
ON departments.dept_no = dept_emp.dept_no
WHERE dept_name IN ('Sales', 'Development');
-- In descending order, list the frequency count of employee last names, i.e., how many employees share each last name.
SELECT last_name, COUNT(last_name) AS "Last Name count"
FROM employees
GROUP BY last_name
ORDER BY "Last Name count" DESC; |
<gh_stars>0
insert into product(, "", "", , ); |
<reponame>codemonstur/dbDiff
SET FOREIGN_KEY_CHECKS = 0;
CREATE TABLE `notification` ( `notification_id` int(10) unsigned NOT NULL AUTO_INCREMENT, `babyshower_id` int(10) unsigned NOT NULL, `created_date` bigint(20) NOT NULL, `trigger_date` bigint(20) NOT NULL, `type` int(11) NOT NULL, `is_sent` bit(1) NOT NULL DEFAULT b'0', `deleted` bit(1) NOT NULL DEFAULT b'0', `deleted_date` bigint(20) DEFAULT NULL, PRIMARY KEY (`notification_id`), KEY `fk_notification_babyshower_idx` (`babyshower_id`), CONSTRAINT `fk_notification_babyshower` FOREIGN KEY (`babyshower_id`) REFERENCES `babyshower` (`babyshower_id`) ON DELETE CASCADE ON UPDATE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
SET FOREIGN_KEY_CHECKS = 1;
|
-- Eternity II Solution Tree and Results Database Creation Script --
create type search.action as enum ( 'DONE', 'GO', 'PENDING' );
create table search.tree
(
path ltree PRIMARY KEY,
tag search.action,
creation_time TIMESTAMP WITH TIME ZONE default current_timestamp
);
create table search.results
(
path ltree PRIMARY KEY,
creation_time TIMESTAMP WITH TIME ZONE default current_timestamp
);
create table search.pending
(
pending_job ltree NOT NULL,
solver_name text,
solver_ip inet NOT NULL,
solver_version text,
solver_machine_type text,
solver_cluster_name text,
solver_score double precision,
solving_start_time TIMESTAMP WITH TIME ZONE default current_timestamp
);
create index tree_path_idx on search.tree using gist (path);
|
<filename>xwCore/src/main/resources/db/migration/V1_3__create_system_distributed.sql
CREATE TABLE `distributed_task_data`(
`id` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`business_type` TINYINT(2) NOT NULL DEFAULT 0 COMMENT '业务类型',
`business_id` BIGINT(20) NOT NULL DEFAULT 0 COMMENT '业务id',
`status` TINYINT(2) NOT NULL DEFAULT 0 COMMENT '0:默认(未处理),1:已被获取,2:正常完成,3:异常',
`create_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`next_send_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '下个执行时间',
`exe_num` INT(11) NOT NULL DEFAULT 0 COMMENT '执行次数',
`update_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
`ack_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'ack时间',
`exception_text` TEXT COMMENT '异常信息',
`ip` VARCHAR(20) NOT NULL DEFAULT '' COMMENT 'ip地址',
PRIMARY KEY (`id`)
) ENGINE=INNODB CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE `distributed_task_data_bak`(
`id` BIGINT(20) NOT NULL COMMENT '主键',
`business_type` TINYINT(2) NOT NULL DEFAULT 0 COMMENT '业务类型',
`business_id` BIGINT(20) NOT NULL DEFAULT 0 COMMENT '业务id',
`status` TINYINT(2) NOT NULL DEFAULT 0 COMMENT '0:默认(未处理),1:已被获取,2:正常完成,3:异常',
`create_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`next_send_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '下个执行时间',
`exe_num` INT(11) NOT NULL DEFAULT 0 COMMENT '执行次数',
`update_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
`ack_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'ack时间',
`exception_text` TEXT COMMENT '异常信息',
`backup_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '备份时间',
`ip` VARCHAR(20) NOT NULL DEFAULT '' COMMENT 'ip地址'
) ENGINE=INNODB CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE `ack_task_data`(
`id` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`business_type` TINYINT(2) NOT NULL DEFAULT 0 COMMENT '业务类型',
`business_id` BIGINT(20) NOT NULL DEFAULT 0 COMMENT '业务id',
`status` TINYINT(2) NOT NULL DEFAULT 0 COMMENT '0:默认(未处理),1:已发送确认消息,2:正常完成,3:异常',
`create_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`next_send_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '下个执行时间',
`exe_num` INT(11) NOT NULL DEFAULT 0 COMMENT '执行次数',
`update_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
`exception_text` TEXT COMMENT '异常信息',
`ip` VARCHAR(20) NOT NULL DEFAULT '' COMMENT 'ip地址',
`url` VARCHAR(200) NOT NULL DEFAULT '' COMMENT 'url请求地址',
PRIMARY KEY (`id`)
) ENGINE=INNODB CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE `ack_task_data_bak`(
`id` BIGINT(20) NOT NULL COMMENT '主键',
`business_type` TINYINT(2) NOT NULL DEFAULT 0 COMMENT '业务类型',
`business_id` BIGINT(20) NOT NULL DEFAULT 0 COMMENT '业务id',
`status` TINYINT(2) NOT NULL DEFAULT 0 COMMENT '0:默认(未处理),1:已发送确认消息,2:正常完成,3:异常',
`create_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`next_send_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '下个执行时间',
`exe_num` INT(11) NOT NULL DEFAULT 0 COMMENT '执行次数',
`update_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
`exception_text` TEXT COMMENT '异常信息',
`ip` VARCHAR(20) NOT NULL DEFAULT '' COMMENT 'ip地址',
`url` VARCHAR(200) NOT NULL DEFAULT '' COMMENT 'url请求地址',
`backup_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '备份时间'
) ENGINE=INNODB CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
--
-- semi joins
--
set schema 's';
-- a bunch of equi-joins
-- two way
select EMP.EMPNO, EMP.LNAME from EMP, DEPT
where EMP.DEPTNO = DEPT.DEPTNO order by EMPNO;
select DEPT.DNAME from EMP, DEPT
where EMP.DEPTNO = DEPT.DEPTNO order by DNAME;
-- three way
SELECT EMP.LNAME
from EMP, DEPT, LOCATION
where EMP.DEPTNO=DEPT.DEPTNO and DEPT.LOCID=LOCATION.LOCID
order by LNAME;
SELECT DEPT.DNAME
from EMP, DEPT, LOCATION
where EMP.DEPTNO=DEPT.DEPTNO and DEPT.LOCID=LOCATION.LOCID
order by DNAME;
SELECT LOCATION.STREET, LOCATION.CITY
from EMP, DEPT, LOCATION
where EMP.DEPTNO=DEPT.DEPTNO and DEPT.LOCID=LOCATION.LOCID
order by STREET;
-- semi joins of a self join
select M.EMPNO, M.LNAME from EMP M, EMP R
where M.EMPNO = R.MANAGER order by EMPNO;
select R.EMPNO, R.LNAME from EMP M, EMP R
where M.EMPNO = R.MANAGER order by EMPNO;
-- double reference of a table
select EMP.LNAME, DEPT.DNAME
from LOCATION EL, LOCATION DL, EMP, DEPT
where EL.LOCID = EMP.LOCID and DL.LOCID=DEPT.LOCID
order by LNAME, DNAME;
select EL.CITY, DL.CITY
from LOCATION EL, LOCATION DL, EMP, DEPT
where EL.LOCID = EMP.LOCID and DL.LOCID=DEPT.LOCID
order by CITY, CITY;
-- many to many self join semi join variations
select F.FNAME
FROM CUSTOMERS M, CUSTOMERS F
WHERE M.LNAME = F.LNAME
AND M.SEX = 'M'
AND F.SEX = 'F'
order by FNAME;
select M.FNAME, M.LNAME
FROM CUSTOMERS M, CUSTOMERS F
WHERE M.LNAME = F.LNAME
AND M.SEX = 'M'
AND F.SEX = 'F'
order by FNAME, LNAME;
-- a few ranges
-- a big ol' join
select PRODUCTS.PRICE
from SALES, PRODUCTS
where SALES.PRICE between PRODUCTS.PRICE - 1 and PRODUCTS.PRICE + 1
and SALES.PRODID = PRODUCTS.PRODID
order by PRICE;
-- non join conditions
select SALES.CUSTID
from SALES, PRODUCTS
where SALES.PRICE between PRODUCTS.PRICE - 1 and PRODUCTS.PRICE + 1
and ( PRODUCTS.NAME LIKE 'C%' OR PRODUCTS.NAME LIKE 'P%')
order by CUSTID;
-- equality and non equality in one
select SALES.PRICE
from SALES, PRODUCTS, CUSTOMERS
where SALES.PRICE - PRODUCTS.PRICE < 0.5
and PRODUCTS.PRICE - SALES.PRICE < 0.25
and SALES.CUSTID = CUSTOMERS.CUSTID
order by PRICE;
select PRODUCTS.NAME, CUSTOMERS.CUSTID, CUSTOMERS.FNAME,
CUSTOMERS.LNAME, PRODUCTS.PRICE
from SALES, PRODUCTS, CUSTOMERS
where SALES.PRICE - PRODUCTS.PRICE < 0.5
and PRODUCTS.PRICE - SALES.PRICE < 0.25
and SALES.CUSTID = CUSTOMERS.CUSTID
order by NAME, CUSTID;
|
<gh_stars>1-10
-- start_ignore
SET gp_create_table_random_default_distribution=off;
-- end_ignore
CREATE TABLE ct_ao_vacuum1(
text_col text,
bigint_col bigint,
char_vary_col character varying(30),
numeric_col numeric,
int_col int4,
float_col float4,
int_array_col int[],
drop_col numeric,
before_rename_col int4,
change_datatype_col numeric,
a_ts_without timestamp without time zone,
b_ts_with timestamp with time zone,
date_column date) with (appendonly=true) distributed randomly;
INSERT INTO ct_ao_vacuum1 values ('0_zero', 0, '0_zero', 0, 0, 0, '{0}', 0, 0, 0, '2004-10-19 10:23:54', '2004-10-19 10:23:54+02', '1-1-2000');
INSERT INTO ct_ao_vacuum1 values ('1_zero', 1, '1_zero', 1, 1, 1, '{1}', 1, 1, 1, '2005-10-19 10:23:54', '2005-10-19 10:23:54+02', '1-1-2001');
INSERT INTO ct_ao_vacuum1 values ('2_zero', 2, '2_zero', 2, 2, 2, '{2}', 2, 2, 2, '2006-10-19 10:23:54', '2006-10-19 10:23:54+02', '1-1-2002');
INSERT INTO ct_ao_vacuum1 select i||'_'||repeat('text',100),i,i||'_'||repeat('text',3),i,i,i,'{3}',i,i,i,'2006-10-19 10:23:54', '2006-10-19 10:23:54+02', '1-1-2002' from generate_series(3,100)i;
ALTER TABLE ct_ao_vacuum1 ADD COLUMN added_col character varying(30) default 'test_value';
ALTER TABLE ct_ao_vacuum1 DROP COLUMN drop_col ;
ALTER TABLE ct_ao_vacuum1 RENAME COLUMN before_rename_col TO after_rename_col;
ALTER TABLE ct_ao_vacuum1 ALTER COLUMN change_datatype_col TYPE int4;
ALTER TABLE ct_ao_vacuum1 set with ( reorganize='true') distributed by (int_col);
INSERT INTO ct_ao_vacuum1 values ('1_zero', 1, '1_zero', 1, 1, 1, '{1}', 1, 1, '2005-10-19 10:23:54', '2005-10-19 10:23:54+02', '1-1-2001');
INSERT INTO ct_ao_vacuum1 values ('2_zero', 2, '2_zero', 2, 2, 2, '{2}', 2, 2, '2006-10-19 10:23:54', '2006-10-19 10:23:54+02', '1-1-2002');
INSERT INTO ct_ao_vacuum1 values ('3_zero', 3, '3_zero', 0, 0, 0, '{0}', 0, 0, '2004-10-19 10:23:54', '2004-10-19 10:23:54+02', '1-1-2000');
CREATE TABLE ct_ao_vacuum2(
text_col text,
bigint_col bigint,
char_vary_col character varying(30),
numeric_col numeric,
int_col int4,
float_col float4,
int_array_col int[],
drop_col numeric,
before_rename_col int4,
change_datatype_col numeric,
a_ts_without timestamp without time zone,
b_ts_with timestamp with time zone,
date_column date) with (appendonly=true) distributed randomly;
INSERT INTO ct_ao_vacuum2 values ('0_zero', 0, '0_zero', 0, 0, 0, '{0}', 0, 0, 0, '2004-10-19 10:23:54', '2004-10-19 10:23:54+02', '1-1-2000');
INSERT INTO ct_ao_vacuum2 values ('1_zero', 1, '1_zero', 1, 1, 1, '{1}', 1, 1, 1, '2005-10-19 10:23:54', '2005-10-19 10:23:54+02', '1-1-2001');
INSERT INTO ct_ao_vacuum2 values ('2_zero', 2, '2_zero', 2, 2, 2, '{2}', 2, 2, 2, '2006-10-19 10:23:54', '2006-10-19 10:23:54+02', '1-1-2002');
INSERT INTO ct_ao_vacuum2 select i||'_'||repeat('text',100),i,i||'_'||repeat('text',3),i,i,i,'{3}',i,i,i,'2006-10-19 10:23:54', '2006-10-19 10:23:54+02', '1-1-2002' from generate_series(3,100)i;
ALTER TABLE ct_ao_vacuum2 ADD COLUMN added_col character varying(30) default 'test_value';
ALTER TABLE ct_ao_vacuum2 DROP COLUMN drop_col ;
ALTER TABLE ct_ao_vacuum2 RENAME COLUMN before_rename_col TO after_rename_col;
ALTER TABLE ct_ao_vacuum2 ALTER COLUMN change_datatype_col TYPE int4;
ALTER TABLE ct_ao_vacuum2 set with ( reorganize='true') distributed by (int_col);
INSERT INTO ct_ao_vacuum2 values ('1_zero', 1, '1_zero', 1, 1, 1, '{1}', 1, 1, '2005-10-19 10:23:54', '2005-10-19 10:23:54+02', '1-1-2001');
INSERT INTO ct_ao_vacuum2 values ('2_zero', 2, '2_zero', 2, 2, 2, '{2}', 2, 2, '2006-10-19 10:23:54', '2006-10-19 10:23:54+02', '1-1-2002');
INSERT INTO ct_ao_vacuum2 values ('3_zero', 3, '3_zero', 0, 0, 0, '{0}', 0, 0, '2004-10-19 10:23:54', '2004-10-19 10:23:54+02', '1-1-2000');
CREATE TABLE ct_ao_vacuum3(
text_col text,
bigint_col bigint,
char_vary_col character varying(30),
numeric_col numeric,
int_col int4,
float_col float4,
int_array_col int[],
drop_col numeric,
before_rename_col int4,
change_datatype_col numeric,
a_ts_without timestamp without time zone,
b_ts_with timestamp with time zone,
date_column date) with (appendonly=true) distributed randomly;
INSERT INTO ct_ao_vacuum3 values ('0_zero', 0, '0_zero', 0, 0, 0, '{0}', 0, 0, 0, '2004-10-19 10:23:54', '2004-10-19 10:23:54+02', '1-1-2000');
INSERT INTO ct_ao_vacuum3 values ('1_zero', 1, '1_zero', 1, 1, 1, '{1}', 1, 1, 1, '2005-10-19 10:23:54', '2005-10-19 10:23:54+02', '1-1-2001');
INSERT INTO ct_ao_vacuum3 values ('2_zero', 2, '2_zero', 2, 2, 2, '{2}', 2, 2, 2, '2006-10-19 10:23:54', '2006-10-19 10:23:54+02', '1-1-2002');
INSERT INTO ct_ao_vacuum3 select i||'_'||repeat('text',100),i,i||'_'||repeat('text',3),i,i,i,'{3}',i,i,i,'2006-10-19 10:23:54', '2006-10-19 10:23:54+02', '1-1-2002' from generate_series(3,100)i;
ALTER TABLE ct_ao_vacuum3 ADD COLUMN added_col character varying(30) default 'test_value';
ALTER TABLE ct_ao_vacuum3 DROP COLUMN drop_col ;
ALTER TABLE ct_ao_vacuum3 RENAME COLUMN before_rename_col TO after_rename_col;
ALTER TABLE ct_ao_vacuum3 ALTER COLUMN change_datatype_col TYPE int4;
ALTER TABLE ct_ao_vacuum3 set with ( reorganize='true') distributed by (int_col);
INSERT INTO ct_ao_vacuum3 values ('1_zero', 1, '1_zero', 1, 1, 1, '{1}', 1, 1, '2005-10-19 10:23:54', '2005-10-19 10:23:54+02', '1-1-2001');
INSERT INTO ct_ao_vacuum3 values ('2_zero', 2, '2_zero', 2, 2, 2, '{2}', 2, 2, '2006-10-19 10:23:54', '2006-10-19 10:23:54+02', '1-1-2002');
INSERT INTO ct_ao_vacuum3 values ('3_zero', 3, '3_zero', 0, 0, 0, '{0}', 0, 0, '2004-10-19 10:23:54', '2004-10-19 10:23:54+02', '1-1-2000');
CREATE TABLE ct_ao_vacuum4(
text_col text,
bigint_col bigint,
char_vary_col character varying(30),
numeric_col numeric,
int_col int4,
float_col float4,
int_array_col int[],
drop_col numeric,
before_rename_col int4,
change_datatype_col numeric,
a_ts_without timestamp without time zone,
b_ts_with timestamp with time zone,
date_column date) with (appendonly=true) distributed randomly;
INSERT INTO ct_ao_vacuum4 values ('0_zero', 0, '0_zero', 0, 0, 0, '{0}', 0, 0, 0, '2004-10-19 10:23:54', '2004-10-19 10:23:54+02', '1-1-2000');
INSERT INTO ct_ao_vacuum4 values ('1_zero', 1, '1_zero', 1, 1, 1, '{1}', 1, 1, 1, '2005-10-19 10:23:54', '2005-10-19 10:23:54+02', '1-1-2001');
INSERT INTO ct_ao_vacuum4 values ('2_zero', 2, '2_zero', 2, 2, 2, '{2}', 2, 2, 2, '2006-10-19 10:23:54', '2006-10-19 10:23:54+02', '1-1-2002');
INSERT INTO ct_ao_vacuum4 select i||'_'||repeat('text',100),i,i||'_'||repeat('text',3),i,i,i,'{3}',i,i,i,'2006-10-19 10:23:54', '2006-10-19 10:23:54+02', '1-1-2002' from generate_series(3,100)i;
ALTER TABLE ct_ao_vacuum4 ADD COLUMN added_col character varying(30) default 'test_value';
ALTER TABLE ct_ao_vacuum4 DROP COLUMN drop_col ;
ALTER TABLE ct_ao_vacuum4 RENAME COLUMN before_rename_col TO after_rename_col;
ALTER TABLE ct_ao_vacuum4 ALTER COLUMN change_datatype_col TYPE int4;
ALTER TABLE ct_ao_vacuum4 set with ( reorganize='true') distributed by (int_col);
INSERT INTO ct_ao_vacuum4 values ('1_zero', 1, '1_zero', 1, 1, 1, '{1}', 1, 1, '2005-10-19 10:23:54', '2005-10-19 10:23:54+02', '1-1-2001');
INSERT INTO ct_ao_vacuum4 values ('2_zero', 2, '2_zero', 2, 2, 2, '{2}', 2, 2, '2006-10-19 10:23:54', '2006-10-19 10:23:54+02', '1-1-2002');
INSERT INTO ct_ao_vacuum4 values ('3_zero', 3, '3_zero', 0, 0, 0, '{0}', 0, 0, '2004-10-19 10:23:54', '2004-10-19 10:23:54+02', '1-1-2000');
CREATE TABLE ct_ao_vacuum5(
text_col text,
bigint_col bigint,
char_vary_col character varying(30),
numeric_col numeric,
int_col int4,
float_col float4,
int_array_col int[],
drop_col numeric,
before_rename_col int4,
change_datatype_col numeric,
a_ts_without timestamp without time zone,
b_ts_with timestamp with time zone,
date_column date) with (appendonly=true) distributed randomly;
INSERT INTO ct_ao_vacuum5 values ('0_zero', 0, '0_zero', 0, 0, 0, '{0}', 0, 0, 0, '2004-10-19 10:23:54', '2004-10-19 10:23:54+02', '1-1-2000');
INSERT INTO ct_ao_vacuum5 values ('1_zero', 1, '1_zero', 1, 1, 1, '{1}', 1, 1, 1, '2005-10-19 10:23:54', '2005-10-19 10:23:54+02', '1-1-2001');
INSERT INTO ct_ao_vacuum5 values ('2_zero', 2, '2_zero', 2, 2, 2, '{2}', 2, 2, 2, '2006-10-19 10:23:54', '2006-10-19 10:23:54+02', '1-1-2002');
INSERT INTO ct_ao_vacuum5 select i||'_'||repeat('text',100),i,i||'_'||repeat('text',3),i,i,i,'{3}',i,i,i,'2006-10-19 10:23:54', '2006-10-19 10:23:54+02', '1-1-2002' from generate_series(3,100)i;
ALTER TABLE ct_ao_vacuum5 ADD COLUMN added_col character varying(30) default 'test_value';
ALTER TABLE ct_ao_vacuum5 DROP COLUMN drop_col ;
ALTER TABLE ct_ao_vacuum5 RENAME COLUMN before_rename_col TO after_rename_col;
ALTER TABLE ct_ao_vacuum5 ALTER COLUMN change_datatype_col TYPE int4;
ALTER TABLE ct_ao_vacuum5 set with ( reorganize='true') distributed by (int_col);
INSERT INTO ct_ao_vacuum5 values ('1_zero', 1, '1_zero', 1, 1, 1, '{1}', 1, 1, '2005-10-19 10:23:54', '2005-10-19 10:23:54+02', '1-1-2001');
INSERT INTO ct_ao_vacuum5 values ('2_zero', 2, '2_zero', 2, 2, 2, '{2}', 2, 2, '2006-10-19 10:23:54', '2006-10-19 10:23:54+02', '1-1-2002');
INSERT INTO ct_ao_vacuum5 values ('3_zero', 3, '3_zero', 0, 0, 0, '{0}', 0, 0, '2004-10-19 10:23:54', '2004-10-19 10:23:54+02', '1-1-2000');
VACUUM sync1_ao_vacuum4;
VACUUM ck_sync1_ao_vacuum3;
VACUUM ct_ao_vacuum1;
|
-- @testpoint:opengauss关键字checkpoint(非保留),作为用户组名
--关键字不带引号-成功
drop group if exists checkpoint;
create group checkpoint with password '<PASSWORD>';
drop group checkpoint;
--关键字带双引号-成功
drop group if exists "checkpoint";
create group "checkpoint" with password '<PASSWORD>';
drop group "checkpoint";
--关键字带单引号-合理报错
drop group if exists 'checkpoint';
--关键字带反引号-合理报错
drop group if exists `checkpoint`;
|
DROP DATABASE IF EXISTS book_shop;
CREATE DATABASE book_shop CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
use book_shop;
-- Robert
-- Products
CREATE TABLE Products(
product_id BIGINT AUTO_INCREMENT NOT NULL,
product_name varchar(100) NOT NULL,
value int(10) NOT NULL,
PRIMARY KEY (product_id)
);
INSERT INTO Products (product_name, value) VALUES
("桃太郎",1000),
("物語本A",5000),
("The_Adventures_of_Huck_Finn", 200),
("大切書",1000000000);
-- Prefecture Table
-- Created by komatsu
CREATE TABLE Prefecture(
prefecture_id INT NOT NULL AUTO_INCREMENT,
prefecture_name VARCHAR(50) NOT NULL,
PRIMARY KEY (`prefecture_id`)
);
-- INSERT
INSERT INTO Prefecture(prefecture_name)
VALUES ("北海道"),("青森県"),("岩手県"),("宮城県"),("秋田県"),("山形県"),("福島県"),("茨城県"),("栃木県"),("群馬県"),("埼玉県"),("千葉県"),("東京都"),("神奈川県"),("新潟県"),("富山県"),("石川県"),("福井県"),("山梨県"),("長野県"),("岐阜県"),("静岡県"),
("愛知県"),("三重県"),("滋賀県"),("京都府"),("大阪府"),("兵庫県"),("奈良県"),("和歌山県"),("鳥取県"),("島根県"),("岡山県"),("広島県"),("山口県"),("徳島県"),("香川県"),("愛媛県"),("高知県"),("福岡県"),("佐賀県"),("長崎県"),("熊本県"),("大分県"),("宮崎県"),("鹿児島県"),("沖縄県");
-- Yin
-- Customers
CREATE TABLE Customers(
customer_id BIGINT NOT NULL AUTO_INCREMENT,
customer_name varchar(50) NOT NULL,
prefecture_id INT NOT NULL,
PRIMARY KEY(`customer_id`),
FOREIGN KEY(`prefecture_id`) REFERENCES Prefecture(prefecture_id)
);
INSERT INTO Customers(customer_id, customer_name, prefecture_id)
VALUES
(1, "Robert", 15),(2, "Yin", 25),(3, "Matsumoto", 35),(4,"Komatsu", 22);
-- Sales
-- Mastumoto
CREATE TABLE Sales(
sales_id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
product_id BIGINT NOT NULL,
customer_id BIGINT NOT NULL,
created_at DATETIME(6) NOT NULL,
FOREIGN KEY (product_id) REFERENCES Products(product_id),
FOREIGN KEY (customer_id) REFERENCES Customers(customer_id),
KEY sales_customer_id_product_id_idx(product_id, customer_id),
KEY sales_product_id_icustomer_id_dx(customer_id, product_id)
);
INSERT INTO Sales(product_id, customer_id, created_at) VALUES (1,1, NOW()), (2,2,NOW()), (3,4,NOW());
|
<reponame>Idzikowski-Casey/column-topology
DROP SCHEMA ${data_schema} CASCADE;
DROP SCHEMA ${project_schema} CASCADE;
DELETE FROM projects WHERE project_id = :project_id;
|
<filename>server/db/seed.sql
INSERT INTO users (auth_id, first_name, last_name, email_address) VALUES ('auth0|60d68c7dc0b80a006a831d43', 'Carly', 'Dekock', '<EMAIL>');
INSERT INTO users (auth_id, first_name, last_name, email_address) VALUES ('auth0|6100548cc724050071b58567', 'Carly', 'McBride', '<EMAIL>');
INSERT INTO users (auth_id, first_name, last_name, email_address) VALUES ('auth0|6114b6ce2b1c5d006944cd34', 'Sahar', 'Bala', '<EMAIL>');
INSERT INTO users (auth_id, first_name, last_name, email_address) VALUES ('auth0|611727de9b035d00695b0720', '<EMAIL>', '', 'bcdekock');
INSERT INTO hikes_list (user_id, name, description, length, elevation_gain, time, keywords, latitude, longitude) VALUES (1, 'Mount Adams South Climb', 'The south climb or lunch counter approach.', '12.0 mi', '6700 ft', '6 hours', 'wildflowers, vista', 46.1359, -121.4976);
INSERT INTO hikes_list (user_id, name, description, length, elevation_gain, time, keywords, latitude, longitude) VALUES (1, 'Mount Baker Heliotrope Ridge', 'Heliotrope ridge trail overlooking Mount Baker', '5.5 mi', '1400 ft', '3 hours', 'wildflowers, vista, mountain view', 48.8021, -121.8957);
INSERT INTO hikes_list (user_id, name, description, length, elevation_gain, time, keywords, latitude, longitude) VALUES (1, 'The Brothers', 'Scramble climbing route to the summit of a mountain in the Olympic range, very technical.', '18.0 mi', '6050 ft', '10 hours', 'scramble, vista', 47.5997, -123.1512);
INSERT INTO hikes_list (user_id, name, description, length, elevation_gain, time, keywords, latitude, longitude) VALUES (1, 'Par<NAME>', 'Steep vertical climb with great views of Mount Rainier.', '7.5 mi', '2200 ft', '4 hours', 'vista, flowers, streams', 48.7067, -121.8122);
INSERT INTO hikes_list (user_id, name, description, length, elevation_gain, time, keywords, latitude, longitude) VALUES (1, 'Di<NAME>', 'Overlook a beautiful blue lake in the North Cascades.', '7.6 miles', '1400 ft', '3 hours', 'vista, lake', 48.7206, -121.1216);
INSERT INTO hikes_list (user_id, name, description, length, elevation_gain, time, keywords, latitude, longitude) VALUES (1, 'Blue Lake', 'Towering granite peaks, forests, meadows and wildflowers with a pristine blue mountain lake.', '4.4 miles', '1050 ft', '3 hours', 'lake, forest', 48.5191, -120.6742);
INSERT INTO hikes_list (user_id, name, description, length, elevation_gain, time, keywords, latitude, longitude) VALUES (3, '<NAME>', 'Short hike from Mt Rainier, great views.', '4.0 mi', '600 ft', '40 min', 'wildflowers, mountain, views', 46.9146, -121.6423);
INSERT INTO hikes_list (user_id, name, description, length, elevation_gain, time, keywords, latitude, longitude) VALUES (4, 'Rattlesnake Ledge', 'Forest trail with views of the Cedar River watershed and Mount Si.', '4.0 mi', '1160 ft', '3 hrs', 'forest, mountains', 47.4347, -121.7687);
INSERT INTO hikes_list (user_id, name, description, length, elevation_gain, time, keywords, latitude, longitude) VALUES (2, 'Snow Lake', 'Beautiful lake tucked under Chair Peak, accessible via Alpental Ski Area.', '7.2 mi', '1800 ft', '3 hrs', 'alpine lake, rugged terrain', 47.4454, -121.4230);
INSERT INTO hikes_list (user_id, name, description, length, elevation_gain, time, keywords, latitude, longitude) VALUES (2, 'Skyline Lake', 'Short climb up the ridge opposite Stevens Pass Ski Area.', '3.0 mi', '1100 ft', '1.5 hrs', 'snowshoe, mountain views', 47.7472, -121.0882);
INSERT INTO hikes_list (user_id, name, description, length, elevation_gain, time, keywords, latitude, longitude) VALUES (2, 'Wallace Falls State Park', 'Wind your way along the river to nine dazzling waterfalls', '5.6 mi', '1300 ft', '3 hrs', 'waterfalls, forest', 47.8669, -121.6780);
INSERT INTO hikes_list (user_id, name, description, length, elevation_gain, time, keywords, latitude, longitude) VALUES (2, 'Ross Dam Trail', 'Short hike that offers views of Ross Lake, connects to numerous other trails.', '1.6 mi', '500 ft', '45 min', 'lake, mountains', 48.7278, -121.0628);
INSERT INTO trip_reports (hike_id, user_id, name, title, description, hiked_at) VALUES (1, 1, 'Carly', 'Sunny day!', 'Great hike on a sunny day the other day, conditions good.', 'June 24');
INSERT INTO trip_reports (hike_id, user_id, name, title, description, hiked_at) VALUES (2, 1, 'Carly', 'Beautiful view!', 'Nice sunny day for a hike, amazing to see how little snow remains!', 'Sept 8');
INSERT INTO trip_reports (hike_id, user_id, name, title, description, hiked_at) VALUES (10, 1, 'Carly', 'Great workout!', 'Ski toured up to the ridge, beautiful views of the ski area.', 'Feb 25');
INSERT INTO trip_reports (hike_id, user_id, name, title, description, hiked_at) VALUES (6, 1, 'Carly', 'Such a beautiful place!', 'Great day to walk up to Blue Lake, thankfully a lot of the area was spared by fires.', 'Sept 5'); |
<reponame>Hecate946/Sketyl
CREATE TABLE IF NOT EXISTS spotify_auth (
user_id TEXT PRIMARY KEY,
token_info JSONB DEFAULT '{}'::JSONB
);
CREATE INDEX IF NOT EXISTS token_idx ON spotify_auth(user_id, token_info); |
CREATE PROCEDURE usp_DeleteEmployeesFromDepartment(@departmentId INT)
AS
DELETE FROM Departments
WHERE DepartmentID = @departmentId
|
<filename>notebooks/cw-lesson7/lesson7-examples-insert.sql<gh_stars>0
USE WideWorldImporters;
INSERT INTO Warehouse.Colors
(ColorId, ColorName, LastEditedBy)
VALUES
(NEXT VALUE FOR Sequences.ColorID, 'Ohra', 1);
INSERT INTO Warehouse.Colors
(ColorId, ColorName, LastEditedBy)
VALUES
(NEXT VALUE FOR Sequences.ColorID, 'Ohra3', 1),
(NEXT VALUE FOR Sequences.ColorID, 'Ohra4', 1);
select *
FROM Warehouse.Colors
ORDER BY ColorName;
Declare
@colorId INT,
@LastEditedBySystemUser INT,
@SystemUserName NVARCHAR(50) = 'Data Conversion Only'
SET @colorId = NEXT VALUE FOR Sequences.ColorID;
SELECT @LastEditedBySystemUser = PersonID
FROM [Application].People
WHERE FullName = @SystemUserName
INSERT INTO Warehouse.Colors
(ColorId, ColorName, LastEditedBy)
VALUES
(@colorId, 'Ohra2', @LastEditedBySystemUser);
select TOP 1 ColorId, ColorName, LastEditedBy into Warehouse.Color_Copy2
from Warehouse.Colors;
--DROP TABLE Warehouse.Color_Copy
INSERT INTO Warehouse.Colors
(ColorId, ColorName, LastEditedBy)
OUTPUT inserted.ColorId, inserted.ColorName, inserted.LastEditedBy
INTO Warehouse.Color_Copy (ColorId, ColorName, LastEditedBy)
OUTPUT inserted.ColorId
VALUES
(NEXT VALUE FOR Sequences.ColorID,'Dark Blue', 1),
(NEXT VALUE FOR Sequences.ColorID,'Light Blue', 1);
SELECT @@ROWCOUNT;
SELECT *
FROM Warehouse.Color_Copy
WHERE ColorId IN (82,83);
USE AdventureWorks2017;
begin tran
INSERT INTO person.address
(addressline1, addressline2, city, stateprovinceid, postalcode)
VALUES('67231224qwe Kingsway', '', 'Burnaby', 7, 'V5H 327');
SELECT @@IDENTITY, SCOPE_IDENTITY();
commit tran
SELECT top 1 * into Sales.Invoices_Q12016
FROM Sales.Invoices
WHERE InvoiceDate >= '2016-01-01'
AND InvoiceDate < '2016-04-01';
-- delete from Warehouse.Colors where ColorName = 'Ohra';
-- delete from Warehouse.Colors where ColorName = 'Ohra2';
-- delete from Warehouse.Colors where ColorName = 'Dark Blue';
-- delete from Warehouse.Colors where ColorName = 'Light Blue';
-- delete from person.address where AddressId =
-- drop table Sales.Invoices_Q12016;
--Alter table Sales.Invoices DROP COLUMN [InvoiceConfirmedForProcessing];
TRUNCATE TABLE Sales.Invoices_Q12016;
INSERT INTO Sales.Invoices_Q12016
SELECT TOP (5)
InvoiceID
,CustomerID
,BillToCustomerID
,OrderID + 1000 AS OrderId
,DeliveryMethodID
,ContactPersonID
,AccountsPersonID
,SalespersonPersonID
,PackedByPersonID
,InvoiceDate
,CustomerPurchaseOrderNumber
,IsCreditNote
,CreditNoteReason
,Comments
,DeliveryInstructions
,InternalComments
,TotalDryItems
,TotalChillerItems
,DeliveryRun
,RunPosition
,ReturnedDeliveryData
,[ConfirmedDeliveryTime]
,[ConfirmedReceivedBy]
,LastEditedBy
,GETDATE()
FROM Sales.Invoices
WHERE InvoiceDate >= '2016-01-01'
AND InvoiceDate < '2016-04-01'
ORDER BY InvoiceID;
INSERT INTO Sales.Invoices_Q12016
(InvoiceID
,CustomerID
,BillToCustomerID
,OrderID
,DeliveryMethodID
,ContactPersonID
,AccountsPersonID
,SalespersonPersonID
,PackedByPersonID
,InvoiceDate
,CustomerPurchaseOrderNumber
,IsCreditNote
,CreditNoteReason
,Comments
,DeliveryInstructions
,InternalComments
,TotalDryItems
,TotalChillerItems
,DeliveryRun
,RunPosition
,ReturnedDeliveryData
,[ConfirmedDeliveryTime]
,[ConfirmedReceivedBy]
,LastEditedBy
,LastEditedWhen)
SELECT TOP (5)
InvoiceID
,CustomerID
,BillToCustomerID
,OrderID + 1000
,DeliveryMethodID
,ContactPersonID
,AccountsPersonID
,SalespersonPersonID
,PackedByPersonID
,InvoiceDate
,CustomerPurchaseOrderNumber
,IsCreditNote
,CreditNoteReason
,Comments
,DeliveryInstructions
,InternalComments
,TotalDryItems
,TotalChillerItems
,DeliveryRun
,RunPosition
,ReturnedDeliveryData
,[ConfirmedDeliveryTime]
,[ConfirmedReceivedBy]
,LastEditedBy
,GETDATE()
FROM Sales.Invoices
WHERE InvoiceDate >= '2016-01-01'
AND InvoiceDate < '2016-04-01'
ORDER BY InvoiceID;
INSERT INTO Sales.Invoices_Q12016
(InvoiceID
,CustomerID
,BillToCustomerID
,OrderID
,DeliveryMethodID
,ContactPersonID
,AccountsPersonID
,SalespersonPersonID
,PackedByPersonID
,InvoiceDate
,CustomerPurchaseOrderNumber
,IsCreditNote
,CreditNoteReason
,Comments
,DeliveryInstructions
,InternalComments
,TotalDryItems
,TotalChillerItems
,DeliveryRun
,RunPosition
,ReturnedDeliveryData
,[ConfirmedDeliveryTime]
,[ConfirmedReceivedBy]
,LastEditedBy
,LastEditedWhen)
EXEC Sales.GetNewInvoices @batchsize = 10
SELECT *
FROM Sales.Invoices_Q12016
ORDER BY LastEditedWhen DESC; |
<reponame>CaosMx/codewars
-- On the Canadian Border (SQL for Beginners #2)
/*
*You are a border guard sitting on the Canadian border. You were given a list of travelers who have arrived at your gate today. You know that American, Mexican, and Canadian citizens don't need visas, so they can just continue their trips. You don't need to check their passports for visas! You only need to check the passports of citizens of all other countries!
*
*Select names, and countries of origin of all the travelers, excluding anyone from Canada, Mexico, or The US.
*
*travelers table schema
*
* name
* country
*
*NOTE: The United States is written as 'USA' in the table.*
*
*NOTE: Your solution should use pure SQL. Ruby is used within the test cases just to validate your answer.
*
*SOLUTION:
*/
SELECT name, country
FROM travelers
WHERE country <> 'Canada' AND country <>'USA' and country <>'Mexico';
|
set define off verify off feedback off
whenever sqlerror exit sql.sqlcode rollback
--------------------------------------------------------------------------------
--
-- ORACLE Application Express (APEX) export file
--
-- You should run the script connected to SQL*Plus as the Oracle user
-- APEX_050100 or as the owner (parsing schema) of the application.
--
-- NOTE: Calls to apex_application_install override the defaults below.
--
--------------------------------------------------------------------------------
begin
wwv_flow_api.import_begin (
p_version_yyyy_mm_dd=>'2016.08.24'
,p_release=>'5.1.1.00.08'
,p_default_workspace_id=>10950
,p_default_application_id=>828
,p_default_owner=>'OPRSTAGE'
);
end;
/
prompt --application/ui_types
begin
null;
end;
/
prompt --application/shared_components/plugins/region_type/com_bskyb_cimdb_jet_tagcloud
begin
wwv_flow_api.create_plugin(
p_id=>wwv_flow_api.id(70937118030638438)
,p_plugin_type=>'REGION TYPE'
,p_name=>'COM.BSKYB.CIMDB.JET.TAGCLOUD'
,p_display_name=>'JET TagCloud'
,p_supported_ui_types=>'DESKTOP:JQM_SMARTPHONE'
,p_javascript_file_urls=>wwv_flow_string.join(wwv_flow_t_varchar2(
'[require jet]#PLUGIN_FILES#tagCloud.js',
''))
,p_api_version=>2
,p_render_function=>'opr.jet_plugins_api.render_tagcloud'
,p_ajax_function=>'opr.jet_plugins_api.ajax_tagcloud'
,p_standard_attributes=>'SOURCE_SQL'
,p_substitute_attributes=>true
,p_subscribe_plugin_settings=>true
,p_help_text=>wwv_flow_string.join(wwv_flow_t_varchar2(
'Smaple usage :',
'SELECT t.id',
' ,t.label',
' ,t.value',
' ,t.shortdesc',
'FROM OPR.MEDIAUSAGE_TST t'))
,p_version_identifier=>'1.0'
,p_files_version=>6
);
wwv_flow_api.create_plugin_attribute(
p_id=>wwv_flow_api.id(70938222225650732)
,p_plugin_id=>wwv_flow_api.id(70937118030638438)
,p_attribute_scope=>'COMPONENT'
,p_attribute_sequence=>1
,p_display_sequence=>10
,p_prompt=>'layout'
,p_attribute_type=>'SELECT LIST'
,p_is_required=>false
,p_default_value=>'cloud'
,p_is_translatable=>false
,p_lov_type=>'STATIC'
);
wwv_flow_api.create_plugin_attr_value(
p_id=>wwv_flow_api.id(70938606008654116)
,p_plugin_attribute_id=>wwv_flow_api.id(70938222225650732)
,p_display_sequence=>10
,p_display_value=>'cloud'
,p_return_value=>'cloud'
);
wwv_flow_api.create_plugin_attr_value(
p_id=>wwv_flow_api.id(70947154957868862)
,p_plugin_attribute_id=>wwv_flow_api.id(70938222225650732)
,p_display_sequence=>20
,p_display_value=>'rectangular'
,p_return_value=>'rectangular'
);
wwv_flow_api.create_plugin_attribute(
p_id=>wwv_flow_api.id(70947688222900869)
,p_plugin_id=>wwv_flow_api.id(70937118030638438)
,p_attribute_scope=>'COMPONENT'
,p_attribute_sequence=>2
,p_display_sequence=>20
,p_prompt=>'animationOnDisplay '
,p_attribute_type=>'SELECT LIST'
,p_is_required=>false
,p_default_value=>'auto'
,p_is_translatable=>false
,p_lov_type=>'STATIC'
);
wwv_flow_api.create_plugin_attr_value(
p_id=>wwv_flow_api.id(70948575110902567)
,p_plugin_attribute_id=>wwv_flow_api.id(70947688222900869)
,p_display_sequence=>10
,p_display_value=>'auto'
,p_return_value=>'auto'
);
wwv_flow_api.create_plugin_attr_value(
p_id=>wwv_flow_api.id(70948909635903143)
,p_plugin_attribute_id=>wwv_flow_api.id(70947688222900869)
,p_display_sequence=>20
,p_display_value=>'none'
,p_return_value=>'none'
);
wwv_flow_api.create_plugin_std_attribute(
p_id=>wwv_flow_api.id(70937305491638448)
,p_plugin_id=>wwv_flow_api.id(70937118030638438)
,p_name=>'SOURCE_SQL'
,p_sql_min_column_count=>4
,p_depending_on_has_to_exist=>true
);
end;
/
begin
wwv_flow_api.g_varchar2_table := wwv_flow_api.empty_varchar2_table;
wwv_flow_api.g_varchar2_table(1) := '212066756E6374696F6E20286A65742C20242C207365727665722C207574696C2C20646562756729207B0A202020202275736520737472696374223B0A20202020726571756972656A732E636F6E666967287B0A20202020202020206261736555726C3A';
wwv_flow_api.g_varchar2_table(2) := '20617065785F696D675F646972202B20226C69627261726965732F6F7261636C656A65742F322E302E322F6A732F6C696273222C0A202020202020202070617468733A207B0A202020202020202020226B6E6F636B6F7574223A20226B6E6F636B6F7574';
wwv_flow_api.g_varchar2_table(3) := '2F6B6E6F636B6F75742D332E342E30222C0A202020202020202020226A7175657279223A20226A71756572792F6A71756572792D322E312E332E6D696E222C0A202020202020202020226A717565727975692D616D64223A20226A71756572792F6A7175';
wwv_flow_api.g_varchar2_table(4) := '65727975692D616D642D312E31312E342E6D696E222C0A202020202020202020226F6A73223A20226F6A2F76322E302E322F6D696E222C0A202020202020202020226F6A4C31306E223A20226F6A2F76322E302E322F6F6A4C31306E222C0A2020202020';
wwv_flow_api.g_varchar2_table(5) := '20202020226F6A7472616E736C6174696F6E73223A20226F6A2F76322E302E322F7265736F7572636573222C0A202020202020202020227369676E616C73223A20226A732D7369676E616C732F7369676E616C732E6D696E222C0A202020202020202020';
wwv_flow_api.g_varchar2_table(6) := '2274657874223A2022726571756972652F74657874222C0A2020202020202020202270726F6D697365223A20226573362D70726F6D6973652F70726F6D6973652D312E302E302E6D696E222C0A2020202020202020202268616D6D65726A73223A202268';
wwv_flow_api.g_varchar2_table(7) := '616D6D65722F68616D6D65722D322E302E342E6D696E222C0A202020202020202020226F6A646E64223A2022646E642D706F6C7966696C6C2F646E642D706F6C7966696C6C2D312E302E302E6D696E220A20202020202020207D2C0A2020202020202020';
wwv_flow_api.g_varchar2_table(8) := '7368696D3A207B0A2020202020202020202020206A71756572793A207B0A202020202020202020202020202020206578706F7274733A205B226A5175657279222C202224225D0A2020202020202020202020207D0A20202020202020207D0A202020207D';
wwv_flow_api.g_varchar2_table(9) := '292C206A65742E746167636C6F7564203D207B0A2020202020202020696E69743A2066756E6374696F6E202870526567696F6E49642C207041706578416A61784964656E74696669657229207B0A20202020202020202020202072657175697265285B22';
wwv_flow_api.g_varchar2_table(10) := '6F6A732F6F6A636F7265222C20226A7175657279222C20226F6A732F6F6A746167636C6F7564225D2C2066756E6374696F6E20286F6A2C202429207B0A202020202020202020202020202020207365727665722E706C7567696E287041706578416A6178';
wwv_flow_api.g_varchar2_table(11) := '4964656E7469666965722C207B7D2C207B0A2020202020202020202020202020202020202020737563636573733A2066756E6374696F6E2028704461746129207B0A202020202020202020202020202020202020202020202020242870526567696F6E49';
wwv_flow_api.g_varchar2_table(12) := '64290A202020202020202020202020202020202020202020202020202020202E6F6A546167436C6F7564287044617461293B0A20202020202020202020202020202020202020207D0A202020202020202020202020202020207D293B0A20202020202020';
wwv_flow_api.g_varchar2_table(13) := '20202020207D293B0A20202020202020207D0A202020207D0A7D2877696E646F772E6A6574203D2077696E646F772E6A6574207C7C207B7D2C20617065782E6A51756572792C20617065782E7365727665722C20617065782E7574696C2C20617065782E';
wwv_flow_api.g_varchar2_table(14) := '6465627567293B0A2F2F20546F206B656570205468656D65526F6C6C657220776F726B696E672070726F7065726C793A0A646566696E6528226A7175657279222C205B5D2C2066756E6374696F6E202829207B0A2020202072657475726E20617065782E';
wwv_flow_api.g_varchar2_table(15) := '6A51756572790A7D293B0A';
null;
end;
/
begin
wwv_flow_api.create_plugin_file(
p_id=>wwv_flow_api.id(70942604265763239)
,p_plugin_id=>wwv_flow_api.id(70937118030638438)
,p_file_name=>'tagCloud.js'
,p_mime_type=>'application/javascript'
,p_file_charset=>'utf-8'
,p_file_content=>wwv_flow_api.varchar2_to_blob(wwv_flow_api.g_varchar2_table)
);
end;
/
begin
wwv_flow_api.import_end(p_auto_install_sup_obj => nvl(wwv_flow_application_install.get_auto_install_sup_obj, false), p_is_component_import => true);
commit;
end;
/
set verify on feedback on define on
prompt ...done
|
<reponame>dimiantoni/flexy-teste-tecnico
# ************************************************************
# Sequel Pro SQL dump
# Version 4135
#
# http://www.sequelpro.com/
# http://code.google.com/p/sequel-pro/
#
# Host: 127.0.0.1 (MySQL 5.5.42)
# Database: flexy
# Generation Time: 2015-11-16 11:24:20 +0000
# ************************************************************
/*!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 */;
/*!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 */;
# Dump of database flexy
# ------------------------------------------------------------
DROP DATABASE IF EXISTS `flexy`;
CREATE DATABASE `flexy`;
USE flexy;
# Dump of table faixa_ceps
# ------------------------------------------------------------
DROP TABLE IF EXISTS `faixa_ceps`;
CREATE TABLE `faixa_ceps` (
`id_fc` int(10) unsigned NOT NULL AUTO_INCREMENT,
`faixa_cep_ini` int(11) NOT NULL,
`faixa_cep_fim` int(11) NOT NULL,
`localidade_faixa_cep` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id_fc`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
LOCK TABLES `faixa_ceps` WRITE;
/*!40000 ALTER TABLE `faixa_ceps` DISABLE KEYS */;
INSERT INTO `faixa_ceps` (`id_fc`, `faixa_cep_ini`, `faixa_cep_fim`, `localidade_faixa_cep`, `created_at`, `updated_at`)
VALUES
(3,88000001,88099999,'Florianópolis',NULL,NULL),
(4,90000000,99999999,'Porto Alegre',NULL,NULL),
(5,88340001,88349999,'Camboriú',NULL,NULL),
(6,89200001,89239999,'Joinville',NULL,NULL),
(7,80000001,82999999,'Curitiba','2015-11-16 04:13:27','2015-11-16 04:13:27');
/*!40000 ALTER TABLE `faixa_ceps` ENABLE KEYS */;
UNLOCK TABLES;
# Dump of table faixa_pesos
# ------------------------------------------------------------
DROP TABLE IF EXISTS `faixa_pesos`;
CREATE TABLE `faixa_pesos` (
`id_fp` int(10) unsigned NOT NULL AUTO_INCREMENT,
`faixa_peso_ini` decimal(6,3) unsigned NOT NULL,
`faixa_peso_fim` decimal(6,3) unsigned NOT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id_fp`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
LOCK TABLES `faixa_pesos` WRITE;
/*!40000 ALTER TABLE `faixa_pesos` DISABLE KEYS */;
INSERT INTO `faixa_pesos` (`id_fp`, `faixa_peso_ini`, `faixa_peso_fim`, `updated_at`, `created_at`)
VALUES
(3,0.001,5.000,NULL,NULL),
(4,5.001,10.000,NULL,NULL),
(5,10.001,17.500,'2015-11-16 04:59:56','2015-11-16 04:59:56');
/*!40000 ALTER TABLE `faixa_pesos` ENABLE KEYS */;
UNLOCK TABLES;
# Dump of table migrations
# ------------------------------------------------------------
DROP TABLE IF EXISTS `migrations`;
CREATE TABLE `migrations` (
`migration` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
LOCK TABLES `migrations` WRITE;
/*!40000 ALTER TABLE `migrations` DISABLE KEYS */;
INSERT INTO `migrations` (`migration`, `batch`)
VALUES
('2014_10_12_000000_create_users_table',1),
('2014_10_12_100000_create_password_resets_table',1),
('2015_11_10_200021_create_transportadoras_table',1),
('2015_11_10_200057_create_faixa_ceps_table',1),
('2015_11_10_200114_create_faixa_pesos_table',1),
('2015_11_10_200210_create_valor_fc_fp_tps_table',1);
/*!40000 ALTER TABLE `migrations` ENABLE KEYS */;
UNLOCK TABLES;
# Dump of table transportadoras
# ------------------------------------------------------------
DROP TABLE IF EXISTS `transportadoras`;
CREATE TABLE `transportadoras` (
`id_transportadora` int(10) unsigned NOT NULL AUTO_INCREMENT,
`nome_fantasia` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
`razao_social` varchar(600) COLLATE utf8_unicode_ci NOT NULL,
`cnpj` varchar(13) COLLATE utf8_unicode_ci NOT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NULL DEFAULT NULL,
`status_transportadora` tinyint(1) DEFAULT '1' COMMENT '0=inativo,1=ativo',
PRIMARY KEY (`id_transportadora`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
LOCK TABLES `transportadoras` WRITE;
/*!40000 ALTER TABLE `transportadoras` DISABLE KEYS */;
INSERT INTO `transportadoras` (`id_transportadora`, `nome_fantasia`, `razao_social`, `cnpj`, `created_at`, `updated_at`, `status_transportadora`)
VALUES
(4,'Dimi Transportes','Dimi Antoni ME','01394534078','0000-00-00 00:00:00','0000-00-00 00:00:00',1),
(5,'Ingrid Transportes','Ingrid Transpordadora LTDA','01394534079','2015-11-15 14:35:34','0000-00-00 00:00:00',1),
(6,'Transportadora inativa Teste','Transportadora inativa Teste','01394534080','2015-11-15 17:00:30','0000-00-00 00:00:00',0),
(10,'grhgrehrehtrhrt','egrerhgrehrehtrhrt','1234344242424','2015-11-16 02:42:31','2015-11-16 02:42:31',1),
(11,'gewrg43hrehrte','gerhrehrehe','1234533432532','2015-11-16 02:46:59','2015-11-16 02:46:59',1);
/*!40000 ALTER TABLE `transportadoras` ENABLE KEYS */;
UNLOCK TABLES;
# Dump of table valor_fc_fp_tps
# ------------------------------------------------------------
DROP TABLE IF EXISTS `valor_fc_fp_tps`;
CREATE TABLE `valor_fc_fp_tps` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`valor` decimal(5,2) NOT NULL,
`faixa_cep_id` int(10) unsigned NOT NULL,
`transportadora_id` int(10) unsigned NOT NULL,
`faixa_peso_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
KEY `valor_fc_fp_tps_faixa_cep_id_foreign` (`faixa_cep_id`),
KEY `valor_fc_fp_tps_transportadora_id_foreign` (`transportadora_id`),
KEY `valor_fc_fp_tps_faixa_peso_id_foreign` (`faixa_peso_id`),
CONSTRAINT `valor_fc_fp_tps_faixa_cep_id_foreign` FOREIGN KEY (`faixa_cep_id`) REFERENCES `faixa_ceps` (`id_fc`) ON DELETE CASCADE,
CONSTRAINT `valor_fc_fp_tps_faixa_peso_id_foreign` FOREIGN KEY (`faixa_peso_id`) REFERENCES `faixa_pesos` (`id_fp`) ON DELETE CASCADE,
CONSTRAINT `valor_fc_fp_tps_transportadora_id_foreign` FOREIGN KEY (`transportadora_id`) REFERENCES `transportadoras` (`id_transportadora`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
LOCK TABLES `valor_fc_fp_tps` WRITE;
/*!40000 ALTER TABLE `valor_fc_fp_tps` DISABLE KEYS */;
INSERT INTO `valor_fc_fp_tps` (`id`, `valor`, `faixa_cep_id`, `transportadora_id`, `faixa_peso_id`)
VALUES
(7,50.00,3,4,3),
(9,52.00,3,5,3),
(10,76.00,3,4,4);
/*!40000 ALTER TABLE `valor_fc_fp_tps` ENABLE KEYS */;
UNLOCK TABLES;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_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 */;
|
<reponame>Dalgerok/Twitsenger<filename>clear.sql
DROP SCHEMA IF EXISTS public CASCADE;
CREATE SCHEMA public;
|
<gh_stars>1-10
CREATE PROCEDURE [dbo].[uspEducationResultSelectByCandidateId]
@candidateId int,
@applicationId Int
AS
BEGIN
SET NOCOUNT ON
DECLARE @applicationStatus int
-- get the application status.
select @applicationStatus = applicationStatusTypeId
from Application
where ApplicationId = @applicationId
-- Return the rows held against the candidate
If @applicationId = 0
SELECT
[educationResult].[CandidateId] AS 'CandidateId',
[educationResult].[ApplicationId] AS 'ApplicationId',
[educationResult].[DateAchieved] AS 'DateAchieved',
[educationResult].[EducationResultId] AS 'EducationResultId',
[educationResult].[Grade] AS 'Grade',
[educationResult].[Level] AS 'Level',
[educationResult].[LevelOther] AS 'LevelOther',
[educationResult].[Subject] AS 'Subject'
FROM [dbo].[EducationResult] [educationResult]
WHERE [CandidateId]=@candidateId
AND ApplicationId IS NULL
ORDER BY DateAchieved Desc
else -- application id exists
BEGIN
-- Return rows held against UNSENT applications
if @applicationStatus = 1
SELECT
[educationResult].[CandidateId] AS 'CandidateId',
[educationResult].[ApplicationId] AS 'ApplicationId',
[educationResult].[DateAchieved] AS 'DateAchieved',
[educationResult].[EducationResultId] AS 'EducationResultId',
[educationResult].[Grade] AS 'Grade',
[educationResult].[Level] AS 'Level',
[educationResult].[LevelOther] AS 'LevelOther',
[educationResult].[Subject] AS 'Subject'
FROM [dbo].[EducationResult] [educationResult]
WHERE [CandidateId]=@candidateId
AND ApplicationId IS NULL
ORDER BY DateAchieved Desc
else
-- Return rows held against SENT applications
SELECT
[educationResult].[CandidateId] AS 'CandidateId',
[educationResult].[ApplicationId] AS 'ApplicationId',
[educationResult].[DateAchieved] AS 'DateAchieved',
[educationResult].[EducationResultId] AS 'EducationResultId',
[educationResult].[Grade] AS 'Grade',
[educationResult].[Level] AS 'Level',
[educationResult].[LevelOther] AS 'LevelOther',
[educationResult].[Subject] AS 'Subject'
FROM [dbo].[EducationResult] [educationResult]
WHERE [CandidateId]=@candidateId
AND ApplicationId =@applicationId
ORDER BY DateAchieved Desc
END
SET NOCOUNT OFF
END |
<filename>server/db/migrations/20180619162615_observation_data.sql
-- +goose Up
-- SQL in section 'Up' is executed when this migration is applied
CREATE TABLE `observation_data` (
`id` int(11) UNSIGNED NOT NULL COMMENT '管理用',
`observation_position_id` int(11) UNSIGNED NOT NULL COMMENT '観測点のID',
`sensor_id` int(11) UNSIGNED NOT NULL COMMENT 'センサの番号',
`value` double(10,4) NOT NULL COMMENT '値',
`datetime` datetime NOT NULL COMMENT '観測日時',
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '管理用',
`updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '管理用'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='観測データを保存するテーブル';
ALTER TABLE `observation_data`
ADD PRIMARY KEY (`id`),
ADD KEY `observation_position_id` (`observation_position_id`),
ADD KEY `observation_data_ibfk_2` (`sensor_id`),
MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '管理用';
-- +goose Down
-- SQL section 'Down' is executed when this migration is rolled back
DROP TABLE observation_data;
|
<reponame>Wippo-Store/WippoStore<gh_stars>1-10
create database wippodb;
use wippodb;
create table if not exists Usuario(
ID_Usuario int(11) not null AUTO_INCREMENT,
Correo_Electronico varchar(40) not null,
Contraseña varchar(40) not null,
Nombre varchar(15) not null,
Apellido_Paterno varchar(15) not null,
Apellido_Materno varchar(15) not null,
Telefono varchar(17),
Tipo_Usuario varchar(1) not null,
Estatus varchar(20) not null DEFAULT 'porActivar',
RFC varchar(12),
primary key(ID_Usuario),
constraint Tipos_de_Usuario check (Tipo_Usuario = 'A' or Tipo_Usuario
= 'C' or Tipo_Usuario = 'V'),
constraint Estado_usuario check (Estatus="Activo" or Estatus="porActivar")
)ENGINE=INNODB;
drop TABLE if exists TokensCorreo;
CREATE TABLE if not exists TokensCorreo(
ID_Usuario INT(11) NOT NULL UNIQUE,
token VARCHAR(40) NOT NULL UNIQUE,
fecha VARCHAR(40) NOT NULL,
FOREIGN KEY (ID_Usuario) REFERENCES Usuario(ID_Usuario)
)ENGINE=INNODB;
drop PROCEDURE if exists addToken;
DELIMITER &&
CREATE PROCEDURE addToken (in token VARCHAR(40), in ID_Usuario int)
BEGIN
REPLACE INTO TokensCorreo(ID_Usuario, token, fecha) VALUES(ID_Usuario, token, now());
END &&
DELIMITER ;
-- Example: call addToken("<PASSWORD>", 1);
drop PROCEDURE if exists validateToken;
DELIMITER &&
CREATE PROCEDURE validateToken (in user_token VARCHAR(40), in ID_Usuario_r int)
BEGIN
DECLARE tk Varchar(40);
SELECT `token` INTO tk FROM `TokensCorreo` WHERE ID_Usuario = ID_Usuario_r limit 1;
if(tk = user_token) then
DELETE FROM `TokensCorreo` WHERE ID_Usuario = ID_Usuario_r;
UPDATE Usuario SET Estatus = 'Activo' WHERE ID_Usuario = ID_Usuario_r;
end if;
END &&
DELIMITER ;
drop PROCEDURE if exists validatePasswordToken;
DELIMITER &&
CREATE PROCEDURE validatePasswordToken (in user_token VARCHAR(40), in ID_Usuario_r int)
BEGIN
DECLARE tk Varchar(40);
SELECT `token` INTO tk FROM `TokensCorreo` WHERE ID_Usuario = ID_Usuario_r limit 1;
if(tk = user_token) then
DELETE FROM `TokensCorreo` WHERE ID_Usuario = ID_Usuario_r;
ELSE
SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'Invalid Token';
end if;
END &&
DELIMITER ;
-- Example: call validateToken("<PASSWORD>", 1);
create table if not exists Producto(
ID_Producto int(11) not null AUTO_INCREMENT,
Nombre varchar(30) not null,
Precio int not null,
Cantidad int,
Categoria varchar(20) not null,
Color varchar(20),
Descripcion varchar(100) not null,
Caracteristica_1 varchar (100) not null,
Caracteristica_2 varchar (100) not null,
Caracteristica_3 varchar (100) not null,
Caracteristica_4 varchar (100),
Caracteristica_5 varchar (100),
imagen1 varchar(50),
imagen2 varchar(50),
iamgen3 varchar(50),
ID_Usuario int(11) not null,
Primary Key (ID_Producto, ID_Usuario),
constraint Referencia_Producto_Usuario Foreign Key (ID_Usuario) references Usuario(ID_Usuario) ON DELETE CASCADE ON UPDATE CASCADE,
constraint Precio_Negativo check (Precio>0),
constraint Cantidad_Negatvo check (Cantidad>=0)
)ENGINE=INNODB;
create table if not exists Carrito(
ID_Carrito int(11) not null AUTO_INCREMENT,
ID_Usuario int(11) not null,
Monto_Total int not null,
primary key(ID_Carrito),
constraint Referencia_Carrito_Usuario foreign key (ID_Usuario) references Usuario(ID_Usuario) ON DELETE CASCADE ON UPDATE CASCADE,
constraint Carrito_Monto_Negativo check (Monto_Total>=0)
)ENGINE=INNODB;
drop PROCEDURE if exists updateCartTotal;
DELIMITER &&
CREATE PROCEDURE updateCartTotal (in toADD int,in ID_Carrito int)
BEGIN
DECLARE total int default 0;
SELECT `carrito`.`Monto_Total` INTO total FROM carrito WHERE `carrito`.`ID_Carrito` = ID_Carrito;
UPDATE `carrito` SET `Monto_Total` = (total + toADD) WHERE `carrito`.`ID_Carrito` = ID_Carrito;
END &&
DELIMITER ;
drop PROCEDURE if exists updateCart;
DELIMITER &&
CREATE PROCEDURE updateCart (in ID_Producto_r int, in ID_Usuario_r int, in Cantidad int)
BEGIN
DECLARE ìdCarrito int;
DECLARE Total int;
DECLARE res_checkCantidad int;
DECLARE dif int;
SELECT `ID_Carrito` INTO ìdCarrito FROM `Carrito` WHERE `ID_Usuario` = ID_Usuario_r limit 1;
if(ìdCarrito IS NOT NULL) then
-- select `Cantidad` into Cantidad_Anterior from CarritoContiene where `ID_Carrito` = ìdCarrito and `ID_Producto` = ID_Producto_r;
call checkCantidad(ìdCarrito, ID_Producto_r, Cantidad, res_checkCantidad, dif);
if(res_checkCantidad != 0) then
-- if(Cantidad_Anterior != Cantidad ) then
SELECT (Producto.Precio * dif) INTO Total FROM `Producto` WHERE `ID_Producto` = ID_Producto_r limit 1;
REPLACE INTO `CarritoContiene` (`ID_Carrito`, `ID_Producto`, `Cantidad`) VALUES (ìdCarrito, ID_Producto_r, Cantidad);
if(res_checkCantidad = -1) then
call updateCartTotal((Total*-1), ìdCarrito);
ELSE
call updateCartTotal(Total, ìdCarrito);
end if;
-- end if;
end if;
end if;
END &&
DELIMITER ;
drop PROCEDURE if exists checkCantidad;
DELIMITER &&
CREATE PROCEDURE checkCantidad (in ID_Carrito_r int,in ID_Producto_r int, in Cantidad_r int, out result int, out dif int)
BEGIN
DECLARE Cantidad_Anterior int;
select `Cantidad` into Cantidad_Anterior from CarritoContiene where `ID_Carrito` = ID_Carrito_r and `ID_Producto` = ID_Producto_r;
if(Cantidad_Anterior IS NOT NULL) then
if(Cantidad_r < Cantidad_Anterior) then
select -1 into result;
select (Cantidad_Anterior - Cantidad_r) into dif;
ELSEIF (Cantidad_r > Cantidad_Anterior) then
select 1 into result;
select (Cantidad_r - Cantidad_Anterior) into dif;
else
select 0 into result;
select 0 into dif;
end if;
-- end if;
end if;
END &&
DELIMITER ;
drop PROCEDURE if exists countCart;
DELIMITER &&
CREATE PROCEDURE countCart (in ID_Carrito_r int, out lenCarrito int)
BEGIN
SELECT COUNT(ID_Producto) into lenCarrito FROM carritocontiene WHERE ID_Carrito = ID_Carrito_r;
END &&
DELIMITER ;
drop PROCEDURE if exists purchaseCart;
DELIMITER &&
CREATE PROCEDURE purchaseCart (in ID_Usuario_r int, in ID_Direccion int, in ID_Tarjeta varchar(30))
BEGIN
DECLARE idCarrito int;
DECLARE montoCarrito int;
DECLARE idVendedor int;
DECLARE idProducto int;
DECLARE Total int;
DECLARE counter INT DEFAULT 1;
DECLARE lngth INT;
DECLARE cantidad_actual int;
DECLARE cantidad_comprada int;
SELECT `ID_Carrito`, `Monto_Total` INTO idCarrito, montoCarrito FROM `Carrito` WHERE `ID_Usuario` = ID_Usuario_r limit 1;
if(idCarrito IS NOT NULL) then
-- START TRANSACTION; -- TRANSACTION WORKING
INSERT INTO `orden` (`Estatus`, `Monto_Total`, `ID_Usuario`, `ID_Direccion`,`ID_Tarjeta`) VALUES ('Pendiente', montoCarrito, ID_Usuario_r, ID_Direccion,ID_Tarjeta);
SET @idOrden = LAST_INSERT_ID();
if(@idOrden IS NOT NULL) then
call countCart(idCarrito, lngth);
WHILE counter <= lngth DO
select `ID_Producto` into idProducto from carritocontiene where ID_Carrito = idCarrito limit 1;
select `Cantidad` into cantidad_actual from producto where ID_Producto = idProducto limit 1;
SELECT `Cantidad` into cantidad_comprada FROM `carritocontiene` WHERE ID_Carrito = idCarrito limit 1;
CALL `getVendedor`(idProducto, idVendedor);
INSERT INTO `contiene` (ID_Orden, ID_Producto,Cantidad, ID_Usuario) SELECT @idOrden, `ID_Producto`,`Cantidad`,idVendedor FROM `carritocontiene` WHERE ID_Producto = idProducto;
DELETE FROM `CarritoContiene` WHERE ID_Carrito=idCarrito and ID_Producto = idProducto;
UPDATE `producto` SET `cantidad` = (cantidad_actual - cantidad_comprada) where `ID_Producto` = idProducto;
SET counter = counter + 1;
END WHILE;
UPDATE `Carrito` SET `Monto_Total` = 0 WHERE ID_Carrito = idCarrito limit 1;
END IF;
-- COMMIT;
end if;
END &&
DELIMITER ;
drop PROCEDURE if exists addToCart;
DELIMITER &&
CREATE PROCEDURE addToCart (in ID_Producto_r int, in ID_Usuario_r int, in Cantidad_r int)
BEGIN
DECLARE ìdCarrito int;
DECLARE precioProducto int;
SELECT `ID_Carrito` INTO ìdCarrito FROM `Carrito` WHERE `ID_Usuario` = ID_Usuario_r limit 1;
if(ìdCarrito IS NOT NULL) then
INSERT INTO `CarritoContiene` (`ID_Carrito`, `ID_Producto`, `Cantidad`) VALUES (ìdCarrito, ID_Producto_r, Cantidad_r);
SELECT `Producto`.`Precio` INTO precioProducto FROM `Producto` WHERE `ID_Producto` = ID_Producto_r limit 1;
call updateCartTotal((precioProducto*Cantidad_r), ìdCarrito);
end if;
END &&
DELIMITER ;
drop PROCEDURE if exists getCart;
DELIMITER &&
CREATE PROCEDURE getCart (in ID_Usuario_r int)
BEGIN
SELECT carrito.ID_Carrito, carrito.ID_Usuario, carritocontiene.ID_Producto, carritocontiene.Cantidad, producto.Nombre, producto.Categoria, producto.Precio, producto.imagen1
FROM `carrito` INNER JOIN carritocontiene on carrito.ID_Carrito = carritocontiene.ID_Carrito INNER JOIN producto ON producto.ID_Producto = carritocontiene.ID_Producto where carrito.ID_Usuario = ID_Usuario_r;
END &&
DELIMITER ;
drop PROCEDURE if exists getOrders;
DELIMITER &&
CREATE PROCEDURE getOrders (in ID_Usuario_r int, in limit_r int)
BEGIN
SELECT * FROM orden limit limit_r;
END &&
DELIMITER ;
drop PROCEDURE if exists removeFromCart;
DELIMITER &&
CREATE PROCEDURE removeFromCart (in ID_Usuario_r int, in ID_Producto int)
BEGIN
DECLARE idCarrito int;
DECLARE Total int;
SELECT `ID_Carrito` INTO idCarrito FROM `Carrito` WHERE `ID_Usuario` = ID_Usuario_r limit 1;
if(idCarrito IS NOT NULL) then
DELETE FROM `carritocontiene` WHERE `carritocontiene`.`ID_Carrito` = idCarrito AND `carritocontiene`.`ID_Producto` = ID_Producto;
SELECT (Producto.Precio * Cantidad) INTO Total FROM `Producto` WHERE `ID_Producto` = ID_Producto limit 1;
call updateCartTotal((Total * -1), ìdCarrito);
end if;
END &&
DELIMITER ;
create table if not exists CarritoContiene(
ID_Carrito int(11) not null,
ID_Producto int(11) not null,
Cantidad int not null,
constraint Referencia_Carrito_Contiene_Carrito foreign key (ID_Carrito) references Carrito(ID_Carrito) ON DELETE CASCADE ON UPDATE CASCADE,
constraint Referencia_Carrito_Contiene_Producto foreign key (ID_Producto) references Producto(ID_Producto) ON DELETE CASCADE ON UPDATE CASCADE,
primary key (ID_Producto,ID_Carrito),
constraint Carrito_Contenido_Negativo check (Cantidad>0)
)engine=innodb;
drop PROCEDURE if exists getVendedor;
DELIMITER &&
CREATE PROCEDURE getVendedor (in ID_Producto_r int, out ID_Vendedor int)
BEGIN
SELECT ID_Usuario into ID_Vendedor FROM producto WHERE ID_Producto = ID_Producto_r;
END &&
DELIMITER ;
create table if not exists Solicitar_Devolucion(
Producto_ID_Usuario int(11) not null,
Producto_ID_Producto int(11) not null,
Usuario_ID_Usuario int(11) not null,
Motivo varchar(50),
Estatus varchar(20) not null,
Fecha_Solicitud date not null,
constraint Referencia_Solicitar_Producto foreign key(Producto_ID_Usuario,Producto_ID_Producto) references Producto(ID_Usuario,ID_Producto) ON DELETE CASCADE ON UPDATE CASCADE,
constraint Referencia_Solicitar_Usuario foreign key(Usuario_ID_Usuario) references Usuario(ID_Usuario) ON DELETE CASCADE ON UPDATE CASCADE,
primary key (Producto_ID_Producto,Producto_ID_Usuario,Usuario_ID_Usuario),
constraint Estatus_de_Devolucion check (Estatus = "Pendiente" or Estatus = "Devuelto" or Estatus = "Rechazado")
)ENGINE=INNODB;
create table if not exists Califica(
Usuario_ID_Usuario int(11) not null,
Producto_ID_Usuario int(11) not null,
Producto_ID_Producto int(11) not null,
Modelo varchar(30) not null,
Calificacion int not null,
Comentario varchar(70),
constraint Referencia_Califica_Usuario foreign key (Usuario_ID_Usuario) references Usuario(ID_Usuario) ON DELETE CASCADE ON UPDATE CASCADE,
constraint Referencia_Califica_Producto foreign key (Producto_ID_Usuario,Producto_ID_Producto) references Producto(ID_Usuario,ID_Producto) ON DELETE CASCADE ON UPDATE CASCADE,
primary key (Usuario_ID_Usuario,Producto_ID_Usuario,Producto_ID_Producto)
)engine=innodb;
create table if not exists Tarjeta_Registrada(
ID_Tarjeta varchar(19) not null,
Nom_Tarjeta varchar(30) not null,
Mes char(2) not null,
Year char(4) not null,
ID_Usuario int(11) not null,
primary key (ID_Tarjeta, ID_Usuario),
constraint Referencia_Tarjeta_Usuario foreign key (ID_Usuario) references Usuario(ID_Usuario) ON DELETE CASCADE ON UPDATE CASCADE
)engine=innodb;
create table if not exists Direccion(
ID_Direccion int(11) not null AUTO_INCREMENT,
Nombre_Calle varchar(30) not null,
Num_ext int not null,
Num_int int,
Colonia varchar(20) not null,
Municipio varchar(20) not null,
Estado varchar(20) not null,
CP char(5) not null,
ID_Usuario int(11) not null,
primary key(ID_Direccion,ID_Usuario),
constraint Referencia_Direccion_Usuario foreign key (ID_Usuario) references Usuario(ID_Usuario) ON DELETE CASCADE ON UPDATE CASCADE
)engine=innodb;
create table if not exists Orden(
ID_Orden int(11) not null AUTO_INCREMENT,
Fecha date not null DEFAULT now(),
Estatus varchar(20) not null DEFAULT "Pendiente",
Monto_Total int not null,
ID_Direccion int(11) not null,
ID_Tarjeta varchar(19) not null,
ID_Usuario int(11) not null,
primary key(ID_Orden),
constraint Referencia_Orden_Usuario foreign key (ID_Usuario) references Usuario(ID_Usuario) ON DELETE CASCADE ON UPDATE CASCADE,
constraint Referencia_Orden_Direccion foreign key (ID_Direccion) references Direccion(ID_Direccion) ON DELETE CASCADE ON UPDATE CASCADE,
constraint Referencia_Orden_Tarjeta foreign key (ID_Tarjeta, ID_Usuario) references Tarjeta_Registrada(ID_Tarjeta, ID_Usuario) ON DELETE CASCADE ON UPDATE CASCADE,
constraint Monto_Negaivo check (Monto_Total>=0),
constraint Estado_orden check (Estatus="Pendiente" or Estatus="Enviado" or Estatus="Entregado")
)engine=innodb;
create table if not exists Contiene(
ID_Orden int(11) not null,
ID_Producto int(11) not null,
ID_Usuario int(11) not null,
Cantidad int not null,
constraint Referencia_Contiene_Orden foreign key (ID_Orden) references Orden(ID_Orden) ON DELETE CASCADE ON UPDATE CASCADE,
constraint Referencia_Contiene_Producto foreign key (ID_Producto,ID_Usuario) references Producto(ID_Producto,ID_Usuario) ON DELETE CASCADE ON UPDATE CASCADE,
primary key (ID_Orden,ID_Producto,ID_Usuario),
constraint Contenido_Negativo check (Cantidad>0)
)engine=innodb;
INSERT INTO `usuario` (`ID_Usuario`, `Correo_Electronico`, `<PASSWORD>aseña`, `Nombre`, `Apellido_Paterno`, `Apellido_Materno`, `Telefono`, `Tipo_Usuario`, `RFC`) VALUES
(1, '<EMAIL>', '123', 'Roy', 'Rubio', 'Haro', NULL, 'C', NULL),
(2, '<EMAIL>', '123', 'Laura', 'Martínez', 'Sánchez', NULL, 'V', 'MASL900101S1');
INSERT INTO `producto` (`ID_Producto`, `Nombre`, `Precio`, `Cantidad`, `Categoria`, `Color`, `Descripcion`, `Caracteristica_1`, `Caracteristica_2`, `Caracteristica_3`, `Caracteristica_4`, `Caracteristica_5`, `imagen1`, `imagen2`, `iamgen3`, `ID_Usuario`) VALUES (NULL, 'Sony WH1000XM4/B', '5803.60', '4', 'Electrónicos', 'Negro', 'Audífonos inalámbricos con Noise Cancelling, Negro, Grande.', 'Cancelación de ruido dual te permiten escuchar sin distracciones.', 'Optimizador personal de noise cancelling y optimización de la presión atmosférica.', 'Libertad inalámbrica con tecnología Bluetooth.', NULL, NULL, 'audifonos1.jpg', 'audifonos2.jpg', 'audifonos3.jpg', '2');
INSERT INTO `producto` (`ID_Producto`, `Nombre`, `Precio`, `Cantidad`, `Categoria`, `Color`, `Descripcion`, `Caracteristica_1`, `Caracteristica_2`, `Caracteristica_3`, `Caracteristica_4`, `Caracteristica_5`, `imagen1`, `imagen2`, `iamgen3`, `ID_Usuario`) VALUES (NULL, 'SAMSUNG Galaxy A51', '5999.00', '4', 'Electrónicos', 'Negro', '128GB Dual Sim 4GB RAM Negro Desbloqueado. Procesador Octa-core 2.3 GHz', 'Pantalla 6.5 pulgadas', 'Cámara Trasera 48+12+5+5MP', 'Cámara Frontal 32MP', NULL, NULL, 'cel1.jpg', 'cel1_2.jpg', 'cel1_3.jpg', '2');
INSERT INTO `producto` (`ID_Producto`, `Nombre`, `Precio`, `Cantidad`, `Categoria`, `Color`, `Descripcion`, `Caracteristica_1`, `Caracteristica_2`, `Caracteristica_3`, `Caracteristica_4`, `Caracteristica_5`, `imagen1`, `imagen2`, `iamgen3`, `ID_Usuario`) VALUES (NULL, 'Realme - 7', '7999.00', '4', 'Electrónicos', 'Verde', 'Smartphone de 6.5\", 8GB RAM + 128GB ROM, Pantalla 120Hz LCD FHD+.', 'Cuádruple cámara AI 48MP Sony + 16MP cámara Frontal. ', 'Dual SIM + 1 Micro SD, 5000 mAh 30W Dart Charge.', 'Procesador Dimensity 800U 7nm.', NULL, NULL, 'cel11.jpg', 'cel22.jpg', 'cel33.jpg', '2');
INSERT INTO `producto` (`ID_Producto`, `Nombre`, `Precio`, `Cantidad`, `Categoria`, `Color`, `Descripcion`, `Caracteristica_1`, `Caracteristica_2`, `Caracteristica_3`, `Caracteristica_4`, `Caracteristica_5`, `imagen1`, `imagen2`, `iamgen3`, `ID_Usuario`) VALUES (NULL, 'Playera HTML5', '250', '10', 'Ropa', 'Gris', 'Playera gris con el logo de HTML5.', '100% algodón.', 'Talla: Unitalla', 'Suave.', NULL, NULL, 'tshirt2.jpg', 'tshirt2.jpg', 'tshirt2.jpg', '2');
INSERT INTO `producto` (`ID_Producto`, `Nombre`, `Precio`, `Cantidad`, `Categoria`, `Color`, `Descripcion`, `Caracteristica_1`, `Caracteristica_2`, `Caracteristica_3`, `Caracteristica_4`, `Caracteristica_5`, `imagen1`, `imagen2`, `iamgen3`, `ID_Usuario`) VALUES (NULL, 'Playera NodeJS', '250', '10', 'Ropa', 'Gris', 'Playera gris con el logo de NodeJS.', '100% algodón.', 'Talla: Unitalla', 'Suave.', NULL, NULL, 'tshirt1.jpg', 'tshirt1.jpg', 'tshirt1.jpg', '2');
INSERT INTO `producto` (`ID_Producto`, `Nombre`, `Precio`, `Cantidad`, `Categoria`, `Color`, `Descripcion`, `Caracteristica_1`, `Caracteristica_2`, `Caracteristica_3`, `Caracteristica_4`, `Caracteristica_5`, `imagen1`, `imagen2`, `iamgen3`, `ID_Usuario`) VALUES (NULL, 'Playera JS', '250.00', '10', 'Ropa', 'Amarilla', 'Playera amarilla con el logo de JavaScript.', '100% Algodón', 'Suave', 'Talla: Unitalla', NULL, NULL, 'tshirt4.jpg', 'tshirt4.jpg', 'tshirt4.jpg', '2');
INSERT INTO `producto` (`ID_Producto`, `Nombre`, `Precio`, `Cantidad`, `Categoria`, `Color`, `Descripcion`, `Caracteristica_1`, `Caracteristica_2`, `Caracteristica_3`, `Caracteristica_4`, `Caracteristica_5`, `imagen1`, `imagen2`, `iamgen3`, `ID_Usuario`) VALUES (NULL, 'Playera GitHub', '250', '10', 'Ropa', 'Morada', 'Playera morada con el logo de GitHub.', '100% algodón.', 'Talla: Unitalla', 'Suave.', NULL, NULL, 'tshirt3.jpg', 'tshirt3.jpg', 'tshirt3.jpg', '2');
INSERT INTO `producto` (`ID_Producto`, `Nombre`, `Precio`, `Cantidad`, `Categoria`, `Color`, `Descripcion`, `Caracteristica_1`, `Caracteristica_2`, `Caracteristica_3`, `Caracteristica_4`, `Caracteristica_5`, `imagen1`, `imagen2`, `iamgen3`, `ID_Usuario`) VALUES (NULL, 'Echo Dot', '1099.00', '7', 'Electrónicos', 'Negro', 'Nuevo Echo Dot (4ta Gen) - Bocina inteligente con Alexa', 'Diseño elegante y compacto ofrece voces nítidas y bajos equilibrados, para un sonido completo.', 'Controla por voz tu entretenimiento', 'Controla tu Casa Inteligente', NULL, NULL, 'b1.jpg', 'b2.jpg', 'b3.jpg', '2');
INSERT INTO `producto` (`ID_Producto`, `Nombre`, `Precio`, `Cantidad`, `Categoria`, `Color`, `Descripcion`, `Caracteristica_1`, `Caracteristica_2`, `Caracteristica_3`, `Caracteristica_4`, `Caracteristica_5`, `imagen1`, `imagen2`, `iamgen3`, `ID_Usuario`) VALUES (NULL, 'Apple Nuevo Watch SE GPS', '7499.00', '6', 'Electrónicos', 'Arena Rosa', 'Caja de Aluminio Color Oro de 40 mm. Correa Deportiva Color Arena Rosa - Estándar', 'Modelo GPS para recibir llamadas y responder mensajes desde tu muñeca', 'Procesador hasta 2 veces más rápido que el del Apple Watch Series 3', 'Mide entrenamientos como correr, caminar, bailar, nadar, hacer yoga o andar en bicicleta', NULL, NULL, 'aw1.jpg', 'aw2.jpg', 'aw3.jpg', '2');
INSERT INTO `producto` (`ID_Producto`, `Nombre`, `Precio`, `Cantidad`, `Categoria`, `Color`, `Descripcion`, `Caracteristica_1`, `Caracteristica_2`, `Caracteristica_3`, `Caracteristica_4`, `Caracteristica_5`, `imagen1`, `imagen2`, `iamgen3`, `ID_Usuario`) VALUES (NULL, 'THE COMFY', '750.00', '5', 'Ropa', 'Blush', 'Manta original, te mantiene caliente y acogedor mientras descansas en casa.', 'Talla única: ajusta perfecto para la mayoría de todas las formas y tamaños.', 'Lavarlo en frío y luego secar en secadora por separado a baja temperatura, sale como nuevo', 'Comodidad extrema y material de lujo', NULL, NULL, 's1.jpg', 's2.jpg', 's3.jpg', '2');
INSERT INTO `producto` (`ID_Producto`, `Nombre`, `Precio`, `Cantidad`, `Categoria`, `Color`, `Descripcion`, `Caracteristica_1`, `Caracteristica_2`, `Caracteristica_3`, `Caracteristica_4`, `Caracteristica_5`, `imagen1`, `imagen2`, `iamgen3`, `ID_Usuario`) VALUES (NULL, 'Cobija de Tortilla', '599.00', '3', 'Ropa', 'Beige', 'Cobija Doble Cara tiene 1.80cm de diámetro con un acogedor diseño.', 'La tela de franela utiliza tintes ecológicos que brindan calidad a la decoloración.', 'Se puede lavar a máquina con agua fría y un ciclo suave.', 'Comodidad extrema y material de lujo', NULL, NULL, 't1.jpg', 't2.jpg', 't3.jpg', '2');
INSERT INTO `producto` (`ID_Producto`, `Nombre`, `Precio`, `Cantidad`, `Categoria`, `Color`, `Descripcion`, `Caracteristica_1`, `Caracteristica_2`, `Caracteristica_3`, `Caracteristica_4`, `Caracteristica_5`, `imagen1`, `imagen2`, `iamgen3`, `ID_Usuario`) VALUES (NULL, 'The Child Peluche', '1799.00', '2', 'Juguetes', 'Beige', 'Radio Control para niños de 3 años en adelante', '¡Este juguete de peluche de 28 centímetros de The Child encantará a los fans de Star Wars!', 'La adorable figura con piel verde, grandes orejas y enormes ojos se asemeja a “The Child”.', 'El juguete de peluche tiene un cuerpo suave, además de una base resistente rellena con microesferas', NULL, NULL, 'by1.jpg', 'by2.jpg', 'by3.jpg', '2');
INSERT INTO `producto` (`ID_Producto`, `Nombre`, `Precio`, `Cantidad`, `Categoria`, `Color`, `Descripcion`, `Caracteristica_1`, `Caracteristica_2`, `Caracteristica_3`, `Caracteristica_4`, `Caracteristica_5`, `imagen1`, `imagen2`, `iamgen3`, `ID_Usuario`) VALUES (NULL, 'Peluche Pulpo Reversible', '139.00', '8', 'Juguetes', 'Rosa/Azul', 'Ultra Suave - Rosa y Azul Cielo -', 'Peluche Pulpo reversible como el que viste en redes sociales!', 'Material: Microfibra Ultra Suave de Alta Calidad', 'Medidas: 10cmx10cmx10cm', NULL, NULL, 'pr1.jpg', 'pr2.jpg', 'pr2.jpg', '2');
INSERT INTO `producto` (`ID_Producto`, `Nombre`, `Precio`, `Cantidad`, `Categoria`, `Color`, `Descripcion`, `Caracteristica_1`, `Caracteristica_2`, `Caracteristica_3`, `Caracteristica_4`, `Caracteristica_5`, `imagen1`, `imagen2`, `iamgen3`, `ID_Usuario`) VALUES (NULL, 'Casa de campaña de Castillo', '369.99', '5', 'Juguetes', 'Azul', 'Tienda de campaña transpirable para guardar juguetes, uso interior y exterior', '2 ventanas de malla transpirables y una puerta plegable, gran carpa para que los niños se diviertan.', 'Hecha de tela de poliéster suave y cableado de acero grueso, es duradera y fácil de limpiar. ', 'Medidas del producto ensamblado: 105 x 135 cm.Lo suficientemente grande para 2-3 niños para jugar.', NULL, NULL, 'tc1.jpg', 'tc2.jpg', 'tc3.jpg', '2');
INSERT INTO `producto` (`ID_Producto`, `Nombre`, `Precio`, `Cantidad`, `Categoria`, `Color`, `Descripcion`, `Caracteristica_1`, `Caracteristica_2`, `Caracteristica_3`, `Caracteristica_4`, `Caracteristica_5`, `imagen1`, `imagen2`, `iamgen3`, `ID_Usuario`) VALUES (NULL, 'Melissa & Doug Piano', '1589.62', '3', 'Juguetes', 'Brillante', '5 Teclas y 2 Octavas Completas, Instrumentos Musicales, Construcción de Madera Sólida', 'Este piano es un gran regalo para niños de 3 a 5 años.', 'Materiales de alta calidad y su construcción superior garantizan seguridad y durabilidad.', '29.21 cm alto x 24.13 cm ancho x 40.64 cm largo', NULL, NULL, 'tec1.jpg', 'tec2.jpg', 'tec3.jpg', '2');
|
-- Drop articles table if exists.
DROP TABLE IF EXISTS articles;
|
INSERT INTO breeding_method (id, abbreviation, name, description) VALUES ('breeding_method1', 'MB', 'Male Backcross', 'Backcross to recover a specific gene.');
INSERT INTO breeding_method (id, abbreviation, name, description) VALUES ('breeding_method2', 'S', 'Self', 'Self pollination');
|
-- CreateTable
CREATE TABLE `files` (
`name` VARCHAR(50) NOT NULL,
`mimetype` VARCHAR(50) NOT NULL,
`path` TEXT NOT NULL,
`originalfilename` TEXT NOT NULL,
PRIMARY KEY (`name`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-- CreateTable
CREATE TABLE `haste` (
`id` VARCHAR(255) NOT NULL,
`haste` TEXT NOT NULL,
`language` VARCHAR(255) NULL,
PRIMARY KEY (`id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-- CreateTable
CREATE TABLE `settings` (
`name` VARCHAR(255) NOT NULL,
`value` VARCHAR(255) NOT NULL,
`info` VARCHAR(10) NULL,
`type` VARCHAR(255) NOT NULL DEFAULT 'boolean',
`Spalte 5` INTEGER NULL,
PRIMARY KEY (`name`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-- CreateTable
CREATE TABLE `shorter` (
`name` VARCHAR(50) NOT NULL,
`url` TEXT NOT NULL,
PRIMARY KEY (`name`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-- CreateTable
CREATE TABLE `users` (
`key` VARCHAR(500) NOT NULL,
`username` VARCHAR(50) NOT NULL,
PRIMARY KEY (`key`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
-----------------------------------------------------------------
-- follow queries run by a specific session_id
-- change the <session_id>
--
-- <EMAIL>, go ahead license
-----------------------------------------------------------------
CREATE EVENT SESSION [trace_session_id] ON SERVER
ADD EVENT sqlserver.query_post_execution_plan_profile(
WHERE ([sqlserver].[session_id]=(<session_id>))),
ADD EVENT sqlserver.sp_statement_completed(
WHERE ([sqlserver].[session_id]=(<session_id>))),
ADD EVENT sqlserver.sql_batch_completed(
WHERE ([sqlserver].[session_id]=(<session_id>))),
ADD EVENT sqlserver.sql_statement_completed(
WHERE ([sqlserver].[session_id]=(<session_id>)))
ADD TARGET package0.ring_buffer
WITH (STARTUP_STATE=OFF)
GO
-------------------------------------------------
-- Start and stop the Session --
-------------------------------------------------
ALTER EVENT SESSION [trace_session_id] ON SERVER
STATE = START
GO
ALTER EVENT SESSION [trace_session_id] ON SERVER
STATE = STOP
GO
-------------------------------------------------
-- drop the session --
-------------------------------------------------
DROP EVENT SESSION [trace_session_id] ON SERVER; |
<reponame>dram/metasfresh
-- 2021-05-05T09:19:50.730Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Element_Trl SET Name='API Antwort Revision', PrintName='API Antwort Revision',Updated=TO_TIMESTAMP('2021-05-05 12:19:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=579126 AND AD_Language='de_CH'
;
-- 2021-05-05T09:19:50.733Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
/* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(579126,'de_CH')
;
-- 2021-05-05T09:19:56.239Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Element_Trl SET Name='API Antwort Revision', PrintName='API Antwort Revision',Updated=TO_TIMESTAMP('2021-05-05 12:19:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=579126 AND AD_Language='de_DE'
;
-- 2021-05-05T09:19:56.242Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
/* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(579126,'de_DE')
;
-- 2021-05-05T09:19:56.259Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
/* DDL */ select update_ad_element_on_ad_element_trl_update(579126,'de_DE')
;
-- 2021-05-05T09:19:56.260Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET ColumnName='API_Response_Audit_ID', Name='API Antwort Revision', Description=NULL, Help=NULL WHERE AD_Element_ID=579126
;
-- 2021-05-05T09:19:56.262Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Process_Para SET ColumnName='API_Response_Audit_ID', Name='API Antwort Revision', Description=NULL, Help=NULL, AD_Element_ID=579126 WHERE UPPER(ColumnName)='API_RESPONSE_AUDIT_ID' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL
;
-- 2021-05-05T09:19:56.264Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Process_Para SET ColumnName='API_Response_Audit_ID', Name='API Antwort Revision', Description=NULL, Help=NULL WHERE AD_Element_ID=579126 AND IsCentrallyMaintained='Y'
;
-- 2021-05-05T09:19:56.265Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Field SET Name='API Antwort Revision', Description=NULL, Help=NULL WHERE (AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=579126) AND AD_Name_ID IS NULL ) OR (AD_Name_ID = 579126)
;
-- 2021-05-05T09:19:56.285Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_PrintFormatItem pi SET PrintName='API Antwort Revision', Name='API Antwort Revision' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=579126)
;
-- 2021-05-05T09:19:56.286Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Tab SET Name='API Antwort Revision', Description=NULL, Help=NULL, CommitWarning = NULL WHERE AD_Element_ID = 579126
;
-- 2021-05-05T09:19:56.287Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_WINDOW SET Name='API Antwort Revision', Description=NULL, Help=NULL WHERE AD_Element_ID = 579126
;
-- 2021-05-05T09:19:56.289Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Menu SET Name = 'API Antwort Revision', Description = NULL, WEBUI_NameBrowse = NULL, WEBUI_NameNew = NULL, WEBUI_NameNewBreadcrumb = NULL WHERE AD_Element_ID = 579126
;
-- 2021-05-05T09:20:03.198Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO t_alter_column values('api_response_audit','API_Response_Audit_ID','NUMERIC(10)',null,null)
;
-- 2021-05-05T09:20:36.311Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Element_Trl SET Name='API Revision Einstellung', PrintName='API Revision Einstellung',Updated=TO_TIMESTAMP('2021-05-05 12:20:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=579109 AND AD_Language='de_CH'
;
-- 2021-05-05T09:20:36.313Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
/* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(579109,'de_CH')
;
-- 2021-05-05T09:22:06.467Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO t_alter_column values('api_response_audit','API_Request_Audit_ID','NUMERIC(10)',null,null)
;
-- 2021-05-05T09:24:28.070Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Element_Trl SET Name='Log', PrintName='Log',Updated=TO_TIMESTAMP('2021-05-05 12:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=579123 AND AD_Language='de_CH'
;
-- 2021-05-05T09:24:28.084Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
/* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(579123,'de_CH')
;
-- 2021-05-05T09:24:34.734Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Element_Trl SET Name='Log', PrintName='Log',Updated=TO_TIMESTAMP('2021-05-05 12:24:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=579123 AND AD_Language='de_DE'
;
-- 2021-05-05T09:24:34.737Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
/* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(579123,'de_DE')
;
-- 2021-05-05T09:24:34.757Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
/* DDL */ select update_ad_element_on_ad_element_trl_update(579123,'de_DE')
;
-- 2021-05-05T09:24:34.760Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET ColumnName='API_Request_Audit_Log_ID', Name='Log', Description=NULL, Help=NULL WHERE AD_Element_ID=579123
;
-- 2021-05-05T09:24:34.762Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Process_Para SET ColumnName='API_Request_Audit_Log_ID', Name='Log', Description=NULL, Help=NULL, AD_Element_ID=579123 WHERE UPPER(ColumnName)='API_REQUEST_AUDIT_LOG_ID' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL
;
-- 2021-05-05T09:24:34.764Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Process_Para SET ColumnName='API_Request_Audit_Log_ID', Name='Log', Description=NULL, Help=NULL WHERE AD_Element_ID=579123 AND IsCentrallyMaintained='Y'
;
-- 2021-05-05T09:24:34.764Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Field SET Name='Log', Description=NULL, Help=NULL WHERE (AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=579123) AND AD_Name_ID IS NULL ) OR (AD_Name_ID = 579123)
;
-- 2021-05-05T09:24:34.785Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_PrintFormatItem pi SET PrintName='Log', Name='Log' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=579123)
;
-- 2021-05-05T09:24:34.786Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Tab SET Name='Log', Description=NULL, Help=NULL, CommitWarning = NULL WHERE AD_Element_ID = 579123
;
-- 2021-05-05T09:24:34.787Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_WINDOW SET Name='Log', Description=NULL, Help=NULL WHERE AD_Element_ID = 579123
;
-- 2021-05-05T09:24:34.787Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Menu SET Name = 'Log', Description = NULL, WEBUI_NameBrowse = NULL, WEBUI_NameNew = NULL, WEBUI_NameNewBreadcrumb = NULL WHERE AD_Element_ID = 579123
;
-- 2021-05-05T09:24:39.518Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Element_Trl SET Name='Log', PrintName='Log',Updated=TO_TIMESTAMP('2021-05-05 12:24:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=579123 AND AD_Language='en_US'
;
-- 2021-05-05T09:24:39.519Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
/* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(579123,'en_US')
;
-- 2021-05-05T09:24:44.031Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Element_Trl SET Name='Log', PrintName='Log',Updated=TO_TIMESTAMP('2021-05-05 12:24:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=579123 AND AD_Language='nl_NL'
;
-- 2021-05-05T09:24:44.035Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
/* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(579123,'nl_NL')
;
-- 2021-05-05T09:24:48.701Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO t_alter_column values('api_request_audit_log','API_Request_Audit_Log_ID','NUMERIC(10)',null,null)
;
-- 2021-05-05T10:50:42.842Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_Element_ID,AD_UI_ElementGroup_ID,AD_UI_ElementType,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsAllowFiltering,IsDisplayed,IsDisplayed_SideList,IsDisplayedGrid,IsMultiLine,MultiLine_LinesCount,Name,SeqNo,SeqNo_SideList,SeqNoGrid,Updated,UpdatedBy) VALUES (0,645166,0,543895,584488,545768,'F',TO_TIMESTAMP('2021-05-05 13:50:42','YYYY-MM-DD HH24:MI:SS'),100,'Zur Bestimmung der Reihenfolge der Einträge; die kleinste Zahl kommt zuerst','"Reihenfolge" bestimmt die Reihenfolge der Einträge','Y','N','N','Y','N','N','N',0,'Reihenfolge',50,0,0,TO_TIMESTAMP('2021-05-05 13:50:42','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 2021-05-05T10:50:53.015Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=70,Updated=TO_TIMESTAMP('2021-05-05 13:50:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=584488
;
-- 2021-05-05T10:57:00.590Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsUpdateable='Y',Updated=TO_TIMESTAMP('2021-05-05 13:57:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=573800
;
-- 2021-05-05T10:58:02.360Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsUpdateable='N',Updated=TO_TIMESTAMP('2021-05-05 13:58:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=573728
;
-- 2021-05-05T10:58:09.071Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsUpdateable='N',Updated=TO_TIMESTAMP('2021-05-05 13:58:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=573728
;
-- 2021-05-05T10:58:12.448Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO t_alter_column values('api_audit_config','API_Audit_Config_ID','NUMERIC(10)',null,null)
;
-- 2021-05-05T10:58:37.964Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO t_alter_column values('api_request_audit','AD_User_ID','NUMERIC(10)',null,null)
;
-- 2021-05-05T10:58:50.090Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsUpdateable='N',Updated=TO_TIMESTAMP('2021-05-05 13:58:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=573728
;
-- 2021-05-05T10:58:50.805Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO t_alter_column values('api_audit_config','API_Audit_Config_ID','NUMERIC(10)',null,null)
;
-- 2021-05-05T11:00:48.765Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsUpdateable='N',Updated=TO_TIMESTAMP('2021-05-05 14:00:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=573728
;
-- 2021-05-05T11:01:21.415Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsAlwaysUpdateable='N', IsUpdateable='N',Updated=TO_TIMESTAMP('2021-05-05 14:01:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=573728
;
-- 2021-05-05T11:01:27.100Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsUpdateable='N',Updated=TO_TIMESTAMP('2021-05-05 14:01:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=573728
;
-- 2021-05-05T11:02:03.151Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsUpdateable='Y',Updated=TO_TIMESTAMP('2021-05-05 14:02:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=573745
;
-- 2021-05-05T11:02:08.927Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO t_alter_column values('api_request_audit','API_Audit_Config_ID','NUMERIC(10)',null,null)
;
-- 2021-05-05T11:02:54.441Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsUpdateable='N',Updated=TO_TIMESTAMP('2021-05-05 14:02:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=573728
;
-- 2021-05-05T11:06:32.228Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Element_Trl SET Name='API Aufruf Revision', PrintName='API Aufruf Revision',Updated=TO_TIMESTAMP('2021-05-05 14:06:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=579109 AND AD_Language='de_CH'
;
-- 2021-05-05T11:06:32.241Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
/* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(579109,'de_CH')
;
-- 2021-05-05T11:06:40.854Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Element_Trl SET Name='API Aufruf Revision', PrintName='API Aufruf Revision',Updated=TO_TIMESTAMP('2021-05-05 14:06:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=579109 AND AD_Language='de_DE'
;
-- 2021-05-05T11:06:40.857Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
/* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(579109,'de_DE')
;
-- 2021-05-05T11:06:40.903Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
/* DDL */ select update_ad_element_on_ad_element_trl_update(579109,'de_DE')
;
-- 2021-05-05T11:06:40.904Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET ColumnName='API_Request_Audit_ID', Name='API Aufruf Revision', Description=NULL, Help=NULL WHERE AD_Element_ID=579109
;
-- 2021-05-05T11:06:40.905Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Process_Para SET ColumnName='API_Request_Audit_ID', Name='API Aufruf Revision', Description=NULL, Help=NULL, AD_Element_ID=579109 WHERE UPPER(ColumnName)='API_REQUEST_AUDIT_ID' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL
;
-- 2021-05-05T11:06:40.906Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Process_Para SET ColumnName='API_Request_Audit_ID', Name='API Aufruf Revision', Description=NULL, Help=NULL WHERE AD_Element_ID=579109 AND IsCentrallyMaintained='Y'
;
-- 2021-05-05T11:06:40.907Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Field SET Name='API Aufruf Revision', Description=NULL, Help=NULL WHERE (AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=579109) AND AD_Name_ID IS NULL ) OR (AD_Name_ID = 579109)
;
-- 2021-05-05T11:06:40.924Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_PrintFormatItem pi SET PrintName='API Aufruf Revision', Name='API Aufruf Revision' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=579109)
;
-- 2021-05-05T11:06:40.924Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Tab SET Name='API Aufruf Revision', Description=NULL, Help=NULL, CommitWarning = NULL WHERE AD_Element_ID = 579109
;
-- 2021-05-05T11:06:40.926Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_WINDOW SET Name='API Aufruf Revision', Description=NULL, Help=NULL WHERE AD_Element_ID = 579109
;
-- 2021-05-05T11:06:40.927Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Menu SET Name = 'API Aufruf Revision', Description = NULL, WEBUI_NameBrowse = NULL, WEBUI_NameNew = NULL, WEBUI_NameNewBreadcrumb = NULL WHERE AD_Element_ID = 579109
;
-- 2021-05-05T11:07:12.544Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO t_alter_column values('api_request_audit','API_Request_Audit_ID','NUMERIC(10)',null,null)
;
-- 2021-05-05T14:50:15.801Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Ref_List SET Name='DELETE', Value='DELETE', ValueName='DELETE',Updated=TO_TIMESTAMP('2021-05-05 17:50:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Ref_List_ID=542485
;
-- 2021-05-05T14:50:31.583Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Ref_List_Trl SET Name='DELETE',Updated=TO_TIMESTAMP('2021-05-05 17:50:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Language='de_CH' AND AD_Ref_List_ID=542485
;
-- 2021-05-05T14:50:37.135Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Ref_List_Trl SET Name='DELETE',Updated=TO_TIMESTAMP('2021-05-05 17:50:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Language='nl_NL' AND AD_Ref_List_ID=542485
;
-- 2021-05-05T15:02:05.839Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
DELETE FROM AD_Ref_List_Trl WHERE AD_Ref_List_ID=542485
;
-- 2021-05-05T15:02:05.845Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
DELETE FROM AD_Ref_List WHERE AD_Ref_List_ID=542485
;
-- 2021-05-05T15:04:40.928Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Ref_List_ID,AD_Reference_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value,ValueName) VALUES (0,0,542490,541306,TO_TIMESTAMP('2021-05-05 18:04:40','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','DELETE',TO_TIMESTAMP('2021-05-05 18:04:40','YYYY-MM-DD HH24:MI:SS'),100,'DELETE','DELETE')
;
-- 2021-05-05T15:04:40.930Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y') AND t.AD_Ref_List_ID=542490 AND NOT EXISTS (SELECT 1 FROM AD_Ref_List_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Ref_List_ID=t.AD_Ref_List_ID)
;
-- 2021-05-05T15:19:57.869Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2021-05-05 18:19:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=573733
;
-- 2021-05-05T15:20:03.621Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2021-05-05 18:20:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=573732
;
-- 2021-05-05T15:20:07.100Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2021-05-05 18:20:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=573735
;
-- 2021-05-05T15:20:10.417Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2021-05-05 18:20:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=573734
;
-- 2021-05-05T15:24:05.290Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO t_alter_column values('api_audit_config','KeepResponseDays','VARCHAR(255)',null,null)
;
-- 2021-05-05T15:24:05.293Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO t_alter_column values('api_audit_config','KeepResponseDays',null,'NULL',null)
;
-- 2021-05-05T15:24:10.115Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO t_alter_column values('api_audit_config','KeepResponseBodyDays','VARCHAR(255)',null,null)
;
-- 2021-05-05T15:24:10.124Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO t_alter_column values('api_audit_config','KeepResponseBodyDays',null,'NULL',null)
;
-- 2021-05-05T15:24:13.251Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO t_alter_column values('api_audit_config','KeepRequestDays','VARCHAR(255)',null,null)
;
-- 2021-05-05T15:24:13.252Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO t_alter_column values('api_audit_config','KeepRequestDays',null,'NULL',null)
;
-- 2021-05-05T15:24:17.344Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO t_alter_column values('api_audit_config','KeepRequestBodyDays','VARCHAR(255)',null,null)
;
-- 2021-05-05T15:24:17.344Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO t_alter_column values('api_audit_config','KeepRequestBodyDays',null,'NULL',null)
;
|
CREATE OR REPLACE FUNCTION qnodes(q text) RETURNS text
LANGUAGE 'plpgsql' AS
$$
DECLARE
exp TEXT;
mat TEXT[];
ret TEXT[];
BEGIN
--RAISE NOTICE 'Q: %', q;
FOR exp IN EXECUTE 'EXPLAIN ' || q
LOOP
--RAISE NOTICE 'EXP: %', exp;
mat := regexp_matches(exp, ' *(?:-> *)?(.*Scan)');
--RAISE NOTICE 'MAT: %', mat;
IF mat IS NOT NULL THEN
ret := array_append(ret, mat[1]);
END IF;
--RAISE NOTICE 'RET: %', ret;
END LOOP;
RETURN array_to_string(ret,',');
END;
$$;
-- create table
CREATE TABLE knn_cpa AS
WITH points AS (
SELECT t,
ST_MakePoint(x-t,x+t) p
FROM generate_series(0,1000,5) t -- trajectories
,generate_series(-100,100,10) x
)
SELECT t, ST_AddMeasure(
CASE WHEN t%2 = 0 THEN ST_Reverse(ST_MakeLine(p))
ELSE ST_MakeLine(p) END,
10, 20) tr
FROM points GROUP BY t;
--ALTER TABLE knn_cpa ADD PRIMARY KEY(t);
\set qt 'ST_AddMeasure(ST_MakeLine(ST_MakePointM(-260,380,0),ST_MakePointM(-360,540,0)),10,20)'
SELECT '|=| no idx', qnodes('select * from knn_cpa ORDER BY tr |=| ' || quote_literal(:qt ::text) || ' LIMIT 1');
CREATE TABLE knn_cpa_no_index AS
SELECT row_number() over () n, t, d FROM (
SELECT t,
ST_DistanceCPA(tr,:qt) d
FROM knn_cpa ORDER BY tr |=| :qt LIMIT 5
) foo;
CREATE INDEX on knn_cpa USING gist (tr gist_geometry_ops_nd);
ANALYZE knn_cpa;
set enable_seqscan to off;
SELECT '|=| idx', qnodes('select * from knn_cpa ORDER BY tr |=| ' || quote_literal(:qt ::text) || ' LIMIT 1');
CREATE TABLE knn_cpa_index AS
SELECT row_number() over () n, t, d FROM (
SELECT t, ST_DistanceCPA(tr,:qt) d
FROM knn_cpa ORDER BY tr |=| :qt LIMIT 5
) foo;
--SELECT * FROM knn_cpa_no_index;
--SELECT * FROM knn_cpa_index;
SELECT a.n,
CASE WHEN a.t = b.t THEN a.t||'' ELSE a.t || ' vs ' || b.t END closest,
CASE WHEN a.d = b.d THEN 'dist:' || a.d::numeric(10,2) ELSE 'diff:' || (a.d - b.d) END dist
FROM knn_cpa_no_index a, knn_cpa_index b
WHERE a.n = b.n
ORDER BY a.n;
-- Cleanup
DROP FUNCTION qnodes(text);
DROP TABLE knn_cpa;
DROP TABLE knn_cpa_no_index;
DROP TABLE knn_cpa_index;
|
/**
* Триггер обновляющий данные в полях в таблицы EMPLOYEES:
* UPD_COUNTER числового типа для счетчика оптимистичной блокировки
* CRT_USER текстового типа для хранения имени пользователя, создавшего запись в таблице
* CRT_DATE для хранения даты создания записи
* UPD_USER текстового типа для хранения имени пользователя, обновившего запись
* UPD_DATE для хранения даты обновления данных
*
* @author <NAME>
* @version 1.0 (27.03.2022)
*/
CREATE OR REPLACE TRIGGER update_employees
BEFORE UPDATE
ON employees
FOR EACH ROW
DECLARE
user_for_insert employees.crt_user%TYPE;
BEGIN
SELECT user INTO user_for_insert FROM dual;
:new.upd_counter := :old.upd_counter + 1;
:new.upd_user := user_for_insert;
:new.upd_date := sysdate;
END update_employees; |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Anamakine: 127.0.0.1
-- Üretim Zamanı: 15 Eyl 2021, 14:05:09
-- Sunucu sürümü: 10.4.17-MariaDB
-- PHP Sürümü: 8.0.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Veritabanı: `hasta-takip`
--
-- --------------------------------------------------------
--
-- Tablo için tablo yapısı `doktor`
--
CREATE TABLE `doktor` (
`doktor_id` int(11) NOT NULL,
`doktor_adsoyad` varchar(20) COLLATE utf8mb4_turkish_ci NOT NULL,
`doktor_tc` varchar(15) COLLATE utf8mb4_turkish_ci NOT NULL,
`doktor_sifre` varchar(30) COLLATE utf8mb4_turkish_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_turkish_ci;
--
-- Tablo döküm verisi `doktor`
--
INSERT INTO `doktor` (`doktor_id`, `doktor_adsoyad`, `doktor_tc`, `doktor_sifre`) VALUES
(6, '<NAME>', '12345678916', '1234'),
(29, '<NAME>', '12345678912', '1234'),
(33, '<NAME>', '12345678914', '123456'),
(35, '<NAME>', '12345678946', '1234');
-- --------------------------------------------------------
--
-- Tablo için tablo yapısı `hasta`
--
CREATE TABLE `hasta` (
`hasta_id` int(11) NOT NULL,
`hasta_adsoyad` varchar(20) COLLATE utf8mb4_turkish_ci NOT NULL,
`hasta_tc` varchar(15) COLLATE utf8mb4_turkish_ci NOT NULL,
`hasta_sifre` varchar(30) COLLATE utf8mb4_turkish_ci NOT NULL DEFAULT '1234',
`hasta_tedavi` varchar(100) COLLATE utf8mb4_turkish_ci NOT NULL,
`hasta_sikayeti` varchar(50) COLLATE utf8mb4_turkish_ci NOT NULL,
`hasta_tani` varchar(50) COLLATE utf8mb4_turkish_ci NOT NULL,
`hasta_tahlil` varchar(30) COLLATE utf8mb4_turkish_ci NOT NULL DEFAULT 'Tahlil Bulunmuyor',
`hasta_tahlil_sonuc` varchar(300) COLLATE utf8mb4_turkish_ci NOT NULL DEFAULT '-',
`hasta_doktor` varchar(30) COLLATE utf8mb4_turkish_ci NOT NULL,
`hasta_doktor_id` varchar(30) COLLATE utf8mb4_turkish_ci NOT NULL,
`randevu_talep` varchar(50) COLLATE utf8mb4_turkish_ci NOT NULL,
`talep_durum` int(11) NOT NULL DEFAULT 0,
`talep_tarihi` varchar(15) COLLATE utf8mb4_turkish_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_turkish_ci;
--
-- Tablo döküm verisi `hasta`
--
INSERT INTO `hasta` (`hasta_id`, `hasta_adsoyad`, `hasta_tc`, `hasta_sifre`, `hasta_tedavi`, `hasta_sikayeti`, `hasta_tani`, `hasta_tahlil`, `hasta_tahlil_sonuc`, `hasta_doktor`, `hasta_doktor_id`, `randevu_talep`, `talep_durum`, `talep_tarihi`) VALUES
(22, '<NAME>', '12345678944', 'ahmet123', 'Antibiyotik', 'Baş dönmesi', 'Vertigo', 'Kan Tahlili', '-', 'Sevgi Altun', '33', 'İlaçlar ağır geldi', 2, '25/1/2021 12:32'),
(23, '<NAME>', '12345678933', 'ayşe46', 'xzczxcxzc', 'karın ağrısı', 'alerjicxvxcvxv', 'Mikroskopi Tahlili', '2 saate çıkar', 'Oğuzhan Eskalen', '6', 'ilaçlar işe yaramıyor', 2, '23/3/2021 1:22'),
(24, '<NAME>', '12345678985', '1234', '-', 'Öksürük', 'Covid-19', 'Kan Tahlili', '-', 'Mehmet Gözkaya', '29', 'kontrol istiyorum', 1, '4/2/2021 18:31');
-- --------------------------------------------------------
--
-- Tablo için tablo yapısı `randevu`
--
CREATE TABLE `randevu` (
`randevu_id` int(11) NOT NULL,
`randevu_aciklama` text COLLATE utf8mb4_turkish_ci NOT NULL,
`randevu_yer` varchar(40) COLLATE utf8mb4_turkish_ci NOT NULL,
`randevu_tarih` date NOT NULL,
`randevu_saat` time NOT NULL,
`randevu_hasta` varchar(30) COLLATE utf8mb4_turkish_ci NOT NULL,
`randevu_doktor` varchar(30) COLLATE utf8mb4_turkish_ci NOT NULL,
`randevu_doktor_id` varchar(30) COLLATE utf8mb4_turkish_ci NOT NULL,
`randevu_iptal` tinyint(4) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_turkish_ci;
--
-- Tablo döküm verisi `randevu`
--
INSERT INTO `randevu` (`randevu_id`, `randevu_aciklama`, `randevu_yer`, `randevu_tarih`, `randevu_saat`, `randevu_hasta`, `randevu_doktor`, `randevu_doktor_id`, `randevu_iptal`) VALUES
(87, 'ilaçlar ağır geliyormuş', 'klinik 1', '2021-02-20', '20:15:00', '<NAME>', 'Sevgi Altun', '33', 0),
(88, 'Tahlil verilecek', 'klinik 2', '2021-02-12', '18:24:00', '<NAME>', 'Mehmet Gözkaya', '29', 0),
(91, 'kontrol amaçlı', 'klinik', '2021-02-10', '15:15:00', '<NAME>', 'Mehmet Gözkaya', '29', 0),
(94, '', '', '0000-00-00', '00:00:00', '<NAME>', '<NAME>', '6', 0);
--
-- Dökümü yapılmış tablolar için indeksler
--
--
-- Tablo için indeksler `doktor`
--
ALTER TABLE `doktor`
ADD PRIMARY KEY (`doktor_id`);
--
-- Tablo için indeksler `hasta`
--
ALTER TABLE `hasta`
ADD PRIMARY KEY (`hasta_id`);
--
-- Tablo için indeksler `randevu`
--
ALTER TABLE `randevu`
ADD PRIMARY KEY (`randevu_id`);
--
-- Dökümü yapılmış tablolar için AUTO_INCREMENT değeri
--
--
-- Tablo için AUTO_INCREMENT değeri `doktor`
--
ALTER TABLE `doktor`
MODIFY `doktor_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=36;
--
-- Tablo için AUTO_INCREMENT değeri `hasta`
--
ALTER TABLE `hasta`
MODIFY `hasta_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=31;
--
-- Tablo için AUTO_INCREMENT değeri `randevu`
--
ALTER TABLE `randevu`
MODIFY `randevu_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=95;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
BEGIN;
-- ROLE anonymous
-- ROLE anonymous_user
-- ROLE application
-- USER application_user
COMMIT;
|
<reponame>KostadinovK/CSharp-DB
SELECT [Name] AS [Game],
CASE
WHEN DATEPART(HOUR, [Start]) >= 0 AND DATEPART(HOUR, [Start]) < 12 THEN 'Morning'
WHEN DATEPART(HOUR, [Start]) >= 12 AND DATEPART(HOUR, [Start]) < 18 THEN 'Afternoon'
WHEN DATEPART(HOUR, [Start]) >= 18 AND DATEPART(HOUR, [Start]) < 24 THEN 'Evening'
END AS [Part of the Day],
CASE
WHEN Duration <= 3 THEN 'Extra Short'
WHEN Duration > 3 AND Duration <= 6 THEN 'Short'
WHEN Duration > 6 THEN 'Long'
ELSE 'Extra Long'
END AS Duration
FROM Games
ORDER BY [Game], Duration, [Part of the Day]; |
<filename>more_windowing_functions.sql
/*
Aggregate functions -AVG, SUM, COUNT, MIN, MAX, etc
Ranking Functions - RANK, DENSE_RANK, ROW_NUMBER, etc
Analytic functions - LEAD, LAD, FIRST_VALUE, LAST_VALUE
When Over() is used with the above, it controls the partitioning and ordering of rows that are
passed into the functions
Over() accepts 3 arguments...
ORDER BY - This orders rows within the partition
PARTITION BY - Groups rows based on a qualifier
ROWS (you can also use RANGE) - further limits rows within the partition by specifying start and end
within the partition.
When using a subquery in a FROM clause, make sure to alias it, or SQL can complain.
When using Over() with an argument like ORDER BY, the default ROWS is
'RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW'
*/
/*
Get the first 2 employees from each department to join the company.
What is happening here is that the inner query is assigning row numbers to each employee.
The result set is ordered by empolyee id (assuming lower employee ids mean they joined the company earlier).
Because it is partitioned by department, the first row of every partition should have the lowest employee
id for any employee in that department.
*/
SELECT
*
FROM
(
SELECT
*,
ROW_NUMBER() over(
PARTITION by dept_name
ORDER BY
emp_id
) AS rn
FROM
employee
) x
WHERE
x.rn <= 2
/*
Get the top 3 employees in each department based on salary. We are using RANK instead of the row_number
method because RANK() will give employees with the same salary the same rank, but jump ranks for the next number.
If you don't want to skip values, use DENSE_RANK()
*/
SELECT
*
FROM
(
SELECT
*,
rank() over(
PARTITION by dept_name
ORDER BY
salary DESC
) AS rnk
FROM
employee
) ranked
WHERE
ranked.rnk < 4
/*
Find out if the previously hired employee (one less emp_id earned more or less than the next hired employee. Similarly,
find out if the next hired employee (one emp_ID higher) is making more or less money.
We can do think with lag() and lead() which access the previous record. Useful if you're passing a 'window' of
data to the function.
*/
SELECT
salary,
CASE
WHEN previous_salary < salary THEN 'Higher'
WHEN previous_salary > salary THEN 'Lower'
WHEN previous_salary = salary THEN 'Same'
ELSE 'Unknown'
END AS STATUS
FROM
(
SELECT
*,
lag(salary) over (
PARTITION by DEPT_NAME
ORDER BY
emp_ID
) AS previous_salary
FROM
employee
) AS x |
<reponame>EphermeralCC/COMP303_JavaEE
SELECT albums.AlbumId,
genres.Name AS 'GenreName',
artists.Name AS 'ArtistName',
albums.Title,
albums.Price,
albums.AlbumArtUrl
FROM albums
INNER JOIN genres ON albums.GenreId = genres.GenreId
INNER JOIN artists ON albums.ArtistId = artists.ArtistId
ORDER BY albums.AlbumId; |
-- create table
create table client (
uid serial primary key,
name varchar(200)
);
create table pet (
uid serial primary key,
client_id int not null references client(uid),
nick varchar(200)
); |
/*
* Copyright (c) 2010-2014 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
SELECT
b.id,
b.date,
b.testId,
--b.runId,
b.resultOORIndicator,
b.result,
b.qualresult,
b.remark,
b.qcstate,
b.taskid
FROM study."Chemistry Results" b
WHERE
b.testId NOT IN ('LDL', 'GLUC', 'BUN', 'CREAT', 'CPK', 'UA', 'CHOL', 'TRIG','SGOT', 'LDH', 'TB','GGT','SGPT','TP','ALB','ALKP','CA','PHOS','FE','NA','K','CL')
or b.testid is null
|
<reponame>coconut2015/jaqy
--------------------------------------------------------------------------
-- .exec command test
--------------------------------------------------------------------------
.help exec
.exec lib/count.spl
.exec dummy.sql
.run ../common/mysql_setup.sql
USE vagrant;
CREATE TABLE MyTable
(
a INTEGER PRIMARY KEY,
b VARCHAR(200)
);
INSERT INTO MyTable VALUES (1, '1');
INSERT INTO MyTable VALUES (2, '2');
.exec -c utf-8 lib/count.spl
CALL simpleproc(@a);
SELECT @a;
DROP PROCEDURE simpleproc;
.exec
CREATE PROCEDURE simpleproc (OUT c INT)
BEGIN
SELECT COUNT(*) INTO c FROM MyTable;
END;
.end exec
CALL simpleproc(@a);
SELECT @a;
DROP PROCEDURE simpleproc;
DROP TABLE MyTable;
.close
|
-- AlterTable
ALTER TABLE "Request" ADD COLUMN "message_translation" JSONB;
|
<filename>db_patches/0023_AddExternalCommentTechRev.sql
DO
$$
BEGIN
IF register_patch('AddExternalCommentTechRev.sql', 'fredrikbolmsten', 'Logging', '2020-04-01') THEN
BEGIN
ALTER TABLE technical_review ADD COLUMN public_comment text;
END;
END IF;
END;
$$
LANGUAGE plpgsql; |
<reponame>mbustamanteAseinfo/configManager
/* Script Generado por Evolution - Editor de Formulación de Planillas. 16-01-2017 11:40 AM */
begin transaction
delete from [sal].[fac_factores] where [fac_codigo] = 'c1e6999c-9b4d-4a8d-825b-ef938d1891d1';
insert into [sal].[fac_factores] ([fac_codigo],[fac_id],[fac_descripcion],[fac_vbscript],[fac_codfld],[fac_codpai],[fac_size]) values ('c1e6999c-9b4d-4a8d-825b-ef938d1891d1','SalarioActual','Salario Actual','Function SalarioActual()
salq = 0
'' - CALCULA SALARIO ACTUAL
if isnull( cdbl(Emp_InfoSalario.Fields("EMP_SALARIO").Value) ) then
salq = 0
else
salq = (cdbl(Emp_InfoSalario.Fields("EMP_SALARIO").Value))
end if
SalarioActual = salq
End Function','double','pa',0);
commit transaction;
|
<gh_stars>0
--
-- PostgreSQL database dump
--
-- Dumped from database version 14.1
-- Dumped by pg_dump version 14.1
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;
SET default_tablespace = '';
SET default_table_access_method = heap;
--
-- Name: tblcategory; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.tblcategory (
id integer NOT NULL,
name character varying(50)
);
ALTER TABLE public.tblcategory OWNER TO postgres;
--
-- Name: tblcategory_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
ALTER TABLE public.tblcategory ALTER COLUMN id ADD GENERATED ALWAYS AS IDENTITY (
SEQUENCE NAME public.tblcategory_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1
);
--
-- Name: tblproduct; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.tblproduct (
id integer NOT NULL,
name character varying(50),
number integer,
price double precision,
categoryid integer
);
ALTER TABLE public.tblproduct OWNER TO postgres;
--
-- Name: tblproduct_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
ALTER TABLE public.tblproduct ALTER COLUMN id ADD GENERATED ALWAYS AS IDENTITY (
SEQUENCE NAME public.tblproduct_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1
);
--
-- Name: tblsales; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.tblsales (
id integer NOT NULL,
productid integer,
number integer,
price double precision
);
ALTER TABLE public.tblsales OWNER TO postgres;
--
-- Name: tblsales_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
ALTER TABLE public.tblsales ALTER COLUMN id ADD GENERATED ALWAYS AS IDENTITY (
SEQUENCE NAME public.tblsales_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1
);
--
-- Data for Name: tblcategory; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.tblcategory (id, name) FROM stdin;
\.
--
-- Data for Name: tblproduct; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.tblproduct (id, name, number, price, categoryid) FROM stdin;
\.
--
-- Data for Name: tblsales; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.tblsales (id, productid, number, price) FROM stdin;
\.
--
-- Name: tblcategory_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('public.tblcategory_id_seq', 1, true);
--
-- Name: tblproduct_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('public.tblproduct_id_seq', 1, true);
--
-- Name: tblsales_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('public.tblsales_id_seq', 1, false);
--
-- Name: tblcategory tblcategory_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.tblcategory
ADD CONSTRAINT tblcategory_pkey PRIMARY KEY (id);
--
-- Name: tblproduct tblproduct_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.tblproduct
ADD CONSTRAINT tblproduct_pkey PRIMARY KEY (id);
--
-- Name: tblsales tblsales_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.tblsales
ADD CONSTRAINT tblsales_pkey PRIMARY KEY (id);
--
-- Name: tblproduct fk_category; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.tblproduct
ADD CONSTRAINT fk_category FOREIGN KEY (categoryid) REFERENCES public.tblcategory(id) ON DELETE CASCADE;
--
-- Name: tblsales fk_productid; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.tblsales
ADD CONSTRAINT fk_productid FOREIGN KEY (productid) REFERENCES public.tblproduct(id) ON DELETE CASCADE;
--
-- PostgreSQL database dump complete
--
|
CREATE TABLE "tests" (
"ID" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"Name" TEXT NOT NULL,
"Description" TEXT,
"LabSection" TEXT,
"ClinicalData" TEXT,
"PanelTest" INTEGER NOT NULL,
"HidePatientName" INTEGER NOT NULL,
"PrevalenceThreshold" INTEGER,
"TargetTAT" NUMERIC,
"CostToPatient" NUMERIC
);
|
<filename>migration/initial_schema.sql
CREATE TABLE surl (
id SERIAL PRIMARY KEY,
url VARCHAR(2048) NOT NULL UNIQUE,
hash VARCHAR(10) NOT NULL UNIQUE
); |
<filename>sql/show-fk.sql<gh_stars>0
-- show-fk.sql - report foreign key constraints
@clears
col cuser noprint new_value uuser
prompt FK Columns for which account?:
set term off feed off
select upper('&1') cuser from dual;
set term on feed on
col owner format a10
col table_name format a30 head 'TABLE'
col parent_table format a30 head 'PARENT TABLE'
col column_name format a30 head 'COLUMN'
col constraint_name format a30 head 'FK CONSTRAINT'
col position format 999 head 'POS'
col delete_rule format a11 head 'DELETE RULE'
set linesize 200 trimspool on
set pagesize 100
break on owner on table_name on constraint_name skip 1
select
col.owner
, col.table_name
, col.constraint_name
, col.column_name
, col.position
, con.parent_table
, con.delete_rule
from (
select distinct
c.owner owner
, c.table_name table_name
, c.constraint_name constraint_name
, p.table_name parent_table
, c.delete_rule
from dba_constraints c, dba_constraints p
where c.r_constraint_name = p.constraint_name
and c.r_owner = p.owner
and p.owner = '&&uuser'
) con,
dba_cons_columns col
where con.owner = col.owner
and con.constraint_name = col.constraint_name
and con.table_name = col.table_name
order by 1,2,3,5
/
undef 1
|
<reponame>satrio6210/KPPL
-- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 19 Okt 2017 pada 18.20
-- Versi Server: 5.6.21
-- PHP Version: 5.6.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: `tekumamba`
--
-- --------------------------------------------------------
--
-- Struktur dari tabel `user`
--
CREATE TABLE IF NOT EXISTS `user` (
`no` int(11) NOT NULL,
`Uktp` varchar(40) NOT NULL,
`Username` varchar(25) NOT NULL,
`Upassword` varchar(255) NOT NULL,
`Uname` varchar(30) NOT NULL,
`Uemail` varchar(50) NOT NULL,
`Uphone` varchar(20) NOT NULL,
`Uaddress` varchar(255) NOT NULL,
`Ufoto` varchar(255) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;
--
-- Dumping data untuk tabel `user`
--
INSERT INTO `user` (`no`, `Uktp`, `Username`, `Upassword`, `Uname`, `Uemail`, `Uphone`, `Uaddress`, `Ufoto`) VALUES
(2, '64677777', 'sarahchair', '<PASSWORD>', 'sarah', '<EMAIL>', '081232416172', '', ''),
(3, '5215100015', 'sarah', '9e9d7a08e048e9d604b79460b54969c3', '<NAME>', '<EMAIL>', '081232461929', '', ''),
(4, '55555', 'ya', 'd74600e380dbf727f67113fd71669d88', 'ya', '<EMAIL>', '90739284', '', ''),
(5, '3', 's', '03c7c0ace395d80182db07ae2c30f034', 's', '<EMAIL>', '433', '', '');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `user`
--
ALTER TABLE `user`
ADD PRIMARY KEY (`no`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `user`
--
ALTER TABLE `user`
MODIFY `no` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=6;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
<gh_stars>0
--
-- Table structure for table `reg_login_attempt`
--
CREATE TABLE IF NOT EXISTS `reg_login_attempt` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`ip` int(11) unsigned NOT NULL,
`email` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
`ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `ip` (`ip`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `reg_users`
--
CREATE TABLE IF NOT EXISTS `reg_users` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`email` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
`rank` tinyint(2) unsigned NOT NULL,
`registered` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`last_login` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`token` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
`token_validity` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`),
UNIQUE KEY `email` (`email`),
UNIQUE KEY `token` (`token`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
<gh_stars>1-10
CREATE VIEW [etljob].[vw_Application]
AS
SELECT [ApplicationID]
,[Application]
FROM [etljob].[Application]
|
<reponame>dsalunga/mPortal
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[WebPagePanel]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[WebPagePanel](
[PagePanelId] [int] NOT NULL,
[TemplatePanelId] [int] NOT NULL,
[PageId] [int] NOT NULL,
[UsageTypeId] [int] NOT NULL,
CONSTRAINT [PK_WebPagePanels] PRIMARY KEY CLUSTERED
(
[PagePanelId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_WebPagePanels_PageId]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[WebPagePanel] ADD CONSTRAINT [DF_WebPagePanels_PageId] DEFAULT ((-1)) FOR [PageId]
END
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_WebPagePanels_UsageTypeId]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[WebPagePanel] ADD CONSTRAINT [DF_WebPagePanels_UsageTypeId] DEFAULT ((-1)) FOR [UsageTypeId]
END
GO
|
<gh_stars>1-10
--How to Reset Table Identity
Use DBase
go
select * from DemoIdentityTable
go
insert into DemoIdentityTable(Name,Address) values ('Alice','917 SL')
insert into DemoIdentityTable(Name,Address) values ('Bob','987 ASL')
insert into DemoIdentityTable(Name,Address) values ('John','f7 erf')
go
select * from DemoIdentityTable
delete from DemoIdentityTable where id>5
select * from DemoIdentityTable
insert into DemoIdentityTable(Name,Address) values ('Adam','987 SL')
select * from DemoIdentityTable
delete from DemoIdentityTable where id>5
select * from DemoIdentityTable
go
DBCC CHECKIDENT (DemoIdentityTable,reseed,5)
go
insert into DemoIdentityTable(Name,Address) values ('Sagar','917 SL')
insert into DemoIdentityTable(Name,Address) values ('Sameer','987 ASL')
insert into DemoIdentityTable(Name,Address) values ('Suraj','f7 erf')
select * from DemoIdentityTable
--By www.ellarr.com <NAME> |
<gh_stars>1-10
CREATE TYPE fact_loader.table_load_type AS ENUM('delta','full_refresh');
|
<reponame>Shuttl-Tech/antlr_psql
-- file:jsonb.sql ln:278 expect:true
SELECT jsonb '{"a":null, "b":"qq"}' ?| ARRAY['a','b']
|
--
-- Checks whether the given string is a valid datetime.
--
DELIMITER $$
DROP FUNCTION IF EXISTS _as_datetime $$
CREATE FUNCTION _as_datetime(txt TINYTEXT) RETURNS DATETIME
DETERMINISTIC
NO SQL
SQL SECURITY INVOKER
COMMENT 'Convert given text to DATETIME or NULL.'
BEGIN
declare continue handler for SQLEXCEPTION return NULL;
-- workaround for Issue 61:
-- The _as_datetime() function misbehaves with timestamps the look look like real dates.
-- UNIX_TIMESTAMP('2014-05-28') = 1401220800. And _as_datetime('1401220800') = '2014-01-22 08:00:00'.
if txt RLIKE '^[0-9]{10}$' then
return NULL;
end if;
RETURN (txt + interval 0 second);
END $$
DELIMITER ;
|
<filename>samples/features/json/code-generator/generate-json-crud.sql
/********************************************************************************************************************************************************
*
* Functions that generate CREATE PROCEDURE script that inserts, updates, retreives, and merges
* input JSON parameter in a table.
* Keys in JSON object must match columns in table. Use FOR JSON to generate JSON from table.
* Author: <NAME>
*
********************************************************************************************************************************************************/
DROP SCHEMA IF EXISTS codegen
GO
CREATE SCHEMA codegen
GO
DROP FUNCTION IF EXISTS codegen.QNAME
GO
CREATE FUNCTION codegen.QNAME(@name sysname)
RETURNS NVARCHAR(300) AS
BEGIN
RETURN(IIF(@name like '%[^a-zA-Z0-9]%', QUOTENAME(@name),@name));
END
GO
DROP FUNCTION IF EXISTS codegen.JSON_ESCAPE
GO
CREATE FUNCTION codegen.JSON_ESCAPE(@name sysname)
RETURNS NVARCHAR(300) AS
BEGIN
RETURN(IIF(@name like '%[^a-zA-Z0-9]%', '"'+STRING_ESCAPE(@name, 'json')+'"',@name));
END
GO
DROP FUNCTION IF EXISTS codegen.GenerateProcedureHead
GO
CREATE FUNCTION codegen.GenerateProcedureHead(@Table sysname, @JsonParam sysname)
RETURNS NVARCHAR(max)
AS BEGIN
RETURN ''
END
GO
GO
DROP FUNCTION IF EXISTS codegen.GenerateProcedureTail
GO
CREATE FUNCTION codegen.GenerateProcedureTail(@Table sysname)
RETURNS NVARCHAR(max)
AS BEGIN
RETURN ''
END
GO
GO
DROP FUNCTION IF EXISTS
codegen.GetTableColumns
GO
CREATE FUNCTION
codegen.GetTableColumns(@SchemaName sysname, @TableName sysname, @JsonColumns nvarchar(max), @IgnoredColumns nvarchar(max))
RETURNS TABLE
AS RETURN (
select
col.name as ColumnName,
col.column_id ColumnId,
typ.name as ColumnType,
-- create type with size based on type name and size
case typ.name
when 'char' then '(' + cast(col.max_length as varchar(10))+ ')'
when 'nchar' then '(' + cast(col.max_length/2 as varchar(10))+ ')'
when 'nvarchar' then (IIF(col.max_length=-1 or CHARINDEX(col.name, @JsonColumns,0) > 0, '(MAX)', '(' + cast(col.max_length/2 as varchar(10))+ ')'))
when 'varbinary' then (IIF(col.max_length=-1 , '(MAX)', '(' + cast(col.max_length as varchar(10))+ ')'))
when 'varchar' then (IIF(col.max_length=-1, '(MAX)', '(' + cast(col.max_length as varchar(10))+ ')'))
when 'decimal' then '(' + cast(col.precision as varchar(10))+ ',' + cast(col.scale as varchar(10)) + ')'
when 'datetimeoffset' then '(' + cast(col.scale as varchar(10))+ ')'
when 'numeric' then '(' + cast(col.precision as varchar(10))+ ',' + cast(col.scale as varchar(10)) + ')'
when 'datetime2' then '(' + cast(col.scale as varchar(10))+ ')'
else ''
end as StringSize,
-- if column is not nullable, add Strict mode in JSON
case
when col.is_nullable = 1 then '$.' else 'strict $.'
end Mode,
CHARINDEX(col.name, @JsonColumns,0) as IsJson,
i.is_primary_key IsPK,
IIF(col.is_identity = 0
and col.is_computed = 0
and col.is_hidden = 0
and col.is_rowguidcol = 0
and generated_always_type = 0
and (sm.text IS NULL OR sm.text NOT LIKE '(NEXT VALUE FOR%')
and LOWER(typ.name) NOT IN ('text', 'ntext', 'sql_variant', 'image','hierarchyid','geometry','geography'),
1,0) as IsDataColumn
from sys.columns col
join sys.types typ
on col.system_type_id = typ.system_type_id AND col.user_type_id = typ.user_type_id
LEFT join sys.index_columns ic
ON ic.object_id = col.object_id AND col.column_id = ic.column_id
LEFT join sys.indexes i
ON i.object_id = ic.object_id AND i.index_id = ic.index_id
LEFT JOIN sys.syscomments SM ON col.default_object_id = SM.id
where col.object_id = object_id(codegen.QNAME(@SchemaName) + '.' + codegen.QNAME(@TableName))
and col.name NOT IN (SELECT value COLLATE Latin1_General_CI_AS FROM STRING_SPLIT(@IgnoredColumns, ','))
)
GO
GO
DROP FUNCTION IF EXISTS
codegen.GetPkColumns
GO
CREATE FUNCTION
codegen.GetPkColumns(@SchemaName sysname, @TableName sysname)
RETURNS TABLE
AS RETURN (
select * FROM codegen.GetTableColumns(@SchemaName, @TableName,'','')
where IsPK = 1
)
GO
DROP FUNCTION IF EXISTS
codegen.GetTableDefinition
GO
CREATE FUNCTION
codegen.GetTableDefinition(@SchemaName sysname, @TableName sysname, @JsonColumns nvarchar(max), @IgnoredColumns nvarchar(max))
RETURNS TABLE
AS RETURN (
select * FROM codegen.GetTableColumns(@SchemaName, @TableName,@JsonColumns,@IgnoredColumns)
where IsDataColumn = 1
)
GO
GO
DROP FUNCTION IF EXISTS codegen.GetOpenJsonSchema
GO
CREATE FUNCTION codegen.GetOpenJsonSchema (@SchemaName sysname, @TableName sysname, @JsonColumns nvarchar(max), @IgnoredColumns nvarchar(max), @WithPk bit = 0)
RETURNS NVARCHAR(MAX)
AS
BEGIN
DECLARE @JsonSchema NVARCHAR(MAX) = '';
with columns as (
select ColumnId, ColumnName, ColumnType, StringSize, IsJson, Mode
from codegen.GetTableDefinition(@SchemaName, @TableName, @JsonColumns, @IgnoredColumns)
union all
select ColumnId, ColumnName, ColumnType, StringSize, 0 as IsJson, 'strict $.' as Mode
from codegen.GetPkColumns(@SchemaName, @TableName)
where @WithPk = 1
)
SELECT @JsonSchema =
@JsonSchema + '
' + codegen.QNAME(ColumnName) + ' ' + ColumnType + StringSize +
IIF(ISNULL(SESSION_CONTEXT(N'CODEGEN:EXPLICIT.JSON.PATH'),'no')='yes',
(' N''' + Mode + codegen.JSON_ESCAPE(ColumnName) +'''' +IIF(IsJson>0, ' AS JSON', '') + ',' ),
IIF(codegen.JSON_ESCAPE(ColumnName) <> codegen.QNAME(ColumnName) OR CHARINDEX('strict', Mode)>0,
(' N''' + Mode + codegen.JSON_ESCAPE(ColumnName) +'''' +IIF(IsJson>0, ' AS JSON', '') + ',' ),
IIF(IsJson>0, ' AS JSON', '') + ','))
from columns
order by ColumnId;
RETURN @JsonSchema
END
GO
DROP FUNCTION IF EXISTS
codegen.GenerateJsonCreateProcedure
GO
CREATE FUNCTION
codegen.GenerateJsonCreateProcedure(@ProcSchemaName sysname, @SchemaName sysname, @TableName sysname, @JsonColumns nvarchar(max), @IgnoredColumns nvarchar(max))
RETURNS NVARCHAR(MAX)
AS BEGIN
declare @JsonParam sysname = '@'+@TableName+'Json'
declare @JsonSchema nvarchar(max) = codegen.GetOpenJsonSchema (@SchemaName, @TableName, @JsonColumns, @IgnoredColumns, 0);
-- Generate list of column names ordered by columnid
declare @TableSchema nvarchar(max) = '';
select @TableSchema = @TableSchema + codegen.QNAME(ColumnName) + ','
from codegen.GetTableDefinition(@SchemaName, @TableName, @JsonColumns, @IgnoredColumns)
order by ColumnId
SET @TableSchema = SUBSTRING(@TableSchema, 0, LEN(@TableSchema)) --> remove last comma
-- Generate list of column names ordered by columnid
declare @OutputPks nvarchar(max) = '';
select @OutputPks = @OutputPks + ' INSERTED.'+ codegen.QNAME(ColumnName) + ','
from codegen.GetPkColumns(@SchemaName, @TableName)
order by ColumnId
SET @OutputPks = SUBSTRING(@OutputPks, 0, LEN(@OutputPks)) --> remove last comma
declare @Result nvarchar(max) =
N'GO
DROP PROCEDURE IF EXISTS ' + codegen.QNAME( @ProcSchemaName) + '.' + codegen.QNAME('Insert' + @TableName + 'FromJson') + '
GO
CREATE PROCEDURE ' + codegen.QNAME( @ProcSchemaName) + '.' + codegen.QNAME('Insert' + @TableName + 'FromJson') + '(' + @JsonParam + ' NVARCHAR(MAX))
WITH EXECUTE AS OWNER
AS BEGIN
' +
codegen.GenerateProcedureHead(@TableName, @JsonParam)
+
' INSERT INTO ' + codegen.QNAME( @SchemaName) + '.' + codegen.QNAME(@TableName) + '(' + @TableSchema + ')
OUTPUT ' + @OutputPks + '
SELECT ' + @TableSchema + '
FROM OPENJSON(' + @JsonParam + ')
WITH (' + @JsonSchema + ')' +
codegen.GenerateProcedureTail(@TableName)
+
'
END'
RETURN REPLACE(@Result,',)',')')
END
GO
GO
DROP FUNCTION IF EXISTS
codegen.GenerateJsonUpdateProcedure
GO
CREATE FUNCTION
codegen.GenerateJsonUpdateProcedure(@ProcSchemaName sysname, @SchemaName sysname, @TableName sysname, @JsonColumns nvarchar(max), @IgnoredColumns nvarchar(max))
RETURNS NVARCHAR(MAX)
AS BEGIN
declare @JsonParam sysname = '@'+@TableName+'Json'
declare @JsonSchema nvarchar(max) = codegen.GetOpenJsonSchema (@SchemaName, @TableName, @JsonColumns, @IgnoredColumns, 1);
-- Generate list of column names ordered by columnid
declare @TableSchema nvarchar(max) = '';
select @TableSchema = @TableSchema + CHAR(10) + ' ' + codegen.QNAME(ColumnName) + ' = json.' + codegen.QNAME(ColumnName) + ','
from codegen.GetTableDefinition(@SchemaName, @TableName, @JsonColumns, @IgnoredColumns)
order by ColumnId
SET @TableSchema = SUBSTRING(@TableSchema, 0, LEN(@TableSchema)) --> remove last comma
-- Generate list of column names ordered by columnid
declare @RowFilter nvarchar(max) = '';
select @RowFilter = @RowFilter + CHAR(10) + ' '+ codegen.QNAME( @SchemaName) + '.' + codegen.QNAME(@TableName) +'.' + codegen.QNAME(ColumnName) + ' = json.' + codegen.QNAME(ColumnName) + ','
from codegen.GetPkColumns(@SchemaName, @TableName)
order by ColumnId
SET @RowFilter = SUBSTRING(@RowFilter, 0, LEN(@RowFilter)) --> remove last comma
declare @Result nvarchar(max) =
N'GO
DROP PROCEDURE IF EXISTS ' + codegen.QNAME( @ProcSchemaName) + '.' + codegen.QNAME('Update' + @TableName + 'FromJson') + '
GO
CREATE PROCEDURE ' + codegen.QNAME( @ProcSchemaName) + '.' + codegen.QNAME('Update' + @TableName + 'FromJson') +'(' + @JsonParam + ' NVARCHAR(MAX))
WITH EXECUTE AS OWNER
AS BEGIN' +
codegen.GenerateProcedureHead(@TableName, @JsonParam)
+
' UPDATE ' + codegen.QNAME( @SchemaName) + '.' + codegen.QNAME(@TableName) + ' SET' + @TableSchema + '
FROM OPENJSON(' + @JsonParam + ')
WITH (' + @JsonSchema + ') as json
WHERE ' + @RowFilter + '
' +
codegen.GenerateProcedureTail(@TableName)
+
'
END'
RETURN REPLACE(@Result,',)',')')
END
GO
GO
DROP FUNCTION IF EXISTS
codegen.GenerateJsonRetrieveProcedure
GO
CREATE FUNCTION
codegen.GenerateJsonRetrieveProcedure(@ProcSchemaName sysname, @SchemaName sysname, @TableName sysname, @JsonColumns nvarchar(max), @IgnoredColumns nvarchar(max))
RETURNS NVARCHAR(MAX)
AS BEGIN
declare @Columns nvarchar(max) = '';
with all_columns(ColumnId, ColumnName, ColumnType, StringSize, IsJson, Mode) AS(
select ColumnId, ColumnName, ColumnType, StringSize, IsJson, Mode from codegen.GetTableDefinition(@SchemaName, @TableName, @JsonColumns, @IgnoredColumns)
union all
select ColumnId, ColumnName, ColumnType, StringSize, 0 as IsJson, 'strict $.' as Mode from codegen.GetPkColumns(@SchemaName, @TableName)
)
select @Columns = @Columns + codegen.QNAME(ColumnName) + ','-- + ColumnType + StringSize --+
-- ' N''' + Mode + '"' + STRING_ESCAPE(ColumnName, 'json') + '"''' +IIF(IsJson>0, ' AS JSON', '') + ','
from all_columns
order by ColumnId
set @Columns = SUBSTRING(@Columns, 0, LEN(@Columns))
-- Generate list of column names ordered by columnid
declare @Parameters nvarchar(max) = '';
select @Parameters = @Parameters + '@' + ColumnName + ' ' + ColumnType + ','
from codegen.GetPkColumns(@SchemaName, @TableName)
order by ColumnId
-- Generate list of column names ordered by columnid
declare @RowFilter nvarchar(max) = '';
select @RowFilter = @RowFilter + codegen.QNAME( @SchemaName) + '.' + codegen.QNAME(@TableName) + '.' + codegen.QNAME(ColumnName) + ' = @' + ColumnName + ' AND '
from codegen.GetPkColumns(@SchemaName, @TableName)
order by ColumnId
SET @RowFilter = SUBSTRING(@RowFilter, -3, LEN(@RowFilter)) --> remove last comma
declare @Result nvarchar(max) =
N'GO
DROP FUNCTION IF EXISTS ' + codegen.QNAME( @ProcSchemaName) + '.' + codegen.QNAME('Retrieve' + @TableName + 'AsJson') + '
GO
CREATE FUNCTION ' + codegen.QNAME( @ProcSchemaName) + '.' + codegen.QNAME('Retrieve' + @TableName + 'AsJson') + '(' + @Parameters + ')
RETURNS NVARCHAR(MAX)
AS BEGIN
RETURN( SELECT ' + @Columns + '
FROM ' + codegen.QNAME( @SchemaName) + '.' + codegen.QNAME(@TableName) + '
WHERE ' + @RowFilter + '
FOR JSON PATH, WITHOUT_ARRAY_WRAPPER)
END'
RETURN REPLACE(@Result,',)',')')
END
GO
GO
DROP FUNCTION IF EXISTS
codegen.GenerateJsonDeleteProcedure
GO
CREATE FUNCTION
codegen.GenerateJsonDeleteProcedure(@ProcSchemaName sysname, @SchemaName sysname, @TableName sysname, @JsonColumns nvarchar(max), @IgnoredColumns nvarchar(max))
RETURNS NVARCHAR(MAX)
AS BEGIN
declare @Columns nvarchar(max) = '';
with all_columns(ColumnId, ColumnName, ColumnType, StringSize, IsJson, Mode) AS(
select ColumnId, ColumnName, ColumnType, StringSize, IsJson, Mode from codegen.GetTableDefinition(@SchemaName, @TableName, @JsonColumns, @IgnoredColumns)
union all
select ColumnId, ColumnName, ColumnType, StringSize, 0 as IsJson, 'strict $.' as Mode from codegen.GetPkColumns(@SchemaName, @TableName)
)
select @Columns = @Columns + codegen.QNAME(ColumnName) + ','
from all_columns
order by ColumnId
-- Generate list of column names ordered by columnid
declare @Parameters nvarchar(max) = '';
select @Parameters = @Parameters + '@' + ColumnName + ' ' + ColumnType + ','
from codegen.GetPkColumns(@SchemaName, @TableName)
order by ColumnId
-- Generate list of column names ordered by columnid
declare @RowFilter nvarchar(max) = '';
select @RowFilter = @RowFilter + codegen.QNAME( @SchemaName) + '.' + codegen.QNAME(@TableName) + '.' + codegen.QNAME(ColumnName) + ' = @' + ColumnName + ' AND '
from codegen.GetPkColumns(@SchemaName, @TableName)
order by ColumnId
SET @RowFilter = SUBSTRING(@RowFilter, -3, LEN(@RowFilter)) --> remove last comma
declare @Result nvarchar(max) =
N'GO
DROP PROCEDURE IF EXISTS ' + codegen.QNAME( @SchemaName) + '.' + codegen.QNAME('Delete' + @TableName) + '
GO
CREATE PROCEDURE ' + codegen.QNAME( @SchemaName) + '.' + codegen.QNAME('Delete' + @TableName) + '(' + @Parameters + ')
WITH EXECUTE AS OWNER
AS BEGIN
DELETE ' + codegen.QNAME( @SchemaName) + '.' + codegen.QNAME(@TableName) + '
WHERE ' + @RowFilter + '
END'
RETURN REPLACE(@Result,',)',')')
END
GO
GO
DROP FUNCTION IF EXISTS
codegen.GenerateJsonUpsertProcedure
GO
CREATE FUNCTION
codegen.GenerateJsonUpsertProcedure(@ProcSchemaName sysname, @SchemaName sysname, @TableName sysname, @JsonColumns nvarchar(max), @IgnoredColumns nvarchar(max))
RETURNS NVARCHAR(MAX)
AS BEGIN
declare @JsonParam sysname = '@'+@TableName+'Json'
declare @JsonSchema nvarchar(max) = codegen.GetOpenJsonSchema (@SchemaName, @TableName, @JsonColumns, @IgnoredColumns, 1);
-- Generate list of column names ordered by columnid
declare @TableSchema nvarchar(max) = '';
select @TableSchema = @TableSchema + CHAR(10) + ' ' + codegen.QNAME(ColumnName) + ','
from codegen.GetTableDefinition(@SchemaName, @TableName, @JsonColumns, @IgnoredColumns)
order by ColumnId
SET @TableSchema = SUBSTRING(@TableSchema, 0, LEN(@TableSchema)) --> remove last comma
-- Generate list of column names ordered by columnid
declare @TableSchemaWithAlias nvarchar(max) = '';
select @TableSchemaWithAlias = @TableSchemaWithAlias + CHAR(10) + ' json.' + codegen.QNAME(ColumnName) + ','
from codegen.GetTableDefinition(@SchemaName, @TableName, @JsonColumns, @IgnoredColumns)
order by ColumnId
SET @TableSchemaWithAlias = SUBSTRING(@TableSchemaWithAlias, 0, LEN(@TableSchemaWithAlias)) --> remove last comma
declare @TableUpdateColumns nvarchar(max) = '';
select @TableUpdateColumns = @TableUpdateColumns + CHAR(10) + ' ' + codegen.QNAME(ColumnName) + ' = json.' + codegen.QNAME(ColumnName) + ','
from codegen.GetTableDefinition(@SchemaName, @TableName, @JsonColumns, @IgnoredColumns)
order by ColumnId
SET @TableUpdateColumns = SUBSTRING(@TableUpdateColumns, 0, LEN(@TableUpdateColumns)) --> remove last comma
-- Generate list of column names ordered by columnid
declare @RowFilter nvarchar(max) = '';
declare @PkColumns nvarchar(max) = '';
declare @PkColumnsAndTypes nvarchar(max) = '';
select
@PkColumns = @PkColumns + 'INSERTED.' + codegen.QNAME(ColumnName) + ',',
@PkColumnsAndTypes = @PkColumnsAndTypes + codegen.QNAME(ColumnName) + ' INT,',
@RowFilter = @RowFilter + CHAR(10) + ' '+ codegen.QNAME( @SchemaName) + '.' + codegen.QNAME(@TableName) +'.' + codegen.QNAME(ColumnName) + ' = json.' + codegen.QNAME(ColumnName) + ','
from codegen.GetPkColumns(@SchemaName, @TableName)
order by ColumnId
SET @PkColumns = SUBSTRING(@PkColumns, 0, LEN(@PkColumns)) --> remove last comma
SET @PkColumnsAndTypes = SUBSTRING(@PkColumnsAndTypes, 0, LEN(@PkColumnsAndTypes)) --> remove last comma
SET @RowFilter = SUBSTRING(@RowFilter, 0, LEN(@RowFilter)) --> remove last comma
declare @Result nvarchar(max) =
N'GO
DROP PROCEDURE IF EXISTS ' + codegen.QNAME( @ProcSchemaName) + '.' + codegen.QNAME('Upsert' + @TableName + 'FromJson') + '
GO
CREATE PROCEDURE ' + codegen.QNAME( @ProcSchemaName) + '.' + codegen.QNAME('Upsert' + @TableName + 'FromJson') +'(' + @JsonParam + ' NVARCHAR(MAX))
WITH EXECUTE AS OWNER
AS BEGIN
' +
codegen.GenerateProcedureHead(@TableName, @JsonParam)
+
'MERGE INTO ' + codegen.QNAME( @SchemaName) + '.' + codegen.QNAME(@TableName) + '
USING ( SELECT *
FROM OPENJSON(' + @JsonParam + ')
WITH (' + @JsonSchema + ')) as json
ON (' + @RowFilter + ')
WHEN MATCHED THEN
UPDATE SET' + @TableUpdateColumns +
'
WHEN NOT MATCHED THEN
INSERT (' + @TableSchema + ')
VALUES (' + @TableSchemaWithAlias + ');' +
-- OUTPUT ' + @PkColumns + '
-- INTO @ChildRows;
--' +
codegen.GenerateProcedureTail(@TableName)
+
'
END'
RETURN REPLACE(@Result,',)',')')
END
GO |
-- Your SQL goes here
CREATE TABLE levels (
id SERIAL PRIMARY KEY,
user_id BIGINT NOT NULL,
guild_id BIGINT NOT NULL,
msg_all_time BIGINT NOT NULL,
msg_month BIGINT NOT NULL,
msg_week BIGINT NOT NULL,
msg_day BIGINT NOT NULL,
last_msg TIMESTAMP NOT NULL
)
|
<gh_stars>10-100
ALTER TABLE lti_mapping MODIFY ( matchpattern VARCHAR2(255) );
ALTER TABLE lti_mapping MODIFY ( launch VARCHAR2(255) );
ALTER TABLE lti_content MODIFY ( title VARCHAR2(255) );
ALTER TABLE lti_tools MODIFY ( title VARCHAR2(255) );
ALTER TABLE lti_tools MODIFY ( launch VARCHAR2(1024) );
ALTER TABLE lti_tools MODIFY ( consumerkey VARCHAR2(255) );
ALTER TABLE lti_tools MODIFY ( secret VARCHAR2(255) );
|
<reponame>treason258/TrePHP
INSERT INTO timeline_content (type, date_start, date_end, content, remark, remark2) VALUES (1, "150620", "150622", "河北秦皇岛", "北戴河&南戴河", "端午节");
INSERT INTO timeline_content (type, date_start, date_end, content, remark, remark2) VALUES (1, "160609", "160610", "北京怀柔", "青龙峡&雁栖湖", "端午节");
INSERT INTO timeline_content (type, date_start, date_end, content, remark, remark2) VALUES (1, "170423", "170423", "山东日照", "花仙子海景基地", "结婚照");
INSERT INTO timeline_content (type, date_start, date_end, content, remark, remark2) VALUES (1, "170524", "170525", "山东济南", "宽厚里&泉城广场", "结婚旅行");
INSERT INTO timeline_content (type, date_start, date_end, content, remark, remark2) VALUES (1, "171001", "171004", "山东青岛", "崂山&八大处&五四广场", "国庆节");
INSERT INTO timeline_content (type, date_start, date_end, content, remark, remark2) VALUES (1, "180901", "180901", "北京平谷", "石林峡&金海湖", "放假");
INSERT INTO timeline_content (type, date_start, date_end, content, remark, remark2) VALUES (1, "181002", "181004", "江苏南京", "森林音乐节&夫子庙", "国庆节");
INSERT INTO timeline_content (type, date_start, date_end, content, remark, remark2) VALUES (1, "181004", "181007", "江苏苏州", "山塘街&阳澄湖&太湖&上海", "国庆节");
INSERT INTO timeline_content (type, date_start, date_end, content, remark, remark2) VALUES (1, "190405", "190406", "北京密云", "古北水镇&圣泉山", "清明节");
INSERT INTO timeline_content (type, date_start, date_end, content, remark, remark2) VALUES (1, "190601", "190601", "北京大兴", "北京野生动物园", "儿童节");
INSERT INTO timeline_content (type, date_start, date_end, content, remark, remark2) VALUES (1, "190913", "190916", "山东烟台", "烟台山&蓬莱阁&养马岛", "中秋节");
INSERT INTO timeline_content (type, date_start, date_end, content, remark, remark2) VALUES (1, "200930", "201003", "广东广州", "沙面&珠江", "国庆节");
INSERT INTO timeline_content (type, date_start, date_end, content, remark, remark2) VALUES (1, "201003", "201006", "福建厦门", "五缘湾&沙坡尾&鼓浪屿", "国庆节");
INSERT INTO timeline_content (type, date_start, date_end, content, remark, remark2) VALUES (1, "201223", "201227", "重庆市区", "三层马路&鹅岭二厂&洪崖洞&长江索道", "圣诞节");
INSERT INTO timeline_content (type, date_start, date_end, content, remark, remark2) VALUES (2, "170715", "170716", "河北承德", "丰宁坝上草原", "-");
INSERT INTO timeline_content (type, date_start, date_end, content, remark, remark2) VALUES (2, "170903", "170904", "河北保定", "白洋淀景区", "-");
INSERT INTO timeline_content (type, date_start, date_end, content, remark, remark2) VALUES (2, "180420", "180420", "北京怀柔", "黄花城水长城", "-");
INSERT INTO timeline_content (type, date_start, date_end, content, remark, remark2) VALUES (2, "180517", "180518", "陕西西安", "-", "-");
INSERT INTO timeline_content (type, date_start, date_end, content, remark, remark2) VALUES (2, "180523", "180524", "陕西西安", "-", "-");
INSERT INTO timeline_content (type, date_start, date_end, content, remark, remark2) VALUES (2, "180623", "180624", "山东烟台", "海边&文经学院", "-");
INSERT INTO timeline_content (type, date_start, date_end, content, remark, remark2) VALUES (2, "180630", "180701", "山东泰安", "泰山", "-");
INSERT INTO timeline_content (type, date_start, date_end, content, remark, remark2) VALUES (2, "180707", "180707", "北京怀柔", "青龙峡&蹦极", "-");
INSERT INTO timeline_content (type, date_start, date_end, content, remark, remark2) VALUES (2, "180728", "180728", "北京房山", "十渡&蹦极", "-");
INSERT INTO timeline_content (type, date_start, date_end, content, remark, remark2) VALUES (2, "190124", "190127", "山东烟台", "大炮婚礼&招远&温泉", "-");
INSERT INTO timeline_content (type, date_start, date_end, content, remark, remark2) VALUES (2, "191130", "190201", "河北张家口", "崇礼云顶乐园&滑雪", "-"); |
CREATE TABLE [dbo].[Comments]
(
[CommentsID] [bigint] NOT NULL,
[ObjectType] [char] (3) COLLATE Chinese_PRC_CI_AS NOT NULL,
[FK_ObjectID] [bigint] NULL,
[UserName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL,
[Email] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL,
[ParentCommentID] [bigint] NOT NULL,
[GoodCount] [int] NOT NULL,
[MiddleCount] [int] NOT NULL,
[BadCount] [int] NOT NULL,
[Contents] [nvarchar] (2000) COLLATE Chinese_PRC_CI_AS NULL,
[VerifyState] [char] (3) COLLATE Chinese_PRC_CI_AS NOT NULL,
[Remark] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL,
[FK_MerchantID] [bigint] NOT NULL CONSTRAINT [DF__tmp_ms_xx__FK_Me__338A9CD5] DEFAULT ((0)),
[FK_MerchantAppID] [bigint] NOT NULL CONSTRAINT [DF__tmp_ms_xx__FK_Me__347EC10E] DEFAULT ((0)),
[RecordState] [char] (1) COLLATE Chinese_PRC_CI_AS NOT NULL,
[CreateTime] [datetime] NOT NULL,
[CreaterID] [bigint] NOT NULL,
[CreaterName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL,
[UpdateTime] [datetime] NOT NULL,
[UpdaterID] [bigint] NOT NULL,
[UpdaterName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL
) ON [PRIMARY]
ALTER TABLE [dbo].[Comments] ADD
CONSTRAINT [PK_COMMENTS] PRIMARY KEY CLUSTERED ([CommentsID]) ON [PRIMARY]
CREATE NONCLUSTERED INDEX [IX_ObjectType] ON [dbo].[Comments] ([ObjectType]) ON [PRIMARY]
CREATE NONCLUSTERED INDEX [IX_FK_MerchantID] ON [dbo].[Comments] ([FK_MerchantID]) ON [PRIMARY]
GO
EXEC sp_addextendedproperty N'MS_Description', '评论表', 'SCHEMA', N'dbo', 'TABLE', N'Comments', NULL, NULL
GO
EXEC sp_addextendedproperty N'MS_Description', '点【差】数', 'SCHEMA', N'dbo', 'TABLE', N'Comments', 'COLUMN', N'BadCount'
GO
EXEC sp_addextendedproperty N'MS_Description', 'CommentsID', 'SCHEMA', N'dbo', 'TABLE', N'Comments', 'COLUMN', N'CommentsID'
GO
EXEC sp_addextendedproperty N'MS_Description', '评论内容', 'SCHEMA', N'dbo', 'TABLE', N'Comments', 'COLUMN', N'Contents'
GO
EXEC sp_addextendedproperty N'MS_Description', '创建者ID', 'SCHEMA', N'dbo', 'TABLE', N'Comments', 'COLUMN', N'CreaterID'
GO
EXEC sp_addextendedproperty N'MS_Description', '创建者名', 'SCHEMA', N'dbo', 'TABLE', N'Comments', 'COLUMN', N'CreaterName'
GO
EXEC sp_addextendedproperty N'MS_Description', '创建时间', 'SCHEMA', N'dbo', 'TABLE', N'Comments', 'COLUMN', N'CreateTime'
GO
EXEC sp_addextendedproperty N'MS_Description', '评论者电子邮件', 'SCHEMA', N'dbo', 'TABLE', N'Comments', 'COLUMN', N'Email'
GO
EXEC sp_addextendedproperty N'MS_Description', '所属应用号', 'SCHEMA', N'dbo', 'TABLE', N'Comments', 'COLUMN', N'FK_MerchantAppID'
GO
EXEC sp_addextendedproperty N'MS_Description', '所属商户号', 'SCHEMA', N'dbo', 'TABLE', N'Comments', 'COLUMN', N'FK_MerchantID'
GO
EXEC sp_addextendedproperty N'MS_Description', '被评论对象ID', 'SCHEMA', N'dbo', 'TABLE', N'Comments', 'COLUMN', N'FK_ObjectID'
GO
EXEC sp_addextendedproperty N'MS_Description', '点【好】数', 'SCHEMA', N'dbo', 'TABLE', N'Comments', 'COLUMN', N'GoodCount'
GO
EXEC sp_addextendedproperty N'MS_Description', '点【中】数', 'SCHEMA', N'dbo', 'TABLE', N'Comments', 'COLUMN', N'MiddleCount'
GO
EXEC sp_addextendedproperty N'MS_Description', '被评论对象类别(ObjectTypeEnum)', 'SCHEMA', N'dbo', 'TABLE', N'Comments', 'COLUMN', N'ObjectType'
GO
EXEC sp_addextendedproperty N'MS_Description', '上级评论', 'SCHEMA', N'dbo', 'TABLE', N'Comments', 'COLUMN', N'ParentCommentID'
GO
EXEC sp_addextendedproperty N'MS_Description', '记录状态(RecordStateEnum)', 'SCHEMA', N'dbo', 'TABLE', N'Comments', 'COLUMN', N'RecordState'
GO
EXEC sp_addextendedproperty N'MS_Description', '备注', 'SCHEMA', N'dbo', 'TABLE', N'Comments', 'COLUMN', N'Remark'
GO
EXEC sp_addextendedproperty N'MS_Description', '更新人ID', 'SCHEMA', N'dbo', 'TABLE', N'Comments', 'COLUMN', N'UpdaterID'
GO
EXEC sp_addextendedproperty N'MS_Description', '更新人名', 'SCHEMA', N'dbo', 'TABLE', N'Comments', 'COLUMN', N'UpdaterName'
GO
EXEC sp_addextendedproperty N'MS_Description', '更新时间', 'SCHEMA', N'dbo', 'TABLE', N'Comments', 'COLUMN', N'UpdateTime'
GO
EXEC sp_addextendedproperty N'MS_Description', '评论者名', 'SCHEMA', N'dbo', 'TABLE', N'Comments', 'COLUMN', N'UserName'
GO
EXEC sp_addextendedproperty N'MS_Description', '审核状态(VerifyStateEnum)', 'SCHEMA', N'dbo', 'TABLE', N'Comments', 'COLUMN', N'VerifyState'
GO
|
<gh_stars>0
# --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table bio (
id bigserial not null,
flora varchar(255),
fauna varchar(255),
contaminacionagua varchar(255),
contaminacionacustica varchar(255),
recomendacion varchar(255),
calidad_id bigint,
departamento_id bigint,
municipio_id bigint,
constraint pk_bio primary key (id)
);
create table calidad (
id bigserial not null,
nombre varchar(255),
constraint pk_calidad primary key (id)
);
create table departamento (
id bigserial not null,
nombre varchar(255),
constraint pk_departamento primary key (id)
);
create table municipio (
id bigserial not null,
nombre varchar(255),
constraint pk_municipio primary key (id)
);
alter table bio add constraint fk_bio_calidad_id foreign key (calidad_id) references calidad (id) on delete restrict on update restrict;
create index ix_bio_calidad_id on bio (calidad_id);
alter table bio add constraint fk_bio_departamento_id foreign key (departamento_id) references departamento (id) on delete restrict on update restrict;
create index ix_bio_departamento_id on bio (departamento_id);
alter table bio add constraint fk_bio_municipio_id foreign key (municipio_id) references municipio (id) on delete restrict on update restrict;
create index ix_bio_municipio_id on bio (municipio_id);
# --- !Downs
alter table if exists bio drop constraint if exists fk_bio_calidad_id;
drop index if exists ix_bio_calidad_id;
alter table if exists bio drop constraint if exists fk_bio_departamento_id;
drop index if exists ix_bio_departamento_id;
alter table if exists bio drop constraint if exists fk_bio_municipio_id;
drop index if exists ix_bio_municipio_id;
drop table if exists bio cascade;
drop table if exists calidad cascade;
drop table if exists departamento cascade;
drop table if exists municipio cascade;
|
<filename>src/example_generated_sql/example_predict_query.sql
# Copyright 2021 Google LLC.
#
# Licensed under the Apache 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.apache.org/licenses/LICENSE-2.0
#
# 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.
-- Build predict dataset for a machine learning model to predict LTV.
-- @param days_lookback INT The number of days to look back to create features.
-- @param customer_id_column STRING The column containing the customer ID.
-- @param date_column STRING The column containing the transaction date.
-- @param value_column STRING The column containing the value column.
-- @param features_sql STRING The SQL for the features and transformations.
WITH
WindowDate AS (
SELECT DATE(MAX(date)) as date
FROM my_project.my_dataset.my_table
),
CustomerWindows AS (
SELECT
CAST(TX_DATA.customer_id AS STRING) AS customer_id,
WindowDate.date AS window_date,
DATE_SUB((WindowDate.date), INTERVAL 365 day) AS lookback_start,
DATE_ADD((WindowDate.date), INTERVAL 1 day) AS lookahead_start,
DATE_ADD((WindowDate.date), INTERVAL 365 day) AS lookahead_stop
FROM my_project.my_dataset.my_table AS TX_DATA
CROSS JOIN WindowDate
GROUP BY 1, 2, 3, 4
)
SELECT
CustomerWindows.*,
IFNULL(
DATE_DIFF(CustomerWindows.window_date, MAX(DATE(TX_DATA.date)), DAY),
365) AS days_since_last_transaction,
IFNULL(
DATE_DIFF(CustomerWindows.window_date, MIN(DATE(TX_DATA.date)), DAY),
365) AS days_since_first_transaction,
COUNT(*) AS count_transactions,
MIN(numeric_column) AS min_numeric_column,
MAX(numeric_column) AS max_numeric_column,
SUM(numeric_column) AS sum_numeric_column,
AVG(numeric_column) AS avg_numeric_column,
MIN(value) AS min_value,
MAX(value) AS max_value,
SUM(value) AS sum_value,
AVG(value) AS avg_value,
MIN(CAST(bool_column AS INT)) AS min_bool_column,
MAX(CAST(bool_column AS INT)) AS max_bool_column,
SUM(CAST(bool_column AS INT)) AS sum_bool_column,
AVG(CAST(bool_column AS INT)) AS avg_bool_column,
TRIM(STRING_AGG(DISTINCT categorical_column, " " ORDER BY categorical_column)) AS categorical_column,
TRIM(STRING_AGG(DISTINCT text_column, " " ORDER BY text_column)) AS text_column
FROM
CustomerWindows
JOIN
my_project.my_dataset.my_table AS TX_DATA
ON (
CAST(TX_DATA.customer_id AS STRING) = CustomerWindows.customer_id
AND DATE(TX_DATA.date)
BETWEEN CustomerWindows.lookback_start
AND DATE(CustomerWindows.window_date))
GROUP BY
1, 2, 3, 4, 5;
|
<filename>sql/associated_accessions.sql
create table associated_accessions (
associated_accession_id serial primary key,
hgnc text,
tx_ac text,
gene_id integer,
pro_ac text,
origin text not null,
added timestamp with time zone not null default now()
);
create index associated_accessions_hgnc on associated_accessions(hgnc);
create index associated_accessions_tx_ac on associated_accessions(tx_ac);
create index associated_accessions_pro_ac on associated_accessions(pro_ac);
create unique index unique_pair_in_origin on associated_accessions(origin,tx_ac,pro_ac);
comment on table associated_accessions is 'transcript-protein accession pairs associated in source databases';
|
-- Rename pfRules to ofPfRules
ALTER TABLE pfRules DROP CONSTRAINT pfRules_id;
ALTER TABLE pfRules RENAME TO ofPfRules;
ALTER TABLE ofPfRules ADD CONSTRAINT ofPfRules_id PRIMARY KEY(id);
UPDATE ofVersion set version=2 where name='packetfilter';
|
<gh_stars>10-100
//// CHANGE name=change0
CREATE TABLE table486 (
id integer NOT NULL,
field1 character varying(30),
usertype2field usertype2,
usertype1field usertype1,
usertype6field usertype6
);
GO
//// CHANGE name=change1
ALTER TABLE ONLY table486
ADD CONSTRAINT table486_pkey PRIMARY KEY (id);
GO
|
/*
RETURN TagKey SINGLE
ID NVARCHAR(36) NOT
KeyValue NVARCHAR(255) NOT
*/
DROP PROCEDURE IF EXISTS `GetTagKeyByKey`;
CREATE PROCEDURE `GetTagKeyByKey` (_KeyValue NVARCHAR(255))
#BEGIN#
SELECT
T.Id,
T.KeyValue
FROM TagKey T
WHERE T.KeyValue = _KeyValue; |
-- USE ctsi_dropper_s;
-- Store database modification log
CREATE TABLE Version (
verID varchar(255) NOT NULL DEFAULT '',
verStamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
verInfo text NOT NULL,
PRIMARY KEY (verID)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO Version (verID, verInfo)
VALUES('001', 'New table: Version')
;
SHOW TABLES;
SELECT * FROM Version;
|
<gh_stars>1-10
drop table if exists t1,t_d_1,t_d_2,c,bb;
create table t_d_1(i int);
create table t_d_2(i int);
create table t1 (a int, b int);
insert into t1 values(1,2),(3,4);
insert into t_d_1
WITH cte AS
(
select count(distinct a) from t1 group by a with rollup
) select * from cte;
insert into t_d_2
WITH cte AS
(
select count(distinct a) from t1 group by a with rollup
) select * from cte;
replace into t_d_1
WITH cte AS
(
select count(distinct a) from t1 group by a with rollup
) select * from cte;
replace into t_d_2
WITH cte AS
(
select count(distinct a) from t1 group by a with rollup
) select * from cte;
select * from t_d_1 order by 1;
select * from t_d_2 order by 1;
WITH cte AS
(
select count(distinct b) from t1 group by a with rollup
)
delete t_d_1 from t_d_1,t_d_2 where t_d_1.i=t_d_2.i and t_d_1.i <=(select count(*) from cte);
create table c(
col_varchar_10_key character varying(10),
col_int integer,
col_int_key integer,
col_varchar_10 character varying(10),
col_varchar_1024_key character varying(1024),
pk integer primary key,
col_varchar_1024 character varying(1024));
create table bb(
col_int_key integer,
col_varchar_1024 character varying(1024),
col_varchar_10_key character varying(10),
col_varchar_1024_key character varying(1024),
pk integer primary key,
col_int integer,
col_varchar_10 character varying(10));
CREATE INDEX col_varchar_10_key_idx ON c (col_varchar_10_key);
CREATE INDEX col_int_key_idx ON c (col_int_key);
CREATE INDEX col_varchar_1024_key_idx ON c (col_varchar_1024_key);
CREATE INDEX col_int_key_idx ON bb (col_int_key);
CREATE INDEX col_varchar_10_key_idx ON bb (col_varchar_10_key);
CREATE INDEX col_varchar_1024_key_idx ON bb (col_varchar_1024_key);
insert into c values('w',1494482944,89653248,NULL,'t',1,'l');
insert into c values('h',-2015756288,1371078656,'v',NULL,2,'m');
insert into c values('n',49741824,-515833856,'k','d',3,'a');
insert into c values(NULL,-818413568,19645,'e',NULL,4,'p');
insert into c values('t',NULL,11013,'z','w',5,'h');
insert into c values('e',-1151074304,13683,'t','r',6,'p');
insert into c values(NULL,-261226496,-2848,'e','j',7,NULL);
with mycte as
(
SELECT COUNT(DISTINCT OUTR.col_int ) AS X FROM c AS OUTR
WHERE OUTR.col_varchar_1024_key IN ( SELECT INNR.col_varchar_10 AS Y FROM bb AS INNR WHERE INNR.col_int IS NULL )
AND OUTR.col_int_key > 5 AND OUTR.col_varchar_10_key <> 'l'
) select * from mycte order by 1;
insert into t_d_1 select rownum from db_root connect by level<=5;
insert into t_d_2 select rownum from db_root connect by level<=5;
with mycte as
(
SELECT COUNT(DISTINCT OUTR.col_int ) AS X FROM c AS OUTR
WHERE OUTR.col_varchar_1024_key IN ( SELECT INNR.col_varchar_10 AS Y FROM bb AS INNR WHERE INNR.col_int IS NULL )
AND OUTR.col_int_key > 5 AND OUTR.col_varchar_10_key <> 'l'
) delete t_d_1 from t_d_1,t_d_2 where t_d_1.i=t_d_2.i and t_d_1.i <=(select X from mycte);
select * from t_d_1 order by 1;
--CBRD-20849
with mycte as
(
SELECT COUNT(DISTINCT OUTR.col_int ) AS X FROM c AS OUTR
WHERE OUTR.col_varchar_1024_key IN ( SELECT INNR.col_varchar_10 AS Y FROM bb AS INNR WHERE INNR.col_int IS NULL )
AND OUTR.col_int_key > 5 AND OUTR.col_varchar_10_key <> 'l'
GROUP BY OUTR.col_int WITH ROLLUP
HAVING X <= 8 ORDER BY OUTR.col_int , OUTR.pk
) select * from mycte order by 1;
--CBRD-20849
with mycte as
(
SELECT COUNT(DISTINCT OUTR.col_int ) AS X FROM c AS OUTR
WHERE OUTR.col_varchar_1024_key IN ( SELECT INNR.col_varchar_10 AS Y FROM bb AS INNR WHERE INNR.col_int IS NULL )
AND OUTR.col_int_key > 5 AND OUTR.col_varchar_10_key <> 'l'
GROUP BY OUTR.col_int WITH ROLLUP
HAVING X <= 8 ORDER BY OUTR.col_int , OUTR.pk
) update t_d_2 set i=2 where i=1;
select * from t_d_2 order by 1;
with mycte as
(
SELECT COUNT(DISTINCT OUTR.col_int ) AS X FROM c AS OUTR
WHERE OUTR.col_varchar_1024_key IN ( SELECT INNR.col_varchar_10 AS Y FROM bb AS INNR WHERE INNR.col_int IS NULL )
AND OUTR.col_int_key > 5 AND OUTR.col_varchar_10_key <> 'l'
GROUP BY OUTR.col_int WITH ROLLUP
) update t_d_2 set i=2 where i=1;
select * from t_d_2 order by 1;
--CBRD-20849
WITH cte AS
(
SELECT COUNT(DISTINCT OUTR.col_int ) AS X FROM c AS OUTR
WHERE OUTR.col_varchar_1024_key IN ( SELECT INNR.col_varchar_10 AS Y FROM bb AS INNR WHERE INNR.col_int IS NULL )
AND OUTR.col_int_key > 5 AND OUTR.col_varchar_10_key <> 'l'
GROUP BY OUTR.col_int WITH ROLLUP
HAVING X <= 8 ORDER BY OUTR.col_int , OUTR.pk
)delete t_d_1 from t_d_1,t_d_2 where t_d_1.i=t_d_2.i and t_d_1.i <=(select count(*) from cte);
select * from t_d_1 order by 1;
drop table if exists t1,c,bb,t_d_1,t_d_2;
|
SELECT b.EMPLID
, ACAD_CAREER
, INSTITUTION
, b.STRM
, CLASS_NBR
, CRSE_CAREER
, SESSION_CODE
, SESSN_ENRL_CNTL
, STDNT_ENRL_STATUS
, ENRL_STATUS_REASON
, ENRL_ACTION_LAST
, ENRL_ACTN_RSN_LAST
, ENRL_ACTN_PRC_LAST
, STATUS_DT
, ENRL_ADD_DT
, ENRL_DROP_DT
, UNT_TAKEN
, UNT_PRGRSS
, UNT_PRGRSS_FA
, UNT_BILLING
, CRSE_COUNT
, GRADING_BASIS_ENRL
, GRADING_BASIS_DT
, OVRD_GRADING_BASIS
, CRSE_GRADE_OFF
, CRSE_GRADE_INPUT
, GRADE_DT
, REPEAT_CODE
, REPEAT_DT
, CLASS_PRMSN_NBR
, ASSOCIATED_CLASS
, STDNT_POSITIN
, AUDIT_GRADE_BASIS
, EARN_CREDIT
, INCLUDE_IN_GPA
, UNITS_ATTEMPTED
, GRADE_POINTS
, GRADE_POINTS_FA
, GRD_PTS_PER_UNIT
, MANDATORY_GRD_BAS
, RSRV_CAP_NBR
, INSTRUCTOR_ID
, DROP_CLASS_IF_ENRL
, OPRID
, NOTIFY_STDNT_CHNG
, REPEAT_CANDIDATE
, VALID_ATTEMPT
, GRADE_CATEGORY
, SEL_GROUP
, UNT_EARNED
, LAST_UPD_DT_STMP
, LAST_UPD_TM_STMP
, LAST_ENRL_DT_STMP
, LAST_ENRL_TM_STMP
, LAST_DROP_DT_STMP
, LAST_DROP_TM_STMP
, ENRL_REQ_SOURCE
, LAST_UPD_ENREQ_SRC
, GRADING_SCHEME_ENR
, RELATE_CLASS_NBR_1
, RELATE_CLASS_NBR_2
, ACAD_PROG
FROM (--IMPLICIT POPULATION FILTER
SELECT EMPLID
, MAX(a.STRM) AS STRM
FROM PS_STDNT_CAR_TERM a
JOIN PS_TERM_TBL b
ON b.STRM = a.STRM
AND a.ACAD_CAREER = b.ACAD_CAREER
AND a.INSTITUTION = b.INSTITUTION
WHERE 1=1
AND a.INSTITUTION = ''
GROUP BY EMPLID
----HISTORICAL FILTER
--HAVING Max(a.STRM) >= '2008' --Update to Fall 2003 term
----ROLLING FILTER, MODIFY -### for TIME WINDOW
HAVING MAX(b.TERM_END_DT) >= SYSDATE-365
) population
JOIN PS_STDNT_ENRL b
ON b.EMPLID = population.EMPLID
WHERE 1=1
AND b.INSTITUTION = ''
ORDER BY b.EMPLID, b.STRM |
<filename>database/Fructose.Database/scripts/fructose.sql
PRINT 'Running DDL Pre-Process...'
GO
/*
* ###########################################################
* Create the database
* ###########################################################
*/
IF EXISTS (SELECT * FROM sys.databases WHERE name = N'Fructose')
BEGIN
DROP DATABASE [Fructose]
END
GO
CREATE DATABASE [Fructose]
GO
ALTER DATABASE [Fructose] SET READ_COMMITTED_SNAPSHOT ON;
GO
USE [Fructose]
GO
/*
* ###########################################################
* Create a procedure to assist with the build script
* ###########################################################
*/
CREATE PROCEDURE [dbo].[spDropTable] (@schemaName VARCHAR(255), @tableName VARCHAR(255))
AS
BEGIN
DECLARE @SQL VARCHAR(MAX);
IF OBJECT_ID(@schemaName + '.' + @tableName, 'U') IS NOT NULL
BEGIN
SET @SQL = 'DROP TABLE [' + @schemaName + '].[' + @tableName + ']'
EXEC (@SQL);
PRINT 'SUCCESS: Dropped Table [' + @schemaName + '].[' + @tableName + ']'
END
ELSE
BEGIN
PRINT 'INFO: Table [' + @schemaName + '].[' + @tableName + '] not found. Skipping Drop statement'
END
END
GO
PRINT 'Complete'
GO
USE [Fructose]
GO
PRINT 'Running DDL Process...'
GO
/*
* ###########################################################
* Drop tables if they exist
* ###########################################################
*/
EXEC [dbo].[spDropTable] 'dbo', 'PersonPhone'
EXEC [dbo].[spDropTable] 'dbo', 'PhoneHistory'
EXEC [dbo].[spDropTable] 'dbo', 'Phone'
EXEC [dbo].[spDropTable] 'dbo', 'PhoneType'
EXEC [dbo].[spDropTable] 'dbo', 'PersonEmail'
EXEC [dbo].[spDropTable] 'dbo', 'EmailHistory'
EXEC [dbo].[spDropTable] 'dbo', 'Email'
EXEC [dbo].[spDropTable] 'dbo', 'EmailType'
EXEC [dbo].[spDropTable] 'dbo', 'PersonAddress'
EXEC [dbo].[spDropTable] 'dbo', 'AddressHistory'
EXEC [dbo].[spDropTable] 'dbo', 'Address'
EXEC [dbo].[spDropTable] 'dbo', 'AddressType'
EXEC [dbo].[spDropTable] 'dbo', 'CustomerAttribute'
EXEC [dbo].[spDropTable] 'dbo', 'CustomerAttributeType'
EXEC [dbo].[spDropTable] 'dbo', 'CustomerEvent'
EXEC [dbo].[spDropTable] 'dbo', 'CustomerEventType'
EXEC [dbo].[spDropTable] 'dbo', 'CustomerSearch'
EXEC [dbo].[spDropTable] 'dbo', 'CustomerSearchTermType'
EXEC [dbo].[spDropTable] 'dbo', 'CustomerNote'
EXEC [dbo].[spDropTable] 'dbo', 'CustomerNoteType'
EXEC [dbo].[spDropTable] 'dbo', 'CustomerHistory'
EXEC [dbo].[spDropTable] 'dbo', 'Customer'
EXEC [dbo].[spDropTable] 'dbo', 'CustomerType'
EXEC [dbo].[spDropTable] 'dbo', 'CustomerStatus'
EXEC [dbo].[spDropTable] 'dbo', 'PersonHistory'
EXEC [dbo].[spDropTable] 'dbo', 'Person'
GO
/*
* ###########################################################
* Settings
* ###########################################################
*/
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
SET ANSI_PADDING ON
GO
/*
* ###########################################################
* CREATE - Person
* ###########################################################
*/
CREATE TABLE [dbo].[Person](
[ID] [bigint] IDENTITY(1,1) NOT NULL,
[FirstName] [varchar](100) NOT NULL,
[LastName] [varchar](100) NOT NULL,
[IsActive] [bit] NOT NULL,
[CreatedBy] [varchar](100) NOT NULL,
[CreatedDate] [datetime] NOT NULL,
[ModifiedBy] [varchar](100) NULL,
[ModifiedDate] [datetime] NULL,
[RowVersion] [rowversion] NOT NULL,
CONSTRAINT [PKC__Person__ID] PRIMARY KEY CLUSTERED
(
[ID]
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Person] ADD CONSTRAINT [DF__Person__CreatedBy]
DEFAULT (suser_sname()) FOR [CreatedBy]
GO
ALTER TABLE [dbo].[Person] ADD CONSTRAINT [DF__Person__CreatedDate]
DEFAULT (getutcdate()) FOR [CreatedDate]
GO
ALTER TABLE [dbo].[Person] ADD CONSTRAINT [DF__Person__IsActive]
DEFAULT 1 FOR [IsActive]
GO
CREATE NONCLUSTERED INDEX IX__Person__FirstName
ON [dbo].[Person] (FirstName)
GO
CREATE NONCLUSTERED INDEX IX__Person__LastName
ON [dbo].[Person] (LastName)
GO
/*
* ###########################################################
* CREATE - PersonHistory
* ###########################################################
*/
CREATE TABLE [dbo].[PersonHistory](
[ID] [bigint] IDENTITY(1,1) NOT NULL,
[PersonID] [bigint] NOT NULL,
[FirstName] [varchar](100) NOT NULL,
[LastName] [varchar](100) NOT NULL,
[IsActive] [bit] NOT NULL,
[CreatedBy] [varchar](100) NOT NULL,
[CreatedDate] [datetime] NOT NULL,
CONSTRAINT [PKC__PersonHistory__ID] PRIMARY KEY CLUSTERED
(
[ID]
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[PersonHistory] ADD CONSTRAINT [DF__PersonHistory__CreatedBy]
DEFAULT (suser_sname()) FOR [CreatedBy]
GO
ALTER TABLE [dbo].[PersonHistory] ADD CONSTRAINT [DF__PersonHistory__CreatedDate]
DEFAULT (getutcdate()) FOR [CreatedDate]
GO
ALTER TABLE [dbo].[PersonHistory] WITH CHECK ADD CONSTRAINT [FKN__PersonHistory__PersonID] FOREIGN KEY([PersonID])
REFERENCES [dbo].[Person] ([ID])
GO
ALTER TABLE [dbo].[PersonHistory] CHECK CONSTRAINT [FKN__PersonHistory__PersonID]
GO
/*
* ###########################################################
* CREATE - CustomerStatus
* ###########################################################
*/
CREATE TABLE [dbo].[CustomerStatus](
[ID] [int] IDENTITY(1,1) NOT NULL,
[Name] [varchar](100) NOT NULL,
[SubStatusName] [varchar](100) NULL,
[Description] [varchar](4000) NOT NULL,
[Code] [varchar](50) NOT NULL,
[DisplayName] [varchar](100) NOT NULL,
[DisplayOrder] [int] NULL,
[IsActive] [bit] NOT NULL,
[CreatedBy] [varchar](100) NOT NULL,
[CreatedDate] [datetime] NOT NULL,
[ModifiedBy] [varchar](100) NULL,
[ModifiedDate] [datetime] NULL,
[RowVersion] [rowversion] NOT NULL,
CONSTRAINT [PKC__CustomerStatus__ID] PRIMARY KEY CLUSTERED
(
[ID]
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],
CONSTRAINT [UKC__CustomerStatus__Code] UNIQUE NONCLUSTERED
(
[Code]
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],
CONSTRAINT [UKC__CustomerStatus__Name__SubStatusName] UNIQUE NONCLUSTERED
(
[Name],
[SubStatusName]
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CustomerStatus] ADD CONSTRAINT [DF__CustomerStatus__CreatedBy]
DEFAULT (suser_sname()) FOR [CreatedBy]
GO
ALTER TABLE [dbo].[CustomerStatus] ADD CONSTRAINT [DF__CustomerStatus__CreatedDate]
DEFAULT (getutcdate()) FOR [CreatedDate]
GO
ALTER TABLE [dbo].[CustomerStatus] ADD CONSTRAINT [DF__CustomerStatus__IsActive]
DEFAULT 1 FOR [IsActive]
GO
CREATE NONCLUSTERED INDEX IX__CustomerStatus__Name
ON [dbo].[CustomerStatus] (Name)
GO
CREATE NONCLUSTERED INDEX IX__CustomerStatus__SubStatusName
ON [dbo].[CustomerStatus] (SubStatusName)
GO
CREATE NONCLUSTERED INDEX IX__CustomerStatus__Code
ON [dbo].[CustomerStatus] (Code)
GO
/*
* ###########################################################
* CREATE - CustomerType
* ###########################################################
*/
CREATE TABLE [dbo].[CustomerType](
[ID] [int] IDENTITY(1,1) NOT NULL,
[Name] [varchar](100) NOT NULL,
[Description] [varchar](4000) NOT NULL,
[Code] [varchar](50) NOT NULL,
[DisplayName] [varchar](100) NOT NULL,
[DisplayOrder] [int] NULL,
[IsActive] [bit] NOT NULL,
[CreatedBy] [varchar](100) NOT NULL,
[CreatedDate] [datetime] NOT NULL,
[ModifiedBy] [varchar](100) NULL,
[ModifiedDate] [datetime] NULL,
[RowVersion] [rowversion] NOT NULL,
CONSTRAINT [PKC__CustomerType__ID] PRIMARY KEY CLUSTERED
(
[ID]
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],
CONSTRAINT [UKC__CustomerType__Name] UNIQUE NONCLUSTERED
(
[Name]
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],
CONSTRAINT [UKC__CustomerType__Code] UNIQUE NONCLUSTERED
(
[Code]
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CustomerType] ADD CONSTRAINT [DF__CustomerType__CreatedBy]
DEFAULT (suser_sname()) FOR [CreatedBy]
GO
ALTER TABLE [dbo].[CustomerType] ADD CONSTRAINT [DF__CustomerType__CreatedDate]
DEFAULT (getutcdate()) FOR [CreatedDate]
GO
ALTER TABLE [dbo].[CustomerType] ADD CONSTRAINT [DF__CustomerType__IsActive]
DEFAULT 1 FOR [IsActive]
GO
CREATE NONCLUSTERED INDEX IX__CustomerType__Name
ON [dbo].[CustomerType] (Name)
GO
CREATE NONCLUSTERED INDEX IX__CustomerType__Code
ON [dbo].[CustomerType] (Code)
GO
/*
* ###########################################################
* CREATE - Customer
* ###########################################################
*/
CREATE TABLE [dbo].[Customer](
[ID] [bigint] IDENTITY(1,1) NOT NULL,
[OrganizationID] [bigint] NOT NULL,
[PersonID] [bigint] NOT NULL,
[CustomerStatusID] [int] NOT NULL,
[CustomerTypeID] [int] NOT NULL,
[CustomerNumber] [varchar] (50) NOT NULL,
[JoinDate] [datetime] NOT NULL,
[IsActive] [bit] NOT NULL,
[ReferenceIdentifier] [varchar](100) NULL,
[CreatedBy] [varchar](100) NOT NULL,
[CreatedDate] [datetime] NOT NULL,
[ModifiedBy] [varchar](100) NULL,
[ModifiedDate] [datetime] NULL,
[RowVersion] [rowversion] NOT NULL,
CONSTRAINT [PKC__Customer__ID] PRIMARY KEY CLUSTERED
(
[ID]
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],
CONSTRAINT [UKC__Customer__PersonID] UNIQUE NONCLUSTERED
(
[PersonID]
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],
CONSTRAINT [UKC__Customer__ReferenceIdentifier] UNIQUE NONCLUSTERED
(
[ReferenceIdentifier]
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Customer] ADD CONSTRAINT [DF__Customer__CreatedBy]
DEFAULT (suser_sname()) FOR [CreatedBy]
GO
ALTER TABLE [dbo].[Customer] ADD CONSTRAINT [DF__Customer__CreatedDate]
DEFAULT (getutcdate()) FOR [CreatedDate]
GO
ALTER TABLE [dbo].[Customer] ADD CONSTRAINT [DF__Customer__JoinDate]
DEFAULT (getutcdate()) FOR [JoinDate]
GO
ALTER TABLE [dbo].[Customer] ADD CONSTRAINT [DF__Customer__IsActive]
DEFAULT 1 FOR [IsActive]
GO
ALTER TABLE [dbo].[Customer] WITH CHECK ADD CONSTRAINT [FKN__Customer__PersonID] FOREIGN KEY([PersonID])
REFERENCES [dbo].[Person] ([ID])
GO
ALTER TABLE [dbo].[Customer] CHECK CONSTRAINT [FKN__Customer__PersonID]
GO
ALTER TABLE [dbo].[Customer] WITH CHECK ADD CONSTRAINT [FKN__Customer__CustomerStatusID] FOREIGN KEY([CustomerStatusID])
REFERENCES [dbo].[CustomerStatus] ([ID])
GO
ALTER TABLE [dbo].[Customer] CHECK CONSTRAINT [FKN__Customer__CustomerStatusID]
GO
ALTER TABLE [dbo].[Customer] WITH CHECK ADD CONSTRAINT [FKN__Customer__CustomerTypeID] FOREIGN KEY([CustomerTypeID])
REFERENCES [dbo].[CustomerType] ([ID])
GO
ALTER TABLE [dbo].[Customer] CHECK CONSTRAINT [FKN__Customer__CustomerTypeID]
GO
CREATE NONCLUSTERED INDEX IX__Customer__ReferenceIdentifier
ON [dbo].[Customer] (ReferenceIdentifier)
GO
/*
* ###########################################################
* CREATE - CustomerHistory
* ###########################################################
*/
CREATE TABLE [dbo].[CustomerHistory](
[ID] [bigint] IDENTITY(1,1) NOT NULL,
[CustomerID] [bigint] NOT NULL,
[OrganizationID] [bigint] NOT NULL,
[PersonID] [bigint] NOT NULL,
[CustomerStatusID] [int] NOT NULL,
[CustomerTypeID] [int] NOT NULL,
[CustomerNumber] [varchar] (100) NOT NULL,
[JoinDate] [datetime] NOT NULL,
[IsActive] [bit] NOT NULL,
[ReferenceIdentifier] [varchar](100) NULL,
[CreatedBy] [varchar](100) NOT NULL,
[CreatedDate] [datetime] NOT NULL,
CONSTRAINT [PKC__CustomerHistory__ID] PRIMARY KEY CLUSTERED
(
[ID]
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CustomerHistory] ADD CONSTRAINT [DF__CustomerHistory__CreatedBy]
DEFAULT (suser_sname()) FOR [CreatedBy]
GO
ALTER TABLE [dbo].[CustomerHistory] ADD CONSTRAINT [DF__CustomerHistory__CreatedDate]
DEFAULT (getutcdate()) FOR [CreatedDate]
GO
ALTER TABLE [dbo].[CustomerHistory] WITH CHECK ADD CONSTRAINT [FKN__CustomerHistory__CustomerID] FOREIGN KEY([CustomerID])
REFERENCES [dbo].[Customer] ([ID])
GO
ALTER TABLE [dbo].[CustomerHistory] CHECK CONSTRAINT [FKN__CustomerHistory__CustomerID]
GO
/*
* ###########################################################
* CREATE - CustomerNoteType
* ###########################################################
*/
CREATE TABLE [dbo].[CustomerNoteType](
[ID] [int] IDENTITY(1,1) NOT NULL,
[Name] [varchar](100) NOT NULL,
[Description] [varchar](4000) NOT NULL,
[DisplayName] [varchar](100) NOT NULL,
[DisplayOrder] [int] NULL,
[IsActive] [bit] NOT NULL,
[CreatedBy] [varchar](100) NOT NULL,
[CreatedDate] [datetime] NOT NULL,
[ModifiedBy] [varchar](100) NULL,
[ModifiedDate] [datetime] NULL,
[RowVersion] [rowversion] NOT NULL,
CONSTRAINT [PKC__CustomerNoteType__ID] PRIMARY KEY CLUSTERED
(
[ID]
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],
CONSTRAINT [UKC__CustomerNoteType__Name] UNIQUE NONCLUSTERED
(
[Name]
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CustomerNoteType] ADD CONSTRAINT [DF__CustomerNoteType__CreatedBy]
DEFAULT (suser_sname()) FOR [CreatedBy]
GO
ALTER TABLE [dbo].[CustomerNoteType] ADD CONSTRAINT [DF__CustomerNoteType__CreatedDate]
DEFAULT (getutcdate()) FOR [CreatedDate]
GO
ALTER TABLE [dbo].[CustomerNoteType] ADD CONSTRAINT [DF__CustomerNoteType__IsActive]
DEFAULT 1 FOR [IsActive]
GO
CREATE NONCLUSTERED INDEX IX__CustomerNote__Name
ON [dbo].[CustomerNoteType] (Name)
GO
/*
* ###########################################################
* CREATE - CustomerNote
* ###########################################################
*/
CREATE TABLE [dbo].[CustomerNote](
[ID] [bigint] IDENTITY(1,1) NOT NULL,
[CustomerID] [bigint] NOT NULL,
[CustomerNoteTypeID] [int] NOT NULL,
[Note] [varchar] (max) NOT NULL,
[IsSuppressed] [bit] NOT NULL,
[CreatedBy] [varchar](100) NOT NULL,
[CreatedDate] [datetime] NOT NULL,
[ModifiedBy] [varchar](100) NULL,
[ModifiedDate] [datetime] NULL,
[RowVersion] [rowversion] NOT NULL,
CONSTRAINT [PKC__CustomerNote__ID] PRIMARY KEY CLUSTERED
(
[ID]
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CustomerNote] ADD CONSTRAINT [DF__CustomerNote__CreatedBy]
DEFAULT (suser_sname()) FOR [CreatedBy]
GO
ALTER TABLE [dbo].[CustomerNote] ADD CONSTRAINT [DF__CustomerNotel__CreatedDate]
DEFAULT (getutcdate()) FOR [CreatedDate]
GO
ALTER TABLE [dbo].[CustomerNote] ADD CONSTRAINT [DF__CustomerNote__IsSuppressed]
DEFAULT 0 FOR [IsSuppressed]
GO
ALTER TABLE [dbo].[CustomerNote] WITH CHECK ADD CONSTRAINT [FKN__CustomerNote__CustomerID] FOREIGN KEY([CustomerID])
REFERENCES [dbo].[Customer] ([ID])
GO
ALTER TABLE [dbo].[CustomerNote] CHECK CONSTRAINT [FKN__CustomerNote__CustomerID]
GO
ALTER TABLE [dbo].[CustomerNote] WITH CHECK ADD CONSTRAINT [FKN__CustomerNote__CustomerNoteTypeID] FOREIGN KEY([CustomerNoteTypeID])
REFERENCES [dbo].[CustomerNoteType] ([ID])
GO
ALTER TABLE [dbo].[CustomerNote] CHECK CONSTRAINT [FKN__CustomerNote__CustomerNoteTypeID]
GO
/*
* ###########################################################
* CREATE - CustomerSearchTermType
* ###########################################################
*/
CREATE TABLE [dbo].[CustomerSearchTermType](
[ID] [int] IDENTITY(1,1) NOT NULL,
[Name] [varchar](100) NOT NULL,
[Description] [varchar](4000) NOT NULL,
[DisplayName] [varchar](100) NOT NULL,
[DisplayOrder] [int] NULL,
[IsActive] [bit] NOT NULL,
[CreatedBy] [varchar](100) NOT NULL,
[CreatedDate] [datetime] NOT NULL,
[ModifiedBy] [varchar](100) NULL,
[ModifiedDate] [datetime] NULL,
[RowVersion] [rowversion] NOT NULL,
CONSTRAINT [PKC__CustomerSearchTermType__ID] PRIMARY KEY CLUSTERED
(
[ID]
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],
CONSTRAINT [UKC__CustomerSearchTermType__Name] UNIQUE NONCLUSTERED
(
[Name]
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CustomerSearchTermType] ADD CONSTRAINT [DF__CustomerSearchTermType__CreatedBy]
DEFAULT (suser_sname()) FOR [CreatedBy]
GO
ALTER TABLE [dbo].[CustomerSearchTermType] ADD CONSTRAINT [DF__CustomerSearchTermType__CreatedDate]
DEFAULT (getutcdate()) FOR [CreatedDate]
GO
ALTER TABLE [dbo].[CustomerSearchTermType] ADD CONSTRAINT [DF__CustomerSearchTermType__IsActive]
DEFAULT 1 FOR [IsActive]
GO
CREATE NONCLUSTERED INDEX IX__CustomerSearchTermType__Name
ON [dbo].[CustomerSearchTermType] (Name)
GO
/*
* ###########################################################
* CREATE - CustomerSearch
* ###########################################################
*/
CREATE TABLE [dbo].[CustomerSearch](
[ID] [bigint] IDENTITY(1,1) NOT NULL,
[CustomerID] [bigint] NOT NULL,
[SearchTermTypeID] [int] NOT NULL,
[SearchTerm] [varchar](900) NOT NULL,
[CreatedBy] [varchar](100) NOT NULL,
[CreatedDate] [datetime] NOT NULL,
CONSTRAINT [PKC__CustomerSearch__ID] PRIMARY KEY NONCLUSTERED
(
[ID]
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CustomerSearch] ADD CONSTRAINT [DF__CustomerSearch__CreatedBy]
DEFAULT (suser_sname()) FOR [CreatedBy]
GO
ALTER TABLE [dbo].[CustomerSearch] ADD CONSTRAINT [DF__CustomerSearch__CreatedDate]
DEFAULT (getutcdate()) FOR [CreatedDate]
GO
ALTER TABLE [dbo].[CustomerSearch] WITH CHECK ADD CONSTRAINT [FKN__CustomerSearch__CustomerID] FOREIGN KEY([CustomerID])
REFERENCES [dbo].[Customer] ([ID])
GO
ALTER TABLE [dbo].[CustomerSearch] CHECK CONSTRAINT [FKN__CustomerSearch__CustomerID]
GO
ALTER TABLE [dbo].[CustomerSearch] WITH CHECK ADD CONSTRAINT [FKN__CustomerSearch__SearchTermTypeID] FOREIGN KEY([SearchTermTypeID])
REFERENCES [dbo].[CustomerSearchTermType] ([ID])
GO
ALTER TABLE [dbo].[CustomerSearch] CHECK CONSTRAINT [FKN__CustomerSearch__SearchTermTypeID]
GO
CREATE CLUSTERED INDEX IX__CustomerSearch__SearchTerm
ON [dbo].[CustomerSearch] (SearchTerm)
GO
/*
* ###########################################################
* CREATE - CustomerEventType
* ###########################################################
*/
CREATE TABLE [dbo].[CustomerEventType](
[ID] [int] IDENTITY(1,1) NOT NULL,
[Name] [varchar](100) NOT NULL,
[Description] [varchar](4000) NOT NULL,
[DisplayName] [varchar](100) NOT NULL,
[DisplayOrder] [int] NULL,
[IsActive] [bit] NOT NULL,
[CreatedBy] [varchar](100) NOT NULL,
[CreatedDate] [datetime] NOT NULL,
[ModifiedBy] [varchar](100) NULL,
[ModifiedDate] [datetime] NULL,
[RowVersion] [rowversion] NOT NULL,
CONSTRAINT [PKC__CustomerEventType__ID] PRIMARY KEY CLUSTERED
(
[ID]
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],
CONSTRAINT [UKC__CustomerEventType__Name] UNIQUE NONCLUSTERED
(
[Name]
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CustomerEventType] ADD CONSTRAINT [DF__CustomerEventType__CreatedBy]
DEFAULT (suser_sname()) FOR [CreatedBy]
GO
ALTER TABLE [dbo].[CustomerEventType] ADD CONSTRAINT [DF__CustomerEventType__CreatedDate]
DEFAULT (getutcdate()) FOR [CreatedDate]
GO
ALTER TABLE [dbo].[CustomerEventType] ADD CONSTRAINT [DF__CustomerEventType__IsActive]
DEFAULT 1 FOR [IsActive]
GO
CREATE NONCLUSTERED INDEX IX__CustomerEventType__Name
ON [dbo].[CustomerEventType] (Name)
GO
/*
* ###########################################################
* CREATE - CustomerEvent
* ###########################################################
*/
CREATE TABLE [dbo].[CustomerEvent](
[ID] [bigint] IDENTITY(1,1) NOT NULL,
[CustomerID] [bigint] NOT NULL,
[CustomerEventTypeID] [int] NOT NULL,
[EventDate] [datetime] NOT NULL,
[Notes] [varchar](max) NULL,
[IsSuppressed] [bit] NOT NULL,
[CreatedBy] [varchar](100) NOT NULL,
[CreatedDate] [datetime] NOT NULL,
[ModifiedBy] [varchar](100) NULL,
[ModifiedDate] [datetime] NULL,
[RowVersion] [rowversion] NOT NULL,
CONSTRAINT [PKC__CustomerEvent__ID] PRIMARY KEY CLUSTERED
(
[ID]
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CustomerEvent] ADD CONSTRAINT [DF__CustomerEvent__CreatedBy]
DEFAULT (suser_sname()) FOR [CreatedBy]
GO
ALTER TABLE [dbo].[CustomerEvent] ADD CONSTRAINT [DF__CustomerEvent__CreatedDate]
DEFAULT (getutcdate()) FOR [CreatedDate]
GO
ALTER TABLE [dbo].[CustomerEvent] ADD CONSTRAINT [DF__CustomerEvent__EventDate]
DEFAULT (getutcdate()) FOR [EventDate]
GO
ALTER TABLE [dbo].[CustomerEvent] ADD CONSTRAINT [DF__CustomerEvent__IsSuppressed]
DEFAULT 0 FOR [IsSuppressed]
GO
ALTER TABLE [dbo].[CustomerEvent] WITH CHECK ADD CONSTRAINT [FKN__CustomerEvent__CustomerID] FOREIGN KEY([CustomerID])
REFERENCES [dbo].[CustomerEvent] ([ID])
GO
ALTER TABLE [dbo].[CustomerEvent] CHECK CONSTRAINT [FKN__CustomerEvent__CustomerID]
GO
ALTER TABLE [dbo].[CustomerEvent] WITH CHECK ADD CONSTRAINT [FKN__CustomerEvent__CustomerEventTypeID] FOREIGN KEY([CustomerEventTypeID])
REFERENCES [dbo].[CustomerEventType] ([ID])
GO
ALTER TABLE [dbo].[CustomerEvent] CHECK CONSTRAINT [FKN__CustomerEvent__CustomerEventTypeID]
GO
/*
* ###########################################################
* CREATE - CustomerAttributeType
* ###########################################################
*/
CREATE TABLE [dbo].[CustomerAttributeType](
[ID] [int] IDENTITY(1,1) NOT NULL,
[Name] [varchar](100) NOT NULL,
[Description] [varchar](4000) NOT NULL,
[DisplayName] [varchar](100) NOT NULL,
[DisplayOrder] [int] NULL,
[IsValueEncrypted] [bit] NOT NULL,
[IsActive] [bit] NOT NULL,
[CreatedBy] [varchar](100) NOT NULL,
[CreatedDate] [datetime] NOT NULL,
[ModifiedBy] [varchar](100) NULL,
[ModifiedDate] [datetime] NULL,
[RowVersion] [rowversion] NOT NULL,
CONSTRAINT [PKC__CustomerAttributeType__ID] PRIMARY KEY CLUSTERED
(
[ID]
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],
CONSTRAINT [UKC__CustomerAttributeType__Name] UNIQUE NONCLUSTERED
(
[Name]
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CustomerAttributeType] ADD CONSTRAINT [DF__CustomerAttributeType__CreatedBy]
DEFAULT (suser_sname()) FOR [CreatedBy]
GO
ALTER TABLE [dbo].[CustomerAttributeType] ADD CONSTRAINT [DF__CustomerAttributeType__CreatedDate]
DEFAULT (getutcdate()) FOR [CreatedDate]
GO
ALTER TABLE [dbo].[CustomerAttributeType] ADD CONSTRAINT [DF__CustomerAttributeType__IsValueEncrypted]
DEFAULT 0 FOR [IsValueEncrypted]
GO
ALTER TABLE [dbo].[CustomerAttributeType] ADD CONSTRAINT [DF__CustomerAttributeType__IsActive]
DEFAULT 1 FOR [IsActive]
GO
CREATE NONCLUSTERED INDEX IX__CustomerEventType__Name
ON [dbo].[CustomerAttributeType] (Name)
GO
/*
* ###########################################################
* CREATE - CustomerAttribute
* ###########################################################
*/
CREATE TABLE [dbo].[CustomerAttribute](
[ID] [bigint] IDENTITY(1,1) NOT NULL,
[CustomerID] [bigint] NOT NULL,
[CustomerAttributeTypeID] [int] NOT NULL,
[AttributeValue] [varchar](4000) NOT NULL,
[CreatedBy] [varchar](100) NOT NULL,
[CreatedDate] [datetime] NOT NULL,
[ModifiedBy] [varchar](100) NULL,
[ModifiedDate] [datetime] NULL,
[RowVersion] [rowversion] NOT NULL,
CONSTRAINT [PKC__CustomerAttribute__ID] PRIMARY KEY CLUSTERED
(
[ID]
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CustomerAttribute] ADD CONSTRAINT [DF__CustomerAttribute__CreatedBy]
DEFAULT (suser_sname()) FOR [CreatedBy]
GO
ALTER TABLE [dbo].[CustomerAttribute] ADD CONSTRAINT [DF__CustomerAttribute__CreatedDate]
DEFAULT (getutcdate()) FOR [CreatedDate]
GO
ALTER TABLE [dbo].[CustomerAttribute] WITH CHECK ADD CONSTRAINT [FKN__CustomerAttribute__CustomerID] FOREIGN KEY([CustomerID])
REFERENCES [dbo].[Customer] ([ID])
GO
ALTER TABLE [dbo].[CustomerAttribute] CHECK CONSTRAINT [FKN__CustomerAttribute__CustomerID]
GO
ALTER TABLE [dbo].[CustomerAttribute] WITH CHECK ADD CONSTRAINT [FKN__CustomerAttributet__CustomerAttributeTypeID] FOREIGN KEY([CustomerAttributeTypeID])
REFERENCES [dbo].[CustomerAttributeType] ([ID])
GO
ALTER TABLE [dbo].[CustomerAttribute] CHECK CONSTRAINT [FKN__CustomerAttributet__CustomerAttributeTypeID]
GO
/*
* ###########################################################
* CREATE - AddressType
* ###########################################################
*/
CREATE TABLE [dbo].[AddressType](
[ID] [int] IDENTITY(1,1) NOT NULL,
[Name] [varchar](100) NOT NULL,
[Description] [varchar](4000) NOT NULL,
[DisplayName] [varchar](100) NOT NULL,
[DisplayOrder] [int] NULL,
[IsActive] [bit] NOT NULL,
[CreatedBy] [varchar](100) NOT NULL,
[CreatedDate] [datetime] NOT NULL,
[ModifiedBy] [varchar](100) NULL,
[ModifiedDate] [datetime] NULL,
[RowVersion] [rowversion] NOT NULL,
CONSTRAINT [PKC__AddressType__ID] PRIMARY KEY CLUSTERED
(
[ID]
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],
CONSTRAINT [UKC__AddressType__Name] UNIQUE NONCLUSTERED
(
[Name]
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AddressType] ADD CONSTRAINT [DF__AddressType__CreatedBy]
DEFAULT (suser_sname()) FOR [CreatedBy]
GO
ALTER TABLE [dbo].[AddressType] ADD CONSTRAINT [DF__AddressType__CreatedDate]
DEFAULT (getutcdate()) FOR [CreatedDate]
GO
ALTER TABLE [dbo].[AddressType] ADD CONSTRAINT [DF__AddressType__IsActive]
DEFAULT 1 FOR [IsActive]
GO
CREATE NONCLUSTERED INDEX IX__AddressType__Name
ON [dbo].[AddressType] (Name)
GO
/*
* ###########################################################
* CREATE - Address
* ###########################################################
*/
CREATE TABLE [dbo].[Address](
[ID] [bigint] IDENTITY(1,1) NOT NULL,
[AddressTypeID] [int] NOT NULL,
[GeographyID] [bigint] NULL,
[Line1] [varchar] (500) NOT NULL,
[Line2] [varchar] (500) NULL,
[Line3] [varchar] (500) NULL,
[City] [varchar] (200) NOT NULL,
[StateProv] [varchar] (2) NOT NULL,
[PostalCode] [varchar] (20) NOT NULL,
[CountryCode] [varchar] (2) NOT NULL,
[CreatedBy] [varchar](100) NOT NULL,
[CreatedDate] [datetime] NOT NULL,
[ModifiedBy] [varchar](100) NULL,
[ModifiedDate] [datetime] NULL,
[RowVersion] [rowversion] NOT NULL,
CONSTRAINT [PKC__Address__ID] PRIMARY KEY CLUSTERED
(
[ID]
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Address] ADD CONSTRAINT [DF__Address__CreatedBy]
DEFAULT (suser_sname()) FOR [CreatedBy]
GO
ALTER TABLE [dbo].[Address] ADD CONSTRAINT [DF__Address__CreatedDate]
DEFAULT (getutcdate()) FOR [CreatedDate]
GO
ALTER TABLE [dbo].[Address] WITH CHECK ADD CONSTRAINT [FKN__Address__AddressTypeID] FOREIGN KEY([AddressTypeID])
REFERENCES [dbo].[AddressType] ([ID])
GO
ALTER TABLE [dbo].[Address] CHECK CONSTRAINT [FKN__Address__AddressTypeID]
GO
CREATE NONCLUSTERED INDEX IX__Address__Line1
ON [dbo].[Address] (Line1)
GO
CREATE NONCLUSTERED INDEX IX__Address__City
ON [dbo].[Address] (City)
GO
CREATE NONCLUSTERED INDEX IX__Address__StateProv
ON [dbo].[Address] (StateProv)
GO
CREATE NONCLUSTERED INDEX IX__Address__PostalCode
ON [dbo].[Address] (PostalCode)
GO
CREATE NONCLUSTERED INDEX IX__Address__CountryCode
ON [dbo].[Address] (CountryCode)
GO
/*
* ###########################################################
* CREATE - AddressHistory
* ###########################################################
*/
CREATE TABLE [dbo].[AddressHistory](
[ID] [bigint] IDENTITY(1,1) NOT NULL,
[AddressID] [bigint] NOT NULL,
[AddressTypeID] [int] NOT NULL,
[GeographyID] [bigint] NULL,
[Line1] [varchar] (500) NOT NULL,
[Line2] [varchar] (500) NULL,
[Line3] [varchar] (500) NULL,
[City] [varchar] (200) NOT NULL,
[StateProv] [varchar] (2) NOT NULL,
[PostalCode] [varchar] (20) NOT NULL,
[CountryCode] [varchar] (2) NOT NULL,
[CreatedBy] [varchar](100) NOT NULL,
[CreatedDate] [datetime] NOT NULL,
CONSTRAINT [PKC__AddressHistory__ID] PRIMARY KEY CLUSTERED
(
[ID]
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AddressHistory] ADD CONSTRAINT [DF__AddressHistory__CreatedBy]
DEFAULT (suser_sname()) FOR [CreatedBy]
GO
ALTER TABLE [dbo].[AddressHistory] ADD CONSTRAINT [DF__AddressHistory__CreatedDate]
DEFAULT (getutcdate()) FOR [CreatedDate]
GO
ALTER TABLE [dbo].[AddressHistory] WITH CHECK ADD CONSTRAINT [FKN__AddressHistory__AddressID] FOREIGN KEY([AddressID])
REFERENCES [dbo].[Address] ([ID])
GO
ALTER TABLE [dbo].[AddressHistory] CHECK CONSTRAINT [FKN__AddressHistory__AddressID]
GO
/*
* ###########################################################
* CREATE - PersonAddress
* ###########################################################
*/
CREATE TABLE [dbo].[PersonAddress](
[ID] [bigint] IDENTITY(1,1) NOT NULL,
[PersonID] [bigint] NOT NULL,
[AddressID] [bigint] NOT NULL,
[IsPhysical] [bit] NOT NULL,
[IsShipping] [bit] NOT NULL,
[IsBilling] [bit] NOT NULL,
[IsActive] [bit] NOT NULL,
[CreatedBy] [varchar](100) NOT NULL,
[CreatedDate] [datetime] NOT NULL,
[ModifiedBy] [varchar](100) NULL,
[ModifiedDate] [datetime] NULL,
[RowVersion] [rowversion] NOT NULL,
CONSTRAINT [PKC__PersonAddress__ID] PRIMARY KEY CLUSTERED
(
[ID]
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[PersonAddress] ADD CONSTRAINT [DF__PersonAddress__CreatedBy]
DEFAULT (suser_sname()) FOR [CreatedBy]
GO
ALTER TABLE [dbo].[PersonAddress] ADD CONSTRAINT [DF__PersonAddress__CreatedDate]
DEFAULT (getutcdate()) FOR [CreatedDate]
GO
ALTER TABLE [dbo].[PersonAddress] ADD CONSTRAINT [DF__PersonAddress__IsPhysical]
DEFAULT 1 FOR [IsPhysical]
GO
ALTER TABLE [dbo].[PersonAddress] ADD CONSTRAINT [DF__PersonAddress__IsShipping]
DEFAULT 1 FOR [IsShipping]
GO
ALTER TABLE [dbo].[PersonAddress] ADD CONSTRAINT [DF__PersonAddress__IsBilling]
DEFAULT 1 FOR [IsBilling]
GO
ALTER TABLE [dbo].[PersonAddress] ADD CONSTRAINT [DF__PersonAddress__IsActive]
DEFAULT 1 FOR [IsActive]
GO
ALTER TABLE [dbo].[PersonAddress] WITH CHECK ADD CONSTRAINT [FKN__PersonAddress__PersonID] FOREIGN KEY([PersonID])
REFERENCES [dbo].[Person] ([ID])
GO
ALTER TABLE [dbo].[PersonAddress] CHECK CONSTRAINT [FKN__PersonAddress__PersonID]
GO
ALTER TABLE [dbo].[PersonAddress] WITH CHECK ADD CONSTRAINT [FKN__PersonAddress__AddressID] FOREIGN KEY([AddressID])
REFERENCES [dbo].[Address] ([ID])
GO
ALTER TABLE [dbo].[PersonAddress] CHECK CONSTRAINT [FKN__PersonAddress__AddressID]
GO
/*
* ###########################################################
* CREATE - EmailType
* ###########################################################
*/
CREATE TABLE [dbo].[EmailType](
[ID] [int] IDENTITY(1,1) NOT NULL,
[Name] [varchar](100) NOT NULL,
[Description] [varchar](4000) NOT NULL,
[DisplayName] [varchar](100) NOT NULL,
[DisplayOrder] [int] NULL,
[IsActive] [bit] NOT NULL,
[CreatedBy] [varchar](100) NOT NULL,
[CreatedDate] [datetime] NOT NULL,
[ModifiedBy] [varchar](100) NULL,
[ModifiedDate] [datetime] NULL,
[RowVersion] [rowversion] NOT NULL,
CONSTRAINT [PKC__EmailType__ID] PRIMARY KEY CLUSTERED
(
[ID]
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],
CONSTRAINT [UKC__EmailType__Name] UNIQUE NONCLUSTERED
(
[Name]
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[EmailType] ADD CONSTRAINT [DF__EmailType__CreatedBy]
DEFAULT (suser_sname()) FOR [CreatedBy]
GO
ALTER TABLE [dbo].[EmailType] ADD CONSTRAINT [DF__EmailType__CreatedDate]
DEFAULT (getutcdate()) FOR [CreatedDate]
GO
ALTER TABLE [dbo].[EmailType] ADD CONSTRAINT [DF__EmailType__IsActive]
DEFAULT 1 FOR [IsActive]
GO
CREATE NONCLUSTERED INDEX IX__EmailType__Name
ON [dbo].[EmailType] (Name)
GO
/*
* ###########################################################
* CREATE - Email
* ###########################################################
*/
CREATE TABLE [dbo].[Email](
[ID] [bigint] IDENTITY(1,1) NOT NULL,
[EmailTypeID] [int] NOT NULL,
[EmailAddress] [varchar] (500) NOT NULL,
[IsValidated] [bit] NULL,
[CreatedBy] [varchar](100) NOT NULL,
[CreatedDate] [datetime] NOT NULL,
[ModifiedBy] [varchar](100) NULL,
[ModifiedDate] [datetime] NULL,
[RowVersion] [rowversion] NOT NULL,
CONSTRAINT [PKC__Email__ID] PRIMARY KEY CLUSTERED
(
[ID]
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Email] ADD CONSTRAINT [DF__Email__CreatedBy]
DEFAULT (suser_sname()) FOR [CreatedBy]
GO
ALTER TABLE [dbo].[Email] ADD CONSTRAINT [DF__Email__CreatedDate]
DEFAULT (getutcdate()) FOR [CreatedDate]
ALTER TABLE [dbo].[Email] WITH CHECK ADD CONSTRAINT [FKN__Email__EmailTypeID] FOREIGN KEY([EmailTypeID])
REFERENCES [dbo].[EmailType] ([ID])
GO
ALTER TABLE [dbo].[Email] CHECK CONSTRAINT [FKN__Email__EmailTypeID]
GO
CREATE NONCLUSTERED INDEX IX__Email__EmailAddress
ON [dbo].[Email] (EmailAddress)
GO
/*
* ###########################################################
* CREATE - EmailHistory
* ###########################################################
*/
CREATE TABLE [dbo].[EmailHistory](
[ID] [bigint] IDENTITY(1,1) NOT NULL,
[EmailID] [bigint] NOT NULL,
[EmailTypeID] [int] NOT NULL,
[EmailAddress] [varchar] (500) NOT NULL,
[IsValidated] [bit] NULL,
[CreatedBy] [varchar](100) NOT NULL,
[CreatedDate] [datetime] NOT NULL,
CONSTRAINT [PKC__EmailHistory__ID] PRIMARY KEY CLUSTERED
(
[ID]
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[EmailHistory] ADD CONSTRAINT [DF__EmailHistory__CreatedBy]
DEFAULT (suser_sname()) FOR [CreatedBy]
GO
ALTER TABLE [dbo].[EmailHistory] ADD CONSTRAINT [DF__EmailHistory__CreatedDate]
DEFAULT (getutcdate()) FOR [CreatedDate]
GO
ALTER TABLE [dbo].[EmailHistory] WITH CHECK ADD CONSTRAINT [FKN__EmailHistory__EmailID] FOREIGN KEY([EmailID])
REFERENCES [dbo].[Email] ([ID])
GO
ALTER TABLE [dbo].[EmailHistory] CHECK CONSTRAINT [FKN__EmailHistory__EmailID]
GO
/*
* ###########################################################
* CREATE - PersonEmail
* ###########################################################
*/
CREATE TABLE [dbo].[PersonEmail](
[ID] [bigint] IDENTITY(1,1) NOT NULL,
[PersonID] [bigint] NOT NULL,
[EmailID] [bigint] NOT NULL,
[IsActive] [bit] NOT NULL,
[CreatedBy] [varchar](100) NOT NULL,
[CreatedDate] [datetime] NOT NULL,
[ModifiedBy] [varchar](100) NULL,
[ModifiedDate] [datetime] NULL,
[RowVersion] [rowversion] NOT NULL,
CONSTRAINT [PKC__PersonEmail__ID] PRIMARY KEY CLUSTERED
(
[ID]
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[PersonEmail] ADD CONSTRAINT [DF__PersonEmail__CreatedBy]
DEFAULT (suser_sname()) FOR [CreatedBy]
GO
ALTER TABLE [dbo].[PersonEmail] ADD CONSTRAINT [DF__PersonEmail__CreatedDate]
DEFAULT (getutcdate()) FOR [CreatedDate]
GO
ALTER TABLE [dbo].[PersonEmail] ADD CONSTRAINT [DF__PersonEmail__IsActive]
DEFAULT 1 FOR [IsActive]
GO
ALTER TABLE [dbo].[PersonEmail] WITH CHECK ADD CONSTRAINT [FKN__PersonEmail__PersonID] FOREIGN KEY([PersonID])
REFERENCES [dbo].[Person] ([ID])
GO
ALTER TABLE [dbo].[PersonEmail] CHECK CONSTRAINT [FKN__PersonEmail__PersonID]
GO
ALTER TABLE [dbo].[PersonEmail] WITH CHECK ADD CONSTRAINT [FKN__PersonEmail__EmailID] FOREIGN KEY([EmailID])
REFERENCES [dbo].[Email] ([ID])
GO
ALTER TABLE [dbo].[PersonEmail] CHECK CONSTRAINT [FKN__PersonEmail__EmailID]
GO
/*
* ###########################################################
* CREATE - PhoneType
* ###########################################################
*/
CREATE TABLE [dbo].[PhoneType](
[ID] [int] IDENTITY(1,1) NOT NULL,
[Name] [varchar](100) NOT NULL,
[Description] [varchar](4000) NOT NULL,
[DisplayName] [varchar](100) NOT NULL,
[DisplayOrder] [int] NULL,
[IsActive] [bit] NOT NULL,
[CreatedBy] [varchar](100) NOT NULL,
[CreatedDate] [datetime] NOT NULL,
[ModifiedBy] [varchar](100) NULL,
[ModifiedDate] [datetime] NULL,
[RowVersion] [rowversion] NOT NULL,
CONSTRAINT [PKC__PhoneType__ID] PRIMARY KEY CLUSTERED
(
[ID]
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],
CONSTRAINT [UKC__PhoneType__Name] UNIQUE NONCLUSTERED
(
[Name]
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[PhoneType] ADD CONSTRAINT [DF__PhoneType__CreatedBy]
DEFAULT (suser_sname()) FOR [CreatedBy]
GO
ALTER TABLE [dbo].[PhoneType] ADD CONSTRAINT [DF__PhoneType__CreatedDate]
DEFAULT (getutcdate()) FOR [CreatedDate]
GO
ALTER TABLE [dbo].[PhoneType] ADD CONSTRAINT [DF__PhoneType__IsActive]
DEFAULT 1 FOR [IsActive]
GO
CREATE NONCLUSTERED INDEX IX__PhoneType__Name
ON [dbo].[PhoneType] (Name)
GO
/*
* ###########################################################
* CREATE - Phone
* ###########################################################
*/
CREATE TABLE [dbo].[Phone](
[ID] [bigint] IDENTITY(1,1) NOT NULL,
[PhoneTypeID] [int] NOT NULL,
[PhoneNumber] [varchar] (50) NOT NULL,
[PhoneNumberNumeric] [varchar] (50) NOT NULL,
[IsValidated] [bit] NULL,
[CreatedBy] [varchar](100) NOT NULL,
[CreatedDate] [datetime] NOT NULL,
[ModifiedBy] [varchar](100) NULL,
[ModifiedDate] [datetime] NULL,
[RowVersion] [rowversion] NOT NULL,
CONSTRAINT [PKC__Phone__ID] PRIMARY KEY CLUSTERED
(
[ID]
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Phone] ADD CONSTRAINT [DF__Phone__CreatedBy]
DEFAULT (suser_sname()) FOR [CreatedBy]
GO
ALTER TABLE [dbo].[Phone] ADD CONSTRAINT [DF__Phone__CreatedDate]
DEFAULT (getutcdate()) FOR [CreatedDate]
ALTER TABLE [dbo].[Phone] WITH CHECK ADD CONSTRAINT [FKN__Phone__PhoneTypeID] FOREIGN KEY([PhoneTypeID])
REFERENCES [dbo].[PhoneType] ([ID])
GO
ALTER TABLE [dbo].[Phone] CHECK CONSTRAINT [FKN__Phone__PhoneTypeID]
GO
CREATE NONCLUSTERED INDEX IX__Phone__PhoneNumber
ON [dbo].[Phone] (PhoneNumber)
GO
/*
* ###########################################################
* CREATE - PhoneHistory
* ###########################################################
*/
CREATE TABLE [dbo].[PhoneHistory](
[ID] [bigint] IDENTITY(1,1) NOT NULL,
[PhoneID] [bigint] NOT NULL,
[PhoneTypeID] [int] NOT NULL,
[PhoneNumber] [varchar] (50) NOT NULL,
[IsValidated] [bit] NULL,
[CreatedBy] [varchar](100) NOT NULL,
[CreatedDate] [datetime] NOT NULL,
CONSTRAINT [PKC__PhoneHistory__ID] PRIMARY KEY CLUSTERED
(
[ID]
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[PhoneHistory] ADD CONSTRAINT [DF__PhoneHistory__CreatedBy]
DEFAULT (suser_sname()) FOR [CreatedBy]
GO
ALTER TABLE [dbo].[PhoneHistory] ADD CONSTRAINT [DF__PhoneHistory__CreatedDate]
DEFAULT (getutcdate()) FOR [CreatedDate]
GO
ALTER TABLE [dbo].[PhoneHistory] WITH CHECK ADD CONSTRAINT [FKN__PhoneHistory__PhoneID] FOREIGN KEY([PhoneID])
REFERENCES [dbo].[Phone] ([ID])
GO
ALTER TABLE [dbo].[PhoneHistory] CHECK CONSTRAINT [FKN__PhoneHistory__PhoneID]
GO
/*
* ###########################################################
* CREATE - PersonPhone
* ###########################################################
*/
CREATE TABLE [dbo].[PersonPhone](
[ID] [bigint] IDENTITY(1,1) NOT NULL,
[PersonID] [bigint] NOT NULL,
[PhoneID] [bigint] NOT NULL,
[IsActive] [bit] NOT NULL,
[CreatedBy] [varchar](100) NOT NULL,
[CreatedDate] [datetime] NOT NULL,
[ModifiedBy] [varchar](100) NULL,
[ModifiedDate] [datetime] NULL,
[RowVersion] [rowversion] NOT NULL,
CONSTRAINT [PKC__PersonPhone__ID] PRIMARY KEY CLUSTERED
(
[ID]
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[PersonPhone] ADD CONSTRAINT [DF__PersonPhone__CreatedBy]
DEFAULT (suser_sname()) FOR [CreatedBy]
GO
ALTER TABLE [dbo].[PersonPhone] ADD CONSTRAINT [DF__PersonPhone__CreatedDate]
DEFAULT (getutcdate()) FOR [CreatedDate]
GO
ALTER TABLE [dbo].[PersonPhone] ADD CONSTRAINT [DF__PersonPhone__IsActive]
DEFAULT 1 FOR [IsActive]
GO
ALTER TABLE [dbo].[PersonPhone] WITH CHECK ADD CONSTRAINT [FKN__PersonPhone__PersonID] FOREIGN KEY([PersonID])
REFERENCES [dbo].[Person] ([ID])
GO
ALTER TABLE [dbo].[PersonPhone] CHECK CONSTRAINT [FKN__PersonPhone__PersonID]
GO
ALTER TABLE [dbo].[PersonPhone] WITH CHECK ADD CONSTRAINT [FKN__PersonPhone__PhoneID] FOREIGN KEY([PhoneID])
REFERENCES [dbo].[Phone] ([ID])
GO
ALTER TABLE [dbo].[PersonPhone] CHECK CONSTRAINT [FKN__PersonPhone__PhoneID]
GO
PRINT 'Complete'
GO
USE [Fructose]
GO
PRINT 'Running DDL Post-Process...'
GO
CREATE VIEW [dbo].[vwPerson]
AS
SELECT
p.[ID]
, p.[FirstName]
, p.[LastName]
, p.[IsActive]
, p.[CreatedBy]
, p.[CreatedDate]
, p.[ModifiedBy]
, p.[ModifiedDate]
FROM [dbo].[Person] p (NOLOCK)
GO
CREATE VIEW [dbo].[vwCustomer]
AS
SELECT
c.[ID]
, c.[OrganizationID]
, c.[PersonID]
, c.[CustomerStatusID]
, c.[CustomerTypeID]
, c.[CustomerNumber]
, p.[FirstName]
, p.[LastName]
, c.[JoinDate]
, cs.[Name] AS [CustomerStatusName]
, ct.[Name] AS [CustomerTypeName]
, c.[ReferenceIdentifier]
, c.[IsActive]
, p.[IsActive] AS [IsPersonActive]
, c.[CreatedBy]
, c.[CreatedDate]
, c.[ModifiedBy]
, c.[ModifiedDate]
, p.[CreatedBy] AS [PersonCreatedBy]
, p.[CreatedDate] AS [PersonCreatedDate]
, p.[ModifiedBy] AS [PersonModifiedBy]
, p.[ModifiedDate] AS [PersonModifiedDate]
FROM [dbo].[Customer] c (NOLOCK)
INNER JOIN [dbo].[CustomerStatus] cs (NOLOCK) ON c.CustomerStatusID = cs.ID
INNER JOIN [dbo].[CustomerType] ct (NOLOCK) ON c.CustomerTypeID = ct.ID
INNER JOIN [dbo].[Person] p (NOLOCK) ON c.PersonID = p.ID
GO
PRINT 'Complete'
GO
USE [Fructose]
GO
PRINT 'Running DML Pre-Process...'
GO
PRINT 'Complete'
GO
USE [Fructose]
GO
DECLARE
@createdBy AS VARCHAR(100) = 'sferguson'
, @createdDate AS DATETIME = CURRENT_TIMESTAMP
BEGIN
/*
* ###########################################################
* INSERT - CustomerStatus
* ###########################################################
*/
IF NOT EXISTS (SELECT 1 FROM [dbo].[CustomerStatus] WHERE [Name] = 'Pending' AND [SubStatusName] IS NULL)
BEGIN
INSERT INTO [dbo].[CustomerStatus] ([Name], [SubStatusName], [Description], [Code], [DisplayName], [DisplayOrder], [IsActive], [CreatedBy], [CreatedDate])
VALUES ('Pending', NULL, 'The Customer data is being held in until a future date/time', 'PEND', 'Pending', 100, 1, @createdBy, @createdDate)
END
IF NOT EXISTS (SELECT 1 FROM [dbo].[CustomerStatus] WHERE [Name] = 'Pending' AND [SubStatusName] = 'Error')
BEGIN
INSERT INTO [dbo].[CustomerStatus] ([Name], [SubStatusName], [Description], [Code], [DisplayName], [DisplayOrder], [IsActive], [CreatedBy], [CreatedDate])
VALUES ('Pending', 'Error', 'The Customer data is being held due to a validation error', 'PNDE', 'Pending - Error', 200, 1, @createdBy, @createdDate)
END
IF NOT EXISTS (SELECT 1 FROM [dbo].[CustomerStatus] WHERE [Name] = 'Active' AND [SubStatusName] IS NULL)
BEGIN
INSERT INTO [dbo].[CustomerStatus] ([Name], [SubStatusName], [Description], [Code], [DisplayName], [DisplayOrder], [IsActive], [CreatedBy], [CreatedDate])
VALUES ('Active', NULL, 'The Customer is considered accepted', 'ACTV', 'Active', 300, 1, @createdBy, @createdDate)
END
IF NOT EXISTS (SELECT 1 FROM [dbo].[CustomerStatus] WHERE [Name] = 'Active' AND [SubStatusName] = 'Cancel Requested')
BEGIN
INSERT INTO [dbo].[CustomerStatus] ([Name], [SubStatusName], [Description], [Code], [DisplayName], [DisplayOrder], [IsActive], [CreatedBy], [CreatedDate])
VALUES ('Active', 'Cancel Requested', 'The Customer is still active but a cancel has been requested and the Customer is in a state where they can be won back', 'ATVC', 'Active - Cancel Requested', 400, 1, @createdBy, @createdDate)
END
IF NOT EXISTS (SELECT 1 FROM [dbo].[CustomerStatus] WHERE [Name] = 'Cancelled' AND [SubStatusName] IS NULL)
BEGIN
INSERT INTO [dbo].[CustomerStatus] ([Name], [SubStatusName], [Description], [Code], [DisplayName], [DisplayOrder], [IsActive], [CreatedBy], [CreatedDate])
VALUES ('Cancelled', NULL, 'The Customer was once active with the platform but the cancel request has been fulfilled', 'CANC', 'Cancelled', 500, 1, @createdBy, @createdDate)
END
/*
* ###########################################################
* INSERT - CustomerType
* ###########################################################
*/
IF NOT EXISTS (SELECT 1 FROM [dbo].[CustomerType] WHERE [Name] = 'Personal')
BEGIN
INSERT INTO [dbo].[CustomerType] ([Name], [Description], [Code], [DisplayName], [DisplayOrder], [IsActive], [CreatedBy], [CreatedDate])
VALUES ('Personal', 'The Customer has a personal account for their use only', 'PERS', 'Personal', 100, 1, @createdBy, @createdDate)
END
IF NOT EXISTS (SELECT 1 FROM [dbo].[CustomerType] WHERE [Name] = 'Business')
BEGIN
INSERT INTO [dbo].[CustomerType] ([Name], [Description], [Code], [DisplayName], [DisplayOrder], [IsActive], [CreatedBy], [CreatedDate])
VALUES ('Business', 'The Customer is considered to be a business organization', 'BUSI', 'Business', 200, 1, @createdBy, @createdDate)
END
/*
* ###########################################################
* INSERT - CustomerNoteType
* ###########################################################
*/
IF NOT EXISTS (SELECT 1 FROM [dbo].[CustomerNoteType] WHERE [Name] = 'General')
BEGIN
INSERT INTO [dbo].[CustomerNoteType] ([Name], [Description], [DisplayName], [DisplayOrder], [IsActive], [CreatedBy], [CreatedDate])
VALUES ('General', 'A general note to be left on the Customer''s account', 'General', 100, 1, @createdBy, @createdDate)
END
/*
* ###########################################################
* INSERT - CustomerSearchTermType
* ###########################################################
*/
IF NOT EXISTS (SELECT 1 FROM [dbo].[CustomerSearchTermType] WHERE [Name] = 'FirstName')
BEGIN
INSERT INTO [dbo].[CustomerSearchTermType] ([Name], [Description], [DisplayName], [DisplayOrder], [IsActive], [CreatedBy], [CreatedDate])
VALUES ('FirstName', 'The first name of the Customer', 'First Name', 100, 1, @createdBy, @createdDate)
END
IF NOT EXISTS (SELECT 1 FROM [dbo].[CustomerSearchTermType] WHERE [Name] = 'LastName')
BEGIN
INSERT INTO [dbo].[CustomerSearchTermType] ([Name], [Description], [DisplayName], [DisplayOrder], [IsActive], [CreatedBy], [CreatedDate])
VALUES ('LastName', 'The last name of the Customer', 'Last Name', 200, 1, @createdBy, @createdDate)
END
IF NOT EXISTS (SELECT 1 FROM [dbo].[CustomerSearchTermType] WHERE [Name] = 'CustomerNumber')
BEGIN
INSERT INTO [dbo].[CustomerSearchTermType] ([Name], [Description], [DisplayName], [DisplayOrder], [IsActive], [CreatedBy], [CreatedDate])
VALUES ('CustomerNumber', 'The Customer''s unique identifier (known by the Customer, not for internal use only)', 'Customer Number', 300, 1, @createdBy, @createdDate)
END
IF NOT EXISTS (SELECT 1 FROM [dbo].[CustomerSearchTermType] WHERE [Name] = 'AddressLine1')
BEGIN
INSERT INTO [dbo].[CustomerSearchTermType] ([Name], [Description], [DisplayName], [DisplayOrder], [IsActive], [CreatedBy], [CreatedDate])
VALUES ('AddressLine1', 'Line 1 of the Customer''s address (regardless of AddressTypeID)', 'Address Line 1', 400, 1, @createdBy, @createdDate)
END
IF NOT EXISTS (SELECT 1 FROM [dbo].[CustomerSearchTermType] WHERE [Name] = 'AddressLine2')
BEGIN
INSERT INTO [dbo].[CustomerSearchTermType] ([Name], [Description], [DisplayName], [DisplayOrder], [IsActive], [CreatedBy], [CreatedDate])
VALUES ('AddressLine2', 'Line 2 of the Customer''s address (regardless of AddressTypeID)', 'Address Line 2', 500, 1, @createdBy, @createdDate)
END
IF NOT EXISTS (SELECT 1 FROM [dbo].[CustomerSearchTermType] WHERE [Name] = 'AddressLine3')
BEGIN
INSERT INTO [dbo].[CustomerSearchTermType] ([Name], [Description], [DisplayName], [DisplayOrder], [IsActive], [CreatedBy], [CreatedDate])
VALUES ('AddressLine3', 'Line 3 of the Customer''s address (regardless of AddressTypeID)', 'Address Line 3', 600, 1, @createdBy, @createdDate)
END
IF NOT EXISTS (SELECT 1 FROM [dbo].[CustomerSearchTermType] WHERE [Name] = 'City')
BEGIN
INSERT INTO [dbo].[CustomerSearchTermType] ([Name], [Description], [DisplayName], [DisplayOrder], [IsActive], [CreatedBy], [CreatedDate])
VALUES ('City', 'The City the Customer''s address (regardless of AddressTypeID)', 'City', 700, 1, @createdBy, @createdDate)
END
IF NOT EXISTS (SELECT 1 FROM [dbo].[CustomerSearchTermType] WHERE [Name] = 'StateProv')
BEGIN
INSERT INTO [dbo].[CustomerSearchTermType] ([Name], [Description], [DisplayName], [DisplayOrder], [IsActive], [CreatedBy], [CreatedDate])
VALUES ('StateProv', 'The State the Customer''s address (regardless of AddressTypeID)', 'StateProv', 800, 1, @createdBy, @createdDate)
END
IF NOT EXISTS (SELECT 1 FROM [dbo].[CustomerSearchTermType] WHERE [Name] = 'PostalCode')
BEGIN
INSERT INTO [dbo].[CustomerSearchTermType] ([Name], [Description], [DisplayName], [DisplayOrder], [IsActive], [CreatedBy], [CreatedDate])
VALUES ('PostalCode', 'The Postal Code the Customer''s address (regardless of AddressTypeID)', 'Postal Code', 900, 1, @createdBy, @createdDate)
END
IF NOT EXISTS (SELECT 1 FROM [dbo].[CustomerSearchTermType] WHERE [Name] = 'EmailAddress')
BEGIN
INSERT INTO [dbo].[CustomerSearchTermType] ([Name], [Description], [DisplayName], [DisplayOrder], [IsActive], [CreatedBy], [CreatedDate])
VALUES ('EmailAddress', 'The Email Address the Customer (regardless of EmailTypeID)', 'Email Address', 1000, 1, @createdBy, @createdDate)
END
IF NOT EXISTS (SELECT 1 FROM [dbo].[CustomerSearchTermType] WHERE [Name] = 'PhoneNumber')
BEGIN
INSERT INTO [dbo].[CustomerSearchTermType] ([Name], [Description], [DisplayName], [DisplayOrder], [IsActive], [CreatedBy], [CreatedDate])
VALUES ('PhoneNumber', 'The Phone Number the Customer (regardless of PhoneTypeID)', 'Phone Number', 1100, 1, @createdBy, @createdDate)
END
IF NOT EXISTS (SELECT 1 FROM [dbo].[CustomerSearchTermType] WHERE [Name] = 'CustomerAttribute')
BEGIN
INSERT INTO [dbo].[CustomerSearchTermType] ([Name], [Description], [DisplayName], [DisplayOrder], [IsActive], [CreatedBy], [CreatedDate])
VALUES ('CustomerAttribute', 'The Attribute Value of the Customer', 'Customer Attribute', 1200, 1, @createdBy, @createdDate)
END
/*
* ###########################################################
* INSERT - CustomerEventType
* ###########################################################
*/
IF NOT EXISTS (SELECT 1 FROM [dbo].[CustomerEventType] WHERE [Name] = 'StatusChange')
BEGIN
INSERT INTO [dbo].[CustomerEventType] ([Name], [Description], [DisplayName], [DisplayOrder], [IsActive], [CreatedBy], [CreatedDate])
VALUES ('StatusChange', 'Records whenever a Customer''s status changes', 'Status Change', 100, 1, @createdBy, @createdDate)
END
/*
* ###########################################################
* INSERT - CustomerAttributeType
* ###########################################################
*/
IF NOT EXISTS (SELECT 1 FROM [dbo].[CustomerAttributeType] WHERE [Name] = 'NationalIdentifier')
BEGIN
INSERT INTO [dbo].[CustomerAttributeType] ([Name], [Description], [DisplayName], [DisplayOrder], [IsValueEncrypted], [IsActive], [CreatedBy], [CreatedDate])
VALUES ('NationalIdentifier', 'The national unique identifier of the Customer (i.e. for the US, NationalIdentifier is synonymous with Social Security Number)', 'National Identifier', 100, 1, 1, @createdBy, @createdDate)
END
/*
* ###########################################################
* INSERT - AddressType
* ###########################################################
*/
IF NOT EXISTS (SELECT 1 FROM [dbo].[AddressType] WHERE [Name] = 'Home')
BEGIN
INSERT INTO [dbo].[AddressType] ([Name], [Description], [DisplayName], [DisplayOrder], [IsActive], [CreatedBy], [CreatedDate])
VALUES ('Home', 'Indicates a Home address', 'Home', 100, 1, @createdBy, @createdDate)
END
IF NOT EXISTS (SELECT 1 FROM [dbo].[AddressType] WHERE [Name] = 'Billing')
BEGIN
INSERT INTO [dbo].[AddressType] ([Name], [Description], [DisplayName], [DisplayOrder], [IsActive], [CreatedBy], [CreatedDate])
VALUES ('Billing', 'Indicates a Billing address', 'Billing', 200, 1, @createdBy, @createdDate)
END
IF NOT EXISTS (SELECT 1 FROM [dbo].[AddressType] WHERE [Name] = 'Shipping')
BEGIN
INSERT INTO [dbo].[AddressType] ([Name], [Description], [DisplayName], [DisplayOrder], [IsActive], [CreatedBy], [CreatedDate])
VALUES ('Shipping', 'Indicates a Shipping address', 'Shipping', 300, 1, @createdBy, @createdDate)
END
/*
* ###########################################################
* INSERT - EmailType
* ###########################################################
*/
IF NOT EXISTS (SELECT 1 FROM [dbo].[EmailType] WHERE [Name] = 'Personal')
BEGIN
INSERT INTO [dbo].[EmailType] ([Name], [Description], [DisplayName], [DisplayOrder], [IsActive], [CreatedBy], [CreatedDate])
VALUES ('Personal', 'Indicates a Personal email address', 'Personal', 100, 1, @createdBy, @createdDate)
END
IF NOT EXISTS (SELECT 1 FROM [dbo].[EmailType] WHERE [Name] = 'Business')
BEGIN
INSERT INTO [dbo].[EmailType] ([Name], [Description], [DisplayName], [DisplayOrder], [IsActive], [CreatedBy], [CreatedDate])
VALUES ('Business', 'Indicates a Business email address', 'Business', 200, 1, @createdBy, @createdDate)
END
/*
* ###########################################################
* INSERT - PhoneType
* ###########################################################
*/
IF NOT EXISTS (SELECT 1 FROM [dbo].[PhoneType] WHERE [Name] = 'Home')
BEGIN
INSERT INTO [dbo].[PhoneType] ([Name], [Description], [DisplayName], [DisplayOrder], [IsActive], [CreatedBy], [CreatedDate])
VALUES ('Home', 'Indicates a Home phone number', 'Home', 100, 1, @createdBy, @createdDate)
END
IF NOT EXISTS (SELECT 1 FROM [dbo].[PhoneType] WHERE [Name] = 'Work')
BEGIN
INSERT INTO [dbo].[PhoneType] ([Name], [Description], [DisplayName], [DisplayOrder], [IsActive], [CreatedBy], [CreatedDate])
VALUES ('Work', 'Indicates a Work phone number', 'Work', 200, 1, @createdBy, @createdDate)
END
END
USE [Fructose]
GO
PRINT 'Running DML Post-Process...'
GO
SELECT *
FROM [dbo].[vwPerson]
SELECT *
FROM [dbo].[vwCustomer]
SELECT *
FROM [dbo].[CustomerStatus]
SELECT *
FROM [dbo].[CustomerType]
SELECT *
FROM [dbo].[CustomerNoteType]
SELECT *
FROM [dbo].[CustomerSearchTermType]
SELECT *
FROM [dbo].[CustomerEventType]
SELECT *
FROM [dbo].[CustomerAttributeType]
SELECT *
FROM [dbo].[AddressType]
SELECT *
FROM [dbo].[EmailType]
SELECT *
FROM [dbo].[PhoneType]
PRINT 'Complete'
GO |
-- AlterTable
ALTER TABLE "Usuario" ADD COLUMN "role" TEXT NOT NULL DEFAULT E'user';
|
<reponame>angry-tony/GovernIT<gh_stars>0
------------------ ES: MÓDULO DE MAPAS DE DECISIÓN ---------------------------
------------------ EN: DECISION MAPS ENGINE ---------------------------
-- ES: Borrado de toda la información de las 6 tablas del módulo de Mapas de Decisión --
-- EN: Deleting of all information from the 6 tables of the engine: Decision Maps --
delete from mapas_complementary_mechanisms;
delete from mapas_decision_archetypes;
delete from mapas_decision_maps;
delete from mapas_findings;
delete from mapas_governance_decisions;
delete from mapas_map_details;
-- ES: Reinicio de secuencias de las tablas del módulo de Mapas de Decisión --
-- EN: Restart of the sequences from the tables of the engine: Decision Maps --
alter sequence mapas_complementary_mechanisms_id_seq restart with 1;
alter sequence mapas_decision_archetypes_id_seq restart with 1;
alter sequence mapas_decision_maps_id_seq restart with 1;
alter sequence mapas_findings_id_seq restart with 1;
alter sequence mapas_governance_decisions_id_seq restart with 1;
alter sequence mapas_map_details_id_seq restart with 1; |
<filename>src/main/resources/db/migration/V68__behandling_henlegg_årsak.sql
ALTER TABLE behandling RENAME COLUMN behandlingsresultat_henlagt_arsak TO henlagt_arsak; |
begin;
create sequence trans_id_seq
start with 1
increment by 1
no minvalue
no maxvalue
cache 1;
create sequence acct_id_seq
start with 1
increment by 1
no minvalue
no maxvalue
cache 1;
create sequence cat_id_seq
start with 1
increment by 1
no minvalue
no maxvalue
cache 1;
create sequence expected_id_seq
start with 1
increment by 1
no minvalue
no maxvalue
cache 1;
create table acct (
id int primary key default nextval('acct_id_seq'),
name varchar(255) not null,
abbrev varchar(255) not null unique,
liquidable boolean default TRUE,
created date default now(),
updated date default now()
);
create type cat_type as enum ('debit', 'credit', 'savings', 'both');
-- renamed desc -> description
create table cat (
id int primary key default nextval('cat_id_seq'),
name varchar(255) not null,
abbrev varchar(255) not null unique,
description text,
type cat_type default 'debit',
created date default now(),
updated date default now()
);
-- renamed desc -> description
create table trans (
id int primary key default nextval('trans_id_seq'),
year int not null,
month int not null,
day int not null,
trans_date date not null,
description text,
amt decimal not null default 0.00,
acct_id int not null references acct(id),
cat_id int not null references cat(id),
location varchar(255),
check_num int,
cleared_date date,
created date default now(),
updated date default now()
);
create table expected (
id int primary key default nextval('expected_id_seq'),
cat_id int not null references cat(id),
amt decimal not null default 0.00,
year int not null,
month int not null,
date date not null,
created date default now(),
updated date default now()
);
alter table expected add constraint one_expected_per_month unique(cat_id, year, month);
end;
|
<filename>review_mysql/test04_pagequery.sql<gh_stars>1-10
/*
【分页查询】
应用场景:
当要显示的数据,一页显示不全,需要分页提交sql请求
语法:
select 查询列表
from 表
【join type join 表2
on 连接条件
where 筛选条件
group by 分组字段
having 分组后的筛选
order by 排序的字段】
limit 【offset,】size;
offset要显示条目的起始索引(起始索引从0开始)
size 要显示的条目个数
特点:
①limit语句放在查询语句的最后
②公式
要显示的页数 page,每页的条目数size
select 查询列表
from 表
limit (page-1)*size,size;
size=10
page
1 0
2 10
3 20
*/
#案例1:查询前五条员工信息
SELECT
*
FROM
employees
LIMIT 0, 5;
SELECT * FROM employees LIMIT 5;
#案例2:查询第11条——第25条
SELECT * FROM employees LIMIT 10,15;
#案例3:有奖金的员工信息,并且工资较高的前10名显示出来
SELECT
*
FROM
employees
WHERE commission_pct IS NOT NULL
ORDER BY salary DESC
LIMIT 10 ;
|
DROP EVENT IF EXISTS `purge_sessions`;
DROP EVENT IF EXISTS `purge_copy_paste_tokens`;
DROP TABLE IF EXISTS `copy_paste_tokens`;
DROP TABLE IF EXISTS `sessions`;
DROP TABLE IF EXISTS `users`;
DROP TABLE IF EXISTS `auth_migration_version`;
DROP TABLE IF EXISTS `auth_migrations`;
|
<filename>demo_tables/auth_users.sql<gh_stars>1-10
declare
v_name varchar2(30 char) := 'AUTH_USERS';
begin
for i in (
select v_name from dual
minus
select table_name from user_tables where table_name = v_name
)
loop
execute immediate q'{
create table auth_users (
id varchar2(15 char) not null,
first_name varchar2(30 char) ,
last_name varchar2(30 char) ,
email varchar2(50 char) not null,
manager_user_id varchar2(15 char) ,
active_yn char(1) not null,
--
primary key (id),
unique (email),
check (id = upper(id)),
check (email = lower(email)),
check (active_yn in ('Y', 'N'))
)
}';
end loop;
end;
/
|
<reponame>TrainingByPackt/MySQL
USE test;
--disable_warnings
DROP TABLE IF EXISTS logincount;
--enable_warnings
CREATE TABLE logincount (user varchar(255) primary key, logins int not null);
INSERT INTO logincount VALUES ('jdoe', 1) ON DUPLICATE KEY
UPDATE logins=logins+1;
SELECT * FROM logincount;
INSERT INTO logincount VALUES ('jdoe', 1) ON DUPLICATE KEY
UPDATE logins=logins+1;
SELECT * FROM logincount;
|
-- +goose Up
-- SQL in this section is executed when the migration is applied.
CREATE INDEX jobs_status ON jobs (status);
-- +goose Down
-- SQL in this section is executed when the migration is rolled back.
DROP INDEX jobs_status;
|
<reponame>smith750/kc<gh_stars>0
DECLARE temp NUMBER;
BEGIN
SELECT MIN(ROLE_PERM_ID) INTO temp FROM KRIM_ROLE_PERM_T
WHERE ROLE_ID = (SELECT ROLE_ID from KRIM_ROLE_T WHERE NMSPC_CD = 'KC-SYS' AND ROLE_NM = 'Application Administrator')
AND (PERM_ID IS NULL OR PERM_ID IN (SELECT PERM_ID FROM KRIM_PERM_T WHERE NM = 'Modify Entity'));
IF temp IS NULL THEN
EXECUTE IMMEDIATE 'INSERT INTO KRIM_ROLE_PERM_T (ROLE_PERM_ID,ROLE_ID,PERM_ID,ACTV_IND,OBJ_ID,VER_NBR) VALUES (KRIM_ROLE_PERM_ID_BS_S.NEXTVAL,(SELECT ROLE_ID from KRIM_ROLE_T WHERE NMSPC_CD = ''KC-SYS'' AND ROLE_NM = ''Application Administrator''),(SELECT MAX(PERM_ID) FROM KRIM_PERM_T WHERE NM = ''Modify Entity''),''Y'',SYS_GUID(),1)';
ELSE
EXECUTE IMMEDIATE 'UPDATE KRIM_ROLE_PERM_T SET PERM_ID = (SELECT PERM_ID FROM KRIM_PERM_T WHERE NMSPC_CD = ''KR-IDM'' AND NM = ''Modify Entity'') WHERE ROLE_PERM_ID = ' || temp || '';
END IF;
END;
/
DECLARE temp NUMBER;
BEGIN
SELECT MAX(ROLE_PERM_ID) INTO temp FROM KRIM_ROLE_PERM_T
WHERE ROLE_ID = (SELECT ROLE_ID from KRIM_ROLE_T WHERE NMSPC_CD = 'KC-SYS' AND ROLE_NM = 'Application Administrator')
AND (PERM_ID IS NULL OR PERM_ID IN (SELECT PERM_ID FROM KRIM_PERM_T WHERE NM = 'Copy Document'));
IF temp IS NULL THEN
EXECUTE IMMEDIATE 'INSERT INTO KRIM_ROLE_PERM_T (ROLE_PERM_ID,ROLE_ID,PERM_ID,ACTV_IND,OBJ_ID,VER_NBR) VALUES (KRIM_ROLE_PERM_ID_BS_S.NEXTVAL,(SELECT ROLE_ID from KRIM_ROLE_T WHERE NMSPC_CD = ''KC-SYS'' AND ROLE_NM = ''Application Administrator''),(SELECT MAX(PERM_ID) FROM KRIM_PERM_T WHERE NM = ''Copy Document''),''Y'',SYS_GUID(),1)';
ELSE
EXECUTE IMMEDIATE 'UPDATE KRIM_ROLE_PERM_T SET PERM_ID = (SELECT PERM_ID FROM KRIM_PERM_T WHERE NMSPC_CD = ''KR-SYS'' AND NM = ''Copy Document'') WHERE ROLE_PERM_ID = ' || temp || '';
END IF;
END;
/
|
<reponame>w203654/guns
INSERT INTO `guns`.`sys_menu` (`id`, `code`, `pcode`, `pcodes`, `name`, `icon`, `url`, `num`, `levels`, `ismenu`, `tips`, `status`, `isopen`) VALUES ('996419001653268481', 'warehouse', '0', '[0],', '产铝量盘存台账', '', '/warehouse', '99', '1', '1', NULL, '1', '0');
INSERT INTO `guns`.`sys_menu` (`id`, `code`, `pcode`, `pcodes`, `name`, `icon`, `url`, `num`, `levels`, `ismenu`, `tips`, `status`, `isopen`) VALUES ('996419001653268482', 'warehouse_list', 'warehouse', '[0],[warehouse],', '产铝量盘存台账列表', '', '/warehouse/list', '99', '2', '0', NULL, '1', '0');
INSERT INTO `guns`.`sys_menu` (`id`, `code`, `pcode`, `pcodes`, `name`, `icon`, `url`, `num`, `levels`, `ismenu`, `tips`, `status`, `isopen`) VALUES ('996419001653268483', 'warehouse_add', 'warehouse', '[0],[warehouse],', '产铝量盘存台账添加', '', '/warehouse/add', '99', '2', '0', NULL, '1', '0');
INSERT INTO `guns`.`sys_menu` (`id`, `code`, `pcode`, `pcodes`, `name`, `icon`, `url`, `num`, `levels`, `ismenu`, `tips`, `status`, `isopen`) VALUES ('996419001653268484', 'warehouse_update', 'warehouse', '[0],[warehouse],', '产铝量盘存台账更新', '', '/warehouse/update', '99', '2', '0', NULL, '1', '0');
INSERT INTO `guns`.`sys_menu` (`id`, `code`, `pcode`, `pcodes`, `name`, `icon`, `url`, `num`, `levels`, `ismenu`, `tips`, `status`, `isopen`) VALUES ('996419001653268485', 'warehouse_delete', 'warehouse', '[0],[warehouse],', '产铝量盘存台账删除', '', '/warehouse/delete', '99', '2', '0', NULL, '1', '0');
INSERT INTO `guns`.`sys_menu` (`id`, `code`, `pcode`, `pcodes`, `name`, `icon`, `url`, `num`, `levels`, `ismenu`, `tips`, `status`, `isopen`) VALUES ('996419001653268486', 'warehouse_detail', 'warehouse', '[0],[warehouse],', '产铝量盘存台账详情', '', '/warehouse/detail', '99', '2', '0', NULL, '1', '0');
|
<reponame>JeromeRocheteau/emit<gh_stars>1-10
CREATE TABLE `experiments` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`deleted` datetime DEFAULT NULL,
`measurand` bigint(20) NOT NULL,
`environment` bigint(20) NOT NULL,
`experiment` bigint(20) DEFAULT NULL,
`started` datetime DEFAULT NULL,
`stopped` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
FOREIGN KEY (`environment`) REFERENCES `environments` (`id`),
FOREIGN KEY (`measurand`) REFERENCES `measurands` (`id`),
FOREIGN KEY (`experiment`) REFERENCES `experiments` (`id`)
);
|
# --- !Ups
CREATE TABLE "diff" (
"id" VARCHAR(100) NOT NULL PRIMARY KEY,
"diff" VARCHAR(102400) NOT NULL,
"created_at" TIMESTAMP NOT NULL
);
CREATE TABLE "comment" (
"id" SERIAL PRIMARY KEY,
"comment" VARCHAR(102400) NOT NULL,
"diff_id" VARCHAR(100),
"original_file" VARCHAR(200),
"changed_file" VARCHAR(200),
"line_number" INT,
"on_original" BOOLEAN
);
CREATE TABLE "animal" ("name" VARCHAR(50) NOT NULL);
CREATE TABLE "first_name" ("name" VARCHAR(50) NOT NULL);
INSERT INTO "animal" VALUES
('AdeliePenguin'),
('Affenpinscher'),
('AfghanHound'),
('AfricanBushElephant'),
('AfricanCivet'),
('AfricanClawedFrog'),
('AfricanForestElephant'),
('AfricanPalmCivet'),
('AfricanPenguin'),
('AfricanTreeToad'),
('AfricanWildDog'),
('AinuDog'),
('AiredaleTerrier'),
('Akbash'),
('Akita'),
('AlaskanMalamute'),
('Albatross'),
('AldabraGiantTortoise'),
('Alligator'),
('AlpineDachsbracke'),
('AmericanBulldog'),
('AmericanCockerSpaniel'),
('AmericanCoonhound'),
('AmericanEskimoDog'),
('AmericanFoxhound'),
('AmericanPitBullTerrier'),
('AmericanStaffordshireTerrier'),
('AmericanWaterSpaniel'),
('AnatolianShepherdDog'),
('Angelfish'),
('Ant'),
('Anteater'),
('Antelope'),
('AppenzellerDog'),
('ArcticFox'),
('ArcticHare'),
('ArcticWolf'),
('Armadillo'),
('AsianElephant'),
('AsianGiantHornet'),
('AsianPalmCivet'),
('AsiaticBlackBear'),
('AustralianCattleDog'),
('AustralianKelpieDog'),
('AustralianMist'),
('AustralianShepherd'),
('AustralianTerrier'),
('Avocet'),
('Axolotl'),
('AyeAye'),
('BactrianCamel'),
('Badger'),
('Balinese'),
('BandedPalmCivet'),
('Bandicoot'),
('Barb'),
('BarnOwl'),
('Barnacle'),
('Barracuda'),
('BasenjiDog'),
('BaskingShark'),
('BassetHound'),
('Bat'),
('BavarianMountainHound'),
('Beagle'),
('Bear'),
('BeardedCollie'),
('BeardedDragon'),
('Beaver'),
('BedlingtonTerrier'),
('Beetle'),
('BengalTiger'),
('BerneseMountainDog'),
('BichonFrise'),
('Binturong'),
('Bird'),
('BirdsOfParadise'),
('Birman'),
('Bison'),
('BlackBear'),
('BlackRhinoceros'),
('BlackRussianTerrier'),
('BlackWidowSpider'),
('Bloodhound'),
('BlueLacyDog'),
('BlueWhale'),
('BluetickCoonhound'),
('Bobcat'),
('BologneseDog'),
('Bombay'),
('Bongo'),
('Bonobo'),
('Booby'),
('BorderCollie'),
('BorderTerrier'),
('BorneanOrangutan'),
('BorneoElephant'),
('BostonTerrier'),
('BottleNosedDolphin'),
('BoxerDog'),
('BoykinSpaniel'),
('BrazilianTerrier'),
('BrownBear'),
('Budgerigar'),
('Buffalo'),
('BullMastiff'),
('BullShark'),
('BullTerrier'),
('Bulldog'),
('Bullfrog'),
('BumbleBee'),
('Burmese'),
('BurrowingFrog'),
('Butterfly'),
('ButterflyFish'),
('CaimanLizard'),
('CairnTerrier'),
('Camel'),
('CanaanDog'),
('Capybara'),
('Caracal'),
('CarolinaDog'),
('Cassowary'),
('Cat'),
('Caterpillar'),
('Catfish'),
('CavalierKingCharlesSpaniel'),
('Centipede'),
('CeskyFousek'),
('Chameleon'),
('Chamois'),
('Cheetah'),
('ChesapeakeBayRetriever'),
('Chicken'),
('Chihuahua'),
('Chimpanzee'),
('Chinchilla'),
('ChineseCrestedDog'),
('Chinook'),
('ChinstrapPenguin'),
('Chipmunk'),
('ChowChow'),
('Cichlid'),
('CloudedLeopard'),
('ClownFish'),
('ClumberSpaniel'),
('Coati'),
('Cockroach'),
('CollaredPeccary'),
('Collie'),
('CommonBuzzard'),
('CommonFrog'),
('CommonLoon'),
('CommonToad'),
('Coral'),
('CottontopTamarin'),
('Cougar'),
('Cow'),
('Coyote'),
('Crab'),
('CrabEatingMacaque'),
('Crane'),
('CrestedPenguin'),
('Crocodile'),
('CrossRiverGorilla'),
('CurlyCoatedRetriever'),
('Cuscus'),
('Cuttlefish'),
('Dalmatian'),
('DarwinsFrog'),
('Deer'),
('DesertTortoise'),
('DeutscheBracke'),
('Dhole'),
('Dingo'),
('Discus'),
('DobermanPinscher'),
('Dodo'),
('Dog'),
('DogoArgentino'),
('DogueDeBordeaux'),
('Dolphin'),
('Donkey'),
('Dormouse'),
('Dragonfly'),
('Drever'),
('Duck'),
('Dugong'),
('Dunker'),
('DuskyDolphin'),
('DwarfCrocodile'),
('Earwig'),
('EasternGorilla'),
('EasternLowlandGorilla'),
('Echidna'),
('EdibleFrog'),
('EgyptianMau'),
('ElectricEel'),
('Elephant'),
('ElephantSeal'),
('ElephantShrew'),
('EmperorPenguin'),
('EmperorTamarin'),
('Emu'),
('EnglishCockerSpaniel'),
('EnglishShepherd'),
('EnglishSpringerSpaniel'),
('EntlebucherMountainDog'),
('EpagneulPontAudemer'),
('EskimoDog'),
('EstrelaMountainDog'),
('FennecFox'),
('Ferret'),
('FieldSpaniel'),
('FinWhale'),
('FinnishSpitz'),
('FireBelliedToad'),
('Fish'),
('FishingCat'),
('Flamingo'),
('FlatCoatRetriever'),
('Flounder'),
('Fly'),
('FlyingSquirrel'),
('Fossa'),
('Fox'),
('FoxTerrier'),
('FrenchBulldog'),
('Frigatebird'),
('FrilledLizard'),
('Frog'),
('FurSeal'),
('GalapagosTortoise'),
('Gar'),
('Gecko'),
('GentooPenguin'),
('GeoffroysTamarin'),
('Gerbil'),
('GermanPinscher'),
('GermanShepherd'),
('Gharial'),
('GiantAfricanLandSnail'),
('GiantClam'),
('GiantPandaBear'),
('GiantSchnauzer'),
('Gibbon'),
('GilaMonster'),
('Giraffe'),
('GlassLizard'),
('GlowWorm'),
('Goat'),
('GoldenLionTamarin'),
('GoldenOriole'),
('GoldenRetriever'),
('Goose'),
('Gopher'),
('Gorilla'),
('Grasshopper'),
('GreatDane'),
('GreatWhiteShark'),
('GreaterSwissMountainDog'),
('GreenBeeEater'),
('GreenlandDog'),
('GreyMouseLemur'),
('GreyReefShark'),
('GreySeal'),
('Greyhound'),
('GrizzlyBear'),
('Grouse'),
('GuineaFowl'),
('GuineaPig'),
('Guppy'),
('Hamster'),
('Hare'),
('Harrier'),
('Havanese'),
('Hedgehog'),
('HerculesBeetle'),
('HermitCrab'),
('Heron'),
('HighlandCattle'),
('Himalayan'),
('Hippopotamus'),
('HoneyBee'),
('HornShark'),
('HornedFrog'),
('Horse'),
('HorseshoeCrab'),
('HowlerMonkey'),
('Human'),
('HumboldtPenguin'),
('Hummingbird'),
('HumpbackWhale'),
('Hyena'),
('IbizanHound'),
('Iguana'),
('Impala'),
('IndianElephant'),
('IndianPalmSquirrel'),
('IndianRhinoceros'),
('IndianStarTortoise'),
('IndochineseTiger'),
('Indri'),
('Insect'),
('IrishSetter'),
('IrishWolfHound'),
('Jackal'),
('Jaguar'),
('JapaneseChin'),
('JapaneseMacaque'),
('JavanRhinoceros'),
('Javanese'),
('Jellyfish'),
('Kangaroo'),
('KeelBilledToucan'),
('KillerWhale'),
('KingCrab'),
('KingPenguin'),
('Kingfisher'),
('Kiwi'),
('Koala'),
('KomodoDragon'),
('Kudu'),
('LabradorRetriever'),
('Ladybird'),
('LeafTailedGecko'),
('Lemming'),
('Lemur'),
('Leopard'),
('LeopardCat'),
('LeopardSeal'),
('LeopardTortoise'),
('Liger'),
('Lion'),
('Lionfish'),
('LittlePenguin'),
('Lizard'),
('Llama'),
('Lobster'),
('LongEaredOwl'),
('Lynx'),
('Macaw'),
('MagellanicPenguin'),
('Magpie'),
('MaineCoon'),
('MalayanCivet'),
('MalayanTiger'),
('Maltese'),
('Manatee'),
('Mandrill'),
('MantaRay'),
('MarineToad'),
('Markhor'),
('MarshFrog'),
('MaskedPalmCivet'),
('Mastiff'),
('Mayfly'),
('Meerkat'),
('Millipede'),
('MinkeWhale'),
('Mole'),
('Molly'),
('Mongoose'),
('Mongrel'),
('MonitorLizard'),
('Monkey'),
('MonteIberiaEleuth'),
('Moorhen'),
('Moose'),
('MorayEel'),
('Moth'),
('MountainGorilla'),
('MountainLion'),
('Mouse'),
('Mule'),
('NeapolitanMastiff'),
('Newfoundland'),
('Newt'),
('Nightingale'),
('NorfolkTerrier'),
('NorwegianForest'),
('Numbat'),
('NurseShark'),
('Octopus'),
('Okapi'),
('OldEnglishSheepdog'),
('Olm'),
('Opossum'),
('Orangutan'),
('Ostrich'),
('Otter'),
('Oyster'),
('Panther'),
('Parrot'),
('PatasMonkey'),
('Peacock'),
('Pekingese'),
('Pelican'),
('Penguin'),
('Persian'),
('Pheasant'),
('PiedTamarin'),
('Pig'),
('Pika'),
('Pike'),
('PinkFairyArmadillo'),
('Piranha'),
('Platypus'),
('Pointer'),
('PoisonDartFrog'),
('PolarBear'),
('PondSkater'),
('Poodle'),
('PoolFrog'),
('Porcupine'),
('Possum'),
('Prawn'),
('ProboscisMonkey'),
('PufferFish'),
('Puffin'),
('Pug'),
('Puma'),
('PurpleEmperor'),
('PussMoth'),
('PygmyHippopotamus'),
('PygmyMarmoset'),
('Quetzal'),
('Quokka'),
('Quoll'),
('Raccoon'),
('RaccoonDog'),
('RadiatedTortoise'),
('Ragdoll'),
('Rat'),
('Rattlesnake'),
('RedKneeTarantula'),
('RedPanda'),
('RedWolf'),
('RedhandedTamarin'),
('Reindeer'),
('Rhinoceros'),
('RiverDolphin'),
('RiverTurtle'),
('Robin'),
('RockHyrax'),
('RockhopperPenguin'),
('RoseateSpoonbill'),
('Rottweiler'),
('RoyalPenguin'),
('RussianBlue'),
('SaintBernard'),
('Salamander'),
('SandLizard'),
('Saola'),
('Scorpion'),
('ScorpionFish'),
('SeaDragon'),
('SeaLion'),
('SeaOtter'),
('SeaSlug'),
('SeaSquirt'),
('SeaTurtle'),
('SeaUrchin'),
('Seahorse'),
('Seal'),
('Serval'),
('Sheep'),
('ShihTzu'),
('Shrimp'),
('Siamese'),
('SiameseFightingFish'),
('Siberian'),
('SiberianHusky'),
('SiberianTiger'),
('SilverDollar'),
('Skunk'),
('Sloth'),
('SlowWorm'),
('Snail'),
('Snake'),
('SnappingTurtle'),
('Snowshoe'),
('SnowyOwl'),
('Somali'),
('SouthChinaTiger'),
('SpadefootToad'),
('Sparrow'),
('SpectacledBear'),
('SpermWhale'),
('SpiderMonkey'),
('SpinyDogfish'),
('Sponge'),
('Squid'),
('Squirrel'),
('SquirrelMonkey'),
('SriLankanElephant'),
('StaffordshireBullTerrier'),
('StagBeetle'),
('Starfish'),
('StellersSeaCow'),
('StickInsect'),
('Stingray'),
('Stoat'),
('StripedRocketFrog'),
('SumatranElephant'),
('SumatranOrangutan'),
('SumatranRhinoceros'),
('SumatranTiger'),
('SunBear'),
('Swan'),
('Tapir'),
('Tarsier'),
('TasmanianDevil'),
('TawnyOwl'),
('Termite'),
('Tetra'),
('ThornyDevil'),
('TibetanMastiff'),
('Tiffany'),
('Tiger'),
('TigerSalamander'),
('TigerShark'),
('Tortoise'),
('Toucan'),
('TreeFrog'),
('Tropicbird'),
('Tuatara'),
('Turkey'),
('TurkishAngora'),
('Uguisu'),
('Umbrellabird'),
('VervetMonkey'),
('Vulture'),
('Walrus'),
('Warthog'),
('Wasp'),
('WaterBuffalo'),
('WaterDragon'),
('WaterVole'),
('Weasel'),
('WelshCorgi'),
('WestHighlandTerrier'),
('WesternGorilla'),
('WesternLowlandGorilla'),
('WhaleShark'),
('Whippet'),
('WhiteFacedCapuchin'),
('WhiteRhinoceros'),
('WhiteTiger'),
('WildBoar'),
('Wildebeest'),
('Wolf'),
('Wolverine'),
('Wombat'),
('Woodlouse'),
('Woodpecker'),
('WoollyMammoth'),
('WoollyMonkey'),
('Wrasse'),
('YellowEyedPenguin'),
('YorkshireTerrier'),
('ZebraShark'),
('Zebu'),
('Zonkey'),
('Zorse');
INSERT INTO "first_name" VALUES
('James'),
('John'),
('Robert'),
('Michael'),
('Mary'),
('William'),
('David'),
('Richard'),
('Charles'),
('Joseph'),
('Thomas'),
('Patricia'),
('Christopher'),
('Linda'),
('Barbara'),
('Daniel'),
('Paul'),
('Mark'),
('Elizabeth'),
('Donald'),
('Jennifer'),
('George'),
('Maria'),
('Kenneth'),
('Susan'),
('Steven'),
('Edward'),
('Margaret'),
('Brian'),
('Ronald'),
('Dorothy'),
('Anthony'),
('Lisa'),
('Kevin'),
('Nancy'),
('Karen'),
('Betty'),
('Helen'),
('Jason'),
('Matthew'),
('Gary'),
('Timothy'),
('Sandra'),
('Jose'),
('Larry'),
('Jeffrey'),
('Frank'),
('Donna'),
('Carol'),
('Ruth'),
('Scott'),
('Eric'),
('Stephen'),
('Andrew'),
('Sharon'),
('Michelle'),
('Laura'),
('Sarah'),
('Kimberly'),
('Deborah'),
('Jessica'),
('Raymond'),
('Shirley'),
('Cynthia'),
('Angela'),
('Melissa'),
('Brenda'),
('Amy'),
('Jerry'),
('Gregory'),
('Anna'),
('Joshua'),
('Virginia'),
('Rebecca'),
('Kathleen'),
('Dennis'),
('Pamela'),
('Martha'),
('Debra'),
('Amanda'),
('Walter'),
('Stephanie'),
('Willie'),
('Patrick'),
('Terry'),
('Carolyn'),
('Peter'),
('Christine'),
('Marie'),
('Janet'),
('Frances'),
('Catherine'),
('Harold'),
('Henry'),
('Douglas'),
('Joyce'),
('Ann'),
('Diane'),
('Alice'),
('Jean'),
('Julie'),
('Carl'),
('Kelly'),
('Heather'),
('Arthur'),
('Teresa'),
('Gloria'),
('Doris'),
('Ryan'),
('Joe'),
('Roger'),
('Evelyn'),
('Juan'),
('Ashley'),
('Jack'),
('Cheryl'),
('Albert'),
('Joan'),
('Mildred'),
('Katherine'),
('Justin'),
('Jonathan'),
('Gerald'),
('Keith'),
('Samuel'),
('Judith'),
('Rose'),
('Janice'),
('Lawrence'),
('Ralph'),
('Nicole'),
('Judy'),
('Nicholas'),
('Christina'),
('Roy'),
('Kathy'),
('Theresa'),
('Benjamin'),
('Beverly'),
('Denise'),
('Bruce'),
('Brandon'),
('Adam'),
('Tammy'),
('Irene'),
('Fred'),
('Billy'),
('Harry'),
('Jane'),
('Wayne'),
('Louis'),
('Lori'),
('Steve'),
('Tracy'),
('Jeremy'),
('Rachel'),
('Andrea'),
('Aaron'),
('Marilyn'),
('Robin'),
('Randy'),
('Leslie'),
('Kathryn'),
('Eugene'),
('Bobby'),
('Howard'),
('Carlos'),
('Sara'),
('Louise'),
('Jacqueline'),
('Anne'),
('Wanda'),
('Russell'),
('Shawn'),
('Victor'),
('Julia'),
('Bonnie'),
('Ruby'),
('Chris'),
('Tina'),
('Lois'),
('Phyllis'),
('Jamie'),
('Norma'),
('Martin'),
('Paula'),
('Jesse'),
('Diana'),
('Annie'),
('Shannon'),
('Ernest'),
('Todd'),
('Phillip'),
('Lee'),
('Lillian'),
('Peggy'),
('Emily'),
('Crystal'),
('Kim'),
('Craig'),
('Carmen'),
('Gladys'),
('Connie'),
('Rita'),
('Alan'),
('Dawn'),
('Florence'),
('Dale'),
('Sean'),
('Francis'),
('Johnny'),
('Clarence'),
('Philip'),
('Edna'),
('Tiffany'),
('Tony'),
('Rosa'),
('Jimmy'),
('Earl'),
('Cindy'),
('Antonio'),
('Luis'),
('Mike'),
('Danny'),
('Bryan'),
('Grace'),
('Stanley'),
('Leonard'),
('Wendy'),
('Nathan'),
('Manuel'),
('Curtis'),
('Victoria'),
('Rodney'),
('Norman'),
('Edith'),
('Sherry'),
('Sylvia'),
('Josephine'),
('Allen'),
('Thelma'),
('Sheila'),
('Ethel'),
('Marjorie'),
('Lynn'),
('Ellen'),
('Elaine'),
('Marvin'),
('Carrie'),
('Marion'),
('Charlotte'),
('Vincent'),
('Glenn'),
('Travis'),
('Monica'),
('Jeffery'),
('Jeff'),
('Esther'),
('Pauline'),
('Jacob'),
('Emma'),
('Chad'),
('Kyle'),
('Juanita'),
('Dana'),
('Melvin'),
('Jessie'),
('Rhonda'),
('Anita'),
('Alfred'),
('Hazel'),
('Amber'),
('Eva'),
('Bradley'),
('Ray'),
('Jesus'),
('Debbie'),
('Herbert'),
('Eddie'),
('Joel'),
('Frederick'),
('April'),
('Lucille'),
('Clara'),
('Gail'),
('Joanne'),
('Eleanor'),
('Valerie'),
('Danielle'),
('Erin'),
('Edwin'),
('Megan'),
('Alicia'),
('Suzanne'),
('Michele'),
('Don'),
('Bertha'),
('Veronica'),
('Jill'),
('Darlene'),
('Ricky'),
('Lauren'),
('Geraldine'),
('Troy'),
('Stacy'),
('Randall'),
('Cathy'),
('Joann'),
('Sally'),
('Lorraine'),
('Barry'),
('Alexander'),
('Regina'),
('Jackie'),
('Erica'),
('Beatrice'),
('Dolores'),
('Bernice'),
('Mario'),
('Bernard'),
('Audrey'),
('Yvonne'),
('Francisco'),
('Micheal'),
('Leroy'),
('June'),
('Annette'),
('Samantha'),
('Marcus'),
('Theodore'),
('Oscar'),
('Clifford'),
('Miguel'),
('Jay'),
('Renee'),
('Ana'),
('Vivian'),
('Jim'),
('Ida'),
('Tom'),
('Ronnie'),
('Roberta'),
('Holly'),
('Brittany'),
('Angel'),
('Alex'),
('Melanie'),
('Jon'),
('Yolanda'),
('Tommy'),
('Loretta'),
('Jeanette'),
('Calvin'),
('Laurie'),
('Leon'),
('Katie'),
('Stacey'),
('Lloyd'),
('Derek'),
('Bill'),
('Vanessa'),
('Sue'),
('Kristen'),
('Alma'),
('Warren'),
('Elsie'),
('Beth'),
('Vicki'),
('Jeanne'),
('Jerome'),
('Darrell'),
('Tara'),
('Rosemary'),
('Leo'),
('Floyd'),
('Dean'),
('Carla'),
('Wesley'),
('Terri'),
('Eileen'),
('Courtney'),
('Alvin'),
('Tim'),
('Jorge'),
('Greg'),
('Gordon'),
('Pedro'),
('Lucy'),
('Gertrude'),
('Dustin'),
('Derrick'),
('Corey'),
('Tonya'),
('Dan'),
('Ella'),
('Lewis'),
('Zachary'),
('Wilma'),
('Maurice'),
('Kristin'),
('Gina'),
('Vernon'),
('Vera'),
('Roberto'),
('Natalie'),
('Clyde'),
('Agnes'),
('Herman'),
('Charlene'),
('Charlie'),
('Bessie'),
('Shane'),
('Delores'),
('Sam'),
('Pearl'),
('Melinda'),
('Hector'),
('Glen'),
('Arlene'),
('Ricardo'),
('Tamara'),
('Maureen'),
('Lester'),
('Gene'),
('Colleen'),
('Allison'),
('Tyler'),
('Rick'),
('Joy'),
('Johnnie'),
('Georgia'),
('Constance'),
('Ramon'),
('Marcia'),
('Lillie'),
('Claudia'),
('Brent'),
('Tanya'),
('Nellie'),
('Minnie'),
('Gilbert'),
('Marlene'),
('Heidi'),
('Glenda'),
('Marc'),
('Viola'),
('Marian'),
('Lydia'),
('Billie'),
('Stella'),
('Guadalupe'),
('Caroline'),
('Reginald'),
('Dora'),
('Cecil'),
('Casey'),
('Brett'),
('Vickie'),
('Ruben'),
('Jaime'),
('Rafael'),
('Nathaniel'),
('Mattie'),
('Milton'),
('Edgar'),
('Raul'),
('Maxine'),
('Irma'),
('Myrtle'),
('Marsha'),
('Mabel'),
('Chester'),
('Ben'),
('Andre'),
('Adrian'),
('Lena'),
('Franklin'),
('Duane'),
('Christy'),
('Tracey'),
('Patsy'),
('Gabriel'),
('Deanna'),
('Jimmie'),
('Hilda'),
('Elmer'),
('Christian'),
('Bobbie'),
('Gwendolyn'),
('Nora'),
('Mitchell'),
('Jennie'),
('Brad'),
('Ron'),
('Roland'),
('Nina'),
('Margie'),
('Leah'),
('Harvey'),
('Cory'),
('Cassandra'),
('Arnold'),
('Priscilla'),
('Penny'),
('Naomi'),
('Kay'),
('Karl'),
('Jared'),
('Carole'),
('Olga'),
('Jan'),
('Brandy'),
('Lonnie'),
('Leona'),
('Dianne'),
('Claude'),
('Sonia'),
('Jordan'),
('Jenny'),
('Felicia'),
('Erik'),
('Lindsey'),
('Kerry'),
('Darryl'),
('Velma'),
('Neil'),
('Miriam'),
('Becky'),
('Violet'),
('Kristina'),
('Javier'),
('Fernando'),
('Cody'),
('Clinton'),
('Tyrone'),
('Toni'),
('Ted'),
('Rene'),
('Mathew'),
('Lindsay'),
('Julio'),
('Darren'),
('Misty'),
('Mae'),
('Lance'),
('Sherri'),
('Shelly'),
('Sandy'),
('Ramona'),
('Pat'),
('Kurt'),
('Jody'),
('Daisy'),
('Nelson'),
('Katrina'),
('Erika'),
('Claire'),
('Allan'),
('Hugh'),
('Guy'),
('Clayton'),
('Sheryl'),
('Max'),
('Margarita'),
('Geneva'),
('Dwayne'),
('Belinda'),
('Felix'),
('Faye'),
('Dwight'),
('Cora'),
('Armando'),
('Sabrina'),
('Natasha'),
('Isabel'),
('Everett'),
('Ada'),
('Wallace'),
('Sidney'),
('Marguerite'),
('Ian'),
('Hattie'),
('Harriet'),
('Rosie'),
('Molly'),
('Kristi'),
('Ken'),
('Joanna'),
('Iris'),
('Cecilia'),
('Brandi'),
('Bob'),
('Blanche'),
('Julian'),
('Eunice'),
('Angie'),
('Alfredo'),
('Lynda'),
('Ivan'),
('Inez'),
('Freddie'),
('Dave'),
('Alberto'),
('Madeline'),
('Daryl'),
('Byron'),
('Amelia'),
('Alberta'),
('Sonya'),
('Perry'),
('Morris'),
('Monique'),
('Maggie'),
('Kristine'),
('Kayla'),
('Jodi'),
('Janie'),
('Isaac'),
('Genevieve'),
('Candace'),
('Yvette'),
('Willard'),
('Whitney'),
('Virgil'),
('Ross'),
('Opal'),
('Melody'),
('Maryann'),
('Marshall'),
('Fannie'),
('Clifton'),
('Alison'),
('Susie'),
('Shelley'),
('Sergio'),
('Salvador'),
('Olivia'),
('Luz'),
('Kirk'),
('Flora'),
('Andy'),
('Verna'),
('Terrance'),
('Seth'),
('Mamie'),
('Lula'),
('Lola'),
('Kristy'),
('Kent'),
('Beulah'),
('Antoinette'),
('Terrence'),
('Gayle'),
('Eduardo'),
('Pam'),
('Kelli'),
('Juana'),
('Joey'),
('Jeannette'),
('Enrique'),
('Donnie'),
('Candice'),
('Wade'),
('Hannah'),
('Frankie'),
('Bridget'),
('Austin'),
('Stuart'),
('Karla'),
('Evan'),
('Celia'),
('Vicky'),
('Shelia'),
('Patty'),
('Nick'),
('Lynne'),
('Luther'),
('Latoya'),
('Fredrick'),
('Della'),
('Arturo'),
('Alejandro'),
('Wendell'),
('Sheri'),
('Marianne'),
('Julius'),
('Jeremiah'),
('Shaun'),
('Otis'),
('Kara'),
('Jacquelyn'),
('Erma'),
('Blanca'),
('Angelo'),
('Alexis'),
('Trevor'),
('Roxanne'),
('Oliver'),
('Myra'),
('Morgan'),
('Luke'),
('Leticia'),
('Krista'),
('Homer'),
('Gerard'),
('Doug'),
('Cameron'),
('Sadie'),
('Rosalie'),
('Robyn'),
('Kenny'),
('Ira'),
('Hubert'),
('Brooke'),
('Bethany'),
('Bernadette'),
('Bennie'),
('Antonia'),
('Angelica'),
('Alexandra'),
('Adrienne'),
('Traci'),
('Rachael'),
('Nichole'),
('Muriel'),
('Matt'),
('Mable'),
('Lyle'),
('Laverne'),
('Kendra'),
('Jasmine'),
('Ernestine'),
('Chelsea'),
('Alfonso'),
('Rex'),
('Orlando'),
('Ollie'),
('Neal'),
('Marcella'),
('Loren'),
('Krystal'),
('Ernesto'),
('Elena'),
('Carlton'),
('Blake'),
('Angelina'),
('Wilbur'),
('Taylor'),
('Shelby'),
('Rudy'),
('Roderick'),
('Paulette'),
('Pablo'),
('Omar'),
('Noel'),
('Nadine'),
('Lorenzo'),
('Lora'),
('Leigh'),
('Kari'),
('Horace'),
('Grant'),
('Estelle'),
('Dianna'),
('Willis'),
('Rosemarie'),
('Rickey'),
('Mona'),
('Kelley'),
('Doreen'),
('Desiree'),
('Abraham'),
('Rudolph'),
('Preston'),
('Malcolm'),
('Kelvin'),
('Johnathan'),
('Janis'),
('Hope'),
('Ginger'),
('Freda'),
('Damon'),
('Christie'),
('Cesar'),
('Betsy'),
('Andres'),
('Tommie'),
('Teri'),
('Robbie'),
('Meredith'),
('Mercedes'),
('Marco'),
('Lynette'),
('Eula'),
('Cristina'),
('Archie'),
('Alton'),
('Sophia'),
('Rochelle'),
('Randolph'),
('Pete'),
('Merle'),
('Meghan'),
('Jonathon'),
('Gretchen'),
('Gerardo'),
('Geoffrey'),
('Garry'),
('Felipe'),
('Eloise'),
('Dominic'),
('Devin'),
('Cecelia'),
('Carroll'),
('Raquel'),
('Lucas'),
('Jana'),
('Henrietta'),
('Gwen'),
('Guillermo'),
('Earnest'),
('Delbert'),
('Colin'),
('Alyssa'),
('Tricia'),
('Tasha'),
('Spencer'),
('Rodolfo'),
('Olive'),
('Myron'),
('Jenna'),
('Edmund'),
('Cleo'),
('Benny'),
('Sophie'),
('Sonja'),
('Silvia'),
('Salvatore'),
('Patti'),
('Mindy'),
('May'),
('Mandy'),
('Lowell'),
('Lorena'),
('Lila'),
('Lana'),
('Kellie'),
('Kate'),
('Jewel'),
('Gregg'),
('Garrett'),
('Essie'),
('Elvira'),
('Delia'),
('Darla'),
('Cedric'),
('Wilson'),
('Sylvester'),
('Sherman'),
('Shari'),
('Roosevelt'),
('Miranda'),
('Marty'),
('Marta'),
('Lucia'),
('Lorene'),
('Lela'),
('Josefina'),
('Johanna'),
('Jermaine'),
('Jeannie'),
('Israel'),
('Faith'),
('Elsa'),
('Dixie'),
('Camille'),
('Winifred'),
('Wilbert'),
('Tami'),
('Tabitha'),
('Shawna'),
('Rena'),
('Ora'),
('Nettie'),
('Melba'),
('Marina'),
('Leland'),
('Kristie'),
('Forrest'),
('Elisa'),
('Ebony'),
('Alisha'),
('Aimee'),
('Tammie'),
('Simon'),
('Sherrie'),
('Sammy'),
('Ronda'),
('Patrice'),
('Owen'),
('Myrna'),
('Marla'),
('Latasha'),
('Irving'),
('Dallas'),
('Clark'),
('Bryant'),
('Bonita'),
('Aubrey'),
('Addie'),
('Woodrow'),
('Stacie'),
('Rufus'),
('Rosario'),
('Rebekah'),
('Marcos'),
('Mack'),
('Lupe'),
('Lucinda'),
('Lou'),
('Levi'),
('Laurence'),
('Kristopher'),
('Jewell'),
('Jake'),
('Gustavo'),
('Francine'),
('Ellis'),
('Drew'),
('Dorthy'),
('Deloris'),
('Cheri'),
('Celeste'),
('Cara'),
('Adriana'),
('Adele'),
('Abigail'),
('Trisha'),
('Trina'),
('Tracie'),
('Sallie'),
('Reba'),
('Orville'),
('Nikki'),
('Nicolas'),
('Marissa'),
('Lourdes'),
('Lottie'),
('Lionel'),
('Lenora'),
('Laurel'),
('Kerri'),
('Kelsey'),
('Karin'),
('Josie'),
('Janelle'),
('Ismael'),
('Helene'),
('Gilberto'),
('Gale'),
('Francisca'),
('Fern'),
('Etta'),
('Estella'),
('Elva'),
('Effie'),
('Dominique'),
('Corinne'),
('Clint'),
('Brittney'),
('Aurora'),
('Wilfred'),
('Tomas'),
('Toby'),
('Sheldon'),
('Santos'),
('Maude'),
('Lesley'),
('Josh'),
('Jenifer'),
('Iva'),
('Ingrid'),
('Ina'),
('Ignacio'),
('Hugo'),
('Goldie'),
('Eugenia'),
('Ervin'),
('Erick'),
('Elisabeth'),
('Dewey'),
('Christa'),
('Cassie'),
('Cary'),
('Caleb'),
('Caitlin'),
('Bettie'),
('Aida'),
('Van'),
('Therese'),
('Terence'),
('Tamika'),
('Stewart'),
('Santiago'),
('Rosetta'),
('Rogelio'),
('Ramiro'),
('Polly'),
('Noah'),
('Lorna'),
('Latonya'),
('Kris'),
('Janette'),
('Elias'),
('Elbert'),
('Doyle'),
('Dina'),
('Dena'),
('Debora'),
('Darrel'),
('Darnell'),
('Consuelo'),
('Conrad'),
('Cherie'),
('Carey'),
('Candy'),
('Bert'),
('Alonzo'),
('Trudy'),
('Terrell'),
('Stefanie'),
('Shanna'),
('Rolando'),
('Phil'),
('Percy'),
('Patrica'),
('Nell'),
('Lamar'),
('Kimberley'),
('Jillian'),
('Helena'),
('Grady'),
('Fay'),
('Esperanza'),
('Dorothea'),
('Dexter'),
('Devon'),
('Dee'),
('Cornelius'),
('Clay'),
('Carolina'),
('Bradford'),
('Susanne'),
('Saul'),
('Roman'),
('Randal'),
('Ola'),
('Moses'),
('Mollie'),
('Mickey'),
('Maribel'),
('Louie'),
('Kendall'),
('Janine'),
('Irvin'),
('Darin'),
('Amos'),
('Alisa'),
('Winston'),
('Timmy'),
('Susana'),
('Rachelle'),
('Petra'),
('Paige'),
('Micah'),
('Marlon'),
('Leola'),
('Keisha'),
('Joni'),
('Jolene'),
('Jocelyn'),
('Jerald'),
('Isabelle'),
('Imogene'),
('Graciela'),
('Ester'),
('Emmett'),
('Emilio'),
('Emil'),
('Emanuel'),
('Elise'),
('Elijah'),
('Edmond'),
('Dominick'),
('Domingo'),
('Darrin'),
('Daphne'),
('Cecile'),
('Brendan'),
('Boyd'),
('Bette'),
('Alta'),
('Abel'),
('Will'),
('Ursula'),
('Trent'),
('Tonia'),
('Teddy'),
('Stephan'),
('Sondra'),
('Shana'),
('Rosalind'),
('Reynaldo'),
('Otto'),
('Mayra'),
('Marisol'),
('Marisa'),
('Logan'),
('Lizzie'),
('Lacey'),
('Kirsten'),
('Keri'),
('Jess'),
('Jayne'),
('Jaclyn'),
('Humberto'),
('Gracie'),
('Glenna'),
('Gabriela'),
('Emmanuel'),
('Dewayne'),
('Demetrius'),
('Clarice'),
('Charity'),
('Carmela'),
('Bret'),
('Beatriz'),
('Adeline'),
('Young'),
('Vicente'),
('Summer'),
('Staci'),
('Sheena'),
('Shauna'),
('Sammie'),
('Royce'),
('Rodger'),
('Millie'),
('Miles'),
('Margret'),
('Luella'),
('Lily'),
('Lea'),
('Lamont'),
('Katharine'),
('Justine'),
('Jodie'),
('Jeanine'),
('Heath'),
('Harley'),
('Garland'),
('Gabrielle'),
('Frieda'),
('Ethan'),
('Elma'),
('Eldon'),
('Efrain'),
('Claudette'),
('Christi'),
('Cathleen'),
('Autumn'),
('Angeline'),
('Angelia'),
('Winnie'),
('Willa'),
('Sybil'),
('Sterling'),
('Socorro'),
('Selma'),
('Rocky'),
('Pierre'),
('Mavis'),
('Martina'),
('Maritza'),
('Margo'),
('Marcy'),
('Manuela'),
('Luisa'),
('Lucile'),
('Lorie'),
('Leanne'),
('Lara'),
('Ladonna'),
('Junior'),
('Jeannine'),
('Ivy'),
('Grover'),
('Gerry'),
('Freddy'),
('Elton'),
('Eli'),
('Dylan'),
('Dolly'),
('Deana'),
('Damian'),
('Cleveland'),
('Chuck'),
('Chase'),
('Callie'),
('Bryce'),
('Bobbi'),
('Antoine'),
('Aileen'),
('Abby'),
('Virgie'),
('Sydney'),
('Stan'),
('Simone'),
('Russel'),
('Reuben'),
('Randi'),
('Quentin'),
('Ofelia'),
('Murray'),
('Monte'),
('Meagan'),
('Matilda'),
('Magdalena'),
('Leonardo'),
('Leila'),
('Leann'),
('Latisha'),
('Kasey'),
('Jeri'),
('Jasper'),
('Hans'),
('Georgina'),
('Erwin'),
('Ernie'),
('Eliza'),
('Curt'),
('Cruz'),
('Cornelia'),
('Bridgette'),
('Blaine'),
('Bianca'),
('Bettye'),
('Benito'),
('Barbra'),
('August'),
('Audra'),
('Agustin'),
('Wilfredo'),
('Vance'),
('Valarie'),
('Tyson'),
('Tia'),
('Terrie'),
('Son'),
('Sharron'),
('Ruthie'),
('Rosalyn'),
('Rhoda'),
('Rae'),
('Nola'),
('Nelda'),
('Minerva'),
('Michel'),
('Mia'),
('Lilly'),
('Lidia'),
('Letha'),
('Lenore'),
('Joaquin'),
('Jarrod'),
('Jami'),
('Jamal'),
('Ila'),
('Hilary'),
('Harrison'),
('Harlan'),
('Haley'),
('Greta'),
('Gregorio'),
('Flossie'),
('Estela'),
('Ericka'),
('Elnora'),
('Elliott'),
('Elliot'),
('Earline'),
('Dona'),
('Desmond'),
('Denis'),
('Darwin'),
('Damien'),
('Corrine'),
('Concepcion'),
('Clarissa'),
('Chandra'),
('Catalina'),
('Burton'),
('Buddy'),
('Brianna'),
('Brady'),
('Bernadine'),
('Bart'),
('Ava'),
('Ariel'),
('Ali'),
('Alexandria'),
('Adolfo'),
('Adela'),
('Zelma'),
('Yong'),
('Xavier'),
('Williams'),
('Tania'),
('Tameka'),
('Tabatha'),
('Solomon'),
('Sofia'),
('Serena'),
('Scotty'),
('Saundra'),
('Roscoe'),
('Rory'),
('Rod'),
('Rob'),
('Quinton'),
('Penelope'),
('Pearlie'),
('Odessa'),
('Odell'),
('Noreen'),
('Norbert'),
('Nolan'),
('Neva'),
('Nannie'),
('Moises'),
('Milagros'),
('Melisa'),
('Marylou'),
('Marlin'),
('Malinda'),
('Loraine'),
('Lacy'),
('Kermit'),
('Kendrick'),
('Karina'),
('Jeanie'),
('Hillary'),
('Harriett'),
('Hal'),
('Eve'),
('Esteban'),
('Esmeralda'),
('Emilia'),
('Elwood'),
('Elvin'),
('Darius'),
('Brain'),
('Blair'),
('Benita'),
('Avis'),
('Ashlee'),
('Anton'),
('Amie'),
('Alva'),
('Allyson'),
('Allie'),
('Thurman'),
('Thaddeus'),
('Tanisha'),
('Selena'),
('Rusty'),
('Rosalinda'),
('Rickie'),
('Reggie'),
('Raphael'),
('Noemi'),
('Nita'),
('Ned'),
('Monty'),
('Mason'),
('Marcie'),
('Marcel'),
('Mallory'),
('Louisa'),
('Lorrie'),
('Liza'),
('Lilia'),
('Katy'),
('Julianne'),
('Joesph'),
('Jerri'),
('Jeffry'),
('Jackson'),
('Graham'),
('Gay'),
('Fidel'),
('Fabian'),
('Elisha'),
('Elinor'),
('Earnestine'),
('Earlene'),
('Darcy'),
('Dane'),
('Cliff'),
('Clare'),
('Carmella'),
('Carlene'),
('Bryon'),
('Avery'),
('Armand'),
('Annabelle'),
('Alvaro'),
('Althea'),
('Alejandra'),
('Alana'),
('Yesenia'),
('Wiley'),
('Vaughn'),
('Valeria'),
('Trinidad'),
('Tammi'),
('Suzette'),
('Roxie'),
('Roslyn'),
('Rodrigo'),
('Rocco'),
('Rigoberto'),
('Ophelia'),
('Numbers'),
('Norris'),
('Nona'),
('Noe'),
('Nanette'),
('Nadia'),
('Mitzi'),
('Millard'),
('Melva'),
('Maryanne'),
('Maricela'),
('Mari'),
('Margery'),
('Madge'),
('Luann'),
('Loyd'),
('Lina'),
('Lilian'),
('Lawanda'),
('Lavonne'),
('Lavern'),
('Lane'),
('Lakisha'),
('Kirby'),
('Kenya'),
('Kaye'),
('Kathrine'),
('Kathie'),
('Juliana'),
('Ivory'),
('Isaiah'),
('Ilene'),
('Hollis'),
('Gus'),
('Gonzalo'),
('Georgette'),
('Fran'),
('Evangeline'),
('Edwina'),
('Dollie'),
('Dion'),
('Diego'),
('Derick'),
('Denny'),
('Deanne'),
('Corine'),
('Colette'),
('Claudine'),
('Clair'),
('Chrystal'),
('Chong'),
('Charmaine'),
('Alphonso'),
('Alissa'),
('Aline'),
('Adolph'),
('Wendi'),
('Ward'),
('Vince'),
('Vilma'),
('Vern'),
('Ulysses'),
('Tristan'),
('Tessa'),
('Susanna'),
('Sheree'),
('Sebastian'),
('Scot'),
('Savannah'),
('Sasha'),
('Rosella'),
('Roseann'),
('Rosanne'),
('Romeo'),
('Riley'),
('Reva'),
('Reed'),
('Quincy'),
('Nickolas'),
('Natalia'),
('Merrill'),
('Maynard'),
('Maxwell'),
('Mauricio'),
('Marva'),
('Marietta'),
('Marci'),
('Madelyn'),
('Lynnette'),
('Liliana'),
('Lessie'),
('Leonor'),
('Lakeisha'),
('Katelyn'),
('Juliette'),
('Josefa'),
('Johnie'),
('Jefferson'),
('Jayson'),
('Jarvis'),
('Janna'),
('Issac'),
('Imelda'),
('Hiram'),
('Heriberto'),
('Gena'),
('Gavin'),
('Federico'),
('Emery'),
('Elvis'),
('Elvia'),
('Eddy'),
('Dusty'),
('Donovan'),
('Donnell'),
('Deirdre'),
('Deidre'),
('Deena'),
('Davis'),
('Dante'),
('Coy'),
('Corina'),
('Cole'),
('Colby'),
('Clement'),
('Chasity'),
('Carly'),
('Bruno'),
('Briana'),
('Berta'),
('Bernie'),
('Bernardo'),
('Basil'),
('Aurelia'),
('Augustine'),
('Augusta'),
('Arline'),
('Araceli'),
('Anastasia'),
('Amalia'),
('Alyce'),
('Winfred'),
('Wilda'),
('Weldon'),
('Vito'),
('Twila'),
('Truman'),
('Trenton'),
('Tisha'),
('Tamra'),
('Tamera'),
('Stevie'),
('Stefan'),
('Silas'),
('Sanford'),
('Rowena'),
('Rosanna'),
('Rhea'),
('Reyna'),
('Queen'),
('Phoebe'),
('Nestor'),
('Millicent'),
('Merlin'),
('Maura'),
('Maryellen'),
('Marquita'),
('Mariana'),
('Marcelino'),
('Mara'),
('Mai'),
('Madeleine'),
('Lolita'),
('Liz'),
('Linwood'),
('Lelia'),
('Leanna'),
('Lauri'),
('Kurtis'),
('Katina'),
('Katheryn'),
('Karyn'),
('Kaitlin'),
('Juliet'),
('Johnathon'),
('Jannie'),
('Janell'),
('Jame'),
('Jacklyn'),
('Isidro'),
('Irwin'),
('Ines'),
('Hunter'),
('Hollie'),
('Hester'),
('Helga'),
('Harris'),
('Hallie'),
('Gilda'),
('Galen'),
('Freida'),
('Frederic'),
('Francesca'),
('Florine'),
('Fanny'),
('Evangelina'),
('Erna'),
('Enid'),
('Dudley'),
('Donny'),
('Dionne'),
('Dick'),
('Diann'),
('Denver'),
('Delmar'),
('Concetta'),
('Collin'),
('Coleen'),
('Cherry'),
('Charley'),
('Cathryn'),
('Casandra'),
('Carter'),
('Carrol'),
('Carmelo'),
('Carlo'),
('Carissa'),
('Brock'),
('Britney'),
('Brigitte'),
('Bridgett'),
('Beryl'),
('Bertie'),
('Beau'),
('Barney'),
('Aurelio'),
('Art'),
('Annmarie'),
('Angelita'),
('Angelique'),
('Amparo'),
('Alyson'),
('Alfreda'),
('Alba'),
('Aisha'),
('Zelda'),
('Zachery'),
('Wilmer'),
('Wilford'),
('Vonda'),
('Tori'),
('Theron'),
('Terra'),
('Sonny'),
('Sierra'),
('Shelton'),
('Sharlene'),
('Selina'),
('Scottie'),
('Sang'),
('Rosalia'),
('Rocio'),
('Robby'),
('Renae'),
('Refugio'),
('Raymundo'),
('Pasquale'),
('Pansy'),
('Pamala'),
('Octavio'),
('Octavia'),
('Noelle'),
('Nelly'),
('Nan'),
('Monroe'),
('Monika'),
('Mohammad'),
('Mina'),
('Michell'),
('Michaela'),
('Mellisa'),
('Mariano'),
('Margot'),
('Louella'),
('Lincoln'),
('Libby'),
('Letitia'),
('Leta'),
('Lesa'),
('Leonel'),
('Leeann'),
('Latanya'),
('Lashonda'),
('Landon'),
('Lakesha'),
('Kitty'),
('Kimberlee'),
('Kathi'),
('Kaitlyn'),
('Justina'),
('Judi'),
('Josue'),
('Jasmin'),
('Jade'),
('Jacques'),
('Isabella'),
('Hung'),
('Houston'),
('Hong'),
('Herminia'),
('Gussie'),
('German'),
('Germaine'),
('Geri'),
('Genaro'),
('Gayla'),
('Fletcher'),
('Felecia'),
('Errol'),
('Emory'),
('Emilie'),
('Emerson'),
('Elda'),
('Elba'),
('Edythe'),
('Edwardo'),
('Dorian'),
('Doretha'),
('Dirk'),
('Dessie'),
('Denice'),
('Deidra'),
('Deann'),
('Dayna'),
('Daren'),
('Danial'),
('Dalton'),
('Cortney'),
('Cornell'),
('Chelsey'),
('Celina'),
('Caryn'),
('Carson'),
('Camilla'),
('Buford'),
('Brandie'),
('Branden'),
('Booker'),
('Beverley'),
('Bennett'),
('Ashleigh'),
('Arron'),
('Antony'),
('Antionette'),
('Allene'),
('Adelaide'),
('Adan'),
('Abbie'),
('Zane'),
('Winona'),
('Wilhelmina'),
('Wilburn'),
('Virgina'),
('Vida'),
('Vernice'),
('Verda'),
('Veda'),
('Valentin'),
('Treva'),
('Tillie'),
('Theodora'),
('Theo'),
('Thanh'),
('Thad'),
('Tessie'),
('Teresita'),
('Tera'),
('Tawana'),
('Taryn'),
('Sung'),
('Sun'),
('Soledad'),
('Shonda'),
('Shiela'),
('Shellie'),
('Seymour'),
('Russ'),
('Rosita'),
('Rosalee'),
('Ronny'),
('Robbin'),
('Rich'),
('Retha'),
('Reid'),
('Rebeca'),
('Randell'),
('Racheal'),
('Portia'),
('Pattie'),
('Paris'),
('Oma'),
('Nilda'),
('Myles'),
('Morton'),
('Mohammed'),
('Mitchel'),
('Minh'),
('Migdalia'),
('Mervin'),
('Merry'),
('Maurine'),
('Maudie'),
('Maryjane'),
('Marybeth'),
('Marisela'),
('Marilynn'),
('Marianna'),
('Malissa'),
('Major'),
('Lucretia'),
('Lucien'),
('Luciano'),
('Lona'),
('Lon'),
('Leora'),
('Lazaro'),
('Latrice'),
('Lashawn'),
('Krystle'),
('Kennith'),
('Karrie'),
('Jonas'),
('Jena'),
('Jeanna'),
('Jarrett'),
('Jaqueline'),
('Janel'),
('Jamey'),
('Jamel'),
('Jacquline'),
('Ivette'),
('Iona'),
('Iola'),
('Hortencia'),
('Herschel'),
('Hanna'),
('Guillermina'),
('Griselda'),
('Giovanni'),
('Garth'),
('Freeman'),
('Forest'),
('Ferdinand'),
('Fatima'),
('Ezra'),
('Eugenio'),
('Ernestina'),
('Erich'),
('Eloisa'),
('Elida'),
('Elia'),
('Eleanore'),
('Duncan'),
('Dottie'),
('Dinah'),
('Destiny'),
('Deon'),
('Demetria'),
('Delphine'),
('Delma'),
('Delilah'),
('Debby'),
('Dara'),
('Danna'),
('Daniela'),
('Danette'),
('Cyrus'),
('Cyril'),
('Cindi'),
('Chung'),
('Christin'),
('Christen'),
('Chloe'),
('Chi'),
('Chantel'),
('Chance'),
('Chadwick'),
('Celestine'),
('Catrina'),
('Carmine'),
('Cari'),
('Caren'),
('Brooks'),
('Britt'),
('Brianne'),
('Birdie'),
('Bess'),
('Berry'),
('Belle'),
('Athena'),
('Arnulfo'),
('Arleen'),
('Anderson'),
('Alphonse'),
('Alene'),
('Alecia'),
('Aldo'),
('Agatha'),
('Adrianne'),
('Adelina'),
('Abdul'),
('Zoila'),
('Zoe'),
('Zenaida'),
('Zella'),
('Wyatt'),
('Wilton'),
('Weston'),
('Vesta'),
('Vernell'),
('Venus'),
('Valentine'),
('Valencia'),
('Val'),
('Vada'),
('Una'),
('Trey'),
('Tory'),
('Tomasa'),
('Tiffani'),
('Tiara'),
('Tanner'),
('Tana'),
('Tamela'),
('Suzan'),
('Sol'),
('Shayla'),
('Shanda'),
('Santa'),
('Sandi'),
('Samatha'),
('Rubin'),
('Royal'),
('Roxanna'),
('Roxana'),
('Rosendo'),
('Roseanne'),
('Rodrick'),
('Rico'),
('Reta'),
('Renita'),
('Reinaldo'),
('Reina'),
('Rafaela'),
('Quinn'),
('Pricilla'),
('Pilar'),
('Phillis'),
('Pearline'),
('Paulina'),
('Parker'),
('Osvaldo'),
('Oralia'),
('Olin'),
('Normand'),
('Norberto'),
('Nigel'),
('Nicky'),
('Napoleon'),
('Mitch'),
('Missy'),
('Mirna'),
('Milford'),
('Michal'),
('Melodie'),
('Mellissa'),
('Mayme'),
('Maya'),
('Matilde'),
('Marquis'),
('Marjory'),
('Marge'),
('Margarito'),
('Marcela'),
('Mandi'),
('Madonna'),
('Lyn'),
('Lyman'),
('Lura'),
('Lucio'),
('Lorri'),
('Lettie'),
('Les'),
('Leota'),
('Leopoldo'),
('Lemuel'),
('Lauretta'),
('Larissa'),
('Lanny'),
('Kylie'),
('Kristal'),
('Kisha'),
('Kira'),
('Kieth'),
('Kerrie'),
('Kareem'),
('Jung'),
('Jules'),
('Judson'),
('Josiah'),
('Josef'),
('Jerrod'),
('Jerold'),
('Jayme'),
('Jarred'),
('Jamar'),
('Jamaal'),
('Jae'),
('Isiah'),
('Isabell'),
('Ione'),
('India'),
('Hershel'),
('Haydee'),
('Harriette'),
('Gisela'),
('Gino'),
('Gillian'),
('Gil'),
('Fritz'),
('Foster'),
('Flor'),
('Filomena'),
('Felicita'),
('Faustino'),
('Evette'),
('Everette'),
('Erlinda'),
('Emile'),
('Elyse'),
('Eloy'),
('Elouise'),
('Elmo'),
('Ellie'),
('Elissa'),
('Eliseo'),
('Efren'),
('Edgardo'),
('Earle'),
('Dorris'),
('Donn'),
('Dominga'),
('Dino'),
('Dewitt'),
('Delois'),
('Deandre'),
('Dannie'),
('Damaris'),
('Dalia'),
('Cristy'),
('Cori'),
('Coleman'),
('Claudio'),
('Christoper'),
('Christal'),
('Charla'),
('Chang'),
('Cathrine'),
('Catharine'),
('Carmelita'),
('Carmel'),
('Caridad'),
('Candida'),
('Burt'),
('Brenton'),
('Breanna'),
('Brant'),
('Boris'),
('Bettina'),
('Berniece'),
('Belva'),
('Bella'),
('Barton'),
('Barb'),
('Aron'),
('Aretha'),
('Antwan'),
('Annetta'),
('Annemarie'),
('Alvina'),
('Alina'),
('Alfonzo'),
('Alexa'),
('Aletha'),
('Alec'),
('Alden'),
('Ahmad'),
('Abe'),
('Zachariah'),
('Yadira'),
('Willy'),
('Werner'),
('Walker'),
('Waldo'),
('Viviana'),
('Violeta'),
('Vikki'),
('Verla'),
('Venessa'),
('Velda'),
('Valorie'),
('Valentina'),
('Tyron'),
('Tyrell'),
('Tyree'),
('Tyra'),
('Twyla'),
('Trista'),
('Tosha'),
('Tonja'),
('Tod'),
('Tobias'),
('Tiana'),
('Theda'),
('Thea'),
('Teodoro'),
('Tena'),
('Tatiana'),
('Tad'),
('Suzanna'),
('Sunny'),
('Stephenie'),
('Stephany'),
('Stanford'),
('Stacia'),
('Shelli'),
('Shayne'),
('Sharyn'),
('Sharonda'),
('Shantel'),
('Shanon'),
('Sal'),
('Sabina'),
('Rupert'),
('Roxann'),
('Roselyn'),
('Rosalina'),
('Rosalba'),
('Romona'),
('Roma'),
('Rolland'),
('Robt'),
('Richie'),
('Richelle'),
('Reyes'),
('Renate'),
('Renata'),
('Raven'),
('Raleigh'),
('Quintin'),
('Princess'),
('Prince'),
('Precious'),
('Porfirio'),
('Philomena'),
('Perla'),
('Otha'),
('Orval'),
('Oren'),
('Ona'),
('Omer'),
('Oleta'),
('Olen'),
('Odis'),
('Noble'),
('Nikita'),
('Niki'),
('Nicki'),
('Newton'),
('Nereida'),
('Nedra'),
('Nathalie'),
('Nakia'),
('Myrtis'),
('Mozelle'),
('Moshe'),
('Mohamed'),
('Misti'),
('Mimi'),
('Milo'),
('Mikel'),
('Micaela'),
('Melvina'),
('Mel'),
('Mei'),
('Mckinley'),
('Maximo'),
('Mauro'),
('Maud'),
('Marlys'),
('Marlyn'),
('Marlena'),
('Markus'),
('Mariam'),
('Mariah'),
('Marcelo'),
('Marcelle'),
('Man'),
('Majorie'),
('Magda'),
('Mac'),
('Lyndon'),
('Lucila'),
('Luanne'),
('Louann'),
('Lorine'),
('Lizette'),
('Lindy'),
('Lia'),
('Leonora'),
('Leone'),
('Lenny'),
('Lenard'),
('Leilani'),
('Lawerence'),
('Latricia'),
('Latonia'),
('Laquita'),
('Lan'),
('Kyla'),
('Kory'),
('Kip'),
('Kia'),
('Keven'),
('Keshia'),
('Kesha'),
('Kenton'),
('Keenan'),
('Karon'),
('Karol'),
('Julianna'),
('Juli'),
('Jude'),
('Jovita'),
('Josette'),
('Jonah'),
('Johnna'),
('Joelle'),
('Jesica'),
('Jerrold'),
('Jefferey'),
('Jed'),
('Jeana'),
('Jannette'),
('Jamison'),
('Jacquelin'),
('Jacque'),
('Ivonne'),
('Isaias'),
('Ima'),
('Idella'),
('Huey'),
('Horacio'),
('Hipolito'),
('Hilton'),
('Hildegard'),
('Hilario'),
('Herlinda'),
('Hellen'),
('Hayley'),
('Hassan'),
('Hank'),
('Gregoria'),
('Giuseppe'),
('Ginny'),
('Gertie'),
('Gerri'),
('Geraldo'),
('Georgianna'),
('Georgiana'),
('Genoveva'),
('Gaye'),
('Garfield'),
('Gabriella'),
('Fredric'),
('Floy'),
('Florencio'),
('Fermin'),
('Fabiola'),
('Eulalia'),
('Enoch'),
('Easter'),
('Dwain'),
('Dulce'),
('Dovie'),
('Dortha'),
('Dorene'),
('Dorcas'),
('Donte'),
('Dong'),
('Dillon'),
('Demarcus'),
('Delmer'),
('Delfina'),
('Debrah'),
('Debi'),
('Darrick'),
('Darleen'),
('Dario'),
('Danita'),
('Danelle'),
('Damion'),
('Cristal'),
('Corrie'),
('Cordelia'),
('Columbus'),
('Collette'),
('Cletus'),
('Clementine'),
('Chiquita'),
('Chet'),
('Chauncey'),
('Chastity'),
('Charline'),
('Charleen'),
('Chantal'),
('Chanel'),
('Candi'),
('Burl'),
('Bud'),
('Brice'),
('Brenna'),
('Brendon'),
('Bradly'),
('Bertram'),
('Belen'),
('Barrett'),
('Aura'),
('Augustus'),
('Asia'),
('Ariana'),
('Antonette'),
('Antone'),
('Annamarie'),
('Anissa'),
('Anibal'),
('Andria'),
('Andra'),
('Amado'),
('Alpha'),
('Alaina'),
('Ahmed'),
('Adell'),
('Adalberto'),
('Abram'),
('Zoraida'),
('Zola'),
('Zackary'),
('Zack'),
('Yoshiko'),
('Yolonda'),
('Yasmin'),
('Xiomara'),
('Winnifred'),
('Winford'),
('Windy'),
('Willian'),
('Wilber'),
('Wes'),
('Waylon'),
('Warner'),
('Walton'),
('Wally'),
('Von'),
('Virgilio'),
('Vincenzo'),
('Vickey'),
('Vergie'),
('Venita'),
('Tuan'),
('Tressa'),
('Tresa'),
('Trena'),
('Toya'),
('Toney'),
('Tomeka'),
('Titus'),
('Tiffanie'),
('Tierra'),
('Thuy'),
('Teressa'),
('Terese'),
('Teena'),
('Tawnya'),
('Tawanda'),
('Susannah'),
('Starr'),
('Starla'),
('Stanton'),
('Soon'),
('Sid'),
('Shon'),
('Shirlene'),
('Sherwood'),
('Sherrill'),
('Sherita'),
('Sherie'),
('Shayna'),
('Sharla'),
('Shara'),
('Shante'),
('Shanta'),
('Shamika'),
('Shameka'),
('Shalonda'),
('Shaina'),
('Shad'),
('Scarlett'),
('Santo'),
('Sanjuanita'),
('Sanjuana'),
('Samual'),
('Salina'),
('Ruthann'),
('Rueben'),
('Rudolf'),
('Rubye'),
('Roxane'),
('Rosina'),
('Roseanna'),
('Rona'),
('Rolf'),
('Rhiannon'),
('Rhett'),
('Rey'),
('Renato'),
('Renaldo'),
('Raymon'),
('Rayford'),
('Rashad'),
('Prudence'),
('Porter'),
('Phyliss'),
('Phylis'),
('Phuong'),
('Pennie'),
('Peggie'),
('Palmer'),
('Oswaldo'),
('Orpha'),
('Nydia'),
('Novella'),
('Nova'),
('Nila'),
('Nicola'),
('Neville'),
('Nena'),
('Natividad'),
('Nathanial'),
('Nathanael'),
('Nannette'),
('Nanci'),
('Myriam'),
('Mose'),
('Modesto'),
('Mittie'),
('Mirian'),
('Mireya'),
('Miquel'),
('Milan'),
('Michale'),
('Meta'),
('Melony'),
('Melina'),
('Meaghan'),
('Maybelle'),
('Maxie'),
('Marylin'),
('Marvel'),
('Marti'),
('Marquerite'),
('Marnie'),
('Marita'),
('Marilee'),
('Mariann'),
('Margarette'),
('Marcellus'),
('Marcelina'),
('Maranda'),
('Manual'),
('Malik'),
('Malcom'),
('Magnolia'),
('Magdalene'),
('Mackenzie'),
('Lynwood'),
('Lyndsey'),
('Lulu'),
('Luigi'),
('Lucius'),
('Lucie'),
('Lovie'),
('Lorenza'),
('Lonny'),
('Long'),
('Lizbeth'),
('Lizabeth'),
('Lissette'),
('Lisette'),
('Lise'),
('Lino'),
('Linnie'),
('Linnea'),
('Lida'),
('Len'),
('Leisa'),
('Leif'),
('Leatrice'),
('Leandro'),
('Lavon'),
('Lavina'),
('Laurette'),
('Laureen'),
('Latosha'),
('Lashanda'),
('Lakeshia'),
('Lacie'),
('Kyung'),
('Kyra'),
('Kyong'),
('Kristofer'),
('Kraig'),
('Kori'),
('Korey'),
('King'),
('Keneth'),
('Keely'),
('Kassandra'),
('Karolyn'),
('Karissa'),
('Kami'),
('Kala'),
('Joycelyn'),
('Jospeh'),
('Josephina'),
('Jordon'),
('Jonnie'),
('Joleen'),
('Johnson'),
('Joellen'),
('Joanie'),
('Jerrie'),
('Jerrell'),
('Jeromy'),
('Jere'),
('Jeramy'),
('Jenni'),
('Jennette'),
('Jeniffer'),
('Jenelle'),
('Jeanetta'),
('Jeane'),
('Jarod'),
('Janina'),
('Janeen'),
('Jamila'),
('Jaimie'),
('Jada'),
('Jacinto'),
('Isreal'),
('Inge'),
('Ilse'),
('Ileana'),
('Ike'),
('Hyman'),
('Hoyt'),
('Hosea'),
('Hortense'),
('Holli'),
('Hobert'),
('Hermelinda'),
('Herb'),
('Haywood'),
('Hayden'),
('Harland'),
('Hailey'),
('Hai'),
('Granville'),
('Graig'),
('Giselle'),
('Gerda'),
('Georgie'),
('Gaylord'),
('Gaston'),
('Garret'),
('Garnet'),
('Franklyn'),
('Francesco'),
('Florida'),
('Florentino'),
('Filiberto'),
('Felton'),
('Felisha'),
('Felipa'),
('Felicitas'),
('Fawn'),
('Fausto'),
('Farrah'),
('Ezequiel'),
('Ezekiel'),
('Evonne'),
('Evie'),
('Eusebio'),
('Erasmo'),
('Era'),
('Enriqueta'),
('Ena'),
('Emmitt'),
('Elroy'),
('Ellsworth'),
('Elizebeth'),
('Elenor'),
('Eldridge'),
('Elden'),
('Elaina'),
('Edmundo'),
('Edison'),
('Edie'),
('Douglass'),
('Dorsey'),
('Dorinda'),
('Dori'),
('Donita'),
('Domenic'),
('Dian'),
('Deshawn'),
('Del'),
('Deangelo'),
('Dawna'),
('Darron'),
('Daron'),
('Daria'),
('Darell'),
('Darci'),
('Danilo'),
('Daniella'),
('Cristopher'),
('Cristobal'),
('Cristine'),
('Cortez'),
('Corinna'),
('Cordell'),
('Coral'),
('Colton'),
('Clemente'),
('Claud'),
('Cinthia'),
('Chrissy'),
('Cheryle'),
('Cherly'),
('Chelsie'),
('Chas'),
('Charisse'),
('Chanda'),
('Cedrick'),
('Catina'),
('Cathie'),
('Caryl'),
('Carolee'),
('Carman'),
('Carlotta'),
('Carleen'),
('Carina'),
('Candelaria'),
('Caitlyn'),
('Buster'),
('Buck'),
('Brook'),
('Broderick'),
('Brittani'),
('Brigette'),
('Boyce'),
('Bonny'),
('Blanch'),
('Bernita'),
('Benton'),
('Benedict'),
('Bambi'),
('Astrid'),
('Ashton'),
('Asa'),
('Artie'),
('Arnoldo'),
('Armida'),
('Arlie'),
('Arlen'),
('Ardith'),
('Ardis'),
('Arden'),
('Aracely'),
('Antione'),
('Anh'),
('Andreas'),
('Anabel'),
('Ami'),
('Ambrose'),
('Altagracia'),
('Alonso'),
('Aleta'),
('Alesia'),
('Alesha'),
('Alda'),
('Albina'),
('Alanna'),
('Adrianna'),
('Adriane'),
('Adelaida'),
('Abbey'),
('Zulma'),
('Zula'),
('Zora'),
('Zona'),
('Zina'),
('Zenobia'),
('Zena'),
('Zandra'),
('Zaida'),
('Yoko'),
('Yetta'),
('Wynona'),
('Willene'),
('Wanita'),
('Vonnie'),
('Viva'),
('Vita'),
('Vina'),
('Vicenta'),
('Verona'),
('Vernita'),
('Vernie'),
('Velva'),
('Velia'),
('Trish'),
('Tressie'),
('Tracee'),
('Tiffiny'),
('Thomasina'),
('Thersa'),
('Tess'),
('Teodora'),
('Tenisha'),
('Tawanna'),
('Tarsha'),
('Tanika'),
('Tangela'),
('Tanesha'),
('Tamiko'),
('Tamie'),
('Tamatha'),
('Tamar'),
('Talia'),
('Syble'),
('Suzy'),
('Suzie'),
('Susann'),
('Sunshine'),
('Stormy'),
('Stephine'),
('Stephani'),
('Stephaine'),
('Stefani'),
('Star'),
('Siobhan'),
('Simona'),
('Sigrid'),
('Sibyl'),
('Shirly'),
('Shirlee'),
('Sherryl'),
('Sherron'),
('Sheron'),
('Sherilyn'),
('Shena'),
('Shay'),
('Shawanda'),
('Shasta'),
('Sharen'),
('Sharee'),
('Shantell'),
('Shannan'),
('Shanita'),
('Shanika'),
('Shani'),
('Shanell'),
('Shandra'),
('Sarita'),
('Sade'),
('Sabra'),
('Sabine'),
('Rufina'),
('Rosaura'),
('Rosaria'),
('Rosalva'),
('Rosaline'),
('Ronna'),
('Romana'),
('Rolanda'),
('Rina'),
('Renea'),
('Regan'),
('Rashida'),
('Randa'),
('Racquel'),
('Pinkie'),
('Paola'),
('Palma'),
('Page'),
('Ouida'),
('Otilia'),
('Oliva'),
('Odette'),
('Ocie'),
('Norine'),
('Norene'),
('Noelia'),
('Ninfa'),
('Nilsa'),
('Nidia'),
('Nicolette'),
('Nicolasa'),
('Nichol'),
('Nichelle'),
('Nia'),
('Nelle'),
('Nella'),
('Nelida'),
('Nakisha'),
('Nada'),
('Myrtice'),
('Myong'),
('Mozell'),
('Moira'),
('Modesta'),
('Mirta'),
('Mira'),
('Mindi'),
('Milissa'),
('Mickie'),
('Meryl'),
('Mercy'),
('Melonie'),
('Meg'),
('Mee'),
('Mechelle'),
('Mazie'),
('Mathilda'),
('Marylyn'),
('Marylee'),
('Maryjo'),
('Martine'),
('Marry'),
('Marlo'),
('Marilou'),
('Mariela'),
('Maribeth'),
('Margarete'),
('Malia'),
('Maira'),
('Maegan'),
('Madison'),
('Machelle'),
('Lyndsay'),
('Lyla'),
('Lyda'),
('Lupita'),
('Lue'),
('Lucienne'),
('Luciana'),
('Luana'),
('Lorretta'),
('Lorinda'),
('Lorelei'),
('Loreen'),
('Lita'),
('Lissa'),
('Linsey'),
('Linh'),
('Linette'),
('Lin'),
('Liane'),
('Liana'),
('Lesli'),
('Leslee'),
('Lennie'),
('Leesa'),
('Leda'),
('Leatha'),
('Leandra'),
('Lavonda'),
('Lavinia'),
('Lavada'),
('Laurene'),
('Larue'),
('Lanita'),
('Lani'),
('Lanette'),
('Lai'),
('Laci'),
('Kylee'),
('Kum'),
('Krystyna'),
('Kristyn'),
('Kristian'),
('Kristan'),
('Kizzy'),
('Kirstin'),
('Kimberely'),
('Kiara'),
('Kenyatta'),
('Kenna'),
('Kelsie'),
('Keli'),
('Keiko'),
('Kecia'),
('Kaylee'),
('Kathyrn'),
('Kathryne'),
('Kathlyn'),
('Kathlene'),
('Kasandra'),
('Karri'),
('Karlene'),
('Karie'),
('Karan'),
('Kandy'),
('Kandice'),
('Kandi'),
('Kandace'),
('Kacie'),
('Kaci'),
('Kacey'),
('Julissa'),
('Julieta'),
('Juliann'),
('Judie'),
('Jonna'),
('Jolynn'),
('Joi'),
('Johnetta'),
('Joetta'),
('Joana'),
('Jettie'),
('Jerilyn'),
('Jeraldine'),
('Jenniffer'),
('Jazmin'),
('Jaunita'),
('Janey'),
('Janene'),
('Janae'),
('Jammie'),
('Jackeline'),
('Jacinta'),
('Jacalyn'),
('Isela'),
('Irena'),
('Ingeborg'),
('Inga'),
('Ilona'),
('Iliana'),
('Idalia'),
('Huong'),
('Hulda'),
('Hui'),
('Hortensia'),
('Hoa'),
('Hettie'),
('Hedwig'),
('Gretta'),
('Golda'),
('Glory'),
('Gladis'),
('Gisele'),
('Giovanna'),
('Geralyn'),
('Georgetta'),
('Gemma'),
('Gaynell'),
('Fonda'),
('Florene'),
('Fiona'),
('Ferne'),
('Felisa'),
('Felice'),
('Felica'),
('Fallon'),
('Evon'),
('Evelia'),
('Evalyn'),
('Eun'),
('Eugenie'),
('Ethelyn'),
('Estrella'),
('Enedina'),
('Emogene'),
('Emelia'),
('Elvera'),
('Elna'),
('Elmira'),
('Elfriede'),
('Eleanora'),
('Eldora'),
('Elana'),
('Eden'),
('Edelmira'),
('Eda'),
('Eboni'),
('Eartha'),
('Dorthea'),
('Dorotha'),
('Domenica'),
('Desirae'),
('Denna'),
('Deneen'),
('Demetra'),
('Delphia'),
('Delora'),
('Dedra'),
('Debbra'),
('Deb'),
('Davina'),
('Davida'),
('Darline'),
('Darcie'),
('Danyelle'),
('Dannielle'),
('Daniele'),
('Danica'),
('Dani'),
('Cythia'),
('Cyndi'),
('Cristin'),
('Cristi'),
('Corrina'),
('Corene'),
('Corazon'),
('Cleta'),
('Claribel'),
('Cinda'),
('Cierra'),
('Ciara'),
('Chun'),
('Christiane'),
('Christiana'),
('Christene'),
('Christel'),
('Cheyenne'),
('Cherrie'),
('Cherri'),
('Cherise'),
('Charolette'),
('Charlette'),
('Charissa'),
('Chantelle'),
('Chana'),
('Cecily'),
('Cathi'),
('Cassidy'),
('Carri'),
('Caron'),
('Carolynn'),
('Carolann'),
('Carma'),
('Carlyn'),
('Carlota'),
('Carin'),
('Candis'),
('Candance'),
('Cami'),
('Buffy'),
('Bree'),
('Breanne'),
('Brandee'),
('Bobbye'),
('Berenice'),
('Bea'),
('Barbie'),
('Bailey'),
('Ayesha'),
('Awilda'),
('Aurea'),
('Audry'),
('Ashly'),
('Ashlie'),
('Ashely'),
('Asha'),
('Arlette'),
('Arielle'),
('Arcelia'),
('Antonina'),
('Anneliese'),
('Annabel'),
('Anitra'),
('Anika'),
('Anglea'),
('Angella'),
('Anastacia'),
('America'),
('Amada'),
('Alysia'),
('Alycia'),
('Almeda'),
('Alida'),
('Alexia'),
('Alethea'),
('Alena'),
('Albertine'),
('Albertha'),
('Aja'),
('Agustina'),
('Afton'),
('Adria'),
('Adina'),
('Adelle'),
('Adella'),
('Adelia'),
('Zulema'),
('Zofia'),
('Zita'),
('Yun'),
('Yuko'),
('Yukiko'),
('Yolando'),
('Yolande'),
('Ying'),
('Yen'),
('Yee'),
('Yanira'),
('Yang'),
('Yan'),
('Wonda'),
('Willia'),
('Willette'),
('Wei'),
('Waltraud'),
('Wai'),
('Vivienne'),
('Vivien'),
('Vivan'),
('Violette'),
('Vinnie'),
('Vincenza'),
('Veta'),
('Versie'),
('Vernetta'),
('Verlie'),
('Verlene'),
('Verena'),
('Verdie'),
('Verdell'),
('Veola'),
('Venice'),
('Vena'),
('Velvet'),
('Vella'),
('Vannessa'),
('Vanita'),
('Vanesa'),
('Vanda'),
('Vallie'),
('Valery'),
('Valda'),
('Usha'),
('Tyesha'),
('Twana'),
('Tuyet'),
('Trula'),
('Trudie'),
('Trudi'),
('Trinity'),
('Trang'),
('Towanda'),
('Toshiko'),
('Tonie'),
('Tonda'),
('Tomoko'),
('Tomika'),
('Tiny'),
('Tiesha'),
('Tianna'),
('Thu'),
('Thresa'),
('Thomasine'),
('Theresia'),
('Theola'),
('Thao'),
('Thalia'),
('Tesha'),
('Terresa'),
('Tereasa'),
('Tequila'),
('Tennille'),
('Tennie'),
('Temeka'),
('Tawny'),
('Tashia'),
('Tarah'),
('Tanna'),
('Tanja'),
('Tammara'),
('Tamica'),
('Tamesha'),
('Tamekia'),
('Tameika'),
('Tamala'),
('Tam'),
('Talitha'),
('Talisha'),
('Takisha'),
('Tabetha'),
('Syreeta'),
('Synthia'),
('Suzann'),
('Suk'),
('Suellen'),
('Sueann'),
('Sudie'),
('Stephane'),
('Steffanie'),
('Stefania'),
('Spring'),
('Soraya'),
('Sook'),
('Soo'),
('Song'),
('Sommer'),
('Solange'),
('Slyvia'),
('Skye'),
('Sindy'),
('Silvana'),
('Silva'),
('Signe'),
('Shu'),
('Shoshana'),
('Shonna'),
('Shona'),
('Shirleen'),
('Shira'),
('Shery'),
('Sherrell'),
('Sherlyn'),
('Sherly'),
('Sherley'),
('Shenita'),
('Shemika'),
('Shelba'),
('Shela'),
('Sheilah'),
('Shea'),
('Shawnna'),
('Shawnee'),
('Shawnda'),
('Shawana'),
('Shavonne'),
('Shavon'),
('Shaunna'),
('Sharyl'),
('Sharleen'),
('Sharita'),
('Shanice'),
('Shanelle'),
('Shaneka'),
('Shakira'),
('Sha'),
('Serina'),
('Selene'),
('Sebrina'),
('Scarlet'),
('Savanna'),
('Sarina'),
('Sari'),
('Santina'),
('Santana'),
('Sanora'),
('Samira'),
('Samara'),
('Salome'),
('Salena'),
('Sachiko'),
('Rubie'),
('Rozella'),
('Rosia'),
('Rosann'),
('Rosana'),
('Rosamond'),
('Ronni'),
('Roni'),
('Romelia'),
('Romaine'),
('Rochell'),
('Risa'),
('Rikki'),
('Retta'),
('Renetta'),
('Remedios'),
('Reiko'),
('Regenia'),
('Regena'),
('Reda'),
('Rebbecca'),
('Rebbeca'),
('Reatha'),
('Rayna'),
('Raylene'),
('Raye'),
('Rasheeda'),
('Randee'),
('Ranae'),
('Rana'),
('Ramonita'),
('Raina'),
('Raeann'),
('Rachell'),
('Rachele'),
('Quiana'),
('Queenie'),
('Qiana'),
('Porsha'),
('Piper'),
('Piedad'),
('Pia'),
('Petrina'),
('Penni'),
('Penney'),
('Pearlene'),
('Pearle'),
('Pauletta'),
('Patrina'),
('Patience'),
('Particia'),
('Pandora'),
('Pamella'),
('Pamelia'),
('Ozella'),
('Ossie'),
('Oneida'),
('Omega'),
('Olympia'),
('Odilia'),
('Obdulia'),
('Nyla'),
('Norah'),
('Noma'),
('Noella'),
('Nikole'),
('Nikia'),
('Nieves'),
('Nicolle'),
('Nicol'),
('Nickole'),
('Nickie'),
('Ngoc'),
('Nga'),
('Neta'),
('Nerissa'),
('Neoma'),
('Nelia'),
('Natosha'),
('Narcisa'),
('Naoma'),
('Nancie'),
('Nana'),
('Nakita'),
('Myung'),
('Myrtie'),
('Myrle'),
('Mui'),
('Mozella'),
('Monserrate'),
('Mirtha'),
('Mireille'),
('Minna'),
('Min'),
('Milagro'),
('Mila'),
('Mikki'),
('Mika'),
('Miguelina'),
('Micki'),
('Michiko'),
('Micheline'),
('Merri'),
('Merna'),
('Merlene'),
('Merilyn'),
('Meridith'),
('Meri'),
('Melynda'),
('Mellie'),
('Melissia'),
('Melany'),
('Melaine'),
('Meghann'),
('Meggan'),
('Mckenzie'),
('Maye'),
('Maybell'),
('Mathilde'),
('Masako'),
('Maryam'),
('Maryalice'),
('Marya'),
('Marquetta'),
('Marni'),
('Marna'),
('Marlen'),
('Marleen'),
('Marlana'),
('Markita'),
('Marilu'),
('Mariel'),
('Margurite'),
('Marguerita'),
('Margorie'),
('Margit'),
('Marget'),
('Margeret'),
('Margart'),
('Margarite'),
('Margaretta'),
('Margarett'),
('Margareta'),
('Maren'),
('Marceline'),
('Maple'),
('Manda'),
('Mana'),
('Mammie'),
('Malisa'),
('Malika'),
('Maida'),
('Maia'),
('Magen'),
('Magdalen'),
('Magaret'),
('Magan'),
('Magaly'),
('Madlyn'),
('Madie'),
('Madalyn'),
('Madaline'),
('Macy'),
('Macie'),
('Lynsey'),
('Lynelle'),
('Lynell'),
('Luvenia'),
('Lurline'),
('Luna'),
('Luise'),
('Ludie'),
('Lucrecia'),
('Lucina'),
('Loyce'),
('Lovella'),
('Louvenia'),
('Louanne'),
('Lory'),
('Loriann'),
('Loree'),
('Lore'),
('Lonna'),
('Loni'),
('Loma'),
('Loida'),
('Loan'),
('Livia'),
('Lisha'),
('Lisbeth'),
('Ling'),
('Lilla'),
('Lili'),
('Ligia'),
('Lien'),
('Librada'),
('Liberty'),
('Lezlie'),
('Lexie'),
('Letty'),
('Lesia'),
('Lera'),
('Leonore'),
('Leonila'),
('Leonie'),
('Leonarda'),
('Lenna'),
('Leighann'),
('Leeanne'),
('Leeanna'),
('Leana'),
('Layla'),
('Lawanna'),
('Lawana'),
('Lavonia'),
('Laverna'),
('Lavera'),
('Laurine'),
('Laurice'),
('Laure'),
('Launa'),
('Latrina'),
('Latoria'),
('Laticia'),
('Latia'),
('Latesha'),
('Latashia'),
('Lashunda'),
('Lasandra'),
('Laronda'),
('Larisa'),
('Larhonda'),
('Laraine'),
('Larae'),
('Lanell'),
('Laila'),
('Lady'),
('Kymberly'),
('Kym'),
('Krysta'),
('Kristel'),
('Kourtney'),
('Kindra'),
('Kimiko'),
('Kimbery'),
('Kimberlie'),
('Kimberli'),
('Kimber'),
('Kiley'),
('Kiesha'),
('Kiera'),
('Kiana'),
('Kenyetta'),
('Kenisha'),
('Kena'),
('Kellye'),
('Kellee'),
('Kelle'),
('Keesha'),
('Keena'),
('Kazuko'),
('Kaylene'),
('Kayleigh'),
('Kayleen'),
('Kattie'),
('Katrice'),
('Katlyn'),
('Katia'),
('Kati'),
('Kathey'),
('Kathern'),
('Katherin'),
('Kathe'),
('Katharina'),
('Kathaleen'),
('Kassie'),
('Kasie'),
('Karyl'),
('Karren'),
('Karmen'),
('Karma'),
('Karleen'),
('Karine'),
('Karey'),
('Kam'),
('Kali'),
('Kaley'),
('Kacy'),
('Jutta'),
('Junita'),
('Julienne'),
('Juliane'),
('Julee'),
('Joye'),
('Joslyn'),
('Joselyn'),
('Jonelle'),
('Jonell'),
('Jona'),
('Jolie'),
('Jolanda'),
('Johana'),
('Joella'),
('Joeann'),
('Jodee'),
('Jina'),
('Jin'),
('Jesusa'),
('Jessi'),
('Jessenia'),
('Jesenia'),
('Jennefer'),
('Jenise'),
('Jenine'),
('Jenice'),
('Jeni'),
('Jenette'),
('Jenell'),
('Jen'),
('Jeanene'),
('Jazmine'),
('Jann'),
('Janita'),
('Janetta'),
('Janett'),
('Janeth'),
('Janessa'),
('Janay'),
('Jaleesa'),
('Jadwiga'),
('Jacqulyn'),
('Jacquiline'),
('Jacquelynn'),
('Jacquelyne'),
('Jacqualine'),
('Jacki'),
('Ivana'),
('Isis'),
('Isidra'),
('Isaura'),
('Isa'),
('Irmgard'),
('Irish'),
('Irina'),
('Inocencia'),
('Inger'),
('Inell'),
('Indira'),
('Iluminada'),
('Ilda'),
('Ilana'),
('Ignacia'),
('Iesha'),
('Idell'),
('Hyun'),
('Hyon'),
('Hye'),
('Hyacinth'),
('Honey'),
('Holley'),
('Hiroko'),
('Hilma'),
('Hildred'),
('Hildegarde'),
('Hilde'),
('Hilaria'),
('Hermine'),
('Hermina'),
('Henriette'),
('Heide'),
('Hee'),
('Hedy'),
('Harmony'),
('Hannelore'),
('Hanh'),
('Hana'),
('Halina'),
('Hae'),
('Gwyn'),
('Gwenn'),
('Gwenda'),
('Gudrun'),
('Gracia'),
('Glynda'),
('Glinda'),
('Glennis'),
('Glennie'),
('Glendora'),
('Glady'),
('Gigi'),
('Gia'),
('Gertrud'),
('Gertha'),
('Georgine'),
('Georgene'),
('Gennie'),
('Genie'),
('Genia'),
('Gearldine'),
('Gaylene'),
('Garnett'),
('Gabriele'),
('Fumiko'),
('Freeda'),
('Fredia'),
('Fredericka'),
('Frederica'),
('Francoise'),
('Francina'),
('Francie'),
('France'),
('Florinda'),
('Floretta'),
('Florentina'),
('Florencia'),
('Florance'),
('Flo'),
('Flavia'),
('Fernanda'),
('Faustina'),
('Farah'),
('Fae'),
('Exie'),
('Evelyne'),
('Eveline'),
('Evelina'),
('Evelin'),
('Ethyl'),
('Ethelene'),
('Estell'),
('Esta'),
('Erminia'),
('Ermelinda'),
('Erline'),
('Erlene'),
('Erinn'),
('Epifania'),
('Enola'),
('Eneida'),
('Emmy'),
('Emmie'),
('Emilee'),
('Emiko'),
('Emelda'),
('Ema'),
('Elvina'),
('Elvie'),
('Else'),
('Elois'),
('Elodia'),
('Ellyn'),
('Elly'),
('Elke'),
('Elizbeth'),
('Elicia'),
('Eliana'),
('Elenora'),
('Eleni'),
('Elease'),
('Elayne'),
('Elanor'),
('Edda'),
('Echo'),
('Earleen'),
('Earlean'),
('Dyan'),
('Dung'),
('Drusilla'),
('Drucilla'),
('Drema'),
('Dreama'),
('Dot'),
('Dorine'),
('Dorie'),
('Dorathy'),
('Donya'),
('Donetta'),
('Domonique'),
('Dominque'),
('Doloris'),
('Dionna'),
('Dione'),
('Dimple'),
('Digna'),
('Diedre'),
('Diedra'),
('Diamond'),
('Devorah'),
('Devora'),
('Devona'),
('Detra'),
('Desire'),
('Dennise'),
('Denita'),
('Denisha'),
('Denese'),
('Demetrice'),
('Delta'),
('Delpha'),
('Dell'),
('Delisa'),
('Delinda'),
('Delicia'),
('Delena'),
('Delana'),
('Deeann'),
('Debroah'),
('Debbi'),
('Deane'),
('Deandra'),
('Dayle'),
('Dawne'),
('Darby'),
('Daphine'),
('Danuta'),
('Dannette'),
('Danika'),
('Dania'),
('Danae'),
('Dalila'),
('Daisey'),
('Dahlia'),
('Dagmar'),
('Cristie'),
('Cristen'),
('Crista'),
('Crissy'),
('Criselda'),
('Corliss'),
('Corie'),
('Coretta'),
('Coreen'),
('Cordie'),
('Consuela'),
('Conchita'),
('Collen'),
('Coletta'),
('Clotilde'),
('Cleora'),
('Cleopatra'),
('Clemmie'),
('Clementina'),
('Clarita'),
('Clarine'),
('Ciera'),
('Cicely'),
('Christena'),
('Christeen'),
('Chin'),
('Cheryll'),
('Cherryl'),
('Cherish'),
('Chaya'),
('Chau'),
('Charise'),
('Chantell'),
('Chante'),
('Celine'),
('Celestina'),
('Celena'),
('Cecila'),
('Cathey'),
('Caterina'),
('Catarina'),
('Casie'),
('Carolyne'),
('Carmon'),
('Carmelina'),
('Carline'),
('Carlie'),
('Carley'),
('Carletta'),
('Carisa'),
('Carie'),
('Caprice'),
('Candyce'),
('Candie'),
('Cammie'),
('Camelia'),
('Brynn'),
('Brunilda'),
('Bronwyn'),
('Brittni'),
('Britni'),
('Britany'),
('Brinda'),
('Brigida'),
('Brigid'),
('Branda'),
('Blythe'),
('Birgit'),
('Billye'),
('Beverlee'),
('Bev'),
('Betsey'),
('Bethel'),
('Bethann'),
('Bernetta'),
('Berneice'),
('Belia'),
('Beckie'),
('Barbera'),
('Barbar'),
('Babette'),
('Babara'),
('Azucena'),
('Ayanna'),
('Ayana'),
('Avelina'),
('Aundrea'),
('Augustina'),
('Audrea'),
('Audie'),
('Asuncion'),
('Assunta'),
('Ashlyn'),
('Ashli'),
('Arvilla'),
('Arnita'),
('Arnetta'),
('Arminda'),
('Armanda'),
('Arletta'),
('Arlena'),
('Arla'),
('Arie'),
('Arianna'),
('Ariane'),
('Ardella'),
('Ardell'),
('Aracelis'),
('Apryl'),
('Anya'),
('Antonietta'),
('Annis'),
('Annice'),
('Annett'),
('Annamae'),
('Annalisa'),
('Annalee'),
('Annabell'),
('Anjanette'),
('Angle'),
('Angelika'),
('Angelic'),
('Angeles'),
('Angelena'),
('Angele'),
('Anette'),
('Andree'),
('Ammie'),
('Amina'),
('Alysha'),
('Alyse'),
('Alvera'),
('Altha'),
('Almeta'),
('Alline'),
('Allegra'),
('Alla'),
('Aliza'),
('Alix'),
('Alisia'),
('Alishia'),
('Alise'),
('Alica'),
('Alia'),
('Alethia'),
('Alejandrina'),
('Aleida'),
('Albertina'),
('Akiko'),
('Adriene'),
('Adaline'),
('Zonia'),
('Zetta'),
('Zenia'),
('Zana'),
('Zada'),
('Yvone'),
('Yuriko'),
('Yuri'),
('Yuonne'),
('Yung'),
('Yulanda'),
('Yuki'),
('Yuk'),
('Yuette'),
('Youlanda'),
('Yoshie'),
('Yon'),
('Yevette'),
('Yessenia'),
('Yer'),
('Yelena'),
('Yasuko'),
('Yasmine'),
('Yajaira'),
('Yahaira'),
('Yael'),
('Yaeko'),
('Xuan'),
('Xochitl'),
('Xiao'),
('Xenia'),
('Wynell'),
('Winter'),
('Willow'),
('Willodean'),
('Williemae'),
('Willetta'),
('Willena'),
('Wilhemina'),
('Whitley'),
('Wenona'),
('Wendolyn'),
('Wendie'),
('Wen'),
('Wava'),
('Wanetta'),
('Waneta'),
('Wan'),
('Voncile'),
('Virgen'),
('Vinita'),
('Viki'),
('Victorina'),
('Vertie'),
('Veronique'),
('Veronika'),
('Vernia'),
('Verline'),
('Vennie'),
('Venetta'),
('Vasiliki'),
('Vashti'),
('Vannesa'),
('Vanna'),
('Vania'),
('Vanetta'),
('Valrie'),
('Valeri'),
('Valene'),
('Ute'),
('Ulrike'),
('Ula'),
('Tynisha'),
('Tyisha'),
('Twanna'),
('Twanda'),
('Tula'),
('Trinh'),
('Treena'),
('Treasa'),
('Tran'),
('Tova'),
('Toshia'),
('Torrie'),
('Torri'),
('Torie'),
('Tora'),
('Tonita'),
('Tonisha'),
('Tonette'),
('Tona'),
('Tommye'),
('Tomiko'),
('Tomi'),
('Toi'),
('Toccara'),
('Tobie'),
('Tobi'),
('Tish'),
('Tisa'),
('Tinisha'),
('Timika'),
('Tilda'),
('Tijuana'),
('Tiffaney'),
('Tifany'),
('Tiera'),
('Tien'),
('Thora'),
('Thomasena'),
('Thi'),
('Theressa'),
('Terrilyn'),
('Terisa'),
('Terina'),
('Terica'),
('Teresia'),
('Teofila'),
('Tenesha'),
('Temple'),
('Tempie'),
('Temika'),
('Telma'),
('Teisha'),
('Tegan'),
('Tayna'),
('Tawna'),
('Taunya'),
('Tatyana'),
('Tatum'),
('Tasia'),
('Tashina'),
('Tarra'),
('Tari'),
('Taren'),
('Taneka'),
('Tandy'),
('Tandra'),
('Tammera'),
('Tamisha'),
('Tambra'),
('Tama'),
('Takako'),
('Tajuana'),
('Taisha'),
('Taina'),
('Tai'),
('Sylvie'),
('Svetlana'),
('Suzi'),
('Susy'),
('Sunni'),
('Sunday'),
('Sumiko'),
('Sulema'),
('Suanne'),
('Stephnie'),
('Stephania'),
('Stepanie'),
('Stefany'),
('Stasia'),
('Stacee'),
('Sparkle'),
('Sona'),
('Somer'),
('Soila'),
('Sixta'),
('Siu'),
('Sirena'),
('Sina'),
('Simonne'),
('Sima'),
('Shyla'),
('Shonta'),
('Shondra'),
('Shizuko'),
('Shizue'),
('Shirl'),
('Shirely'),
('Shin'),
('Shiloh'),
('Shila'),
('Sheryll'),
('Sherril'),
('Sherlene'),
('Sherise'),
('Sherill'),
('Sherika'),
('Sheridan'),
('Sherice'),
('Sherell'),
('Shera'),
('Shenna'),
('Shenika'),
('Shemeka'),
('Shella'),
('Sheba'),
('Shawnta'),
('Shawanna'),
('Shavonda'),
('Shaunte'),
('Shaunta'),
('Shaunda'),
('Sharri'),
('Sharolyn'),
('Sharmaine'),
('Sharilyn'),
('Sharika'),
('Sharie'),
('Sharice'),
('Sharell'),
('Sharda'),
('Sharan'),
('Shaquita'),
('Shaquana'),
('Shanti'),
('Shantelle'),
('Shantay'),
('Shantae'),
('Shaniqua'),
('Shanel'),
('Shandi'),
('Shanae'),
('Shan'),
('Shalon'),
('Shalanda'),
('Shala'),
('Shakita'),
('Shakia'),
('Shae'),
('Setsuko'),
('Serita'),
('Serafina'),
('September'),
('Senaida'),
('Sena'),
('Seema'),
('See'),
('Season'),
('Sau'),
('Saturnina'),
('Saran'),
('Sarai'),
('Sandie'),
('Sandee'),
('Sanda'),
('Sana'),
('Samella'),
('Salley'),
('Sage'),
('Sadye'),
('Sacha'),
('Ryann'),
('Ruthe'),
('Ruthanne'),
('Rutha'),
('Rubi'),
('Rozanne'),
('Roxy'),
('Rosy'),
('Rossie'),
('Rossana'),
('Rosio'),
('Rosette'),
('Rosenda'),
('Rosena'),
('Roselle'),
('Roseline'),
('Roselia'),
('Roselee'),
('Rosamaria'),
('Rolande'),
('Rochel'),
('Robena'),
('Robbyn'),
('Robbi'),
('Rivka'),
('Riva'),
('Rima'),
('Ricki'),
('Ricarda'),
('Ria'),
('Rhona'),
('Rheba'),
('Reynalda'),
('Ressie'),
('Renna'),
('Renda'),
('Renay'),
('Remona'),
('Rema'),
('Reita'),
('Reginia'),
('Regine'),
('Refugia'),
('Reena'),
('Rebecka'),
('Reanna'),
('Reagan'),
('Rea'),
('Raymonde'),
('Ranee'),
('Raisa'),
('Raguel'),
('Raelene'),
('Rachal'),
('Quyen'),
('Pura'),
('Providencia'),
('Priscila'),
('Porsche'),
('Pok'),
('Ping'),
('Phylicia'),
('Phung'),
('Phebe'),
('Petronila'),
('Pei'),
('Peg'),
('Pearly'),
('Paz'),
('Paulita'),
('Paulene'),
('Patria'),
('Pasty'),
('Parthenia'),
('Pamula'),
('Pamila'),
('Palmira'),
('Ozie'),
('Ozell'),
('Otelia'),
('Oretha'),
('Oralee'),
('Onita'),
('Onie'),
('Olinda'),
('Olimpia'),
('Olevia'),
('Olene'),
('Odelia'),
('Oda'),
('Nubia'),
('Noriko'),
('Nohemi'),
('Nobuko'),
('Nisha'),
('Niesha'),
('Nida'),
('Nicholle'),
('Nguyet'),
('Ngan'),
('Nevada'),
('Nery'),
('Neomi'),
('Nenita'),
('Neida'),
('Neely'),
('Neda'),
('Necole'),
('Natisha'),
('Natashia'),
('Natalya'),
('Natacha'),
('Nancey'),
('Nancee'),
('Nam'),
('Nakesha'),
('Naida'),
('Nadene'),
('Myrta'),
('Myrl'),
('Myesha'),
('Muoi'),
('Moriah'),
('Mora'),
('Moon'),
('Monnie'),
('Monet'),
('Miyoko'),
('Mitzie'),
('Mitsuko'),
('Mitsue'),
('Mistie'),
('Miss'),
('Misha'),
('Mirella'),
('Minta'),
('Ming'),
('Minda'),
('Milly'),
('Milda'),
('Miki'),
('Mikaela'),
('Mignon'),
('Miesha'),
('Michelina'),
('Michaele'),
('Micha'),
('Mica'),
('Mertie'),
('Merrilee'),
('Merrie'),
('Merlyn'),
('Merissa'),
('Merideth'),
('Mercedez'),
('Mendy'),
('Melodi'),
('Melodee'),
('Melita'),
('Melida'),
('Melia'),
('Melda'),
('Melania'),
('Melani'),
('Meda'),
('Mayola'),
('Maximina'),
('Maxima'),
('Maurita'),
('Matha'),
('Maryrose'),
('Marylynn'),
('Marylouise'),
('Maryln'),
('Maryland'),
('Maryetta'),
('Marybelle'),
('Maryanna'),
('Marx'),
('Marvis'),
('Marvella'),
('Marth'),
('Marquitta'),
('Marline'),
('Marketta'),
('Marivel'),
('Marisha'),
('Maris'),
('Marine'),
('Marinda'),
('Marin'),
('Mariko'),
('Mariette'),
('Marielle'),
('Mariella'),
('Maricruz'),
('Marica'),
('Marianela'),
('Marhta'),
('Margy'),
('Margrett'),
('Margherita'),
('Margert'),
('Margene'),
('Marg'),
('Mardell'),
('Marchelle'),
('Marcene'),
('Marcell'),
('Marcelene'),
('Maragret'),
('Maragaret'),
('Mao'),
('Many'),
('Manie'),
('Mandie'),
('Malvina'),
('Malorie'),
('Mallie'),
('Malka'),
('Malena'),
('Makeda'),
('Maisie'),
('Maisha'),
('Maire'),
('Maile'),
('Mahalia'),
('Magali'),
('Mafalda'),
('Madelene'),
('Madelaine'),
('Maddie'),
('Madalene'),
('Mabelle'),
('Lynna'),
('Lynetta'),
('Lyndia'),
('Lurlene'),
('Luetta'),
('Ludivina'),
('Lucilla'),
('Luci'),
('Luba'),
('Luanna'),
('Lovetta'),
('Love'),
('Lourie'),
('Loura'),
('Louetta'),
('Lorrine'),
('Lorriane'),
('Lorita'),
('Loris'),
('Lorina'),
('Lorilee'),
('Loria'),
('Lorette'),
('Loreta'),
('Lorean'),
('Loralee'),
('Londa'),
('Loise'),
('Lizzette'),
('Lizeth'),
('Lisandra'),
('Lisabeth'),
('Linn'),
('Lindsy'),
('Lilliana'),
('Lilliam'),
('Lillia'),
('Lilli'),
('Lieselotte'),
('Libbie'),
('Lianne'),
('Letisha'),
('Lesha'),
('Leontine'),
('Leonida'),
('Leonia'),
('Leoma'),
('Lenita'),
('Lelah'),
('Lekisha'),
('Leisha'),
('Leigha'),
('Leida'),
('Leia'),
('Leena'),
('Lecia'),
('Leanora'),
('Lean'),
('Layne'),
('Lavonna'),
('Lavone'),
('Lavona'),
('Lavette'),
('Laveta'),
('Lavenia'),
('Lavelle'),
('Lauryn'),
('Laurinda'),
('Laurena'),
('Lauran'),
('Lauralee'),
('Latrisha'),
('Latoyia'),
('Latina'),
('Latarsha'),
('Lasonya'),
('Lashon'),
('Lashell'),
('Lashay'),
('Lashawnda'),
('Lashawna'),
('Lashaunda'),
('Lashaun'),
('Lashandra'),
('Larraine'),
('Larita'),
('Laree'),
('Laquanda'),
('Lanora'),
('Lannie'),
('Lanie'),
('Lang'),
('Lanelle'),
('Lamonica'),
('Lala'),
('Lakita'),
('Lakiesha'),
('Lakia'),
('Lakenya'),
('Lakendra'),
('Lakeesha'),
('Lajuana'),
('Laine'),
('Lahoma'),
('Lael'),
('Ladawn'),
('Lacresha'),
('Lachelle'),
('Kyoko'),
('Krystina'),
('Krystin'),
('Krysten'),
('Kristle'),
('Kristeen'),
('Krissy'),
('Krishna'),
('Kortney'),
('Klara'),
('Kizzie'),
('Kiyoko'),
('Kittie'),
('Kit'),
('Kirstie'),
('Kina'),
('Kimi'),
('Kimbra'),
('Kiersten'),
('Khalilah'),
('Khadijah'),
('Keva'),
('Keturah'),
('Kerstin'),
('Keren'),
('Kera'),
('Kenia'),
('Kendal'),
('Kenda'),
('Kemberly'),
('Kelsi'),
('Keitha'),
('Keira'),
('Keila'),
('Keeley'),
('Kaycee'),
('Kayce'),
('Kathrin'),
('Kathline'),
('Katherina'),
('Katheleen'),
('Katharyn'),
('Katerine'),
('Katelynn'),
('Katelin'),
('Kasi'),
('Kasha'),
('Kary'),
('Karry'),
('Karoline'),
('Karole'),
('Karlyn'),
('Karly'),
('Karisa'),
('Karima'),
('Karena'),
('Kareen'),
('Kanisha'),
('Kanesha'),
('Kandra'),
('Kandis'),
('Kamilah'),
('Kamala'),
('Kalyn'),
('Kallie'),
('Kaleigh'),
('Kaila'),
('Kai'),
('Justa'),
('Junko'),
('Junie'),
('Julietta'),
('Julieann'),
('Julene'),
('Jule'),
('Joya'),
('Jovan'),
('Josphine'),
('Josefine'),
('Jonie'),
('Jong'),
('Jone'),
('Jolyn'),
('Joline'),
('Joie'),
('Johnsie'),
('Johnette'),
('Johna'),
('Johanne'),
('Joette'),
('Joaquina'),
('Joannie'),
('Joane'),
('Jinny'),
('Jetta'),
('Jesusita'),
('Jestine'),
('Jessika'),
('Jessia'),
('Jerrica'),
('Jerlene'),
('Jerica'),
('Jennine'),
('Jennell'),
('Jeneva'),
('Jenee'),
('Jene'),
('Jenae'),
('Jeffie'),
('Jeannetta'),
('Jeanmarie'),
('Jeanice'),
('Jeanett'),
('Jeanelle'),
('Jayna'),
('Jaymie'),
('Jaye'),
('Jaquelyn'),
('Janyce'),
('January'),
('Jannet'),
('Janise'),
('Janiece'),
('Jani'),
('Janella'),
('Janee'),
('Janean'),
('Jamika'),
('Jamee'),
('Jama'),
('Jalisa'),
('Jaimee'),
('Jacquie'),
('Jacqui'),
('Jacquetta'),
('Jackqueline'),
('Jackelyn'),
('Jacinda'),
('Jacelyn'),
('Izola'),
('Izetta'),
('Ivey'),
('Ivelisse'),
('Isobel'),
('Isadora'),
('Iraida'),
('Illa'),
('Ileen'),
('Hyo'),
('Hwa'),
('Hue'),
('Hsiu'),
('Hisako'),
('Hien'),
('Hiedi'),
('Hertha'),
('Herta'),
('Hermila'),
('Herma'),
('Helaine'),
('Heike'),
('Heidy'),
('Hassie'),
('Hang'),
('Han'),
('Halley'),
('Gwyneth'),
('Grisel'),
('Gricelda'),
('Grazyna'),
('Grayce'),
('Golden'),
('Glynis'),
('Glayds'),
('Giuseppina'),
('Gita'),
('Ginette'),
('Gilma'),
('Gilberte'),
('Gidget'),
('Gianna'),
('Ghislaine'),
('Gertude'),
('Gertrudis'),
('Georgianne'),
('Georgiann'),
('Georgeanna'),
('Georgeann'),
('Georgann'),
('Genny'),
('Genna'),
('Genevive'),
('Genevie'),
('Genesis'),
('Gema'),
('Gaynelle'),
('Galina'),
('Gala'),
('Frida'),
('Fredricka'),
('Fredda'),
('Fransisca'),
('Franchesca'),
('Francene'),
('Florrie'),
('Floria'),
('Fleta'),
('Fidelia'),
('Fidela'),
('Fernande'),
('Fermina'),
('Felicidad'),
('Faviola'),
('Fatimah'),
('Fairy'),
('Ewa'),
('Evita'),
('Evia'),
('Evelynn'),
('Eustolia'),
('Eusebia'),
('Eura'),
('Euna'),
('Eulah'),
('Eugena'),
('Eufemia'),
('Ettie'),
('Etsuko'),
('Etha'),
('Estefana'),
('Eryn'),
('Enda'),
('Emmaline'),
('Emerita'),
('Emerald'),
('Emely'),
('Emeline'),
('Emelina'),
('Elza'),
('Elwanda'),
('Elsy'),
('Elli'),
('Ellena'),
('Ellan'),
('Ellamae'),
('Elizabet'),
('Eliz'),
('Elinore'),
('Elina'),
('Elin'),
('Elidia'),
('Elfrieda'),
('Elfreda'),
('Eleonore'),
('Eleonora'),
('Eleonor'),
('Elenore'),
('Elene'),
('Elane'),
('Eladia'),
('Ela'),
('Eilene'),
('Ehtel'),
('Edyth'),
('Edris'),
('Edra'),
('Ebonie'),
('Earlie'),
('Dwana'),
('Dusti'),
('Dulcie'),
('Dotty'),
('Dorthey'),
('Dorla'),
('Doria'),
('Doretta'),
('Dorethea'),
('Doreatha'),
('Donnette'),
('Donnetta'),
('Donette'),
('Donella'),
('Domitila'),
('Dominica'),
('Dodie'),
('Divina'),
('Dinorah'),
('Dierdre'),
('Dia'),
('Despina'),
('Deonna'),
('Denyse'),
('Denisse'),
('Denae'),
('Delsie'),
('Delorse'),
('Deloras'),
('Deloise'),
('Delmy'),
('Delila'),
('Delcie'),
('Delaine'),
('Deja'),
('Deetta'),
('Deedra'),
('Deedee'),
('Deeanna'),
('Dede'),
('Debera'),
('Deandrea'),
('Deadra'),
('Daysi'),
('Darlena'),
('Darcey'),
('Darcel'),
('Danyell'),
('Danyel'),
('Dann'),
('Danille'),
('Daniell'),
('Dalene'),
('Dakota'),
('Daine'),
('Daina'),
('Dagny'),
('Dacia'),
('Cyrstal'),
('Cyndy'),
('Cuc'),
('Crystle'),
('Crysta'),
('Cris'),
('Creola'),
('Corrinne'),
('Corrin'),
('Cordia'),
('Coralie'),
('Coralee'),
('Contessa'),
('Concha'),
('Conception'),
('Collene'),
('Colene'),
('Codi'),
('Clorinda'),
('Clora'),
('Cleotilde'),
('Clemencia'),
('Clelia'),
('Claudie'),
('Classie'),
('Clarisa'),
('Claris'),
('Clarinda'),
('Claretta'),
('Claretha'),
('Cira'),
('Cindie'),
('Cinderella'),
('Chu'),
('Christinia'),
('Christia'),
('Ching'),
('China'),
('Chieko'),
('Chia'),
('Chery'),
('Cherlyn'),
('Cherilyn'),
('Cherelle'),
('Cheree'),
('Chere'),
('Cher'),
('Chassidy'),
('Chasidy'),
('Charmain'),
('Charlyn'),
('Charlsie'),
('Charlott'),
('Charlesetta'),
('Charlena'),
('Charita'),
('Charis'),
('Chara'),
('Chantay'),
('Chanelle'),
('Chanell'),
('Chan'),
('Chae'),
('Ceola'),
('Celsa'),
('Celinda'),
('Celesta'),
('Cecille'),
('Cayla'),
('Catrice'),
('Catheryn'),
('Cathern'),
('Catherina'),
('Catherin'),
('Cassy'),
('Cassondra'),
('Cassi'),
('Cassey'),
('Cassaundra'),
('Casimira'),
('Carylon'),
('Carry'),
('Caroyln'),
('Caroll'),
('Carolin'),
('Carola'),
('Carmina'),
('Carmelia'),
('Carlita'),
('Carli'),
('Carlena'),
('Carlee'),
('Carita'),
('Candra'),
('Cammy'),
('Camila'),
('Camie'),
('Camellia'),
('Calista'),
('Calandra'),
('Burma'),
('Bunny'),
('Bulah'),
('Bula'),
('Buena'),
('Bryanna'),
('Bruna'),
('Brittny'),
('Britteny'),
('Brittanie'),
('Brittaney'),
('Britta'),
('Breann'),
('Breana'),
('Brande'),
('Bong'),
('Bok'),
('Bobette'),
('Blossom'),
('Blondell'),
('Billi'),
('Bibi'),
('Beula'),
('Bettyann'),
('Bethanie'),
('Bernardine'),
('Bernardina'),
('Bernarda'),
('Berna'),
('Bell'),
('Belkis'),
('Bee'),
('Becki'),
('Bebe'),
('Beaulah'),
('Beatris'),
('Beata'),
('Basilia'),
('Barrie'),
('Bari'),
('Barabara'),
('Bao'),
('Azzie'),
('Azalee'),
('Ayako'),
('Avril'),
('Aurore'),
('Audrie'),
('Audria'),
('Asley'),
('Ashlea'),
('Ashanti'),
('Arnette'),
('Armandina'),
('Arlyne'),
('Arlinda'),
('Arletha'),
('Arlean'),
('Arica'),
('Arianne'),
('Argentina'),
('Argelia'),
('Ardelle'),
('Ardelia'),
('Ardath'),
('Ara'),
('Apolonia'),
('Antonetta'),
('Annita'),
('Annika'),
('Annelle'),
('Annamaria'),
('Anjelica'),
('Anja'),
('Anisha'),
('Anisa'),
('Angla'),
('Angila'),
('Angelyn'),
('Andera'),
('Anamaria'),
('Analisa'),
('Amira'),
('Amiee'),
('Amee'),
('Amberly'),
('Amal'),
('Alysa'),
('Alverta'),
('Alona'),
('Allyn'),
('Allena'),
('Alleen'),
('Alita'),
('Alfredia'),
('Alessandra'),
('Aleshia'),
('Aleisha'),
('Aleen'),
('Alease'),
('Alayna'),
('Alane'),
('Alaine'),
('Akilah'),
('Ailene'),
('Aiko'),
('Aide'),
('Agueda'),
('Agripina'),
('Agnus'),
('Adrien'),
('Adena'),
('Adah');
# --- !Downs
DROP TABLE "diff";
DROP TABLE "comment";
DROP TABLE "animal";
DROP TABLE "first_name";
|
<gh_stars>1-10
INSERT INTO PRODUCT (item_id, name, description, price) VALUES ('329299', 'Red Fedora', 'Official Red Hat Fedora', 34.99);
INSERT INTO PRODUCT (item_id, name, description, price) VALUES ('329199', 'Forge Laptop Sticker', 'JBoss Community Forge Project Sticker', 8.50);
INSERT INTO PRODUCT (item_id, name, description, price) VALUES ('165613', 'Solid Performance Polo', 'Moisture-wicking, antimicrobial 100% polyester design wicks for life of garment. No-curl, rib-knit collar...', 17.80)
INSERT INTO PRODUCT (item_id, name, description, price) VALUES ('165614', 'Ogio Caliber Polo', 'Moisture-wicking 100% polyester. Rib-knit collar and cuffs; Ogio jacquard tape insitem_ide neck; bar-tacked three-button placket with...', 28.75)
INSERT INTO PRODUCT (item_id, name, description, price) VALUES ('165954', '16 oz. Vortex Tumbler', 'Double-wall insulated, BPA-free, acrylic cup. Push-on litem_id with thumb-slitem_ide closure; for hot and cold beverages. Holds 16 oz. Hand wash only. Imprint. Clear.', 6.00)
INSERT INTO PRODUCT (item_id, name, description, price) VALUES ('444434', 'Pebble Smart Watch', 'Smart glasses and smart watches are perhaps two of the most exciting developments in recent years. ', 24.00)
INSERT INTO PRODUCT (item_id, name, description, price) VALUES ('444435', 'Oculus Rift', 'The world of gaming has also undergone some very unique and compelling tech advances in recent years. Virtual reality...', 106.00)
INSERT INTO PRODUCT (item_id, name, description, price) VALUES ('444436', 'Lytro Camera', 'Consumers who want to up their photography game are looking at newfangled cameras like the Lytro Field camera, designed to ...', 44.30)
|
<filename>br/tests/lightning_duplicate_detection/data/dup_detect.tf.1.sql
insert into tf values (33, '44ea7e50', 1597631244433372786);
insert into tf values (21, 'ea92b2bc', 8350061931822383463);
insert into tf values (29, 'd800f4f3', 3042440053175428524);
insert into tf values (31, '5f7a7433', 629744129778687863);
insert into tf values (38, '403ff15f', 9033713940787535967);
insert into tf values (37, 'c0e45d01', 7653840776950387220);
insert into tf values (23, '743451c9', 2927177247690449560);
insert into tf values (30, '9902a484', 5400540290819425776);
insert into tf values (25, '02a7bb50', 1185903850246039530);
insert into tf values (36, 'a627b715', 5509484231837701063);
insert into tf values (27, 'a6f3cb68', 1369177643137253967);
insert into tf values (22, '68c3dfff', 6078765541659054341);
insert into tf values (39, '1d51c1ee', 3275520354324329535);
insert into tf values (28, '37004961', 607245858542281825);
insert into tf values (32, '2a8578bc', 6167139244725398395);
insert into tf values (35, '5a954409', 6995093837120471966);
insert into tf values (24, '72cb0e83', 2743887494442705099);
insert into tf values (40, '68994d18', 4122602285058024098);
insert into tf values (34, 'bf46ff42', 9168528035600890456);
insert into tf values (26, 'cc58d76c', 4747694359350761982);
|
<reponame>3liuhernandez/gomuf<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 05-08-2020 a las 21:12:52
-- Versión del servidor: 10.4.11-MariaDB
-- Versión de PHP: 7.3.18
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Base de datos: `gomuf`
--
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `libros`
--
CREATE TABLE `libros` (
`id_libro` int(11) NOT NULL,
`nombre` varchar(200) DEFAULT NULL,
`directorio` varchar(100) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Volcado de datos para la tabla `libros`
--
INSERT INTO `libros` (`id_libro`, `nombre`, `directorio`) VALUES
(1, 'Post Covid-19', 'REENCUENTRO CON LAS NUEVAS GENERACIONES POST COVID 19.pdf'),
(2, 'Llamado misionero', 'LLAMADO MISIONERO A CYBERIA.pdf'),
(3, 'Lo que aprendí en cuarentena', 'LO QUE APRENDI ESTA CUARENTENA.pdf');
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `suscripcion`
--
CREATE TABLE `suscripcion` (
`id_suscriptor` int(10) UNSIGNED NOT NULL,
`id_libro` int(10) UNSIGNED NOT NULL,
`name` varchar(30) NOT NULL,
`email` varchar(100) NOT NULL,
`message` text DEFAULT NULL,
`download` int(10) UNSIGNED NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Volcado de datos para la tabla `suscripcion`
--
INSERT INTO `suscripcion` (`id_suscriptor`, `id_libro`, `name`, `email`, `message`, `download`) VALUES
(12, 1, 'josé', '<EMAIL>', 'a leerlo!!!', 1),
(13, 1, '<NAME>', '<EMAIL>', 'Que bueno es ver personas que son visionarios en el Señor :)', 1),
(14, 1, '<NAME>', '<EMAIL>', 'conocer y prepararme para esa nueva generacion', 4),
(15, 1, 'Jesus ', '<EMAIL>', 'Profe es el mejor', 1),
(16, 1, '<NAME>', '<EMAIL>', 'saludos, Dios les siga usando', 2),
(17, 1, 'Eliezer', '<EMAIL>', 'Eee', 2),
(18, 1, '<NAME>', '<EMAIL>', '<NAME>', 1),
(19, 1, '<NAME> ', '<EMAIL>', 'Dios te bendiga mi hermano. ', 1),
(20, 1, 'Elier', '<EMAIL>', 'Hola', 1),
(21, 1, 'Andres', '<EMAIL>', 'Saludos hermano un abrazo ', 1),
(22, 1, 'Andrea', '<EMAIL>', 'Solicitud del libro.\r\n\r\nFelicitaciones 🙏🏼', 1),
(23, 1, '<NAME>', '<EMAIL>', 'Muchísimas gracias pastor Darío. Agradezco a Dios por su esfuerzo y dedicación. \r\nDios está trabajando en las naciones.\r\nBendiciones.', 1),
(24, 1, '<NAME> ', '<EMAIL>', 'Buen trabajo, Darío. Adelante con lo que sigue. Dios les siga cuidando, proveyendo y usando como familia', 2),
(25, 1, '<NAME> ', '<EMAIL>', 'en esta situación por la que estamos pasando muchos líderes nos llegamos a preguntar que pasara después de esta pandemia, y creo que con esta iniciativa podremos tener nuevas herramientas para el trabajo con estas nuevas generaciones', 1),
(26, 1, 'Eduar zerpa', '<EMAIL>', 'Muchas gracias. Dios les siga usando. Son geniales', 1),
(27, 1, '<NAME>', '<EMAIL>', 'Ayuda psico-espiritual para el nuevo normal después de esta pandemia 2020. ', 1),
(28, 1, 'Elías', '<EMAIL>', 'Me veo retado a esta nueva realidades y me gustaría conoces \r\n', 1),
(29, 1, '<NAME>', '<EMAIL>', 'Bendiciones', 1),
(30, 1, 'Jocsan', '<EMAIL>', 'Bendiciones, y que Dios pueda impactar a través de este libro', 1),
(31, 1, '<NAME> ', '<EMAIL>', 'Espero encontrar respuestas ante las interrogantes que tengo con respecto al trabajo ministerial en una sociedad post pandemia ', 1),
(32, 1, '<NAME>', '<EMAIL>', 'Felicidades hermano. Dios te siga usando. Ya lo leeré. Seguro será de provecho.', 2),
(33, 1, '<NAME>', '<EMAIL>', ' Bendiciones', 1),
(34, 1, '<NAME> ', '<EMAIL>', 'Quiero nutrir en conocimiento para ayudar a las nuevas generaciones. Experiencia: hace muchos años trabaje con adolescentes en la iglesia. Experiencia en juventud: mi vida, mi testimonio. Y quiero conocer su pensamiento para ampliar mis conocimientos y producir elementos claves esenciales a esta generación. Futuro de la nación. ', 1),
(35, 1, '<NAME>', '<EMAIL>', 'Mucho éxito en este Proyecto, estoy segura que me servira de ayuda para seguir adelante con los niños de la E.B.N Lomas de Funval. ', 2),
(36, 1, '<NAME>', '<EMAIL>', '\"La Gloria sea para El Sr\"', 2),
(37, 1, 'Patricia', '<EMAIL>', 'Se que esto va a ser de edificación. Gracias', 1),
(38, 1, '<NAME> ', '<EMAIL>', '<NAME> ', 1),
(39, 1, 'Milanyela', '<EMAIL>', 'Agradecida por su aporte y ayuda a la sociedad', 1),
(40, 1, 'Alnair', '<EMAIL>', 'Espero que sea un material completamente bíblico que me pueda servir de herramienta para ayudar al liderazgo a ser efectivos.', 1),
(41, 1, '<NAME>', '<EMAIL>', 'Interesante saber herramientas para ese reencuentro con esa generación ', 1),
(42, 1, '<NAME> ', '<EMAIL>', 'Dios los bendiga ', 1),
(43, 1, '<NAME>', '<EMAIL>', 'Felicitaciones!!', 1),
(44, 1, 'Abihail', '<EMAIL>', 'Exitos', 1),
(45, 1, 'KATHERINE', '<EMAIL>', 'Dios te bendiga ', 1),
(46, 1, '<NAME>', '<EMAIL>', 'Conocer más a profundidad sobre lo que nos vamos a enfrentar como lideres de Jovenes en este tiempo.', 1),
(47, 1, 'Andreina', '<EMAIL>', 'Dios les bendiga', 1),
(48, 1, '<NAME>', '<EMAIL>', 'Espero poder conseguir respuestas ante los desafíos que se vienen como consecuencia del cambio de vida que ocasionado esta pandemia a nivel global. Bendiciones', 1),
(49, 1, '<NAME>', '<EMAIL>', 'Me parece interesante.', 1),
(50, 1, 'Iván ', '<EMAIL>', 'Muchas gracias por este valioso material ', 1),
(51, 1, '<EMAIL>', '<EMAIL>', 'Espero por el libro ', 1),
(52, 1, '<NAME>', '<EMAIL>', 'Como pastor tendré que ver como enfrentar el retorno a los templos y a las actividades normales de la Iglesia.. Espero que este material sea un recurso que me dé las herramientas para guiar y orientar a las nuevas generaciones. Ciertamente este será un gran desafío. ', 1),
(53, 1, 'Rafael', '<EMAIL>', 'Gracias ', 1),
(54, 1, '<NAME>', '<EMAIL>', 'Capacitarme para enfrentar este desafío ', 1),
(55, 1, '<NAME>', '<EMAIL>', 'Conocer herramientas que faciliten el manejo en la vida social de jóvenes en estos tiempos.', 1),
(56, 1, '<NAME>', '<EMAIL>', 'Un libro que será de mucha ayuda para enfrentar situaciones que me brindará orientación y dará claridad a muchos puntos en esta situación ', 1),
(57, 1, 'Carlos', '<EMAIL>', 'Gracias', 1),
(58, 1, 'Ariana', '<EMAIL>', 'Se que será de mucha enseñanza y crecimiento para el mejor acercamiento con las nuevas generaciones', 1),
(59, 1, 'CDC', '<EMAIL>', 'Gracias MUF', 1),
(60, 1, '<NAME>', '<EMAIL>', 'Espero que al leerlo pueda encontrar herramientas prácticas para trabajar con las generaciones y también un nuevo entendimiento en los nuevos escenarios que se han gestado durante y después de la crisis..gracias', 1),
(61, 1, '<NAME>', '<EMAIL>', 'Muchas gracias!', 1),
(62, 1, '<NAME>', '<EMAIL>', 'Sus apreciaciones son bien recibidas', 1),
(63, 1, 'Elizabeth', '<EMAIL>', 'Gracias pos sus aportes! El Señor continúe bendiciendoles. ', 1),
(64, 1, '<NAME> ', '<EMAIL>', 'En medio de la situación que vivimos en Venezuela la lectura viene a convertirse en una herramienta clave para el manejo de las emociones producto de la ansiedad que provoca el estar privado de las actividades que llevamos a cabo normalmente . Es una oportunidad más para profundizar en el rescate de valores fundamentales como familia . Siempre digo que cuando colocamos a dios por delante en cada acción que desarrollemos estamos condenados al éxito ! Dios concede la victoria a la constancia ! ', 1),
(65, 1, '<NAME>', '<EMAIL>', 'Espero pueda Ser una gran Herramienta para el Ministerio', 1),
(66, 1, 'Danna', '<EMAIL>', 'Hola, muchas gracias por permitirnos descargar ', 1),
(67, 1, '<NAME>', '<EMAIL>', 'Bendiciones para todos y que las herramientas dadas sean de gran bendición para otros.\r\n', 1),
(68, 1, '<NAME>', '<EMAIL>', 'El conocer cómo hablar con personas de las próximas generaciones para poder hablarles de Cristo. Conocer con lo que posiblemente me encuentre y prepararme. ', 1),
(69, 1, 'wilmer', '<EMAIL>', 'muy bueno . con ganas que en este material podamos aprender como es la vision en tiempo de pandemia sobre los jovenes cristianos en estos momento\r\n', 1),
(70, 1, '<NAME> ', '<EMAIL>', 'Seguir aprendiendo más del Señor a través de esta referencia bibliográfica de la Obra de Dios ', 1),
(71, 1, '<NAME>', '<EMAIL>', 'Gracias. Bendiciones', 1),
(72, 1, 'Cipriano ', '<EMAIL>', 'Muchas gracias por este recurso, que Dios siga multiplicando bendiciones sobre este ministerio. ', 1),
(73, 1, 'Pedro', '<EMAIL>', 'Excelente descargar el material', 1),
(74, 1, '<NAME> ', '<EMAIL>', 'Es un tiempo difícil, escucho a personas decir que les gustaría dormir y volver a despertar hasta que esto termine, yo prefiero seguir trabajando para el creador con o sin pandemia', 1),
(75, 1, 'Naty ', '<EMAIL>', 'Gracias ', 2),
(76, 1, 'Islel ', '<EMAIL>', 'Conocer posibles escenarios post pamdemia y aquirir ideas, propuestas o herramientas sugeridas para el trabajo con las nuevas generaciones. ', 1),
(77, 1, '<NAME>', '<EMAIL>', 'Gracias. Dtb', 1),
(78, 1, '<NAME>', '<EMAIL>', 'Muchas gracias. Bendiciones.', 1),
(79, 1, '<NAME>', '<EMAIL>', 'Interesante tener este libro y poder entender como compartir con los jóvenes y adultos de la iglesia el contenido del libro ', 1),
(80, 1, '<NAME>', '<EMAIL>', 'Muchas gracias \r\nDios les bendiga ', 1),
(81, 1, '<NAME>', '<EMAIL>', '<EMAIL>', 1),
(82, 1, '<NAME>', '<EMAIL>', 'Es de gran admiración y ejemplo pastor Dios le bendiga.', 1),
(83, 1, 'Susana', '<EMAIL>', 'Una nueva perspectiva en como seguir adelante sin estancarnos sino mas bien reajustarnos al nuevo panorama y seguir adelante cumpliendo las metas que Dios a colocado en nuestros corazones', 1),
(84, 1, '<NAME> ', '<EMAIL>', ' A la expectativa de saber ¿Cuáles serán los nuevos desafíos que nos traerá el nuevo escenario en trabajo con las nuevas generaciones? Asi poder estar preparado para lo que se avecina. ', 1),
(85, 1, 'elizabeth', '<EMAIL>', 'Me gustaría poder ayudar para que pronto podamos recuperarnos de este tiempo, ', 1),
(86, 1, 'Ricardo', '<EMAIL>', 'Quisiera encontrar desafíos u orientaciones para post pandemia seguir fortaleciendo nuestro espíritu en Dios y guiar a otros tanto ahora como después de esta pandemia.', 1),
(87, 1, 'Jeanhiasary', '<EMAIL>', 'Hola,DTB ', 1),
(88, 1, '<NAME>', '<EMAIL>', 'Agradezco por el material proporcionado', 1),
(89, 1, 'Wilangie', '<EMAIL>', 'Pasamos por tiempos difíciles.. todo lo q nos ayude a superar y estar bien y ayudar a los demás es bienvenido.. ', 2),
(90, 1, 'Samuel ', '<EMAIL>', 'Conocer nuevos insumos para trabajar en nuestro Seminario, ', 1),
(91, 1, '<NAME>', '<EMAIL>', 'Bendiciones, mi espectativa es obtener una ilustracion de los cambios q pueden surgir luego de esta pandemia, ya q es una muestra biblica de q pronto viene el arrebatamiento! Saludos ', 1),
(92, 1, 'Dennis', '<EMAIL>', 'Saludos', 1),
(93, 1, '<NAME>', '<EMAIL>', 'Me apasiona el tema sobre las nuevas generaciones y su papel en la construcción de un mejor país.', 1),
(94, 1, 'Génesis', '<EMAIL>', 'Quiero seguir aprendiendo y seguirme capacitando para ser una líder eficaz. ¡Muchas gracias por este libro!', 2),
(95, 1, '<NAME>', '<EMAIL>', 'Gracias', 1),
(96, 1, 'Cesar', '<EMAIL>', 'Muchas gracias', 1),
(97, 1, '<NAME>', '<EMAIL>', 'Hola, me gustaria tener este libro. Soy Orientadora educacional y vocacional.', 1),
(98, 1, '<NAME> ', '<EMAIL>', 'Soy maestra de adolecented y me interesaría aprender acerca de esa conexión, para la generación que estamos viviendo ', 1),
(99, 1, '<NAME>', '<EMAIL>', 'Gracias por la invitacion', 1),
(100, 1, '<NAME>', '<EMAIL>', 'Entender la visión de la generación que pase luego del COVID-19 y como esto afecta o contribuye a la transformación de las naciones', 1),
(101, 1, '<NAME>', '<EMAIL>', 'Bendiciones, Dios continúe usando sus vidas!!! Esperemos en Dios ser edificados con esta bendición.\r\nSaludos.', 1),
(102, 1, '<NAME>', '<EMAIL>', 'Saludos desde San Felipe Yaracuy', 1),
(103, 1, 'Cipriano ', '<EMAIL>', '¡Muchas gracias por el Ebook! Dios les bendiga. ', 1),
(104, 1, 'Lennyn', '<EMAIL>', 'Tengo una gran expectativa, ya que trabajo con Jóvenes en mi iglesia y pienso que hay que estar preparados o ser pro-activos para lo que se nos viene ', 1),
(105, 1, 'ELIZABETH', '<EMAIL>', 'Gracias por compartir ', 1),
(106, 1, '<NAME>', '<EMAIL>', 'Xxx', 1),
(107, 1, '<NAME>', '<EMAIL>', 'Dios los bendiga', 1),
(108, 1, 'Eymmy ', '<EMAIL>', 'Dios los bendiga más y más', 1),
(109, 1, 'mariangis', '<EMAIL>', 'trabajo con niños, adolescente y universitario y me gustaría conocer estrategias que aporten a ministerio ', 1),
(110, 1, 'Marcos ', '<EMAIL>', 'Dios te bendiga.', 2),
(111, 1, '<NAME>', 'villam<EMAIL>', 'saber que nos espera es de mucha importancia , a que desafíos nos vamos a enfrentar como jóvenes y pueblo de Dios. Quiero felicitar por el tema desarrollado oportuno a la necesidades que estamos enfrentando. Dios les Bendiga grandemente y siga usando. ', 1),
(112, 1, '<NAME>', '<EMAIL>', '¡Dios les bendiga!', 1),
(113, 1, 'Jathcely', '<EMAIL>', 'Saber como abordar el liderazgo en este tiempo ', 1),
(114, 1, '<NAME>', '<EMAIL>', 'Me inspira una importante espectativa de esperanza en CRISTO JESÚS, para un sector poblacional vulnerable al mensaje deformante y tóxico que les plantea un mundo perverso sin DIOS. Me parece que consolidar valores en las nuevas generaciones es un auténtico reto que glorifique a DIOS. Ánimo y Éxito. Estaré pendiente. ', 3),
(115, 1, '<NAME>', '<EMAIL>', 'Por un nuevo mundo', 1),
(116, 1, ' <NAME>', '<EMAIL>', 'Gracias! Estoy interesada en este material.', 1),
(117, 1, 'María ', '<EMAIL>', 'De acuerdo', 1),
(118, 1, '<NAME>', '<EMAIL>', 'Leeré!\r\n', 1),
(119, 1, 'Ivan', '<EMAIL>', 'Saludos y bendiciones', 2),
(120, 1, '<NAME>', '<EMAIL>', 'Una guía para entender la situación actual desde una perspectiva Cristocéntrica', 1),
(121, 1, 'C', '<EMAIL>', 'hola', 1),
(122, 1, '<NAME>', '<EMAIL>', '¡Gracias! Dios les bendiga.', 1),
(123, 1, '<NAME>', '<EMAIL>', 'Felicitaciones y adelante.', 1),
(124, 1, '<NAME>', '<EMAIL>', 'Espero poder estar preparada para los desafíos que me esperan después de la pandemia y orientar también a otros', 1),
(125, 1, 'carlos', '<EMAIL>', 'gracias', 1),
(126, 1, 'Monica', '<EMAIL>', 'Gracias por el libro. Dios les recompense', 1),
(127, 1, '<NAME>', '<EMAIL>', 'Crear un nuevo contacto', 1),
(128, 1, '<NAME>', '<EMAIL>', 'La expectativas que tengo sobre el libro es conocer cuáles serán estrategias que se pudieran aplicar a nivel personal, social, iglesia, de como abordar a las personas con un mensaje desafiante en cuanto a los tiempos que estamos viviendo para que puedan asegurar su eternidad con Jesucristo; bajo este nuevo escenario mundial Covid19, nuevas tecnologías, migración, desempleos, ambiente, éticas políticas y morales, en todos los niveles socioeconómicos, Transformarnos por medio de la renovación de la mente Metamorfosis + Renovación.', 1),
(129, 1, '<NAME>', '<EMAIL>', 'Las mejores expectativas viniendo de ustedes, una extraordinaria organización.', 1),
(130, 1, '<NAME>', '<EMAIL>', 'Aplicarlo en el tecnologico sucre ', 1),
(131, 1, 'CARLOS', '<EMAIL>', 'Buenas tardes como esta Pastor , primero que nada muy agradecido con usted por la información enviada saludos.\r\n', 1),
(132, 1, '<NAME>', '<EMAIL>', 'información sobre estrategias para compartir el evangelio postcrisis sociales, en el ámbito sanitario, educativo, comunitario, tomando en cuenta las necesidades de las nuevas generaciones ', 1),
(133, 1, '<NAME>', '<EMAIL>', '.e llamó la atención este texto y quisiera conocer la perspectiva de ustedes sobre la generacion que vendrá después dexesta experiencia que vivimos.', 1),
(134, 1, '<NAME>', '<EMAIL>', 'Evangelismo efectivo ', 5),
(135, 1, '<NAME>', '<EMAIL>', 'Considero que el libro aporta herramientas contextualizadas y relevantes para el alcance de las nuevas generaciones una vez finalice la pandemia. En lo personal, tengo expectativa por aprender a fin de estar listo para el reto que se le plantea a la Iglesia en un escenario que será totalmente diferente.', 1),
(136, 1, 'Walter', '<EMAIL>', 'Lo conoci por la fans page de UBLA, ya lo leere. Gracias', 1),
(137, 1, '<NAME>', '<EMAIL>', 'Saludos cordiales desde Ecuador que Dios los bendiga. Gracias por traernos esta bendición a la Iglesia. La Primera, nuestro hogar.. ', 1),
(138, 1, '<NAME>', '<EMAIL>', 'Queremos saber el futuro de nosotros como iglesia', 1),
(139, 1, '<NAME> ', '<EMAIL>', 'Me gustaria ver desde una perspectiva profesional los cambios a los cuales podrias enfrentarnos y como abordarlos ', 1),
(140, 1, 'Elizabeth', '<EMAIL>', 'Soy líder juvenil en una congregación en Ccs. Me gustaría acceder al libro! Gracias...', 2),
(141, 1, '<NAME>', '<EMAIL>', 'Gracias por compartir este libro pastor', 1),
(142, 1, '<NAME>', '<EMAIL>', 'Me alegra mucho que el pastor Darío y su esposa hayan tenido esta nueva iniciativa. Gracias al Señor por sus vidas mis bellos profes. ', 1),
(143, 1, '<NAME> ', '<EMAIL>', 'Que El Señor los siga usando para su Gloria. ', 1),
(144, 1, 'Silvia', '<EMAIL>', 'Nuevas perspectivas', 1),
(145, 1, '<NAME>', '<EMAIL>', 'Por interés...', 1),
(146, 1, '<NAME>', '<EMAIL>', 'Interesante todo lo que viene y ya es ahora, nuevos paradigmas, etc', 1),
(147, 1, '<NAME>', '<EMAIL>', 'Mi expectativa adquirir conocimiento, Ver cual es el enfoque del autor acerca del tema, ya que es de mucha importancia . ', 1),
(148, 1, 'Daniela', '<EMAIL>', 'Nuevas ideas para trabajar con todo luego de este tiempo de cuarentena. Dios te bendiga mas', 1),
(149, 1, '<NAME>', '<EMAIL>', 'Felicidades! Pastor, Dios le siga usando en buena manera. que sigan los ¡Éxitos!', 1),
(150, 1, 'Jereli', '<EMAIL>', 'Gracias', 1),
(151, 1, '<NAME>', '<EMAIL>', 'gracias por el trabajo, bendiciones\r\n', 1),
(152, 1, '<NAME>', '<EMAIL>', 'Quiero leer el libro ', 1),
(153, 1, '<NAME>', '<EMAIL>', 'Me parece que será un libro excelente para ser edificada y edificar a otros durante estos tiempos tan difíciles', 2),
(154, 1, 'Luigino', '<EMAIL>', 'Muchas gracias.\r\nDios les bendiga.', 1),
(155, 1, 'Jorge ', '<EMAIL>', 'Veo este tiempo como una oportunidad que Dios nos abre para generar nueva conexiones. Espero a través de este libro encontrar nuevas ideas,enfoques, perspectivas que me permitan servir mejor a las generaciones que continuarán sirviendo en este mundo tan necesitando. ', 1),
(156, 1, 'Genaro', '<EMAIL>', 'Hola.. Mi expectativa sobre el libro \"Reencuantro con las nuevas generaciones post COVID-19\" es que me pueda dar las herramientas para abordar de una manera mejor y eficaz el mensaje de Dios a través de los recursos digitales que están a nuestros alcance; es también saber cómo ayudar a las peesonas de mi entorno (iglesia, trabajo, aula de clase, etc) a poder salir de algun trastorno depresivo o de alguna otra indole causado por la pandemia que enfrentamos. ', 1),
(157, 1, '<NAME>', '<EMAIL>', 'Saludos y bendiciones a todo el equipo, Dios les siga usando.', 1),
(158, 1, '<NAME>', '<EMAIL>', 'GRACIAS', 1),
(159, 1, '<NAME>', '<EMAIL>', 'Bendiciones para la familia acá siguiendolos omer y yo ', 2),
(160, 1, '<NAME>', '<EMAIL>', 'Gracias por éste valioso aporte pastor ', 1),
(161, 1, '<NAME>', '<EMAIL>', 'Mi expectativa es encontrar en este libro herramientas que me ayuden a mi y a mi ministerio a afrontar la vida después de este momento histórico que estamos viviendo.', 1),
(162, 1, '<NAME>', '<EMAIL>', 'Soy líder de jóvenes y me causó curiosidad. Creo que puede obtener herramientas importantes para trabajar con mi grupo de jóvenes cuando todo esto pase. ', 1),
(163, 1, 'DEISY', '<EMAIL>', 'Pocas', 1),
(164, 1, '<NAME>', '<EMAIL>', 'Bendiciones de Dios para todos.', 4),
(165, 1, '<NAME>', '<EMAIL>', 'Bueno quiero aprender un poco más y creo que este libro trae muchas cosas interesantes ', 1),
(166, 1, '<NAME>', '<EMAIL>', 'Espero que sea de herramienta para el ministerio que desempeño, estoy interesada en él.', 1),
(167, 1, '<NAME>', '<EMAIL>', 'Que pueda ayudarme a tener una mejor visión luego del proceso del post covid-19', 1),
(168, 1, '<NAME>', '<EMAIL>', 'Poder entender y conocer estrategias para trabajar con los jóvenes,Post covid 19', 1),
(169, 1, 'Hidekel', '<EMAIL>', 'Hola necesito el libro', 1),
(170, 1, '<NAME> ', '<EMAIL>', 'M<NAME>', 1),
(171, 1, 'Brian', '<EMAIL>', 'Dlb, me gustaría tener una perspectiva e idea de cómo se podrá trabajar con los jóvenes de mi iglesia', 1),
(172, 1, 'Mariagnis', '<EMAIL>', 'Descargar ', 1),
(173, 1, '<NAME>', '<EMAIL>', 'aprender como impactar a la juventud en esta etapa de cuarentena', 1),
(174, 1, '<NAME>', '<EMAIL>', '...', 1),
(175, 1, '<NAME>', '<EMAIL>', '.', 2),
(176, 1, '<NAME>', '<EMAIL>', 'Gracias pastor! Dios te siga bendiciendo', 2),
(177, 1, '<NAME> ', '<EMAIL>', 'Estoy en el grupo del seminario sólo que no me pude conectar por zoom ya que mi Internet no me dejó. ', 2),
(178, 1, 'Pedro', '<EMAIL>', 'Bien', 1),
(179, 1, '<NAME>', '<EMAIL>', 'Past<NAME>, son una bendición', 1),
(180, 1, '<NAME>', '<EMAIL>', 'Dios les bendiga', 1),
(181, 1, '<NAME>', '<EMAIL>', 'Gracias por el aporte. Dios le bendiga ', 1),
(182, 1, 'Joel ', '<EMAIL>', 'Gracias a Dios por su vida pastor', 1),
(183, 1, 'Alberth', '<EMAIL>', 'Gracias ', 1),
(184, 1, 'Yaicar', '<EMAIL>', 'Que será de bendición para mi vida para otros', 1),
(185, 1, '<NAME>', '<EMAIL>', 'Mis expectativa con respecto al libro es edificarme y prepararme con todo lo que mi Dios soberano esta haciendo con esta situacion y asi porder ayudar a otros incluso durante y despues del covid 19', 1),
(186, 1, '<NAME>', '<EMAIL>', 'Se agente multiplicador en medio de cualquier circunstancia', 1),
(187, 1, '<NAME>', '<EMAIL>', 'Creo que es ver el impacto de la pandemia ante la nueva transformación que tendrá en nuestra sociedad y sobre todo en el área de MUF.', 1),
(188, 1, '<NAME> ', '<EMAIL>', 'Pastor IB Vidas con Propósito ', 1),
(189, 1, '<NAME>', '<EMAIL>', '💗', 1),
(190, 1, '<NAME>', '<EMAIL>', 'Obtener conocimientos que me puedan ayudar a aclarar mis dudas , aprender todo lo relacionado a esta materia', 4),
(191, 1, '<NAME> ', '<EMAIL>', 'Me encantaría leer el recurso, me despierta mucha inquietud saber la idea que sempropone para el.despues de este covid ', 1),
(192, 1, '<NAME>', '<EMAIL>', 'Conocer un poco mas a la nueva generación y tener herramientas que me permitan ser de apoyos para ellos .', 1),
(193, 1, 'Rosnyn', '<EMAIL>', 'Dios les bendiga', 1),
(194, 1, 'Luis', '<EMAIL>', 'Covid', 1),
(195, 1, 'Claudia ', '<EMAIL>', 'Trabajo como líder de grupos pequeños, ahora en tiempos de pandemia,, muchos de los que asisten ha tenido dentro de sus contactos personas enfermas, es interesante poder llegar a ellos con algo más. ', 1),
(196, 1, 'Richard', '<EMAIL>', 'Gracias', 1),
(197, 1, '<NAME>', '<EMAIL>', '<3', 2),
(198, 1, '<NAME>', '<EMAIL>', 'Me encantaría poder conocer la perspectiva de la post cuarentena.\r\n', 1),
(199, 1, '<NAME>', '<EMAIL>', 'Encontrar herramientas para usarlas desde ya y así poder acercar a Cristo a quienes hoy no le conocen\r\n', 1),
(200, 1, '<NAME> ', '<EMAIL>', 'Gracias, Dios los bendiga ', 1),
(201, 1, '<NAME> ', '<EMAIL>', 'Saludes y bendiciones ', 1),
(202, 1, '<NAME>', '<EMAIL>', 'Bueno, tengo expectativas grandes, realmente me gustaría poder leer el libro, ya que estudio la carrera de psicología y me gustaría saber cómo abordar las problemáticas que se presentarán luego de esta pandemia que nos aqueja, considero este libro como una herramienta para mi desarrollo personal ya que nos ayudará mucho a todos los que nos gusta trabajar con jóvenes y señoritas.', 1),
(203, 1, '<NAME>', '<EMAIL>', 'Tener una mentalidad y recursos diferente para acercarse a las nuevas generaciones despues de que pase la pandemia tener una vision diferente del mundo despues de lo que hemos vivido', 1),
(204, 1, 'Wendy ', '<EMAIL>', 'Gracias', 5),
(205, 1, '<NAME>', '<EMAIL>', 'aprender y tener mas en cuenta los aspectos necesarios para hacer llegar la palabra de Dios a más personas ', 1),
(206, 1, 'percy', '<EMAIL>', 'Mi expectativa es aprender a conectar más personas con Jesús y preparar a otras jóvenes apasionados que deseen alcanzar personas nuevas a Cristo', 3),
(207, 1, '<NAME>', '<EMAIL>', 'Leer para entender', 1),
(208, 1, '<NAME>', '<EMAIL>', 'Me gustaría conocer cuales serían algunos de los desafíos que tendremos los jóvenes debido al COVID 19 y cuáles serían las maneras de abordarlos y tomarlos positivamente.', 1),
(209, 1, '<NAME>', '<EMAIL>', 'Interesado como docente y felicitaciones por ese aporte. ', 1),
(210, 1, '<NAME>', '<EMAIL>', 'Curiosidad, lo ví en el noticiero de \r\nGlobovisión', 1),
(211, 1, '<NAME>', '<EMAIL>', 'Gracias', 1),
(212, 1, '<NAME>', '<EMAIL>', 'Gracias por tan maravilloso Material, bendiciones y abrazos. Dios les bendiga.', 1),
(213, 1, '<NAME>', '<EMAIL>', 'quiero leer este libro', 1),
(214, 1, 'Ninoska', '<EMAIL>', ' Existe mucha incertidumbre en la realidad que se nos puede presentar después del COVID-19, contar con ideas para ese momento, seria excelente.', 1),
(215, 1, '<NAME>', '<EMAIL>', 'Hola! Buenos Dias, Gusto en saludarles, bueno en realidad tengo mucha expectativa por el libro, el dia de ayer vi su publicacion en globovision antes de que me cerraran la señal de directv, solo me dio chance de ubicar al autor y buscarlo orita por internet, como les comento tengo mucha curiosidad y a la vez ansias por leerlo y poderles comentar todas mis inquietudes y/o dudas, sin mas que agregar , me despido. saludos.....', 1),
(216, 1, '<NAME>', '<EMAIL>', 'Gracias por Amar y Luchar por los universitarios de este País. Dios les bendiga y les siga usando.', 1),
(217, 1, '<NAME>', '<EMAIL>', 'Con Dios Todo es posible, Bendiciones en Cristo, esto es lo que sucede cuando Dios entra en escena.', 1),
(218, 1, 'Maritzabel', '<EMAIL>', 'Conocer la propuesta para el liderazgo juvenil y lo que podrían hacer en sus iglesias ', 1),
(219, 1, '<NAME> ', '<EMAIL>', 'Dios les continúe bendiciendo ', 1),
(220, 1, '<NAME>', '<EMAIL>', 'tener nuevos aprendizajes, enseñanzas y herramientas de acuerdo al escenario que vivimos como jóvenes hoy en dia, recibir para luego ayudar a otros ', 1),
(221, 1, 'cielo', '<EMAIL>', 'gracias por la oportunidad de descargar su libro hermano.', 1),
(222, 1, '<NAME>', '<EMAIL>', 'Animo y fuerza que se puede salir adelante', 1),
(223, 1, '<NAME>', '<EMAIL>', 'Contar con herramientas que contribuyan a alcanzar almas para Cristo', 1),
(224, 1, 'Carlos', '<EMAIL>', 'Gracias por compartir este material y bendecir a muchos.', 1),
(225, 1, '<NAME>', '<EMAIL>', 'Gracias!', 1),
(226, 1, '<NAME>', '<EMAIL>', 'Ty', 1),
(227, 1, '<NAME>', '<EMAIL>', 'Gracias... Dios les siga Ayudando. ', 1),
(228, 1, 'alfredo', '<EMAIL>', '...', 1),
(229, 1, '<NAME>', '<EMAIL>', 'Trabajo en la formación de líderes para el servicio cristiano en y a través de la iglesia', 1),
(230, 1, '<NAME>', '<EMAIL>', 'Dios les bendiga', 1),
(231, 1, 'Bryan', '<EMAIL>', 'Bueno poder ver y saber formas para poder llevar el mensaje de salvación en medio de esta situación', 1),
(232, 1, 'Carolina', '<EMAIL>', 'Leer el contenido', 1),
(233, 1, '<NAME>', '<EMAIL>', 'Saludos hermano Darío. Dios le guarde. Me gustaría leer este libro para nutrir mis reflexiones personales acerca del futuro próximo de la obra evangelística y de discipulado entre los jóvenes universitarios. Saludos y gracias por el esfuerzo. ', 1),
(234, 1, 'Margarita,Cervantes', '<EMAIL>', 'Dios les bendiga', 1),
(235, 1, 'Ivan', '<EMAIL>', 'Soy pastor de jóvenes y siempre busco nuevas herramientas para ser de bendición a ellos. Gracias por este recurso.', 1),
(236, 1, '<NAME>', '<EMAIL>', 'Me interesa este libro para optimizar mi trabajo ministerial e integralmente con las nuevas generaciones pastor. Bendiciones y saludos cordiales. Se les recuerda con mucho ', 1),
(237, 1, '<NAME>', '<EMAIL>', 'Me parece excelente la iniciativa y con propósitos de parte de Dios para poder seguir atendiendo a los jóvenes ya que el mundo presenta cambios constantes y debemos prepararnos y permanecer enfocados y atender estratégicamente, Dios les siga Bendiciendo', 1),
(238, 1, '<NAME>', '<EMAIL>', 'Espero encontrar herramientas, para termine este tiempo...\r\nSoy pastor de una Iglesia al sur de Chile, y entiendo que debo dedicar mas tiempo a las nuevas generaciones, este tiempo de pandemia, me ha obligado a conocer y relacionarme con las redes sociales y los chicos me llevan la delantera.\r\nCreo que los Jóvenes y adolescentes, son los nuevos diáconos de estos nuevos tiempos.', 1),
(239, 1, 'Albert', '<EMAIL>', 'Dios les bendiga', 1),
(240, 1, 'Janmary ', '<EMAIL>', 'Cuáles son los consejos para poder tener ante esta situación ', 1),
(241, 1, '<NAME>', '<EMAIL>', 'Tengo la expectativa de conocer con mayor profundida como utilizar este nuevo espacio de comunicación del evangelio de Jesucristo, especialmente desde la iglesia local. Actualmente sirvo como misionero en linea en GMO y veo el enorme campo de proclamación del evangelio de maneras diferentes a la que hasta ahora veniamos realizando. Bendiciones.\r\n', 1),
(242, 1, '<NAME>', '<EMAIL>', 'Dios le bendiga a la nueva generación.', 1),
(243, 1, '<NAME>', '<EMAIL>', 'Quiero aprender mas dek padre que me creo y ne hizo su hija.', 1),
(244, 1, 'Lia', '<EMAIL>', 'Conocer el estudio y perspectiva que plantean ante esta situación y su efecto en los jóvenes. ', 1);
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `users`
--
CREATE TABLE `users` (
`id_user` int(10) UNSIGNED NOT NULL,
`name` varchar(100) NOT NULL,
`email` varchar(150) NOT NULL,
`pass` varchar(90) NOT NULL,
`tmp_pass` varchar(90) DEFAULT NULL,
`token` varchar(90) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Índices para tablas volcadas
--
--
-- Indices de la tabla `libros`
--
ALTER TABLE `libros`
ADD PRIMARY KEY (`id_libro`);
--
-- Indices de la tabla `suscripcion`
--
ALTER TABLE `suscripcion`
ADD PRIMARY KEY (`id_suscriptor`);
--
-- Indices de la tabla `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id_user`),
ADD UNIQUE KEY `email` (`email`);
--
-- AUTO_INCREMENT de las tablas volcadas
--
--
-- AUTO_INCREMENT de la tabla `libros`
--
ALTER TABLE `libros`
MODIFY `id_libro` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT de la tabla `suscripcion`
--
ALTER TABLE `suscripcion`
MODIFY `id_suscriptor` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=255;
--
-- AUTO_INCREMENT de la tabla `users`
--
ALTER TABLE `users`
MODIFY `id_user` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
<filename>backend/src/main/resources/db/migration/V1000001__create_user_table.sql
CREATE TABLE user (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
name varchar(100) not null,
external_identifier varchar(100) not null,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1;
|
CREATE TABLE posts(
ID int NOT NULL AUTO_INCREMENT,
post varchar(222) NOT NULL,
genere varchar(10) NOT NULL,
tme varchar(255) NOT NULL,
dte varchar(255) NOT NULL,
cmts varchar(500),
PRIMARY KEY (ID)
);
|
/*MySQL - stored procedure*/
DELIMITER //
DROP PROCEDURE IF EXISTS updatenote;
CREATE PROCEDURE `updatenote`
(
IN noteid INT,
IN title VARCHAR(50),
IN body VARCHAR(65000),
IN tags VARCHAR(25)
)
BEGIN
DECLARE TID INT;
DECLARE delim CHAR;
DECLARE strt INT;
DECLARE idx INT;
DECLARE tag VARCHAR(25);
SET delim = ':';
/*update note*/
UPDATE Notes SET title = title, body = body, updated = NOW()
WHERE note_id = noteid;
/*delete tag links*/
DELETE FROM NoteTags WHERE note_id = noteid;
/*split and add tags*/
SET strt = 1;
SET tags = CONCAT(tags, ':');
SET idx = LOCATE(delim, tags);
WHILE idx > 0 DO
SET tag = SUBSTRING(tags, strt, idx - strt);
SET strt = idx + 1;
SET idx = LOCATE(delim, tags, strt);
/*insert tags if not in table*/
IF NOT EXISTS (select Tag.tag_id from Tag where Tag.text = tag) THEN
INSERT INTO Tag(Tag.text) VALUES (tag);
SET TID = LAST_INSERT_ID();
ELSE
SET TID = (SELECT Tag.tag_id from Tag where Tag.text = tag);
END IF;
/*create note to tag link*/
INSERT INTO NoteTags(note_id, tag_id) VALUES (noteid, TID);
END WHILE;
END //
DELIMITER ;
|
ALTER TABLE `conversation_opt`
ADD COLUMN `has_eqcq` TINYINT NOT NULL DEFAULT 0 AFTER `allow_intructor`;
|
-- MySQL Script generated by MySQL Workbench
-- Tue Dec 18 23:10:27 2018
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';
-- -----------------------------------------------------
-- Schema supehatr_bawtdb
-- -----------------------------------------------------
-- -----------------------------------------------------
-- Schema supehatr_bawtdb
-- -----------------------------------------------------
CREATE SCHEMA IF NOT EXISTS `supehatr_bawtdb` DEFAULT CHARACTER SET utf8 ;
USE `supehatr_bawtdb` ;
-- -----------------------------------------------------
-- Table `supehatr_bawtdb`.`User`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `supehatr_bawtdb`.`User` (
`idUser` INT NOT NULL,
`avatarURL` VARCHAR(256) NULL,
`bot` TINYINT NULL,
`username` VARCHAR(128) NULL,
`tag` VARCHAR(128) NULL,
PRIMARY KEY (`idUser`))
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `supehatr_bawtdb`.`Message`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `supehatr_bawtdb`.`Message` (
`idMessage` INT NOT NULL,
`author` INT NOT NULL,
`channel` INT NOT NULL,
`content` TEXT(2000) NOT NULL,
`createdAt` DATE NOT NULL,
PRIMARY KEY (`idMessage`),
INDEX `author_idx` (`author` ASC) VISIBLE,
CONSTRAINT `author`
FOREIGN KEY (`author`)
REFERENCES `supehatr_bawtdb`.`User` (`idUser`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB;
SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
|
-- phpMyAdmin SQL Dump
-- version 4.5.4.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Dec 06, 2018 at 03:28 PM
-- Server version: 5.7.11
-- PHP Version: 7.2.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `onitshamarket`
--
-- --------------------------------------------------------
--
-- Table structure for table `recently_viewed`
--
CREATE TABLE `recently_viewed` (
`id` bigint(20) NOT NULL,
`user_id` bigint(20) NOT NULL,
`product_ids` varchar(255) NOT NULL,
`viewed_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `recently_viewed`
--
INSERT INTO `recently_viewed` (`id`, `user_id`, `product_ids`, `viewed_date`) VALUES
(1, 3, '["1"]', '2018-12-06 06:36:52'),
(2, 2, '["7","4"]', '2018-12-06 11:34:05');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `recently_viewed`
--
ALTER TABLE `recently_viewed`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `recently_viewed`
--
ALTER TABLE `recently_viewed`
MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
<filename>DB/generateScript.sql
BEGIN TRANSACTION;
DROP TABLE IF EXISTS "api_clubleague";
CREATE TABLE IF NOT EXISTS "api_clubleague" (
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
"club_id" integer,
"league_id" integer,
FOREIGN KEY("league_id") REFERENCES "api_league"("id") DEFERRABLE INITIALLY DEFERRED,
FOREIGN KEY("club_id") REFERENCES "api_userclub"("id") DEFERRABLE INITIALLY DEFERRED
);
DROP TABLE IF EXISTS "api_fmtpos";
CREATE TABLE IF NOT EXISTS "api_fmtpos" (
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
"amount" integer,
"formation_id" integer,
"position_id" integer,
FOREIGN KEY("position_id") REFERENCES "api_position"("id") DEFERRABLE INITIALLY DEFERRED,
FOREIGN KEY("formation_id") REFERENCES "api_formation"("id") DEFERRABLE INITIALLY DEFERRED
);
DROP TABLE IF EXISTS "api_league";
CREATE TABLE IF NOT EXISTS "api_league" (
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
"color1" varchar(7),
"color2" varchar(7),
"color3" varchar(7),
"crest" varchar(100),
"creator_id" integer,
FOREIGN KEY("creator_id") REFERENCES "api_usuario"("id") DEFERRABLE INITIALLY DEFERRED
);
DROP TABLE IF EXISTS "api_match";
CREATE TABLE IF NOT EXISTS "api_match" (
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
"datetime" datetime,
"home_score" integer,
"away_score" integer,
"_round_id" integer,
"away_club_id" integer,
"home_club_id" integer,
FOREIGN KEY("home_club_id") REFERENCES "api_realclub"("id") DEFERRABLE INITIALLY DEFERRED,
FOREIGN KEY("_round_id") REFERENCES "api_round"("id") DEFERRABLE INITIALLY DEFERRED,
FOREIGN KEY("away_club_id") REFERENCES "api_realclub"("id") DEFERRABLE INITIALLY DEFERRED
);
DROP TABLE IF EXISTS "api_player";
CREATE TABLE IF NOT EXISTS "api_player" (
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
"nome" varchar(60),
"club_id" integer,
"position_id" integer,
FOREIGN KEY("position_id") REFERENCES "api_position"("id") DEFERRABLE INITIALLY DEFERRED,
FOREIGN KEY("club_id") REFERENCES "api_realclub"("id") DEFERRABLE INITIALLY DEFERRED
);
DROP TABLE IF EXISTS "api_playerprice";
CREATE TABLE IF NOT EXISTS "api_playerprice" (
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
"price" integer,
"captain" smallint,
"_round_id" integer,
"player_id" integer,
FOREIGN KEY("player_id") REFERENCES "api_player"("id") DEFERRABLE INITIALLY DEFERRED,
FOREIGN KEY("_round_id") REFERENCES "api_round"("id") DEFERRABLE INITIALLY DEFERRED
);
DROP TABLE IF EXISTS "api_playerstats";
CREATE TABLE IF NOT EXISTS "api_playerstats" (
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
"_round_id" integer,
"player_id" integer,
"stat_id" integer,
FOREIGN KEY("player_id") REFERENCES "api_player"("id") DEFERRABLE INITIALLY DEFERRED,
FOREIGN KEY("stat_id") REFERENCES "api_stat"("id") DEFERRABLE INITIALLY DEFERRED,
FOREIGN KEY("_round_id") REFERENCES "api_round"("id") DEFERRABLE INITIALLY DEFERRED
);
DROP TABLE IF EXISTS "api_selected";
CREATE TABLE IF NOT EXISTS "api_selected" (
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
"_round_id" integer,
"club_id" integer,
"player_id" integer,
FOREIGN KEY("player_id") REFERENCES "api_player"("id") DEFERRABLE INITIALLY DEFERRED,
FOREIGN KEY("club_id") REFERENCES "api_userclub"("id") DEFERRABLE INITIALLY DEFERRED,
FOREIGN KEY("_round_id") REFERENCES "api_round"("id") DEFERRABLE INITIALLY DEFERRED
);
DROP TABLE IF EXISTS "api_squad";
CREATE TABLE IF NOT EXISTS "api_squad" (
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
"_round_id" integer,
"club_id" integer,
"fmt_id" integer,
FOREIGN KEY("club_id") REFERENCES "api_userclub"("id") DEFERRABLE INITIALLY DEFERRED,
FOREIGN KEY("fmt_id") REFERENCES "api_fmtpos"("id") DEFERRABLE INITIALLY DEFERRED,
FOREIGN KEY("_round_id") REFERENCES "api_round"("id") DEFERRABLE INITIALLY DEFERRED
);
DROP TABLE IF EXISTS "api_userclub";
CREATE TABLE IF NOT EXISTS "api_userclub" (
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
"nome" varchar(60),
"color1" varchar(7),
"color2" varchar(7),
"color3" varchar(7),
"crest" varchar(100),
"owner_id" integer,
FOREIGN KEY("owner_id") REFERENCES "api_usuario"("id") DEFERRABLE INITIALLY DEFERRED
);
DROP TABLE IF EXISTS "api_stat";
CREATE TABLE IF NOT EXISTS "api_stat" (
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
"nome" varchar(60),
"desc" varchar(300),
"points" decimal
);
DROP TABLE IF EXISTS "api_round";
CREATE TABLE IF NOT EXISTS "api_round" (
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
"round_number" integer,
"season" integer
);
DROP TABLE IF EXISTS "api_realclub";
CREATE TABLE IF NOT EXISTS "api_realclub" (
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
"nome" varchar(60),
"crest" varchar(100),
"short_name" varchar(3)
);
DROP TABLE IF EXISTS "api_position";
CREATE TABLE IF NOT EXISTS "api_position" (
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
"nome" varchar(60),
"cod_pos" varchar(3)
);
DROP TABLE IF EXISTS "api_formation";
CREATE TABLE IF NOT EXISTS "api_formation" (
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
"nome" varchar(5)
);
DROP TABLE IF EXISTS "api_usuario";
CREATE TABLE IF NOT EXISTS "api_usuario" (
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
"password" varchar(128) NOT NULL,
"last_login" datetime,
"email" varchar(255) NOT NULL UNIQUE,
"name" varchar(255) NOT NULL,
"foto" varchar(100),
"is_active" bool NOT NULL,
"first_access" bool NOT NULL,
"is_admin" bool NOT NULL,
"birthdate" date
);
DROP INDEX IF EXISTS "api_clubleague_league_id_0d895277";
CREATE INDEX IF NOT EXISTS "api_clubleague_league_id_0d895277" ON "api_clubleague" (
"league_id"
);
DROP INDEX IF EXISTS "api_clubleague_club_id_9edc33f2";
CREATE INDEX IF NOT EXISTS "api_clubleague_club_id_9edc33f2" ON "api_clubleague" (
"club_id"
);
DROP INDEX IF EXISTS "api_fmtpos_position_id_c7a40f31";
CREATE INDEX IF NOT EXISTS "api_fmtpos_position_id_c7a40f31" ON "api_fmtpos" (
"position_id"
);
DROP INDEX IF EXISTS "api_fmtpos_formation_id_1f63e671";
CREATE INDEX IF NOT EXISTS "api_fmtpos_formation_id_1f63e671" ON "api_fmtpos" (
"formation_id"
);
DROP INDEX IF EXISTS "api_league_creator_id_3ed8b020";
CREATE INDEX IF NOT EXISTS "api_league_creator_id_3ed8b020" ON "api_league" (
"creator_id"
);
DROP INDEX IF EXISTS "api_match_home_club_id_4a6e6a7d";
CREATE INDEX IF NOT EXISTS "api_match_home_club_id_4a6e6a7d" ON "api_match" (
"home_club_id"
);
DROP INDEX IF EXISTS "api_match_away_club_id_c365fdcc";
CREATE INDEX IF NOT EXISTS "api_match_away_club_id_c365fdcc" ON "api_match" (
"away_club_id"
);
DROP INDEX IF EXISTS "api_match__round_id_2f9bd887";
CREATE INDEX IF NOT EXISTS "api_match__round_id_2f9bd887" ON "api_match" (
"_round_id"
);
DROP INDEX IF EXISTS "api_player_position_id_7cf6ee64";
CREATE INDEX IF NOT EXISTS "api_player_position_id_7cf6ee64" ON "api_player" (
"position_id"
);
DROP INDEX IF EXISTS "api_player_club_id_a3e28cac";
CREATE INDEX IF NOT EXISTS "api_player_club_id_a3e28cac" ON "api_player" (
"club_id"
);
DROP INDEX IF EXISTS "api_playerprice_player_id_436866d5";
CREATE INDEX IF NOT EXISTS "api_playerprice_player_id_436866d5" ON "api_playerprice" (
"player_id"
);
DROP INDEX IF EXISTS "api_playerprice__round_id_316fb8af";
CREATE INDEX IF NOT EXISTS "api_playerprice__round_id_316fb8af" ON "api_playerprice" (
"_round_id"
);
DROP INDEX IF EXISTS "api_playerstats_stat_id_fa4a2392";
CREATE INDEX IF NOT EXISTS "api_playerstats_stat_id_fa4a2392" ON "api_playerstats" (
"stat_id"
);
DROP INDEX IF EXISTS "api_playerstats_player_id_a23d5698";
CREATE INDEX IF NOT EXISTS "api_playerstats_player_id_a23d5698" ON "api_playerstats" (
"player_id"
);
DROP INDEX IF EXISTS "api_playerstats__round_id_5d80c05b";
CREATE INDEX IF NOT EXISTS "api_playerstats__round_id_5d80c05b" ON "api_playerstats" (
"_round_id"
);
DROP INDEX IF EXISTS "api_selected_player_id_1cf34345";
CREATE INDEX IF NOT EXISTS "api_selected_player_id_1cf34345" ON "api_selected" (
"player_id"
);
DROP INDEX IF EXISTS "api_selected_club_id_279cfda9";
CREATE INDEX IF NOT EXISTS "api_selected_club_id_279cfda9" ON "api_selected" (
"club_id"
);
DROP INDEX IF EXISTS "api_selected__round_id_cb27e12b";
CREATE INDEX IF NOT EXISTS "api_selected__round_id_cb27e12b" ON "api_selected" (
"_round_id"
);
DROP INDEX IF EXISTS "api_squad_fmt_id_6b2a3304";
CREATE INDEX IF NOT EXISTS "api_squad_fmt_id_6b2a3304" ON "api_squad" (
"fmt_id"
);
DROP INDEX IF EXISTS "api_squad_club_id_2e387fe5";
CREATE INDEX IF NOT EXISTS "api_squad_club_id_2e387fe5" ON "api_squad" (
"club_id"
);
DROP INDEX IF EXISTS "api_squad__round_id_04e2944d";
CREATE INDEX IF NOT EXISTS "api_squad__round_id_04e2944d" ON "api_squad" (
"_round_id"
);
DROP INDEX IF EXISTS "api_userclub_owner_id_bfe4fed3";
CREATE INDEX IF NOT EXISTS "api_userclub_owner_id_bfe4fed3" ON "api_userclub" (
"owner_id"
);
COMMIT;
|
<reponame>MinisterioPublicoRJ/api-cadg<gh_stars>1-10
SELECT aisp_codigo,
aisp_nome,
orgao_id,
nr_denuncias,
nr_cautelares,
nr_acordos_n_persecucao,
nr_arquivamentos,
nr_aberturas_vista,
max_denuncias,
max_cautelares,
max_acordos,
max_arquivamentos,
max_vistas,
perc_denuncias,
perc_cautelares,
perc_acordos,
perc_arquivamentos,
perc_aberturas_vista,
med_denuncias,
med_cautelares,
med_acordos,
med_arquivamentos,
med_vistas,
var_med_denuncias,
var_med_cautelares,
var_med_acordos,
var_med_arquivamentos,
var_med_aberturas_vista,
dt_calculo,
nm_max_denuncias,
nm_max_cautelares,
nm_max_acordos,
nm_max_arquivamentos,
nm_max_aberturas,
cod_pct
FROM {schema}.tb_pip_radar_performance
WHERE orgao_id = :orgao_id
|
CREATE VIEW [dbo].[vRooms]
AS
SELECT dbo.Bldg.Bldg_Key AS BldgKey, dbo.Room.Floor_Key AS FloorKey, dbo.Room.Room_Key AS RoomKey, dbo.Bldg.Primary_Display_Name AS BldgName, dbo.Room.Floor_Name AS FloorName,
dbo.Room.Room AS RoomNumber, dbo.Room.Room_Name AS RoomName, dbo.Room.Room_Category_Name AS RoomCategoryName, dbo.Room.Room_Category_Code AS RoomCategoryCode
FROM dbo.Bldg INNER JOIN
dbo.Room ON dbo.Bldg.Bldg_Key = dbo.Room.Bldg_Key
GO
EXECUTE sp_addextendedproperty @name = N'MS_DiagramPaneCount', @value = 1, @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'VIEW', @level1name = N'vRooms';
GO
EXECUTE sp_addextendedproperty @name = N'MS_DiagramPane1', @value = N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties =
Begin PaneConfigurations =
Begin PaneConfiguration = 0
NumPanes = 4
Configuration = "(H (1[40] 4[20] 2[20] 3) )"
End
Begin PaneConfiguration = 1
NumPanes = 3
Configuration = "(H (1 [50] 4 [25] 3))"
End
Begin PaneConfiguration = 2
NumPanes = 3
Configuration = "(H (1 [50] 2 [25] 3))"
End
Begin PaneConfiguration = 3
NumPanes = 3
Configuration = "(H (4 [30] 2 [40] 3))"
End
Begin PaneConfiguration = 4
NumPanes = 2
Configuration = "(H (1 [56] 3))"
End
Begin PaneConfiguration = 5
NumPanes = 2
Configuration = "(H (2 [66] 3))"
End
Begin PaneConfiguration = 6
NumPanes = 2
Configuration = "(H (4 [50] 3))"
End
Begin PaneConfiguration = 7
NumPanes = 1
Configuration = "(V (3))"
End
Begin PaneConfiguration = 8
NumPanes = 3
Configuration = "(H (1[56] 4[18] 2) )"
End
Begin PaneConfiguration = 9
NumPanes = 2
Configuration = "(H (1 [75] 4))"
End
Begin PaneConfiguration = 10
NumPanes = 2
Configuration = "(H (1[66] 2) )"
End
Begin PaneConfiguration = 11
NumPanes = 2
Configuration = "(H (4 [60] 2))"
End
Begin PaneConfiguration = 12
NumPanes = 1
Configuration = "(H (1) )"
End
Begin PaneConfiguration = 13
NumPanes = 1
Configuration = "(V (4))"
End
Begin PaneConfiguration = 14
NumPanes = 1
Configuration = "(V (2))"
End
ActivePaneConfig = 0
End
Begin DiagramPane =
Begin Origin =
Top = 0
Left = 0
End
Begin Tables =
Begin Table = "Bldg"
Begin Extent =
Top = 6
Left = 38
Bottom = 136
Right = 248
End
DisplayFlags = 280
TopColumn = 0
End
Begin Table = "Room"
Begin Extent =
Top = 5
Left = 333
Bottom = 135
Right = 544
End
DisplayFlags = 280
TopColumn = 0
End
End
End
Begin SQLPane =
End
Begin DataPane =
Begin ParameterDefaults = ""
End
Begin ColumnWidths = 18
Width = 284
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 2655
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
End
End
Begin CriteriaPane =
Begin ColumnWidths = 11
Column = 1440
Alias = 1770
Table = 1170
Output = 720
Append = 1400
NewValue = 1170
SortType = 1350
SortOrder = 1410
GroupBy = 1350
Filter = 1350
Or = 1350
Or = 1350
Or = 1350
End
End
End
', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'VIEW', @level1name = N'vRooms';
|
ALTER TABLE testtable
ALTER COLUMN field4 SET DEFAULT 0.0;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.