sql stringlengths 6 1.05M |
|---|
DROP TABLE IF EXISTS recipes;
|
CREATE TABLE IF NOT EXISTS candidates
(
user_id SERIAL PRIMARY KEY,
user_name text
);
CREATE TABLE IF NOT EXISTS interviewers
(
user_id SERIAL PRIMARY KEY,
user_name text
);
CREATE TABLE IF NOT EXISTS candidates_times
(
user_id integer REFERENCES candidates (user_id) ON UPDATE CASCADE ON DELETE CASCADE,
d... |
<reponame>aorogat/SmartBenchmark<gh_stars>0
SELECT "Confident_VP_S_O"."PredicateURI",
"Confident_VP_S_O"."Context_Subject",
"Confident_VP_S_O"."Context_Object",
"Confident_VP_S_O"."VP" AS "VP_S_O",
"Confident_NP_S_O"."NP" AS "NP_S_O",
"Confident_VP_O_S"."VP" AS "VP_O_S",
"Confident_NP_O_S"."NP"... |
-- Simulation package v. 0.1 for the 3D City Database
--
-- May 2018
--
-- 3D City Database: http://www.3dcitydb.org/
--
-- Copyright 2018
-- Austrian Institute of Technology G.m.b.H., Austria
-- Center for Energy - Smart Cities and Regions Research Field
-- http://www.a... |
<reponame>i-novus-llc/configuration
INSERT INTO rdm.application (code, name) VALUES
('app-auth', 'auth'),
('app-security', 'security'),
('app-test-security', 'test security');
INSERT INTO configuration.config_group (id, name) VALUES
(101, 'Authentication ... |
ALTER TABLE sts.secret MODIFY COLUMN value VARCHAR(4095) NOT NULL;
|
<filename>canonical-schema/V004__vcs_pr_commit.sql
create table "vcs_PullRequestCommitAssociation" (
id text generated always as (pkey("pullRequest", commit)) stored primary key,
origin text,
"refreshedAt" timestamptz not null default now(),
"pullRequest" text,
commit text
);
alter table "vcs_PullRequestComm... |
<gh_stars>0
------------------------------------------------------------
-- Adding new player data
------------------------------------------------------------
drop table if exists player_profile CASCADE;
create table player_profile (
id uuid,
profile jsonb,
unique(id)
);
insert into player_profile(id,... |
<gh_stars>0
USE OrdersDatabase;
GO
INSERT INTO Sales.LineItems
VALUES (101,11,15.00,1)
INSERT INTO Sales.LineItems
VALUES (101,44,30.00,1)
INSERT INTO Sales.LineItems
VALUES (102,44,30.00,1)
INSERT INTO Sales.LineItems
VALUES (103,33,30.00,2)
INSERT INTO Sales.LineItems
VALUES (103,22,15.00,1)
INSERT INTO Sales.LineIt... |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 09, 2020 at 09:16 AM
-- Server version: 10.3.16-MariaDB
-- PHP Version: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... |
<reponame>crazykid0058/cknav<gh_stars>0
/*
Navicat Premium Data Transfer
Source Server : local_mysql
Source Server Type : MySQL
Source Server Version : 50732
Source Host : 127.0.0.1:3306
Source Schema : ck
Target Server Type : MySQL
Target Server Version : 50732
File Encoding ... |
<reponame>PurrGroup/purr-docs
INSERT INTO `article` (`id`, `abstract`, `author`, `background_url`, `comment_count`, `comment_status`, `create_time`, `delete_time`, `is_original`, `is_pinned`, `link_name`, `name`, `ping_status`, `pinged`, `share_count`, `status`, `target`, `thumb_count`, `to_ping`, `update_time`, `view_... |
<reponame>ylabade/ApplicationInsights-dotnet
USE dependencytest;
IF (NOT EXISTS (select * from sysobjects where name='Messages' and xtype='U'))
BEGIN
CREATE TABLE [dbo].[Messages] (
[ID] [int] IDENTITY(1, 1) NOT NULL,
[MessageText] [nvarchar] (255) NOT NULL,
[EventTime] [datetime] NOT NULL
)
END
GO
INSERT INTO [db... |
DELETE
FROM {}
WHERE d_expires < :d
|
CREATE DATABASE ecommerce;
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
CREATE TABLE IF NOT EXISTS `products` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`name`... |
ALTER TABLE eg_action DROP CONSTRAINT eg_action_pkey;
ALTER TABLE eg_action ADD CONSTRAINT eg_action_pkey PRIMARY KEY (id);
ALTER TABLE eg_action DROP CONSTRAINT eg_action_name_key_tenantid;
ALTER TABLE eg_action ADD CONSTRAINT eg_action_name_key UNIQUE (name);
ALTER TABLE eg_action DROP CONSTRAINT eg_action_url_queryp... |
CREATE PROCEDURE [srv].[ExcelGetActiveConnectionStatistics]
as
begin
/*
возвращает статистику по активным подключениям MS SQL SERVER
*/
SET NOCOUNT ON;
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
;with conn as (
SELECT [ServerName]
,[DBName]
,[ProgramName]
,[LoginName]
,[Status]
... |
<gh_stars>10-100
create table t (id int not null unique); |
-- original: tkt-f67b41381a.test
-- credit: http://www.sqlite.org/src/tree?ci=trunk&name=test
CREATE TABLE t1(a);
INSERT INTO t1 VALUES(1);
ALTER TABLE t1 ADD COLUMN b DEFAULT 2;
CREATE TABLE t2(a, b);
INSERT INTO t2 SELECT * FROM t1;
SELECT * FROM t2
;DROP TABLE t1; DROP TABLE t2
;EXPLAIN INSERT INTO t1 S... |
<reponame>AgustinJimenez/lpr_web
-- MySQL dump 10.13 Distrib 5.5.54, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: lpr_database
-- ------------------------------------------------------
-- Server version 5.5.54-0ubuntu0.14.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40... |
<gh_stars>0
SELECT DISTINCT approp.row_number,
approp.allocation_transfer_agency,
approp.agency_identifier,
approp.beginning_period_of_availa,
approp.ending_period_of_availabil,
approp.availability_type_code,
approp.main_account_code,
approp.sub_account_code
FROM appropriation AS approp
JOIN submission AS su... |
--
-- This code is subject to the HIEOS License, Version 1.0
--
-- Copyright(c) 2008-2009 Vangent, Inc. All rights reserved.
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS O... |
<filename>DO378/solutions/comprehensive-review/currency/src/main/resources/currencies.sql
insert into currency(name, sign) values ('AED','د.إ');
insert into currency(name, sign) values ('AFN','؋');
insert into currency(name, sign) values ('ALL','L');
insert into currency(name, sign) values ('AMD','֏');
insert into curr... |
select cast('123456789' as decimal(9,0)) / cast('12345678901234.56789123456789' as decimal(28,14)) from data limit 1;
|
-- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Apr 14, 2021 at 09:06 PM
-- Server version: 5.7.21
-- PHP Version: 7.2.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIEN... |
<reponame>Rozozepine/microservices
INSERT INTO Instrument (ID, instrumentType, brokerLei, counterpartyLei, dealDate, originalCurrency, valueDate, isin, tracker, quantity, maturityDate, amountInOriginalCurrency, strikeAmount, direction) values ( INSTRUMENT_SEQ.nextval, 'B', '254900LAW6SKNVPBBN21', '969500CHL179N00GX059'... |
CREATE TABLE ITEMS(
ID BIGINT PRIMARY KEY,
NAME VARCHAR(128),
DESCRIPTION VARCHAR(512),
TYPE SMALLINT,
CONTENT CLOB,
READ_COUNT SMALLINT,
CREATE_TIME TIMESTAMP,
UPDATE_TIME TIMESTAMP,
PARENT BIGINT
);
CREATE TABLE TAGS(
ID BIGINT PRIMARY KEY,
NAME VARCHAR(128),
CREATE_TIME TIMESTAMP
); |
<reponame>leongold/ovirt-engine
-- Create index
select fn_db_create_index('IDX_vm_device_vm_id', 'vm_device', 'vm_id', '');
|
<filename>migrations/frontend/1528395830_index_associated_index_id.up.sql<gh_stars>1-10
BEGIN;
CREATE INDEX lsif_uploads_associated_index_id ON lsif_uploads(associated_index_id);
COMMIT;
|
<filename>Ch06_SQLInjection/src/main/resources/import.sql<gh_stars>100-1000
INSERT INTO CUSTOMER (CUST_ID, NAME, STATUS, ORDER_LIMIT, HINT) VALUES (1001, '<NAME>', 'A', 10000, '');
INSERT INTO CUSTOMER (CUST_ID, NAME, STATUS, ORDER_LIMIT, HINT) VALUES (1002, '<NAME>', 'B', 5000, '');
INSERT INTO CUSTOMER (CUST_ID, NAME... |
<filename>Tellma.Database.Application/map/map.Resources.sql
CREATE FUNCTION [map].[Resources] ()
RETURNS TABLE
AS
RETURN (
SELECT *, [Location].STAsBinary() AS [LocationWkb] FROM [dbo].[Resources]
);
|
<reponame>faizol/timescaledb
-- This file and its contents are licensed under the Apache License 2.0.
-- Please see the included NOTICE for copyright information and
-- LICENSE-APACHE for a copy of the license.
-- Clean up objects that are created by the setup files. Ideally, we
-- should clean them up in each post.*.... |
<reponame>hstenzel/yugabyte-db
--
-- SELECT
--
-- SELECT with LIMIT to check if prefetching hurts performance for a small set of data.
SELECT 1 FROM airports LIMIT 1;
-- Check aggregate function performance for a large set or rows.
SELECT COUNT(*) FROM airports;
-- SELECT ALL to check if prefetching is working fine for... |
-- MariaDB dump 10.17 Distrib 10.4.11-MariaDB, for Win64 (AMD64)
--
-- Host: localhost Database: AlatechMachines
-- ------------------------------------------------------
-- Server version 10.4.11-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CH... |
<filename>development/dbchangelog/201702221904_recap-relation.sql
-- MySQL Workbench Synchronization
-- Generated: 2017-02-22 19:17
-- Model: New Model
-- Version: 1.0
-- Project: Name of the project
-- Author: Fredy
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHE... |
<reponame>AnggiDy/skripsi-konseling
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 21, 2020 at 02:48 AM
-- Server version: 10.4.10-MariaDB
-- PHP Version: 7.3.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jul 11, 2018 at 11:14 AM
-- Server version: 10.1.16-MariaDB
-- PHP Version: 7.0.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: May 18, 2018 at 09:22 AM
-- Server version: 10.1.26-MariaDB
-- 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... |
<gh_stars>0
/******************************************************************************
** Description: Base table for ratings. Used to rate locations and their services
**
**
**
** Author: <NAME>
** Date: 09.03.2017
**
**
*******************************************************************************
** Chang... |
<filename>app/dbcreation.sql
CREATE DATABASE project_SewerynM;
USE project_SewerynM;
CREATE TABLE Project(
ProjectID SMALLINT NOT NULL PRIMARY KEY AUTO_INCREMENT,
ProjectName VARCHAR(30) NOT NULL
);
CREATE TABLE Employee (
EmployeeID SMALLINT NOT NULL PRIMARY KEY AUTO_INCREMENT,
ProjectID SMALLINT,
... |
/*============================================================================
File: 1.2 - Deadlock Session 1.sql
Summary: The script demonstrates how to create the first from the two
sessions that will cause a deadlock scenario. This will be
the session that will be chosen for deadlock victim.
THIS S... |
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Počítač: 127.0.0.1
-- Vytvořeno: Ned 05. lis 2017, 19:33
-- Verze serveru: 10.1.21-MariaDB
-- Verze PHP: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIEN... |
<filename>src/main/resources/db/migration/V0001__tables.sql
CREATE TABLE key (
id TEXT PRIMARY KEY,
schema JSONB NOT NULL,
description TEXT NOT NULL
);
CREATE TABLE dimension (
id TEXT PRIMARY KEY,
schema JSONB NOT NULL,
relation TEXT NOT NULL,
description TEXT NOT NULL
);
CREATE TABLE value (
id BIGS... |
<gh_stars>1000+
drop index idx_gateway_channel_configuration_id;
alter table gateway
drop column channel_configuration_id;
drop index idx_extra_channel_updated_at;
drop index idx_extra_channel_created_at;
drop index idx_extra_channel_channel_configuration_id;
drop table extra_channel;
drop index idx_chann... |
CREATE DATABASE [$(DB)] ON PRIMARY(NAME= DB_DATA, FILENAME = '$(MDF)', FILEGROWTH = 512MB) LOG ON (NAME= DB_LOG, FILENAME = '$(LDF)', FILEGROWTH = 512MB)
GO
USE [$(DB)]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[SQLTYPE_TABLE_1](
[RECID] [int] IDENTITY(1,1) NOT NULL,
[VALUE001] [bigint] ... |
<filename>src/code/FourRoads.TelligentCommunity.Rules.ThreadViews/Resources/Sql/ThreadViewsProcedures.install.sql<gh_stars>1-10
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[fr_Forum_ThreadView_Create]'))
DROP PROCEDURE [dbo].[fr_Forum_ThreadView_Create]
GO
IF EXISTS (SELECT * FROM sys.... |
<reponame>dimitarminchev/ITCareer
/* 337 */
SELECT DISTINCT salary FROM `soft_uni`.`employees`; |
-- e_fkey.test
--
-- execsql {
-- INSERT INTO album VALUES('Elvis Presley', 'Elvis'' Christmas Album', NULL);
-- INSERT INTO song VALUES(
-- 1, 'Elvis Presley', 'Elvis'' Christmas Album', 'Here Comes Santa Clause'
-- );
-- }
INSERT INTO album VALUES('Elvis Presley', 'Elvis'' Christmas Album', NULL);
... |
CREATE INDEX tags_count_idx on Tags USING btree (Count)
WITH (FILLFACTOR = 100);
CREATE INDEX tags_name_idx on Tags USING hash (TagName)
WITH (FILLFACTOR = 100);
|
<filename>api/schema/dbinit.sql
SET sql_safe_updates = FALSE;
USE defaultdb
DROP DATABASE IF EXISTS turbotodo CASCADE;
CREATE DATABASE IF NOT EXISTS turbotodo;
USE turbotodo;
CREATE TABLE todos (
id STRING(36) PRIMARY KEY,
datecreated TIMESTAMP,
title STRING,
content STRING,
tags STRING[],
st... |
-- file:float4.sql ln:9 expect:true
INSERT INTO FLOAT4_TBL(f1) VALUES (' -34.84 ')
|
<reponame>trussworks/mymove<filename>migrations/app/secure/20200923204433_donald_cac.up.sql
-- Local test migration.
-- This will be run on development environments.
-- It should mirror what you intend to apply on prod/staging/experimental
-- DO NOT include any sensitive data.
-- Updating sha256 for new cac
UPDATE cli... |
CREATE TABLE hohoho LIKE xyz |
BEGIN;
ALTER TABLE "augur_data"."topic_words"
DROP CONSTRAINT IF EXISTS "fk_topic_words_repo_topic_1";
update "augur_operations"."augur_settings" set value = 48 where setting = 'augur_data_version';
COMMIT;
|
<reponame>MarionLouis21/easycourses
-- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Client : 127.0.0.1
-- Généré le : Ven 03 Juin 2016 à 09:20
-- Version du serveur : 5.7.9
-- Version de PHP : 7.0.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... |
DROP TABLE fund_stock;
CREATE TABLE fund_stock
(
id BIGINT(20) PRIMARY KEY NOT NULL AUTO_INCREMENT,
fund_code VARCHAR(255),
jing_zhi_percent VARCHAR(255),
quater INT(11),
stock_code VARCHAR(255),
stock_name VARCHAR(255),
stock_size DOUBLE,
stock_value DOUBLE,
year INT(11)
)ENGINE=Inn... |
-- data_testing.TestDesign
--
-- Overall design of tests and connections
--
--
--
--
-- SELECT [FIELD LIST] FROM data_testing.TestDesign
--
--------------------------------------------------------------------------------
-- Change History
-----------------------------------------------------------------------------... |
<filename>actions_admin/Update User Email by Email and ID.sql<gh_stars>10-100
SET old.user_email = '';
SET new.user_email = '';
UPDATE users
SET email = current_setting('new.user_email')
WHERE email = current_setting('old.user_email');
/* SELECT USER BY EMAIL */
SELECT users.id AS id, users.name AS name, legacy_organ... |
<reponame>raekins/oracle18xe-ords-apex<gh_stars>1-10
SET LINESIZE 250
COLUMN acl FORMAT A50
COLUMN host FORMAT A20
COLUMN acl_owner FORMAT A10
SELECT HOST,
LOWER_PORT,
UPPER_PORT,
ACL,
ACLID,
ACL_OWNER
FROM dba_host_acls
ORDER BY host;
|
alter session set query_tag='fin_job queryjs01';
use role FIN_BIZ_USER;
use database FIN_DATA;
use schema FIN_SCHEMA;
use warehouse DATAGOV;
select
C_CUSTOMER_ID,
C_CURRENT_ADDR_SK,
C_BIRTH_YEAR,
CD_GENDER,
CD_DEP_COUNT,
IB_LOWER_BOUND,
IB_UPPER_BOUND
from
FIN_DATA.FIN_SCHEMA.CUSTO... |
<gh_stars>10-100
create table courses (
id varchar(32) not null primary key,
name varchar(50) not null,
price real not null,
online bool not null,
days bigint not null
);
|
<reponame>tan9/spring-security
create table users(principal varchar_ignorecase(50) not null primary key,credentials varchar_ignorecase(50) not null);
create table roles (principal varchar_ignorecase(50) not null,role varchar_ignorecase(50) not null,constraint fk_roles_users foreign key(principal) references users(princ... |
ALTER TABLE `dice_autotest_exec_history` ADD INDEX `idx_step_id` (`step_id`);
ALTER TABLE `dice_autotest_exec_history` ADD INDEX `idx_scene_id` (`scene_id`);
ALTER TABLE `dice_autotest_exec_history` ADD INDEX `idx_project_id_iteration_id_type_execute_time` (`project_id`, `iteration_id`, `type`, `execute_time`); |
<filename>fixtures/doctests/plpython/027/input.sql
CREATE FUNCTION usesavedplan() RETURNS trigger AS $$
if "plan" in SD:
plan = SD["plan"]
else:
plan = plpy.prepare("SELECT 1")
SD["plan"] = plan
# rest of function
$$ LANGUAGE plpythonu;
|
-- This is how I set up the asn db with sqlite
CREATE TABLE "ip2proxy" (
"ip_from" integer UNSIGNED,
"ip_to" integer UNSIGNED,
"proxy_type" VARCHAR(3),
"country_code" CHAR(2),
"country_name" VARCHAR(64),
"region_name" VARCHAR(128),
"city_name" VARCHAR(128),
"isp" VARCHAR(256)
);
CREATE INDEX idx_ip_from on ip... |
BEGIN;
select _v.unregister_patch( '001-table-comments' );
comment on table autoclaved is NULL;
comment on table software is NULL;
comment on table report is NULL;
comment on table badblob is NULL;
comment on table input is NULL;
comment on table measurement is NULL;
comment on table domain is NULL;
comment on table ... |
-- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 29, 2018 at 06:50 AM
-- Server version: 10.1.34-MariaDB
-- PHP Version: 7.2.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
<reponame>ebtisamNasrSerag/blog-laravel-
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 17, 2019 at 06:39 PM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.3.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET ... |
DELETE FROM currency WHERE currency.name = 'Delirium Orb'; |
USE didactinaut_dev;
DELIMITER $$
DROP PROCEDURE IF EXISTS AddLesson $$
CREATE PROCEDURE AddLesson (
IN _title VARCHAR(50),
IN _text MEDIUMTEXT,
IN _section_id INT
)
BEGIN
INSERT INTO Lessons (
lesson_title,
lesson_text,
section_id
)
VALUES (
_title,
_text,
_section_id
);
S... |
<filename>tests/DbMigration/Console/Command/_files/migs_invalid/invalid.sql<gh_stars>0
invalid query;
|
SELECT DISTINCT PL.name, T1.team_name, T1.tallest_height FROM
player PL JOIN season_team SET ON PL.player_id = SET.player_id
JOIN team TT ON TT.team_id = SET.team_id
JOIN
(SELECT T.name AS team_name, MAX(P.height) AS tallest_height
FROM player P JOIN season_team ST ON P.player_id = ST.player_id
JOIN team... |
<reponame>Eve002/kp_websiteECC
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 02, 2020 at 10:41 AM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.4.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!401... |
<filename>resources/todomvc/migrations/001-add-tasks.down.sql
drop table if exist tasks;
|
CREATE VIEW Sources.SectionDetail
AS
SELECT s.SectionKey,
s.BookKey,
s.ParentSectionKey,
s.SectionName,
s.PageReference,
s.DisplayOrder,
b.BookName,
(
SELECT COUNT(*)
FROM Interpretations.Video v
WHERE v.SectionKey = s.SectionKey
... |
<filename>src/SFA.Apprenticeships.Data.AvmsPlus/dbo/Stored Procedures/uspTrainingProviderLocationInsert.sql
CREATE PROCEDURE [dbo].[uspTrainingProviderLocationInsert]
@ProviderSiteId INT
,@ProviderSiteRelationshipTypeId INT
,@ProviderId INT
,@LocalAuthorityId INT
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra ... |
<reponame>soyosolution/CodeIgniter-pagination-library
-- phpMyAdmin SQL Dump
-- version 4.0.4
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Dec 05, 2014 at 01:36 AM
-- Server version: 5.6.12-log
-- PHP Version: 5.4.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101... |
<gh_stars>10-100
-- file:dependency.sql ln:56 expect:true
REASSIGN OWNED BY regress_dep_user1 TO regress_dep_user0
|
call _create_array(@array_id);
call _push_array_element(@array_id, 'x');
set @s := CONCAT('SELECT value FROM ', _get_array_name(@array_id), ' WHERE array_key = 1 INTO @val');
call exec_single(@s);
SELECT @val = 'x';
|
;WITH cte AS
(SELECT
x.value('(//Record/ConnectivityTraceRecord/RecordType)[1]', 'varchar(30)') AS [RecordType],
x.value('(//Record/ConnectivityTraceRecord/RecordSource)[1]', 'varchar(30)') AS [RecordSource],
x.value('(//Record/ConnectivityTraceRecord/Spid)[1]', 'int') AS [Spid],
x.value('(//Record/Connectivity... |
<filename>backend/de.metas.adempiere.adempiere/migration/src/main/sql/postgresql/system/10-de.metas.adempiere/5470750_sys_gh532webui_always_show_IsLazyLoading_field.sql<gh_stars>1000+
-- 2017-09-04T19:05:25.954
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Field SET DisplayLogic='',Updated... |
<filename>tpcms.sql
/*
Navicat MySQL Data Transfer
Source Server : lll
Source Server Version : 50617
Source Host : localhost:3306
Source Database : tpcms
Target Server Type : MYSQL
Target Server Version : 50617
File Encoding : 65001
Date: 2019-05-09 16:37:02
*/
SET FOREIGN_KEY_CHE... |
<gh_stars>1-10
with events as (
select
e.dup_actor_login as actor,
af.{{company_name}}
from
gha_events e
left join
gha_actors_affiliations af
on
e.actor_id = af.actor_id
and af.dt_from <= e.created_at
and af.dt_to > e.created_at
where
e.created_at >= '{{dtfrom}}'
and e.crea... |
<filename>Voyage.Database/Scripts/Seed/ClientScopeType.sql<gh_stars>1-10
WITH ClientScopeType_CTE
AS (
SELECT *
FROM (
VALUES (N'ef9281e3-18b3-4728-9ecd-0a1b0b4b783f'
,N'Profile'
,N'Profile SCope'
,N'<EMAIL>'
,'Jan 1 2017 1:29PM'
,N'<EMAIL>'
,'Jan 1 2017 1:29PM'
,0)
,(N'08901a74-c7e3-418e-9... |
DROP TABLE IF EXISTS reshare_derived.sup_stats;
-- Create a derived table containing information about supplier statistics
CREATE TABLE reshare_derived.sup_stats AS
SELECT
pra."__origin" AS ss_supplier,
pra.pra_id AS ss_id,
pra.pra_patron_request_fk AS ss_req_id,
pra.pra_date_created AS ss_date_created... |
-- @testpoint: alter table 为新增列添加check约束,在违背条件时合理报错
drop table if exists alter_table_tb012;
CREATE TABLE alter_table_tb012 ( a VARCHAR(255) null, b CLOB NULL, c varchar(10) default 'abc');
insert into alter_table_tb012 values('3','3','4');
insert into alter_table_tb012 values('3','3','');
insert into alter_table_tb012... |
-- MySQL dump 10.17 Distrib 10.3.17-MariaDB, for Linux (x86_64)
--
-- Host: localhost Database: ai_game_db
-- ------------------------------------------------------
-- Server version 10.3.17-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTE... |
<filename>public/uploads/files/arcedu.sql.sql
INSERT INTO `environments` (`env_id`, `type`, `area`, `flat`, `code`, `busy`, `delete`, `created_at`, `updated_at`) VALUES
(1, 'Departamento', 45.50, 1, 'A-1', 0, 0, '2016-02-09 04:08:58', '2016-02-09 07:41:36'),
(2, 'Departamento', 67.50, 1, 'A-2', 1, 0, '2016-02-09 04:13:... |
<filename>skripsi_fiqroh.sql
-- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: 27 Jul 2020 pada 08.33
-- Versi Server: 10.1.44-MariaDB-0ubuntu0.18.04.1
-- PHP Version: 7.4.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40... |
<filename>sql/cms.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.9.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Aug 23, 2020 at 06:51 AM
-- Server version: 5.7.24
-- PHP Version: 7.2.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone =... |
<gh_stars>0
--------------------------------------------------------
-- DDL for Trigger SOK_PRODUCT_TG
--------------------------------------------------------
CREATE OR REPLACE TRIGGER "SOK_PRODUCT_TG"
BEFORE INSERT OR UPDATE
ON SOK_PRODUCT_LU
FOR EACH ROW
BEGIN
IF INSERTING
THEN
:NEW... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.0.10.7
-- http://www.phpmyadmin.net
--
-- Client: localhost
-- Généré le: Mer 26 Août 2015 à 22:18
-- Version du serveur: 5.6.25-73.1
-- Version de PHP: 5.4.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH... |
<filename>schema.sql<gh_stars>1-10
# heroku config -s | grep DATABASE_URL
# psql $DATABASE_URL
DROP TABLE IF EXISTS oauth_states;
CREATE TABLE oauth_states (
state char(1024) not null,
ip_address inet not null,
created timestamp without time zone
);
ALTER TABLE oauth_states ALTER created SET default now()... |
-- Demonstration data for Species Autocomplete.
-- For use in SQLite 3.
INSERT INTO names (canonicalName, acceptedName, family, source) VALUES
('Panthera tigris', 'Panthera tigris', 'Felidae', 'http://en.wikipedia.org/wiki/Panthera_tigris');
INSERT INTO names (canonicalName, acceptedName, family, source) VALUES
... |
DROP TABLE IF EXISTS employee;
CREATE TABLE employee (
id INT AUTO_INCREMENT PRIMARY KEY,
firstName VARCHAR(250) NOT NULL,
lastName VARCHAR(250) NOT NULL,
career VARCHAR(250) DEFAULT NULL
);
INSERT INTO employee (id,firstName, lastName, career) VALUES
(1,'adarsh', 'kumar', 'It'),
(2,'radha', 'singh', 'IT... |
<gh_stars>1-10
ALTER TABLE pv_reviews ALTER COLUMN "external_id" TYPE Character Varying( 255 ); |
CREATE PROCEDURE [dbo].[uspGetApplicationUnsuccessfulReasonTypeById]
@ApplicationUnsuccessfulReasonTypeId INT
AS
BEGIN
SET NOCOUNT ON
SELECT ApplicationUnsuccessfulReasonTypeId,
CodeName,
ShortName,
FullName,
ReferralPoints,
CandidateDisplayText,
CandidateFullName,
Withdrawn
FROM Applica... |
-- phpMyAdmin SQL Dump
-- version 4.8.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 19, 2020 at 08:27 AM
-- Server version: 10.1.31-MariaDB
-- PHP Version: 7.2.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
select d.dept_name,
concat(e.first_name,' ',e.last_name) as name,
TIMESTAMPDIFF(DAY,de.from_date,de.to_date) AS total_dias
from employees e
inner join dept_emp de on e.emp_no = de.emp_no
inner join departments d on d.dept_no = de.dept_no
order by total_dias desc
LIMIT 10; |
drop table system_data;
create table system_data
(
key varchar(255) primary key,
value text not null,
type varchar(100),
updated_at timestamptz
);
insert into system_data
values ('term_and_condition', 'this is example Term and Condition', 'document', now()); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.