sql stringlengths 6 1.05M |
|---|
<reponame>dram/metasfresh
-- 30.06.2016 12:28
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2016-06-30 12:28:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=557016
;
-- 30.06.2016 12:28
-- I forgot to set the DICTIONARY_ID_COMMEN... |
<gh_stars>1000+
-- 2020-02-26T07:16:41.208Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=0, Updated=now(), UpdatedBy=100 WHERE Node_ID=540905 AND AD_Tree_ID=10
;
-- 2020-02-26T07:16:41.211Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Conf... |
<gh_stars>0
#
# TABLE STRUCTURE FOR: Endereco_Pessoa
#
USE comportamento_digital;
INSERT INTO `Endereco_Pessoa` (`id_endereco_pessoa`, `numero`, `cep`, `cpf`, `complemento`) VALUES (1, 8508, '00130', '10036468040', '1054');
INSERT INTO `Endereco_Pessoa` (`id_endereco_pessoa`, `numero`, `cep`, `cpf`, `complemento`) VA... |
<filename>Four2One/Four2One/Scripts/DBUpdate/1008/1103_HtsEncounter.sql
IF EXISTS(SELECT * FROM sys.columns WHERE Name = N'EverTested'AND Object_ID = OBJECT_ID(N'HtsEncounter'))
BEGIN
ALTER TABLE [dbo].[HtsEncounter] ALTER COLUMN EverTested int NULL;
END;
IF EXISTS(SELECT * FROM sys.columns WHERE Name = N'EverSelfTes... |
-- 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.
PRINT N'Adding foreign keys to [edfi].[Session]'
G... |
<reponame>utwente/sketchlab
-- Remove event_type check constraint on notification.
ALTER TABLE "notification" DROP CONSTRAINT IF EXISTS "notification_event_type_check";
-- Do the same thing for H2
ALTER TABLE "notification" DROP CONSTRAINT IF EXISTS "CONSTRAINT_237A88EB_1";
-- Add task_id column and its foreign key co... |
<reponame>test-fullautomation/testresultwebapp
# Copyright 2010-2020 <NAME> Multimedia GmbH
#
# 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... |
{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_forward_enabled'])) }}
{{ email_events_joined(var('email_event_forward')) }} |
<gh_stars>1000+
SELECT quantileExactWeighted(1)(number, 9223372036854775807) FROM numbers(6);
SELECT quantileExactWeighted((NULL, NULL, NULL, NULL))((NULL), number, (NULL, 0, 255), 9223372036854775807), quantilesExactWeighted(0, 1., 0.9998999834060669, 0.00009999999747378752, 0., 0., 0.9998999834060669, 0., 0.000099999... |
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
--
-- Database: `cerebralcortex`
--
-- --------------------------------------------------------
--
-- Table structure for table `user`
--
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`row_id` int NOT NULL,
`user_id` varc... |
-- =================== --
-- Create Users --
-- =================== --
CREATE USER scheduleitAdmin identified by 'scheduleitAdmin';
CREATE USER scheduleitApp identified by 'scheduleitApp';
CREATE USER scheduleitRead identified by 'scheduleitRead';
|
<reponame>tytdesarrollo/Organizacional
CREATE OR REPLACE PACKAGE BODY PKG_AUTOGES_ROLES_Y_PERFILES
-- =============================================
-- Author: <NAME>
-- =============================================
AS
-- =====================================================================
-- IDENTIFICAR SI T... |
<gh_stars>1-10
INSERT INTO download_sources (name, type, created) VALUES ('prerelease-banner', 'full', NOW());
|
-- ETL code for loading stage.customer to dw.dim_email_main
drop table if exists stage.dim_email_main_batch; -- Won't drop to avoid unnoticed collisions
create table stage.dim_email_main_batch as
select
current_timestamp as batch_date,
#JOB_ID# as batch_number
;
drop table if exists stage.dim_e... |
<reponame>mwinter1/hw12
DROP DATABASE IF EXISTS employees_db;
CREATE DATABASE employees_db;
use employees_db;
create table department(
id INT PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(30) NOT NULL
);
create table role(
id INT PRIMARY KEY AUTO_INCREMENT,
title VARCHAR(30) NOT NULL,
salary DECIMAL,
de... |
/* Generating data for database: amlims_dev */
/* Table public.Step cleared */
DELETE FROM "public"."Step";
COMMIT;
/* Table public.Workflow cleared */
DELETE FROM "public"."Workflow";
COMMIT;
/* Table public.ReportDocument cleared */
DELETE FROM "public"."ReportDocument";
COMMIT;
/* Table public.Report cleared *... |
-- <NAME> 216806 --
-- Wtorek 2.06.2020r Kolokwium ABDO
-- ---------------------------------------------------------------------------------------------- --
-- <NAME> - ROZWIAZANIA SA PONIZEJ W <NAME>
-- ZADANIE 1:STWORZYĆ BLOK ANONIMOWY, KTÓRY PRZY UŻYCIU KURSORA DLA KAŻDEGO PRACOWNIKA
-- Z TABELI PRACOWNICY WYP... |
EXEC [EST].[Proc_yjbb_Ins] @Code = N'600851',@CutoffDate = N'2017-09-30',@EPS = N'0.0793',@EPSDeduct = N'0',@Revenue = N'7.36亿',@RevenueYoy = N'0.30',@RevenueQoq = N'11.43',@Profit = N'9575.08万',@ProfitYoy = N'-40.00',@ProfiltQoq = N'-32.90',@NAVPerUnit = N'3.4146',@ROE = N'2.31',@CashPerUnit = N'-0.0169',@GrossProfitR... |
<gh_stars>0
Use Minions
GO
CREATE TABLE Minions (
Id INT PRIMARY KEY,
[Name] VARCHAR(50) NOT NULL,
Age INT
)
CREATE TABLE Towns (
Id INT PRIMARY KEY,
[Name] VARCHAR(50) NOT NULL
) |
CREATE TABLE service_capacities (
pid BIGSERIAL PRIMARY KEY,
available_amount DECIMAL(40, 8),
unsettled_amount DECIMAL(40, 8),
total_amount DECIMAL(40, 8),
unit VARCHAR(20),
updated_at TIMESTAMP,
created_at TIMESTAMP
);
CREATE INDEX ON service_capacities (available_amount);
CREATE INDEX ON service_capacit... |
-- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: 04 Apr 2020 pada 09.37
-- Versi Server: 5.7.29-0ubuntu0.18.04.1
-- PHP Version: 7.2.24-0ubuntu0.18.04.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACT... |
-- START .- Klanten raportage for Ladis
-- HEAD: LADIS rapportage
-- FIELDS: id - ECD ID; achternaam - Achternaam; geboortedatum - Geboortedatum; geslacht - Geslacht; BSN - BSN; land - Geboorteland; postcode - Postcode; nationaliteit - Nationaliteit; inkom - Bron van inkomstem; woonsituatie - Woonsituatie; eerste_bezo... |
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.5.20
-- Dumped by pg_dump version 12.1 (Ubuntu 12.1-1.pgdg18.04+1)
-- Started on 2019-12-30 03:17:30 CET
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_confi... |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 19 Nov 2020 pada 02.38
-- Versi server: 10.4.6-MariaDB
-- Versi PHP: 7.3.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHAR... |
/****** Object: StoredProcedure [AddD04Level11] ******/
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[AddD04Level11]') AND type in (N'P', N'PC'))
DROP PROCEDURE [AddD04Level11]
GO
CREATE PROCEDURE [AddD04Level11]
@Level_1_1_ID int OUTPUT,
@Level_1_ID int,
@Level_1_1_Name ... |
declare @model table (model varbinary(max))
insert @model
exec sp_execute_external_script
@language = N'R'
, @script = N'
formula <- YearlyIncome ~ MaritalStatus + Gender + TotalChildren;
model <- rxLinMod(formula, data = InputDataSet);
#summary(model);
OutputDataSet <- as.data.f... |
USE [ANTERO]
GO
/****** Object: StoredProcedure [dw].[p_lataa_f_amos_tutkinnot_ja_tutkinnonosat] Script Date: 24.1.2020 15:37:41 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER procedure [dw].[p_lataa_f_amos_tutkinnot_ja_tutkinnonosat] AS
TRUNCATE TABLE [dw].[f_amos_tutkinnot_ja_tutkinnonosat]
... |
<filename>test/data/sql/tags_qa_statements.sql<gh_stars>1-10
/*-
__script__
__description*: This script houses test cases for QA statements.
-*/
/*-create-temp table~sample_table-*/
create or replace temp table sample_table as
select 1 as dummy_dim, 1 as dummy_exclude, 1 as dummy_col
union
select 2 as dum... |
<filename>sql/data.sql
--
-- Database: `scalr`
--
INSERT INTO `roles` (`id`, `name`, `origin`, `client_id`, `env_id`, `description`, `behaviors`, `architecture`, `is_stable`, `is_devel`, `history`, `approval_state`, `generation`, `os`, `szr_version`) VALUES
(16161, 'mysqllvm-centos-5-4', 'SHARED', 0, 0, 'MySQL (v5.0.7... |
INSERT INTO [dbo].[Gadget]([Name], [Description], [Price], [CategoryId])
SELECT [g].[Name], [g].[Description], [g].[Price], [g].[CategoryId]
FROM
(
SELECT 'ProntoTec 7' AS [Name], 'Android 4.4 KitKat Tablet PC, Cortex A8 1.2 GHz Dual Core Processor,512MB / 4GB,Dual Camera,G-Sensor (Black)' AS [Description], 1 AS [Ca... |
<reponame>zerynth/streaming-replication-docker
INSERT INTO data (time, v1, v2, v3)
SELECT
time,
random() AS v1,
random()*100 AS v2,
random()*1000 as v3
FROM generate_series(now() - interval '24 hour', now(), interval '1 second') AS g1(time)
|
CREATE TABLE `awlog_logger` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`creation_date` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`host` varchar(100) NOT NULL,
`origin` varchar(100) NOT NULL,
`details` text NOT NULL,
`stacktrace` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=I... |
<gh_stars>0
CREATE TABLE usuario(
id BIGSERIAL PRIMARY KEY,
nombre_usuario VARCHAR(50) UNIQUE NOT NULL,
correo VARCHAR(100) UNIQUE NOT NULL,
clave_encriptada VARCHAR(128) NOT NULL,
tipo_usuario VARCHAR(20) NOT NULL,
habilitado BOOLEAN NOT NULL,
logueado BOOLEAN NOT NULL,
fecha_creacion T... |
<filename>db_utils/output/tbike_ike_doc_tag.sql
-- MySQL dump 10.13 Distrib 8.0.11, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: tbike
-- ------------------------------------------------------
-- Server version 8.0.11
--
-- Table structure for table `ike_doc_tag`
--
DROP TABLE IF EXISTS `ike_doc_tag`;
CREA... |
<reponame>TvanSchagen/scm-ddg
MATCH path = (p:Product)-[:CONSISTS_OF*]->(c:Product),
path2 = (p)<-[:PRODUCES]-(pa:Activity)<-[:PERFORMS]-(po:Organization)
path3 = (c)<-[:PRODUCES]-(ca:Activity)<-[:PERFORMS]-(co:Organization)
WHERE po.name = 'Top Level Organization Blanda - Bode'
RETURN DISTINCT co.name, length(path) AS... |
\c provider1
CREATE TABLE flight (
id SERIAL PRIMARY KEY,
origin CHAR(3) NOT NULL,
destination CHAR(3) NOT NULL,
airline VARCHAR(40) NOT NULL,
departing timestamp NOT NULL);
INSERT INTO
flight(origin, destination, airline, departing)
VALUES
('SEA', 'LAS', 'Deltoid', '2020-12-01 12:10:00'),
... |
<filename>microgateway_ref_architecture/wso2am260/files/wso2am-2.6.0/repository/components/tools/forget-me/conf/sql/apim/am-application-registration-update.sql
UPDATE AM_APPLICATION_REGISTRATION
SET INPUTS = `modifiedString` WHERE SUBSCRIBER_ID = `subscriberId`
|
<reponame>nrademacher/inv<gh_stars>1-10
/*
Warnings:
- Added the required column `clientCity` to the `invoices` table without a default value. This is not possible if the table is not empty.
- Added the required column `clientCountry` to the `invoices` table without a default value. This is not possible if the t... |
drop table COP_WORKFLOW_INSTANCE_ERROR;
drop table COP_WAIT;
drop table COP_RESPONSE;
drop table COP_QUEUE;
drop table COP_AUDIT_TRAIL_EVENT;
drop table COP_ADAPTERCALL;
drop table COP_LOCK;
drop table COP_WORKFLOW_INSTANCE;
--
-- COP_WORKFLOW_INSTANCE
--
create table COP_WORKFLOW_INSTANCE (
ID VARCHAR... |
<filename>sabot/kernel/src/test/resources/queries/tpch_gd/21.sql
select
s.s_name,
count(*) as numwait
from
dfs_test.tpch_supplier_gd s,
dfs_test.tpch_lineitem_gd l1,
dfs_test.tpch_orders_gd o,
dfs_test.tpch_nation_gd n
where
s.s_suppkey = l1.l_suppkey
and o.o_orderkey = l1.l_orderkey
and o.... |
<gh_stars>1000+
BEGIN;
DROP INDEX lsif_nearest_uploads_uploads;
DROP INDEX lsif_nearest_uploads_links_repository_id_ancestor_commit_bytea;
COMMIT;
|
INSERT INTO "_selfservice_settings_requests_tmp" (id, request_url, issued_at, expires_at, identity_id, created_at, updated_at, active_method, update_successful) SELECT id, request_url, issued_at, expires_at, identity_id, created_at, updated_at, active_method, update_successful FROM "selfservice_settings_requests"; |
-- script_version: 1.0.0
DROP VDS IF EXISTS $site_id.base_data_current.trucks_info;
CREATE VDS $site_id.base_data_current.trucks_info
AS
SELECT *
FROM $site_id.base_data_cdc.trucks_info_incr t
WHERE id$ IN (SELECT FIRST_VALUE(id$) OVER (PARTITION BY primary_key_val$ ORDER BY source_scn$ DESC, id$ DESC)
... |
-- @testpoint:opengauss关键字Key_Member(非保留),作为外部数据源名
--关键字不带引号-成功
drop data source if exists Key_Member;
create data source Key_Member;
drop data source Key_Member;
--关键字带双引号-成功
drop data source if exists "Key_Member";
create data source "Key_Member";
drop data source "Key_Member";
--关键字带单引号-合理报错
drop data source if ... |
<reponame>kikyNapitupulu/Sistem-Pengadaan-Barang-Toko-Antony<filename>sql/ci_barang.sql
`barang``barang_keluar``barang_keluar` |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 11, 2019 at 06:18 PM
-- Server version: 10.4.6-MariaDB
-- PHP Version: 7.3.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
-- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 10, 2019 at 08:50 AM
-- Server version: 10.1.34-MariaDB
-- PHP Version: 5.6.37
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
################################
## QUERIES ##
################################
# get information of all orders for a single customer
select O.Customer_id, OD.Product_ID, OD.Order_quantity, P.Selling_Price, (OD.Order_quantity * P.Selling_Price) as Order_Amount
from Orders O, Order_Details OD, Product P
where ... |
SET SERVEROUTPUT ON
DECLARE
V_DEPTNO NUMBER:=80;
CURSOR C_EMP_CURSOR IS
SELECT LAST_NAME, SALARY, MANAGER_ID
FROM EMPLOYEES
WHERE DEPARTMENT_ID = V_DEPTNO;
BEGIN
FOR C_EMP_REG IN C_EMP_CURSOR
LOOP
IF C_EMP_REG.SALARY < 5000 AND (C_EMP_REG.MANAGER_ID = 101 OR C_EMP_REG.MANAGER_ID = 12... |
<filename>src/test/resources/sql-data.sql
INSERT INTO `ims`.`customers` (`first_name`, `surname`) VALUES ('jordan', 'harrison');
INSERT INTO `ims`.`customers` (`first_name`, `surname`) VALUES ('harold', 'potato');
INSERT INTO `ims`.`item` (`item_name`,`stock`, `price` ) VALUES ('Valhalla', 476, 19.62);
INSERT INTO `ims... |
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 25, 2021 at 11:01 AM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 8.0.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
CREATE DATABASE hplussport;
GRANT ALL PRIVILEGES ON DATABASE hplussport TO postgres;
|
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 01, 2021 at 06:19 PM
-- Server version: 10.4.20-MariaDB
-- PHP Version: 8.0.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
<gh_stars>0
-- Prints and joins records from two tables with a matching field
SELECT tv_genres.name AS genre, COUNT(tv_show_genres.genre_id) AS number_of_shows
FROM tv_genres
RIGHT JOIN tv_show_genres
ON tv_genres.id = tv_show_genres.genre_id
GROUP BY tv_genres.name
ORDER BY number_of_shows DESC... |
<reponame>kleinschrader/GlassLine<gh_stars>0
-- Create the main data base
CREATE DATABASE glassline;
USE glassline;
-- UUID_TO_BIN replacement functions
DELIMITER //
CREATE FUNCTION UuidToBin(_uuid BINARY(36))
RETURNS BINARY(16)
LANGUAGE SQL DETERMINISTIC CONTAINS SQL SQL SECURITY INVOKER
RETURN
UNHEX(... |
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [FF].[uspPlayerSave]
(
@ManagerId int,
@PlayerId int,
@Year int,
@Name varchar(100),
@Position varchar(10),
@NFLTeam varchar(3),
@Age int,
@Experience int,
@DepthChart int,
@Keywords varchar(1000),
@Comments varchar(1000)
)
AS
IF @Playe... |
/****** Object: Table [dbo].[wim_MailTemplates] Script Date: 4/24/2018 9:25:54 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[wim_MailTemplates](
[MailTemplate_Key] [int] IDENTITY(1,1) NOT NULL,
[MailTemplate_GUID] [uniqueidentifier] NOT NULL,
[MailTemplate_Name] [nvarchar](50)... |
-- due to a bug in DbUp, 'delimiter' may not start at the very first character in a line...
delimiter $$
DROP PROCEDURE IF EXISTS `up`$$
CREATE PROCEDURE up()
BEGIN
SET @version := (
SELECT `value`
FROM `canonndb_metadata`
WHERE `name` = 'version'
);
SET @newVersion = 3;
IF @version < @newVersion THEN
-- STAR... |
<reponame>Shuttl-Tech/antlr_psql<gh_stars>10-100
-- file:updatable_views.sql ln:926 expect:true
SELECT table_name, column_name, is_updatable
FROM information_schema.columns
WHERE table_name = 'rw_view2'
ORDER BY ordinal_position
|
/*
Navicat Premium Data Transfer
Source Server : mysql
Source Server Type : MySQL
Source Server Version : 80016
Source Host : localhost:3306
Source Schema : mall
Target Server Type : MySQL
Target Server Version : 80016
File Encoding : 65001
Date: 19/08/2021 10:30:37
... |
create table avatars(
id bigserial auto_increment,
photo_url varchar(8000),
primary key (id)
);
create table courses(
id bigserial auto_increment,
name varchar(255),
primary key (id)
);
create table otus_students(
id bigserial auto_increment,
name varchar(255),
avatar_id bigint ref... |
<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 08, 2021 at 10:35 PM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 8.0.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHAR... |
CREATE TABLE EMP(EMP_ID INT, EMP_NAME VARCHAR(120));
CREATE TABLE DEPT (DEPT_ID INT, DNAME VARCHAR(80));
CREATE TABLE ASSIGN (EMPID INT, DEPT_ID INT);
|
<reponame>LightosLimited/RailML
CREATE TABLE [dbo].[TSignalSpeed]
(
--From MergedXSDs XSD
--From 'genericRailML' Namespace
[TSignalSpeedId] SMALLINT NOT NULL,
[SpeedChangeRef] BIGINT NOT NULL,
[Kind] NVARCHAR(MAX) NOT NULL,
[TrainRelation]NVARCHAR(MAX) NOT NULL,
CONSTRAINT [PK_TSignalSpeedId] PRIMARY KEY ... |
<reponame>jankytara2/dbt
{{
config(
alias='foo',
materialized='table'
)
}}
select {{ string_literal(this.name) }} as tablename
|
<reponame>UrbanDKK/GoCachecash
-- +migrate Up
CREATE TABLE raw_block (
blockid BLOB PRIMARY KEY NOT NULL,
height INTEGER NOT NULL,
bytes BLOB NOT NULL
);
CREATE TABLE raw_tx (
txid BLOB PRIMARY KEY NOT NULL,
bytes BLOB NOT NULL
);
-- +migrate Down
DROP TABLE raw_tx;
DROP TABLE raw_block;
|
<gh_stars>100-1000
CREATE OR REPLACE FUNCTION test_insert_patchset_commit()
RETURNS SETOF TEXT
LANGUAGE plpgsql
AS $$
DECLARE
test_enterprise CONSTANT enterprises.name%TYPE = 'BigCo';
test_user CONSTANT users.name%TYPE = 'BigCo Chaos Monkey';
test_organization CONSTANT organizations.name%TYPE = 'BigCo Engineering... |
CREATE FUNCTION [map].[Users] ()
RETURNS TABLE
AS
RETURN (
SELECT *, CAST(IIF([PushEndpoint] IS NULL, 0, 1) AS BIT) AS [PushEnabled] FROM [dbo].[Users]
)
|
<filename>test/JDBC/input/BABEL-2079.sql<gh_stars>100-1000
create schema error_mapping;
GO
CREATE TABLE t3616(id int);
GO
CREATE TRIGGER t3616Trigger
ON t3616
AFTER INSERT
AS
BEGIN
BEGIN TRY
BEGIN TRAN
INSERT INTO t3616 VALUES (2)
COMMIT TRAN
END TRY
BEGIN C... |
/* pref table holds data managed by Krang::Preference */
DROP TABLE IF EXISTS pref;
CREATE TABLE pref (
id VARCHAR(255) NOT NULL PRIMARY KEY,
value VARCHAR(255) NOT NULL
);
INSERT INTO pref (id, value) VALUES ("search_page_size", "20");
INSERT INTO pref (id, value) VALUES ("use_autocomplete", "1"... |
<filename>software/cabio-database/scripts/sql_loader/no_longer_used/constraints/marker_relative_location.enable.sql
/*L
Copyright SAIC
Distributed under the OSI-approved BSD 3-Clause License.
See http://ncip.github.com/cabio/LICENSE.txt for details.
L*/
create unique index SYS_C0021123_idx on MARKER_R... |
--
-- ALTER_TABLE
-- add attribute
--
CREATE TABLE tmp (initial int4);
ALTER TABLE tmp ADD COLUMN a int4;
ALTER TABLE tmp ADD COLUMN b name;
ALTER TABLE tmp ADD COLUMN c text;
ALTER TABLE tmp ADD COLUMN d float8;
ALTER TABLE tmp ADD COLUMN e float4;
ALTER TABLE tmp ADD COLUMN f int2;
ALTER TABLE tmp ADD COLUMN ... |
-- Gracia final fateWhisper update
-- Delete me when new conds are finished
UPDATE `character_quests` SET `value` = 12 WHERE (`name` = '234_FatesWhisper' AND `value` = 10);
UPDATE `character_quests` SET `value` = 11 WHERE (`name` = '234_FatesWhisper' AND `value` = 9);
UPDATE `character_quests` SET `value` = 10 WHERE (`... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 06 Sep 2020 pada 03.00
-- Versi server: 10.4.11-MariaDB
-- Versi PHP: 7.4.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH... |
create index idx_etablissement_siret on etablissement (siret) where version = 0;
create index idx_etablissement_siren on etablissement (siren) where version = 0;
create index idx_etablissement_departement on etablissement (departement) where version = 0;
create index idx_etablissement_naf on etablissement (code_activit... |
-- Table: a00_organization
-- DROP TABLE a00_organization;
CREATE TABLE a00_organization
(
organization_id serial NOT NULL,
"name" character varying(64) NOT NULL DEFAULT 'new organization'::character varying,
description character varying(256) NOT NULL DEFAULT 'new organization'::character varying,
logo oid N... |
<reponame>sr70079/surf-weasel<gh_stars>0
drop database if exists userinfo_db;
create database userinfo_db;
|
CREATE DATABASE IF NOT EXISTS `autodealerdb` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `autodealerdb`;
-- MySQL dump 10.13 Distrib 8.0.27, for Win64 (x86_64)
--
-- Host: localhost Database: autodealerdb
-- ------------------------------------------... |
<reponame>EddyChavez/PAAEBACK<filename>database/scripts/creditos complementarios/esquema_inicial.sql
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/*Tabla para registrar los lineamientos generales*/
CREATE TABLE [dbo].[LINEAMIENTOS](
[PK_LINEAMIENTO] [int] IDENTITY(1,1) NOT NULL,
[NOMBRE] [nvarchar](255) NOT NULL,... |
USE EmployeeTracker;
INSERT INTO
department (name)
VALUES
("Executive"),
("Sales"),
("eCommerce"),
("IT"),
("Marketing");
INSERT INTO
role (title, salary, department_id)
VALUES
("CEO", 1500000, 1),
("VP of Sales", 400000, 2),
("eCommerce Manager", 250000, 3),
("CTO", 450000, 4),
("VP of Marketin... |
<reponame>skygreen2001/Betterlife.Net<filename>Other/SyncDatabase/dbo/Tables/Functions.sql
CREATE TABLE [dbo].[Functions] (
[ID] UNIQUEIDENTIFIER CONSTRAINT [DF_Functions_ID] DEFAULT (newid()) NOT NULL,
[Url] NVARCHAR (500) NULL,
[Committime] DATETIME CONSTRAINT [DF_Functions_Commi... |
INSERT INTO stock(symbol, name, market, currency, country, status, created, updated) VALUES('aapl','Apple Inc.','NMS', 'USD', 'USA', 'active', NOW(), NOW());
INSERT INTO stock(symbol, name, market, currency, country, status, created, updated) VALUES('abc','AmerisourceBergen Corporation C','NYQ', 'USD', 'USA', 'active',... |
CREATE OR REPLACE FUNCTION Receive_Message(OUT DeliveryReceipt text, _Ciphertext text) RETURNS TEXT AS $BODY$
DECLARE
_Cipherdata bytea;
_MessageID text;
_MessageType text;
_EncryptionKeyID text;
_SignatureKeyID text;
_Plaintext text;
_DeliveryReceipt bytea;
_SecretKey bytea;
_PublicKey bytea;
_MessageData bytea;
_OK b... |
-- More columns for new soil moisture sensor
ALTER TABLE flux_data add vwc real;
ALTER TABLE flux_data add ec real;
ALTER TABLE flux_data add t real;
ALTER TABLE flux_data add p real;
ALTER TABLE flux_data add pa real;
ALTER TABLE flux_data add vr real;
|
<filename>content/berkas/sql/3404_1477245059.sql
INSERT INTO tweb_apbd(`rangkuman`,`berkas_id`,`lembaga_id`, `lembaga_kode`,`pemda_kode`, `wilayah_kode`,`tahun`, `rekening_kode`,`rekening`, `uraian`, `nominal`,`nominal_sebelum`, `nominal_sesudah`, `nominal_perubahan`, `nominal_persen`, `keterangan`, `created_by`, `upda... |
CREATE TABLE email_confirm (
id SERIAL PRIMARY KEY,
new_email VARCHAR(100) NOT NULL,
session_code VARCHAR NOT NULL,
verification_code CHAR(6) NOT NULL,
user_id SERIAL NOT NULL,
created_at TIMESTAMP NOT NULL,
CONSTRAINT fk_user_id FOREIGN KEY (user_id) REFERENCES users (id)
);
|
-- file:foreign_data.sql ln:61 expect:true
ALTER FOREIGN DATA WRAPPER foo OPTIONS (SET c '4')
|
CREATE DATABASE IF NOT EXISTS `weichu_youdianpu_db` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `weichu_youdianpu_db`;
-- MySQL dump 10.13 Distrib 5.7.17, for macos10.12 (x86_64)
--
-- Host: 127.0.0.1 Database: weichu_youdianpu_db
-- ------------------------------------------------------
-- Server version 5.7.22
... |
CREATE TABLE IF NOT EXISTS `airports` (
`id` int(10) NOT NULL DEFAULT '0',
`coordinates` point NOT NULL,
`name_international` varchar(255) DEFAULT NULL,
`name_local` varchar(255) DEFAULT NULL,
`language` varchar(3) DEFAULT NULL,
`name_short` varchar(255) DEFAULT NULL,
`continent` varchar(2) DEFAULT NULL,
... |
-- LOAD DATA
USE dota2_datawarehouse;
LOAD data INFILE '/var/lib/mysql-files/matchs.csv' INTO TABLE matchs fields TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n' IGNORE 1 rows;
LOAD data INFILE '/var/lib/mysql-files/heroes.csv' INTO TABLE heroes fields TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\... |
<gh_stars>0
CREATE SCHEMA IF NOT EXISTS ${0} |
select
id as service_class_id,
condition as query_conditions,
case
when id between 1 and 4 then 'Redshift Reserved Service Class'
when id = 5 then 'Redshift Superuser Query Queue'
when id > 5 then 'WLM Query Queue'
else null
end as service_class_type
from stv_wlm_classification_config
|
<filename>sql/derived_tables/loans_renewal_count.sql
DROP TABLE IF EXISTS folio_reporting.loans_renewal_count;
-- Create a derived table that contains all items from inventory_items
-- and adds circulation info (total loans and renewals) from
-- circulation_loans; add in a date to show when the report was last
-- run ... |
<reponame>MickeVr/utPLSQL
create or replace package test_annot_throws_exception
is
--%suite(annotations - throws)
--%suitepath(utplsql.ut3_tester.core.annotations)
--%beforeall
procedure recollect_tests_results;
--%test(Gives success when annotated number exception is thrown)
procedure throws_same_a... |
<reponame>wangsikai/learn
## 根据班级id及知识点列表查找数据
#macro($findByCodesAndClass(classId,codes))
SELECT t.* FROM diagno_class_kp t WHERE t.class_id = :classId AND t.knowpoint_code IN :codes GROUP BY t.class_id, t.knowpoint_code
#end
## 查找薄弱知识点
#macro($findByWeakDatas(classId,limit,bt,kps))
SELECT t.* FROM diagno_class_kp t W... |
-- name: create-table-cards
CREATE TABLE IF NOT EXISTS cards (
card_id INTEGER PRIMARY KEY AUTO_INCREMENT
,card_build INTEGER
,card_stage INTEGER
,card_step INTEGER
,card_schema TEXT
,card_data TEXT
);
-- name: create-index-cards-card-build
CREATE INDEX ix_ca... |
<filename>DB/yii2basic.sql
-- phpMyAdmin SQL Dump
-- version 4.4.15.7
-- http://www.phpmyadmin.net
--
-- Хост: 127.0.0.1:3306
-- Время создания: Окт 19 2019 г., 13:06
-- Версия сервера: 5.5.50-log
-- Версия PHP: 7.0.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_C... |
<gh_stars>0
/*PGR-GNU*****************************************************************
Copyright (c) 2015 pgRouting developers
Mail: <EMAIL>
Author: <NAME>, 2013
------
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Soft... |
<reponame>krizalys/inspeql
-- {{{ table_name }}}
IF OBJECT_ID('tempdb..#{{{ staging_table_name }}}') IS NOT NULL
DROP TABLE #{{{ staging_table_name }}}
SELECT
{{ #fields }}
{{{ . }}}
{{ /fields }}
INTO #{{{ staging_table_name }}}
FROM {{{ table_name }}} AS {{ table_alias }}
{{{ joins }}}
WHERE {{{ conditions }}}
... |
<gh_stars>10-100
SELECT
Origin,
count(*) AS num_departures
FROM ontime
WHERE
DepDelay > 10
AND
Year_ BETWEEN 2000 AND 2008
GROUP BY Origin
ORDER BY num_departures DESC
LIMIT 10;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.