sql stringlengths 6 1.05M |
|---|
-- --------------------------------------------------------------------
--
-- orc_uninstall.sql
--
-- Remove ORC format in pluggable storage framework
--
-- --------------------------------------------------------------------
SET allow_system_table_mods=ddl;
DROP FUNCTION IF EXISTS pg_catalog.orc_validate_interface... |
<filename>schemas/reference/V16__bflocationtype.sql<gh_stars>0
CREATE TABLE bflocationtype (
id UUID NOT NULL PRIMARY KEY,
seaport BOOLEAN NOT NULL,
railterminal BOOLEAN NOT NULL,
airport BOOLEAN NOT NULL,
postexchange BOOLEAN NOT NULL,
multimodal BOOLEAN NOT NULL,
fixedtransport BOOLEAN NOT NULL,
borde... |
<filename>Reindex_InstallScript.sql
--------------------------------------------------
-- VARIABLES -------------------------------------
-- CHANGE BELLOW IN WHOLE SCRIPT BEFORE EXECUTE --
-- CTRL + H --------------------------------------
--------------------------------------------------
-- N'sa' =... |
<gh_stars>0
-- user management
create table users (
USER_NAME varchar(15) not null primary key,
USER_PASSWD varchar(15) not null
);
insert into users (USER_NAME, USER_PASSWD) values('<PASSWORD>','<PASSWORD>');
insert into users (USER_NAME, USER_PASSWD) values('<PASSWORD>','<PASSWORD>');
create ta... |
<filename>migrations/sqls/20220312024630-orders-books-table-up.sql<gh_stars>0
CREATE TABLE order_books (
id SERIAL PRIMARY KEY,
quantity integer,
order_id bigint REFERENCES orders(id),
book_id bigint REFERENCES books(id)
); |
-- # ASSIGNMENT-5 # --
--USE EMPLOYEE
SELECT EMP.EMPID, NAME, CITY, DOJ, DEPT, SALARY
FROM EMP
INNER JOIN EMPSAL
ON EMP.EMPID=EMPSAL.EMPID
WHERE CITY = 'DELHI';
--------------------
SELECT EMP.EMPID, NAME, ADDR, CITY, PHNO, EMAIL, DOB FROM EMP
LEFT JOIN EMPSAL
ON EMP.EMPID = EMPSAL.EMPID
WHERE EMP... |
DROP TRIGGER lexeme_delete_trigger ON thoughts;
--;;
DROP FUNCTION delete_thought_lexeme(); |
CREATE TABLE [dbo].[hlsysassociation]
(
[associationid] INT NOT NULL CONSTRAINT [CK_hlsysassociation_idc_zr] CHECK ([associationid] > 0), -- see Bug_106197
[associationdefid] INT NOT NULL,
[objectida] INT NOT NULL CONSTRAINT [CK_hlsysassociation_ida_zr] CHECK ([objectida] > 0),
[objectdefida] INT NOT NULL,
[objec... |
<filename>procedures/recompile.sql
CREATE OR REPLACE PROCEDURE recompile (
in_name VARCHAR2 := '%',
in_type VARCHAR2 := '%',
in_level NUMBER := 2,
in_interpreted BOOLEAN := TRUE,
in_identifiers BOOLEAN := TRUE,
i... |
<filename>samples/Demo/Beef.Demo.Database/Schema/DemoCdc/Stored Procedures/Generated/spCompletePersonCdcOutbox.sql
CREATE PROCEDURE [DemoCdc].[spCompletePersonCdcOutbox]
@OutboxId INT,
@TrackingList AS [DemoCdc].[udtCdcTrackingList] READONLY
AS
BEGIN
/*
* This is automatically generated; any changes will be lo... |
<filename>application/wei_site/uninstall.sql<gh_stars>0
DELETE FROM `wp_model` WHERE `name`='custom_reply_news' ORDER BY id DESC LIMIT 1;
DROP TABLE IF EXISTS `wp_custom_reply_news`;
DELETE FROM `wp_model` WHERE `name`='weisite_cms' ORDER BY id DESC LIMIT 1;
DROP TABLE IF EXISTS `wp_weisite_cms`;
|
<gh_stars>1-10
SELECT *
FROM (
SELECT item_sk
,d_date
,web_sales
,store_sales
,MAX(web_sales) AS web_cumulative
,MAX(store_sales) AS store_cumulative
FROM (
SELECT CASE
WHEN web.item_sk IS NOT NULL
THEN web.item_sk
ELSE store.item_sk
END item_sk
,CASE
WHEN web.d_da... |
<gh_stars>1-10
/*
Navicat MySQL Data Transfer
Source Server : 本地
Source Server Version : 50718
Source Host : localhost:3306
Source Database : puppet
Target Server Type : MYSQL
Target Server Version : 50718
File Encoding : 65001
Date: 2017-09-23 14:59:50
*/
SET FOREIGN_KEY_CHECKS=0... |
<filename>src/main/resources/db/migration/V2__resources.sql<gh_stars>10-100
DROP
TABLE IF EXISTS resources;
CREATE TABLE resources (
id BIGSERIAL PRIMARY KEY NOT NULL,
deployment_id BIGINT NOT NULL,
kind VARCHAR NOT NULL,
ref VARCHAR NOT ... |
{%- macro relative_change(x_0, x_N) -%}
{#-/* Computes the relative change between `x_0` and `x_N` values
ARGS:
- x_0 (numeric) is the initial value
- x_N (numeric) is the final value
RETURNS: the relative change between `x_0` and `x_N` (numeric)
SUPPORTS:
- All (p... |
DROP MATERIALIZED VIEW IF EXISTS trip.export;
|
<gh_stars>10-100
CREATE FUNCTION public.drop_fk_except_for(tables_in character varying[]) RETURNS SETOF character varying
LANGUAGE plpgsql
AS $$
DECLARE
BEGIN
-- aaa
END;
$$; |
/* Copyright 2001, 2019 IBM Corporation
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
* following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the
* following d... |
CREATE TABLE IF NOT EXISTS `user_jobs` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`user_id` int(10) UNSIGNED NOT NULL,
`job_id` int(10) UNSIGNED NOT NULL,
`job_level` int(10) UNSIGNED NOT NULL,
`created_at` DATETIME NOT NULL,
`updated_at` DATETIME NOT NULL,
PRIMARY KEY (`id`)
) ENG... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 23, 2020 at 09:29 AM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 7.4.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 05, 2020 at 09:56 AM
-- 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... |
<filename>db/queries/tables/league-tables-ordered.sql
SELECT * FROM league_tables
ORDER BY gameweek_id
, focus DESC
, points DESC
, goal_difference DESC
, "for" DESC
, team_name; |
<filename>V1/Database/Stored Procedures/FF.uspDraftGetNextPick.sql
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [FF].[uspDraftGetNextPick]
(
@LeagueId int,
@Year int
)
AS
DECLARE @NextPick int, @NextRound int, @NextTeam int, @Rounds int, @Teams int
DECLARE @picks TABLE (NextPick int not null)
... |
<gh_stars>0
-- Todo Items
insert into TodoItems (Title, Description, IsDone)
values ('Water flowers','Give the flowers water',false),
('Work out','Go on a running tour',true),
('Go to sleep','Go to bed early', false),
('Drink much water','Try to drink much water',false);
-- Students
insert into Students (Name... |
<filename>dinesykmeldte-backend/src/main/resources/db/V1__create_sykmelding_soknad_tables.sql
CREATE TABLE narmesteleder (
narmeste_leder_id VARCHAR primary key not null,
pasient_fnr VARCHAR not null,
leder_fnr VARCHAR not null,
orgnummer VARCHAR not null
);
CREATE TABLE sykmelding (
sykmelding_id ... |
-- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 07, 2020 at 04:16 AM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
create schema if not exists backups;
create table backups.hosts (
id serial primary key,
host text not null,
port int default 5432,
cluster_name text not null,
archiver_name text[2] not null,
bareos_on text default 'archive_1',
keep_backups_cnt text not null,
periodicity_days int not null,
directory ... |
# q1.sql — http://www4.wiwiss.fu-berlin.de/bizer/BerlinSPARQLBenchmark/spec/index.html#queryTripleQ1
# $Id: q1.sql,v 1.1 2008-11-16 14:06:36 eric Exp $
#
# substitutions:
# @ProductType@=59
# @ProductFeature1@=5
# @ProductFeature2@=7
# @x@=578
SELECT distinct nr, label
FROM product AS p
INNER JOIN produc... |
CREATE TYPE [dbo].[Corruption] AS TABLE (
[SourceTable] TINYINT NOT NULL,
[database_id] INT NOT NULL,
[last_update_date] DATETIME NOT NULL);
|
<gh_stars>1-10
/*
--------------------------------------------------------------------
© 2017 sqlservertutorial.net All Rights Reserved
--------------------------------------------------------------------
Name : BikeStores
Link : http://www.sqlservertutorial.net/load-sample-database/
Version: 1.0
-----------... |
DELETE FROM `m_permission` WHERE code in ('UNDOTRANSACTIONBATCHTRX_SAVINGSACCOUNT');
INSERT INTO `m_permission` (`id`, `grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES
(NULL, 'portfolio', 'UNDOTRANSACTIONBATCHTRX_SAVINGSACCOUNT', 'SAVINGSACCOUNT', 'UNDOTRANSACTIONBATCHTRX', '1'); |
<reponame>DataWorkbench/account<gh_stars>0
CREATE TABLE IF NOT EXISTS `flink_cluster` (
-- Workspace id it belongs to
`space_id` CHAR(20) NOT NULL,
-- Cluster ID, unique within a region
`id` CHAR(20) NOT NULL,
-- Cluster Name, Unique within a workspace
-- The max length of use set is 128. The... |
<gh_stars>1-10
INSERT INTO SessionPlanet
(PlanetId, Exhausted)
VALUES ({0},{1}); |
-- Database: mssql
-- Change Parameter: columns=[column:[
-- name="id"
-- type="int"
-- ], ]
-- Change Parameter: tableName=person
CREATE INDEX ON [person]([id]);
|
DROP TABLE IF EXISTS view_proposal_validators;
DROP INDEX IF EXISTS view_proposal_validators_initial_delegator_address_btree_index;
DROP INDEX IF EXISTS view_proposal_validators_initial_delegator_address_btree_index;
|
ALTER TABLE `member_investments` ADD `deposit_amount` FLOAT(10,2) NULL DEFAULT NULL AFTER `start_ammount`;
CREATE TABLE IF NOT EXISTS `plans` (
`id` int(11) NOT NULL,
`name` varchar(20) NOT NULL,
`status` tinyint(1) DEFAULT '0',
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`created_by` int(11) NO... |
<filename>db/insert_scripts/insert_person.sql
-- <NAME>
-- february 26 2022
-- insert peron
USE [CapstoneRecipeDatabase]
GO
INSERT INTO [dbo].[Person]
([Id]
,[AccountTypeId]
,[FirstName]
,[LastName]
,[Email]
,[EmailUpdates]
,[EmailNewsletter]... |
-- This file should undo anything in `up.sql`
drop TABLE votes;
drop TABLE user_invite_locks;
drop TABLE user_invites;
drop TABLE proposals;
drop TABLE polls;
drop TYPE progress; |
<filename>src/main/resources/data.sql
INSERT INTO USUARIO (USUARIO_ID, USERNAME, PASSWORD, FIRSTNAME, LASTNAME, EMAIL, ENABLED, LASTPASSWORDRESETDATE) VALUES (100, 'admin', <PASSWORD>', 'admin', 'admin', '<EMAIL>', 1, PARSEDATETIME('01-01-2016', 'dd-MM-yyyy'));
INSERT INTO USUARIO (USUARIO_ID, USERNAME, PASSWORD, FIRST... |
<reponame>suru-works/Surgases<gh_stars>0
DELIMITER $$
CREATE OR REPLACE PROCEDURE proc_cliente_consultar_ultimo_pedido (IN cliente_telefono TYPE OF cliente.telefono)
READS SQL DATA
BEGIN
DECLARE fup TYPE OF pedido.fecha;
DECLARE nup TYPE OF pedido.numero;
SELECT fecha_ultimo_pedido, numero_ultimo_pedido INTO fup,... |
-- Drop all tables and views created for the HR database example
DROP VIEW HR.OPA_EMPLOYEES_VIEW;
DROP VIEW HR.OPA_LOCATIONS_VIEW;
DROP VIEW HR.OPA_DEPARTMENTS_VIEW;
DROP TABLE HR.OPA_EMPLOYEES;
DROP TABLE HR.OPA_LOCATIONS;
DROP TABLE HR.OPA_DEPARTMENTS;
|
<reponame>geophile/sql-layer
SELECT artists.* FROM artists
INNER JOIN artists AS b ON (b.id = artists.id)
WHERE (artists.id IN (
SELECT join_albums_artists.artist_id FROM join_albums_artists
WHERE ((join_albums_artists.album_id IN (
SELECT albums.id FROM albums
... |
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 15-02-2019 a las 02:57:39
-- Versión del servidor: 10.1.35-MariaDB
-- Versión de PHP: 7.2.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... |
-- add type on node
alter table node add(
"PLATFORMTYPE" VARCHAR2(255)
) ;
update node set platformtype='JBOSS' where platformtype is null;
alter table node_aud add(
"PLATFORMTYPE" VARCHAR2(255)
) ;
update node_aud set platformtype='JBOSS' where platformtype is null;
|
UPDATE census SET "the_geom" = ST_SetSRID(ST_Point("INTPTLON", "INTPTLAT"), 4269); |
BEGIN;
ALTER TABLE players DROP COLUMN role;
DROP TYPE enum_player_role;
COMMIT;
|
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
-- --------------------------------------------------------
-- Table structure for table `networknotice`
--
CREATE TABLE IF NOT EXISTS `networknotice` (
`notice_id` int(11) NOT NULL AUTO_INCREMENT,
`label` tinyblob NOT NULL,
`wiki` blob NOT NULL... |
<filename>modules/Blogs/meta/install_db/posts/MySQLi.sql
CREATE TABLE IF NOT EXISTS `[prefix]blogs_posts` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`user` bigint(20) unsigned NOT NULL,
`date` bigint(20) unsigned NOT NULL,
`title` varchar(1024) NOT NULL,
`path` varchar(255) NOT NULL,
`content` medi... |
----------------------- Buffer usage count distribution -----------------------
SELECT
c.relname,
count(*) AS buffers
FROM pg_class c
INNER JOIN pg_buffercache b
ON b.relfilenode=c.relfilenode
INNER JOIN pg_database d
ON (b.reldatabase=d.oid AND d... |
USE [master]
GO
-- remove listener that exists previously
ALTER AVAILABILITY GROUP [ag1]
REMOVE LISTENER N'ag-node000';
GO
-- create listener that maps to the listener of the primary replica IP to use for read-routing
ALTER AVAILABILITY GROUP [ag1]
ADD LISTENER N'ag-node000' (
WITH IP
((N'10.0.0.4', N'255.255.240.0')... |
<gh_stars>10-100
DROP TABLE "public"."votes";
|
<reponame>Kcjohnson/SCGP
/*
Build a squared gene x subject matrix for heatmap plotting
1. Get selected tumor pairs as described elsewhere (`selected_tumor_pairs`)
- reduce this list to a list of aliquots, combining (a) and (b) into a single column (`selected_aliquots`). This list is only used for coverage
2. Select a ... |
<gh_stars>100-1000
DELETE FROM "t_2uhu4szs1kq";
INSERT INTO "t_2uhu4szs1kq" ("id", "created_at", "updated_at", "sort", "created_by_id", "updated_by_id", "f_hwenour8ara", "f_hznqtmqljb2", "f_u4i0jrp4uo6", "f_l8uuiwcnlw9") VALUES
(1, '2021-09-03 08:19:53.163+00', '2021-09-18 07:50:34.039+00', 70, 1, 1, '这是我们要做的任务这是我们要做的'... |
SELECT FILE#, BLOCK#, MARKED_CORRUPT, CORRUPTION_TYPE
FROM V$BACKUP_CORRUPTION; |
<gh_stars>0
/*
Navicat MySQL Data Transfer
Source Server : sirenDB
Source Server Type : MySQL
Source Server Version : 50717
Source Host : localhost
Source Database : bookstore
Target Server Type : MySQL
Target Server Version : 50717
File Encoding : utf-8
Date: 06/16/20... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 09-02-2021 a las 14:42:35
-- Versión del servidor: 10.4.14-MariaDB
-- Versión de PHP: 7.4.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
CREATE TABLE files (
id bigint NOT NULL,
access_salt text NOT NULL,
s3_upload_key text NOT NULL,
is_uploaded boolean default false NOT NULL,
PRIMARY KEY (id)
);
CREATE INDEX on files(s3_upload_key);
CREATE TABLE file_parts (
file_id bigint NOT NULL,
number int NOT NULL,
size int NOT NULL,
s3_upload_... |
-- EqualTo
select 1 = 1;
select 1 = '1';
select 1.0 = '1';
select 1.5 = '1.51';
-- GreaterThan
select 1 > '1';
select 2 > '1.0';
select 2 > '2.0';
select 2 > '2.2';
select '1.5' > 0.5;
select to_date('2009-07-30 04:17:52') > to_date('2009-07-30 04:17:52');
select to_date('2009-07-30 04:17:52') > '2009-07-30 04:17:52';... |
<reponame>fanrice123/qut-meditation
-- MySQL dump 10.16 Distrib 10.1.16-MariaDB, for Win32 (AMD64)
--
-- Host: localhost Database: meditation
-- ------------------------------------------------------
-- Server version 10.1.16-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @O... |
DELETE FROM dbo."Rev";
INSERT INTO dbo."Rev" (a, b) VALUES (:a, :b);
|
insert into role (name, description) values ('Root', '');
insert into role (name, description) values ('Admin', '');
insert into role (name, description) values ('Edit', '');
insert into role (name, description) values ('View', '');
insert into role (name, description) values ('Comment', '');
insert into groups (name,... |
create procedure viw.sUserUpdate
(
@UserId int,
@Email nvarchar(64)
)
as
begin
update viw.tUser
set Email = @Email
where UserId = @UserId;
return 0;
end; |
SELECT
g.name,
g.run_date,
AVG(g.toxic_index) AS avg_toxic_index,
MAX(g.stddev_toxic_index) AS stddev_toxic_index
FROM (
SELECT
f.name,
f.run_date,
f.run_hour,
f.toxic_index,
stddev(f.toxic_index) OVER (
PARTITION BY f.name, f.run_date
) A... |
<reponame>PhotoVoltaicMage/AutoFuelAndService
/**
* Author: <NAME>
* Created: May 14, 2020
*/
-- CONNECT TO DATABASE
--CONNECT 'jdbc:derby://localhost:1527/%DERBY_DB_HOME%/FuelEcoService;create=true;user=DMK;password=<PASSWORD>';
AUTOCOMMIT OFF;
--------------------------------------------------------
-- REMOVE S... |
<gh_stars>0
INSERT INTO kirushizm (id, txt, created, accepted, creator)
VALUES (1, 'В петушиную баню не пойду, лучше в бан.', '2019-02-12 21:23:25.671000', true, 'Александр Шахов');
INSERT INTO kirushizm (id, txt, created, accepted, creator)
VALUES (2, 'Я в чужие пиздецы не лезу, мне своих хватает.', '2019-02-12 21:40:... |
<filename>Queries/Employee_Database_Challenge.sql<gh_stars>0
--Deliverable 1, Retiring Employees by Title--
--D1, retirement titles
SELECT
e.emp_no,
e.first_name,
e.last_name,
t.title,
t.from_date,
t.to_date
INTO retirement_titles
FROM employees AS e
INNER JOIN titles AS t
ON (e.emp_no = t.emp_no)
WHERE e.birth_... |
<filename>KInspector.Modules/Scripts/UnusedTemplatesModule.sql<gh_stars>0
SELECT PageTemplateDisplayName,PageTemplateCodeName, PageTemplateType, PageTemplateDescription
FROM CMS_PageTemplate
WHERE PageTemplateID not in (SELECT DISTINCT NodeTemplateID FROM View_CMS_Tree_Joined WHERE NodeTemplateID is not NULL)
AN... |
EXEC [EST].[Proc_yjbb_Ins] @Code = N'600744',@CutoffDate = N'2017-09-30',@EPS = N'-0.33',@EPSDeduct = N'0',@Revenue = N'55.79亿',@RevenueYoy = N'38.96',@RevenueQoq = N'66.48',@Profit = N'-5.87亿',@ProfitYoy = N'-12682.23',@ProfiltQoq = N'53.02',@NAVPerUnit = N'1.9961',@ROE = N'-15.26',@CashPerUnit = N'0.2703',@GrossProfi... |
-- Query the total population of all cities in CITY where District is California.
-- Input Format
-- The CITY table is described as follows:
/*
Enter your query here.
Please append a semicolon ";" at the end of the query and enter your query in a single line to avoid error.
*/
SELECT SUM(POPULATION) FROM CITY WHE... |
<filename>chapter02/druid-demo/src/main/resources/schema.sql
create table foo(id int identity, bar varchar(64));
insert into foo(id, bar) values (1, 'AAA'); |
DROP TABLE IF EXISTS priljubljene;
DROP TABLE IF EXISTS nepremicnine;
DROP TABLE IF EXISTS agencije;
DROP TABLE IF EXISTS regije;
DROP TABLE IF EXISTS uporabniki;
CREATE TABLE regije (
id serial PRIMARY KEY,
regija text NOT NULL
);
CREATE TABLE agencije (
id serial PRIMARY KEY,
agencija text NOT NULL
);
CREA... |
<reponame>jdkoren/sqlite-parser
-- misc5.test
--
-- execsql {SELECT .1 }
SELECT .1 |
<reponame>OpenPerpetuum/OPDB-docs<filename>Patches/Live_13/Raw_SQL/EntityDef_outpostDecay__2019_09_08.sql<gh_stars>1-10
USE [perpetuumsa]
GO
--------------------------------------------
--Outpost Decay Definition
--A definition for valid intrusion events and logs
--
--Date Modified: 2019/09/08
------------------------... |
<reponame>scossin/Achilles
-- 500 Number of persons with death, by cause_concept_id
--HINT DISTRIBUTE_ON_KEY(stratum_1)
SELECT
500 AS analysis_id,
CAST(d.cause_concept_id AS VARCHAR(255)) AS stratum_1,
CAST(NULL AS VARCHAR(255)) AS stratum_2,
CAST(NULL AS VARCHAR(255)) AS stratum_3,
CAST(NULL AS VARCHAR(255)) AS... |
select id, id_estudiante, id_profesor, fecha, valor from clase |
<filename>libs/sdc_etl_libs/sql/Ultipro/rest_apis/CREATE_TABLE_restapi_employee_job_history_details.sql
create table "RESTAPI_EMPLOYEE_JOB_HISTORY_DETAILS_PII"
(
"ANNUALSALARY" float,
"COMPANYID" varchar,
"DATETIMECREATED" datetime,
"EMPLOYEEID" ... |
select name from member where id in (select member_id from checkout_item group by member_id having count(member_id) > 1);
|
insert
into
Customer
(created_on, firstName, lastName, id)
values
(?, ?, ?, ?)
-- binding parameter [1] as [TIMESTAMP] - [Thu Jul 27 15:45:00 EEST 2017]
-- binding parameter [2] as [VARCHAR] - [John]
-- binding parameter [3] as [VARCHAR] - [Doe]
-- binding parameter [4] as [BIGINT] - [1]
insert
int... |
CREATE SCHEMA IF NOT EXISTS cbv;
CREATE TABLE IF NOT EXISTS cbv.masterdata
(
id character varying(128) COLLATE pg_catalog."default" NOT NULL,
type character varying(128) COLLATE pg_catalog."default" NOT NULL,
created_on timestamp without time zone NOT NULL DEFAULT timezone('UTC'::text, now()),
last_upd... |
IF EXISTS(SELECT 'True' FROM msdb.dbo.sysjobs WHERE name = 'DOI - Refresh Metadata')
BEGIN
EXEC msdb.dbo.sp_delete_job @job_name = N'DOI - Refresh Metadata' ;
PRINT 'Deleted Job DOI - Refresh Metadata.'
END
GO
BEGIN TRY
BEGIN TRANSACTION
DECLARE @ReturnCode INT
SELECT @ReturnCode = 0
/****** Object: Jo... |
drop table s_warehouse;
create table s_warehouse as
(select W_WAREHOUSE_ID WRHS_WAREHOUSE_ID
,W_WAREHOUSE_name WRHS_WAREHOUSE_DESC
,W_WAREHOUSE_SQ_FT WRHS_WAREHOUSE_SQ_FT
from warehouse
where rownum < 10);
|
ALTER DATABASE DEFAULT SET JavaBinaryForUDx = '/usr/java/latest/bin/java';
CREATE OR REPLACE LIBRARY verticajavaudl AS '/tmp/vertica-java-udl-0.1-jar-with-dependencies.jar' language 'java';
CREATE OR REPLACE PARSER XmlParser AS LANGUAGE 'java' NAME 'com.bryanherger.udparser.XmlParserFactory' LIBRARY verticajavaudl;
C... |
ALTER TABLE scans ADD date_updated DATETIME COMMENT 'The date that this scan was last updated' AFTER date_created;
ALTER TABLE scanned_page ADD num_errors INT COMMENT 'The total number of errors found';
ALTER TABLE scanned_page ADD num_notices INT COMMENT 'The total number of notices found'; |
<filename>database/migrations/2015_05_05_210603_users_password_imageurl/up.sql
ALTER TABLE users
ALTER COLUMN password DROP NOT NULL;
ALTER TABLE users
ADD COLUMN image_url character varying(255); |
<filename>db.sql
-- --------------------------------------------------------
-- Host: localhost
-- Server version: 10.4.10-MariaDB - mariadb.org binary distribution
-- Server OS: Win64
-- HeidiSQL Version: 11.0.0.5919
-- ------------------------------... |
<reponame>troygrossi/content-managment-sql-inquirer
CREATE TABLE departments (
department_id INTEGER AUTO_INCREMENT PRIMARY KEY,
department_name VARCHAR(30) NOT NULL
);
CREATE TABLE roles (
role_id INTEGER AUTO_INCREMENT PRIMARY KEY,
role_title VARCHAR(30) NOT NULL,
role_salary INTEGER NOT NULL,
role_depart... |
-- phpMyAdmin SQL Dump
-- version 4.0.9
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Nov 28, 2019 at 09:54 PM
-- Server version: 5.6.14
-- PHP Version: 5.5.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/... |
-- Create PostgreSql table:
-- Table: x01_classcount
-- DROP TABLE x01_classcount;
CREATE TABLE x01_classcount
(
classcount_id serial NOT NULL,
project_idref integer NOT NULL DEFAULT 0,
event_idref integer NOT NULL DEFAULT 0,
person_idref integer NOT NULL DEFAULT 0,
account_idref integer NOT NULL DEFAULT 0... |
INSERT INTO ratings
(brand_id,user_id,score,reason,created,updated)
VALUES
(4,1,90,'++customer service',NOW(),NOW())
,(5,1,95,'++technical excellence',NOW(),NOW())
,(6,1,90,'++customer service',NOW(),NOW())
,(7,1,100,'++purpose',NOW(),NOW())
,(8,1,100,'++purpose',NOW(),NOW())
,(9,1,10,'--sense',NOW(),NOW())
,(10,1,30,'... |
SELECT TOP (10) [user], [score]
from [FlyWithButchOhareDB_Copy].[dbo].[baggagebeltleaderboard] ORDER BY [score] DESC; |
-- Program and Services
SELECT
services.id serviceId, services.serviceName, programs.id programId,
programs.programName
FROM
services
JOIN programs on services.programId = programs.id
;
-- Service payments
SELECT
payments.id paymentId, invoicePayments.amount, JSON_ARRAYAGG(JSON_OBJECT(
'serviceId', invoi... |
ALTER TABLE groups
ALTER COLUMN name TYPE VARCHAR(80),
ALTER COLUMN keycloakgrouppath TYPE VARCHAR(100),
ALTER COLUMN displayname TYPE VARCHAR(100),
ALTER COLUMN CODE TYPE VARCHAR(20); |
-- mallocC.test
--
-- execsql {
-- PRAGMA auto_vacuum=1;
-- CREATE TABLE t0(a, b, c);
-- }
PRAGMA auto_vacuum=1;
CREATE TABLE t0(a, b, c); |
<reponame>Shuttl-Tech/antlr_psql
-- file:alter_table.sql ln:225 expect:true
DROP INDEX onek_unique1_constraint
|
<filename>src/test/java/org/apache/ibatis/submitted/dynsql/CreateDB.sql
--
-- Copyright 2009-2021 the original author or authors.
--
-- 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 ... |
<gh_stars>1-10
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1534030 AND -1534018;
INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES
(-1534018,'All of your efforts have been in vain, for the draining of the World Tree has already begun. Soon the heart of your world wi... |
CREATE DATABASE IF NOT EXISTS `mathdb` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `mathdb`;
-- MySQL dump 10.13 Distrib 5.7.12, for osx10.9 (x86_64)
--
-- Host: localhost Database: mathdb
-- ------------------------------------------------------
-- Server version 5.7.16
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@... |
<gh_stars>0
CREATE TYPE MODERATION AS ENUM ('WAITING', 'REJECTED');
-- If moderation is not null, then an ingredient must not be public,
-- and it must have an owner
ALTER TABLE ingredient
ADD COLUMN moderation MODERATION,
ADD CONSTRAINT moderation_check CHECK (
NOT ((owner is NULL or published = TRUE) ... |
-- MySQL compatible file for reading data
CREATE SCHEMA IF NOT EXISTS movielens;
use movielens;
-- users table
-- zipcode is string instead of int, because we don't want zipcodes starting with 0 to be stripped of it.
CREATE TABLE IF NOT EXISTS users(user_id INT PRIMARY KEY, age INT NOT NULL, gender CHAR(1) NOT NULL, o... |
-- ### 新表预置数据:
-- dev_folder
-- 系统文件夹
insert into idata.dev_folder (id, creator, folder_name, folder_type) values (1, '系统管理员', 'LabelSystemFolder', 'LABEL');
insert into idata.dev_folder (id, creator, folder_name, folder_type) values (2, '系统管理员', 'EnumSystemFolder', 'ENUM');
insert into idata.dev_folder (id, creator, ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.