sql stringlengths 6 1.05M |
|---|
<reponame>OdoEmmanuel/e-Commerce-api<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 09, 2020 at 05:06 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSAC... |
DECLARE
@BaseTableName NVARCHAR(50),
@TableColumnName NVARCHAR(50),
@TargetBaseTableName NVARCHAR(50),
@TargetTableColumnName NVARCHAR(50),
@Query NVARCHAR(1000),
@TargetEntityTypeId NVARCHAR(50);
CREATE TABLE #TempTable (TargetID UNIQUEIDENTIFIER, TableName NVARCHAR(50), ColumnName NVARCHAR(50));
-- Creat... |
<reponame>patrickdevivo/labelflow<gh_stars>0
/*
Warnings:
- The primary key for the `Account` table will be changed. If it partially fails, the table could be left without primary key constraint.
- The primary key for the `Membership` table will be changed. If it partially fails, the table could be left without ... |
<reponame>rla/old-code<gh_stars>1-10
INSERT INTO stock_price VALUES ('tal1t',0,7,0.74,0.74,0.76,0.74,0.73,0.74,0.74,0.75,25,78501,58253.24),('tal1t',1,1,0.76,0.76,0.77,0.75,0.74,0.76,0.75,0.76,61,490040,372126.18),('tal1t',2,2,0.74,0.76,0.76,0.74,0.76,0.74,0.74,0.75,26,67310,49819.5),('tal1t',3,3,0.74,0.74,0.75,0.74,0.... |
/* ================================================
* Oracle XFiles Demonstration.
*
* Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"... |
<reponame>heganjr/11-mysql-employee-tracker-JH<gh_stars>0
insert into departments(department_name) values ("HR"),("Finance"),("Customer Service"),("Executives"), ("Rangers"),("IT");
insert into roles(title,salary,department_id) values ("Accountant", 65000, 2), ("HR Coordinator", 70000, 1), ("HR Officer", 50000, 1), ("... |
SET SESSION SQL_MODE='ANSI';
--CREATE SEQUENCE sequenceId START 5000;
CREATE TABLE users (
"id" INTEGER NOT NULL AUTO_INCREMENT,
"login" VARCHAR(255) NOT NULL,
"timezone" VARCHAR(100),
"locale" VARCHAR(50),
"password" VARCHAR(1024),
"firstname" VARCHAR(255),
"lastname" VARCHAR(255),
"email" VARCHAR(255),
... |
CREATE TABLE public.listen_address (
address varchar NULL,
listen varchar NULL,
abi varchar NULL
);
|
-- -----------------------------------------------------
-- Table `looper`.`quiz_state`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `looper`.`quiz_state` (
`id` INT NOT NULL AUTO_INCREMENT,
`label` VARCHAR(45) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE INDEX `label_UNIQ... |
<reponame>anmolnar/cloudbreak
-- // CB-1196 Create baseline schema
-- Migration SQL that makes the change goes here.
-- // flowlog
CREATE TABLE IF NOT EXISTS flowlog (
id bigserial NOT NULL,
created int8 NOT NULL DEFAULT (date_part('epoch'::text, now()) * 1000::double precision),
flowid varchar(255) NOT NULL,
... |
<gh_stars>10-100
CREATE DATABASE teadb;
CREATE USER 'teauser'@'%' IDENTIFIED BY 'teapassword';
GRANT ALL PRIVILEGES ON teadb.* TO 'teauser'@'%';
FLUSH PRIVILEGES;
|
select
(
my_table.something_super_interesting
* my_subquery.my_very_long_field_name
)::decimal(
10,
2
) / 100.00::decimal(
10,
2
) as some_long_aliased_field_name
from
my_table
left join
(
select
one_field, ... |
CREATE DATABASE IF NOT EXISTS aeroporto;
USE aeroporto;
CREATE TABLE IF NOT EXISTS passageiro(
idPassageiro INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
nomePassageiro CHAR(30) NOT NULL,
fonePassageiro CHAR(20)
)ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS voo(
idVoo INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
numeroVoo CHAR(3... |
<reponame>huaminglin/docker-demo<gh_stars>0
start transaction;
select 1;
select 1/0;
select a;
select 1;
commit;
|
<filename>modulos/blog/sql/install.sql
insert into `franky` ( `php`, `css`, `js`, `jquery`, `permisos`, `constante`, `url`, `nombre`, `ajax`, `status`, `editable`, `modulo`) values('admin/blog/categorias/lista.php','','','[]','[1,2]','ADMIN_LISTA_CATEGORIAS_BLOG','admin/categorias-blog/','Categorias','[\"base/ajax.admi... |
CREATE TABLE Docs (
DocID integer NOT NULL GENERATED ALWAYS AS IDENTITY,
DocTypeID integer NOT NULL REFERENCES DocTypes,
DocName text NOT NULL,
HospitalID integer NOT NULL REFERENCES Hospitals,
UnitTypeID integer NOT NULL REFERENCES UnitTypes,
UnitID integer REFERENCES Units,
PRIMARY KEY (DocID),
UNIQUE (HospitalID, Do... |
<reponame>KoroLion/liokor_mail_backend
ALTER TABLE dialogues
ALTER COLUMN received_date TYPE TIMESTAMP WITH TIME ZONE;
ALTER TABLE dialogues
ALTER COLUMN received_date SET DEFAULT NOW(); |
CREATE PROCEDURE [Analytic_invocation].RestoreData AS
DELETE FROM [Analytic_invocation].DS_1
INSERT INTO [Analytic_invocation].DS_1 VALUES (2010, 'E', 'XX', 5)
INSERT INTO [Analytic_invocation].DS_1 VALUES (2010, 'B', 'XX', -3)
INSERT INTO [Analytic_invocation].DS_1 VALUES (2010, 'R', 'XX', 9)
INSERT INTO [Analy... |
<filename>seeds.sql
INSERT INTO department (name, id) VALUES ("Sales", 1);
INSERT INTO role (title, salary, department_id) VALUES ("Salesperson", "60000", 1);
INSERT INTO employee (first_name, last_name, role_id) VALUES ("John", "Smith", 1);
INSERT INTO role (title, salary, department_id) VALUES ("Sales Lead", "80000",... |
<reponame>OurDevGroup/Blender
CREATE SCHEMA IF NOT EXISTS blender;
|
-- 注意 MySQL 与 H2 的语法差异
-- H2: drop table tbl if exists;
-- MySQL: drop table if exists tbl;
DROP TABLE if EXISTS pms_product;
-- 商品表
CREATE TABLE `pms_product`
(
`id` bigint NOT NULL AUTO_INCREMENT,
`brand_id` bigint DEFAULT NULL,
`product_category_id` bigint... |
--https://dune.xyz/queries/185266
/* trading*/
with promotion_reward_address as
(
select
distinct "to" as airdrop_address
-- "value"/1e18 as index_amount,
-- sum("value"/1e18) total_index_airdropped
from erc20."ERC20_evt_Transfer"
where "evt_tx_hash" in (
'\x005b48fa78bd822f630e3bac1322e48395328d9409276357... |
TRUNCATE TABLE crimes_per_subcategory;
INSERT INTO crimes_per_subcategory (ward, fbi_code, subcategory, crime_count)
SELECT ward,
fbi_code,
description,
count(*)
FROM crimes
WHERE date_part('year', occurred_at) > 2001 AND DATE_PART('year', occurred_at) < DATE_PART('year', NOW())
AND ward is NOT NUL... |
// Facts-based Queries
// Sum of Sales for Strings in 2016
SELECT SUM(Sales), SUM(Units) FROM Sales WHERE Category = 'Strings' AND Year = 2016
// Sum of Sales for Strings in January 2016
SELECT SUM(Sales), SUM(Units) FROM Sales WHERE Category = 'Strings' AND Year = 2016 AND Month = 1
// Aggregate-based Queries
// B... |
#------------------------------------------------------------------------------
# Colonne pour les primaires/secondaires
#------------------------------------------------------------------------------
ALTER TABLE game_characteristic
ADD `primary` tinyint(1) NOT NULL ;
update game_characteristic set `primary` = 1 ... |
<filename>tables.sql
CREATE TABLE song_requests (
request_id INT NOT NULL AUTO_INCREMENT,
playlist_id VARCHAR(50) NOT NULL,
request_type ENUM('add', 'remove') NOT NULL,
song_id VARCHAR(50) NOT NULL,
PRIMARY KEY (request_id)
);
CREATE TABLE request_votes (
request_id INT NOT NULL,
user_id VARCH... |
<filename>Online allocation of cab using GPS/driver.sql
CREATE TABLE Driver
(
D_ID INT NOT NULL,
D_Name INT NOT NULL,
Contact INT NOT NULL,
TT_ID INT NOT NULL,
T_ID INT NOT NULL,
PRIMARY KEY (D_ID),
FOREIGN KEY (TT_ID) REFERENCES Temporary__transactions(TT_ID),
FOREIGN KEY (T_ID) REFERENCES Fin... |
<reponame>dmarkwell/mysql-loader-with-optimized-views<gh_stars>1-10
--
-- QUERY 6
-- Find the clinical findings with a finding site of pulmonary valve (or subtype) and an associated morphology of stenosis (or subtype)
-- Expression Constraint: < 404684003 |clinical finding|:
-- 363698007 |f... |
CREATE TABLE [dbo].[user_chat] (
[ChatID] NUMERIC (18) IDENTITY (1, 1) NOT NULL,
[sender_UserID] NUMERIC (18) NOT NULL,
[receiver_UserID] NUMERIC (18) NOT NULL,
[chat_date_time] DATETIME NOT NULL,
[chat_message] NVARCHAR(200) NOT NULL,
PRIMARY KEY CLUSTERED ([ChatID] ASC)... |
<gh_stars>1-10
INSERT INTO order_type (`name`,`description`,`creator`,`date_created`,`retired`,`retired_by`,`date_retired`,`retire_reason`,`uuid`)
VALUES ('Lab Order','An order for laboratory tests',1,NOW(),0,NULL,NULL,NULL,UUID());
INSERT INTO order_type (`name`,`description`,`creator`,`date_created`,`retired`,`reti... |
CREATE TABLESPACE PPR_DATA
DATAFILE '/ORCL/ppr_data.dbf'
SIZE 10m
AUTOEXTEND ON NEXT 500k ONLINE;
CREATE TABLESPACE PPR_INDEX
DATAFILE '/ORCL/ppr_index.dbf'
SIZE 5m
AUTOEXTEND ON NEXT 500k ONLINE;
ALTER SESSION SET CONTAINER = ORCLPDB1;
CREATE TABLESPACE PPR_DATA
DATAFILE '/ORCL/ppr_data2.dbf'
... |
//// CHANGE name=change0
CREATE TABLE table269 (
id integer NOT NULL,
field1 character varying(30),
usertype8field usertype8,
usertype6field usertype6,
usertype9field usertype9
);
GO
//// CHANGE name=change1
ALTER TABLE ONLY table269
ADD CONSTRAINT table269_pkey PRIMARY KEY (id);
GO
|
<gh_stars>10-100
begin;
create table queue_entry (
event_id uuid not null,
insert_order bigserial,
value json not null
);
create table queue_finalize (
event_id uuid not null,
insert_order bigserial,
value json not null
);
create table data (
event_id uuid not null,
day date not null,... |
<filename>migrations/20141020175648_dumped_migration_74/down.sql
CREATE INDEX index_crates_name_search ON crates USING gin(to_tsvector('english', name)); |
<filename>smi_admin_scripts/smi_sql_misc_scripts/list_all_db_permissions.sql<gh_stars>0
-- =============================================
-- Author: <NAME>
-- Create date: 02/19/2009
-- Description: List all DBs permission
--
-- =============================================
set nocount on
declare @permission tabl... |
<gh_stars>0
CREATE OR REPLACE VIEW rubin_image_property_vw AS
SELECT image_id id,
MAX(IF(STRCMP(image_property.type,'line'),null,value)) AS 'line',
MAX(IF(STRCMP(image_property.type,'gender'),null,value)) AS 'gender',
MAX(IF(STRCMP(image_property.type,'age'),null,value)) AS 'age',
MAX(IF(S... |
<reponame>lautit/elt_training
CREATE PROCEDURE `sp_buscar_ciudad_por_id` (IN p_id_ciudad INT)
BEGIN
select ID, Name from city where ID = p_id_ciudad;
END
|
INSERT INTO public."User_previous"(
user_id, p_company_name, joined_year, leaving_year, p_industry_id, p_job_category_id
) VALUES (
/* userprevious.getUserId() */'01',
/* userprevious.getCompanyName() */'株式会社' ,
/* userprevious.getJoinedYear() */2000,
/* userprevious.getLeavingYear() */2018,
/* userpreviou... |
<filename>migration/deploy/function-resolved-matches.sql
-- Deploy yabon-prono:function-resolved-matches to pg
BEGIN;
-- XXX Add DDLs here.
CREATE FUNCTION resolve_game(host text, visit text, Mid int) RETURNS "match" AS $$
UPDATE "match"
SET winner = (
CASE
WHEN score_host = score_visitor THEN 'draw'
WHEN ... |
-- // BBB-1026-update-la-meta-data
-- Migration SQL that makes the change goes here.
-- Generated from spreadsheet with following should this need to be done again...
-- =CONCAT("UPDATE referencedata.reference_data SET meta_data = meta_data::JSONB || '{""nameLine2"":""" ,TRIM(C2), """, ""addressLine1"":""", TRIM(D2) ... |
insert into carta (car_nome, car_codigo, car_descricao, car_valor_compra, car_quantidade_disponivel,car_quantidade_estoque,car_imagem_path, car_jogo_id, car_categoria_id, car_status_id, car_grupo_precificacao_id, car_data_cad) VALUES
('Abundância', '65329899',
'Se for comprar um card, em vez disso, você pode escolher... |
<filename>Docs/Schema/SQLite/Views/vwCatalogBulletForCatalogItemID.sql
/*
// Copyright (c). 2020 <NAME>, MCSD (danielanywhere)
// Released for public access under the MIT License.
// http://www.opensource.org/licenses/mit-license.php
*/
SELECT
CatalogBullet.BulletText,
CatalogBullet.BulletIndex,
CatalogBullet.CatalogBu... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Mar 04, 2022 at 07:39 AM
-- Server version: 5.7.26
-- PHP Version: 7.3.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 ... |
<reponame>aditya1962/BuyGrand
USE [BuyGrandSellerReadReplica]
GO
/****** Object: StoredProcedure [dbo].[sp_getItemSubReview] Script Date: 12/26/2020 13:08:38 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <NAME>
-- Create date: 2020/12/26
-- ... |
<filename>container/Docker/create_procedure_restoreheaderonly.sql
USE master;
GO
-- Create the stored procedure to create the headeronly output
SET NOCOUNT ON
GO
CREATE PROCEDURE dbo.restoreheaderonly
@backuplocation VARCHAR(MAX)
AS
BEGIN
RESTORE FILELISTONLY
FROM DISK = @backuplocation
END
GO |
create type table_of_varchar as table of varchar2(80);
.
/
|
<reponame>HabibAroua/Altro-Tunisia<filename>altro_tunisia.sql
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Dec 16, 2018 at 08:33 PM
-- Server version: 10.1.24-MariaDB
-- PHP Version: 7.0.20
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
S... |
select concat(name, "(", substring(occupation, 1, 1), ")")
from occupations
order by name asc;
select concat("There are a total of ", count(occupation), " ", lower(occupation), "s.")
from occupations
group by occupation
order by count(occupation) asc, occupation asc; |
<filename>src/main/resources/schema.sql
CREATE TABLE IF NOT EXISTS BILL_STATEMENTS
(
id int,
first_name varchar(50),
last_name varchar(50),
minutes int,
data_usage int,
bill_amount decimal(10,2)
); |
CREATE TABLE IF NOT EXISTS keys(
id CHARACTER VARYING(6) PRIMARY KEY NOT NULL,
created_at TIMESTAMP WITHOUT TIME ZONE NOT NULL DEFAULT current_timestamp
); |
create or replace view snowalert.rules.aws_audit_log_configuration_changes_alert_query as
select
object_construct('cloud', 'AWS', 'deployment', cloudtrail.DEPLOYMENT, 'account', cloudtrail.recipient_account_id) as environment
, array_construct('cloudtrail') as sources
, RAW:requestParameters:name::string ... |
<reponame>viswaratha12/dbwarden
/****** Object: View [dbo].[V_EUS_Active_Proposal_List_Report] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW [dbo].[V_EUS_Active_Proposal_List_Report]
AS
SELECT P.Proposal_ID AS [Proposal ID],
P.Title,
P.Proposal_Type,
dbo.GetPropo... |
<reponame>viswaratha12/dbwarden
/****** Object: View [dbo].[V_Auxinfo_SamplePrepRequest_Values] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
Create View V_Auxinfo_SamplePrepRequest_Values as
SELECT T_Sample_Prep_Request.Request_Name AS Request ,
T_AuxInfo_Value.Target_ID AS ID ,
T... |
<reponame>jpontdia/employee-info
CREATE TABLE "public".employee (
id serial NOT NULL ,
first_name varchar(100) NOT NULL ,
last_name varchar(100) NOT NULL ,
birth_date date NOT NULL ,
hire_date date NOT NULL ,
gender varchar(1) NOT NU... |
<filename>test/dump/verify.sql
\set ECHO none
\i test/pgxntool/setup.sql
/*
* SEE ALSO sql/all.sql!
*/
SET search_path=test_capture, test_capture_support, tap, public;
/*
* NOTE: If you get a 'relation "test_object" does not exist' error that
* probably means you dumped an empty database!
*/
SELECT plan(
1 ... |
DROP TABLE ballot_responses;
|
BEGIN;
ALTER TABLE device_port ADD COLUMN "speed_admin" text;
COMMIT;
|
-- @testpoint: opengauss关键字unique(保留),作为数据库名,关键字带单引号、反引号、不带引号时,合理报错
--关键字不带引号-失败
drop database if exists unique;
create database unique;
--关键字带双引号-成功
drop database if exists "unique";
create database "unique";
--关键字带单引号-合理报错
drop database if exists 'unique';
create database 'unique';
--关键字带反引号-合理报错
drop database if... |
<reponame>liviayurike/puskesmas<filename>database/puskesmas.sql
-- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Waktu pembuatan: 01 Apr 2020 pada 09.11
-- Versi server: 8.0.18
-- Versi PHP: 7.3.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACT... |
-- do nothing |
<gh_stars>0
DELETE tbl_node WHERE G_VOL = ?gVol |
SET FOREIGN_KEY_CHECKS=0;
TRUNCATE `log_customer`;
TRUNCATE `log_visitor`;
TRUNCATE `log_visitor_info`;
TRUNCATE `log_visitor_online`;
TRUNCATE `log_quote`;
TRUNCATE `log_summary`;
TRUNCATE `log_summary_type`;
TRUNCATE `log_url`;
TRUNCATE `log_url_info`;
TRUNCATE `sendfriend_log`;
TRUNCATE `report_event`;
TRUNCATE `da... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 08 Okt 2019 pada 17.55
-- Versi Server: 10.1.19-MariaDB
-- PHP Version: 5.6.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT... |
-- CreateTable
CREATE TABLE "Plant" (
"id" TEXT NOT NULL,
"scientificName" TEXT NOT NULL,
"popularName" TEXT NOT NULL,
"kingdom" TEXT NOT NULL,
"division" TEXT NOT NULL,
"class" TEXT NOT NULL,
"order" TEXT NOT NULL,
"family" TEXT NOT NULL,
"subfamily" TEXT NOT NULL,
"createdAt" T... |
<reponame>amielanthonygonzales/hris<filename>sql dump/employee 2018-02-21.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.4.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Feb 21, 2018 at 03:41 AM
-- Server version: 5.6.26
-- PHP Version: 5.6.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET ... |
<reponame>AscenKeeprov/Database-Basics
USE Bank
GO
CREATE TABLE Logs
(
LogId INT IDENTITY
CONSTRAINT PK__Log_Id
PRIMARY KEY (LogId),
AccountId INT NOT NULL
CONSTRAINT FK__Logs_AccountId__Accounts_Id
FOREIGN KEY (AccountId) REFERENCES Accounts(Id),
OldSum DECIMAL(15,2) NOT NULL,
NewSum DECIMAL(15,2) NOT NUL... |
BEGIN;
DROP TABLE IF EXISTS monitors CASCADE;
DROP TABLE IF EXISTS monitor_logs CASCADE;
CREATE TABLE monitors (
id serial PRIMARY KEY,
name text NOT NULL,
type text NOT NULL
);
CREATE TABLE monitor_logs (
id serial PRIMARY KEY,
date timestamp with time zone NOT NULL,
event smallint NOT NULL,... |
<reponame>pandudwi1/BackendPertemuan11
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 26, 2021 at 04:06 PM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 7.3.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";... |
<reponame>jbpion/log4mssql
CREATE FUNCTION LoggerBase.Config_Root_Get(@Config XML)
RETURNS @Root TABLE
(
RowID INT
,LevelValue VARCHAR(500)
,AppenderRef VARCHAR(500)
)
AS
BEGIN
INSERT INTO @Root
SELECT
ROW_NUMBER() OVER (ORDER BY AR.AppenderRef) AS RowID
,LV.LevelValue
,AR.AppenderRef
FROM
(
SELECT... |
<filename>AdventureWorks/Security/Person.sql
CREATE SCHEMA [Person]
AUTHORIZATION [dbo];
|
-- Up
CREATE TABLE posts_m (
id SERIAL PRIMARY KEY,
title varchar(50) DEFAULT NULL,
body text,
created_at timestamp(0) NOT NULL,
updated_at timestamp(0) NOT NULL
);
CREATE TABLE articles_m (
id SERIAL PRIMARY KEY,
title varchar(50) DEFAULT NULL,
body text,
created_at timestamp(0) NOT NULL,
updated_... |
<filename>Blizzlike/ArcEmu/SQL/Events/Darkmoon Faire/Mulgore/Mulgore_SettingUp.sql
/*
Title: Darkmoon Faire
Author: Nexis
Series: Setup
Location: Mulgore
*/
-- Darkmoon Faire NPCs
replace into `creature_names` values('40003','Darkmoon Faire Carnie','','','0','7','0','0','0',NULL,'14890','0','0','0','1','1','1',NULL);
... |
<filename>sql/3-Country.sql
-- Set default schema to use for the following queries
SET search_path TO "utility";
DROP TABLE IF EXISTS "country";
CREATE TABLE "country" (
"id" char(2) NOT NULL PRIMARY KEY,
"alpha3" char(3) NOT NULL,
"m49" char(3) NOT NULL,
"name" varchar(100) NOT NULL,
"native_name" varchar(... |
INSERT INTO `person` (`id`, `address`, `first_name`, `gender`, `last_name`) VALUES
(1, '<NAME> - Brasil', 'Ayrton', 'Male', 'Senna'),
(2, 'Anchiano - Italy', 'Leonardo', 'Male', 'Da Vinci'),
(3, 'Porbandar - India', 'Mahtma', 'Male', 'Gandih'),
(4, 'Kentucky - USA', 'Nelson', 'Male', 'Gandih'),
(5, 'Kentycky - USA... |
select count(city) - count(distinct(city))
from station
|
---
-- #%L
-- Swiss Knife
-- %%
-- Copyright (C) 2019 - 2020 Core General
-- %%
-- 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
--
-- ... |
<reponame>prodypanda/mail-check
ALTER TABLE aggregate_report ADD UNIQUE `dedup_reports`(`report_id`,`domain`,`org_name`);
ALTER TABLE aggregate_report DROP INDEX `report_id_UNIQUE`; |
<reponame>nenadnoveljic/tpt-oracle
-- Copyright 2018 <NAME>. All rights reserved. More info at http://tanelpoder.com
-- Licensed under the Apache License, Version 2.0. See LICENSE.txt for terms & conditions.
-- simple asm dump utility
-- use full database file name (with +datagroup name) as only parameter
-- nb! doesn... |
CREATE UNLOGGED TABLE
IF NOT EXISTS "a" (
"id" integer PRIMARY KEY UNIQUE DEFAULT 1,
"name" varchar(255) CONSTRAINT "name_constraint" NULL DEFERRABLE INITIALLY DEFERRED
CONSTRAINT "a_id_check" CHECK ("id" > -1)
)
INHERITS ("b")
ON COMMIT DELETE ROWS
TABLESPACE "tablespace";
CREATE
GLOBAL TEMPORARY TABLE
"b"
(... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Sep 15, 2021 at 06:56 PM
-- Server version: 10.5.11-MariaDB-1
-- PHP Version: 8.0.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHAR... |
<reponame>mitsuhiko/pycon<filename>pycon_project/migrations/015_added_userbookmark.sql
### New Model: schedule.UserBookmark
CREATE TABLE "schedule_userbookmark" (
"id" serial NOT NULL PRIMARY KEY,
"user_id" integer NOT NULL REFERENCES "auth_user" ("id") DEFERRABLE INITIALLY DEFERRED,
"presentation_id" integ... |
CREATE EXTERNAL TABLE `kite_status_normalized`(
{% for key, value in params.schema['properties'].items()|sort if key != "properties" and value.get("kite_status_normalized") != False %}
`{{ key }}` {{ value.type|safe }},
{% endfor %}
{% for key, value in params.schema['properties']['properties']['properties'].i... |
<reponame>opengauss-mirror/Yat<filename>openGaussBase/testcase/SQL/DDL/interval/Opengauss_Function_DDL_Partition_Interval_Case0106.sql
-- @testpoint: interval分区,EXCHANGE PARTITION分区表被置换的分区是自动扩展分区
drop table if exists pt1;
drop table if exists common_table1;
create table pt1(
col_1 smallint,
col_2 char(30),
col_3 int,
... |
USE burgers_DB;
INSERT INTO burgers (burger_name, devoured)
VALUES ("Cheese Burger", false)
,("Bacon Burger", false)
,("Veggie Burger", false); |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 05, 2020 at 11:05 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... |
<reponame>x-t3ch/SmartConfig<filename>SmartConfig.DataStores.SqlServer/PackageContent/SmartConfig.DataStores.SqlServer.6.0.0/dbo.Create custom setting table.sql
CREATE TABLE [dbo].[Setting]
(
[Name] NVARCHAR(255) NOT NULL,
[Value] NVARCHAR(MAX) NULL,
[Environment] NVARCHAR(50) NOT NULL ,
[Version] NVAR... |
<reponame>lajtomekadimon/tukosmo<gh_stars>1-10
CREATE OR REPLACE FUNCTION c_lang_by_id(
lang_id BIGINT
)
RETURNS BOOL
LANGUAGE SQL
VOLATILE
RETURNS NULL ON NULL INPUT
PARALLEL UNSAFE
AS $$
SELECT EXISTS(
SELECT 1
FROM t_languages
WHERE tl_id = lang_id
LIMIT 1
)
$$;
|
<filename>migrate/migrations/000001_create_messages_table.up.sql<gh_stars>1-10
CREATE TABLE IF NOT EXISTS messages(
id int AUTO_INCREMENT NOT NULL PRIMARY KEY,
name VARCHAR (30) NOT NULL DEFAULT '名無し',
message VARCHAR (1000) NOT NULL,
created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) DEFAULT CHA... |
INSERT INTO dbo.tblGlobalSettings ([Key],Value)
VALUES
('ResultRetentionMonths','12'),
('ResultAggregateDays','30'),
('CleanupSchedule','"0 0 6 * * ?"'),
('LoginExpireAfterDays','30') |
--new catalog sale record.
create or alter procedure newCatalogSale(item_sk int, cust_sk int, custname char(10), page_sk int, promo_sk int,
qty int, listPrice decimal(7, 2), sp decimal(7, 2), npaid decimal(7, 2),
profit decimal(7, 2), streetnum char(10), suite char(10), city varchar(60),
... |
-- file:aggregates.sql ln:452 expect:true
create or replace view agg_view1 as
select aggfns(a,b,c order by b+1)
from (values (1,3,'foo'),(0,null,null),(2,2,'bar'),(3,1,'baz')) v(a,b,c)
|
<reponame>Max1811/SchoolManagement
-- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date,,>
-- Description: <Description,,>
-- =============================================
CREATE PROCEDURE [dbo].[GenerateRandomSchools]
--@SchoolsAmount int
@LowerBoundSchoolsPerRegi... |
/*
1532. The Most Recent Three Orders
Table: Customers
+---------------+---------+
| Column Name | Type |
+---------------+---------+
| customer_id | int |
| name | varchar |
+---------------+---------+
customer_id is the primary key for this table.
This table contains information about customers.
... |
CREATE FUNCTION [dal].[ft_ClosingEmployeesResources] (
@DefinitionId INT,
@MonthEnding DATE
)
RETURNS @returntable TABLE
(
[EmployeeId] INT,
[AsOf] DATE,
[ResourceId] INT,
[ResourceCode] NVARCHAR(10),
[Lookup1Code] NVARCHAR(10)
)
AS
BEGIN
INSERT @returntable
SELECT E.[AgentId], E.[Time1], E.[ResourceId], R.... |
--
-- 表的结构 `__PREFIX__cwmap_location`
--
--DROP TABLE IF EXISTS `__PREFIX__cwmap_location`;
CREATE TABLE IF NOT EXISTS `__PREFIX__cwmap_location` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID',
`locationname` varchar(100) NOT NULL COMMENT '位置名称',
`detailaddress` varchar(500) DEFAULT NULL COMMENT '详细... |
# ************************************************************
# Sequel Pro SQL dump
# Version 4499
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: 127.0.0.1 (MySQL 5.7.23)
# Database: spring_security
# Generation Time: 2018-09-21 07:59:04 +0000
# ***************************************... |
<filename>db/schema.sql<gh_stars>0
DROP TABLE IF EXISTS post;
DROP TABLE IF EXISTS city;
DROP TABLE IF EXISTS candidate;
DROP TABLE IF EXISTS userjob;
CREATE TABLE post (
id SERIAL PRIMARY KEY,
name TEXT
);
CREATE TABLE city (
id SERIAL PRIMARY KEY,
name TEXT
);
INSERT INTO city(id, name)
VALUES(1,'Tokyo')... |
<reponame>Agirish/drill-maprdb-tests
select date_sub(max(O_ORDERDate),min(O_ORDERDate)) as num_days from orders;
|
<reponame>KamLar/datly
DROP TABLE IF EXISTS event_types;
CREATE TABLE event_types
(
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
name VARCHAR(255),
account_id INTEGER
);
DROP TABLE IF EXISTS languages;
CREATE TABLE languages
(
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
code VA... |
<filename>chat.sql
-- phpMyAdmin SQL Dump
-- version 4.5.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Feb 23, 2017 at 07:16 PM
-- Server version: 5.7.11
-- PHP Version: 5.6.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.