sql stringlengths 6 1.05M |
|---|
<reponame>MS-BI/JobExceutionFramework
CREATE VIEW [catalog].[object_parameters]
AS
SELECT params.[parameter_id],
params.[project_id],
params.[object_type],
params.[object_name],
params.[parameter_name],
params.[parameter_data_type] AS [data_type],
... |
-- MySQL dump 10.13 Distrib 8.0.15, for macos10.14 (x86_64)
--
-- Host: localhost Database: facebook
-- ------------------------------------------------------
-- Server version 8.0.15
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS *... |
<reponame>getwasim/egov-smartcity-suites-test
CREATE SEQUENCE SEQ_EGPT_VACANCY_REMISSION_APPROVAL;
CREATE TABLE EGPT_VACANCY_REMISSION_APPROVAL
(
ID BIGINT NOT NULL,
VACANCYREMISSION BIGINT NOT NULL,
CHECKINDATE TIMESTAMP WITHOUT TIME ZONE NOT NULL,
COMMENTS VARCHAR(1000) NOT NULL,
STATE_ID BIGINT,
STATUS ... |
<filename>x2_export/sql/data_dump/data_tables_dump.sql
use x2data
SELECT GROUP_CONCAT(CONCAT("'",COLUMN_NAME,"'"))
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'student'
ORDER BY ORDINAL_POSITION
INTO OUTFILE "E:/_BACKUP_MYSQL/CodeForAmerica/dd_student_header.txt"
FIELDS TERMINATED BY ','
ENC... |
-- file:returning.sql ln:91 expect:true
CREATE TEMP VIEW voo AS SELECT f1, f2 FROM foo
|
<filename>WEEKS/wk17/CodeSignal-Solutions/CodeSignal-Solutions-master/Arcade/Databases/salaryDifference.sql
/*Please add ; after each select statement*/
CREATE PROCEDURE salaryDifference()
BEGIN
SELECT COALESCE(((SELECT MAX(salary) FROM employees) *
(
SELECT COUNT(salary) FROM employees
WHERE sa... |
<gh_stars>100-1000
CREATE TABLE [dbo].[sqlwatch_meta_index]
(
[sql_instance] varchar(32) not null,
[sqlwatch_database_id] smallint not null,
[sqlwatch_table_id] int not null,
[sqlwatch_index_id] int identity(1,1) not null,
[index_name] nvarchar(128),
[index_id] int not null,
[index_type_desc] nvarchar(128),
[d... |
/* SCRIPT SQL de mise à jour des localisations dans une nouvelle table mares.localisations */
------------------------------------------------------------------------
--CREATE TABLE
CREATE TABLE mares.localisations
(
loc_id serial NOT NULL,
loc_id_plus text,
loc_uuid uuid DEFAULT uuid_generate_v1(),
loc_nom te... |
drop table GESTIONACTIVIDADES_FACTURA_ACTIVIDAD_LINK cascade ;
|
--
-- Copyright 2015-2018 Mohawk College of Applied Arts and Technology
--
--
-- 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
--
--... |
<filename>sql/V9.0.3__hasqrwrite.sql
alter table renta add column if not exists has_qr_write boolean not null default false;
alter table renta add column if not exists price integer not null
constraint renta_price_fk references price(id); |
<reponame>vbroskas/steam-user
-- drop tables in reverse order to start fresh every time
DROP TABLE IF EXISTS input;
DROP TABLE IF EXISTS review;
DROP TABLE IF EXISTS user;
-- creating the user entity table
CREATE TABLE user (
-- always start with your primary key first!!
-- make it of size and type INT, give it... |
<filename>db/Tables/Tags.sql
CREATE TABLE [dbo].[Tags] (
[ID] UNIQUEIDENTIFIER NOT NULL PRIMARY KEY,
[Label] NVARCHAR(64) NOT NULL
)
|
CREATE VIEW [dbo].[VwVisitor]
AS
SELECT [VisitorID]
,[FirstName]
,[LastName]
,[Address]
,[Email]
FROM [dbo].[Visitor];
GO |
<filename>sql/articles.sql
CREATE TABLE articles (
id CHAR(36) PRIMARY KEY COMMENT 'Primary Key UUID',
title VARCHAR(255) COMMENT 'Title of a blog post',
slug VARCHAR(255) COMMENT 'An SEO and human friendly lookup key',
meta_keywords VARCHAR(255) COMMENT 'Meta data for SEO',
meta_description VARCHAR... |
ALTER TABLE `teams` CHANGE `plan_id` `plan_id` VARCHAR(10) NOT NULL DEFAULT '0' COMMENT '0 is free trial plan, multiple plan to be stored comma separately'; |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 24, 2019 at 03:09 PM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.2.17
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!4... |
<filename>kredit (3).sql
-- phpMyAdmin SQL Dump
-- version 3.5.2.2
-- http://www.phpmyadmin.net
--
-- Inang: 127.0.0.1
-- Waktu pembuatan: 29 Agu 2020 pada 08.02
-- Versi Server: 5.5.27
-- Versi PHP: 5.4.7
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARAC... |
Insert into egcl_servicecategory (id,name,code,isactive,version,createdby,createddate,lastmodifiedby,lastmodifieddate) values
(nextval('seq_egcl_servicecategory'),'Punjab Payment Gateway','PNB',true,0,1,now(),1,now());
|
CREATE PROCEDURE [dbo].[spUser_Delete]
@Id int
AS
begin
delete
from dbo.[User]
where Id = @Id;
end
|
<gh_stars>0
COPY boodskapks.assetdevices TO './data/cassandra/dump/assetdevices.csv' WITH HEADER=TRUE;
COPY boodskapks.assetgeofences TO './data/cassandra/dump/assetgeofences.csv' WITH HEADER=TRUE;
COPY boodskapks.assetgroupmembers TO './data/cassandra/dump/assetgroupmembers.csv' WITH HEADER=TRUE;
COPY boodskapks.asset... |
/*
SQLyog Ultimate v11.3 (64 bit)
MySQL - 10.1.21-MariaDB : Database - forge
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_... |
<reponame>DareDevil23/T-SQL<gh_stars>1-10
SELECT x.[Teacher Full Name], x.SubjectName, x.[Student Full Name], x.Grade
FROM (SELECT
CONCAT(t.FirstName, ' ', t.LastName) AS [Teacher Full Name],
sub.[Name] AS [SubjectName],
CONCAT(s.FirstName, ' ', s.LastName) AS [Student Full Name],
CAST(AVG(ss.Grade) AS DECIMA... |
<reponame>chackoge/ERNIE_Plus
/* SQL scripts for generating person and author ID level datasets to compare with and recreate portions of the SummaryStatistics XLSX file*/
/* Create a table year_range if it does not exist. populate with year values that are usable for creation of a blank slate table in following querie... |
<gh_stars>1-10
DROP FUNCTION IF EXISTS dbo.fn_OrdersPerCustomer;
GO
CREATE FUNCTION dbo.fn_OrdersPerCustomer (@BusinessEntityId int,@CustomerId int)
RETURNS @output TABLE (ProducName nvarchar(100),TotalQuantity int, TotalPrice decimal(18,2))
AS
BEGIN
INSERT INTO @output
SELECT p.Name as ProductName, sum(d.Quantity) ... |
<filename>src/main/resources/db/migration/data/R__3_11__STAFF_LOCATION_ROLES.sql<gh_stars>1-10
INSERT INTO STAFF_LOCATION_ROLES (CAL_AGY_LOC_ID, SAC_STAFF_ID, FROM_DATE, TO_DATE, POSITION, ROLE, SCHEDULE_TYPE, HOURS_PER_WEEK) VALUES ('LEI', -2, TO_DATE('2016-08-08','YYYY-MM-DD'), NULL, 'AO... |
<reponame>Frirhos-he/Introduction_to_Databases_Exams_2020_2021<gh_stars>0
EXERCISE1
A. projection: E.CodI, Name
B. theta-join: E.CodI = CE.CodI
C. INGEGNERE E
D. theta-join: A1.CodI = A2.CodI AND A1.CodA != a2.CodA
E. natural join
F. natural join
G. selection: TipologiaAzione = 'media impresa'
H. Consulenza-eff... |
-- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 24, 2017 at 05:34 AM
-- Server version: 5.7.14
-- PHP Version: 5.6.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... |
<gh_stars>0
create database if not exists ri_memcached_plugin;
create table if not exists ri_memcached_plugin.mc_container (
mc_key varchar(64) PRIMARY KEY NOT NULL,
mc_value varchar(1024) NOT NULL
) engine=innodb;
commit;
update innodb_memcache.containers
set name = concat("default_", db_table)
where... |
<reponame>Speedie007/Intergrator<gh_stars>0
CREATE TABLE [dbo].[CompanyRepresentiveBranches] (
[CompanyRepresentiveBranchID] INT IDENTITY (1, 1) NOT NULL,
[CompanyBranchID] INT NOT NULL,
[CompanyRepresentativeID] INT NOT NULL,
CONSTRAINT [PK_CompanyRepresentiveBranches] PRIMARY KEY CLUS... |
<reponame>ridgebacknet/ridgeback-hunter-db<gh_stars>1-10
/*
= ip-called-decoy.sql
Select all endpoints contacting a decoy on a specific IP address.
== Copyright
Copyright (C)2018 Ridgeback Network Defense, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in complia... |
<reponame>zxf/clickhouse-jdbc-bridge
select * from system.query_log
|
create table review(
id integer primary key,
from_id integer NOT NULL,
student_id integer NOT NULL,
message varchar(255),
FOREIGN KEY(student_id) REFERENCES student(id)
);
create table rating(
from_id integer NOT NULL,
student_id integer NOT NULL,
likes integer,
dislikes... |
-- MySQL dump 10.13 Distrib 5.7.21, for osx10.12 (x86_64)
--
-- Host: localhost Database: test
-- ------------------------------------------------------
-- Server version 5.7.21
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!... |
CREATE TABLE IF NOT EXISTS Article (id integer
AUTO_INCREMENT PRIMARY KEY, titre string
, contenu text
, date date
) |
<reponame>concosminx/sql-scripts
/*
find all sessions that are blocked and which session is blocking them
x
find what the blocking session is doing
*/
SELECT sid,
blocking_session,
username,
sql_id,
event,
machine,
osuser,
program
FROM v$session
WHERE blocking_session > 0;
SELECT sid,
blocking_sess... |
<gh_stars>0
select name
from city
where countrycode = "JPN"; |
SELECT
geometrie,
maechtigkeit,
maechtigkeit.dispname as maechtigkeit_txt
FROM
afu_grundwassergeometrie.grundwassrgmtrien_grundwasser_mittelstand AS grundwasser
LEFT JOIN afu_grundwassergeometrie.grundwsrgmtrien_grundwasser_maechtigkeit AS maechtigkeit
ON grundwasser.maechtigkeit = maechtigkeit.... |
INSERT INTO department (name)
VALUE ("Human Resources"),
("Engineering"),
("Accounting"),
("Administration"),
("Sales");
INSERT INTO roles (title, salary, department_id)
VALUE ("HR Specialist", 55000, 1),
("Software Engineer", 105000, 2),
("Accountant", 89000, 3),
("Office Administrator", 49000, 4),
("Salesperson", 55... |
CREATE OR REPLACE FUNCTION common.log_kv_changes()
RETURNS TRIGGER
LANGUAGE PLPGSQL
AS
$$
BEGIN
INSERT INTO common.kv_history(id_old,key,string_value, float_value)
VALUES(OLD.id,OLD.key, OLD.string_value, OLD.float_value);
RETURN NEW;
END;
$$
|
<reponame>felamaslen/budget
--bucket_indexes (down)
DROP INDEX buckets_single_null;
|
<filename>src/test/resources/sql/_unknown/d14a028c.sql
-- file:insert_conflict.sql ln:425 expect:true
|
INSERT INTO "public".capabilities (service_name, service_version, protocol, value, mime_type) VALUES ('test-service', '1.0', 'rest', '{ "swagger": "2.0", "info": { "description": "REST API documentation.", "version": "1.0", "title": "service" }, "host": "service.hltech.dev", "basePath": "/service/v1", "p... |
<gh_stars>0
--
-- Clean up the schema of the original NSBO PostgreSQL database, to make it
-- more suitable for third parties.
--
-- This retains only public byway and place data.
--
-- To make a clean dump:
--
-- pg_dump -Fc --no-owner --no-privileges > pgsql/byways.dump
-- Remove secondary data schema
drop schema fo... |
/** Documentation of ERM AGREEMENT COST QUERY
DERIVED TABLES
agreements_subscription_agreement_entitlement
agreements_erm_resource
finance_transaction_invoices
TABLES
folio_orders.po_line
folio_invoice.invoice_lines
folio_invoice.invoices
FILTERS: FOR USERS TO SELECT
agreement_status, resource_type, resource_sub_ty... |
<reponame>smarceria/prod-management<gh_stars>0
# --- !Ups
create table "suppliers" ("id" BIGSERIAL NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"desc" VARCHAR(254) NOT NULL);
create table "category" ("id" BIGSERIAL NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"parentId" BIGINT NOT NULL);
# --- !Downs
;
dro... |
# Sequel Pro dump
# Version 2492
# http://code.google.com/p/sequel-pro
#
# Host: 127.0.0.1 (MySQL 5.6.24)
# Database: simple-quiz
# Generation Time: 2015-07-04 10:05:24 +0000
# ************************************************************
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @O... |
INSERT INTO [Genre] (Id, Name, CollectionId)
VALUES (@Id, @Name, @CollectionId); |
/****** Object: StoredProcedure [dbo].[AddUpdateParamByManagerType] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE Procedure dbo.AddUpdateParamByManagerType
/****************************************************
**
** Desc:
** Adds or Updates a single manager params for set of given manager t... |
<gh_stars>100-1000
{{ config(materialized='table') }}
WITH data AS (
SELECT
cast(1 AS integer) AS my_int,
my_text,
-- the after script value should reflect here
my_float
FROM {{ ref('other_model') }}
)
SELECT *
FROM data
|
<reponame>votecube/votecube_db<gh_stars>0
-- comment out "drop keyspace" when running for the first time
drop keyspace votecube;
create keyspace votecube
WITH replication = {'class': 'SimpleStrategy', 'replication_factor' : 1};
use votecube;
----------
-- META --
----------
/**
Below schema supports s... |
-- DDL file generated by ./generate_oracle_deployable.sh on 03132007124002
-- ====================================================
-- ====================================================
-- ====================================================
PROMPT Creating Tables
REM ==================================================... |
--TEST: insert ... select false query
CREATE TABLE t1 (id INT, aaa INT);
CREATE TABLE t2 (id INT, bbb INT);
insert into t1 values(1, 1), (2, 2);
insert into t2 values(1, 1), (2, 3);
INSERT INTO t1 (id)
SELECT t2.id
FROM t2
WHERE
NOT EXISTS
(SELECT NULL
FROM t1
WHERE t1.aaa = t2.bbb);
... |
DO
$$
BEGIN
IF NOT EXISTS (
SELECT *
FROM pg_catalog.pg_roles
WHERE rolname = 'pgq_reader') THEN
CREATE ROLE pgq_reader;
END IF;
IF NOT EXISTS (
SELECT *
FROM pg_catalog.pg_roles
WHERE rolname = 'pgq_writer') THEN
CREATE ROLE pgq_writ... |
-- phpMyAdmin SQL Dump
-- version 4.6.6
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Feb 29, 2020 at 11:14 AM
-- Server version: 5.7.17-log
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIEN... |
<reponame>linuxdict/pd2pg<filename>examples/team-detail.sql
-- Compute the number of off-hours incidents that occur off-hours
-- (Beijing time) per service over the last 28 days.
with timezoned_incidents as (
select
incidents.id,
incidents.service_id,
incidents.created_at at time zone 'Asia/Shanghai' as local_cr... |
# https://www.mssqltips.com/sqlservertip/4606/generate-tsql-scripts-for-all-sql-server-databases-and-all-objects-using-powershell/
$date_ = (date -f yyyyMMdd)
$ServerName = ".\sql2017" #If you have a named instance, you should put the name.
$path = "g:\DbScriptOut"
[System.Reflection.Assembly]::LoadWithPartialName('... |
<gh_stars>0
create or replace function teste_cursor
return int
is
cursor emp2 is select est.URI ,
est.CNPJ ,
est.RAZAO_SOCIAL ,
est.NOME_FANTASIA ,
est.URI_PORTE ,
est.EMAIL ,
est.CAPITAL_SOCIAL ,
est.URI_E_MATRIZ_OU_FILIAL ,
est.URI_PRINCIPAL_ATIV_ECONOMICA ,
est.DATA_INICIO_ATIV ,
est.URI_ENDERECO ,
est.TELEFONE1 ,
e... |
<filename>v2.0/helpers/sites/sitebygpid.sql
WITH allgpu AS (
SELECT DISTINCT siteid, geopoliticalid
FROM
ndb.geopaths AS gp
INNER JOIN ndb.sitegeopolitical AS sgp ON sgp.geopoliticalid = gp.geoin
WHERE ${gpid} && gp.geoout OR sgp.geopoliticalid = ANY(${gpid})
OFFSET (CASE WHEN ${offset} IS NULL THEN... |
-- TODO issue#draft {
-- +migrate Up
CREATE TABLE "license_employee" (
"license" UUID NOT NULL,
"employee" UUID NOT NULL,
"created_at" TIMESTAMP NOT NULL DEFAULT now(),
UNIQUE ("employee")
-- UNIQUE ("license", "employee")
);
CREATE TABLE "license_workplace" (
"license" UU... |
-- =============================================
-- Author: Adit
-- Create date: 28/10/2014
-- Description: load course monitoring
-- Author: Harris
-- Alter date: 19/03/2015
-- Description: perbaikan untuk centangan finalize
-- Modified by : Hengky
-- Date : 11 Feb 2017
-- Des... |
<reponame>jdtjenkins/nestjs-jwt-auth<gh_stars>1-10
CREATE TABLE users (
`id` INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
`username` VARCHAR(255) NOT NULL,
`password` varchar(255) NOT NULL
);
|
<gh_stars>10-100
ALTER TABLE client_config ADD COLUMN max_solve_time_ms INT NOT NULL DEFAULT 75;
|
<filename>FLIXTREME_DB.sql
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 03, 2020 at 09:32 PM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTE... |
<gh_stars>1000+
-- ref: https://docs.snowflake.com/en/user-guide/sample-data-tpch.html#database-entities-relationships-and-characteristics
CREATE OR REPLACE SCHEMA TPCH_SF1;
USE SCHEMA TPCH_SF1;
CREATE OR REPLACE TABLE CUSTOMER (
C_CUSTKEY NUMBER(38,0) NOT NULL
, C_NAME VARCHAR(25) NOT NULL
, C_ADDRESS VARCHAR(4... |
create table proc_sfb.kfw_car_municipios as
SELECT
municipio.cod_estado,
municipio.idt_municipio,
municipio.nom_municipio,
municipio.geo_localizacao
FROM
usr_geocar_aplicacao.municipio
WHERE
municipio.idt_municipio in (5100359,5100508,5100805,5101258,5101407,5101902,5102702,5102793,5102850,
5103205,5... |
<reponame>JanoSlivka/Kros.KORM.MsAccess
CREATE TABLE [IdStore] (
[TableName] char(100) NOT NULL,
[LastId] int NOT NULL
);
CREATE UNIQUE INDEX [PK_IdStore] ON [IdStore] ([TableName] ASC) WITH PRIMARY;
|
<reponame>reclada/db
CREATE SCHEMA dev;
-- drop FUNCTION dev.raise_exception
CREATE FUNCTION public.raise_exception(msg text)
RETURNS void
LANGUAGE plpgsql VOLATILE
AS
$func$
BEGIN
--
RAISE EXCEPTION '%', msg;
END
$func$;
CREATE FUNCTION public.raise_notice(msg text)
RETURNS void
LANGUAGE plpgsql VOLA... |
<reponame>hdsjulian/outlierAlert<gh_stars>1-10
BEGIN TRANSACTION;
CREATE TABLE "telegram_users" (
`id` INTEGER,
`user_name` INTEGER,
`user_id` INTEGER,
`allsizes` INTEGER,
PRIMARY KEY(`id`)
);
CREATE TABLE `telegram_user_sizes` (
`user_id` INTEGER,
`size` TEXT
);
CREATE TABLE "telegram_offset" (
`offset` INTEGE... |
<gh_stars>0
CREATE TABLE `okazu_to_track` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`okazu_id` int(10) unsigned NOT NULL,
`track_id` int(10) unsigned NOT NULL,
`file_number` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `okazu_id_2` (`okazu_id`,`track_id`),
KEY `album_id` (`track_id... |
/* make sure it's really dead */
/*drop schema housedb_timeseries cascade;
drop schema housedb_locations cascade;
drop schema housedb_security cascade;*/
|
/* IS631 Enterprise Database Management */
/* <NAME> (acd53) */
/* Part 4 Front End and Geospatial Data */
--Creating the GeoLocation Column in AQS_Sites Table
IF COL_LENGTH('AQS_sites', 'GeoLocation') IS NULL
BEGIN
alter table AQS_Sites
add GeoLocation Geography
END
--Populating the GoeLocation Column
UPDATE ... |
create or replace function "load_articles_propose_test"() returns trigger as
$$
begin
call "load_articles_quiz"("new"."id");
return "new";
end;
$$ language "plpgsql";
create trigger "load_articles_propose_test_trigger"
after insert
on "group"
for each row
execute procedure "load_articles_propose_... |
DROP DATABASE IF EXISTS timesheets;
CREATE DATABASE IF NOT EXISTS timesheets;
USE timesheets;
SELECT 'CREATING DATABASE STRUCTURE' as 'INFO';
DROP TABLE IF EXISTS company,
job,
timesheet,
phase,
employee,
class,... |
<reponame>Next-DataEngineering/Covid-19<filename>InsertQueries.sql
insert into NextDataEngineering.Situacao(id, descricao)
Values (1, "saudável");
insert into NextDataEngineering.Situacao(id, descricao)
Values (2, "suspeito");
insert into NextDataEngineering.Situacao(id, descricao)
Values (3, "confirmado");
... |
CREATE TABLE IF NOT EXISTS class_groups(
id BIGINT AUTO_INCREMENT,
name VARCHAR(256) NOT NULL,
total_number_of_classes INT NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE IF NOT EXISTS students(
id BIGINT AUTO_INCREMENT,
firstname VARCHAR(256) NOT NULL,
lastname VARCHAR(256) NOT NULL,
index_number VARCHAR(8) NOT NU... |
<reponame>win0err/solutions<filename>leetcode/databases/big-countries.sql<gh_stars>0
select
name,
population,
area
from
World
where
area > 3000000
or population > 25000000
; |
<gh_stars>1-10
create index tag_index on test_gin using gin(tags) |
create function userinfo(param json) returns json
language plpgsql
as
$$
declare
_email text;
_perfil int;
_info json;
begin
_email := param ->> 'email';
_perfil := perfil from basic_auth.users where email = _email;
_info := row_to_json(info)
from (
se... |
<filename>resources/inventoryModel/nivel0/nivel1/nivel2/nivel3/nivel4/eq_anticipos.sql
CREATE OR REPLACE VIEW eq_anticipos
AS select eq_personal.*,
cabeanti.numeanti anticipo_num,
cabeanti.codianti anticipo_cod,
cabeanti.descanti anticipo_des,
cabeanti.capianti capital_concedido,
case when cabeanti.tipocalc = '... |
<gh_stars>1-10
CREATE FUNCTION [changelog].[TableComponents](
@schema nvarchar(50),
@name nvarchar(100)
) RETURNS @results TABLE (
[Type] nvarchar(50) NOT NULL, -- column, index, FK, index or FK col, check
[Parent] nvarchar(50) NULL, -- container object within the table, or null for the table itself
[Name] nvarc... |
-- misc1.test
--
-- execsql {SELECT sum((one)), (two), (four) FROM agger
-- GROUP BY (two), (four) ORDER BY sum(one) desc}
SELECT sum((one)), (two), (four) FROM agger
GROUP BY (two), (four) ORDER BY sum(one) desc |
<filename>wp-content/uploads/revisr-backups/revisr_dseo_rg_form.sql
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_... |
-- --------------------------------------------------------
-- 主机: 127.0.0.1
-- 服务器版本: 5.7.20 - MySQL Community Server (GPL)
-- 服务器操作系统: Win64
-- HeidiSQL 版本: 9.5.0.5196
-- --------------------------------------------------------
/*... |
--------------------------------------------------------
-- File created - Thursday-March-01-2012
--------------------------------------------------------
REM INSERTING into EVENT_MESSAGETYPE
Insert into CTUSR.EVENT_MESSAGETYPE (EVENTMESSAGETYPE_ID,EVENTMESSAGETYPE_NAME) values (1,'Not Started');
Insert into C... |
<gh_stars>0
library BladderStimulators version '1'
using QDM
//include otherLibrary version 'x.x' called otherLibrary
//codesystem codeSystemName : 'OID' version 'x.x'
//valueset valuesetName : 'OID' version 'x.x' codesystems{codeSystem1 , codeSystem2, etc}
//code codeName : 'OID' from codeSystemName display 'displa... |
SET NAMES utf8;
-- SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for permission
-- ----------------------------
DROP TABLE IF EXISTS `permission`;
CREATE TABLE `permission` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`ptype` int(20) DEFAULT NULL COMMENT '权限类型',
PRIMARY KEY (`id`) US... |
/*
SQLyog Community v13.1.6 (64 bit)
MySQL - 5.7.31 : Database - blade_taobao
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FO... |
<gh_stars>1-10
--
-- 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
-- "... |
<filename>spring-test/src/test/resources/org/springframework/test/context/jdbc/drop-schema.sql
DROP TABLE user IF EXISTS;
|
<reponame>sookeke/PSP<gh_stars>1-10
-- Drop primary key constraint dbo.TSKTMT_PK
PRINT N'Drop primary key constraint dbo.TSKTMT_PK'
GO
ALTER TABLE [dbo].[PIMS_TASK_TEMPLATE_TYPE]
DROP CONSTRAINT [TSKTMT_PK]
GO
IF @@ERROR <> 0 SET NOEXEC ON
GO |
{#-
Future tests:
- Expect failure when missing arguments
-#}
{%- set test_cases =
[
{"input_object": metrics.period_over_period(alias='pop_constructor_named_args_manual_alias', comparison_strategy='difference', interval=1), "expected_alias": 'pop_constructor_named_args_manual_alias'},
{"in... |
<filename>chat/migrations/2020-06-21-170415_create_notifications/down.sql
DROP TABLE notifications;
|
/******************************************************
NAME: SP_create_user_order
FUNCTION: Create new bookings
MySql > CALL SP_create_user_order(?,?,?,?,?,?,?,?)
FIRST CREATED: 20211117
UPDATED: 20211117
******************************************************/
USE cric_shop_... |
--------------------------------------------------------
-- DDL for Trigger BLOG_POST_UDS_TAGS_TRG
--------------------------------------------------------
CREATE OR REPLACE EDITIONABLE TRIGGER "BLOG_POST_UDS_TAGS_TRG"
after
update on blog_tags
for each row
declare
l_update boolean;
begin
l_update :=
case
... |
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
`id` BIGINT(20) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
`username` VARCHAR(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
INSERT INTO `users` (`username`) VALUES ('admin');
|
select distinct p.name from movies as m,stars as s, people as p where s.movie_id = m.id and s.person_id = p.id and m.year = 2004 order by p.birth; |
CREATE MATERIALIZED VIEW gh_cost.cost_by_sector_us_annual_0919_110221 AS (
WITH sector_join AS (
SELECT slug, A.login, A.additions, A.deletions,
EXTRACT(YEAR FROM A.committed_date)::int AS year, B.company,
COALESCE(B.country, 'Missing') AS country,
COALESCE(B.organization, 'Missing') AS organization,
COALESCE(B.us_a... |
<reponame>khandy21yo/aplus<filename>CMC030/tv/open/tv_commer_comment.ddl
DEFINE RECORD CDD$TOP.TV.TV_COMMER_COMMENT
DESCRIPTION IS /*TV Commercial Comments (Text Library)*/.
TV_COMMER_COMMENT_CDD STRUCTURE.
END TV_COMMER_COMMENT_CDD STRUCTURE.
END TV_COMMER_COMMENT.
|
ALTER SESSION SET CURRENT_SCHEMA = DOCKERWILDFLY;
drop table "DOCKERWILDFLY"."EXAMPLE_TABLE"; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.