sql stringlengths 6 1.05M |
|---|
<reponame>makersoft/mybatis-shards<gh_stars>100-1000
drop table if exists MAKER_SHARDS_USER;
drop table if exists MAKER_SHARDS_ROLE;
drop table if exists MAKER_SHARDS_DEPT; |
<reponame>igarny/pscheduler
--
-- Support for requester proxying
--
DO $$
BEGIN
IF NOT EXISTS (SELECT * FROM auth_key_type WHERE NAME = 'requester')
THEN
INSERT INTO auth_key_type (name) VALUES ('requester');
END IF;
END;
$$ LANGUAGE plpgsql;
|
--
-- INFI_TB_805_TRNFIN_TIPO (Table)
--
CREATE TABLE ADM_INFI.INFI_TB_805_TRNFIN_TIPO
(
TRNFIN_TIPO VARCHAR2(3 BYTE) NOT NULL,
TRNFIN_TIPO_DESCRIPCION VARCHAR2(20 BYTE) NOT NULL
)
TABLESPACE DATA
PCTUSED 0
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
IN... |
<reponame>summerKK/wolf<gh_stars>0
/*
Navicat MySQL Data Transfer
Source Server : ๆฌๅฐ่ฟๆฅ
Source Server Version : 50547
Source Host : localhost:3306
Source Database : wolf
Target Server Type : MYSQL
Target Server Version : 50547
File Encoding : 65001
Date: 2017-03-21 17:35:45
*/
SET ... |
<filename>database/ngingasdb.sql
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 27, 2021 at 08:37 PM
-- Server version: 10.4.19-MariaDB
-- PHP Version: 8.0.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!4... |
CREATE TABLE etl_user (
practice_code VARCHAR(50) NOT NULL PRIMARY KEY
, email_address VARCHAR(500) NOT NULL
)
;
|
<gh_stars>0
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.5.2
-- Dumped by pg_dump version 9.5.2
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 row_secu... |
<filename>sql/insertConfronto.sql
-- select * from
-- delete from confronto where inventario_id=1;
-- insert into confronto (inventario_id, base_id, cod_barra, cod_interno, descricao_item, valor_custo, saldo_estoque, qtd_inventario)
select *, t.qtd_inventario-t.saldo_estoque qtd_divergencia, TRUNCATE(t.qtd_inventario... |
CREATE TABLE `aluno`(
`id` int not null PRIMARY KEY AUTO_INCREMENT,
`nome` varchar(60) not null,
`serie` varchar(20) not null,
`ra` varchar(20) not null,
`usuario` varchar(50) not null,
`senha` varchar(500) not null
);
CREATE TABLE `professor`(
`id` int not null PRIMARY KEY AUTO_INCREMENT,
`nome` varchar(60) ... |
<filename>mysql/test.sql
/*
Navicat MySQL Data Transfer
Source Server : myๆฐๆฎๅบ
Source Server Version : 50553
Source Host : localhost:3306
Source Database : test
Target Server Type : MYSQL
Target Server Version : 50553
File Encoding : 65001
Date: 2020-02-14 23:25:47
*/
SET FOREIGN_K... |
/*
* Copyright 2021 (c) <NAME>
*
* Tabla de documentos financiados
* URL: http://localhost/phpmyadmin/
*/
DELIMITER //
DROP TABLE IF EXISTS DocumentosFinanciados //
CREATE TABLE DocumentosFinanciados (
DocumentoID INTEGER NOT NULL,
FinanciamientoID INTEGER NOT NULL,
Moneda TEXT NOT NULL, -- US... |
<reponame>Galang17061/ketikaku<gh_stars>0
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 10.1.40-MariaDB - mariadb.org binary distribution
-- Server OS: Win64
-- HeidiSQL Version: 10.2.0.5599
-- -----... |
-- MySQL dump 10.13 Distrib 5.5.41, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: rwt
-- ------------------------------------------------------
-- Server version 5.5.41-0ubuntu0.12.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARA... |
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Hรดte : localhost
-- Gรฉnรฉrรฉ le : Dim 17 dรฉc. 2017 ร 16:04
-- Version du serveur : 10.1.21-MariaDB
-- Version de PHP : 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101... |
INSERT INTO eg_appconfig ( ID, KEY_NAME, DESCRIPTION, VERSION, MODULE ) VALUES (nextval('SEQ_EG_APPCONFIG'),'SLAFORNEWADVERTISEMENT','NEW ADVERTISEMENT SLA VALUE',0, (select id from eg_module where name='Advertisement Tax'));
INSERT INTO eg_appconfig_values ( ID, KEY_ID, EFFECTIVE_FROM, VALUE, VERSION ) VALUES (nextva... |
<gh_stars>1-10
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/* ***************************************************************************************
This function Left Zero Fills an Integer variable @ID to a given size @Length.
*/
CREATE FUNCTION [dbo].[SpaceFillInLeft] (@ID INT, @Length INT)
RETURNS VARCHAR(... |
CREATE DATABASE IF NOT EXISTS `db_persons` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_spanish_ci */;
USE `db_persons`;
-- MySQL dump 10.13 Distrib 8.0.24, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: db_persons
-- ------------------------------------------------------
-- Server version 5.7.24
/*!40101... |
-- phpMyAdmin SQL Dump
-- version 4.0.10
-- http://www.phpmyadmin.net
--
-- ะฅะพัั: 127.0.0.1:3306
-- ะัะตะผั ัะพะทะดะฐะฝะธั: ะะตะบ 07 2014 ะณ., 22:27
-- ะะตััะธั ัะตัะฒะตัะฐ: 5.5.38-log
-- ะะตััะธั PHP: 5.4.26
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT... |
<gh_stars>10-100
-- phpMyAdmin SQL Dump
-- version 4.0.3
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: May 01, 2015 at 10:27 PM
-- Server version: 5.5.41-0ubuntu0.14.04.1
-- PHP Version: 5.5.9-1ubuntu4.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHAR... |
DROP TABLE IF EXISTS `profession_new`;
CREATE TABLE `profession_new` (
`id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`parent_id` smallint(5) unsigned DEFAULT NULL,
`name` varchar(255) NOT NULL,
PRIMARY KEY (`id`),
CONSTRAINT `FK_profession_profession` FOREIGN KEY (`parent_id`) REFERENCES `profession_new`... |
-- file:copy2.sql ln:184 expect:false
a0
b
\.
COMMIT
|
<gh_stars>10-100
-- file:aggregates.sql ln:296 expect:true
explain (costs off)
select max(unique2) from tenk1 order by max(unique2)+1
|
<filename>src/test/resources/sql/lock/a1810d19.sql
-- file:hs_standby_disallowed.sql ln:76 expect:true
LOCK hs1 IN SHARE MODE
|
<filename>migration/0001_pulses.sql
CREATE TABLE key_value (
k varchar(256) primary key,
v bytea not null
);
create table pulses(
pulse_number bigint primary key,
prev_pn bigint not null,
next_pn bigint not null,
tstamp bigint not null,
epoch bigint not null,
origin_id bytea not null,
entropy byt... |
<gh_stars>10-100
DROP TABLE IF EXISTS hmda_public.panel_2015;
CREATE TABLE hmda_public.panel_2015 (
activity_year VARCHAR,
respondent_id VARCHAR,
agency_code VARCHAR,
parent_respondent_id VARCHAR,
parent_name VARCHAR,
filler VARCHAR,
parent_city VARCHAR,
parent_state VARCHAR,
region ... |
-- @author <NAME> <EMAIL>
-- Add some new locales
insert into ad_locales
(locale, label, language, country, nls_language, nls_territory,
nls_charset, mime_charset, default_p, enabled_p)
values ('es_GT', 'Spanish (GT)', 'es', 'GT', 'SPANISH',
'GUATEMALA', 'WE8DEC', 'ISO-8859-1', 't', 'f');
--... |
--------------------------------------------------------------------------------------------------------------------------------
-- Script: is_role_granted.sql
-- Licence: Apache License 2.0
-- Author: <EMAIL>
-- Version: 2021.10.14
--
-- Description: Function CTL.SECURITY.IS_ROLE_GRANTED
-- ... |
<filename>db/migrations/000002_create_asset_table.up.sql
CREATE TABLE IF NOT EXISTS asset(
ID SERIAL PRIMARY KEY,
class VARCHAR(100) NOT NULL,
exchange TEXT,
symbol TEXT,
name TEXT,
status TEXT,
tradable BOOLEAN,
marginale BOOLEAN,
shortable BOOLEAN,
easyToBorrow BOOLEAN,
fractionable BOOLEAN,
isWatchlist BOOLEAN,
cre... |
<reponame>RomanBelkov/YaccConstructor
CREATE TABLE JRXML_LOGGING (
JRL_ID NUMBER NOT NULL,
JRL_RUN_ID NUMBER NOT NULL,
JRL_TIME TIMESTAMP NOT NULL,
JRL_TIME_SINCE_LAST_LOG NUMBER NOT NULL,
JRL_TEXT VARCHAR2(4000)
);
ALTER TABLE JRXML_LOGGING... |
<filename>src/Frapid.Web/Areas/MixERP.Finance/db/SQL Server/2.x/2.0/src/01.types-domains-tables-and-constraints/02.functions-and-logic/finance.is_eod_initialized.sql
๏ปฟIF OBJECT_ID('finance.is_eod_initialized') IS NOT NULL
DROP FUNCTION finance.is_eod_initialized;
GO
CREATE FUNCTION finance.is_eod_initialized(@of... |
-- What 'managed' tables are NOT under the 'database' default location.
--
-- This could affect permissions and security around these tables.
--
-- Variables:
-- DB - The database you placed the hms dump table.
-- ENV - IE: dev,qa,prod. Used to support multiple
-- environm... |
-- Country OIDs
-- Use the tool dev/generate_wellknown_country_mssql to generate this file
INSERT INTO [asn1id] (oid, name, standardized, well_known) VALUES ('oid:1.2.36', 'au', '0', '1');
INSERT INTO [iri] (oid, name, longarc, well_known) VALUES ('oid:1.2.36', 'AU', '0', '1');
INSERT INTO [asn1id] (oid, name, standar... |
<reponame>AnthonyMolinaro/ETL-LambdaBuilder<filename>sources/Builders/org.ohdsi.cdm.builders.optumintegrated/OptumIntegrated/Lookups/DrugNlp.sql
๏ปฟ{Source_to_Standard}
SELECT SOURCE_CODE, TARGET_CONCEPT_ID, TARGET_DOMAIN_ID
FROM CTE_VOCAB_MAP
WHERE lower(SOURCE_VOCABULARY_ID) = 'jnj_optum_nlp_drug' |
select name, id, description
from gcp.gcp_compute_instance
where name = ''; |
-- Template for inserting new profile given by `@{user-name}`.
-- Enter the database
USE @{database};
-- Create the profile
INSERT INTO Profile(UserEmail, UserName, UserType, UserImage,
StyleSheet, PreferredLanguage)
VALUES(@{user-email}, @{user-name}, @{user-type}, @{user-image},
@{style-sheet}, @{preferre... |
<gh_stars>0
-- noinspection SqlNoDataSourceInspectionForFile
-- PostgreSQL 9.6
-- '\\' is a delimiter
-- select version() as postgresql_version
CREATE TABLE IF NOT EXISTS entities (
entity_id serial PRIMARY KEY NOT NULL,
name varchar(32) NOT NULL,
location varchar(32) NOT NULL,
deleted boolean NOT NULL DEF... |
<reponame>Organol/Formulashm<gh_stars>0
Tabel Emitem(
Kode;
Nama Emitem;
Sektor;
)
// Kapitalisasi Pasar adalah Nilai dari jumlah saham beredar
dikali dengan harga saham;
Table Neraca(
Pk Neraca;
FK Kode;
Aset int ;
Liabilitas int;
Modal/Ekuitas;
Satuan; Enum (Penuh, Jutaan, Ribuan, Jutaan, Miliaran)
Mata ... |
<reponame>tongchuan/laravl
drop table if exists `t_news_type`;
create table `t_news_type` (
`id` int(11) unsigned auto_increment not null comment 'id ่ชๅจๅข้ฟ',
`parentid` int(11) default null comment '็ถ็ฑปid',
`name` varchar(200) not null default '' comment 'ๅ็งฐ',
`cnname` varchar(200) default null comment 'ไธญๆๅ็งฐ',
... |
<filename>sql/insert.sql
INSERT INTO Pais (id_pais, nome_pais) VALUES (0, 'Portugal');
INSERT INTO Pais (id_pais, nome_pais) VALUES(1, 'Senegal');
INSERT INTO Pais (id_pais, nome_pais) VALUES(2, 'France');
INSERT INTO Pais (id_pais, nome_pais) VALUES(3, 'England');
INSERT INTO Pais (id_pais, nome_pais) VALUES(4, 'Spain... |
CREATE TABLE Towns(
Id INT PRIMARY KEY IDENTITY,
[Name] VARCHAR(50) NOT NULL
)
CREATE TABLE Addresses(
Id INT PRIMARY KEY IDENTITY,
AddressText VARCHAR(100) NOT NULL,
TownId INT FOREIGN KEY REFERENCES Towns(Id)
)
CREATE TABLE Departments(
Id INT PRIMARY KEY IDENTITY,
[Name] VARCHAR(50)
)
CREATE TABLE Employee... |
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';
DROP SCHEMA IF EXISTS `twitter` ;
CREATE SCHEMA IF NOT EXISTS `twitter` DEFAULT CHARACTER SET utf8 ;
USE `twitter` ;... |
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` int(4) NOT NULL AUTO_INCREMENT,
`username` varchar(50) NOT NULL,
`email` varchar(50) NOT NULL,
`password_hash` varchar(100) NOT NULL,
`role` varchar(10) NOT NULL,
PRIMARY KEY (`id`),
KEY `index_of_username` (`username`),
KEY `index_of_email` (`emai... |
-- IDEMPIERE-918
-- May 22, 2018 3:17:13 PM CEST
INSERT INTO AD_Process (AD_Process_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,Description,Help,IsReport,Value,IsDirectPrint,Classname,AccessLevel,EntityType,Statistic_Count,Statistic_Seconds,IsBetaFunctionality,IsServerProcess,ShowHelp,Co... |
DROP DATABASE IF EXISTS employee_db;
CREATE DATABASE employee_db;
USE employee_db;
CREATE TABLE department(
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(30),
PRIMARY KEY (id)
);
CREATE TABLE roles(
id INT NOT NULL AUTO_INCREMENT,
title VARCHAR(30) NOT NULL,
salary DECIMAL NOT NULL,
dep... |
<filename>src/test/resources/sql/select/9055e484.sql<gh_stars>10-100
-- file:rangefuncs.sql ln:9 expect:true
select * from foot(1) with ordinality as z(a,b,ord)
|
-- file:triggers.sql ln:1831 expect:true
insert into trig_table values
(1, 'one a'),
(1, 'one b'),
(2, 'two a'),
(2, 'two b'),
(3, 'three a'),
(3, 'three b')
|
<reponame>djerem02/SchoolIn<filename>sql/schoolIn.sql
/*โ
phpMyAdmin
AccueilDocumentation de phpMyAdminDocumentationActualiser le panneau de navigation
RรฉcentesPrรฉfรฉrรฉes
Tout rรฉduireSupprimer la liaison au panneau principal
Nouvelle base de donnรฉes
Dรฉvelopper/rรฉduireOpรฉrations sur base de donnรฉesinformation_schema
Dรฉve... |
DROP TABLE IF EXISTS `max_poly`; |
<filename>DB/CasaMitote.sql
-- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Mar 16, 2016 at 10:56 PM
-- Server version: 5.5.44-0ubuntu0.14.04.1
-- PHP Version: 5.5.9-1ubuntu4.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- ... |
/*
Navicat MySQL Data Transfer
Source Server : zhidao@docker
Source Server Version : 50725
Source Host : 192.168.99.100:3306
Source Database : zhidao
Target Server Type : MYSQL
Target Server Version : 50725
File Encoding : 65001
Date: 2019-04-01 17:42:42
*/
SET FOREIGN_KEY_CHECKS=... |
<gh_stars>10-100
CREATE PROCEDURE SP862(OUT MYCOUNT INTEGER) SPECIFIC SP862_54744 LANGUAGE SQL NOT DETERMINISTIC READS SQL DATA NEW SAVEPOINT LEVEL BEGIN ATOMIC DECLARE MYVAR INT;SELECT COUNT(*)INTO MYCOUNT FROM TABLE420;SELECT COUNT(*)INTO MYCOUNT FROM TABLE450;SELECT COUNT(*)INTO MYCOUNT FROM TABLE87;SELECT COUNT(*)I... |
<filename>models/tmp/stg_hubspot__company_tmp.sql<gh_stars>1-10
{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_company_enabled'])) }}
select *
from {{ var('company') }}
|
-- phpMyAdmin SQL Dump
-- version 4.0.5
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1:3306
-- Generation Time: Oct 18, 2015 at 10:32 AM
-- Server version: 5.5.43-0ubuntu0.14.10.1
-- PHP Version: 5.5.23
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHA... |
/*L
Copyright SAIC
Distributed under the OSI-approved BSD 3-Clause License.
See http://ncip.github.com/cabio/LICENSE.txt for details.
L*/
--
-- SET_SNP_REP_ID (Trigger)
--
-- Dependencies:
-- SNP_REPORTER (Table)
--
CREATE OR REPLACE TRIGGER SET_snp_rep_ID
BEFORE INSERT
ON SNP_REPORTER
FOR EACH ROW
BEG... |
<gh_stars>10-100
ALTER TABLE "public"."AttendeeProfile" ADD COLUMN "photoS3URL_350x350" text;
ALTER TABLE "public"."AttendeeProfile" ALTER COLUMN "photoS3URL_350x350" DROP NOT NULL;
|
<reponame>anthill-platform/anthill-environment
CREATE TABLE `scheme` (
`key` int(11) NOT NULL DEFAULT '1',
`data` json NOT NULL,
PRIMARY KEY (`key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
<filename>Databases Basics/02.BasicCRUD/15.CreateViewSalaries.sql
CREATE VIEW v_EmployeesSalaries
AS
SELECT FirstName, LastName, Salary
FROM Employees
|
ALTER TABLE kanban_tasks ADD COLUMN checklists jsonb;
|
create user codenautas_user password '<PASSWORD>';
create database test_codenautas_db with owner = codenautas_user; |
<reponame>addugger/pricetracker
truncate table tcgp.tcgp_sku;
delete from tcgp.tcgp_product where 1 = 1;
delete from tcgp.tcgp_condition where 1 = 1;
delete from tcgp.tcgp_language where 1 = 1;
delete from tcgp.tcgp_printing where 1 = 1;
delete from tcgp.tcgp_rarity where 1 = 1;
delete from tcgp.tcgp_group where ... |
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 13, 2020 at 05:40 PM
-- 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_zone = "+00:00";
/*!40101 SET @OL... |
<gh_stars>0
/* Replace with your SQL commands */
ALTER TABLE `batchTransfer` ADD `sendStatus` varchar(100) NOT NULL DEFAULT ''
|
<reponame>inbo/speciesbim
INSERT INTO scientificname ("deprecatedTaxonId", "scientificName", "authorship")
SELECT id, acceptedname, scientificnameauthorship FROM biodiv.taxon WHERE
id IN (SELECT nptaxonid FROM biodiv.commontaxa) OR
id IN (SELECT taxonid FROM biodiv.media) OR
id IN (SELECT taxonid FROM biodiv.identifiab... |
<filename>db/db/3table/level/TB_VOUCHER_MOVE.sql
drop table if exists TB_VOUCHER_MOVE;
/*==============================================================*/
/* Table: TB_VOUCHER_MOVE */
/*==============================================================*/
create table TB_VOUCHER_MOVE... |
<reponame>tushartushar/dbSmellsData<filename>data/open-source/extracted_sql/Sarabveer_SourceBans.sql
select orgname from users where user='JOHN'
SELECT * FROM `" . DB_PREFIX . "_mods` WHERE `modfolder` = 'eye';
SELECT * FROM `" . DB_PREFIX . "_settings` WHERE `setting` = 'config.enablesteamlogin';
select * from adoxyz ... |
SELECT
A.transaction_type_id,
A.code,
COALESCE(B.type_count,0) as code_count
FROM transaction_type AS A
LEFT JOIN (
SELECT A.transaction_type_id,
COUNT(A.transaction_id) AS type_count
FROM deposit_transactions AS A
GROUP BY A.transaction_type_id
) AS B
USING (transaction_type_id)
ORDER BY A.transaction_type... |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generaciรณn: 17-02-2020 a las 16:14:37
-- Versiรณn del servidor: 10.4.6-MariaDB
-- Versiรณn de PHP: 7.3.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";... |
WITH film_categories AS
(
SELECT
CASE
WHEN length < 60 THEN 'short'
WHEN length >= 60 AND length < 100 THEN 'medium'
WHEN length >= 100 THEN 'long'
END film_category
FROM film
)
SELECT
film_category,
COUNT(film_category)
FROM film_categories
GROUP BY film_category |
<filename>src/test/resources/sql/alter_table/c2b1f1d7.sql
-- file:inherit.sql ln:186 expect:true
alter table oid_child set with oids
|
-- 2017-11-29T12:28:03.130
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Menu (Action,AD_Client_ID,AD_Menu_ID,AD_Org_ID,AD_Window_ID,Created,CreatedBy,Description,EntityType,InternalName,IsActive,IsCreateNew,IsReadOnly,IsSOTrx,IsSummary,Name,Updated,UpdatedBy,WEBUI_NameBrowse) VALUES ... |
-- phpMyAdmin SQL Dump
-- version 4.7.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: 2017-12-05 11:29:11
-- ๆๅกๅจ็ๆฌ๏ผ 5.7.20-0ubuntu0.16.04.1
-- PHP Version: 7.0.22-0ubuntu0.16.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40... |
<gh_stars>1-10
DROP TABLE IF EXISTS finance_transactions;
CREATE TABLE finance_transactions AS
SELECT
id::varchar(36),
jsonb_extract_path_text(jsonb, 'amount')::numeric(12,2) AS amount,
jsonb_extract_path_text(jsonb, 'currency')::varchar(65535) AS currency,
jsonb_extract_path_text(jsonb, 'description')... |
INSERT INTO `bla_alarm_category` (`alarm_category_id_`, `name_`, `description_`) VALUES ('3', 'over-current', '่ฟๆตๅ่ญฆ');
INSERT INTO `bla_alarm_category` (`alarm_category_id_`, `name_`, `description_`) VALUES ('4', 'under-current', 'ๆฌ ๆตๅ่ญฆ');
INSERT INTO `bla_alarm_category` (`alarm_category_id_`, `name_`, `description_`) ... |
<reponame>SkygearIO/skygear-server
DROP SEQUENCE _auth_event_sequence;
|
<gh_stars>1-10
CREATE TABLE BPS_BPMN_DEPLOYMENT_METADATA (
ID_ VARCHAR(64),
NAME_ VARCHAR(255),
TENANT_ID_ VARCHAR(255),
CHECK_SUM_ VARCHAR(1024),
primary key (ID_)
);
|
set transaction serializable
select count(*) from jepsen
|
<reponame>EIDSS/EIDSS-Legacy
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[spLabBatch_RemoveTest]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[spLabBatch_RemoveTest]
GO
create proc spLabBatch_RemoveTest
@... |
<reponame>sql-boot/postgres-health-scripts
/*{
"name": "pg_stat_activity",
"title": "Database processes",
"description": "The pg_stat_activity view will have one row per server process, showing information related to the current activity of that process",
"tags": "ui"
}*/
select datname /* { "text": "... |
INSERT INTO `t_user` VALUES (default ,'admin0', '123456', '1', '<EMAIL>', '15800378364', 1, '2020-08-24 18:15:29', NULL, '2020-08-24 18:15:29');
INSERT INTO `t_user` VALUES (default ,'admin1', '123456', '2', '<EMAIL>', '15800378366', 1, '2020-08-25 18:15:29', NULL, '2020-08-25 18:15:29');
|
<reponame>yaseenagag/intriguing-mongoose
-- dropdb intriguing-mongoose
-- createdb intriguing-mongoose
-- psql intriguing-mongoose < schema.sql
CREATE TABLE "topping" (
"id" SERIAL NOT NULL ,
"name" VARCHAR(80) NOT NULL DEFAULT 'NULL' ,
"price" MONEY,
PRIMARY KEY ("id")
);
CREATE TABLE "crust" (
"id" SERIAL NOT... |
<reponame>rrpathi/codeigniter-curd-using-ajax
-- Adminer 4.3.1 MySQL dump
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
CREATE DATABASE `codeigniter` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `codeigniter`;
DROP TABLE IF EXISTS `employees`;
CREATE T... |
<reponame>nfabiop/HackerRank
SELECT T.col_2
FROM
(
SELECT 1 as "col_1",'* * * * * * * * * * * * * * * * * * * *' as "col_2"
UNION
SELECT 2 as "col_1",'* * * * * * * * * * * * * * * * * * *' as "col_2"
UNION
SELECT 3 as "col_1",'* * * * * * * * * * * * * * * * * *'
UNION
SELECT 4 as "col_1",'* * * * * * * * * * * * * *... |
CREATE TABLE `cinque_users` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`first_name` varchar(255) NOT NULL,
`last_name` varchar(255) NOT NULL,
`email` varchar(255) DEFAULT NULL,
`password` varchar(255) DEFAULT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`created_by` int(11) ... |
DELETE FROM users;
DELETE FROM member;
DELETE FROM editor;
DELETE FROM reviewer;
DELETE FROM makelaar;
ALTER TABLE users DROP id_user;
ALTER TABLE users AUTO_INCREMENT = 1;
ALTER TABLE users ADD id_user int(11) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST;
ALTER TABLE member DROP id_member;
ALTER TABLE member A... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generaciรณn: 06-05-2020 a las 18:33:16
-- Versiรณn del servidor: 10.4.11-MariaDB
-- Versiรณn de PHP: 7.4.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHA... |
๏ปฟSET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Question](
[Id] [nvarchar](128) NOT NULL,
[QuestionTypeId] [nvarchar](128) NOT NULL,
[Text] [nvarchar](max) NOT NULL,
CONSTRAINT [PK_Question] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_K... |
<filename>models/schema.sql
DROP DATABASE IF EXISTS pawstagram_db;
CREATE DATABASE pawstagram_db;
USE pawstagram_db; |
\set libfile '\''`pwd`'/aesgcm.so\''
-- Install the library with a test prefix.
CREATE OR REPLACE LIBRARY TEST_AESGCM AS :libfile;
CREATE OR REPLACE FUNCTION TEST_AESGCM_Decrypt AS LANGUAGE 'C++' NAME 'AESGCMDecryptFactory' LIBRARY TEST_AESGCM;
CREATE OR REPLACE FUNCTION TEST_AESGCM_Decrypt AS LANGUAGE 'C++' NAME 'AES... |
<gh_stars>100-1000
-- Create view basic syntax
CREATE VIEW experienced_employee_extended AS SELECT * from experienced_employee ;
-- Create VIEW with all optional syntax
CREATE OR REPLACE GLOBAL TEMPORARY VIEW IF NOT EXISTS experienced_employee
(ID COMMENT 'Unique identification number', Name)
COMMENT 'View for experie... |
<reponame>singhshubham98/Army-Database<gh_stars>1-10
SET SEARCH_PATH TO armydb;
insert into posting values (12045,382425,'2012-01-07');
insert into posting values (21040,382425,'2014-04-15');
insert into posting values (22045,382425,'2011-12-26');
insert into posting values (19338,382425,'2012-10-01');
insert into post... |
<reponame>Aaron-Shrike/sistema-gestion-productos
CREATE TABLE Personal
(
Codigo SMALLINT AUTO_INCREMENT,
Nombres VARCHAR(35) NOT NULL,
ApellidoPaterno VARCHAR(20) NOT NULL,
ApellidoMaterno VARCHAR(20) NOT NULL,
DNI varchar(8) NOT NULL,
Celular C... |
<filename>gnrs_db/sql/drop_bien2_tables.sql<gh_stars>1-10
DROP TABLE IF EXISTS state_province_bien2;
DROP TABLE IF EXISTS county_parish_bien2;
|
<reponame>softwaregroup-bg/ut-alert<gh_stars>0
DECLARE @itemNameTranslationTT core.itemNameTranslationTT
DECLARE @meta core.metaDataTT
DECLARE @enLanguageId [TINYINT] = (SELECT languageId FROM [core].[language] WHERE iso2Code = 'en');
DECLARE @frLanguageId [TINYINT] = (SELECT languageId FROM [core].[language] WHERE i... |
<filename>sql/good.sql
DROP TABLE IF EXISTS `goods`;
CREATE TABLE `goods` (
`goods_id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`start_time` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
`end_time` varchar(32) CHARAC... |
<gh_stars>0
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
-- =============================================
-- Responsable: <NAME>
-- Ultimo Cambio: 23/02/2018
-- Descripciรณn: Cancelaciรณn de Anticipos.
-- =============================================
CREATE PROCEDURE [dbo].[Interfaz_AnticiposCancelar]
@IDInteli... |
<filename>dbms/tests/queries/0_stateless/00079_defaulted_columns.sql
drop table if exists test.defaulted;
create table test.defaulted (col1 default 0) engine=Memory;
desc table test.defaulted;
drop table test.defaulted;
create table test.defaulted (col1 UInt32, col2 default col1 + 1, col3 materialized col1 + 2, col4 ... |
<gh_stars>1000+
-- Database: mysql
-- Change Parameter: newViewName=v_person
-- Change Parameter: oldViewName=v_person
RENAME TABLE v_person TO v_person;
|
-- Test using different operator classes in DISTRIBUTED BY.
--
-- Test joins involving tables with distribution keys using non-default
-- hash opclasses.
--
-- For the tests, we define our own equality operator called |=|, which
-- compares the absolute values. For example -1 |=| 1.
CREATE FUNCTION abseq(int, int) RE... |
<filename>sql/alluco.trans.sql<gh_stars>0
DROP TABLE IF EXISTS `lexik_trans_unit_translations`;
DROP TABLE IF EXISTS `lexik_trans_unit`;
DROP TABLE IF EXISTS `lexik_translation_file`;
CREATE TABLE IF NOT EXISTS `lexik_translation_file` (
`id` ... |
<gh_stars>100-1000
-- Revert octopod:create_deployment_metadata from pg
BEGIN;
DROP TABLE deployment_metadata;
COMMIT;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.