sql stringlengths 6 1.05M |
|---|
CREATE TABLE IF NOT EXISTS NEM_ACCOUNT(
C_ACCOUNT VARCHAR(40) NOT NULL PRIMARY KEY,
C_PUBLICKEY VARCHAR(64),
C_BALANCE BIGINT NOT NULL DEFAULT 0,
C_BLOCKS INT NOT NULL DEFAULT 0,
C_LASTBLOCK INT NOT NULL DEFAULT 0,
C_FEES BIGINT NOT NULL DEFAULT 0,
C_TIMESTAMP BIGINT NOT NULL DEFAULT 0,
C_LABEL VARCHAR(... |
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
CREATE TABLE `status` (
`user_id` int(11) NOT NULL,
`state` smallint(6) NOT NULL DEFAULT '0',
`lat` float DEFAULT NULL,
`lng` float DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `word_votes` (
`user_id` int(11) NOT NULL,
`... |
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 03, 2017 at 11:34 PM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 7.0.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... |
SELECT rowid from " << table_name << " WHERE (
|
CREATE TABLE CONTACT (
ID INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1),
FIRST_NAME VARCHAR(60) NOT NULL,
LAST_NAME VARCHAR(40) NOT NULL,
BIRTH_DATE DATE,
CONSTRAINT pk_concact PRIMARY KEY (ID),
CONSTRAINT uq_contact UNIQUE(FIRST_NAME, LAST_NAME)
);
CREATE TABLE CONTACT_TEL_DETAIL (
ID I... |
<gh_stars>100-1000
-- join2.test
--
-- execsql {
-- CREATE TABLE t3(c,d);
-- INSERT INTO t3 VALUES(111,1111);
-- INSERT INTO t3 VALUES(444,4444);
-- INSERT INTO t3 VALUES(555,5555);
-- SELECT * FROM t3;
-- }
CREATE TABLE t3(c,d);
INSERT INTO t3 VALUES(111,1111);
INSERT INTO t3 VALUES(444,4444);
INS... |
select l_orderkey,
sum(l_extendedprice *(1 - l_discount)) as revenue,
o_orderdate,
o_shippriority
from customer,
orders,
lineitem
where c_mktsegment = '{segment}'
and c_custkey = o_custkey
and l_orderkey = o_orderkey
and o_orderdate < date('{date}')
and l_shipdate > date('{date}')
gr... |
<reponame>Valeria-Marques/Projeto1<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 1172.16.31.10
-- Generation Time: 28-Ago-2018 às 23:27
-- Versão do servidor: 10.1.30-MariaDB
-- PHP Version: 7.2.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACT... |
-- drop database objects so we can run liquibase again
DROP SCHEMA public CASCADE;
DROP SCHEMA shersched CASCADE;
DROP USER shersched;
-- DROP EXTENSION IF EXISTS "uuid-ossp" SCHEMA shersched;
CREATE SCHEMA public;
|
/*
Navicat Premium Data Transfer
Source Server : 博客
Source Server Type : MySQL
Source Server Version : 50727
Source Host : www.bugquit.com:3306
Source Schema : LuoBeiAdminForGolang
Target Server Type : MySQL
Target Server Version : 50727
File Encoding : 65001
Date: 2... |
<filename>server/src/main/resources/db/common/V7__alter_memberprofile_table_to_add_fk.sql
ALTER TABLE member_profile
ADD FOREIGN KEY (pdlId) REFERENCES member_profile(uuid); |
<reponame>kuro-channel/knowledge-1<gh_stars>100-1000
SELECT * FROM DRAFT_ITEM_VALUES
WHERE
DRAFT_ID = ?
;
|
-- direct update does not determine whether it exists, because 20210528-dicehub-base.sql is data created with a fixed id
UPDATE `dice_pipeline_template_versions` set spec='name: js-spa-release-dice\nversion: \"1.0\"\ndesc: js 进行打包构建到 nginx 并部署到 erda 的模板\n\ntemplate: |\n\n version: \"1.1\"\n stages:\n - stage:\n ... |
<gh_stars>0
--
-- TCapture master structure rdb schema
--
#
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET cli... |
-- Copyright 2004-2019 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (https://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
CREATE TABLE TEST(V INT);
> ok
SELECT MODE(V) FROM TEST;
>> null
SELECT MODE(DISTINCT V) FROM TEST;
> exception SYNTAX_ERROR_2
INSERT INTO TEST VALUE... |
-- Corporate headquearters is auditing our store!
-- They want to know the average replacement
-- cost of movies by rating.
-- For example, R rated movies have an average
-- replacement cost of $20.23
SELECT rating, AVG(replacement_cost)
FROM film
GROUP BY rating;
|
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 02, 2019 at 12:45 PM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.1.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
<reponame>amirabbas8/bike-stores-data-warehouse
create database MyBikeStores
go
create schema production
go
create schema sales
go
create table production.brands
(
brand_id int identity
primary key,
brand_name varchar(255) not null
)
go
create table production.categories
(
category_id int identity
primary key... |
<reponame>aknot242/apm-ilx-sql-challenge<filename>sql-scripts/Create-Challenges-Table.sql
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Challenges](
[Id] [int] IDENTITY(1,1) NOT NULL,
[Question] [nvarchar](100) NOT NULL,
[Answer] [nvarchar](50) NOT NULL,
[LastUsed] [datetime] NULL
) ON [PRIMA... |
<filename>cardtrade.sql
-- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tiempo de generación: 18-06-2017 a las 19:45:01
-- Versión del servidor: 10.1.13-MariaDB
-- Versión de PHP: 5.5.34
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @... |
<reponame>ElixCD/EjemploBasicoMVC
USE TiendaOnline;
GO
--************************************************************************
CREATE PROCEDURE UnidadAlta
(
@descripcion CHAR(15),
@simbolo VARCHAR(50)
)
AS
BEGIN
SET NOCOUNT ON
INSERT INTO Unidad (descripcion, simbolo,fechaAlta,horaAlta)
VALUES (@descripcion, @... |
<filename>8week challenge/Week 1/week1_task9_10.sql
--- 9. If each $1 spent equates to 10 points and sushi
--- has a 2x points multiplier - how many points would each customer have?
-- 10. In the first week after a customer joins the program
---- (including their join date) they earn 2x points on all items, not just... |
<reponame>stalsarona/corona<filename>covid19new.sql
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3307
-- Generation Time: Jul 09, 2021 at 06:07 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.3.18
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET tim... |
<gh_stars>1-10
CREATE DATABASE [FlightsDB]
CONTAINMENT = NONE
ON PRIMARY
( NAME = N'FlightsDB', FILENAME = N'H:\_Databases\FlightsDB.mdf' , SIZE = 8192KB , FILEGROWTH = 65536KB )
LOG ON
( NAME = N'FlightsDB_log', FILENAME = N'H:\_Databases\FlightsDB_log.ldf' , SIZE = 8192KB , FILEGROWTH = 65536KB )
GO
USE [Fligh... |
<reponame>virender-hestabit/API
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 1192.168.3.11
-- Generation Time: Jun 21, 2020 at 02:09 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/... |
<gh_stars>1-10
-- +migrate Up
alter table gateway
add column model varchar(32) default 'null',
add column first_heartbeat int not null default 0,
add column last_heartbeat int not null default 0;
alter table gateway
alter column first_heartbeat drop default,
alter column last_heartbeat drop default... |
CREATE PROCEDURE Integration.GetLineageKey
@TableName sysname,
@NewCutoffTime datetime2(7)
WITH EXECUTE AS OWNER
AS
BEGIN
SET NOCOUNT ON;
SET XACT_ABORT ON;
DECLARE @DataLoadStartedWhen datetime2(7) = SYSDATETIME();
INSERT Integration.Lineage
([Data Load Started], [Table Name], [Data Load Co... |
<filename>src/test/resources/sql/select/74c403d3.sql
-- file:horology.sql ln:139 expect:true
SELECT '' AS "64", d1 + interval '1 year' AS one_year FROM TIMESTAMPTZ_TBL
|
<gh_stars>1000+
--
-- Rename tables
--
RENAME TABLE `ospos_app_config` TO `phppos_app_config`;
RENAME TABLE `ospos_customers` TO `phppos_customers`;
RENAME TABLE `ospos_employees` TO `phppos_employees`;
RENAME TABLE `ospos_giftcards` TO `phppos_giftcards`;
RENAME TABLE `ospos_inventory` TO `phppos_inventory`;
RENAME T... |
<reponame>Ambal/mangos<filename>sql/updates/0.15/8946_01_mangos_spell_proc_event.sql<gh_stars>1-10
ALTER TABLE db_version CHANGE COLUMN required_8943_01_mangos_spell_chain required_8946_01_mangos_spell_proc_event bit;
DELETE FROM `spell_proc_event` WHERE `entry` IN (57499);
INSERT INTO `spell_proc_event` VALUES
(57499... |
USE [Certificate_Administration]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- ======================================================================
-- Author: <NAME>
-- Creation date: October 18, 2021
-- Description:
-- Return:
-- Requires: SA
-- ============================... |
DROP DATABASE TutoringScheduler;
CREATE DATABASE IF NOT EXISTS TutoringScheduler;
GRANT ALL PRIVILEGES ON TutoringScheduler.* to 'tUser'@'localhost'
identified by 'tPasswd';
USE TutoringScheduler;
CREATE TABLE IF NOT EXISTS users
(
numId INT NOT NULL auto_increment,
firstname varchar(50) NOT NULL,
lastname varchar... |
--- Copyright 2019 Cargill Incorporated
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agr... |
<filename>src/main/resources/import.sql
create database study character set utf8 collate utf8_general_ci;
grant select, insert, update, delete, create, drop on study.* to 'study'@'localhost' identified by 'study';
grant select, insert, update, delete, create, drop on study .* to 'study'@'%' identified by 'study';
ins... |
<reponame>zhenghua75/DXInfo
IF not EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[aspnet_Applications]') AND type in (N'U'))
begin
CREATE TABLE [dbo].[aspnet_Applications](
[ApplicationName] [nvarchar](256) NOT NULL UNIQUE,
[LoweredApplicationName] [nvarchar](256) NOT NULL UNIQUE,
[Applicati... |
<gh_stars>1-10
create sequence game_sequence increment by 1 start with 1;
create table game
(
id bigint primary key default nextval('game_sequence'::regclass),
title varchar(200) default '%',
phrase varchar(200) default '%'
);
insert into game( title, phrase) values ('mass effect 2','Is s... |
<gh_stars>10-100
-- Each service holds it's data in an exclusive keyspace
CREATE KEYSPACE IF NOT EXISTS beacon_service WITH REPLICATION = {
'class': 'NetworkTopologyStrategy',
'DATA' : 2
};
CREATE TABLE IF NOT EXISTS beacon_service.beacons_by_location (
location_id uuid,
beacon_id uuid,
beacon_name t... |
startcode MySql_TimeoutRangeSql
select Id, Time
from EndpointNameTimeoutData
where Time between @StartTime and @EndTime
endcode
|
ALTER TABLE articles ADD COLUMN is_published boolean NOT NULL DEFAULT false; |
<filename>apgdiff.tests/src/main/resources/ru/taximaxim/codekeeper/apgdiff/model/graph/depcy_schema_new_5.sql
CREATE SCHEMA republic;
ALTER SCHEMA republic OWNER TO botov_av;
CREATE TABLE public.t_test2 (
c_name_t_test2 text,
c_id_t_test2 text
);
ALTER TABLE public.t_test2 OWNER TO botov_av;
CREATE TABLE re... |
INSERT INTO waffle_switch (name, active, created, modified, note)
VALUES ('disco-recommendations', 0, NOW(), NOW(),
'Enable switch to include recommendations from the taar service in '
'the discovery api responses, if telemetry-client-id provided.');
|
<reponame>LasseWolter/clowdr<gh_stars>10-100
alter table "room"."ShuffleQueueEntry" rename column "registrantId" to "attendeeId";
|
CREATE TRIGGER `EmployeeInsert` AFTER INSERT ON `employees`
FOR EACH ROW BEGIN
INSERT INTO bitacora (emp_no,activity,new_data)
VALUES (NEW.emp_no,"Se insertó un nuevo empleado",CONCAT('Información Actual: ', NEW.birth_date,' ',NEW.first_name,' ',NEW.last_name,' ',NEW.gender,' ',NEW.hire_date,' ',NEW.second_lastname... |
DROP DATABASE IF EXISTS bd_toque_estoque;
CREATE DATABASE bd_toque_estoque;
CREATE TABLE tb_loja (
id_loja INT NOT NULL AUTO_INCREMENT,
nome_loja VARCHAR(50) NOT NULL,
cnpj_loja VARCHAR(50) NOT NULL UNIQUE,
email_loja VARCHAR(100) NOT NULL UNIQUE,
senha_loja VARCHAR(50) NOT NULL,
PRIMARY KEY (id... |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Oct 31, 2017 at 08:11 AM
-- Server version: 10.2.8-MariaDB
-- PHP Version: 7.0.22
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
<reponame>rapidafi/varhaiskasvatus-raportointi<filename>varda_rap_toimipaikka.sql
create or replace view varda_rap_toimipaikka as
select
varda_toimipaikka.organisaatio_oid as toimipaikka_oid
,varda_toimipaikka.nimi
,varda_toimipaikka.nimi_sv
,varda_toimipaikka.varhaiskasvatuspaikat
,varda_toimipaikka.jarjestamismuoto_k... |
select
nf.rep_in_codigo as COD_REP,
REP.AGN_ST_NOME AS NOME_REP,
nf.agn_in_codigo as COD_CLI,
AGN.AGN_ST_NOME AS NOME_CLI,
ITNF.PRO_IN_CODIGO AS COD_PROD,
itnf.itn_st_descricao as NOME_PROD,
itnf.itn_re_quantidade as QUANTIDADE,
itnf.itn_re_valorunitario... |
DROP TABLE IF EXISTS user;
DROP TABLE IF EXISTS item;
DROP TABLE IF EXISTS tag;
DROP TABLE IF EXISTS itemtag;
CREATE TABLE user (
id INTEGER PRIMARY KEY AUTOINCREMENT,
username TEXT UNIQUE NOT NULL,
password TEXT NOT NULL
);
CREATE TABLE item (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT UNIQU... |
CREATE TABLE `M_users` (
`id` int PRIMARY KEY AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`email` varchar(255) UNIQUE NOT NULL,
`password` varchar(255) NOT NULL,
`auth_status_id` int NOT NULL,
`validation_status_id` int NOT NULL,
`created_at` timestamp NOT NULL,
`last_login_at` timestamp NOT NULL,
`... |
<filename>database/Database/Database/Stored Procedures/CheckPeopleStatus.sql
CREATE procedure [dbo].[CheckPeopleStatus](@person int = null)
as
begin
exec GetPersonMissingData... |
-- Table: fp_ot_defs
-- DROP TABLE fp_ot_defs;
CREATE TABLE fp_ot_defs
(
id smallint NOT NULL,
hours numeric(3,1) NOT NULL,
mon numeric(3,1) NOT NULL,
tue numeric(3,1) NOT NULL,
wed numeric(3,1) NOT NULL,
thu numeric(3,1) NOT NULL,
fri numeric(3,1) NOT NULL,
sat numeric(3,1) NOT NULL,
sun numeric(3... |
select id from categories where (short=$4 or long=$4) and datagroup_id = $2;$_$;
select 1 from categories where (short = s.import_value or long = s.import_value) and datagroup_id = $3));
select 1 from categories where (short=$1 or long=$2) and datagroup_id = $3));
SELECT * from datasets where id in ( #{all_datasets_ids... |
-- MySQL dump 10.13 Distrib 5.7.21, for macos10.13 (x86_64)
--
-- Host: localhost Database: flash_briefing
-- ------------------------------------------------------
-- Server version 5.7.21
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RES... |
<gh_stars>1-10
-- extensions
create schema if not exists exts;
create extension if not exists ltree schema exts;
do $$
begin
execute 'alter database ' || current_database() || ' set search_path = "$user",public,exts';
end;
$$;
|
<reponame>Shuttl-Tech/antlr_psql<gh_stars>10-100
-- file:tablesample.sql ln:50 expect:true
EXPLAIN (COSTS OFF)
SELECT id FROM test_tablesample TABLESAMPLE SYSTEM (50) REPEATABLE (2)
|
<filename>sql/pgq_coop/functions/pgq_coop.finish_batch.sql
create or replace function pgq_coop.finish_batch(
i_batch_id bigint)
returns integer as $$
-- ----------------------------------------------------------------------
-- Function: pgq_coop.finish_batch(1)
--
-- Closes a batch.
--
-- Parameters:
-- i_batch_id ... |
<filename>SQL/CIT236-WB HW Chapter 9.sql
1a.
SELECT b.title, p.phone
FROM books b, publisher p
WHERE b.pubid = p.pubid;
TITLE PHONE
BODYBUILD IN 10 MINUTES A DAY 800-555-9743
REVENGE OF MICKEY 000-714-8321
BUILDING A CAR WITH TOOTHPICKS 010-410-0010
DATABASE IMPLEMENTATION 800-555-1211
COOKING WITH ... |
<filename>DMSCDC_SampleDB_Initial.sql<gh_stars>10-100
create schema sampledb;
use sampledb;
drop table store;
create table store(
id int,
address1 varchar(1024),
city varchar(255),
state varchar(2),
countrycode varchar(2),
postcode varchar(10));
insert into store (id, address1, city, state, countrycode, postcode) val... |
DELIMITER DLM00
DROP PROCEDURE IF EXISTS upgrade115 DLM00
CREATE PROCEDURE upgrade115()
BEGIN
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.fb2', '.docx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.fb2', '.odt');
INSERT IGNORE INTO `files_converts` (`input`, `o... |
CREATE TABLE "peer" (
"id" TEXT NOT NULL,
"port" INTEGER NOT NULL,
"ip_addr" TEXT NOT NULL
);
CREATE TABLE "sensor_mapping" (
"sensor_id" INTEGER PRIMARY KEY NOT NULL,
"peer_id" TEXT NOT NULL,
"remote_id" INTEGER NOT NULL
);
CREATE TABLE "group_sensor" (
"group_id" INTEGER NOT NULL,
"se... |
--- This SQL schema was extracted excatly as is documented on
--- https://iso639-3.sil.org/code_tables/download_tables (date: 2021-05-08)
--- so was not inferred.
--- https://iso639-3.sil.org/sites/iso639-3/files/downloads/iso639-3_table_definition.txt
CREATE TABLE [ISO_639-3] (
Id char(3) NOT NULL, --... |
use db_base_six_four;
/* Create Database */
show databases;
create database db_base_six_four;
/* Create Table */
show tables;
CREATE TABLE users
(
id int NOT NULL PRIMARY KEY AUTO_INCREMENT,
username varchar(50) UNIQUE,
password varchar(255)
);
ALTER TABLE users
ADD COLUMN active int(1);
ALTER TABLE... |
BEGIN;
DROP TYPE IF EXISTS lsmb_date_fields CASCADE;
CREATE TYPE lsmb_date_fields AS (
century double precision,
decade double precision,
year double precision,
month double precision,
day double precision,
hour double precision,
minute double precision,
second double precision,
q... |
CREATE TABLE zd_migration (
migration_id VARCHAR(50) NOT NULL,
PRIMARY KEY (migration_id)
); |
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `phpcms_admin`
-- ----------------------------
DROP TABLE IF EXISTS `phpcms_admin`;
CREATE TABLE `phpcms_admin` (
`userid` mediumint(6) unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(20) DEFAULT NULL,
`password` varchar(32) DEF... |
<gh_stars>1-10
set client_min_messages to warning;
create extension if not exists pgtap;
reset client_min_messages;
begin;
select plan(6);
select has_function(
'ggircs_portal', 'mandatory_products_are_reported', array['ggircs_portal.application_revision'],
'Function mandatory_products_are_reported should exist'
)... |
<filename>SellerUpload/schema.sql<gh_stars>1-10
DROP TABLE IF EXISTS user;
DROP TABLE IF EXISTS post;
DROP TABLE IF EXISTS csv;
DROP TABLE IF EXISTS bestmodel;
DROP TABLE IF EXISTS noisymodel;
DROP TABLE IF EXISTS pricecurve;
CREATE TABLE user (
id INTEGER PRIMARY KEY AUTOINCREMENT,
username TEXT UNIQUE NOT NULL,
... |
INSERT INTO hydra_oauth2_access (signature, request_id, requested_at, client_id, scope, granted_scope, form_data, session_data, subject, active, requested_audience, granted_audience, challenge_id)
SELECT 'sig-20201110104000', 'req-20201110104000', now(), hc.id, 'scope-0011', 'granted_scope-0011', 'form_data-0011', 'ses... |
-- bugfixes
GRANT USAGE ON SCHEMA oracle TO PUBLIC;
GRANT USAGE ON SCHEMA plunit TO PUBLIC;
CREATE OR REPLACE FUNCTION oracle.round(float4, int)
RETURNS numeric
AS $$SELECT pg_catalog.round($1::numeric, $2)$$
LANGUAGE sql IMMUTABLE STRICT;
CREATE OR REPLACE FUNCTION oracle.trunc(float4, int)
RETURNS numeric
AS $$SELE... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Servidor: 1172.16.31.10
-- Tiempo de generación: 25-08-2016 a las 03:42:58
-- Versión del servidor: 10.1.13-MariaDB
-- Versión de PHP: 5.6.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CL... |
<filename>dhis-2/dhis-support/dhis-support-db-migration/src/main/resources/org/hisp/dhis/db/migration/2.37/V2_37_25__Add_disableDataElementAutoGroup_column_to_section.sql<gh_stars>100-1000
ALTER TABLE section ADD COLUMN IF NOT EXISTS disabledataelementautogroup BOOLEAN DEFAULT FALSE;
|
/*
Warnings:
- A unique constraint covering the columns `[slug]` on the table `Poll` will be added. If there are existing duplicate values, this will fail.
*/
-- CreateIndex
CREATE UNIQUE INDEX "Poll.slug_unique" ON "Poll"("slug");
|
create extension citext;
drop table if exists domains cascade;
create table domains (
id INTEGER PRIMARY KEY,
name citext,
master text,
last_check INTEGER DEFAULT NULL,
type text,
notified_serial INTEGER DEFAULT NULL,
account text
);... |
<gh_stars>0
CREATE TABLE IF NOT EXISTS user(
user_id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
guild_id CHAR(18) NOT NULL,
user_name VARCHAR(20) NOT NULL,
is_assignable BOOLEAN NOT NULL CHECK(is_assignable IN (0, 1))
);
CREATE TABLE IF NOT EXISTS ticket(
ticket_id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
us... |
<filename>src/main/resources/schema.sql
create table cache(
utm VARCHAR(8) not null,
"date" date not null,
"exists" boolean not null,
PRIMARY KEY (utm, "date")
);
create table tasks(
utm VARCHAR(8) not null,
"date" date not null,
cloudiness double not null,
contents TEXT,
PRIMARY KEY (utm, "date")
);... |
<reponame>echaouqui/menu
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: May 09, 2021 at 11:08 PM
-- Server version: 5.7.24
-- PHP Version: 7.4.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... |
<gh_stars>0
DROP TABLE stocks;
|
ALTER TABLE EGBPA_MSTR_STAKEHOLDER ADD COLUMN demand bigint;
ALTER TABLE EGBPA_MSTR_STAKEHOLDER ADD CONSTRAINT fk_egbpa_mstr_stakeholder_demand FOREIGN KEY (demand)
REFERENCES eg_demand (id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION |
create table word_part_of_speech (
word_part_of_speech_id integer unsigned auto_increment not null,
word_id integer unsigned not null,
part_of_speech_id integer unsigned not null,
primary key(word_part_of_speech_id)
); |
INSERT INTO `PersonMeta` (`person_id`, `key`, `value`, `created_at`, `created_by`, `updated_at`, `updated_by`)
SELECT p.`id` as `person_id`,
CASE WHEN '[META_TYPE]' = 'file.category.assessment' THEN CONCAT('file.assess.', idx.`index_id`)
WHEN '[META_TYPE]' = 'file.category.progress' THEN CONCAT('fil... |
/*
Navicat Premium Data Transfer
Source Server : as
Source Server Type : MySQL
Source Server Version : 50647
Source Host : localhost:3306
Source Schema : as_seckill
Target Server Type : MySQL
Target Server Version : 50647
File Encoding : 65001
Date: 20/04/2020 12:22:... |
CREATE TABLE Tags.Guard
(
GuardKey INT NOT NULL IDENTITY
CONSTRAINT PK_Guard PRIMARY KEY,
GuardName NVARCHAR(100) NOT NULL
CONSTRAINT UX_Guard_GuardName
UNIQUE,
AlternateGuardName NVARCHAR(100) NULL,
SysStartTime DATETIME2 GENERATED ALWAYS AS ROW START NOT NULL,
SysEndTime D... |
CREATE PROCEDURE [dbo].[prc_ResetChangeGroupsAfterResolve]
@SessionUniqueId uniqueidentifier,
@SourceUniqueId uniqueidentifier,
@DeltaTableExecutionOrder bigint
AS
-- Reset all later delta table entries back to deltapending
UPDATE RUNTIME_CHANGE_GROUPS
SET Status = 1 -- DeltaPending
WHERE SessionUniqueId = @Ses... |
<filename>function/ti/getelementtypesfortaxontaxagroup.sql
CREATE OR REPLACE FUNCTION ti.getelementtypesfortaxontaxagroup(_taxonid integer)
RETURNS TABLE(elementtypeid integer, elementtype character varying)
LANGUAGE sql
AS $function$
SELECT ndb.elementtypes.elementtypeid, ndb.elementtypes.elementtype
FROM ndb.eleme... |
DELIMITER $$
USE `ontarget`$$
DROP TRIGGER /*!50032 IF EXISTS */ `log_comment_add`$$
CREATE
/*!50017 DEFINER = 'ontarget'@'localhost' */
TRIGGER `log_comment_add` AFTER INSERT ON `project_task_comments`
FOR EACH ROW BEGIN
INSERT INTO user_notification (TEXT, user_id, category) VALUES
(CONCAT("Comm... |
<reponame>aliostad/deep-learning-lang-detection
drop table c3p0_test_table;
alter table scene change state_persistence old_state_persistence char(1);
alter table scene change reset_action old_reset_action char(1);
alter table scene_condition change action_type old_action_type char(1);
alter table scene_action_conditi... |
CREATE SCHEMA db;
CREATE EXTENSION IF NOT EXISTS postgis;
CREATE TYPE db.brewery_status AS ENUM ('active', 'inactive');
CREATE TYPE db.taste AS ENUM ('MEATY', 'SMOKY', 'WATERY', 'FRUITY', 'SPICY');
CREATE TABLE db.address (
identifier_address character varying NOT NULL PRIMARY KEY,
street character varying NOT ... |
<filename>test/db-table-setup.sql<gh_stars>10-100
create table article
(
id int not null primary key,
title varchar(255) not null
);
create table article_detail
(
id int not null primary key,
created_at timestamp not null
);
create table article_comment
(
id int ... |
DELETE FROM pg_enum
WHERE pg_enum.enumtypid = 'task_type'::regtype::oid
AND pg_enum.enumlabel = 'collect_reward';
DELETE FROM pg_enum
WHERE pg_enum.enumtypid = 'building_type'::regtype::oid
AND pg_enum.enumlabel = 'present_b';
DELETE FROM pg_enum
WHERE pg_enum.enumtypid = 'building_type'::regtype::o... |
INSERT INTO aggr_count SELECT COUNT(ship.ship_id) AS cnt FROM port AS port, parameters AS parameters, ship AS ship WHERE ((port.name = parameters.portname) AND (((POINT(ship.latitude,ship.longitude) <@> POINT(port.latitude,port.longitude)) / ship.max_speed) <= parameters.deadline));
INSERT INTO result SELECT port.port... |
<gh_stars>0
drop procedure if exists populateCodeDateEye;
DELIMITER //
CREATE PROCEDURE populateCodeDateEye (
IN filterType int, -- 1 latest, 0 earliest, 2 pivot
IN col varchar(50), -- The root of the column name
IN datasetTable varchar(50), -- Table name of dataset
IN ignoreNullValues bit, -- 1 reset,... |
CREATE FUNCTION func642() RETURNS integer
LANGUAGE plpgsql
AS $$ DECLARE val INTEGER; BEGIN val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE436);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE288);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE283);val:=(SELECT COUNT(*)INTO MYCOU... |
--------------------------------------------------------------------------
-- SQL92 types
--------------------------------------------------------------------------
-- Bit (SQL 99 removed it)
-- bit string literal
SELECT B'1100' AS Test;
SELECT CAST(B'1100' AS BIT(16)) AS Test;
SELECT CAST(B'1100' AS BIT VARYING(16))... |
<filename>payment/src/main/resources/org/killbill/billing/payment/migration/V20161005110745__payment_external_keys.sql
alter table payment_attempts modify payment_external_key varchar(255);
alter table payment_attempts modify transaction_external_key varchar(255);
alter table payment_attempt_history modify payment_exte... |
<gh_stars>1-10
BEGIN;
/* note: we do not store the publisher field */
ALTER TABLE alert ADD schemavsn TEXT;
ALTER TABLE alert ADD rbversion TEXT;
INSERT INTO versions (alert_version) VALUES (1.9);
COMMIT;
|
CREATE USER 'create'@'%' IDENTIFIED BY 'UYQsjBRIv6dCVfEz';
GRANT INSERT, CREATE, RELOAD, REFERENCES, INDEX, ALTER ON *.* TO 'create'@'%';
CREATE USER 'demo'@'%' IDENTIFIED BY 'YLot6pyQCwgTjolF';
GRANT INSERT, CREATE, DROP, REFERENCES, ALTER ON *.* TO 'demo'@'%';
CREATE USER 'select'@'%' IDENTIFIED BY 'gon3rJGgpCBwks... |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th5 05, 2020 lúc 08:26 PM
-- Phiên bản máy phục vụ: 10.3.16-MariaDB
-- Phiên bản PHP: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/... |
-- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 07, 2019 at 03:29 AM
-- Server version: 10.4.8-MariaDB
-- PHP Version: 7.3.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
<reponame>Jose17140/Helpdesk_Kvas<filename>Datos/SQLQuery.sql
DROP DATABASE IF EXISTS Helpdesk_Kvas;
CREATE DATABASE Helpdesk_Kvas
GO
USE Helpdesk_Kvas;
GO
DROP TABLE IF EXISTS PermisosPorRoles;
DROP TABLE IF EXISTS Empleados;
DROP TABLE IF EXISTS Usuarios;
DROP TABLE IF EXISTS Personas;
DROP TABLE IF EXISTS GruposDet... |
<filename>essahel.sql
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1:3306
-- Généré le : mer. 02 fév. 2022 à 20:00
-- Version du serveur : 5.7.31
-- Version de PHP : 7.3.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SE... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.