sql stringlengths 6 1.05M |
|---|
<gh_stars>0
DROP TABLE IF EXISTS cell;
CREATE TABLE cell
(
added_at INTEGER PRIMARY KEY AUTO_INCREMENT,
driver_partner_uuid VARCHAR(36) NULL,
city_uuid VARCHAR(36) NOT NULL,
trip_created_at DATETIME NULL
) ENGINE=InnoDB;
|
olympics.schema.sql
Author: <NAME>
A .txt file containing all of the SQL queries
for the 10/15 lab
# CREATE TABLE STATEMENTS #
CREATE TABLE athletes(
athlete_id integer,
athlete_name text,
sex text);
CREATE TABLE noc(
noc_id integer,
team_name text,
noc_name text);
CREATE TABLE sport(
sport_id SERIAL,
event text)... |
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 05-12-2018 a las 01:02:16
-- Versión del servidor: 10.1.37-MariaDB
-- Versión de PHP: 7.2.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";... |
CREATE TABLE [Transactions] (
TransactionId int IDENTITY NOT NULL PRIMARY KEY NONCLUSTERED,
VendingMachineId char(36),
ItemName varchar(255),
ItemId int,
PurchasePrice smallmoney,
TransactionStatus int,
TransactionDate datetime,
INDEX Transactions_CCI CLUSTERED COLUMNSTORE
) WITH (
MEMORY_OPTIMIZED = ON
);
A... |
CREATE TABLE [dbo].[CustomerUsers] (
[Id] UNIQUEIDENTIFIER NOT NULL,
[CreatedDate] DATETIMEOFFSET (7) NOT NULL,
[CustomerId] UNIQUEIDENTIFIER NOT NULL,
[CustomerName] NVARCHAR (MAX) NULL,
[CustomerRegion] INT NULL,
[FullName] NVARCHAR (MAX... |
CREATE TABLE public.geocodes (
address character varying,
geocoded_address character varying,
geocoded_lng double precision,
geocoded_lat double precision,
geocoded_city character varying,
geocoded_state character varying,
geocoded_zip character varying,
geocode_accuracy float,
geocode_accuracy_type c... |
CREATE TABLE sources (
id serial primary key,
name text not null,
origin text not null,
kind text not null
);
CREATE TABLE records (
id serial primary key,
title text,
... |
CREATE TABLE `subscribe` (
`id` int NOT NULL AUTO_INCREMENT COMMENT 'primary key',
`account` varchar(255) NOT NULL COMMENT '账号',
`stock` int NOT NULL COMMENT '股票消息',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; |
ALTER TABLE ARBEIDSLISTE ADD OVERSKRIFT VARCHAR2(500);
|
/*
Do citation counts tend to be higher in any of the datasets?
This is a standalone descriptive query.
*/
select coalesce(ds_times_cited, 0) = 0 zero_ds,
coalesce(mag_times_cited, 0) = 0 zero_mag,
count(*) count
from oecd.all_citation_counts
where ds_id is not null
and mag_id is not null
group by 1, 2... |
alter table user add column home_page_preference varchar(100);
alter table user drop column preferences;
alter table user drop column reset_password_datetime;
create table whitelist (
id bigint auto_increment not null,
domain_name varchar(50) not null,
constraint pk_whitelist... |
create database car_catalog;
\c car_catalog;
|
select c_date, c_integer, count(c_integer) over() from j1_v order by 1, 2, 3;
|
create table turmas(
id bigint(20) primary key auto_increment,
nome varchar(80) not null,
capacidade integer not null,
id_disciplina bigint(20) not null references disciplinas,
id_professor bigint(20) not null references professores
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
insert into turmas (nome, c... |
CREATE SCHEMA [Reports]
AUTHORIZATION [dbo];
|
/*
Write an SQL query that reports for every date within at most 90 days from today,
the number of users that logged in for the first time on that date. Assume today is 2019-06-30.
*/
# Write your MySQL query statement below
select login_date, count(user_id) as user_count
from
(select user_id, min(activity_date) as log... |
<filename>tests/suites/0_stateless/02_0040_function_strings_length.sql
SELECT LENGTH('word');
SELECT LENGTH('кириллица'); -- cyrillic in russian
SELECT LENGTH('кириллица and latin');
SELECT LENGTH('你好');
SELECT LENGTH(NULL);
|
CREATE TABLE "C##LIQUIBASE".createTableDataTypeText (textCol CLOB) |
PRINT 'Removing ProjectStatusTransitions'
DELETE FROM dbo.[ProjectStatusTransitions]
WHERE [FromWorkflowId] = 4 -- ASSESS-EX-DISPOSAL
AND [FromStatusId] = 22 -- Not in SPL
AND [ToWorkflowId] = 4 -- ASSESS-EX-DISPOSAL
AND [ToStatusId] = 23 -- Cancelled
DELETE FROM dbo.[ProjectStatusTransitions]
WHERE [From... |
<gh_stars>1000+
CREATE TABLE "identities" (
"id" UUID NOT NULL,
PRIMARY KEY("id"),
"traits_schema_id" VARCHAR (2048) NOT NULL,
"traits" json NOT NULL,
"created_at" timestamp NOT NULL,
"updated_at" timestamp NOT NULL
); |
<gh_stars>1-10
set grammar to oracle;
create table aa(id int, dt timestamp);
insert into aa values(1,to_date('2000-3-31','YYYY-MM-DD'));
insert into aa values(2,to_date('2000-2-29','YYYY-MM-DD'));
select months_between(to_date('2000-3-31','yyyy-mm-dd'),to_date('2000-2-29','yyyy-mm-dd')) from dual;
select id,months_betw... |
<filename>dss/tpch-load.sql
BEGIN;
CREATE TABLE PART (
P_PARTKEY SERIAL8,
P_NAME VARCHAR(55),
P_MFGR CHAR(25),
P_BRAND CHAR(10),
P_TYPE VARCHAR(25),
... |
<reponame>softcontext/spring1107
drop table if exists emp;
--identity : 디비가 지원하는 키 생성전략을 사용한다.
--H2는 자동으로 키 값을 제너레이트 한다.
create table emp (
empno int identity not null primary key,
ename varchar(100),
job varchar(100),
sal double
); |
-- @testpoint:opengauss关键字ada(非保留),作为模式名
--关键字不带引号-成功
drop schema if exists ada;
create schema ada;
--清理环境
drop schema ada;
--关键字带双引号-成功
drop schema if exists "ada";
create schema "ada";
--清理环境
drop schema "ada";
--关键字带单引号-合理报错
drop schema if exists 'ada';
--关键字带反引号-合理报错
drop schema if exists `ada`;
|
<gh_stars>0
-- @testpoint:opengauss关键字Implementation(非保留),作为字段数据类型(合理报错)
--前置条件
drop table if exists explain_test cascade;
--关键字不带引号-合理报错
create table explain_test(id int,name Implementation);
--关键字带双引号-合理报错
create table explain_test(id int,name "Implementation");
--关键字带单引号-合理报错
create table explain_test(id int,na... |
<gh_stars>0
create table users(
user_id INT AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(20),
role VARCHAR(10),
email VARCHAR(50),
pin int(4)
);
|
<reponame>sarajaksa/IS2020
CREATE TABLE "anime" (
"anime" TEXT UNIQUE,
"finished" DATE,
"finished_metadata" DATE,
PRIMARY KEY("anime")
);
|
<reponame>MARobison/Cleesh-ayy-yeet<gh_stars>0
/*
Insertions for TASK table
*/
insert into task ( task_label, create_date, due_date) values ('Assignment 1', CURDATE(), '2018-09-04');
insert into task (task_label, create_date, due_date) values ('Assignment 3', CURDATE(), '2018-08-02');
insert into task (task_label, cre... |
<filename>homework-3/db_create_titile.sql
/*Требует наличия спавочника по языкам*/
CREATE TABLE IF NOT EXISTS movie_title
(
MOVIE_ID int not null,
LANGUAGE_ID char(2) not null,
TITLE varchar(500) not null,
PRIMARY KEY (MOVIE_ID, LANGUAGE_ID),
FOREIGN KEY FK_MT_MOVIE (MOVIE_ID)
REFERENCES ... |
CREATE TRIGGER tr_DeleteEmployees
ON Employees
AFTER DELETE
AS
BEGIN
INSERT INTO Deleted_Employees
SELECT
FirstName,
LastName,
MiddleName,
JobTitle,
DepartmentID,
Salary
FROM deleted
END |
<reponame>setor7soft/mapos<filename>updates/update_v3.3.x_to_3.4.x.sql
-- -----------------------------------------------------
-- Table `Garantia`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `garantias` (
`idGarantias` INT NOT NULL AUTO_INCREMENT,
`dataGarantia` DAT... |
-- MySQL Script generated by MySQL Workbench
-- Sat Nov 28 22:18:52 2020
-- 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='ON... |
-- MySQL dump 10.13 Distrib 8.0.19, for Linux (x86_64)
--
-- Host: localhost Database: wordpress
-- ------------------------------------------------------
-- Server version 8.0.19
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULT... |
<gh_stars>0
create database Deca;
use Deca;
create table [dbo].[Dete](
[ID] int primary key identity not null,
[Ime] varchar(20) null,
[Prezime] varchar(30) null,
[Pol] varchar(10) null,
[DatumRodjenja] Date null,
[ImeOca] varchar(20) null,
[ImeMajke] varchar(20) null,
[Slika] varchar(150) null
);
create pr... |
<reponame>DSSG-EUROPE/wef_oceans
DELETE
FROM ais_messages.full_year_position
WHERE (mmsi IS NULL OR mmsi < 100000000)
OR (timestamp IS NULL OR timestamp = '1970-01-01 00:00:00')
OR (longitude IS NULL OR longitude NOT BETWEEN -180 AND 180)
OR (latitude IS NULL OR latitude NOT BETWEEN -90 AND 90);
DELETE
FROM ais_mess... |
WITH MaxRecursionTest AS ( SELECT 0 AS Tally
UNION ALL
SELECT Tally + 1 AS Tally
FROM MaxRecursionTest
WHERE Tally < 110
)
SELECT * FROM MaxRecursionTest OPTION ( MAXRECURSION 110 ) |
create schema if not exists database_migration;
/*
This script will generate create schema, create table and create import statements
to load all needed data from an EXASOL database. Automatic datatype conversion is
applied whenever needed. Feel free to adjust it.
*/
--/
create or replace script databa... |
<filename>data/github.com/ccondrup/mage-reset/1f0894be655a45e0fbcb85f539a89d3f1f3af245/reset_increment_ids.sql
-- Resets testdata for Magento --
-- This will delete your existing increment ids for orders, invoices, creditmemos and shipment and replace with values specified
-- Credits: Elias Interactive http://goo.gl/E0... |
-- file:plpgsql.sql ln:4046 expect:true
create or replace function conflict_test() returns setof int8_tbl as $$
#variable_conflict use_column
declare r record
|
create table world_maps_merchant
(
CharacterId int not null
primary key,
AccountId int not null,
MapId int null,
Cell int not null,
Direction int not null,
EntityLookString mediumtext null,
Name ... |
<gh_stars>0
-- SPDX-License-Identifier: Apache-2.0
-- Licensed to the Ed-Fi Alliance under one or more agreements.
-- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0.
-- See the LICENSE and NOTICES files in the project root for more information.
CREATE UNIQUE INDEX IF NOT EXISTS UX_9... |
<reponame>rmulvey/bptest<gh_stars>1-10
-- BP 6.1D content: domain syschar: 3
INSERT INTO S_DOM
VALUES (171286,
'G_ALL_performance_test3',
'Test3 sends an instance event, with no supplemental data, between instances of different classes 10000 times ( 5000 times from each instance ).',
0,
1);
INSERT INTO S_... |
-- Demonstration 2
-- Step 1: Open a new query window against the tempdb database
USE tempdb;
GO
-- Step 2: Create a table with a primary key specified
CREATE TABLE dbo.PhoneLog
( PhoneLogID int IDENTITY(1,1) PRIMARY KEY,
LogRecorded datetime2 NOT NULL,
PhoneNumberCalled nvarchar(100) NOT NULL,
CallDurationMs ... |
<reponame>nmbazima/SQL-Scripts<filename>Training/20762/Allfiles/Labfiles/Lab15/Starter/Project/31 - Demonstration 3A.sql
-- Demonstration 3A
-- Step 1 - Open a new query window to the AdventureWorks database
USE AdventureWorks;
GO
ALTER TABLE Person.Address ADD SpatialLocation geography;
GO
UPDATE Person.Address SE... |
INSERT INTO cloudin.t_sys_user_role (seq_id, user_seq_id, role_seq_id) VALUES (1, 1, 1);
INSERT INTO cloudin.t_sys_user_role (seq_id, user_seq_id, role_seq_id) VALUES (2, 1, 2); |
<gh_stars>1-10
CREATE STREAM BUS_RAW( \
key STRING KEY, \
VP STRING) \
WITH (KAFKA_TOPIC='bus_raw',FORMAT='KAFKA');
CREATE STREAM BUS WITH (KAFKA_TOPIC='bus_prepped',VALUE_FORMAT='JSON_SR', TIMESTAMP='TIME_INT') \
AS SELECT \
SPLIT(AS_VALUE(KEY), '/')[12] AS HEADSIGN, \
EXTRACTJSONFIELD(VP, '$.VP.desi') AS ROU... |
<filename>tests/Platinum.Data.Tests/Sql/Multi2.sql
declare @a int;
declare @b int;
set @a = 1;
set @b = 2;
--//
begin
set nocount on;
select 5+@a A, getutcdate() Moment;
select 9+@b B
union all
select 13+@b B;
end;
/* eof */ |
INSERT INTO acl_class (id, class) VALUES
(1, 'za.org.grassroot.core.domain.Group'),
(2, 'za.org.grassroot.core.domain.Event')
; |
select Weapon, author( "<NAME>" ), description( "Weapons available to the player" ), label( "Weapon" )
{
fist, description( "Bare hands" ), label( "Fist" );
chainsaw, description( "A la Chainsaw Massacre" ), label( "Chainsaw" );
pistol, description( "Simple pistol" ), ... |
<filename>db/seeds.sql
INSERT INTO burgers (burger_name, devoured)
VALUES ('Burger a la Mode', 1),('Ruta-Bag-A Burger', 1),('Peas and Thank You Burger', 1),
('Bohemian Radishy', 0), ('Don''t you four cheddar ''bout me', 0); |
/*
Let N be the number of CITY entries in STATION, and let N’ be the number of distinct CITY names in STATION; query the value of N - N’ from STATION. In other words, find the difference between the total number of CITY entries in the table and the number of distinct CITY entries in the table.
Input Format
The STATION ... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 14 Agu 2019 pada 08.40
-- Versi server: 10.1.40-MariaDB
-- Versi PHP: 7.1.29
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 S... |
<reponame>mrjazz/spring-boot-store<filename>src/test/resources/db/data.sql
insert into MOVIES(id, title, category, year, "cast", director, story, price) values(21,'Full Metal Jacket','ACTION','1987','<NAME>, <NAME>, et al.','<NAME>','Bardzo ciekawy film. Jak wszystkie inne...',45);
insert into MOVIES(id, title, categor... |
<reponame>nurfan27/siakadubj<gh_stars>0
/*
SQLyog Ultimate v11.11 (64 bit)
MySQL - 5.5.16 : Database - db_siakad
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0... |
ALTER TABLE "public"."patient_clinical_history" DROP COLUMN "facility";
|
<filename>sql_files/example.sql
SELECT *
FROM `bigquery-public-data.austin_waste.waste_and_diversion` LIMIT 100 |
<reponame>thebyronc/teamtracker
SET MODE PostgreSQL;
CREATE TABLE IF NOT EXISTS teams_two (
id int PRIMARY KEY auto_increment,
teamname VARCHAR,
description VARCHAR
);
CREATE TABLE IF NOT EXISTS members_three (
id int PRIMARY KEY auto_increment,
teamId int,
name VARCHAR,
email VARCHAR
);
|
<reponame>francois/elm-scoutges<gh_stars>0
-- Revert scoutges:extensions/que from pg
SET client_min_messages TO 'warning';
BEGIN;
ALTER TABLE que_jobs RESET (fillfactor);
ALTER TABLE que_jobs DROP CONSTRAINT que_jobs_pkey;
DROP INDEX que_poll_idx;
DROP INDEX que_jobs_data_gin_idx;
DROP TRIGGER que_job_not... |
CREATE OR REPLACE PROCEDURE Greatings
AS
BEGIN
dbms_output.put_line(' YOU INSIDE THE GREATING PROCEDURE ');
END ;
/ |
<reponame>boltonvandy/gerrymander<filename>State_Data/ri/riinsert.sql
BEGIN TRANSACTION;
INSERT INTO precinct('STATE', 'PRECINCT', 'DISTRICT', 'PARTY', 'VOTERS') VALUES("RI", "101", "Barrington", "REP", 973.0);
INSERT INTO precinct('STATE', 'PRECINCT', 'DISTRICT', 'PARTY', 'VOTERS') VALUES("RI", "101", "Barrington", ... |
SELECT * FROM t1 LEFT JOIN (t2 , t3 , t4) ON (t2.a = t1.a AND t3.b = t1.b AND t4.c = t1.c) |
CREATE TABLE [dbo].[Task]
(
[Id] INT NOT NULL PRIMARY KEY,
[AllDay] BIT NULL,
[PriorityId] INT NOT NULL,
[TypeId] INT NOT NULL,
[Description] VARCHAR(256) NULL
)
|
USE [msdb]
GO
BEGIN TRANSACTION
DECLARE @ReturnCode INT
SELECT @ReturnCode = 0
IF NOT EXISTS (SELECT name FROM msdb.dbo.syscategories WHERE name=N'Data Collector' AND category_class=1)
BEGIN
EXEC @ReturnCode = msdb.dbo.sp_add_category @class=N'JOB', @type=N'LOCAL', @name=N'Data Collector'
IF (@@ERROR <> 0 OR @ReturnC... |
with completed_lap_subquery as
(select distinct on (effort_id) effort_id, case when kind = 1 then lap else lap - 1 end as completed_laps
from split_times
join splits on splits.id = split_times.split_id
order by effort_id, lap desc, distance_from_start desc, sub_split_bitk... |
-- table.test
--
-- execsql {
-- CREATE TABLE t7(
-- a integer primary key,
-- b number(5,10),
-- c character varying (8),
-- d VARCHAR(9),
-- e clob,
-- f BLOB,
-- g Text,
-- h
-- );
-- INSERT INTO t7(a) VALUES(1);
-- SELECT typeof(a), typeof(b),... |
-- file:opr_sanity.sql ln:646 expect:true
SELECT p1.oid, p1.oprname
FROM pg_operator AS p1
WHERE p1.oprcanhash AND NOT EXISTS
(SELECT 1 FROM pg_amop
WHERE amopmethod = (SELECT oid FROM pg_am WHERE amname = 'hash') AND
amopopr = p1.oid AND amopstrategy = 1)
|
-- file:security_label.sql ln:35 expect:true
SECURITY LABEL ON ROLE regress_seclabel_user1 IS '...invalid label...'
|
-- http://emkjp.github.io/WebTools/dot.html に session_id と bloking_session_id を渡して確認
SELECT
r.session_id, r.blocking_session_id ,
r.wait_time, r.last_wait_type, r.wait_resource,
SUBSTRING(s.text, (r.statement_start_offset/2)+1,
((CASE r.statement_end_offset
WHEN -1 THEN DATALENGTH(s.text)
ELSE r.... |
DELETE FROM `mangos_string` WHERE `entry` IN (582);
INSERT INTO `mangos_string` VALUES
(582, 'SpawnTime: Full:%s Remain:%s',NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
DROP TABLE IF EXISTS public.export_messages CASCADE;
DROP TABLE IF EXISTS public.export_resources CASCADE;
DROP TABLE IF EXISTS public.exports CASCADE;
DROP TABLE IF EXISTS public.import_messages CASCADE;
DROP TABLE IF EXISTS public.import_resources CASCADE;
DROP TABLE IF EXISTS public.imports CASCADE;
DROP TABLE IF EX... |
<reponame>ajcaldera1/yugabyte-db
--
-- CREATE_INDEX
-- Create ancillary data structures (i.e. indices)
--
--
-- BTREE
--
CREATE INDEX onek_unique1 ON onek USING btree(unique1 int4_ops);
CREATE INDEX IF NOT EXISTS onek_unique1 ON onek USING btree(unique1 int4_ops);
CREATE INDEX IF NOT EXISTS ON onek USING btree(uniqu... |
--! Previous: sha1:9acd3c09d1b12fb16353ef940d4caa662d7c7b9a
--! Hash: sha1:c6b398b4ba13a8bb86387ad079e66497bfc37d37
--! Message: create-categories
-- Create categories table
-- Undo if rerunning
DROP TABLE IF EXISTS categories;
-- Create table
CREATE TABLE categories (
id SERIAL PRIMARY KEY,
acc... |
create table mytable(_id int primary key, _value varchar(64));
insert into mytable values (1, 'first');
insert into mytable values (2, 'second');
|
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[MedType] (
[MedTypeID] [varchar](16) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MedType]
ADD
CONSTRAINT [PK_MedType]
PRIMARY KEY
CLUSTERED
([MedTypeID])
ON [PRIMARY]
G... |
<filename>pcm/src/main/resources/db/migration/V1.1.0__Alter patient id to varchar.sql
LOCK TABLES
patient WRITE,
patient_providers WRITE,
patient_aud WRITE,
consent WRITE,
consent_aud WRITE;
ALTER TABLE patient_providers
DROP FOREIGN KEY FK9yk8mkbajtynqjk49xe1abqm2,
MODIFY patient_id varchar(255) NOT NULL;
ALTER ... |
CREATE KEYSPACE IF NOT EXISTS pluralsight
WITH replication = {'class':'SimpleStrategy','replication_factor':1};
USE pluralsight;
create table users (
id varchar primary key,
first_name varchar,
last_name varchar,
email varchar,
password varchar,
reset_token varchar
) with comment = 'A table of... |
<filename>integration_tests/models/count_orders/input_count_orders_by_year_and_payment_type.sql
-- depends on: {{ ref('mock_purchase_data') }}
select * from {{
metrics.metric(
'count_orders',
'year',
dimensions=['payment_type']
)
}} |
<filename>macros/calendar_date/next_month_number.sql
{%- macro next_month_number(tz=None) -%}
{{ dbt_date.date_part('month', dbt_date.next_month(1, tz)) }}
{%- endmacro -%} |
PRINT 'Adding ProjectRisks'
SET IDENTITY_INSERT dbo.[ProjectRisks] ON
-- Parent Agencies.
INSERT INTO dbo.[ProjectRisks] (
[Id]
, [Code]
, [Name]
, [Description]
, [IsDisabled]
, [SortOrder]
) VALUES (
1
, 'COMP'
, 'Complete'
, '100% of the property value'
, 0
, 1
), (
... |
--
-- Regression tests for schemas (namespaces)
--
CREATE SCHEMA test_schema_1
CREATE UNIQUE INDEX abc_a_idx ON abc (a)
CREATE VIEW abc_view AS
SELECT a+1 AS a, b+1 AS b FROM abc
CREATE TABLE abc (
a serial,
b int UNIQUE
);
-- verify that the obj... |
sql_execute explain select c_custkey, c_name, sum(l_extendedprice * (1 - l_discount)) as revenue, c_acctbal, n_name, c_address, c_phone, c_comment from customer, orders, lineitem, nation where c_custkey = o_custkey and l_orderkey = o_orderkey and o_orderdate >= '1994-04-01' and o_orderdate < adddate('1994-04-01', 90) a... |
ALTER TABLE `apply_application` ADD (
`program_selection` varchar(50) NOT NULL,
`benefit` longtext NOT NULL,
`want_designer` tinyint DEFAULT 0 NOT NULL
);
|
<gh_stars>1-10
--+ holdcas on;
drop table if exists test_tbl;
CREATE TABLE test_tbl(groupid int,itemno int);
INSERT INTO test_tbl VALUES(1,null);
INSERT INTO test_tbl VALUES(1,null);
INSERT INTO test_tbl VALUES(1,1);
INSERT INTO test_tbl VALUES(1,null);
INSERT INTO test_tbl VALUES(1,2);
INSERT... |
-- @testpoint:opengauss关键字shutdown(非保留),作为用户组名
--关键字不带引号-成功
drop group if exists shutdown;
create group shutdown with password '<PASSWORD>';
drop group shutdown;
--关键字带双引号-成功
drop group if exists "shutdown";
create group "shutdown" with password '<PASSWORD>';
drop group "shutdown";
--关键字带单引号-合理报错
drop group if exi... |
<reponame>HBPMedical/Enabling_Services<gh_stars>0
CREATE TABLE PATHOLOGIES(
ID UUID PRIMARY KEY NOT NULL,
CODE VARCHAR(50) UNIQUE NOT NULL,
LABEL TEXT,
VERSION VARCHAR(50) NOT NULL,
METADATA JSON NOT NULL
);
CREATE TABLE HOSPITALS(
ID UUID PRIMARY KEY NOT NULL,
CODE VARCHAR(50... |
<reponame>TyreX6/symfony3.4
-- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Client : 127.0.0.1
-- Généré le : Jeu 26 Avril 2018 à 08:45
-- Version du serveur : 5.7.14
-- Version de PHP : 7.0.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARAC... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 27, 2019 at 01:17 PM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.2.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
-- sqlite3 wsu-twitter.db
-- sqlite> .read makedb.sql
-- sqlite> .exit
-- sudo chgrp www .
-- sudo chgrp www wsu-twitter.db
-- chmod 664 wsu-twitter.db
-- chmod 775 .
CREATE TABLE users (user_id INTEGER PRIMARY KEY AUTOINCREMENT,
username VARCHAR(45),
passwd_hash VARCHAR(45),
session_token VARCHAR(45) DEFAULT ... |
--Create a user defined stored procedure, named usp_CancelFlights
--The procedure must cancel all flights on which the arrival time is before the departure time. Cancel means you need to leave the departure and arrival time empty.
CREATE PROC usp_CancelFlights
AS
UPDATE Flights
SET DepartureTime = NULL, ArrivalTime = ... |
<filename>db/ctc_seeds.sql
-- department
INSERT INTO department(name)
VALUES("Hematology/Oncology"), ("Radiation Oncology"), ("Front Office"), ("Billing"), ("Administration");
-- role
INSERT INTO role(title, salary, deptid)
VALUES("RN (Hem/Onc)", "75000.00", 1);
INSERT INTO role(title, salary, deptid)
VALUES("RN (Rad... |
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
CREATE TABLE `pins` (
`id` int(11) NOT NULL,
`user_id` varchar(255) NOT NULL,
`title` varchar(255) NOT NULL,
`description` text,
`phrase` text,
`url` text NOT NULL,
`timestamp` int(11) NOT NULL DEFAULT '0',
`tags` text,
`created_at` da... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 19, 2020 at 05:09 PM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.4.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
{{ config(materialized='view') }}
select day,
COALESCE((payload#>>'{0,newCases}')::int,0) as cases
from {{ ref('covid_19_ingestion') }} |
<filename>sqls/outer/update.sql<gh_stars>0
UPDATE test_table SET test = TRUE |
<reponame>DavyVerbeke/madoc-platform
--subject-parent (down)
alter table tasks drop column subject_parent;
|
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
-- testing line numbers for simple statement boundaries, any statement will do
-- something with no "interior" works best.
create p... |
<reponame>Torii-HITSE-2014/Crawl-Robots<gh_stars>1-10
DROP DATABASE Pinboard;
CREATE DATABASE IF NOT EXISTS Pinboard;
USE Pinboard;
CREATE TABLE IF NOT EXISTS `NewsObject`(`ID` INT NOT NULL AUTO_INCREMENT,`Title` VARCHAR(255) NOT NULL,`Date` VARCHAR(20) NOT NULL,`Filepath` VARCHAR(255) NOT NULL,`Link` VARCHAR(255) NOT ... |
<gh_stars>1-10
DROP TABLE IF EXISTS public.bet_wallet_market;
CREATE TABLE IF NOT EXISTS public.bet_wallet_market(
betId VARCHAR(255) NOT NULL,
walletId VARCHAR(255) NOT NULL,
marketId VARCHAR(255) NOT NULL,
stake BIGINT NOT NULL,
PRIMARY KEY (betId)); |
<filename>src/test/resources/sql/create/56c6bc73.sql
-- file:returning.sql ln:137 expect:true
CREATE TEMP TABLE joinme (f2j text, other int)
|
<filename>packages/intranet-core/import_sql/lexcelera/15-create-translator-phone.sql
---------------------------------------------------------------------------------
-- tblTranNotes - Notes for companies
---------------------------------------------------------------------------------
create or replace function inl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.