sql stringlengths 6 1.05M |
|---|
<gh_stars>1-10
# DROP database `northwind_dw`;
CREATE DATABASE `Northwind_DW` /*!40100 DEFAULT CHARACTER SET latin1 */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE Northwind_DW;
# DROP TABLE `dim_customers`;
CREATE TABLE `dim_customers` (
`customer_key` int NOT NULL AUTO_INCREMENT,
`company` varchar(50) DEFAULT NULL,
... |
CREATE EXTENSION IF NOT EXISTS "uuid-ossp" WITH SCHEMA public;
COMMENT ON EXTENSION "uuid-ossp" IS 'generate universally unique identifiers (UUIDs)'; |
<filename>sql_runner/db.sql
SET NAMES utf8;
CREATE DATABASE IF NOT EXISTS judge;
USE judge;
CREATE TABLE IF NOT EXISTS `compileinfo` (
`solution_id` int(11) NOT NULL DEFAULT '0',
`error` text,
PRIMARY KEY (`solution_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `contest` ... |
<reponame>rse/wordnet-lmf
--
-- WordNet-LMF -- WordNet Lexical Markup Framework (LMF)
-- Copyright (c) 2018-2021 Dr. <NAME> <<EMAIL>>
--
-- Permission is hereby granted, free of charge, to any person obtaining
-- a copy of this software and associated documentation files (the
-- "Software"), to deal in the Softwar... |
<filename>src/oc_erchef/schema/verify/delete_migrated_couch_data.sql
-- Verify delete_migrated_couch_data
BEGIN;
SELECT pg_catalog.has_function_privilege(
'delete_migrated_couch_data(character)',
'execute');
ROLLBACK;
|
CREATE STREAM carLocations (profileId VARCHAR, color VARCHAR, hasPapers BOOLEAN, location VARCHAR)
WITH (kafka_topic='carLocations', value_format='json', partitions=1);
CREATE STREAM policeLocations(profileId VARCHAR, location VARCHAR)
WITH (kafka_topic='policeCarLocations', value_format='json', partitions=1);
CRE... |
--
-- Licensed to the Apache Software Foundation (ASF) under one or more
-- contributor license agreements. See the NOTICE file distributed with
-- this work for additional information regarding copyright ownership.
-- The ASF licenses this file to You under the Apache License, Version 2.0
-- (the "License"); you may ... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 31 Des 2019 pada 10.16
-- Versi server: 10.1.38-MariaDB
-- Versi PHP: 7.1.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHAR... |
USE master
GO
CREATE DATABASE [MassiveWriteTests] /* ON PRIMARY (NAME=MassiveWriteTests_dat, FILENAME='c:\mycatalogs\MassiveWriteTests.mdf', SIZE=10MB) */
GO
USE [MassiveWriteTests]
GO
-- ----------------------------------------------------------------------------------------------------------------
-- Schema 'dbo'
... |
ALTER TABLE tracks DROP urlmd5;
ALTER TABLE tracks DROP coverid;
ALTER TABLE tracks DROP cover_cached;
ALTER TABLE tracks DROP `virtual`;
ALTER TABLE albums CHANGE artwork artwork int(10) default NULL;
ALTER TABLE tracks_persistent DROP urlmd5;
|
<gh_stars>0
/*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50505
Source Host : localhost:3306
Source Database : dongyu
Target Server Type : MYSQL
Target Server Version : 50505
File Encoding : 65001
Date: 2018-11-20 21:28:31
*/
SET FOREIGN_KEY... |
grant <acessos> ou all(tudo) on <banco>
to <user> identified by "senha";
revoke <acessos> ou all(tud) on <biblioteca>.*
from <user>; |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Mar 14, 2017 at 07:03 AM
-- Server version: 10.1.13-MariaDB
-- PHP Version: 5.6.23
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... |
<reponame>enzoDante/programa-php
#create database bancoteste2poo;
use bancoteste2poo;
/*
create table usuario(
id_usuario int primary key not null auto_increment,
nome varchar(100) not null,
email varchar(200) not null,
senha varchar(100) not null
);*/
#select * from usuario;
#insert into usuario (nome, email, senha)... |
alter session set current_schema = ahmadmin;
drop table tst_ok_calls purge;
create table tst_ok_calls as
with
src as
(
select -- materialize
line, text
from dba_source
where owner = 'AHMADMIN'
and type = 'PACKAGE BODY'
and name = 'PSA_DATA_INGEST'
and text not like '%/*%'
and tex... |
<reponame>rcsv/O-Reilly-SQL-Cookbook<gh_stars>0
-- SQL クックブック用のテストテーブル
-- @version 1.0
CREATE DATABASE IF NOT EXISTS cookbook
DEFAULT CHARACTER SET 'utf8mb4'
DEFAULT COLLATE 'utf8mb4_general_ci' ;
use cookbook
drop table if exists emp ;
drop table if exists dept ;
CREATE TABLE emp (
empno int primary key,
... |
<filename>sql/schema/public/functions/pov.sql<gh_stars>1-10
-- This file contains the definition for the two API functions with same name but with different arguments.
CREATE OR REPLACE FUNCTION pov(
OUT _SnapshotID bigint,
OUT _RevisionID text
) RETURNS RECORD AS $BODY$
-- Takes a new pov
-- Example:
-- SELECT pov();... |
CREATE TABLE `authors` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(110) NOT NULL, `created_at` datetime DEFAULT NULL, `updated_at` datetime DEFAULT NULL, PRIMARY KEY (`id`), KEY `index_authors_on_created_at` (`created_at`))
CREATE TABLE `papers` ( `id` int(11) NOT NULL AUTO_INCREMENT, `title1` varchar(300) N... |
<reponame>MIT-LCP/aline-mimic-ii<gh_stars>1-10
drop table ALINE_PAIRED_DATA_APR15;
create table ALINE_PAIRED_DATA_APR15 as
with treated as
(select distinct
m.icustay_id as icustay_id_t
,m.n1
,ICU_LOS_DAY ICU_LOS_DAY_T
,HOSPITAL_LOS_DAY HOSPITAL_LOS_DAY_T
,HOSP_EXP_FLG HOSP_EXP_FLG_T
,ICU_EXP_FLG ICU_EXP_FLG_T
,... |
<filename>antrian.sql
-- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Nov 17, 2019 at 07:41 PM
-- Server version: 5.7.27-0ubuntu0.18.04.1
-- PHP Version: 7.2.19-0ubuntu0.18.04.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
... |
<reponame>marcopeg/amazing-postgres<filename>projects/populate-nested-data-from-json-in-postgresql/tests/pupulate-from-json.sql
BEGIN;
SELECT plan(6);
-- INSERT DATA
-- The API function let us provide only the real data we want to send to
-- the database, using functions:
-- 1. less data will travel on the network (no... |
<reponame>CSCfi/antero
USE [VipunenTK_SA]
GO
/****** Object: View [dbo].[v_sa_2_6_ammatillisen_koulutuksen_erityisopetuksen_opiskelijat_ja_tutkinnon_suorittaneet] Script Date: 17.10.2019 16:26:47 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER VIEW [dbo].[v_sa_2_6_ammatillisen_koulutuksen_... |
DELETE FROM `playercreateinfo_spell` WHERE `spell`=20589;
Insert INTO `playercreateinfo_spell` (`race`, `class`, `Spell`, `Note`) VALUES
(7, 6, 20589, 'Escape Artist'),
(7, 9, 20589, 'Escape Artist'),
(7, 1, 20589, 'Escape Artist'),
(7, 8, 20589, 'Escape Artist'),
(7, 5, 20589, 'Escape Artist'),
(7, 4, 20589, 'Escape A... |
<filename>sql/updates/world/12_02_28_01_world_sai.sql<gh_stars>10-100
-- <NAME> <Southsea Freebooters>
SET @ENTRY := 34782;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
INSERT INTO `smart_scripts` (`entryorguid`,`so... |
ALTER TABLE indel_sample_swap_detection
ADD COLUMN germline_Small_Vars_In_Both_Rare INTEGER;
|
--------------------------------------------------------
-- DDL for Function GET_ASSET_LABEL
--------------------------------------------------------
CREATE OR REPLACE FUNCTION GET_ASSET_LABEL (P_ASSET_ID NUMBER) RETURN VARCHAR2 AS
V_ASSET_LABEL ASSET.ASSET_LABEL%TYPE;
BEGIN
SELECT ASSET_LABEL INTO V_ASSET_LAB... |
<gh_stars>0
--
-- @lc app=leetcode id=176 lang=mysql
--
-- [176] Second Highest Salary
--
-- https://leetcode.com/problems/second-highest-salary/description/
--
-- database
-- Easy (27.92%)
-- Total Accepted: 145.8K
-- Total Submissions: 522K
-- Testcase Example: '{"headers": {"Employee": ["Id", "Salary"]}, "rows":... |
-- Stored Procedures (Sprocs)
-- File: C - Stored Procedures.sql
USE [A01-School]
GO
-- Take the following queries and turn them into stored procedures.
-- 1. Selects the studentID's, CourseID and mark where the Mark is between 70 and 80
SELECT StudentID, CourseId, Mark
FROM Registration
WHERE Mar... |
<reponame>ThomasBDZ/JAVAFX-Application<filename>BDD/TNRDV.sql
CREATE TABLE connection(
id INTEGER NOT NULL,
mail TEXT NOT NULL,
MDP TEXT NOT NULL,
typeUser TEXT NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE admin(
id INTEGER NOT NULL,
nom TEXT NOT NULL,
prenom TEXT NOT NULL,
PRIMARY KEY (id)
);
CREATE TA... |
<reponame>malyarevich/kinder
USE master
IF EXISTS (SELECT * FROM sys.databases WHERE name='Kinder_garden')
BEGIN
DROP DATABASE Kinder_garden
END
USE master
CREATE DATABASE Kinder_garden;
GO
USE Kinder_garden;
GO
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'Rations') AND type in (N'U'))
DROP ... |
<gh_stars>1-10
-- Change a storage_pool_format_type from integer to varchar
-- Change a storage_domain_format_type from integer to varchar
-- The changes were done due to changes in API between backend and vdsm
select fn_db_change_column_type('storage_pool','storage_pool_format_type','integer','varchar(50)');
select f... |
<reponame>SanjayTechGuru/TRINO
CREATE TABLE IF NOT EXISTS resource_groups (
resource_group_id BIGSERIAL PRIMARY KEY,
name VARCHAR(250) NOT NULL,
soft_memory_limit VARCHAR(128) NOT NULL,
max_queued INT NOT NULL,
soft_concurrency_limit INT,
hard_concurrency_limit INT NOT NULL,
scheduling_polic... |
-------------------------------------------------------------------------------
--
-- PLEASE NOTE
--
-- No warranty, no liability, no support.
--
-- This script is 100% at your own risk to use.
--
-------------------------------------------------------------------------------
set pages 0
set heading off
set lines 1000... |
-- create a new user
drop user if exists user_disallowed_via_local;
create user user_disallowed_via_local with login;
-- cleanup previous settings if any
\! sed -i '/user_disallowed_via_local/d' $MASTER_DATA_DIRECTORY/pg_hba.conf;
-- allow it to login via the [tcp] protocol
\! echo 'host all user_disallowed_via_local ... |
CREATE TABLE IF NOT EXISTS doer (
doer_id VARCHAR(50) NOT NULL,
current_timing VARCHAR(500),
PRIMARY KEY(doer_id)
);
CREATE TABLE IF NOT EXISTS todo (
doer_id VARCHAR(50) NOT NULL,
timing VARCHAR(500) NOT NULL,
plan VARCHAR(500) NOT NULL,
CONSTRAINT fk_doer_id FOREIGN KEY (doer_id) REFERENC... |
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1:3306
-- Tiempo de generación: 11-04-2019 a las 03:17:20
-- Versión del servidor: 5.7.23
-- Versión de PHP: 5.6.38
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/... |
--+ holdcas on;
set names utf8;
create table list_test(id int,
test_char char(50) collate utf8_tr_cs,
test_varchar varchar(2000) collate utf8_tr_cs,
test_bit bit(16),
test_varbit bit varying(20),
test_nchar nchar(50) collate utf8_tr_cs,
test_nvarchar nchar varying(2000) collate utf8_tr_cs,
test_str... |
<filename>openGaussBase/testcase/SQL/DML/merge_into/Opengauss_Function_DML_Merge_Into_Case0007.sql<gh_stars>0
-- @testpoint: 目标表和源表都存在进行merge into操作
--step1:创建目标表,源表并插入数据; expect:成功
drop table if exists t_mergeinto_07_01;
drop table if exists t_mergeinto_07_02;
create table t_mergeinto_07_01(product_id integer,product_... |
<filename>CreateTables.sql
create table if not exists course(
id varchar(10) primary key,
course_hour int not null,
course_credit float not null,
name varchar(50) not null,
course_dept varchar(30) not null,
... |
<reponame>fgaguilar/face_laravel
/*
Navicat MySQL Data Transfer
Source Server : mysql_face
Source Server Version : 50542
Source Host : localhost:3306
Source Database : face_laravel
Target Server Type : MYSQL
Target Server Version : 50542
File Encoding : 65001
Date: 2015-12-29 11:07... |
--when you open a new script, remember to click the refresh button on the left
--so that the tables appear under the tables tab of the connection
--TESTING TABLES
SELECT * FROM HOTEL;
SELECT * FROM ROOM;
SELECT * FROM GUEST;
SELECT * FROM BOOKING;
-- 1. List full details of all hotels in London.
SELECT * FROM HOTEL W... |
<gh_stars>0
--liquibase formatted sql
--changeset jhipster:20210326183311_1
alter table "quest"
add column is_public bool default true;
--rollback alter table "quest" drop column is_public;
|
<filename>adm_mng.sql
-- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3306
-- Время создания: Авг 16 2018 г., 16:27
-- Версия сервера: 5.5.58
-- Версия PHP: 5.6.32
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!... |
<filename>egov/egov-bpa/src/main/resources/db/migration/main/V20190313121536__bpa_labour_shelterfund_feemaster.sql<gh_stars>1-10
INSERT INTO egbpa_mstr_bpafee_common(id, glcode, code, name, description, category, version, createdby,
createddate, lastmodifiedby, lastmodifieddate)
VALUES (nextval('seq_e... |
<gh_stars>1-10
CREATE TABLE `server` (
`id` int PRIMARY KEY AUTO_INCREMENT,
`name` varchar(255),
`timezone` varchar(30)
);
CREATE TABLE `symon_user` (
`id` int PRIMARY KEY AUTO_INCREMENT,
`username` varchar(100),
`password` text,
`email` varchar(255),
`tp_no` varchar(35),
`is_admin` tinyint
);
CREA... |
update [sf_mb_dynamic_module_field]
set related_data_provider = 'sf-site-default-provider'
where module_name = 'Discover Your Skills And Careers' and nme = 'Skill'
update [sf_meta_attribute]
set val = 'sf-site-default-provider'
where id2 = '3FC82677-87DB-4816-9835-E23FD5A1E2DA' and nme = 'RelatedProviders'
select * f... |
-------------------
-- interpolation --
-------------------
CREATE TEMP TABLE temp_tbl(line_id integer, addr_street text, housenr integer, point_geom geometry);
select
line_id, addr_street, interpolation_type, first_housenr, last_housenr, line_geom,
-- Interpolation Function, turns address way into respective buildi... |
CREATE TABLE [dbo].[ZFO_DIRECTORIES] (
[FUNCTION_SEQ_ID] INT NOT NULL,
[DIRECTORY] VARCHAR (255) NOT NULL,
[IMPERSONATE] INT NOT NULL,
[IMPERSONATE_ACCOUNT] VARCHAR (50) NULL,
[IMPERSONATE_PWD] VARCHAR (50) NULL,
[ADDED_BY] INT ... |
<reponame>Shuttl-Tech/antlr_psql
-- file:alter_table.sql ln:1854 expect:true
SELECT conname as constraint, obj_description(oid, 'pg_constraint') as comment FROM pg_constraint where conrelid = 'comment_test_child'::regclass ORDER BY 1, 2
|
# This is the config file used to configure basic settings for Panda3D.
# The pipeline loads it at startup to ensure the environment is setup properly.
# -------------- Debugging options --------------
# gl-dump-compiled-shaders #t
# notify-level-glgsg debug
# notify-level-glgsg warning
# notify-level-gobj debug
... |
-- 2017-09-11T14:26:17.286
-- 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,AllowZoomTo,ColumnName,Created,CreatedBy,DDL_NoForeignKey,DefaultValue,EntityType,FieldLength,IsActive,IsAdvancedText,IsAllowL... |
<reponame>lance-zheng66/xiedaimala-crawler
insert into LINKS_TO_BE_PROCESSED (LINK)VALUES ( 'https://sina.cn' ) |
DROP TABLE IF EXISTS tasks;
CREATE TABLE tasks(
id SERIAL,
title VARCHAR(100) NOT NULL,
description TEXT,
PRIMARY KEY (id)
); |
select count(id) from `filter/pushdown/DRILL_6603_test_data` where str is null; |
<reponame>Algue-Rythme/MiniSQL<filename>queries/test3.sql
select t1.Nom, t1.Plat
from "database/gens.csv" t1
where t1.Plat in (select t2.Plat from "database/plats.csv" t2 where t2.Sain = "oui");
|
-- Copyright (C) 2001-2004 <NAME> <<EMAIL>>
-- Copyright (C) 2003 <NAME> <<EMAIL>>
-- Copyright (C) 2004-2010 <NAME> <<EMAIL>>
-- Copyright (C) 2004 <NAME> <<EMAIL>>
-- Copyright (C) 2004 <NAME> <<EMAIL>>
-- Copyright (C) 2005-2009 <NAME> <<EMAIL>>
-- Copyright (C) 2007 <NAME> ... |
DROP INDEX IF EXISTS counter_reports_custom_getcsv_idx;
CREATE INDEX IF NOT EXISTS counter_reports_custom_getcsv_idx ON counter_reports
USING btree ((jsonb ->> 'providerId'), (jsonb ->> 'reportName'), (jsonb ->> 'release'),
(jsonb ->> 'yearMonth'));
DROP INDEX IF EXISTS counter_reports_custom_errorcodes_idx;
CRE... |
create table bug(
id int auto_increment,
problem VARCHAR(1000) NOT NULL,
tag VARCHAR(1000) NOT NULL,
failed int,
try int,
fix int ,
create_time timestamp default CURRENT_TIMESTAMP ,
PRIMARY KEY ( id )
);
ALTER TABLE bug CONVERT TO CHARACTER SET utf8mb4;
insert into bug(problem,tag,failed,t... |
<filename>Migrations/Cats.DatabaseSchema/Procurement/Tables/TransportOrder.sql
CREATE TABLE [Procurement].[TransportOrder] (
[TransportOrderID] INT IDENTITY (1, 1) NOT NULL,
[TransportOrderNo] NVARCHAR (50) NOT NULL,
[OrderDate] DATETIME NOT NULL,
[Requeste... |
create input stream S (id int, name string, type int)
SOURCE KafkaInput
PROPERTIES ( groupid = "gidkpi_1_1",topic="agg_1_1");
create input stream SX (id string, name string, cc int)
SOURCE KafkaInput
PROPERTIES ( groupid = "gidkpi_1_2",topic="agg_1_2");
create output stream rs (id string, name string, type int, c... |
<reponame>aandryc/DataQualityDashboard
/*********
Table Level:
MEASURE_CONCEPT_COMPLETENESS
Determine what #/% of records have at least one our source_concept or standard_concept record populated with value>0
Parameters used in this template:
cdmDatabaseSchema = @cdmDatabaseSchema
cdmTableName = @cdmTableName
cdmFi... |
alter table registry add instance_type varchar(255);
update registry set instance_type = 'standard';
alter table registry alter column instance_type set not null;
-- Index? create index idx_registry_5 on registry (instance_type);
|
<filename>ccri-database/src/main/resources/db/postgreSQL/V1.4__Sample Organisation.sql
INSERT INTO Organisation (ORGANISATION_ID,RES_DELETED,RES_CREATED,RES_MESSAGE_REF,RES_UPDATED,active,ENT_NAME,partOf,TYPE_CONCEPT_ID)
VALUES (3,NULL,NULL,NULL,NULL,NULL,'NHS EREWASH',NULL,87);
INSERT INTO Organisation (ORGANISATION_... |
<filename>test-3.3/sql/multicorn_alchemy_test.sql
SET client_min_messages=NOTICE;
CREATE EXTENSION multicorn;
create or replace function create_foreign_server() returns void as $block$
DECLARE
current_db varchar;
BEGIN
SELECT into current_db current_database();
EXECUTE $$
CREATE server multicorn_s... |
CREATE EXTENSION IF NOT EXISTS pgaudit;
CREATE EXTENSION IF NOT EXISTS pgcrypto;
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
CREATE OR REPLACE FUNCTION trigger_set_timestamp()
RETURNS TRIGGER AS
$$
BEGIN
NEW.updated_at = NOW();
RETURN NEW;
END;
$$ LANGUAGE plpgsql;
|
<reponame>jthomm/landeta
CREATE TABLE gc_cur_scrsummary_player (
id INTEGER PRIMARY KEY
, gc_player_id TEXT
, gc_player_name TEXT
, gc_cur_scrsummary_id INTEGER
, FOREIGN KEY (gc_cur_scrsummary_id) REFERENCES gc_cur_scrsummary (id)
)
;
|
<filename>src/main/resources/data.sql
DROP TABLE IF EXISTS User;
DROP TABLE IF EXISTS Person;
DROP TABLE IF EXISTS Transaction;
CREATE TABLE User (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(250) NOT NULL,
last_name VARCHAR(250) NOT NULL,
email VARCHAR(250) DEFAULT NULL
);
CREATE TABLE Person (
id INT ... |
INSERT INTO "Usuarios"
("Clave", "NombreCorto", "Nombre", "Activo", "Roles")
VALUES('036368e5-d0e6-40ba-bcab-fb19d6bddd95','Alansin','<NAME>',true,'{"mesero"}');
INSERT INTO "Usuarios"
("Clave", "NombreCorto", "Nombre", "Activo", "Roles")
VALUES('6bc3649e-196b-4920-a14b-aff290aec9f0','Cloe','Val<NAME>',true,'{"adminis... |
<gh_stars>0
CREATE TABLE IF NOT EXISTS `rewards` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`display_name` varchar(255) DEFAULT NULL,
`pecks` int(11) DEFAULT NULL,
`image` varchar(255) DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAU... |
<reponame>izauraSilva/ponto-inteligente-api
create table empresa (
id bigint not null,
cnpj varchar(255),
data_atualizacao datetime not null,
data_criacao datetime not null,
razao_social varchar(255) not null,
primary key (id)
) engine=MyISAM
create table funcionario (
id bigint not null,
cpf varchar(255)... |
<filename>queries/13_fill_replicate_tables.sql
-- USE [sqldwschool]
INSERT INTO bohdan_lukashchuk_schema.RateCode (ID, Name)
SELECT 1, 'Standard rate'
UNION ALL
SELECT 2, 'JFK'
UNION ALL
SELECT 3, 'Newark'
UNION ALL
SELECT 4, 'Nassau or Westchester'
UNION ALL
SELECT 5, 'Negotiated fare'
UNION ALL
SELECT 6, 'Group ride... |
<reponame>astriddwrn/simple-article<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 07 Jul 2021 pada 12.26
-- Versi server: 10.4.18-MariaDB
-- Versi PHP: 7.3.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00... |
<reponame>meankitguptagupta/lms<gh_stars>0
CREATE TABLE IF NOT EXISTS `students` (
`user_id` INT(10) UNSIGNED COMMENT 'refrence: users',
`guardian_name` VARCHAR(50) DEFAULT NULL,
`guardian_contact_number` VARCHAR(12) DEFAULT NULL,
`academy_name` VARCHAR(191) DEFAULT NULL,
`academy_address` VARCHAR(1... |
<filename>script.sql
--1 film tablosunda bulunan ve film ismi (title) 'n' karakteri ile biten en uzun (length) 5 filmi sıralayınız.
SELECT title,length FROM film
WHERE title LIKE '%n'
ORDER BY length DESC
LIMIT 5;
--2 film tablosunda bulunan ve film ismi (title) 'n' karakteri ile biten en kısa (length) ikinci 5 filmi ... |
prompt Importing table t_operaciones...
set feedback off
set define off
insert into t_operaciones (ID_OPERACION, TIPO, NOMBRE, DOMINIO, ACTIVO, DETALLE, VERSION_ACTUAL, NIVEL_LOG, PARAMETROS_AUTOMATICOS)
values (69, 'T', 'PRE_CIERRE_PREDICCIONES_{ID_PARTIDO}', 'FAN', 'S', 'Trabajo de pre-cierre de predicciones de parti... |
select t0.id, t0.name, t0.doc_number, t0.status, t0.registered, t0.billing_address_id
from customer t0
left join address t1 on t1.id = t0.billing_address_id
where exists (select 1 from message x where x.customer_id = t0.id)
and (
t0.id > ?
or (
lower(t0.name) like ? escape'|' and lower(t1.city) like ? esca... |
DROP TABLE IF EXISTS countries;
|
<filename>agi_avdpool_sogis/agi_dm01avso24_ortsnam_pos.sql
SELECT
ortsnamepos.pos AS wkb_geometry,
ortsnamepos.ori AS namori,
CASE
WHEN ortsnamepos.hali = 'Left'
THEN 0
WHEN ortsnamepos.hali = 'Center'
THEN 1
WHEN ortsnamepos.hali = 'Right'
... |
<reponame>zls/prometheus-sql-adapter
SELECT
time,
metric,
value
FROM (
SELECT
time,
metric,
(
CASE
WHEN lag(value) OVER w IS NULL THEN value
ELSE value - lag(value) OVER w
END
) AS "value"
FROM (
SELECT
CONCAT(labels->>'namespace', '/', labels->>'job_name'... |
<filename>evaluation/db/query-native-solver-comparison-pure-views.sql
CREATE TEMPORARY View IF NOT EXISTS Minima as
SELECT jr.problem as minProblem, jr.instance as minInstance, MIN(jr.objective) as minObjective, Min(jr.elapsedSecs) as minElapsedSecs FROM
JobResult jr INNER JOIN Config cf ON jr.ConfigId = cf.ID
INN... |
<reponame>JAValentino/ci-simple-cart
-- phpMyAdmin SQL Dump
-- version 4.5.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jan 16, 2019 at 03:01 AM
-- Server version: 5.7.11
-- PHP Version: 5.6.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER... |
<reponame>rexdev0211/laravel-react-sesadigital<filename>queries.sql
-- truncate tables
TRUNCATE TABLE `artisans`;
TRUNCATE TABLE `artisan_categories`;
TRUNCATE TABLE `artisan_groups`;
TRUNCATE TABLE `artisan_linked_categories`;
TRUNCATE TABLE `artisan_ratings`;
TRUNCATE TABLE `artisan_signins`;
TRUNCATE TABLE `email_lo... |
-- file:triggers.sql ln:446 expect:false
relid text
|
use data_extracts;
drop procedure if exists executeBartsPancreas9Urine;
DELIMITER //
CREATE PROCEDURE executeBartsPancreas9Urine ()
BEGIN
-- All since 2012
call populateDataset(
'dataset_p_9',
'463%,466%,467%,468%,469%,46A%,46X%,46f%,46M1.-46MA.,46ML.,46MR.,46R1.,46R2.,46R5.,46T%,46g%,',
4,
'2012-01-01',
... |
<reponame>Zenika/TIL
BEGIN TRANSACTION;
ALTER TABLE "public"."comment" DROP CONSTRAINT "comment_pkey";
ALTER TABLE "public"."comment"
ADD CONSTRAINT "comment_pkey" PRIMARY KEY ("uuid");
COMMIT TRANSACTION;
|
-- One admin user, named admin1 with passwor <PASSWORD> and authority admin
INSERT INTO users(username,password,enabled) VALUES ('admin1','<PASSWORD>',TRUE);
INSERT INTO authorities VALUES ('admin1','admin');
-- One owner user, named owner1 with passwor <PASSWORD>
INSERT INTO users(username,password,enabled) VALUES ('o... |
-- Sample data is taken from https://developers.sap.com/tutorials/hana-clients-hdbsql.html
CREATE COLUMN TABLE HOTEL.HOTEL(
hno INTEGER PRIMARY KEY,
name VARCHAR(50) NOT NULL,
address VARCHAR(40) NOT NULL,
city VARCHAR(30) NOT NULL,
state VARCHAR(2) NOT NULL,
zip VARCHAR(6)
);
CREATE COLUMN TABLE HOTEL.ROOM... |
<filename>stu_sign.sql
/*
Navicat Premium Data Transfer
Source Server : localhost_3307
Source Server Type : MySQL
Source Server Version : 50727
Source Host : localhost:3307
Source Schema : stu_sign
Target Server Type : MySQL
Target Server Version : 50727
File Encodi... |
SELECT count(*)
FROM pg_prepared_xacts |
<reponame>unhide-ecommerce/shopify_source
{% macro timestamp_add(datepart, interval, from_timestamp) -%}
{{ adapter.dispatch('timestamp_add', 'fivetran_utils') (datepart, interval, from_timestamp) }}
{%- endmacro %}
{% macro default__timestamp_add(datepart, interval, from_timestamp) %}
timestampadd(
{{... |
<gh_stars>100-1000
CREATE OR REPLACE MODEL advdata.ga360_recommendations_model
OPTIONS(model_type='matrix_factorization',
user_col='visitorId', item_col='contentId',
rating_col='normalized_session_duration',
l2_reg=10)
AS
SELECT * from advdata.ga360_recommendations_data
|
<filename>sql/consumer/00-create-user.sql
CREATE extension ltree;
CREATE DATABASE consumer_meta;
\connect consumer_meta;
CREATE USER consumer_user WITH ENCRYPTED PASSWORD '<PASSWORD>';
GRANT ALL PRIVILEGES ON DATABASE consumer_meta TO consumer_user; |
-- phpMyAdmin SQL Dump
-- version 4.4.15.10
-- https://www.phpmyadmin.net
--
-- Хост: localhost
-- Время создания: Ноя 05 2017 г., 15:34
-- Версия сервера: 5.5.56-MariaDB
-- Версия PHP: 5.4.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... |
<filename>sql/_13_issues/_12_2h/cases/bug_bts_8931.sql<gh_stars>1-10
create table foo ( a integer, b varchar(10), c datetime ) reuse_oid;
insert into foo values ( 1, 'AAA',sys_datetime);
insert into foo values ( 2, 'AAA',sys_datetime);
insert into foo values ( 3, 'AAA',sys_datetime);
insert into foo values ( 4, 'AAA',... |
USE company_employees_db;
INSERT INTO department (id, name)
VALUES
(1, "Sales"),
(2, "Marketing"),
(3, "Research & Development"),
(4, "Finance"),
(5, "Information Technology");
INSERT INTO role (id, title, salary, department_id)
VALUES
(1, "Sales Associate", 60000, 1),
(2, "Sales Manager", 80000, 1),
(3, "Content Cr... |
CREATE PROCEDURE [dbo].[Insert_Event]
(
@Season int,
@EventCode nvarchar(max),
@DistrictCode nvarchar(max),
@DivisionCode nvarchar(max),
@Name nvarchar(max),
@Type nvarchar(max),
@Venue nvarchar(max),
@Address nvarchar(max),
@City nvarchar(max),
@Country nvarchar(max),
@StateProv nvarchar(max),
@DateStart ... |
<gh_stars>0
REM INSERTING into SYS.AQ$_MESSAGE_TYPES
SET DEFINE OFF;
|
<reponame>vault1337/BKKCrypt
select BKKCrypt('T-Systems') from dual;
|
<filename>other/YOY.sql
/*
Navicat Premium Data Transfer
Source Server : Local
Source Server Type : MySQL
Source Server Version : 50625
Source Host : localhost:3306
Source Schema : yoy
Target Server Type : MySQL
Target Server Version : 50625
File Encoding : 65001
Dat... |
create or replace package pkg_deploy is
-- Author : <NAME>
-- Created : 08/10/2014 12:21:04
-- Purpose : Autopatic deploy table from XML structure
---------------------------------------
procedure sp_deploy_table_by_xml_struct(p_xml clob);
end pkg_deploy;
/
create or replace package body pkg_deploy is
CRLF ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.