sql stringlengths 6 1.05M |
|---|
<gh_stars>0
insert into games(name, description) values('Dota 2', 'Dota 2 is very popular game I`ve never played');
insert into games(name, description) values('Warcraft 2', 'Warcraft 2 not very popular game but I`ve played it');
insert into players(name, description, rating) values('Petya', 'Petya is a player with the... |
<filename>SQL/UtilityScripts/DataTransformation/ConvertBlobToXml.sql
SELECT CAST(cast(Blob AS VARBINARY(MAX)) AS XML) AS MyXml
FROM Table
WHERE Key = '123' |
<reponame>ondrej-nemec/MVC<gh_stars>1-10
-- postgresql
-- databases
SELECT datname FROM pg_database
-- database schemas - musi by vybrana databaze
SET search_path TO your_db_name;
SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA
-- tables
SELECT table_name, table_type FROM INFORMATION_SCHEMA.TABLES where tabl... |
-- Comment this command if you don't want to see the performance, only the results
EXPLAIN ANALYZE
WITH TABLE_PEDIDO AS (
SELECT
SC5.C5_NUM AS PED,
SC5.C5_VEND1 AS REPRES,
SC5.C5_OBSPED AS OBS,
SC5.C5_PREVIST AS PREV,
SC5.C5_XST05 AS ST,
SC5.C5_XFRET AS FRET,
SC5.C5_CL... |
ALTER TABLE [dbo].[MIGRATION_SOURCES]
ADD CONSTRAINT [UK_MigrationSourcesUniqueId]
UNIQUE (UniqueId) |
/**********************************************************************
Filename: MemoryClerks.sql
Author: <NAME>
Date: 10/09/15
Comments: Returns top 10 memory clerks and total memory usage.
Revisions:
**********************************************************************/
SET NOCOUNT ON;... |
CREATE DATABASE Bitbucket
USE Bitbucket
CREATE TABLE Users
(
Id INT PRIMARY KEY IDENTITY,
Username VARCHAR(30) NOT NULL,
Password VARCHAR(30) NOT NULL,
Email VARCHAR(50) NOT NULL
)
CREATE TABLE Repositories
(
Id INT PRIMARY KEY IDENTITY,
Name VARCHAR(50) NOT NULL
)
CREATE TABLE RepositoriesContributors
(
Repos... |
<reponame>Shuttl-Tech/antlr_psql<filename>src/test/resources/sql/select/91db5601.sql
-- file:jsonb.sql ln:225 expect:true
SELECT '{"a":"b"}'::jsonb <@ '{"a":"b", "b":1, "c":null}'
|
<gh_stars>1-10
CREATE OR REPLACE package body gpi_log as
-- +============================================================================
-- NAME: gpi_log
-- PURPOSE: Provides error monitoring functionality for procedures and functions
--
-- +===========================================... |
with user_campaign as (
select *
from {{ ref('iterable__user_campaign') }}
), user_event_metrics as (
{%- set user_campaign_columns = adapter.get_columns_in_relation(ref('iterable__user_campaign')) %}
select
user_email,
count(distinct campaign_id) as count_total_campaigns,
min(f... |
<reponame>Warglaive/PostgresqlScripts<filename>Script-4.sql<gh_stars>0
select candidate from election
where election_year=1968; |
CREATE TABLE IF NOT EXISTS `wz_questactdata` (
`id` int(11) NOT NULL,
`questid` int(11) NOT NULL DEFAULT 0,
`name` varchar(127) NOT NULL DEFAULT '',
`type` tinyint(1) NOT NULL DEFAULT 0,
`intStore` int(11) NOT NULL DEFAULT 0,
`applicableJobs` varchar(1024) NOT NULL DEFAULT '',
`uniqueid` int(11) NOT NULL ... |
<gh_stars>1-10
{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_enabled','hubspot_engagement_call_enabled'])) }}
select *
from {{ var('engagement_call') }}
|
<filename>sql/025_add_labels_to_geolevels.sql
-- Adds a "label" column to redistricting_geolevel
CREATE OR REPLACE FUNCTION fn_add_labels()
RETURNS void AS
$$
DECLARE
label_exists integer;
BEGIN
SELECT count(*) into label_exists from information_schema.columns where table_name = 'redistricting_geolevel' and c... |
<reponame>ryakosh/popcorn-cli
INSERT INTO movies_directors(movie_id, director_id)
VALUES {directors}; |
/**
CREATE DATABASE
*/
CREATE DATABASE test_ag; |
<reponame>iseilor/workshop
INSERT INTO workshop.jk_order (id, created_at, created_by, updated_at, updated_by, deleted_at, deleted_by, percent_id, zaim_id, percent_count, percent_years, zaim_count, zaim_years, progress, status_id, sum, file_agree_personal_data, is_participate, type, order_file, agreement_ppd, social_id,... |
-- vim: ts=8 noexpandtab
\encoding UTF8
CREATE SCHEMA IF NOT EXISTS data;
--
-- CLEAN UP
--
DROP TABLE IF EXISTS data.TrainingsmittelkatalogGewichthebenBVDG;
DROP TABLE IF EXISTS data.TrainingsmittelkatalogGewichthebenBVDG_Categories;
--
-- LAYOUT DEFINITION
--
-- Main categories
CREATE TABLE data.Trainingsmittel... |
<gh_stars>0
-- @testpoint:opengauss关键字overriding(非保留),作为表空间名
--关键字不带引号,创建成功
drop tablespace if exists overriding;
CREATE TABLESPACE overriding RELATIVE LOCATION 'hdfs_tablespace/hdfs_tablespace_1';
drop tablespace overriding;
--关键字带双引号,创建成功
drop tablespace if exists "overriding";
CREATE TABLESPACE "overriding" REL... |
INSERT INTO department (dep_name)
VALUE
('Sales and Stores'),
('Purchasing'),
('Marketing'),
('Human Resource Management'),
('Accounting and Finances'),
('Information Technologies');
INSERT INTO roles (title, salary, department_id)
VALUES
('Sales Associate', 30000, 1),
('Sales Floor Coordinator', 30000, 1),
('Warehous... |
begin;
drop table if exists users;
drop table if exists signin_history;
drop table if exists acl;
drop table if exists acl_allows;
drop table if exists mtas;
drop table if exists smss;
drop table if exists account;
drop table if exists events;
drop table if exists tasks;
drop table if exists images;
drop table if exis... |
--- what to update when journalsdb updates
--
-- need to update mid.journal
-- specifically need to update these columns:
-- normalized_name,
-- display_name,
-- issn, --- the ISSN-L for the journal (see https://en.wikipedia.org/wiki/International_Standard_Serial_Number#Linking_I... |
CREATE TABLE bitstamp_data (id SERIAL PRIMARY KEY, db_timestamp
TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
volume DECIMAL DEFAULT NULL, last DECIMAL
DEFAULT NULL, timestamp TIMESTAMPTZ
DEFAULT CURRENT_TIMESTAMP, ... |
<filename>RestoreScriptingUtility.sql
--future development: add support for differential restore.
sp_helpdb 'SSISDB'
exec msdb.dbo.RestoreScriptingUtility @DBName = 'SSISDB', @TargetDBName = 'SSISDB_OLDDEV'
, @data_file_path = 'J:\Data01\'
, @client_folder = 'SSISDB_OLDDEV', @log_file_path = 'J:\Log\', @Rec... |
# Placeholder file for database changes for version 1.0.0 |
<reponame>lab11/gridwatch-data-analysis
SELECT
powerwatch.core_id,
st,
site_id,
min(time) as mintime,
max(time) as maxtime,
count(*) as N_gps_samples,
avg(gps_satellites) as gps_satellites_avg,
avg(gps_latitude) AS lat_avg,
max(lat_fixed) as lat_fixed,
avg(gps_longitude) AS lon_a... |
-- phpMyAdmin SQL Dump
-- version 4.6.6deb5ubuntu0.5
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost:3306
-- Tiempo de generación: 22-01-2021 a las 15:55:12
-- Versión del servidor: 5.7.32-0ubuntu0.18.04.1
-- Versión de PHP: 7.2.24-0ubuntu0.18.04.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:... |
<reponame>gritt/maskada<filename>details/db/migrations/schema.sql
DROP TABLE IF EXISTS `transaction`;
DROP TABLE IF EXISTS `category`;
CREATE TABLE `category`
(
`name` VARCHAR(80) UNIQUE NOT NULL,
PRIMARY KEY (`name`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_unicode_ci;
CREATE TABLE `... |
<reponame>govtransparency/dfid2
SET search_path TO tender_production;
CREATE TABLE crawler_audit_record (
id character varying(255) PRIMARY KEY,
data jsonb,
created timestamp without time zone,
createdby character varying(255),
createdbyversion character varying(255),
modified timestamp without... |
# Exemplo 9 - “Criando Chave Primária ao Criar uma Tabela”
CREATE TABLE cidade (
codcid INTEGER NOT NULL,
nomecid VARCHAR(30) NOT NULL,
uf VARCHAR(2),
PRIMARY KEY (codcid)
);
|
CREATE TABLE [ssas].[model_json_3411_cultures_translations_model_T] (
[databasename] NVARCHAR (128) NOT NULL,
[cultures_name] NVARCHAR (10) NOT NULL,
[cultures_translations_model_name] NVARCHAR (500) NOT NULL,
[c... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th8 12, 2021 lúc 06:02 PM
-- Phiên bản máy phục vụ: 10.4.17-MariaDB
-- Phiên bản PHP: 7.4.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHAR... |
<gh_stars>1-10
GO
delete from uCommerce_ProductDefinitionFieldDescription
where (DisplayName is null or DisplayName = '') AND (Description is null or Description = '')
GO
DELETE pdfd
FROM uCommerce_ProductDefinitionFieldDescription pdfd
INNER JOIN (SELECT
pdfd1.ProductDefinitionFieldDescriptionId,pdfd... |
SELECT class FROM courses GROUP BY class
HAVING COUNT(DISTINCT student) >= 5; |
<filename>src/test/resources/sql/delete/b330ab4b.sql
-- file:portals.sql ln:462 expect:true
DELETE FROM ucview WHERE CURRENT OF c1
|
<filename>backend/de.metas.fresh/de.metas.fresh.base/src/main/sql/postgresql/system/70-de.metas.fresh/5535940_sys_gh5772_Drop_C_Location_Id_From_AD_OrgInfo.sql
-- 2019-11-06T17:31:05.059Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
ALTER TABLE AD_OrgInfo DROP COLUMN IF EXISTS C_Location_ID
;
-- 2... |
v_var number; --this is an end of line comment
|
create or replace view DATAVAULTDEMO_DB.SS_RAW.raw_shippers as (
SELECT
*
FROM DATAVAULTDEMO_DB.SS.SHIPPERS
--FROM DATAVAULTDEMO_DB.SS.SHIPPERS where UPDATE_TS > '2021-02-10 00:00:00.000'
);
|
/* Q3. Popular topics in a country
\set tagClass '\'MusicalArtist\''
\set country '\'Burma\''
*/
SELECT Forum.id AS "forum.id"
, Forum.title AS "forum.title"
, Forum.creationDate AS "forum.creationDate"
, Forum.ModeratorPersonId AS "person.id"
, count(DISTINCT Messag... |
CREATE SEQUENCE entitlement_id_seq;
CREATE TABLE entitlement (
id INTEGER NOT NULL,
CONSTRAINT entitlement_pk PRIMARY KEY (id)
);
ALTER TABLE entit_host_grn_map DROP CONSTRAINT entit_host_grn_map_pk DROP INDEX;
ALTER TABLE entit_host_grn_map ADD CONSTRAINT entit_host_grn_map_uk UNIQUE (type_id, host_id, eon_id);
AL... |
\qecho =================================================================
\qecho === Running: logistic regression ================================
\qecho =================================================================
\qecho
\qecho === Creating artificial random data =============================
\qecho === For the m... |
-------------------------------------------------------------------------------
--
-- PLEASE NOTE
--
-- No warranty, no liability, no support.
--
-- This script is 100% at your own risk to use.
--
-------------------------------------------------------------------------------
set termout off
alter session set nls_date... |
<reponame>muntaza/Open_Persediaan<filename>sql2_persediaan/beban_rekap_kabupaten_sql/beban_barang5_paringinselatan.sql
SELECT
*
FROM
view_beban_barang5_paringinselatan
UNION ALL
|
<filename>SistemaUniversidad.BackEnd.BD/Functions/FN_CursosDocentes_VerificaExistenciaPorId.sql
CREATE FUNCTION FN_CursosDocentes_VerificaExistenciaPorId(@Codigo INT)
RETURNS BIT AS
BEGIN
DECLARE @ExisteCursosDocentes BIT;
SET @ExisteCursosDocentes =(SELECT COUNT(Codigo) FROM CursosDocentes WHERE Codigo = @Codigo)... |
-- phpMyAdmin SQL Dump
-- version 4.0.10.14
-- http://www.phpmyadmin.net
--
-- Client: localhost:3306
-- Généré le: Lun 27 Février 2017 à 03:36
-- Version du serveur: 10.1.18-MariaDB-cll-lve
-- Version de PHP: 5.4.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CL... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 12-Nov-2020 às 10:24
-- Versão do servidor: 10.1.38-MariaDB
-- versão do PHP: 7.3.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... |
set verify off
set serveroutput on
set echo off
set feedback off
set lines 120
set pages 9999
whenever sqlerror exit
clear screen
set termout off
col sys_user new_val SYS_USER format a30
col install_user new_val INSTALL_USER format a30
col default_language new_val DEFAULT_LANGUAGE format a30
select user sys_user,
... |
<reponame>liangzi4000/grab-share-info
EXEC [EST].[Proc_yjbb_Ins] @Code = N'600203',@CutoffDate = N'2017-09-30',@EPS = N'0.12',@EPSDeduct = N'0',@Revenue = N'60.46亿',@RevenueYoy = N'22.38',@RevenueQoq = N'-0.85',@Profit = N'5400.53万',@ProfitYoy = N'-26.63',@ProfiltQoq = N'478.66',@NAVPerUnit = N'4.9063',@ROE = N'2.42',@... |
<reponame>shantarammali/fyntune<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 27, 2020 at 04:31 AM
-- Server version: 10.1.35-MariaDB
-- PHP Version: 7.2.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SE... |
<filename>TestAutomationDB/dbo/Stored Procedures/ag_application_method_by_application_version_id_sel.sql<gh_stars>0
/*
??????????????????????????????????????????????????????????????????????
?|
?| Procedure Name: ag_application_method_by_application_version_id_sel
?|
?| Description: Selects data from table application_... |
<gh_stars>0
# --- !Ups
UPDATE validation_options
SET text = 'notsure'
WHERE text = 'unclear';
-- For users who validated the same label multiple times, remove all but the newest validation.
DELETE
FROM label_validation val_a
USING label_validation val_b
WHERE val_a.label_id = val_b.label_id
AND val_a.user_id = v... |
<reponame>priash35/Chitfund-Management-System<filename>Ele45_SKDB (8).sql
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 172.16.58.3:3306
-- Generation Time: Jun 25, 2018 at 12:52 AM
-- Server version: 5.5.43-37.2-log
-- PHP Version: 5.5.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET ... |
INSERT INTO burgers (burger_name) VALUES ('Megaburger');
INSERT INTO burgers (burger_name) VALUES ('Superburger');
INSERT INTO burgers (burger_name) VALUES ('Ultraburger'); |
-- Initialization SQL code for Undertakers table in PostgreSQL storage
CREATE TABLE IF NOT EXISTS __undertaker
(
function varchar primary key,
first_seen_at timestamp null
);
CREATE INDEX never_seen_functions ON __undertaker (first_seen_at) WHERE first_seen_at IS NULL;
|
--Problem https://www.hackerrank.com/challenges/african-cities/problem
SELECT CITY.NAME
FROM CITY, COUNTRY
WHERE CITY.COUNTRYCODE = COUNTRY.CODE AND COUNTRY.CONTINENT = 'Africa'; |
alter table foo alter column foo set options(allow_commit_timestamp = true) |
CREATE TABLE recipients (
team_id UUID,
email text,
PRIMARY KEY(team_id, email),
UNIQUE(team_id, email),
created_at timestamp with time zone,
updated_at timestamp with time zone
);
|
-- RUN-TIME COMPARISON
-- Following query is for comparing run-times of 1-thread simple search, 1-thread interleaved
-- search and concurrent interleaved search.
select
simple.instance_path,
simple.instance_name,
simple.number_of_discretizations,
simple.solution_time_in_seconds as simple_time,
simpl... |
select * from test where int_1 = 73;
select * from test where int_1 = 93;
select * from test where int_1 = 141;
select * from test where int_1 = 177;
select * from test where int_1 = 201;
select * from test where int_1 = 231;
select * from test where int_1 = 256;
select * from test where int_1 = 259;
se... |
# --- !Ups
create table "services" (
"id" bigint generated by default as identity(start with 1) not null primary key,
"service" varchar not null,
"doctor_id" bigint not null REFERENCES users("id"),
"minimum_cost" decimal default 0,
"maximum_cost" decimal default 0,
"created_at" timestamp default current_ti... |
<reponame>zkzong/java
-- 创建数据库
CREATE DATABASE seckill;
-- 使用数据库
USE seckill;
-- 库存表
CREATE TABLE seckill (
`seckill_id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '商品库存id',
`name` VARCHAR (120) NOT NULL COMMENT '商品名称',
`number` INT NOT NULL COMMENT '库存数量',
`start_time` TIMESTAMP NOT NULL DEFAULT "2016-05-07 13:28:00... |
-- ======================================================================
-- Return the latest Darwin forecast entries for a train
-- ======================================================================
SET search_path = darwin;
-- Return the schedule for a train
-- DROP FUNCTION darwin.getForecastEntries( prid TE... |
ALTER TABLE "ark_backup_buckets" ADD "prefix" text;
|
CREATE TABLE [dbo].[AccountClassifications] (
[Id] INT CONSTRAINT [PK_AccountClassifications] PRIMARY KEY NONCLUSTERED IDENTITY,
[ParentId] INT CONSTRAINT [FK_AccountClassifications__ParentId] REFERENCES [dbo].[AccountClassifications] ([Id]),
[Name] NVARCHAR (255),
[Name2] NVARCHAR (... |
-- Trigger for auto-updating update_at
CREATE OR REPLACE FUNCTION trigger_set_timestamp()
RETURNS TRIGGER AS $$
BEGIN
NEW.updated_at = timezone('utc'::text, now());
RETURN NEW;
END;
$$ LANGUAGE plpgsql;
-- Apply the trigger on telescope_profiles
CREATE TRIGGER set_timestamp
BEFORE UPDATE ON telescope_profiles
FOR... |
<gh_stars>1-10
-- --------------------------------------------------
-- Entity Designer DDL Script for SQL Server 2005, 2008, 2012 and Azure
-- --------------------------------------------------
-- Date Created: 10/04/2017 10:01:38
-- Generated from EDMX file: C:\Users\Pavel_Chyzhykau\Documents\GitHub\Railway\NaftanRa... |
SELECT DISTINCT dbo.Room.RoomN,dbo.Room.IDbuilding AS NomerKorpysa,dbo.Room.purpose,StageTab.lengthR
FROM
(SELECT dbo.Stages.IDstage, dbo.Stages.lengthR,dbo.Stages.IDbuilding
FROM dbo.Stages
WHERE lengthR > 8) AS StageTab
INNER JOIN
dbo.Room
ON dbo.Room.IDstage = StageTab.IDstage
ORDER BY NomerKorpysa; |
select count(*) from (
select term from frequency where docid="10398_txt_earn" and count=1
union
select term from frequency where docid="925_txt_trade" and count=1
);
|
CREATE TABLE IF NOT EXISTS accounts (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
account_number varchar(255) NOT NULL,
password varchar(255) NOT NULL,
balance DECIMAL(10,2) DEFAULT 0.0,
UNIQUE (account_number)
); |
<gh_stars>0
ALTER TABLE users ADD email_verified bool;
|
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Aug 28, 2016 at 12:08 AM
-- Server version: 10.1.13-MariaDB
-- PHP Version: 5.5.34
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... |
SET client_min_messages = warning;
DO $$
BEGIN
IF current_setting('server_version_num')::INT >= 100000 THEN
SET session_replication_role TO replica;
ELSE
CREATE EXTENSION pglogical;
END IF;
END$$;
CREATE EXTENSION pgl_ddl_deploy;
CREATE OR REPLACE FUNCTION pgl_ddl_deploy.override() RETURNS BOOLEAN AS $BODY$
BEGIN
R... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Jun 16, 2020 at 10:27 AM
-- Server version: 5.7.26
-- PHP Version: 7.3.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 ... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Apr 30, 2017 at 01:16 PM
-- Server version: 10.1.10-MariaDB
-- PHP Version: 5.6.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 21, 2021 at 03:56 PM
-- Server version: 10.4.19-MariaDB
-- PHP Version: 8.0.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
CREATE TABLE `clerk` (
`clerk_id` VARCHAR(255) NOT NULL,
`phone_number` VARCHAR(16) NOT NULL,
`password` VARCHAR(255) DEFAULT '<PASSWORD>',
`name` VARCHAR(255),
`email` VARCHAR(255),
`role` INT NOT NULL,
`status` INT NOT NULL DEFAULT 1,
`managed_by` VARCHAR(255),
PRIMARY KEY (`clerk_id`)); |
/*
SQLyog Ultimate v8.55
MySQL - 5.5.54 : Database - hmsdb
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@... |
<reponame>catarse/catarse_moments<filename>migrations/2018-05-25-190724_add_moments_indexes/up.sql<gh_stars>1-10
-- Your SQL goes here
CREATE INDEX moments_category_action_idx ON moment_service.moments USING btree (((data ->> 'category'::text)), ((data ->> 'action'::text)));
CREATE INDEX moments_category_action_sid_cre... |
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Versione server: 10.1.19-MariaDB - mariadb.org binary distribution
-- S.O. server: Win32
-- HeidiSQL Versione: 9.4.0.5141
-- ------------------------------------------------... |
DROP MATERIALIZED VIEW funds_enhanced; |
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION vrptools" to load this file. \quit
---------------------------------------------------------------------
-- Core functions to access vrptools from postgresql
-- Authoe: <NAME> <<EMAIL>>
-- Date: 2014-10-17
----------... |
<gh_stars>1-10
CREATE TABLE geographicregion (
id INT4 NOT NULL PRIMARY KEY,
code VARCHAR(3) NULL,
name VARCHAR(100) NOT NULL,
iso31661alpha2 VARCHAR(10) NULL,
countryid INTEGER NULL,
validfrom TIMESTAMP WITH TIME ZONE,
validto TIMESTAMP WITH TIME ZONE,
updatedby VARCHAR(60) NULL
);
-- Table comment
CO... |
<filename>migration/0005_employee.sql
-- +mig Up
CREATE TABLE IF NOT EXISTS `employee` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`outlet_id` INT UNSIGNED NOT NULL,
`store_id` INT UNSIGNED NOT NULL,
`first_name` VARCHAR(50) NOT NULL,
`last_name` VARCHAR(50) NOT NULL,
`phone_number` VARCHAR(15) NOT NULL,
... |
<gh_stars>10-100
-- file:union.sql ln:285 expect:true
ALTER TABLE t1c INHERIT t1
|
<reponame>Shuttl-Tech/antlr_psql<filename>src/test/resources/sql/select/666fffcf.sql
-- file:collate.sql ln:143 expect:true
SELECT a, b FROM collate_test1 UNION ALL SELECT a, b FROM collate_test2
|
<filename>tests/__legacy__/_get_array_size/02/test.sql
call _create_array(@array_id);
call _set_array_element(@array_id, 'name', 'shushu');
call _push_array_element(@array_id, 'hello');
call _get_array_size(@array_id, @size);
SELECT @size = 2;
|
<filename>samples/databases/wide-world-importers/wwi-ssdt/wwi-ssdt/WebApi/Stored Procedures/DeleteDeliveryMethod.sql
CREATE PROCEDURE [WebApi].[DeleteDeliveryMethod](@DeliveryMethodID int)
WITH EXECUTE AS OWNER
AS BEGIN
DELETE Application.DeliveryMethods
WHERE DeliveryMethodID = @DeliveryMethodID
END |
-- MySQL dump 10.13 Distrib 5.5.62, for debian-linux-gnu (x86_64)
--
-- Host: 10.0.1.3 Database: hexaa
-- ------------------------------------------------------
-- Server version 5.5.5-10.0.37-MariaDB-0+deb8u1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS... |
/*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50714
Source Host : localhost:3306
Source Database : verydows
Target Server Type : MYSQL
Target Server Version : 50714
File Encoding : 65001
Date: 2017-08-18 17:07:39
*/
SET FOREIGN_KEY_CHECKS=0;... |
<gh_stars>1-10
select
family.rfam_acc id,
family.rfam_id as name,
family.description as pretty_name,
group_concat(concat('SO:', dbs.db_link)) as so_terms,
family.type as rna_type,
family.comment as description,
family.num_seed as seed_count,
family.num_full as full_count,
group_conca... |
<gh_stars>10-100
CREATE SEQUENCE sttaggroups_sequence
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
CREATE TABLE sttaggroups (
id bigint NOT NULL DEFAULT nextval('sttaggroups_sequence'::regclass) PRIMARY KEY,
name text NOT NULL UNIQUE
);
ALTER TABLE sttags
ADD COLUMN group_id b... |
<gh_stars>10-100
-- Cleanup unused columns from DB.
ALTER TABLE `load_balancing_rules`
DROP COLUMN `source_ip_address_network_id`,
DROP COLUMN `source_ip_address`;
ALTER TABLE `network_offerings`
DROP COLUMN `internal_lb`;
|
<filename>migrations/sql/V2021.04.23.11.35__add _now_guid_and_constraints_to_mine_type.sql
ALTER TABLE mine_type ADD COLUMN IF NOT EXISTS now_application_guid uuid;
ALTER TABLE ONLY mine_type ADD CONSTRAINT now_application_guid_mine_type_fkey FOREIGN KEY (now_application_guid) REFERENCES now_application_identity(now_a... |
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3306
-- Время создания: Июл 21 2017 г., 12:01
-- Версия сервера: 5.5.53
-- Версия PHP: 7.0.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ... |
<reponame>alainna/oapi_usermessaging
-- Common Table Expression to store relevant user data
SET TRANSACTION ISOLATION LEVEL SNAPSHOT
BEGIN TRANSACTION
;WITH u AS (
SELECT [User].[ID],
[User].[Last Name],
[User].[First Name],
[User].[Email],
[User].[Position],
[User].[Primary Group Descriptor],
-- w... |
ALTER TABLE IF EXISTS discord_category DROP CONSTRAINT IF EXISTS discord_guild_id_fkey;
ALTER TABLE IF EXISTS discord_media_request DROP CONSTRAINT IF EXISTS discord_category_id_fkey;
ALTER TABLE IF EXISTS discord_provider_from_discord DROP CONSTRAINT IF EXISTS discord_category_id_fkey;
ALTER TABLE IF EXISTS discord_pr... |
<reponame>OpenDRR/opendrr-dsra-complier<filename>scripts/psra_7.Create_psra_national_hexgrid_clipped_unclipped.sql
-- test hexgrid aggregation for psra national level
-- create eqriskindex tables - 1km
DROP TABLE IF EXISTS results_psra_national.psra_eqriskindex_1km_uc CASCADE;
CREATE TABLE results_psra_national.psra_e... |
select
/*%expand*/*
from
user_session
where
session_id = /* sessionId */0
|
DROP DATABASE IF EXISTS micro_db;
CREATE DATABASE micro_db;
USE micro_db;
CREATE TABLE department (
id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(30) NOT NULL
);
CREATE TABLE role (
id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY,
title VARCHAR(50) NOT NULL,
salary DECIMAL(10,2) NOT... |
<reponame>guilherme-argentino/superlab-sagapattern<filename>src/main/resources/config/cql/changelog/20200406154400_added_entity_Employee.cql
CREATE TABLE IF NOT EXISTS employee (
id uuid,
firstName text,
lastName text,
email text,
phoneNumber text,
hireDate timestamp,
salary bigint,
com... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.