sql stringlengths 6 1.05M |
|---|
-- file:tsdicts.sql ln:62 expect:true
SELECT ts_lexize('hunspell_long', 'foots')
|
<reponame>Shuttl-Tech/antlr_psql
-- file:name.sql ln:66 expect:true
SELECT parse_ident('foo.boo')
|
SELECT
CAST(purchase_price AS FLOAT64)
FROM
customer_data.customer_purchase
ORDER BY
CAST(purchase_price AS FLOAT64) DESC |
CREATE TABLE tax_master (
tax_id NUMBER NOT NULL,
cgst NUMBER,
sgst NUMBER,
PRIMARY KEY (tax_id)
);
|
SELECT COUNT(id) FROM proxy_endpoints WHERE api_id = ?
|
<reponame>UAMS-DBMI/PosdaTools
-- Name: BackupPrivateTagKnowledgeBase
-- Schema: posda_private_tag
-- Columns: ['pt_signature', 'pt_owner', 'pt_group', 'pt_element', 'pt_consensus_vr', 'pt_consensus_vm', 'pt_consensus_name', 'pt_consensus_description', 'pt_consensus_disposition']
-- Args: []
-- Tags: ['DispositionRepor... |
CREATE TABLE IF NOT EXISTS ibc_data (
path TEXT PRIMARY KEY NOT NULL,
data BLOB NOT NULL
);
|
<gh_stars>1-10
{% macro get_ticket_schedule_columns() %}
{% set columns = [
{"name": "_fivetran_synced", "datatype": dbt_utils.type_timestamp()},
{"name": "created_at", "datatype": dbt_utils.type_timestamp()},
{"name": "schedule_id", "datatype": dbt_utils.type_int()},
{"name": "ticket_id", "datatype": ... |
/* contrib/pg_variables/pg_variables--1.1--1.2.sql */
-- complain if script is sourced in psql, rather than via ALTER EXTENSION
\echo Use "ALTER EXTENSION pg_variables UPDATE TO '1.2'" to load this file. \quit
-- Functions to work with arrays
CREATE FUNCTION pgv_set(package text, name text, value anyarray, is_transa... |
<filename>data/crud.sql
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 10-09-2019 a las 20:29:34
-- Versión del servidor: 10.1.26-MariaDB
-- Versión de PHP: 7.1.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SE... |
<reponame>SKalt/pg_sql_parser_tests<gh_stars>0
SELECT ROW(1,2.5,'this is a test');
|
drop schema if exists ridecell cascade;
create schema ridecell;
set search_path to ridecell, public;
drop table if exists parking_spot cascade;
create table parking_spot
(
id serial not null primary key,
nearest_address text not null,
lat real not null,
long real not null,
updated_at timestamp not null d... |
drop graph g cascade;
create graph g;
select set_graph_path('g');
CREATE VLABEL person;
CREATE ELABEL knows;
insert into person (id, properties) values (2, '{"name": "Tom"}');
insert into person (id, properties) values (3, '{"name": "Summer"}');
insert into person (id, properties) values (4, '{"name": "Pat"}');
inse... |
DROP TABLE IF EXISTS tweets;
DROP TABLE IF EXISTS follows;
DROP TABLE IF EXISTS authorities;
DROP TABLE IF EXISTS users;
|
<reponame>jhingx1/Spring-ExamplesCibertec
-- En DB: parainfo de MySQL, ejecutar este script:
DROP TABLE IF EXISTS alumnos;
-- tabla alumnos
CREATE TABLE alumnos(
idalumno int(11) NOT NULL AUTO_INCREMENT,
nombre varchar(200) NOT NULL,
correo varchar(20) NOT NULL,
telefono varchar(20) NOT NULL,
PRIM... |
<reponame>mxdzi/hackerrank
SELECT DISTINCT
city
FROM
station
WHERE
INSTR(city, 'a') = 1
OR INSTR(city, 'e') = 1
OR INSTR(city, 'i') = 1
OR INSTR(city, 'o') = 1
OR INSTR(city, 'u') = 1;
|
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 19, 2019 at 12:43 AM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.2.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
-- invalidate_all_access_tokens invalidates tokens of the current user ever created before the current time
CREATE OR REPLACE FUNCTION _auth.invalidate_all_access_tokens(i_access_token TEXT) RETURNS void AS $$
DECLARE
v_is_admin BOOLEAN;
v_user_authentication_data jsonb;
v_user_authentication_id TEXT;
... |
<filename>data/schema.sql
DROP TABLE IF EXISTS userID CASCADE;
DROP TABLE IF EXISTS favorite CASCADE;
CREATE TABLE userID(
ID SERIAL PRIMARY KEY,
username VARCHAR(255),
city VARCHAR(255),
us_state VARCHAR(255),
miles_hiked DECIMAL
);
CREATE TABLE favorite(
ID SERIAL PRIMARY KEY,
username INT,
FOREIGN... |
/*
Navicat Premium Data Transfer
Source Server : docker本机
Source Server Type : MySQL
Source Server Version : 50727
Source Host : localhost:3306
Source Schema : ry
Target Server Type : MySQL
Target Server Version : 50727
File Encoding : 65001
Date: 25/07/2020 01:14:07... |
<gh_stars>10-100
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`first_name` VARCHAR(255) NOT NULL,
`last_name` VARCHAR(255),
`age` INTEGER,
UNIQUE (`first_name`, `last_name`)
);
INSERT INTO `user` (`id`, `first_name`, `last_name`, `age`)
VALUES (1, 'George'... |
<filename>migrations/1_create_tables_down.sql
DROP TABLE configs;
|
<filename>app/src/main/assets/migrations/71.sql
ALTER TABLE NextQuestions ADD COLUMN Deleted BOOLEAN;
ALTER TABLE MultipleSkips ADD COLUMN Deleted BOOLEAN;
ALTER TABLE NextQuestions ADD COLUMN Value STRING;
ALTER TABLE NextQuestions ADD COLUMN CompleteSurvey BOOLEAN;
ALTER TABLE OptionInOptionSets ADD COLUMN IsExclusiv... |
<reponame>ytugba/My-Otiose-Projects
create database lab3;
use lab3;
create table CLASS(
sid int primary key not null,
sname char(30) not null,
gpa double not null,
age int not null
);
insert into CLASS values (17, "<NAME>.", 3.56, 21);
insert into CLASS values (... |
<gh_stars>1-10
UPDATE
contacts
SET
public_encryption_key = ?,
public_signing_key = ?,
global_id = ?
WHERE
global_id = ? |
<reponame>UCL-ORCA/Orca
-- -----------------------------------------------------
-- Schema for ORCA
-- -----------------------------------------------------
-- -----------------------------------------------------
-- Table student
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS stud... |
<gh_stars>1-10
/****** Object: Table [dbo].[logSampleLogs] Script Date: 30/04/2021 12:34:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[logSampleLogs](
[logSampleUid] [varchar](40) NOT NULL,
[text] [nvarchar](max) NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
DROP INDEX IF... |
CREATE TABLE custom_audience_session (
end_time Nullable(String),
num_invalid_entries Nullable(String),
num_matched Nullable(String),
num_received Nullable(String),
progress Nullable(String),
session_id Nullable(String),
stage Nullable(String),
start_time Nullable(String)
)
ENGINE = Log
|
-- file:rangetypes.sql ln:283 expect:true
select count(*) from test_range_spgist where ir @> 10
|
<reponame>smith750/kc<gh_stars>0
insert into KRCR_NMSPC_T (NMSPC_CD, OBJ_ID, VER_NBR, NM, ACTV_IND, APPL_ID) values ('KC-NTFCN', SYS_GUID(), 1, 'KC Notification', 'Y', 'KC')
/
|
copy {{params.table_name}} FROM {{params.data_location}} DELIMITER ',' CSV HEADER; |
CREATE TABLE ciudad (
id INT NOT NULL AUTO_INCREMENT,
nombre VARCHAR(45) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE dias_espera (
id INT(11) NOT NULL AUTO_INCREMENT,
id_ciudad_origen INT(11) NOT NULL,
id_ciudad_destino INT(11) NOT NULL,
dias INT(11) NOT NULL,
PRIMARY KEY... |
library CommonTests version '3.0.0'
|
-- 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.
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
... |
DROP INDEX "identity_credential_identifiers_identifier_idx"; |
CREATE TABLE entries(
id INT PRIMARY KEY,
series_id INT REFERENCES series(id),
position INT REFERENCES digits(position),
status BOOLEAN,
timestamp TIMESTAMP DEFAULT now()
) |
INSERT INTO `ims`.`customers` (`first_name`, `surname`) VALUES ('jordan', 'harrison');
INSERT INTO `items` (`name`,`size`, `cost`) VALUES ('beer', 'very large', 5);
INSERT INTO `ims`.`orders` (`customerId`) VALUES (1);
INSERT INTO `ims`.`order_items` (`orderId`, `itemId`, `itemName`, `cost`, `numItems` ) VALUES (1,1... |
<filename>install/Store Procedures/SP_SEL_CATEGORY_BY_NAME.sql
DROP PROCEDURE IF EXISTS `SP_SEL_CATEGORY_BY_NAME`;
DELIMITER $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `SP_SEL_CATEGORY_BY_NAME`(IN `i_title` VARCHAR(30) CHARSET utf8) NOT DETERMINISTIC READS SQL DATA SQL SECURITY DEFINER
BEGIN
SELECT
`ca_id` ... |
-- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Machine: localhost
-- Genereertijd: 27 jan 2015 om 16:42
-- Serverversie: 5.5.41-0ubuntu0.14.04.1
-- PHP-versie: 5.5.9-1ubuntu4.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@... |
/*
Navicat Premium Data Transfer
Source Server : datarequest
Source Server Type : MySQL
Source Server Version : 50719
Source Host : localhost:3306
Source Schema : dataviz2021
Target Server Type : MySQL
Target Server Version : 50719
File Encoding : 65001
... |
-- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 25, 2020 at 09:29 PM
-- Server version: 10.1.32-MariaDB
-- PHP Version: 7.2.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... |
SELECT name from people
JOIN stars ON stars.person_id = people.id
JOIN movies ON movies.id = stars.movie_id
WHERE movies.year = 2004
GROUP BY people.id
ORDER BY people.birth; |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 09, 2019 at 02:21 PM
-- Server version: 10.4.8-MariaDB
-- PHP Version: 7.3.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40... |
<reponame>h0ss3in88/demo
-- create user demo createdb createuser password '<PASSWORD>';
-- Database: demo
-- DROP DATABASE demo;
CREATE DATABASE demo
WITH OWNER = hussein
ENCODING = 'UTF8'
TABLESPACE = pg_default
LC_COLLATE = 'en_US.UTF-8'
LC_CTYPE = 'en_US.UTF-8'
CONNECTION LIMIT... |
create view NASDAQ_Historical_Yearly_View as
with minmaxDates as (
select
a.Ticker,
year(a.[Date]) "Year",
min(a.[Date]) "Min Date",
max(a.[Date]) "Max Date"
from NASDAQ_Historical a
group by
a.Ticker,
year(a.[Date])
)
select
dates.Ticker,
dates.[Year],
dates.[Min Date] "Period Start Date",
dates.... |
alter table #prefix#blog_post add column extra text not null default '';
|
-- first rename original table, this table can be dropped later
begin;
SET search_path to data_mart;
--Call function to move all the child table to data_mart schema
select * from table_swap ('data_mart_new', 'data_mart', 'events' );
--Create new schema and move non-partitioned table
CREATE SCHEMA data_mart_old;
ALTE... |
<filename>sql/updates/0.6/2649_command.sql
INSERT INTO `command` VALUES('saveall',1,'Syntax: .saveallr\n\r\nSave all characters in game.');
|
<gh_stars>0
CREATE DATABASE IF NOT EXISTS books;
USE books;
CREATE TABLE IF NOT EXISTS authors (id INT, name VARCHAR(20), email VARCHAR(20));
SHOW TABLES;
INSERT INTO authors (id,name,email) VALUES(1,"Vivek","<EMAIL>");
INSERT INTO authors (id,name,email) VALUES(2,"Priya","<EMAIL>");
INSERT INTO authors (id,name,email)... |
<reponame>ChiefNoir/BusinessCard<filename>back-end/Infrastructure/Migrations/V0_0_0_5__indexes.sql
-- Category
CREATE UNIQUE INDEX ON category (is_everything)
WHERE is_everything = TRUE;
-- --------------------------------------------------------------
|
<gh_stars>100-1000
-- @@@ START COPYRIGHT @@@
--
-- 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... |
-------------------------------------------------------------------------------
-- task def notification
-------------------------------------------------------------------------------
CREATE TABLE TASK_DEF_NOTIFICATION(
ID BIGINT NOT NULL,
EVENT_NAME VARCHAR(100),
RECEIVER VARCHAR(200),
TYPE VARCHAR(50),
TEMPL... |
CREATE TABLE IF NOT EXISTS `sign_class` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`number` bigint(20) NOT NULL COMMENT '学号',
`name` varchar(50) NOT NULL COMMENT '姓名',
`class` varchar(50) NOT NULL COMMENT '班级',
PRIMARY KEY (`id`),
UNIQUE KEY `number` (`number`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TAB... |
/****** Object: View [dbo].[V_Instrument_Class_List_Report] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW [dbo].[V_Instrument_Class_List_Report]
AS
SELECT IN_class AS [Instrument Class],
is_purgable AS [Is Purgable],
raw_data_type AS [Raw Data Type],
requires_pre... |
<reponame>raymond301/swift<filename>swift/scripts/src/main/resources/db_migration/common/044_starred_proteins.sql<gh_stars>1-10
ALTER TABLE `starred_proteins`
DROP COLUMN `match_name`;
-- @UNDO
# TBD |
INSERT INTO categories (id, name) VALUES
(1, 'uncategorized'),
(2, 'cat1'),
(3, 'cat2'),
(4, 'cat3'),
(5, 'cat4');
INSERT INTO articles (title, slug, date, state, author_id, category_id) VALUES
('Article 1', 'article-1', 1230786000, 'published', 1, 1),
('Article 2', 'article-2', 1231218000, 'published', 1, 2),
('Artic... |
select @filename := DATE_FORMAT(now(),"problem_roulette_data_%Y%m%d_%H%i%S.sql");
select t2.id term_id, t2.name term_name, t5.class_id class_id, t6.name class_name, t1.user_id user_id, t3.username username, count(t1.id) response_count, count(t1.ans_correct) correct_count, sum(TIME_TO_SEC(TIMEDIFF(t1.end_time,t1.start_... |
/*
for use in sqlite3 db, for test purposes
*/
CREATE TABLE APIGEE_MGMT_ENDPOINT (
ID INTEGER PRIMARY KEY ASC,
ENDPOINT_KEY TEXT,
ENDPOINT TEXT
);
CREATE UNIQUE INDEX APIGEE_MGMT_ENDPOINT_EP on APIGEE_MGMT_ENDPOINT(ENDPOINT_KEY);
CREATE TABLE APIGEE_MGMT_LOG (
ID INTEGER PRIMARY KEY ASC,
TEN... |
<reponame>KarmaScripter/BudgetX
CREATE TABLE PayPeriods
(
PayPeriodId INTEGER NOT NULL UNIQUE IDENTITY(1,1),
Period NVARCHAR(255) NOT NULL,
PayPeriod NVARCHAR(255) NULL,
StartDate DATETIME NULL,
EndDate DATETIME NULL
);
|
SELECT * FROM nome_tabela ORDER BY Data;
|
select a.cust_ac_no, a.ac_desc, a.lcy_curr_balance, sum(decode(h.drcr_ind,'D',lcy_amount,0)) IC_Debited, sum(decode(h.drcr_ind,'C',lcy_amount,0)) IC_Credited, sum(decode(h.drcr_ind,'C',lcy_amount,0))- sum(decode(h.drcr_ind,'D',lcy_amount,0)) IC_Balance
from actb_history h, sttm_cust_account a
where h.ac_no = a.cust_a... |
create table korisnik
(
id int auto_increment
primary key,
username varchar(20) not null,
password varchar(20) not null,
ime varchar(15) not null,
prezime varchar(15) not null,
datrodj date not null,
brIndeksa varchar(9) not null
);
create table predmet
(
... |
INSERT INTO `roles` (`id`, `role`, `name`) VALUES
(1, 'ROLE_AUTHOR', 'Autor'),
(2, 'ROLE_REVIEWER', 'Recenzent'),
(3, 'ROLE_EDITOR', 'Redaktor'),
(4, 'ROLE_CHIEF_EDITOR', 'Šéfredaktor'),
(5, 'ROLE_ADMIN', 'Administrátor'),
(6, 'ROLE_HELP_DESK', 'Správce helpdesku');
INSERT INTO `users` (`id`, `username`, `email`, `pas... |
--Ques 4
use QLHangKhong
go
-- 39. Với mỗi nhân viên cho biết mã số, tên nhân viên và tổng số loại máy bay mà nhân viên đó có thể lái.
select nv.MaNV, nv.Ten, count(cn.MaMB) as SoMB
from NhanVien nv
left outer join ChungNhan cn on cn.MaNV = nv.MaNV
group by nv.MaNV, nv.Ten
-- 40. Với mỗi nhân viên cho biết mã số, t... |
CREATE TABLE SYSTEM
(
ID_SYSTEM NUMBER NOT NULL ,
TWITTER_CONSUMER_KEY VARCHAR2 (500) ,
TWITTER_CONSUMER_SECRET VARCHAR2 (500) ,
TWITTER_API_BEARER VARCHAR2 (500) ,
TWITTER_SSL_WALLET_PATH VARCHAR2 (200) ,
TWITTER_SSL_WALLET_PWD VARCHAR2 (500) ,
EMAIL_FROM ... |
USE Restaurant
GO
-- 1. Departments Info
SELECT DepartmentId, COUNT(DepartmentId) AS [Number Of Employees]
FROM Employees
GROUP BY DepartmentId
ORDER BY [Number Of Employees]
-- 2. Average Salary
SELECT DepartmentId, CONVERT(FLOAT, ROUND(AVG(Salary), 2)) AS [Average Salary]
FROM Employees
GROUP BY DepartmentId
ORDE... |
-- DELETE CONSTRAINS IF THEY EXIST
IF (OBJECT_ID('PK_uCommerce_CategoryTarget', 'PK') IS NOT NULL)
BEGIN
ALTER TABLE uCommerce_CategoryTarget DROP CONSTRAINT PK_uCommerce_CategoryTarget
END
IF (OBJECT_ID('FK_uCommerce_CategoryTarget_uCommerce_CategoryTarget', 'F') IS NOT NULL)
BEGIN
ALTER TABLE uCommerce_Categ... |
<reponame>maiha/facebook.cr
CREATE TABLE live_video_input_stream (
id String,
dash_ingest_url Nullable(String),
dash_preview_url Nullable(String),
is_master Nullable(UInt8),
secure_stream_url Nullable(String),
stream_id Nullable(String),
stream_url Nullable(String)
)
ENGINE = Log
|
iteration:loop select 1; iterate iteration; leave iteration; end loop iteration; |
DELETE FROM script_waypoint WHERE entry=6182;
INSERT INTO script_waypoint VALUES
(6182, 0, -11480.684570, 1545.091187, 49.898571, 0, ''),
(6182, 1, -11466.825195, 1530.151733, 50.263611, 0, ''),
(6182, 2, -11465.213867, 1528.343750, 50.954369, 0, 'entrance hut'),
(6182, 3, -11462.990234, 1525.235596, 50.937702, 0, ''),... |
<gh_stars>0
SELECT
/* Record */
[occurrenceID] = 'INBO:NBN:' + TOC.TAXON_OCCURRENCE_KEY
, [type] =
CASE
WHEN RT.SHORT_NAME IN ('auditory record', 'reference/auditory record' ) THEN 'Sound'
WHEN RT.SHORT_NAME IN ('field record/photographed', '') THEN 'StillImage'
... |
CREATE TABLE public.players
(
id_player SERIAL PRIMARY KEY,
nick character varying(64) COLLATE pg_catalog."default" DEFAULT NULL::character varying,
login character varying(64) COLLATE pg_catalog."default" DEFAULT NULL::character varying,
password character varying(64) COLLATE pg_catalog."default" DEFAU... |
<filename>sql_metadb/migration_tables/feesfines_refunds.sql
DROP TABLE IF EXISTS feesfines_refunds;
CREATE TABLE feesfines_refunds AS
SELECT
id::varchar(36),
jsonb_extract_path_text(jsonb, 'nameReason')::varchar(65535) AS name_reason,
jsonb_pretty(jsonb)::json AS data
FROM
folio_feesfines.refunds;
ALT... |
<filename>sql/login user.sql
-- FUNCTION: public.login_user(character varying, character varying)
-- DROP FUNCTION public.login_user(character varying, character varying);
CREATE OR REPLACE FUNCTION public.login_user(
user_name_sp character varying,
password_sp character varying)
RETURNS TABLE(ide integer, user... |
<filename>examples/resources/tables/customers.sql
CREATE TABLE customers (
customer_id INTEGER DISTKEY PRIMARY KEY
,customer_name VARCHAR(200)
,contact_name VARCHAR(200)
,address VARCHAR(200)
,city VARCHAR(100)
,postal_code VARCHAR(10)
,country VARCHAR(100)
) SORTKEY(customer_id);
|
<reponame>CBIIT/cadsr-cdecurate
/*L
Copyright ScenPro Inc, SAIC-F
Distributed under the OSI-approved BSD 3-Clause License.
See http://ncip.github.com/cadsr-cdecurate/LICENSE.txt for details.
L*/
--Please run with account SBR
DROP TABLE SBR.AC_BACKUP1;
DROP TABLE SBR.DEC_BACKUP1;
DROP TABLE SBR.DE_BACKUP1;
DR... |
<gh_stars>0
USE [League]
GO
/****** Object: Table [dbo].[TeamCoach] Script Date: 08.06.2019 16:53:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TeamCoach](
[TeamID] [smallint] NOT NULL,
[CoachID] [smallint] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TeamCoach] WITH CHECK... |
CREATE TABLE [dimensionSchema].[templateDimCoreName_T1_dim]
(
[SNK_templateDimCoreName] INT NOT NULL
,
[NK_SourceSystemID1] NVARCHAR(500) NOT NULL /*NaturalKey_ReplacementPoint|NK_SourceSystemID1|,*/
,[NK_SourceSystemID2] NVARCHAR(500) NOT NULL /*Sample*/
,
[SampleColumnOne_Cur] VARCHAR(500) NOT NULL ... |
-- SQL code here -- |
DROP TABLE IF EXISTS public.staging_events;
DROP TABLE IF EXISTS public.staging_songs;
DROP TABLE IF EXISTS public.songplays;
DROP TABLE IF EXISTS public.users;
DROP TABLE IF EXISTS public.songs;
DROP TABLE IF EXISTS public.artists;
DROP TABLE IF EXISTS public.time;
CREATE TABLE public.artists (
artistid varchar(300)... |
CREATE TABLE users(
id UUID PRIMARY KEY NOT NULL,
name VARCHAR(255) NOT NULL,
email VARCHAR(255) NOT NULL,
password VARCHAR(255) NOT NULL,
admin BOOLEAN NOT NULL DEFAULT FALSE,
created_at TIMESTAMP NOT NULL DEFAULT (NOW()),
updated_at TIMESTAMP NOT NULL DEFAULT (NOW()));
|
<filename>hersana00.sql
-- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 29, 2018 at 01:45 PM
-- Server version: 10.1.30-MariaDB
-- PHP Version: 7.2.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:... |
<reponame>dhoncrisley/ecommerce-java-api<filename>sql/dump.sql<gh_stars>0
SET FOREIGN_KEY_CHECKS=0;
# Exporting metadata from `store_java`
DROP DATABASE IF EXISTS `store_java`;
CREATE DATABASE `store_java`;
USE `store_java`;
# TABLE: `store_java`.`cupons`
CREATE TABLE `cupons` (
`id` varchar(45) NOT NULL,
`desconto... |
<reponame>liveprojects-melman/gaddum_app
SELECT * FROM tracks t1
WHERE
t1.name = "replacement_parameter_name" and
t1.album = "replacement_parameter_album" and
t1.artist = "replacement_parameter_artist" and
t1.duration_ms = "replacement_parameter_duration_ms"
or
t1.id = "replacement_parameter_id" ; |
<gh_stars>0
USE AdventureWorks2014
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF OBJECT_ID ('[dbo].[SalesGetSalesOrders]', 'P') IS NOT NULL
DROP PROCEDURE [dbo].[SalesGetSalesOrders];
GO
CREATE PROCEDURE [dbo].[SalesGetSalesOrders] (@customerID int)
AS
BEGIN
SELECT TOP (10) Orders.SalesOrderID,
Orders.... |
<gh_stars>0
CREATE FUNCTION multiply_numbers(number2 integer, number1 integer) RETURNS integer
AS
$$
begin
return number2 * number1;
end;
$$
LANGUAGE plpgsql;
ALTER FUNCTION public.multiply_numbers(number2 integer, number1 integer) OWNER TO postgres;
|
<gh_stars>0
INSERT INTO `first board` (`id`, `title`, `author`, `password`, `written_datetime`, `editted_datetime`) VALUES (NULL, '타이틀', '저자', '암호', '2018-01-04 00:00:00.000000', '2018-01-04 00:00:00.000000') |
USE personnel_managerDB;
INSERT INTO department (name) VALUES("HR"), ("IT");
INSERT INTO role (title, salary, department_id) VALUES("Senior HR Manager", "80000", 5), ("CFO", "100000", 4);
|
<filename>VS2013_PROJECT/DNN_DB/dbo/Stored Procedures/dnn_GetServices.sql
CREATE PROCEDURE [dbo].[dnn_GetServices]
@PortalId Int, -- pass Null for roles of all sites
@UserId Int -- not null!
AS
BEGIN
SELECT
R.*,
UR.IsOwner,
UR.UserRoleID,
UR.UserID,
UR.ExpiryDat... |
<reponame>EL-BID/nexso
CREATE TABLE [dbo].[dnn_EasyDNNfieldsCurrencySettings] (
[ACodeBase] NVARCHAR (5) NOT NULL,
[PortalID] INT NOT NULL,
[ServiceUrl] NVARCHAR (300) NULL,
[UpdateRate] DATETIME NULL,
[UpdateSource] BIT CONSTRAINT [DF_dnn_EasyDNNfieldsCurre... |
<gh_stars>1-10
DROP DATABASE IF EXISTS blogs_db;
CREATE DATABASE blogs_db;
USE blogs_db;
CREATE TABLE blogs(
id INT AUTO_INCREMENT NOT NULL,
author VARCHAR (30) NOT NULL,
postDate DATETIME,
content TEXT NOT NULL,
PRIMARY KEY(id)
);
CREATE TABLE comments(
id INT AUTO_INCREMENT NOT NULL,
blogId IN... |
--
-- PostgreSQL database dump
--
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_messages = warning;
SET search_path = public, pg_catalog;
ALTER TABLE IF EXISTS ONLY public.rooftype ... |
<reponame>ikantspel9/DBOps
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE OR ALTER PROCEDURE dbo.prc_Secr_DefaultDBAccessMissing
AS
BEGIN
/**************************************************************************************
** Procedure: prc_Secr_DefaultDBAccessMissing
**
** Purpose: Find all users that h... |
<filename>sql/utils/50_time.sql
/* ------------------------------------------------------------------------- */
CREATE OR REPLACE FUNCTION epoch2timestamp(a_epoch INTEGER DEFAULT 0) RETURNS TIMESTAMP IMMUTABLE LANGUAGE 'sql' AS
$_$
-- a_epoch: количество секунд
SELECT CASE
WHEN $1 = 0 THEN NULL
ELSE (TIMESTAMP 'e... |
<reponame>jjcm/soci-backend<filename>migrations/00005_create_posts_tags_table.sql
-- +goose Up
-- SQL in this section is executed when the migration is applied.
CREATE TABLE `posts_tags` (
`post_id` int unsigned NOT NULL DEFAULT 0,
`tag_id` int unsigned NOT NULL DEFAULT 0,
`created_at` timestamp NOT NULL DEFAULT ... |
-- file:matview.sql ln:147 expect:true
CREATE MATERIALIZED VIEW mvtest_mv1 AS SELECT 1 AS col1 WITH NO DATA
|
<reponame>yswunstoppable/cngi
#sql("list")
select * from boundary
where is_deleted = 0
#if(notBlank(rq.address))
and position(#para(rq.address) in address) > 0
#end
#if(rq.status != 0)
and status = #para(rq.status)
#end
#end |
<reponame>mifodiy4j/smikhailov<filename>chapter_003_/additionally_question/script_query_for_2table.sql
CREATE TABLE company
(
id integer NOT NULL,
name character varying,
CONSTRAINT company_pkey PRIMARY KEY (id)
);
CREATE TABLE person
(
id integer NOT NULL,
name character varying,
company_id integer,
CONSTRAINT person... |
<reponame>david-morton/pg_partman
-- Fixed a bug in sub-partitioning that would cause child tables outside of the time boundaries of the parent partitions to be created when using time->time sub-partitioning. A user encountered the error when doing weekly->daily subpartitioning, but it was possible it could have happen... |
<reponame>gchiappe/dbt3
sql_execute explain select s_name, count(*) as numwait from supplier, lineitem l1, orders, nation where s_suppkey = l1.l_suppkey and o_orderkey = l1.l_orderkey and o_orderstatus = 'F' and l1.l_receiptdate > l1.l_commitdate and exists ( select * from lineitem l2 where l2.l_orderkey = l1.l_orderk... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.