sql stringlengths 6 1.05M |
|---|
<reponame>Windblow99/soultradelaravel
-- MySQL dump 10.13 Distrib 8.0.22, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: soultradedb
-- ------------------------------------------------------
-- Server version 5.5.5-10.4.17-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @... |
<filename>pg/tasker/view/dv_user_cc.sql
SET search_path = tasker, pg_catalog ;
CREATE VIEW dv_user_cc
AS
WITH RECURSIVE coc AS (
SELECT p.id,
'{}'::int[] AS bosses,
p.reports_to,
0 AS user_depth,
ARRAY [ dense_rank () OVER (
ORDER BY p.id ) ] AS outln... |
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th3 30, 2019 lúc 02:04 PM
-- Phiên bản máy phục vụ: 10.1.37-MariaDB
-- Phiên bản PHP: 7.1.24
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*... |
<filename>Homework 2/HP between.sql
<<<<<<< HEAD
select id,name,maxhp
from Adventurer
where MaxHP between 50 and 100
=======
select id,name,maxhp
from Adventurer
where MaxHP between 50 and 100
>>>>>>> 8cd8c143e180df3ffab4ad726999a391a6ed3646
/* hp between 200 and 522*/ |
<gh_stars>0
CREATE USER 'duck'@'localhost' IDENTIFIED BY '3<PASSWORD>';
CREATE DATABASE `duck_symfony`;
GRANT ALL ON `duck_symfony`.* TO 'duck'@'localhost';
|
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Mar 01, 2019 at 02:16 PM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.1.26
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
CREATE DATABASE IF NOT EXISTS `cms` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_general_mysql500_ci */;
USE `cms`;
-- MySQL dump 10.13 Distrib 8.0.13, for macos10.14 (x86_64)
--
-- Host: 127.0.0.1 Database: cms
-- ------------------------------------------------------
-- Server version 5.5.5-10.1.37-MariaDB
... |
CREATE DATABASE IF NOT EXISTS accounts;
USE accounts;
--
-- Table structure for table role
--
DROP TABLE IF EXISTS accounts."role";
CREATE TABLE accounts."role" (
id int NOT NULL,
name varchar(255) DEFAULT NULL
);
CREATE TABLE accounts."user" (
id int NOT NULL,
username varchar(255) DEFAULT NULL,
password v... |
<gh_stars>0
/******************************************************************************************
Question 10, concurrency
This is the first of two scripts that tests that the BryanAir database can handle concurrency.
This script simply fills the database with a relevant flight used by the other script. Not... |
use NBNData;
go
select distinct
su.SURVEY_KEY
,su.ITEM_NAME
,SURVEY_TAG = dbo.ufn_GetSurveyTagString(su.SURVEY_KEY)
,sa.SAMPLE_KEY
,[DATE] = dbo.LCReturnVagueDateShort(sa.VAGUE_DATE_START, sa.VAGUE_DATE_END, sa.VAGUE_DATE_TYPE)
,[YEAR] = dbo.FormatDatePart(sa.VAGUE_DATE_START, sa.VAGUE_DATE_END, sa.VAGU... |
<gh_stars>1-10
-- MySQL Script generated by MySQL Workbench
-- 06/05/15 23:00:19
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
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_... |
-- To run this script, use the following command on webdev
-- mysql -u csstudent -p < create-table.sql
-- (enter csstudent password when prompted)
-- Use your webdev database.
USE webdev;
-- Drop table first.
DROP TABLE IF EXISTS tasks;
-- Create a table in database.
CREATE TABLE tasks (
id INT NOT NULL PRIMARY... |
<gh_stars>1-10
UPDATE `yoshiyoshi` SET date = ? WHERE ID_Inst = ?
|
-- This file is generated by the DataFiller free software.
-- This software comes without any warranty whatsoever.
-- Use at your own risk. Beware, this script may destroy your data!
-- License is GPLv3, see http://www.gnu.org/copyleft/gpl.html
-- Get latest version from http://www.coelho.net/datafiller.html
-- Data ... |
-- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date,,>
-- Description: <Description,,>
-- =============================================
CREATE PROCEDURE [zabbix].[GetActiveUserTransaction]
AS
BEGIN
/*
Количество активных пользовательских транзакций
*/
--S... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
-- <NAME> (<EMAIL>)
--
-- Servidor: localhost
-- Tiempo de generación: 15-05-2020 a las 12:10:45
-- Versión del servidor: 10.1.38-MariaDB
-- Versión de PHP: 7.1.27
SET FOREIGN_KEY_CHECKS=0;
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0... |
-- file:limit.sql ln:6 expect:true
SELECT ''::text AS two, unique1, unique2, stringu1
FROM onek WHERE unique1 > 50
ORDER BY unique1 LIMIT 2
|
-- file:updatable_views.sql ln:653 expect:true
UPDATE rw_view1 SET b = -5 WHERE a = 3
|
<filename>src/test/resources/sql/select/5e14a189.sql<gh_stars>10-100
-- file:rangetypes.sql ln:103 expect:true
select numrange(1.0, 2.0) >> numrange(3.0, 4.0)
|
-- 2021-06-23T14:26:03.743Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DDL_NoForeignKey,Description,EntityType,FacetFilterSeqNo,FieldLength,Help,IsActive,IsAdvancedTex... |
<reponame>iuri/tutortronics
-- /packages/intranet-core/sql/oracle/intranet-categories.sql
--
-- Copyright (C) 1999-2004 various parties
-- The code is based on ArsDigita ACS 3.4
--
-- This program is free software. You can redistribute it
-- and/or modify it under the terms of the GNU General
-- Public License as publ... |
-- 19/07/2018 - Import details - shipping fee
ALTER TABLE `inventory_import` ADD `shipping_fee` INT(11) NOT NULL DEFAULT 0 AFTER `capital`; |
<filename>configs/db/postgres/000014_cleanup_status_entities_view.up.sql
----------------------view status cleanup
CREATE OR replace VIEW v_inventory_status_cleanup AS
-- latest non-deleted status for non-deleted cluster configs
WITH t_active_status AS (
SELECT icss.config_version AS cluster_config_id, MAX(icss.id... |
CREATE TABLE city
(
cid int auto_increment,
country varchar(190),
city varchar(190),
accentcity varchar(190),
region varchar(190),
population int,
latitude float,
longitude float,
primary key (cid)
);
/*
This database is filled using the text file provided at
https://www.maxmind.com/en/free-world-ci... |
/*
SQLyog Enterprise - MySQL GUI v8.18
MySQL - 5.7.28 : Database - j2jsoftw_matri_website
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OL... |
<filename>SQL scripts/UpdateEstimated_Amount.sql
-- =============================================
-- Author: <NAME>
-- Create date: 18.11.2018
-- Description: Procedures to update estimated price
-- =============================================
CREATE TABLE ESTIMATED_PRICES
(
ID INT,
Estimated_Amount INT
)
GO
BU... |
DROP DATABASE IF EXISTS employee_db;
CREATE DATABASE employee_db;
USE employee_db;
CREATE TABLE department (
id INT NOT NULL AUTO_INCREMENT,
dept_name VARCHAR(30) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE roles (
id INT NOT NULL AUTO_INCREMENT,
title VARCHAR(30) NOT NULL,
salary DECIMAL NOT NULL,
depa... |
<reponame>NATO-NICS/nics-db
CREATE TABLE featurecomment (
featurecommentid bigint NOT NULL,
featureid bigint NOT NULL,
comment character varying(2048) NOT NULL,
datetime timestamp without time zone DEFAULT now() NOT NULL,
username character varying(100) NOT NULL
);
--
-- Name: featurecomment_featur... |
<reponame>jansenoliveira/DataBaseII
/*Questao 1*/
ALTER TABLE Pubs.dbo.authors ADD qty INT, midprice FLOAT;
/*Questao 2*/
CREATE PROCEDURE calc_qty_midprice;1
AS
UPDATE Pubs.dbo.authors
SET Pubs.dbo.authors.qty = i.qty,
Pubs.dbo.authors.midprice = i.midprice
FROM (
SELECT Pubs.dbo.titleauthor.au_id,count(Pubs.d... |
DELIMITER $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `AddDocumentos`(
tipomovimiento_id int,
localini_id int,
localfin_id int,
flagestado char(3),
usuario_id int,
out er_text char(25),
out documento_id int)
BEGIN
/*
Procedimiento par... |
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 13, 2018 at 03:40 PM
-- Server version: 10.1.26-MariaDB
-- PHP Version: 7.1.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 17-12-2017 a las 21:15:24
-- 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;
SET time_zone = "+00:00";
... |
/*
Warnings:
- The `periodType` column on the `EventType` table would be dropped and recreated. This will lead to data loss if there is data in the column.
*/
-- CreateEnum
CREATE TYPE "PeriodType" AS ENUM ('unlimited', 'rolling', 'range');
-- AlterTable
ALTER TABLE "EventType" RENAME COLUMN "periodType" to "ol... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Apr 30, 2018 at 02:17 PM
-- Server version: 10.1.30-MariaDB
-- PHP Version: 7.2.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40... |
<gh_stars>0
Drop Database If Exists employee_tracker;
Create Database employee_tracker;
Use employee_tracker;
CREATE TABLE department(
id integer auto_increment not null,
name varchar(30) not null,
primary key(id)
);
CREATE TABLE role(
id integer auto_increment not null,
title varchar(30) not null,
salary decimal n... |
<reponame>carmelo0x99/GraphQL-Flask-Ariadne
DROP TABLE IF EXISTS todo;
CREATE TABLE todo (
id INTEGER NOT NULL,
description VARCHAR,
completed BOOLEAN,
due_date DATE,
PRIMARY KEY (id)
);
INSERT INTO todo (id, description, completed, due_date) VALUES ('1', 'Test 1', '0', '2022-01-01');
INSERT INTO todo (id, descr... |
<filename>src/db/DBSetup.sql
-- Creates the PostgreSQL database and user
DROP DATABASE IF EXISTS cartedepoezii_dev_db;
CREATE DATABASE cartedepoezii_dev_db
WITH
OWNER = postgres
ENCODING = 'UTF8'
CONNECTION LIMIT = -1;
COMMENT ON DATABASE cartedepoezii_dev_db
IS 'The database for cartedepoezii.';
DR... |
<reponame>KOrfanakis/LeetCode-Solutions<filename>SQL/Problems/0620-Not_Boring_Movies/0620-Not_Boring_Movies.sql<gh_stars>0
/*
LeetCode 620. Not Boring Movies
https://leetcode.com/problems/not-boring-movies/
*/
SELECT *
FROM Cinema
WHERE MOD(id, 2) = 1 AND description != 'boring'
ORDER BY rating DESC; |
<reponame>mobi2010/turn
-- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 2017-03-19 10:15:49
-- 服务器版本: 5.6.21
-- PHP Version: 5.6.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_C... |
<reponame>ahd1997/SQL-patika-odev10
--dvdrental örnek veri tabanı üzerinden city tablosu ile country tablosunda bulunan şehir (city) ve ülke (country) isimlerini birlikte görebileceğimiz LEFT JOIN sorgusunu yazınız.
SELECT * FROM city
LEFT JOIN country
ON city.country_id = country.country_id;
|
SET @sName = 'bx_ribbons';
-- TABLE: data
CREATE TABLE `bx_ribbons_data` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`author` int(11) NOT NULL,
`added` int(11) NOT NULL default '0',
`changed` int(11) NOT NULL default '0',
`thumb` int(11) NOT NULL,
`title` text NOT NULL,
`picture` int(11) NOT NULL,
... |
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
--=============================================
-- Copyright (C) 2018 <NAME>, @SQLDoubleG
-- All rights reserved.
--
-- You may alter this code for your own *non-commercial* purposes. You may
-- republish altered code as long as you give due credit.
--
-- THIS CODE... |
<reponame>lajtomekadimon/tukosmo
CREATE TYPE "AgiLogin" AS (
req "WebsiteRequest"
);
CREATE TYPE "AgoLogin" AS (
data "WebsiteDataDB",
routes "RouteDB"[]
);
CREATE OR REPLACE FUNCTION aha_g_login(
r "AgiLogin"
)
RETURNS "AgoLogin"
LANGUAGE PLPGSQL
VOLATILE
RETURNS NULL ON NULL INPUT
PARALLEL UNSAF... |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 19, 2022 at 02:36 AM
-- Server version: 10.4.21-MariaDB
-- PHP Version: 8.0.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
insert into area_name values
(39, "'17 夏 E", '西方再打通!欧州救援作戦');
|
CREATE INDEX faqoff_entry_title_idx ON faqoff_entry USING GIN (to_tsvector('english', title));
CREATE INDEX faqoff_entry_contents_idx ON faqoff_entry USING GIN (to_tsvector('english', contents));
CREATE INDEX faqoff_entry_combined_idx ON faqoff_entry USING GIN (to_tsvector('english', title || ' ' || contents));
|
<reponame>dram/metasfresh
-- 2019-12-18T11:33:18.609Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Element_Trl SET Description='Buchungsstatus', Help='Zeigt den Verbuchungsstatus der Hauptbuchpositionen an.', Name='Buchungsstatus', PrintName='Buchungsstatus',Updated=TO_TIMESTAMP('2019-12-... |
-- 2019-06-05T14:20:26.091
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET AD_Reference_ID=14, FieldLength=4000,Updated=TO_TIMESTAMP('2019-06-05 14:20:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=568157
;
-- 2019-06-05T14:20:28.891
-- I forgot to set the DICTIONA... |
-- The totals by combination of TAS/program activity code provided in File C (award financial) must be a subset of, or
-- equal to, the same combinations in File B (object class program activity). For example, -10 in C and -100 in B
-- would pass.
-- This rule selects 32 distinct elements in Files B and C based on TAS/... |
DROP DATABASE IF EXISTS krautundrueben;
CREATE DATABASE IF NOT EXISTS krautundrueben;
USE krautundrueben;
CREATE TABLE kunde (
kunde_id INTEGER NOT NULL AUTO_INCREMENT,
nachname VARCHAR(50) NOT NULL,
vorname VARCHAR(50) NOT NULL,
geburtsdatum DATE,
strasse VARCHAR(50) NOT NULL,
haus_nr VARCHAR(... |
BEGIN;
DROP INDEX IF EXISTS user_emails_user_id_is_primary_idx;
ALTER TABLE user_emails DROP COLUMN IF EXISTS is_primary;
COMMIT;
|
DROP TABLE IF EXISTS movie_genre;
DROP TABLE IF EXISTS genre;
DROP TABLE IF EXISTS movie;
CREATE TABLE genre
(
id BIGINT PRIMARY KEY NOT NULL,
name VARCHAR(30) NOT NULL
);
CREATE TABLE movie
(
id BIGINT PRIMARY KEY NOT NULL,
released BIGINT,
title VARCHAR(255) NOT NULL,
timestamp DATETIME,
video INT,
u... |
--liquibase formatted sql
--changeset shadowcloud:1
CREATE TABLE IF NOT EXISTS sc_keys (
key_id CHAR(36) PRIMARY KEY NOT NULL,
for_encryption BOOLEAN NOT NULL,
for_decryption BOOLEAN NOT NULL,
serialized_key VARBINARY NOT NULL
);
--changeset shadowcloud:2
CREATE TA... |
DROP INDEX IF EXISTS retries_updated_at_idx;
|
-- Deploy delivered_stats_on_change
BEGIN;
ALTER TABLE changes ADD COLUMN delivered_at cd_timestamp DEFAULT NULL;
ALTER TABLE changes ADD COLUMN delivered_by TEXT;
UPDATE changes
SET delivered_at = changesets.delivered_at,
delivered_by = changesets.delivered_by
FROM changesets
WHERE changes.changeset_id = change... |
<reponame>Zhaojia2019/cubrid-testcases
-- create hash partition table on a char field with size 2 and query all partition about this table
create table hash_test(id int ,
test_char char(50),
test_varchar varchar(2000),
test_bit bit(16),
test_varbit bit varying(20),
test_nchar nchar(50),
... |
-- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 15 Apr 2021 pada 08.34
-- Versi server: 10.1.32-MariaDB
-- Versi PHP: 5.6.36
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... |
<gh_stars>0
/****** Object: StoredProcedure [dbo].[GetPrimeCount] Script Date: 04/10/2016 16:39:24 ******/
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[GetPrimeCount]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[GetPrimeCount]
GO
/****** Object: StoredProcedure [dbo].[GetPrime... |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 23, 2022 at 02:47 AM
-- Server version: 10.4.21-MariaDB
-- PHP Version: 7.4.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
<filename>src/Data/Horsesoft.Music.Horsify.Repositories/SQL/CreateBaseFilters.sql
--
-- File generated with SQLiteStudio v3.1.1 on Wed Aug 1 15:32:19 2018
--
-- Text encoding used: System
--
PRAGMA foreign_keys = off;
BEGIN TRANSACTION;
-- Table: Filter
CREATE TABLE Filter (Id INTEGER PRIMARY KEY AUTOINCREMENT, Name ... |
<reponame>rochaandre/scripts-oracle-named
/*
Permite recuperar todos os privilegios de objeto, sistema e roles de um usuario e, se desejado, atribuir os privilegios para outro usuario.
Util para clonar privilegios de usuarios.
Possui os parametros USUARIO_ORIGEM e USUARIO_DESTINO. Para somente recuperar os priv... |
<filename>hasura/migrations/1589100833937_alter_table_public_facility_drop_column_institution_type/up.sql
ALTER TABLE "public"."facility" DROP COLUMN "institution_type" CASCADE;
|
/*
DB5-SQL-Stanford-Lagunita
SQL-Movie-Rating-Query-Exercises.sql
https://lagunita.stanford.edu/courses/DB/SQL/SelfPaced/courseware/ch-sql/seq-exercise-sql_movie_query_core/
*/
-- Q1
-- Find the titles of all movies directed by <NAME>.
SELECT title
FROM movie
WHERE director = '<NAME>'
-- Q2
-- Find all years that h... |
--4.Write a SQL query to find the average salary in the department #1.
USE TelerikAcademy
SELECT AVG(Salary)
FROM Employees
WHERE DepartmentID = 1 |
-- upgrade --
CREATE TABLE IF NOT EXISTS "user" (
"id" SERIAL NOT NULL PRIMARY KEY,
"email" VARCHAR(100) NOT NULL UNIQUE,
"password" VARCHAR(100) NOT NULL,
"date_join" TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE IF NOT EXISTS "token" (
"key" VARCHAR(40) NOT NULL PRIMARY KEY,
... |
-- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Oct 21, 2015 at 12:33 PM
-- Server version: 5.5.44-0ubuntu0.14.04.1
-- PHP Version: 5.5.9-1ubuntu4.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_C... |
CREATE TABLE accounts (
pid BIGSERIAL PRIMARY KEY,
id VARCHAR(255),
contact_email_address VARCHAR(255),
email_address_verification_code VARCHAR(255),
is_contact_email_address_verified BOOLEAN NOT NULL,
ark_wallet_address VARCHAR(255),
created_at TIMESTAMP NOT NULL
);
CREATE INDEX ON accounts (id);
CREATE ... |
<gh_stars>1-10
CREATE SEQUENCE SEQ_EGBPA_OWNERSHIP_TRANSFER;
CREATE TABLE EGBPA_OWNERSHIP_TRANSFER
(
id bigint NOT NULL,
parent bigint NOT NULL,
applicationNumber character varying(64) NOT NULL,
ownershipNumber character varying(64),
source character varying(50) NOT NULL,
applicationDate date NOT NULL,
o... |
create database db_demo;
create table products(
productId INT(25) AUTO_INCREMENT NOT NULL,
name varchar(300),
description varchar(600),
price varchar(20),
brand varchar(20),
CONSTRAINT pk_products PRIMARY KEY(productId)
);
|
DROP TYPE IF EXISTS mois_francais CASCADE;
CREATE TYPE mois_francais AS enum('Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre');
DROP TYPE IF EXISTS jours_semaine_francais CASCADE;
CREATE TYPE jours_semaine_francais AS enum('Lundi', 'Mardi', 'Mercred... |
<reponame>Justarone/bmstu-db
-- Инструкция SELECT, использующая скалярные подзапросы в выражениях столбцов.
-- Найти общее кол-во голов у молодых игроков, а также кол-во игр в качестве вратаря
SELECT player_info.*,
(
SELECT SUM(goals + assists)
FROM game_skaters_stats
WHERE game_skaters_stats.player_id = p... |
-- 建国記念の日 政令で定める日
CREATE OR REPLACE FUNCTION holidays_in_japan.IS_NATIONAL_FOUNDATION_DAY(d DATE)
AS (
"1967-01-01" <= d AND EXTRACT(DAYOFYEAR FROM d) = 42
);
|
<reponame>Shuttl-Tech/antlr_psql<gh_stars>10-100
-- file:opr_sanity.sql ln:825 expect:true
SELECT a.aggfnoid::oid, p.proname, ptr.oid, ptr.proname
FROM pg_aggregate AS a, pg_proc AS p, pg_proc AS ptr
WHERE a.aggfnoid = p.oid AND
a.aggtransfn = ptr.oid AND
(ptr.proretset
OR NOT (ptr.pronargs =
... |
<filename>test/sql/official-suite/statfault-1.sql<gh_stars>100-1000
-- original: statfault.test
-- credit: http://www.sqlite.org/src/tree?ci=trunk&name=test
CREATE TABLE t1(a, b UNIQUE);
INSERT INTO t1 VALUES(1, randomblob(500));
INSERT INTO t1 VALUES(randomblob(500), 1);
INSERT INTO t1 VALUES(2, randomblob(25... |
INSERT INTO locations
(name, description)
VALUES
('DefaultLocation', 'This is the first default location, edit or delete it');
INSERT INTO quantity_units
(name, description)
VALUES
('DefaultQuantityUnit', 'This is the first default quantity unit, edit or delete it');
INSERT INTO products
(name, description, loca... |
<reponame>sampathbalivada/aws-cudos-framework-deployment<gh_stars>10-100
select * from s3_view limit 10
|
<filename>src/test/java/red/reksai/resultmap/sql/mybatis_learning.sql
-- MySQL dump 10.13 Distrib 8.0.18, for macos10.14 (x86_64)
--
-- Host: 127.0.0.1 Database: mybatis_learning
-- ------------------------------------------------------
-- Server version 8.0.18
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... |
<reponame>cse-library/koha<filename>intranet/cgi-bin/installer/data/mysql/en/mandatory/sample_notices.sql
INSERT INTO `letter` (module, code, name, title, content, message_transport_type)
VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nAccording to ou... |
<reponame>iuri/tutortronics
--
-- /packages/acs-kernel/sql/utilities-create.sql
--
-- Useful PL/SQL utility routines.
--
-- @author <NAME> (<EMAIL>)
-- @creation-date 12 Aug 2000
-- @cvs-id $Id: utilities-create.sql,v 1.8.2.3 2017/10/05 10:25:28 antoniop Exp $
--
-- added
select define_function_args('util__multiple_... |
/*
Navicat Premium Data Transfer
Source Server : mysqlkkc
Source Server Type : MySQL
Source Server Version : 80022
Source Host : localhost:3306
Source Schema : library
Target Server Type : MySQL
Target Server Version : 80022
File Encoding : 65001
Date: 2... |
<filename>tests/input/struct/pass_singleton.ddl<gh_stars>0
//! Test a singleton struct.
struct Byte {
inner: U8,
}
|
CREATE TABLE [media].[ContactRegion] (
[ContactId] UNIQUEIDENTIFIER NOT NULL,
[RegionId] UNIQUEIDENTIFIER NOT NULL,
CONSTRAINT [PK_ContactRegion] PRIMARY KEY CLUSTERED ([ContactId] ASC, [RegionId] ASC),
CONSTRAINT [FK_ContactRegion_Contact] FOREIGN KEY ([ContactId]) REFERENCES [media].[Contact] ([Id])... |
with __dbt__CTE__asana_project_task_metrics as (
with task as (
select *
from `dbt-package-testing`.`dbt_jamie`.`asana_task`
),
project as (
select *
from `dbt-package-testing`.`dbt_jamie`.`stg_asana_project`
),
project_task as (
select *
from `dbt-package-testing`.`dbt_jamie`.`stg_asa... |
<gh_stars>1-10
create database phabricator_project;
create table phabricator_project.project (
id int unsigned not null auto_increment primary key,
name varchar(255) not null,
unique key (name),
phid varchar(64) binary not null,
authorPHID varchar(64) binary not null,
dateCreated int unsigned not null,
da... |
------------------
-- ML Inference --
------------------
use extfuncdemodb.extfuncs;
create or replace external function EXT_UDF_entity_extraction(bodyext string)
returns variant
api_integration = api_int_pricedata --Tell the External Function how to connect to my AWS account
as 'https://{domain}.execute-... |
<reponame>goldmansachs/obevo-kata<filename>kata-files/lesson2/hsql/expected/MYLARGESCHEMA/sp/SP565.sql
CREATE PROCEDURE SP565(OUT MYCOUNT INTEGER) SPECIFIC SP565_111796 LANGUAGE SQL NOT DETERMINISTIC READS SQL DATA NEW SAVEPOINT LEVEL BEGIN ATOMIC DECLARE MYVAR INT;SELECT COUNT(*)INTO MYCOUNT FROM TABLE173;SELECT COUNT... |
<reponame>lexycode/lmeve
CREATE TABLE IF NOT EXISTS `apiindustryjobscrius` (
`jobID` bigint(11) NOT NULL,
`installerID` bigint(11) NOT NULL,
`installerName` varchar(255) NOT NULL,
`facilityID` bigint(11) NOT NULL,
`solarSystemID` int(11) NOT NULL,
`solarSystemName` varchar(255) NOT NULL,
`stationID` bigin... |
<gh_stars>100-1000
--==========================================================
--==========================================================
\set ECHO all
set current_schema = hw_es_multi_column_stats;
set default_statistics_target=-2;
--========================================================== drop column, modify co... |
<reponame>mwcaisse/car-tracker-server
CREATE TABLE USER_PLACE (
ID BIGINT NOT NULL AUTO_INCREMENT,
NAME VARCHAR(250) NOT NULL,
LATITUDE DECIMAL(10, 7) NOT NULL,
LONGITUDE DECIMAL(10, 7) NOT NULL,
OWNER_ID BIGINT NOT NULL,
CREATE_DATE DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
MODIFIED_DATE DATETIME NOT NULL DE... |
/*
SQLyog Enterprise - MySQL GUI v5.29
Host - 5.5.5-10.4.21-MariaDB : Database - huntdir
*********************************************************************
Server version : 5.5.5-10.4.21-MariaDB
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
create database if not exists `huntdir`;
USE ... |
INSERT INTO eg_module(id, name, enabled, contextroot, parentmodule, displayname, ordernumber) VALUES (nextval('SEQ_EG_MODULE'), 'Sequence Number Entry', true, 'council', (select id from eg_module where name='Council Management Master'),
'SequenceNumber Entry', (select max(ordernumber)+1 from eg_module where parentmod... |
USE `essentialmode`;
INSERT INTO `addon_account` (name, label, shared) VALUES
('society_boatdealer','Marina',1)
;
INSERT INTO `addon_inventory` (name, label, shared) VALUES
('society_boatdealer','Marina',1)
;
INSERT INTO `jobs` (name, label) VALUES
('boatdealer','Marina')
;
INSERT INTO `job_grades` (job_name, gr... |
ALTER TABLE `[#DB_PREFIX#]article` ENGINE = MYISAM;
ALTER TABLE `[#DB_PREFIX#]article` ADD `title_fulltext` VARCHAR( 255 ) NULL, ADD FULLTEXT ( `title_fulltext` );
ALTER TABLE `[#DB_PREFIX#]article_vote` ADD `item_uid` INT( 10 ) NULL DEFAULT '0', ADD INDEX ( `item_uid` ); |
CREATE USER 'itranslater2018'@'%' IDENTIFIED BY '<PASSWORD>';
GRANT All privileges ON *.* TO 'itranslater2018'@'%'; |
<filename>test/fixtures/parser/ansi/select_union_all.sql<gh_stars>1000+
SELECT
0
UNION ALL
SELECT
1
|
<filename>coeus-db/coeus-db-sql/src/main/resources/org/kuali/coeus/coeus-sql/current/5.0/tables/KC_TBL_IACUC_PROTOCOL_REFERENCES.sql
CREATE TABLE IACUC_PROTOCOL_REFERENCES (
IACUC_PROTOCOL_REFERENCES_ID NUMBER(12,0) NOT NULL,
PROTOCOL_ID NUMBER(12,0) NOT NULL,
PROTOCOL_NUMBER VARCHAR2(20) NOT NULL,
... |
<reponame>BrettPWRE/HDB
ALTER TABLE hdb_dimension
ADD ( CONSTRAINT hdb_dimension_pk
PRIMARY KEY (dimension_id) using index tablespace hdb_idx storage (initial 50k next 50k pctincrease 0));
ALTER TABLE hdb_physical_quantity
ADD ( CONSTRAINT hdb_physical_quantity_pk
PRIMAR... |
ALTER TABLE `hotel`.`reservas`
ADD COLUMN `valor_reserva` DECIMAL(18,2) NULL DEFAULT NULL AFTER `quarto_id`;
|
<gh_stars>0
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE general_params ( "name" text, "value" text );
INSERT INTO "general_params" VALUES('list_report_data_table','V_Requested_Run_List_Report_2');
INSERT INTO "general_params" VALUES('list_report_data_sort_dir','DESC');
INSERT INTO "general_params" VA... |
<filename>cmdb-core/src/main/resources/database/ch/02.cmdb.system.data_ch.sql
SET FOREIGN_KEY_CHECKS=0;
INSERT INTO `adm_ci_type_attr_base` (`id_adm_ci_type`, `name`, `description`, `input_type`, `property_name`, `property_type`, `length`, `reference_id`, `reference_name`, `reference_type`, `filter_rule`, `search_seq_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.