sql stringlengths 6 1.05M |
|---|
<filename>applications/credhub-api/src/main/resources/db/migration/mysql/V16__use_bigint_for_all_timestamps.sql
ALTER TABLE `auth_failure_audit_record` ADD COLUMN `temp_now` BIGINT(20);
UPDATE `auth_failure_audit_record`
SET `temp_now` = UNIX_TIMESTAMP(CONVERT_TZ(`now`, '+00:00', @@session.time_zone));
ALTER TABLE ... |
<reponame>luis1van/cql-execution-1
// @Test: Nil
define Nil: null
// @Test: IsNull
define Nil: null
define One: 1
define NullIsNull: null is null
define NullVarIsNull: Nil is null
define StringIsNull: '' is null
define NonNullVarIsNull: One is null
// @Test: Coalesce
define NullNullHelloNullWorld: Coalesce(null, null... |
<reponame>iamfork/pipelinedb<filename>src/test/regress/sql/keyed_min_max.sql<gh_stars>1000+
SELECT keyed_min(x, -x) FROM generate_series(1, 1000) AS x;
SELECT keyed_min(-x::float, x::int8) FROM generate_series(1, 1000) AS x;
SELECT keyed_min(x::numeric, x * 100) FROM generate_series(1, 1000) AS x;
SELECT keyed_min('xxx... |
CREATE TABLE "WM_RESOURCEPLAN" (
"RP_ID" bigint NOT NULL,
"NAME" character varying(128) NOT NULL,
"QUERY_PARALLELISM" integer,
"STATUS" character varying(20) NOT NULL,
"DEFAULT_POOL_ID" bigint
);
ALTER TABLE ONLY "WM_RESOURCEPLAN"
ADD CONSTRAINT "WM_RESOURCEPLAN_pkey" PRIMARY KEY ("RP_ID");
AL... |
<filename>src/test/modules/spgist_name_ops/sql/spgist_name_ops.sql
create extension spgist_name_ops;
select opcname, amvalidate(opc.oid)
from pg_opclass opc join pg_am am on am.oid = opcmethod
where amname = 'spgist' and opcname = 'name_ops';
-- warning expected here
select opcname, amvalidate(opc.oid)
from pg_opclas... |
<reponame>muyu1207/yii2cms<filename>yii2_cms.sql<gh_stars>0
/*
Navicat MySQL Data Transfer
Source Server : 北京云服务器数据库
Source Server Version : 50561
Source Host : 192.168.3.11:3306
Source Database : yii2_cms
Target Server Type : MYSQL
Target Server Version : 50561
File Encoding : 6500... |
CREATE DEFINER=`etluser`@`%` PROCEDURE `KilkariListeningMatrixReportCurrentQuarter`()
BEGIN
DECLARE dt DATETIME;
DECLARE i INT;
DECLARE currdate DATETIME;
SET dt = (select cast(last_etl_time as datetime) from ETL_info_table where table_id = 92);
set currdate = (select concat(year(CURDATE()), '-', month(CURDATE()), '-... |
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.5.3
-- Dumped by pg_dump version 9.5.3
-- Started on 2016-07-30 21:20:52 VET
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messa... |
-- create class,insert data,select clause with decode function with DECR function parameter for testing
create class xoo ( a int);
insert into xoo values(1);
select decode(DECR(a), 1, 'x', 'y') from xoo;
select decode(DECR(a), 1, 'x', 'y') from xoo;
drop table xoo;
|
<filename>sql/_23_apricot_qa/_03_i18n/ko_KR/_09_identifiers/_01_table/cases/Create022.sql
Create table 가댁체힐{你好(가#댁 int, S#댁 int);
drop table 가댁체힐{你好;
Create table 가댁체힐}你好(가#댁 int, S#댁 int);
drop table 가댁체힐}你好;
Create table 가댁체힐『你好(가#댁 int, S#댁 int);
drop table 가댁체힐『你好;
Create table 가댁체힐』你好(가#댁 int, S#댁 int);
drop table... |
<reponame>hatsuyuki280/moebooru
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET client_min_messages = warning;
... |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Jul 13, 2020 at 04:51 PM
-- Server version: 5.7.19
-- PHP Version: 7.1.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... |
CREATE view vwBranch
as
select *,
(select a.* from acquirer a
join branch_acquirer ba on ba.acquirer_id = a.id
where ba.branch_id = b.id
for json path) acquirers
from branch b |
ALTER TABLE wards ADD status varchar(20) NOT NULL DEFAULT 'active';
UPDATE wards SET status = 'active'; |
<reponame>MaximilianoCalabro/panel
#
# TABLE STRUCTURE FOR: admin_groups
#
DROP TABLE IF EXISTS `admin_groups`;
CREATE TABLE `admin_groups` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(20) NOT NULL,
`description` varchar(100) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=... |
<gh_stars>0
-- we don't know how to generate schema CU_ONLINE_MARKETING (class Schema) :(
create or replace table GOOGLE_ADWORDS
(
AD_DATE DATE,
CAMPAIGN_ID DECIMAL(18),
CAMPAIGN_NAME VARCHAR(100) UTF8,
ADGROUP_ID DECIMAL(18),
ADGROUP_NAME VARCHAR(100) UTF8,
ADGROUP_STATUS VARCHAR(50) UTF8,
AD_TYPE VARCHAR(50) U... |
<filename>SistemaUniversidad.BackEnd.BD/Stored Procedures/SP_Aulas_Insertar.sql
CREATE PROCEDURE SP_Aulas_Insertar
@NumeroDeAula INT,
@NombreDeAula VARCHAR(20),
@CreadoPor VARCHAR(60),
@ExisteError BIT OUTPUT,
@DetalleError VARCHAR(60) OUTPUT
AS
BEGIN TRY
SAVE TRANSACTION TR
INSERT INTO Aulas(NumeroDeA... |
<gh_stars>0
USE burgers_db;
INSERT INTO burgers (burger_name, devoured)
VALUES
("Fried Egg Burger", "Fried Egg", FALSE),
("Chicken Burger", "Lettuce", TRUE),
("Everything Burger", "All", False);
SELECT * FROM burgers; |
<reponame>rtanyildizi/Library-Management-System
-- Create a new view called 'VW_BookInfo_Join_Publisher' in schema 'dbo'
-- Drop the view if it already exists
IF EXISTS (
SELECT *
FROM sys.views
JOIN sys.schemas
ON sys.views.schema_id = sys.schemas.schema_id
WHERE sys.schemas.name = N'dbo'
AND sys.views.nam... |
alter table intrhemplo add show_birth char(1) before id_pos
alter table intrhemplo add show_servi char(1) before id_pos
update intrhemplo set show_birth = '1', show_servi = '1' |
/* Note: Connect to "dm-nr-oltp" database */
if schema_id('api') is null begin
exec('create schema api authorization dbo');
end
go
if (user_id('webuser') is null) begin
create user webuser with password = '<PASSWORD>!'
end
go
grant execute on schema::api to [webuser]
go
drop sequence if exists dbo.cart_id_generat... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.9.7
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Oct 16, 2021 at 03:36 PM
-- Server version: 10.3.31-MariaDB-cll-lve
-- PHP Version: 7.3.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+0... |
<filename>database.sql
CREATE DATABASE IF NOT EXISTS `bestMovies` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `bestMovies`;
-- MySQL dump 10.13 Distrib 5.7.9, for Win64 (x86_64)
--
-- Host: localhost Database: bestMovies
-- ------------------------------------------------------
-- Server version 5.7.11-log
/*!401... |
<filename>wiki (1).sql<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Feb 07, 2017 at 10:24 AM
-- Server version: 10.1.19-MariaDB
-- PHP Version: 7.0.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... |
CREATE TABLE POLITY
( PolityID NUMBER(5) NOT NULL,
PolityName VARCHAR2(100),
PolityType VARCHAR2(30) CHECK (PolityType IN('State', 'Territory', 'NonState Group', 'International Organization')),
StateAbbr VARCHAR2(3),
CONSTRAINT POLITY_PK PRIMARY KEY (PolityID)
);
CREATE TABLE STATE_DATES... |
DROP TABLE IF EXISTS `fh_modules`;
CREATE TABLE `fh_modules` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`time_enabled` datetime DEFAULT NULL,
`time_updated` datetime DEFAULT NULL,
`state` enum('ENABLED', 'DISABLED') DEFAULT 'DISABLED',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_... |
IF OBJECT_ID('account.get_registration_role_id') IS NOT NULL
DROP FUNCTION account.get_registration_role_id;
GO
CREATE FUNCTION account.get_registration_role_id(@email national character varying(500))
RETURNS integer
AS
BEGIN
DECLARE @is_admin bit = 0;
DECLARE @role_id integer;
... |
/** 1. Enable/disable Read Databases**/
[enable / disable] readwrite_splitting read xxx [from schema]
/** 2. Query All Read Databases **/
show readwrite_splitting read resources [from schema]
|
<reponame>dram/metasfresh
-- 2019-02-28T13:36:14.206
-- #298 changing anz. stellen
/* DDL */ SELECT public.db_alter_table('AD_ImpFormat','ALTER TABLE public.AD_ImpFormat ADD COLUMN isManualImport CHAR(1) DEFAULT ''N'' CHECK (isManualImport IN (''Y'',''N'')) NOT NULL')
;
|
/*
*
* 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"); y... |
<reponame>Ambal/mangos<filename>sql/updates/0.7/4023_spell_proc_event.sql
ALTER TABLE `spell_proc_event`
CHANGE COLUMN `procFlags` `procFlags` int(11) unsigned NOT NULL default '0';
/* on attack miss,dodge,parry and block */
UPDATE `spell_proc_event`
SET `procFlags` = 3288334336 WHERE `entry` = 26107;
/* on attac... |
select oid::regprocedure, oidvectortypes(proargtypes), *
from pg_proc |
<gh_stars>0
drop table transactions;
drop table lock_waits;
CREATE TABLE transactions
(
id varchar(100) PRIMARY KEY,
thread varchar(100),
query TEXT,
start_time timestamp,
wait_start_time timestamp,
lock_mode varchar(100),
lock_type varchar(100),
lock_table varchar(100),
lock_index ... |
insert into users(username, password, enabled) values ('user','$<PASSWORD>',true);
insert into users(username, password, enabled) values ('admin','$<PASSWORD>',true);
insert into users(username, password, enabled) values ('manager','$<PASSWORD>',true);
insert into authorities(username, authority) VALUES ('user','RO... |
<filename>util/createDBUser.sql
--- This file is part of the GeRDI software suite
--- Author <NAME> <<EMAIL>>
--- License: https://www.apache.org/licenses/LICENSE-2.0
--- Absolutely no warranty given!
CREATE USER 'testdb'@'localhost' IDENTIFIED BY 'testdb';
GRANT ALL PRIVILEGES ON testdb.* TO 'testdb'@'localhost';
|
<gh_stars>0
CREATE TEMPORARY TABLE dfs.tmp.temp_tbl_11 PARTITION BY ( col_int )
AS
SELECT DISTINCT col_int FROM typeall_l ORDER BY col_int;
SELECT * FROM dfs.tmp.temp_tbl_11;
DROP TABLE dfs.tmp.temp_tbl_11;
|
drop table if exists fw_product;
/*==============================================================*/
/* Table: fw_product */
/*==============================================================*/
create table fw_product
(
ID varchar(64) not null comment 'Produ... |
/*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50022
Source Host : localhost:3306
Source Database : book
Target Server Type : MYSQL
Target Server Version : 50022
File Encoding : 65001
Date: 2018-05-27 19:03:20
*/
SET FOREIGN_KEY_CHECKS=0;
--... |
<reponame>zhubinsheng/sdb-mall
#sql("queryAllNews")
SELECT * FROM news WHERE enable = 1 ORDER BY create_date desc
#end
#sql("queryHeadNews")
SELECT * FROM news WHERE enable = 1 and head = 1 ORDER BY create_date desc limit 3
#end
#sql("deleteById")
UPDATE news SET enable = 0 WHERE id = #para(0)
#end |
CREATE TABLE txrep (
username varchar(100) NOT NULL default '',
email varchar(255) NOT NULL default '',
ip varchar(40) NOT NULL default '',
msgcount int(11) NOT NULL default '0',
totscore float NOT NULL default '0',
signedby varchar(255) NOT NULL default '',
last_hit timestamp NOT NULL default CURRENT_TIM... |
/* contrib/pgstattuple/pgstattuple--1.2.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION pgstattuple" to load this file. \quit
CREATE FUNCTION pgstattuple(IN relname text,
OUT table_len BIGINT, -- physical table length in bytes
OUT tuple_count BIGI... |
set datestyle to ISO,YMD;
set compatible_mode to 'oracle';
select length('3day 3 hour 3second');
select length(date'2021-12-09');
select length(timestamp'2021-12-09 10:10:11');
select length(timestamptz'2021-12-09 10:10:11+08');
select length(12);
select length(12.44);
select length(12.4::real);
select length(1244444.4... |
<reponame>Vishal19111999/addons-server
ALTER TABLE `discovery_discoveryitem` ADD COLUMN `recommendable` boolean NOT null DEFAULT 0;
ALTER TABLE `versions` ADD COLUMN `recommendation_approved` boolean NOT null DEFAULT 0;
|
<gh_stars>0
-- @testpoint: 非网络类型转换为inet后ipv4地址取最小值
--step1:创建表; expect:成功
drop table if exists t_min_case0013;
create table t_min_case0013(c inet);
create table t_min_case0013_text(t text);
create table t_min_case0013_clob(c clob);
create table t_min_case0013_varchar(c varchar);
create table t_min_case0013_bpchar(c bp... |
<reponame>zealoussnow/chromium<filename>components/test/data/history/history.40.sql
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE meta(key LONGVARCHAR NOT NULL UNIQUE PRIMARY KEY, value LONGVARCHAR);
INSERT INTO meta VALUES('mmap_status','-1');
INSERT INTO meta VALUES('version','40');
INSERT INTO meta VALUES... |
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE meta(key LONGVARCHAR NOT NULL UNIQUE PRIMARY KEY, value LONGVARCHAR);
INSERT INTO "meta" VALUES('mmap_status','-1');
INSERT INTO "meta" VALUES('version','73');
INSERT INTO "meta" VALUES('last_compatible_version','72');
CREATE TABLE token_service (service VARCHAR ... |
<filename>Assignment-3B/Record_Hours_PP.sql
CREATE OR REPLACE PROCEDURE RECORD_HOURS_PP (
p_member_email IN VARCHAR, -- Not NULL
p_opportunity_id IN VARCHAR, -- NOT NULL
p_hours IN NUMBER, -- NOT NULL
p_volunteer_date IN DATE -- NOT NULL
)
IS
creati... |
CREATE DATABASE testdb;
CREATE USER 'testuser'@'%' IDENTIFIED BY 'test<PASSWORD>';
GRANT All PRIVILEGES ON testdb.* TO 'testuser'@'%';
FLUSH PRIVILEGES;
|
--Backup the database SoftUni from the previous tasks into a file named 'softuni-backup.bak'. Delete your database from SQL Server Management Studio. Then restore the database from the created backup. |
with m as (
select response_id, count(online) as num_per_response
from metadata_completeness,
json_array_elements(distributions->'online') online
group by response_id
)
select sum(m.num_per_response) as num_hrefs
from responses r join m on m.response_id = r.id
where r.host is not null; |
<reponame>dgeti-cetis108/Programacion-M2S2-2018
CREATE DATABASE IF NOT EXISTS `library`;
USE `library`;
CREATE TABLE `alumnos` (
`id` INT AUTO_INCREMENT PRIMARY KEY,
`no_control` CHAR(14) NOT NULL UNIQUE,
`nombre` VARCHAR(50) NOT NULL,
`paterno` VARCHAR(30) NOT NULL DEFAULT 'X',
`materno` VARCHAR(3... |
<gh_stars>0
CREATE DATABASE IF NOT EXISTS `SAM` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `SAM`;
-- MySQL dump 10.13 Distrib 5.5.46, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: SAM
-- ------------------------------------------------------
-- Server version 5.5.46-0ubuntu0.12.04.2
/*!40101 SE... |
<reponame>dssho/uniappserver
/*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50553
Source Host : localhost:3306
Source Database : dtcmsdb4
Target Server Type : MYSQL
Target Server Version : 50553
File Encoding : 65001
Date: 2017-08-30 10:52:00
... |
{{ config(
materialized = 'table',
) }}
select merkle_root,
case when merkle_root = '0x015e6c2cd1a4d6fa77aa1884c436b2435aae4beab5c9a091f18fd0c00dc7e577' then cast('2021-10-22 23:10:00' as timestamp_ntz)
when merkle_root = '0x2828440576d787582da1af59d0bc0f090e5add2680610dc2ffa53b5a6aa30... |
SELECT CONFLICTS.ID, REFERENCE.RELATIVEID, REFERENCE."VALUE", ACTUAL."VALUE"
FROM CONFLICTS
JOIN ACTUAL ON ACTUAL.ID = CONFLICTS.ACTUALID
JOIN REFERENCE ON REFERENCE.ID = CONFLICTS.REFERENCEID
WHERE CONFLICTTYPE <> 0 |
CREATE TABLE `image_notes` (
`id` int(11) NOT NULL auto_increment,
`image_id` int(11) NOT NULL,
`author_id` int(11) default NULL,
`name` varchar(30) collate utf8_swedish_ci NOT NULL,
`user_id` int(11) default NULL,
`x` int(11) default NULL,
`y` int(11) default NULL,
`width` int(11) default NULL,
`heig... |
<reponame>IGedeMiarta/new_perpus<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 17, 2021 at 04:38 AM
-- Server version: 10.3.16-MariaDB
-- PHP Version: 7.3.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTI... |
USE [Intune];
GO
SET NOCOUNT ON;
/***************************************************************************************************************************
Object: dbo.v_deviceCompliancePoliciesAssignmentInfo
History:
Date Version Author Notes:
04/27/2021 0.0 <NAME> Se... |
-- MySQL dump 10.17 Distrib 10.3.22-MariaDB, for debian-linux-gnueabihf (armv8l)
--
-- Host: localhost Database: nettemp
-- ------------------------------------------------------
-- Server version 10.3.22-MariaDB-0+deb10u1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTE... |
CREATE TABLE IF NOT EXISTS events (
stream_id TEXT,
version INT,
event_type TEXT,
event_data BLOB,
event_time BIGINT,
max_version INT STATIC,
PRIMARY KEY (stream_id, version)
) WITH compression = {'sstable_compression': 'LZ4Compressor'};
|
<reponame>jdkoren/sqlite-parser
-- avtrans.test
--
-- execsql {
-- COMMIT;
-- SELECT name fROM sqlite_master
-- WHERE type='table' OR type='index'
-- ORDER BY name;
-- }
COMMIT;
SELECT name fROM sqlite_master
WHERE type='table' OR type='index'
ORDER BY name; |
<gh_stars>1000+
-- 2018-04-28T10:59:03.982
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_SysConfig (Value,EntityType,AD_Client_ID,CreatedBy,UpdatedBy,IsActive,ConfigurationLevel,AD_SysConfig_ID,Description,AD_Org_ID,Name,Created,Updated) VALUES ('-','D',0,100,100,'Y','S',541205,'The v... |
set echo on
REM Querying table
DECLARE
v_BadOrder varchar2(40);
v_NewStatus varchar2(1);
v_Count number;
BEGIN
v_BadOrder := '5611111';
v_NewStatus := 'X';
v_Count := 0;
-- GN RESERVED INVENTOR
DBMS_OUTPUT.PUT_LINE('GN RESERVED INVENTOR');
DBMS_OUTPUT.NEW_LINE();
DELETE
FROM ... |
# ************************************************************
# Sequel Pro SQL dump
# Version 5446
#
# https://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: localhost (MySQL 5.7.9)
# Database: smithereen
# Generation Time: 2021-07-23 14:34:38 +0000
# ********************************************... |
<reponame>ENguyen25/employee-management-system<gh_stars>0
INSERT INTO department (name)
VALUES ("Human Resources"),
("Marketing"),
("Accounting"),
("Technology"),
("Operations");
INSERT INTO roles (title, salary, department_id)
VALUES ("Graphic Designer", 80000.00, 2),
("Executive Di... |
<reponame>shenyun/camunda-bpm-platform
-- add historic external task log
create table ACT_HI_EXT_TASK_LOG (
ID_ varchar(64) not null,
TIMESTAMP_ timestamp(3) not null,
EXT_TASK_ID_ varchar(64) not null,
RETRIES_ integer,
TOPIC_NAME_ varchar(255),
WORKER_ID_ varchar(255),
PRIORITY_ bigint NO... |
<reponame>KashchenkoP/docker-airflow
DROP TABLE IF EXISTS import_stat_by_hscodes_and_companies;
CREATE TABLE
import_stat_by_hscodes_and_companies
AS
SELECT
MD5(concat_ws('', t1.src, t1.importer_company_id)) as hashed_id,
MAX(t1.importer_company_id) as `importer_company_id`,
SUBSTR(t1.hscode,1,6) as `hsco... |
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE general_params ( "name" text, "value" text );
INSERT INTO "general_params" VALUES('list_report_data_table','V_Analysis_Request_Jobs_List_Report');
INSERT INTO "general_params" VALUES('list_report_data_sort_dir','DESC');
CREATE TABLE list_report_primary_filt... |
create table item_details(
id bigint not null references item(id) primary key,
subgroup varchar(255) not null,
"order" varchar(255) not null,
stack_size int not null
);
|
/****** Object: View [dbo].[V_Instrument_Config_History_Entry] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW [dbo].[V_Instrument_Config_History_Entry]
AS
SELECT ID, Instrument, Description, Note, Entered, EnteredBy AS PostedBy, Cast(Date_Of_Change AS date) AS DateOfChange
FROM ... |
<reponame>SLIPO-EU/workbench
DROP TABLE IF EXISTS public.feature_update_history;
DROP SEQUENCE IF EXISTS public.feature_update_history_seq;
CREATE SEQUENCE public.feature_update_history_seq
INCREMENT 1
MINVALUE 1;
CREATE TABLE public.feature_update_history
(
id bigint NOT NULL DEFAULT nextval('feature_update_h... |
------------------------------
-- map all unique case drug drugnames to rxnorm Vocabulary concept_ids
--
-- we will include non-standard and standard codes so we pick up brand names as well as ingredients etc
-- and roll-up to standard codes when we produce the statistics in a later process.
--
-- we map using the foll... |
INSERT INTO mst.chargeback_data(
event_id, event_created_at, event_type, invoice_id, payment_id, chargeback_id,
party_id, party_shop_id, chargeback_status, chargeback_created_at, chargeback_reason, chargeback_reason_category,
chargeback_domain_revision, chargeback_party_revision, chargeback_levy_amount, chargeback_l... |
<filename>dwgenerator/sql/standard/hub_etl.sql
{% extends 'create_persisted.sql' %}
{% block select %}
{% include 'hub_select.sql' %}
{% endblock %}
|
<reponame>gregory-akins/clinical_quality_language<filename>Src/java/cql-to-elm/src/test/resources/org/cqframework/cql/cql2elm/fhir/stu301/TestFHIRNamespaces.cql<gh_stars>100-1000
library TestFHIRNamespaces
using FHIR version '3.0.1'
include FHIRHelpers version '3.0.1'
context Patient
define Procedures: [Procedure] |
-- run query 1 in stream 0 using template query96.tpl and seed 1819994127
<<<<<<< HEAD
select count(*)
from store_sales
,household_demographics
,time_dim, store
where ss_sold_time_sk = time_dim.t_time_sk
and ss_hdemo_sk = household_demographics.hd_demo_sk
and ss_store_sk = s_store_sk
and time... |
<reponame>FANsZL/hive
CREATE TABLE mssql_t1 (
d1 DATETIME,
nc1 NCHAR(10),
n1 NUMERIC(3,0),
n2 NUMERIC(3),
n3 NUMERIC,
v1 VARCHAR(MAX),
nv1 NVARCHAR(10),
nv2 NVARCHAR(MAX)
);
CREATE TABLE [mssql_t2](
[i1] [INT] IDENTITY(1,1) NOT NULL,
[v1] [VARCHAR](350) NULL,
[v2] [VARCHAR](max) NULL,
... |
/**********************************************************************************************
Purpose: Calculate levels in a nested hierarchy tree
Notes: Emulates result of CONNECT BY PRIOR … START WITH syntax
Syntax:
SELECT $(select_cols)
, LEVEL
, $(child_col) , $(pa... |
<filename>contrib/remotexact/remotexact--1.0.sql<gh_stars>0
/* contrib/remotexact/remotexact--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION remotexact" to load this file. \quit
-- Register the function.
CREATE FUNCTION print_bytes(IN bytes bytea)
RET... |
INSERT INTO soup (id, name, is_dairy) VALUES (4, 'French Onion', TRUE);
|
<filename>sql/_23_apricot_qa/_01_sql_extension3/_05_analytic_functions/_08_stddev_samp/cases/stddev_samp_trigger.sql
--TEST: test with tables with triggers
--+holdcas on;
set system parameters 'dont_reuse_heap_file=yes';
create table stddev_samp_trigger(
col1 bit(20),
col2 bit varying,
col3 blob,
col4 clob,
col5... |
--test all with null values
create class t1 (c1 int, c2 char(1));
insert into t1 values (1, 'x');
insert into t1 values (null, null);
insert into t1 values (2, 'x');
insert into t1 values (1, 'x');
insert into t1 values (null, 'y');
insert into t1 values (1, 'x');
insert into t1 values (null, null);
insert into t1 va... |
<reponame>kyle6301/FileUpload<filename>users.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 11, 2018 at 07:06 PM
-- Server version: 10.1.30-MariaDB
-- PHP Version: 5.6.33
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
STA... |
<reponame>silvenga-docker/observium<filename>vendor/update/002.sql<gh_stars>0
CREATE TABLE IF NOT EXISTS `cmpMemPool` ( `cmp_id` int(11) NOT NULL auto_increment, `Index` varchar(8) NOT NULL, `cmpName` varchar(32) NOT NULL, `cmpValid` varchar(8) NOT NULL, `device_id` int(11) NOT NULL, `cmpUsed` int(11) NOT NULL, ... |
-- CreateTable
CREATE TABLE "refresh_token" (
"id" TEXT NOT NULL,
"expiresIn" INTEGER NOT NULL,
"user_id" TEXT NOT NULL,
CONSTRAINT "refresh_token_pkey" PRIMARY KEY ("id")
);
-- CreateIndex
CREATE UNIQUE INDEX "refresh_token_user_id_key" ON "refresh_token"("user_id");
-- AddForeignKey
ALTER TABLE "re... |
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 07, 2018 at 04:58 PM
-- Server version: 10.1.25-MariaDB
-- PHP Version: 7.1.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
<filename>MetadataDB/procfwkHelpers/Stored Procedures/AddPipelineViaPowerShell.sql
CREATE PROCEDURE [procfwkHelpers].[AddPipelineViaPowerShell]
(
@ResourceGroup NVARCHAR(200),
@DataFactoryName NVARCHAR(200),
@PipelineName NVARCHAR(200)
)
AS
BEGIN
SET NOCOUNT ON;
DECLARE @DataFactoryId INT
DECLARE @StageId INT... |
<filename>controlRoom_server/server/views/sql/refresh_hourly_view.sql
DECLARE numerrs PLS_INTEGER;
BEGIN
-- Kill open refresh
FOR r IN (SELECT distint sid,serial#
FROM V$SESSION SES,
V$SQLtext_with_newlines SQL
where SES.STATUS = 'ACTIVE'
and SES.USE... |
<filename>Backend/CreativeSolutionManagement/DB/Procedures.sql
use beeplus_csm;
|
<reponame>RodolfoBredoff/Joomla-Docker<filename>plugins/system/cwgears/sql/updates/mysql/0.3.8.sql
--
-- Convert all tables to utf8mb4 character set with utf8mb4_unicode_ci collation
--
ALTER TABLE `#__cwgears` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__cwgears_schedule` CONVERT TO CHA... |
<reponame>OrifInformatique/ci_packbase_hmvc
--
-- Make the user field unique
--
ALTER TABLE `user` ADD UNIQUE `username_unique` ( `username`); |
<reponame>zonafets/TSQL-Utils<gh_stars>0
/* leave this
l:see LICENSE file
g:utility,io
v:130510\s.zaglio: added 0<n
v:130329\s.zaglio: added $<, comments to disambiguate (search 130329)
v:120523\s.zaglio: a bug near use of goto, when format is a date but @val a string
v:120406\s.zaglio: added ... |
ALTER TABLE patient_viral_load ADD date_collected date NULL AFTER test_date//
TRUNCATE TABLE patient_viral_load// |
DROP TABLE IF EXISTS "Employees";
DROP TABLE IF EXISTS "Customers";
DROP TABLE IF EXISTS "Categories";
DROP TABLE IF EXISTS "Products";
DROP TABLE IF EXISTS "Suppliers";
DROP TABLE IF EXISTS "Orders";
DROP TABLE IF EXISTS "Order Details";
DROP TABLE IF EXISTS "Shippers";
CREATE TABLE "Employees" (
"EmployeeID" INTEGE... |
<reponame>getwasim/egov-smartcity-suites-test<filename>egov/egov-mrs/src/main/resources/db/migration/main/V20161017203319__mrs_sms_email_config.sql
INSERT INTO eg_appconfig ( ID, KEY_NAME, DESCRIPTION, VERSION, MODULE ) VALUES (nextval('SEQ_EG_APPCONFIG'), 'SENDSMSFROOMMARRIAGEMODULE', 'SMS Notification for marriage re... |
<gh_stars>1-10
--
ALTER TABLE `apps` ADD COLUMN `description` TEXT;
ALTER TABLE `apps` ADD COLUMN `icon_color` VARCHAR(16) NOT NULL DEFAULT '';
--//@UNDO
ALTER TABLE `apps` DROP COLUMN `description`;
ALTER TABLE `apps` DROP COLUMN `icon_color`;
-- |
<gh_stars>1-10
-- Drop and recreate Categories and Tasks table;
DROP TABLE IF EXISTS tasks CASCADE;
CREATE TABLE tasks (
id SERIAL PRIMARY KEY NOT NULL,
title VARCHAR (255),
description VARCHAR (1024),
imageurl VARCHAR(1024),
created_at DATE,
completed BOOLEAN NOT NULL,
user_id INTEGER REFERENCES users... |
<reponame>git-hulk/memefish<filename>pkg/parser/testdata/input/query/select_singer_with_in_and_unnest_with_query_parameter.sql
SELECT
*
FROM
Singers
WHERE
SingerId IN UNNEST(@singerIDs)
|
# --- !Ups
alter table project_versions add column signature_file_name varchar(255) not null default '';
alter table project_versions alter column signature_file_name drop default;
# --- !Downs
alter table project_versions drop column signature_file_name;
|
<reponame>RichieBzzzt/PoshSSDTBuildDeploy<filename>testProject/Northwind/dbo/Views/Alphabetical list of products.sql
create view "Alphabetical list of products" AS
SELECT Products.*, Categories.CategoryName
FROM Categories INNER JOIN Products ON Categories.CategoryID = Products.CategoryID
WHERE (((Products.Discontinu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.