sql stringlengths 6 1.05M |
|---|
DROP TABLE IF EXISTS `GBPUSD_M15`;
CREATE TABLE IF NOT EXISTS `GBPUSD_M15`(
`id` int(5) NOT NULL,
`bull` varchar(10) NOT NULL,
`bear` varchar(10) NOT NULL,
`buy` varchar(10) NOT NULL,
`sell` varchar(10) NOT NULL,
`av` varchar(10) NOT NULL,
`mm` varchar(10) NOT NULL,
`time` varchar(30) NOT NULL);
ALTER TABLE `... |
<filename>config/db/dados/collectioncentreoverview.sql
-- View: collectioncentreoverview
-- returns collection centre enrollment summaries for users and subjects
-- grouped by username; used in StudyController.findOne.
-- DROP VIEW collectioncentreoverview;
CREATE OR REPLACE VIEW dados.collectioncentreoverview AS
S... |
/term=;
/params on
insert into DI_ACTIVE_DATA_TYPE_FIELDS
(
DI_ACTIVE_DATA_TYPE_CODE,
DI_ACTIVE_DATA_TYPE_FIELD_CODE,
FIELD_NO,
FIELD_IDENTIFIER,
FIELD_TYPE_CODE,
FIELD_NAME,
IS_VISIBLE
)
values
(
:1,
:2,
:3,
:4,
( select
diadt.DI_ACTIVE_DATA_TYPE_CODE
from
... |
ALTER TABLE `registrations` CHANGE `registeredAt` `registeredAt` datetime NULL COMMENT 'Date of the registration or renewal. This is null if the registration is not yet active (e.g. during payment)';
ALTER TABLE `registrations` ADD COLUMN `createdAt` datetime NOT NULL COMMENT '' AFTER `groupId`; |
<reponame>lvyanghui/java-base<filename>fund/src/main/resources/sql/ddl.sql
CREATE TABLE `fund_detail_info` (
`id` int NOT NULL AUTO_INCREMENT COMMENT '主键id',
`fund_code` varchar(16) DEFAULT NULL COMMENT '基金代码',
`fund_name` varchar(32) DEFAULT NULL COMMENT '基金简称',
`fund_pinyin` varchar(32) DEFAULT NULL COMMENT '... |
<filename>docs/demo.sql
CREATE DATABASE IF NOT EXISTS c410;
USE c410;
INSERT INTO servers values('cs410.cs.ualberta.ca:41070','localhost','http://cs410-07:8080/',1);
INSERT INTO author values('000000','admin','Administrator','12345','cs410.cs.ualberta.ca:41070','<EMAIL>','male','edmonton','1992-01-01','1.jpg',1);
INSE... |
<reponame>sbalababu/archway_test
--alter table workspace_request
-- add column summary varchar(255),
-- add column description TEXT,
-- add column behavior varchar(50);
--update workspace_request
--set behavior = new_behavior,
-- summary = b.name,
-- description = b.name
--from (select case
-- ... |
<reponame>deic-dk/DDPS<gh_stars>1-10
# Re-write so
#
# MSG|MATCH|select
#
# tests for sql function is_flowspec_type
# Lines starting with # are ignored, so are empty lines
#
# Valid
#
ok select "is_flowspec_type"(0,65535, '=0 =21 =23 =25 =26 =27 >=30&<=32 >=33&<=35 >=37&<=39 =65535');
ok select "is_flowspec_type"(0... |
<gh_stars>10-100
# Migration script for nasa/MCT-Plugins#134
# May need to re-run if older distributions are used,
# as these may restore/inject old taxonomy.
# Specifically, this migrates from databases used at commit hash:
# e1949eb9a890411946782ad581e87fa8f0220106
# to:
# a02daf7a2bd5cab129401085e4ee5137098... |
<filename>integration/dataservice-hosting-tests/tests-integration/tests/src/test/resources/artifacts/DSS/sql/MySql/student.sql<gh_stars>100-1000
CREATE TABLE IF NOT EXISTS STUDENT_T (
REGISTRATIION_NUMBER_C VARCHAR (50),
NAME_C VARCHAR (100),
EMAIL_C VARCHAR (100),
AG... |
<gh_stars>1-10
-- start_ignore
SET gp_create_table_random_default_distribution=off;
-- end_ignore
--
-- CK_SYNC1 CO TABLE 1
--
create table ck_sync1_co_alter_part_split_partrange1 (i int) with ( appendonly='true', orientation='column') partition by range(i) (start(1) end(10) every(5));
--
-- Insert few records into th... |
<reponame>nurikk/gpdb
drop table if exists t5;
drop table if exists t7;
drop table if exists t15;
drop table if exists t20;
drop table if exists t23;
drop table if exists t27;
drop table if exists t28;
drop table if exists t36;
drop table if exists t48;
drop table if exists t51;
drop table if exists t58;
drop table if ... |
-- Copyright 2004-2019 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (https://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
CREATE TABLE TEST(ID INT, R INT, CATEGORY INT);
> ok
INSERT INTO TEST VALUES
(1, 4, 1),
(2, 3, 1),
(3, 2, 2),
(4, 1, 2);
> update count... |
<filename>database/pemesanan_domain_hosting_uns.sql
-- phpMyAdmin SQL Dump
-- version 4.1.12
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Oct 09, 2016 at 05:13 PM
-- Server version: 5.6.16
-- PHP Version: 5.5.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET ... |
SELECT p1.id, p2.id, v1, v2
FROM polygons p1 CROSS JOIN LATERAL vertices(p1.poly) v1,
polygons p2 CROSS JOIN LATERAL vertices(p2.poly) v2
WHERE (v1 <-> v2) < 10 AND p1.id != p2.id;
|
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 22-Set-2015 às 21:50
-- Versão do servidor: 5.6.17
-- PHP Version: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... |
SELECT
p.pid,
now() - a.xact_start AS duration,
coalesce(wait_event_type ||'.'|| wait_event, 'f') AS waiting,
CASE
WHEN a.query ~ '^autovacuum.*to prevent wraparound' THEN 'wraparound'
WHEN a.query ~ '^vacuum' THEN 'user'
ELSE 'regular'
END AS mode,
p.datname AS database,
p.relid::regclass AS table,
p.p... |
<reponame>ranjithbhaskar/loundry<filename>laundry.sql
-- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Aug 25, 2018 at 08:39 PM
-- Server version: 5.5.50-0ubuntu0.14.04.1
-- PHP Version: 5.5.9-1ubuntu4.20
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET tim... |
<reponame>Root-XS/sudo-bible
INSERT IGNORE INTO `sudo_bible_topic_verses` (`topic_id`, `book_id`, `chapter`, `verse`, `end_verse`) VALUES
(9, 19, 133, 1, 3),
(9, 20, 15, 22, null),
(9, 20, 17, 17, null),
(9, 20, 27, 17, null),
(9, 21, 4, 9, 12),
(9, 38, 7, 9, 10),
(9, 40, 18, 20, null),
(9, 41, 3, 33, 35),
(9, 43, 15, ... |
<filename>src/test/resources/sql/insert/e46fd83d.sql
-- file:macaddr8.sql ln:53 expect:true
INSERT INTO macaddr8_data VALUES (16, '08-00-2b-01-02-03-04-05')
|
-- 2021-02-19T13:30:12.281Z
-- 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_ElementGroup_ID,AD_UI_Element_ID,AD_UI_ElementType,Created,CreatedBy,Description,IsActive,IsAdvancedField,IsAllowFiltering,IsDisplayed,IsDisplayedGr... |
ALTER TABLE `qb_groupcfg` ADD `allowview` VARCHAR( 255 ) NOT NULL COMMENT '允许浏览此字段的用户组';
ALTER TABLE `qb_groupcfg` ADD `ifmust` TINYINT( 1 ) NOT NULL COMMENT '升级此用户组需要的必填字段';
ALTER TABLE `qb_groupcfg` ADD `forbid_edit` TINYINT( 1 ) NOT NULL COMMENT '是否禁止修改';
ALTER TABLE `qb_groupcfg` ADD `nav` VARCHAR( 30... |
<reponame>slilichenko/bq-cdc-integration
SELECT
FORMAT_TIMESTAMP("%Y%m%d", pt) AS partition_id
FROM (
SELECT
pt,
ROW_NUMBER() OVER (ORDER BY pt DESC) AS row_num
FROM (
SELECT
DISTINCT(_partitiontime) AS pt
FROM
cdc_demo.session_delta d,
cdc_demo.session_main s
WHERE
d.s... |
<reponame>jdbahnsen/Resonance
INSERT INTO [Album] (Id, Name, CollectionId, ArtistIds)
VALUES (@Id, @Name, @CollectionId, @ArtistIds); |
INSERT INTO `measures` (`name`,`unit`)
VALUES (?,?); |
-- add version columns
ALTER TABLE resources ADD COLUMN version integer;
ALTER TABLE resources ADD COLUMN created_by varchar(255);
ALTER TABLE resources ADD COLUMN created_at timestamp with time zone;
ALTER TABLE resources ADD COLUMN deleted boolean;
ALTER TABLE resources ADD COLUMN latest boolean;
ALTER TABLE orders... |
DROP TEMPORARY TABLE IF EXISTS temporary_table;
DROP TEMPORARY TABLE IF EXISTS test_merge_1;
DROP TEMPORARY TABLE IF EXISTS test_merge_2;
CREATE TABLE test_merge_1(id UInt64) ENGINE = Log;
CREATE TABLE test_merge_2(id UInt64) ENGINE = Log;
CREATE TEMPORARY TABLE temporary_table AS SELECT * FROM numbers(1) WHERE number ... |
<reponame>zishuimuyu/jeewx<gh_stars>100-1000
SELECT * FROM qywx_newsitem AS qn where 1=1
<#include "QywxNewsitemDao_condition.sql"> |
<reponame>bradfordb-vmware/gpdb<filename>src/test/isolation2/sql/check_gxid.sql
select gp_segment_id, gp_get_next_gxid() < (select gp_get_next_gxid()) from gp_dist_random('gp_id');
-- start_ignore
select gp_segment_id,gp_get_next_gxid() on_seg, (select gp_get_next_gxid() on_cor) from gp_dist_random('gp_id');
-- end_ign... |
<filename>flaskapp/db/schema.sql
DROP TABLE IF EXISTS pdf;
CREATE TABLE pdf (
id INTEGER PRIMARY KEY AUTOINCREMENT,
file_uri TEXT UNIQUE NOT NULL,
metadata TEXT DEFAULT '',
content TEXT DEFAULT ''
); |
<reponame>davecramer/pljvm<gh_stars>1-10
CREATE EXTENSION pljvm;
CREATE TYPE test_type AS (
a boolean,
b smallint,
c integer,
d bigint,
e real,
f double precision,
g numeric,
h character varying
);
CREATE OR REPLACE FUNCTION pljvm_log100(d float8) RETURNS... |
<gh_stars>0
CREATE TABLE: pessoas {
} |
CREATE TABLE [dbo].[device_exposure] (
[device_exposure_id] INT NOT NULL,
[person_id] INT NOT NULL,
[device_concept_id] INT NOT NULL,
[device_exposure_start_date] DATE NOT NULL,
[device_exposure_start_datetime]... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 20, 2020 at 05:02 AM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.3.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
CREATE PROCEDURE [dbo].[app_MGOnlineBook_GetByMGID] @MGID INT
AS
SELECT *
FROM [MGOnlineBook]
WHERE MGID = @MGID
|
-- MySQL dump 10.13 Distrib 5.7.20, for Linux (x86_64)
--
-- Host: 127.0.0.1 Database: clinic
-- ------------------------------------------------------
-- Server version 5.7.22-0ubuntu0.17.10.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET... |
CREATE DATABASE IF NOT EXISTS node;
USE node;
CREATE TABLE IF NOT EXISTS Utilisateur (
IdUser int NOT NULL AUTO_INCREMENT,
Username VARCHAR(100),
Password VARCHAR(100),
Email VARCHAR(100),
PRIMARY KEY (IdUser)
)
ENGINE=INNODB;
INSERT INTO node.Utilisateur (Username, Password, Email) VALUES ('anthony','anthony... |
<gh_stars>0
CREATE DATABASE SoftUni
GO
USE SoftUni
CREATE TABLE Towns(
Id INT PRIMARY KEY IDENTITY,
Name NVARCHAR(50) NOT NULL
)
CREATE TABLE Addresses(
Id INT PRIMARY KEY IDENTITY,
AddressText NVARCHAR(50) NOT NULL,
TownId INT NOT NULL
FOREIGN KEY REFERENCES Towns(Id)
)
CREATE TABLE Departments(
Id INT PRIMARY... |
/*
* ---------------------------------------------------------------------------------------------
* * Copyright (c) IJSE-exams. All rights reserved.
* * Licensed under the MIT License. See License.txt in the project root for license information.
* *-------------------------------------------------------------... |
<reponame>dfhawthorne/sql-ocm12c
REM ============================================================
REM Display the database status in the data guard configuration.
REM ============================================================
SET LINESIZE 180
SET PAGESIZE 40
SET HEADING ON
SELECT
name,
db_unique_name,
... |
INSERT INTO eg_appconfig (id,key_name,description,version,createdby,lastmodifiedby,createddate,lastmodifieddate,module) values (nextval('SEQ_EG_APPCONFIG'),'REASSIGN_BUTTONENABLED','Key to enable/disable reassign button for mrs', 0, (select id from eg_user where username='egovernments'),(select id from eg_user where us... |
<filename>src/main/resources/db/mysql56/migration/V2.09__DROP_levels.sql<gh_stars>1-10
DROP TABLE `levels`; |
<reponame>jerelynlee/census
-- P29. HOUSEHOLD TYPE BY RELATIONSHIP
-- designed to work with the IRE Census bulk data exports
-- see http://census.ire.org/data/bulkdata.html
CREATE TABLE ire_p29 (
geoid VARCHAR(11) NOT NULL,
sumlev VARCHAR(3) NOT NULL,
state VARCHAR(2) NOT NULL,
county VARCHAR(3),
cbsa VARCHAR(... |
<filename>db_archive/sql_archive/465__dw_create_procedure_p_lataa_f_yo_talous.sql<gh_stars>1-10
if not exists (select * from sys.objects where object_id = object_id('dw.p_lataa_f_yo_talous') and type in ('p', 'pc'))
begin
exec dbo.sp_executesql @statement = N'create procedure dw.p_lataa_f_yo_talous as'
end |
<reponame>Andrei15193/Laboratoare-Facultate<filename>Semestrul4/GTBDD/L2/Trigger4.sql<gh_stars>1-10
if exists(select name from sys.objects where type = 'TR' and name = 'Trigger4')
drop trigger Trigger4
go
create trigger Trigger4 on DetaliiProduse
after insert, update, delete as
begin
if exists(select codP from ... |
<filename>sql/test.sql
CREATE TABLE classroom
(id INT NOT NULL,
name String(32) NOT NULL,
length FLOAT,
height FLOAT,
width DOUBLE,
PRIMARY KEY(id)
);
DROP TABLE classroom;
CREATE TABLE student
(id INT NOT NULL,
name String(32) NOT NULL,
dept_name String(32), ... |
<reponame>glasscharlie/snack-chat
DROP DATABASE IF EXISTS photos_db;
CREATE DATABASE photos_db;
USE photos_db; |
<reponame>wiarlawd/database.v3
DROP TABLE TestEmpTable;
|
INSERT INTO Person(ID, FIRST_NAME, LAST_NAME, BIRTHDATE) VALUES (1, 'Steve', 'Kizito', '1980-05-04');
INSERT INTO Person(ID, FIRST_NAME, LAST_NAME, BIRTHDATE) VALUES (2, 'Charles', 'Muchene', '1983-11-09');
INSERT INTO Person(ID, FIRST_NAME, LAST_NAME) VALUES (3, 'Guru', 'Dev'); |
{{
config(
materialized='table'
)
}}
select user_guid,
country,
count(order_id) as total_order_count,
sum(order_cost) as total_order_cost,
sum(shipping_cost) as total_shipping_cost,
sum(order_total) as total_order
FROM {{ref('int_user_order_facts')}}
GROUP BY user_guid,
... |
with task as (
select *
from {{ var('task') }}
),
task_comments as (
select *
from {{ ref('asana_task_comments') }}
),
task_followers as (
select *
from {{ ref('asana_task_followers') }}
),
task_open_length as (
select *
from {{ ref('asana_task_open_length') }}
),
task_tags as (
... |
select c.name,o.id
from customers as c join
orders as o on o.id_customers=c.id
where o.orders_date BETWEEN '2016-01-01' AND '2016-06-30'; |
ALTER TABLE /*_*/change_tag MODIFY ct_rev_id int unsigned NULL; |
select distinct
case pop
when 0 then "nobody"
when 1 then "one"
when 2 then "a couple"
when 3 then "a few"
else "more"
end as cardinal,
case pop
when 1 then 0
when 10 then 1
end as power,
case
when pop % 2 = 0 then "even"
when pop = 1 or pop = 9 then "odd"
else "prime"
... |
<filename>examples/friend_car.sql
CREATE TABLE friend(
friend_id INTEGER PRIMARY KEY,
name TEXT NOT NULL,
email TEXT UNIQUE,
phone TEXT UNIQUE,
picture BLOB
);
CREATE TABLE car(
registration_plate TEXT PRIMARY KEY,
cost REAL NOT NULL,
bought_on TEXT NOT NULL
);
|
-- start_ignore
SET gp_create_table_random_default_distribution=off;
-- end_ignore
--
-- SYNC1 HEAP TABLE 1
--
CREATE TABLE sync1_heap_alter_part_rn1 (id int, rank int, year date, gender
char(1)) DISTRIBUTED BY (id, gender, year)
partition by list (gender)
subpartition by range (year)
subpartition template (
start (da... |
<gh_stars>100-1000
INSERT INTO `task_inputs` (`task_id`, `input`, `value`) VALUES
(1, 'estimation_procedure', '1'),
(1, 'source_data', '1'),
(1, 'target_feature', 'class'),
(2, 'estimation_procedure', '2'),
(2, 'source_data', '1'),
(2, 'target_feature', 'class'),
(3, 'estimation_procedure', '3'),
(3, 'source_data', '1'... |
USE TSQL2012
--WINDOWS
--OVER
SELECT empid,ordermonth,val --val here was defined as the value of the order/sale...
,SUM(val) OVER (PARTITION BY empid --All rows with the same empid
ORDER BY ordermonth ASC
ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS runval--filter [subset of t... |
create table ways_addresses
(
"id" int primary key not null,
"housenumber" text,
"city" text,
"postcode" text,
"state" text,
"country" text,
"street" text,
"housename" text,
"inclusion" text,
"unit" text,
"interpolation" text,
"full" text,
"place" text... |
<gh_stars>0
-- GUID fnGetGuid1Cv2
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
GO
ALTER FUNCTION [fnGetGuid1Cv2] (@ID BINARY(16))
RETURNS NCHAR(36)
BEGIN
DECLARE @ID_STRING NCHAR(32);
SET @ID_STRING = SUBSTRING(SYS.FN_SQLVARBASETOSTR(@ID),3,32);
RETURN(
SUBSTRING(@ID_STRING,25,8) + '-' +
SUBSTRING(@ID_STRING,21,4) ... |
CREATE TABLE users.AspNetUsers
(
Id int IDENTITY(1, 1) NOT NULL,
UserName nvarchar(256) NOT NULL,
NormalizedUserName nvarchar(256) NOT NULL,
Email nvarchar(256) NOT NULL,
NormalizedEmail nvarchar(256) NOT NULL,
EmailConfirmed bit CONSTRAINT DF_AspNetUsers_EmailConfirmed DEFAULT 0 NOT NULL... |
CREATE TABLE empresa (
id bigint NOT NULL IDENTITY(1,1) PRIMARY KEY,
cnpj varchar(255) NOT NULL,
data_atualizacao datetime NOT NULL,
data_criacao datetime NOT NULL,
razao_social varchar(255) NOT NULL
);
CREATE TABLE funcionario (
id bigint NOT NULL IDENTITY(1,1) PRIMARY KEY,
cpf varchar(255) NOT NULL,
data... |
<gh_stars>0
CREATE TABLE users (
id SERIAL PRIMARY KEY NOT NULL
, created_at TIMESTAMP NULL DEFAULT NULL
, updated_at TIMESTAMP NULL DEFAULT NULL
, sort_order INT2
, last_name_kana VARCHAR(64)
, first_name_kana VARCHAR(64)
, last_name VARCHAR(64)
, first_name VARCHAR(64)
, password VARCHAR(256)
, tmp_password VARCHAR... |
<filename>Database/Views/BLOG_V_ALL_COMMENTS.sql
--------------------------------------------------------
-- DDL for View BLOG_V_COMMENTS
--------------------------------------------------------
CREATE OR REPLACE FORCE VIEW "BLOG_V_ALL_COMMENTS" ("ID", "ROW_VERSION", "CREATED_ON", "CREATED_BY", "CHANGED_ON", "CHANGED_... |
-- phpMyAdmin SQL Dump
-- version 4.1.6
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Aug 01, 2017 at 12:07 PM
-- Server version: 5.6.16
-- PHP Version: 5.5.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/... |
<filename>sewa-alat-camping.sql
-- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 12 Feb 2020 pada 14.27
-- Versi server: 10.1.34-MariaDB
-- Versi PHP: 7.2.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+0... |
-- phpMyAdmin SQL Dump
<<<<<<< HEAD
-- version 4.4.15.9
-- https://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jun 25, 2020 at 08:46 PM
-- Server version: 5.6.37
-- PHP Version: 5.6.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+02:00";
=======
-- version 5.0.2
-- https://www.phpmyadmin.... |
<reponame>platzimaster-wedeal/wescripts
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[employees](
id INT NOT NULL IDENTITY(1,1),
[id_user] [int] NOT NULL,
id_work_area INT NOT NULL,
avg_score DECIMAL(2,1) NOT NULL DEFAULT 0,
quealifications DECIMAL(2,1) NOT NULL,
CONSTRAINT [PK_EMPLOYEES... |
-- name: UserSignup :one
INSERT INTO USERS ("email", "password", "nickname") VALUES ($1, $2, $3)
RETURNING id, firstname, lastname, email, password, deleted, nickname, created_at;
-- name: UserGetByEmail :one
SELECT id, firstname, lastname, email, password, deleted, nickname, created_at FROM USERS WHERE email = $1;
-... |
<reponame>nyacore/svuup
-- MariaDB dump 10.17 Distrib 10.4.13-MariaDB, for Linux (x86_64)
--
-- Host: localhost Database: svuup
-- ------------------------------------------------------
-- Server version 10.4.13-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_S... |
-- colname.test
--
-- db eval {PRAGMA short_column_names}
PRAGMA short_column_names |
<filename>src/hg/lib/ncbiRefLink.sql
# ncbiRefLink.sql was originally generated by the autoSql program, which also
# generated ncbiRefLink.c and ncbiRefLink.h. This creates the database representation of
# an object which can be loaded and saved from RAM in a fairly
# automatic way.
#Metadata for NCBI RefSeq Genes
... |
USE mysql;
CREATE FUNCTION lib_mysqludf_amqp_info RETURNS STRING SONAME 'lib_mysqludf_amqp.so';
CREATE FUNCTION lib_mysqludf_amqp_sendjson RETURNS STRING SONAME 'lib_mysqludf_amqp.so';
CREATE FUNCTION lib_mysqludf_amqp_sendstring RETURNS STRING SONAME 'lib_mysqludf_amqp.so';
|
SELECT
COALESCE(gt.rolname, 'PUBLIC') AS grantee,
g.rolname AS grantor, array_agg(privilege_type) AS privileges,
array_agg(is_grantable) AS grantable
FROM
(SELECT
(d).grantee AS grantee,
(d).grantor AS grantor,
(d).is_grantable AS is_grantable,
CASE (d).pr... |
<filename>src/test/resources/sql/create_table/2d326ceb.sql
-- file:inherit.sql ln:636 expect:true
create table part_21_30_ab partition of part_21_30 for values in ('ab')
|
DECLARE @string nvarchar(max) = N'';
SELECT
m.object_id,
o.name,
o.type_desc as [type],
o.create_date
FROM sys.sql_modules m
JOIN sys.objects o ON m.object_id = o.object_id
WHERE m.definition LIKE CONCAT(N'%', @string, N'%'); |
<filename>migrations/2021-08-17-111610_add_timeouted_to_room/up.sql
-- Your SQL goes here
ALTER TABLE room ADD COLUMN timed_out boolean not null default false;
|
<filename>examples/prepare-query/select-accounts.sql
select *
from account
where email like !PG{emailMatch}
and id >= $PG{idStart}
|
-- only insert role if doesn't exist already
INSERT INTO roles (role_id, role_code, role_name)
SELECT NEWID(), 'PF_POLICE', 'Pathfinder Police'
FROM roles
WHERE role_code = 'GLOBAL_SEARCH'
AND NOT exists(SELECT role_code FROM roles WHERE role_code = 'PF_POLICE');
INSERT INTO groups (group_id, group_code, group_name)... |
PRAGMA foreign_keys=off
drop table if exists new_client
CREATE TABLE 'new_client' (
'id' INTEGER NOT NULL,
'version' INTEGER NOT NULL,
'name' VARCHAR(255) NOT NULL,
'disabled' INTEGER NOT NULL REFERENCES 'yes_no' ('id') ON DELETE RESTRICT ON UPDATE RESTRICT,
'raceId' INTEGER NOT NULL REFERENCES 'r... |
<reponame>nicode-io/The_Junior_Way<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 4.9.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Sep 09, 2020 at 02:20 PM
-- Server version: 5.7.26
-- PHP Version: 7.4.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Databa... |
<filename>DB-Files/seed.sql
USE employee_trackerDB;
-- Department Names
INSERT INTO department (name)
VALUES ("Engineering");
INSERT INTO department (name)
VALUES ("Sales");
INSERT INTO department (name)
VALUES ("Finance");
INSERT INTO department (name)
VALUES ("Legal");
INSERT INTO department (name)
VALUES ("Marketin... |
<filename>backend/de.metas.edi/src/main/sql/postgresql/system/80-de.metas.edi/5575490_cli_gh10483_invoice_aggregation_isedienabled.sql
-- 2021-01-04T07:22:08.349Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO C_AggregationItem (AD_Client_ID,AD_Column_ID,AD_Org_ID,C_Aggregation_ID,C_Aggre... |
<filename>database/atualizador/src/main/resources/db/migration/postgresql/client/V0001/V0000/V0001_0000_00000066__CreateTable_Configuration.sql
CREATE TABLE configurations (
id chave NOT NULL,
id_shop_group chave,
id_shop chave,
name character varying(254) NOT NULL... |
CREATE TABLE system.cron
(
"class" character varying(255) NOT NULL,
"min" integer DEFAULT NULL,
"hour" integer DEFAULT NULL,
"day" integer DEFAULT NULL,
"day_week" integer DEFAULT NULL,
"month" integer DEFAULT NULL,
"last_run" timestamp with time zone DEFAULT NULL,
"status" integer NOT N... |
INSERT INTO user(user_id, username, email, pw) VALUES (1, 'test_user','<EMAIL>','$2a$10$knIL0inTiW/u8Sf1KFtkH.XSp1jz/90JXcKJdVrb7ZYUeAnmZj2G2'); |
select Quote_delete('IBM', date('02-Nov-2013'));
select Quote_count('IBM');
select Day from Quote_get('IBM');
select Quote_delete('ABB', date('03-Nov-2013'), date('06-Nov-2013'));
select Quote_truncate();
select Quote_count('IBM');
select Quote_count('ABB');
select * from Quote_get('IBM');
select * from Quote_get('AB... |
CREATE USER test PASSWORD '<PASSWORD>';
CREATE SCHEMA test;
CREATE TABLE test.test ( id INTEGER PRIMARY KEY );
INSERT INTO test.test VALUES ( generate_series(0, 99999) );
GRANT ALL ON SCHEMA test TO test;
GRANT ALL ON test.test TO test;
|
<filename>util_sql/mview_issues.sql
create materialized view current_state.issues as
WITH issue_latest AS (
SELECT issues.id,
issues.dup_repo_id AS repo_id,
issues.dup_repo_name AS repo_name,
issues.number,
issues.is_pull_request,
issues.milesto... |
<filename>tests/queries/0_stateless/00412_logical_expressions_optimizer.sql
DROP TABLE IF EXISTS merge_tree;
CREATE TABLE merge_tree (x UInt64, date Date) ENGINE = MergeTree(date, x, 1);
INSERT INTO merge_tree VALUES (1, '2000-01-01');
SELECT x AS y, y FROM merge_tree;
DROP TABLE IF EXISTS merge_tree;
|
--
-- Licensed to the Apache Software Foundation (ASF) under one or more
-- contributor license agreements. See the NOTICE file distributed with
-- this work for additional information regarding copyright ownership.
-- The ASF licenses this file to You under the Apache License, Version 2.0
-- (the "License"); you may ... |
<filename>ita.sql
/*
Navicat MySQL Data Transfer
Source Server : XAMPP
Source Server Version : 50505
Source Host : localhost:3306
Source Database : ita
Target Server Type : MYSQL
Target Server Version : 50505
File Encoding : 65001
Date: 2020-03-16 12:05:53
*/
SET FOREIGN_KEY_CHECK... |
-- Verify nz-buildings:buildings_reference/functions/reference_update_log on pg
BEGIN;
SELECT has_function_privilege('buildings_reference.reference_update_log_insert_log(varchar[])', 'execute');
ROLLBACK;
|
<gh_stars>0
ALTER TABLE `goods` ADD `dealer_id` INT(10) NULL DEFAULT NULL COMMENT '交易员id' AFTER `rank`;
ALTER TABLE `demand` ADD `dealer_id` INT(10) NULL DEFAULT NULL COMMENT '交易员id' AFTER `updated_at`; |
DROP INDEX IF EXISTS index_announcement_engagements_announcement_id_user_id;
DROP INDEX IF EXISTS index_announcement_engagements_user_id;
DROP TABLE IF EXISTS announcement_engagements;
DROP INDEX IF EXISTS index_announcements_organization_id;
DROP TABLE IF EXISTS announcements;
|
<reponame>OasisLMF/OEDtransform
DELETE FROM B;
DELETE FROM C;
INSERT INTO B (c, d) VALUES (:id, :c); INSERT INTO C (e, f) VALUES (:id, :d);
|
-- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 29-08-2018 a las 01:41:07
-- Versión del servidor: 10.1.34-MariaDB
-- Versión de PHP: 7.2.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1
-- Généré le : Dim 25 oct. 2020 à 14:31
-- Version du serveur : 10.1.38-MariaDB
-- Version de PHP : 7.3.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 ... |
USE `BarnesAndIgnoble`;
-- Question 7.1 - Books per author
SELECT A.*, COUNT(DISTINCT(BA.ISBN)) AS `Total Books Written`
FROM Authors A
JOIN BookAuthors BA
ON A.AuthorID = BA.AuthorID
GROUP BY BA.AuthorID;
-- Question 7.2 - Authors per book
SELECT B.*, COUNT(DISTINCT(BA.AuthorID)) AS `Number of Authors`
FROM Boo... |
CREATE PROCEDURE [tCodeQuality].[test const Functions must have WITH SCHEMABINDING]
AS
BEGIN
-- Declaring pattern
DECLARE @Pattern_Context TCONTEXT = dspUtil.String_RemoveWhitespaces('WITH SCHEMABINDING');
DECLARE @msg TSTRING;
DECLARE @FunctionName TSTRING;
-- Getting list all procedures with pagination
EXEC... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.