sql stringlengths 6 1.05M |
|---|
<reponame>digitalsatori/narrows
CREATE TABLE narration_styles (
narration_id integer NOT NULL UNIQUE,
title_font varchar(64),
title_font_size varchar(32),
title_color varchar(32),
title_shadow_color varchar(32),
body_text_font varchar(64),
body_text_font_size varchar(32),
body_text_colo... |
-- create a table with a FOREIGN key,create reverse index on this FOREIGN key
create table p7 (a int primary key, b int);
create table p1 (b int , a int ,FOREIGN KEY (a) REFERENCES p7(a));
create reverse index ri_p1_a on p1 ( a);
select attr_name, is_nullable from db_attribute where class_name = 'p1' order by 1;
... |
CREATE TABLE IF NOT EXISTS `companies` (
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
`name` varchar(100) NOT NULL,
`description` text NOT NULL
);
INSERT INTO `companies` (`name`, `description`) VALUES
('Abarca', 'Abarca is a premiere insurance company, offering coverage to millions.'),
('Aetna', 'Aetna is also... |
<reponame>liangzi4000/grab-share-info
EXEC [EST].[Proc_yjbb_Ins] @Code = N'600759',@CutoffDate = N'2017-09-30',@EPS = N'-0.0179',@EPSDeduct = N'0',@Revenue = N'20.34亿',@RevenueYoy = N'137.43',@RevenueQoq = N'7.11',@Profit = N'-4048.66万',@ProfitYoy = N'-561.31',@ProfiltQoq = N'112.80',@NAVPerUnit = N'2.3491',@ROE = N'-0... |
CREATE PROCEDURE [auth].[auth_ApiClients_GetByClientId]
@clientId varchar(32)
AS
select [Id], [ClientId], [ClientSecretHash], [ClientSecretSalt], [Type], [TokenExpireTimeMinutes],
[CreatedDate], [CreatedByUserId], [CreatedByClientId],
[UpdatedByUserId], [UpdatedByClientId], [UpdatedDate],[SystemId]
from [ApiC... |
<filename>CMC030/pr/open/pr_form.ddl
DEFINE RECORD CDD$TOP.PR.PR_FORM
DESCRIPTION IS /*Payroll Forms*/.
PR_FORM_CDD STRUCTURE.
END PR_FORM_CDD STRUCTURE.
END PR_FORM.
|
<reponame>timshadel/subdivision-list
CREATE TABLE subdivision_MK (id VARCHAR(6) NOT NULL, name VARCHAR(255), level VARCHAR(64) NOT NULL, PRIMARY KEY(id));
INSERT INTO "subdivision_MK" ("id", "name", "level") VALUES ('MK-01', 'Aerodrom', 'municipality');
INSERT INTO "subdivision_MK" ("id", "name", "level") VALUES ('MK-... |
<gh_stars>10-100
-- Verify seattleflu/schema:warehouse/presence_absence on pg
begin;
select pg_catalog.has_table_privilege('warehouse.presence_absence', 'select');
rollback;
|
DROP TABLE company;
DROP TABLE team;
DROP TABLE job;
DROP TABLE shift; |
<filename>src/SQL/sofa/icu_first_18.sql
DROP MATERIALIZED VIEW IF EXISTS icu_first_18 cascade;
CREATE MATERIALIZED VIEW icu_first_18 as
select * from(select p.subject_id,i.hadm_id,i.icustay_id,i.intime,i.outtime,p.dob ,(extract( epoch from i.intime-p.dob))/60/60/24/365.25 as age
from mimiciii.patients p inner join
... |
<filename>backend/de.metas.fresh/de.metas.fresh.base/src/main/sql/postgresql/system/75-de.metas.fresh.kpi/5446400_sys_FRESH-344_KPI_Sales_Order_Status_Overview_Function_v2.sql<gh_stars>1000+
-- task http://dewiki908/mediawiki/index.php/09881_Purchase_Order_Status_Overview_KPI_%28102412092136%29
DROP FUNCTION IF EXIS... |
<reponame>vinsent1907/vote-for-restaurant
INSERT INTO USERS (EMAIL, FIRST_NAME, LAST_NAME, PASSWORD)
VALUES ('<EMAIL>', 'User_First', 'User_Last', '{noop}user'),
('<EMAIL>', 'UserTo_First', 'UserTo_Last', '{noop}user'),
('<EMAIL>', 'Admin_First', 'Admin_Last', '{noop}admin');
INSERT INTO USER_ROLE (ROLE,... |
<gh_stars>1-10
-- This file and its contents are licensed under the Timescale License.
-- Please see the included NOTICE for copyright information and
-- LICENSE-TIMESCALE for a copy of the license.
\c :TEST_DBNAME :ROLE_SUPERUSER;
CREATE OR REPLACE FUNCTION show_data_nodes()
RETURNS TABLE(data_node_name NAME, host TE... |
<gh_stars>10-100
-- remove the old legacy DB from the registry
-- NOT TO BE RUN ON RVA !!!!
DROP DATABASE IF EXISTS dbs_vocabs; |
<reponame>lvandeve/almanac.httparchive.org
CREATE TEMPORARY FUNCTION getImageSizing(payload STRING)
RETURNS ARRAY<STRUCT<property STRING, value STRING>>
LANGUAGE js AS '''
try {
var $ = JSON.parse(payload);
var responsiveImages = JSON.parse($._responsive_images);
responsiveImages = responsiveImages['responsive-im... |
<gh_stars>0
SELECT
ca_zip,
ca_city,
sum(ws_sales_price)
FROM web_sales, customer, customer_address, date_dim, item
WHERE ws_bill_customer_sk = c_customer_sk
AND c_current_addr_sk = ca_address_sk
AND ws_item_sk = i_item_sk
AND (substr(ca_zip, 1, 5) IN
('85669', '86197', '88274', '83405', '86475', '85392', ... |
<gh_stars>0
--pass unmatched types of values to the 1st parameter
create table soo(
col1 bit(20),
col2 bit varying(20),
col3 set,
col4 multiset,
col5 list,
col6 blob,
col7 clob
);
create index aa on soo(col1,col2) with online parallel 3;
insert into soo values(b'10101001', x'abcdabc', {1, 2, 3}, {1, 2, 3, 1, ... |
<reponame>whq78164/vcard
/*
Navicat MySQL Data Transfer
Source Server : localPHPStudy
Source Server Version : 50540
Source Host : localhost:3306
Source Database : vcardsbranch
Target Server Type : MYSQL
Target Server Version : 50540
File Encoding : 65001
Date: 2015-11-05 01:04:14
*... |
--+ holdcas on;
set names utf8;
set system parameters 'intl_number_lang = tr_TR';
set system parameters 'intl_date_lang = tr_TR';
select 'TO_CHAR(TIME, AM/PM)';
--test
SELECT TO_CHAR(TIME'10:11:12', 'HH:MI:SS AM');
--test
SELECT TO_CHAR(TIME'20:11:12', 'HH:MI:SS PM');
--test
SELECT TO_CHAR(TIME'10:11:12', 'HH:MI:SS am... |
<filename>data/sql/task_type.sql
INSERT INTO `task_type` (`ttid`, `name`, `description`, `creator`, `contributors`, `creationDate`) VALUES
(1, 'Supervised Classification', 'In supervised classification, you are given an input dataset in which instances are labeled with a certain class. The goal is to build a model that... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Jun 18, 2019 at 05:27 PM
-- Server version: 5.7.25
-- PHP Version: 7.3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `kkcl`
--
-- -------------------------------... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 24-Maio-2020 às 07:29
-- Versão do servidor: 10.4.11-MariaDB
-- versão do PHP: 7.4.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... |
<reponame>nishasumesh/fhirbase
-- #import ./load_data.sql
-- #import ../src/fhirbase_json.sql
proc! create_patients(_limit_ integer) RETURNS void
BEGIN
RAISE NOTICE 'Create patients';
PERFORM count(fhirbase_crud.create('{}'::jsonb,
fhirbase_json.dissoc(patients.content, 'id')))
... |
UPDATE PayrollCostCodes
INNER JOIN HumanResourceOrganizations
ON HumanResourceOrganizations.Code = PayrollCostCodes.HrOrgCode
SET PayrollCostCodes.HrOrgName = HumanResourceOrganizations.Name
WHERE PayrollCostCodes.HrOrgCode = HumanResourceOrganizations.Code
AND (IsNull(PayrollCostCodes.HrOrgName)
OR PayrollCost... |
<gh_stars>0
-- 17.7_version --
REPLACE INTO `phppos_app_config` (`key`, `value`) VALUES ('version', '17.7'); |
<filename>provisioning/dbase.sql
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
-- drop any tables if they exist
DROP TABLE IF EXISTS project_active CASCADE;
DROP TABLE IF EXISTS devices CASCADE;
DROP TABLE IF EXISTS photos CASCADE;
DROP TABLE IF EXISTS projects;
-- create projects table (independent)
CREATE TABLE IF NO... |
<filename>src/main/resources/db/migration/V1_1__create_foreign_keys.sql
ALTER TABLE `product`
ADD FOREIGN KEY (`category`) REFERENCES `product_category`(`id`);
ALTER TABLE `stock`
ADD FOREIGN KEY (`product`) REFERENCES `product`(`id`);
ALTER TABLE `stock`
ADD FOREIGN KEY (`location`) REFERENCES `location`... |
CREATE TABLE [dbo].[Simulation]
(
[Id] int identity(1,1) NOT NULL primary key,
[Budget] decimal(18,2) NOT NULL,
[StartDate] date NOT NULL,
[EndDate] date NOT NULL,
[StrategyId] int NOT NULL foreign key references [dbo].[Strategy]([Id])
);
CREATE TABLE [dbo].[SimulationCompany]
(
[Id] int identity(1,1) NOT NULL p... |
<gh_stars>1-10
USE spotper
INSERT INTO faixa VALUES(
47,
'Piano Sonata No.1 In F Minor, Op.2 No.1: 1. Allegro',
1,
'DDD',
'00:6:35',
3,
1
)
INSERT INTO faixa VALUES(
48,
'Piano Sonata No.1 In F Minor, Op.2 No.1: 2. Adagio',
2,
'DDD',
'00:4:41',
3,
1
)
INSERT INTO faixa VALUES(
49,
'Piano Sonata No.1 ... |
prompt --application/set_environment
set define off verify off feedback off
whenever sqlerror exit sql.sqlcode rollback
--------------------------------------------------------------------------------
--
-- ORACLE Application Express (APEX) export file
--
-- You should run the script connected to SQL*Plus as the Oracle... |
SELECT name from animals WHERE name like '%mon';
SELECT name from animals WHERE date_of_birth BETWEEN '2016-01-01' and '2019-12-31';
SELECT name from animals WHERE neutered IS TRUE and escape_attempts <3;
SELECT date_of_birth from animals WHERE name IN ('Agumon', 'Pikachu');
SELECT name, escape_attempts from animals WH... |
<gh_stars>10-100
-- Copyright (c) Microsoft Corporation.
-- Licensed under the MIT License.
CREATE EXTERNAL TABLE [External].[IATIActivityStatus]
(
[iati-identifier] NVARCHAR(50) NOT NULL,
[activity-status] NVARCHAR(50) NULL,
[activity-status_description] NVARCHAR(100) NULL
)
WITH
(
LOC... |
ALTER TABLE EPS_PROP_PERSON_EXT DROP (BIOSKETCH_DESCRIPTION, BIOSKETCH_FILENAME, BIOSKETCH_FILE_CONTENT_TYPE, BIOSKETCH_FILE)
/
|
<filename>bin/apache-hive-3.1.2-bin/scripts/metastore/upgrade/mysql/044-HIVE-16997.mysql.sql
version https://git-lfs.github.com/spec/v1
oid sha256:08792f16130ab3336b50fde9c46f2239eb3f34f2b86f6deca13e7050805872cc
size 109
|
-- phpMyAdmin SQL Dump
-- version 4.2.7.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 02 Okt 2017 pada 13.56
-- Versi Server: 5.6.20
-- PHP Version: 5.5.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*... |
<reponame>ZhigalovSergey/IT_Notes<gh_stars>0
create procedure [core].[utm_traffic_division_sync]
as begin
set nocount on
declare @mt_dt datetime2(0) = sysdatetime()
declare @load_dt datetime2(0) = dateadd(dd, -3, @mt_dt)
drop table if exists #utm_traffic_division
create table #utm_traffic_division (
utm_key b... |
<filename>uaa-core/src/main/resources/db/update/FIRU.01.01.sql
USE [qfrsfiru]
GO
IF NOT EXISTS (SELECT name FROM sys.database_principals WHERE name = 'jms')
CREATE USER [jms] FOR LOGIN [jms] WITH DEFAULT_SCHEMA=[db_datareader]
GO
-- TODO: why [db_datareader] is not enough? need to add [db_owner]
EXEC sp_add... |
-->-->-- src/Frapid.Web/Areas/MixERP.Finance/db/SQL Server/2.1.update/src/01.types-domains-tables-and-constraints/tables-and-constraints.sql --<--<--
IF EXISTS (SELECT * FROM sys.indexes WHERE name='fiscal_year_fiscal_year_name_uix' AND object_id = OBJECT_ID('finance.fiscal_year'))
DROP INDEX fiscal_year_fiscal_yea... |
<filename>mybatis-plus-sample-tenant/src/main/resources/db/data-h2.sql<gh_stars>1000+
DELETE FROM user;
INSERT INTO user (id, tenant_id, name) VALUES
(1, 1, 'Jone'),(2, 1, 'Jack'),(3, 1, 'Tom'),
(4, 0, 'Sandy'),(5, 0, 'Billie');
INSERT INTO user_addr (id, USER_ID, name) VALUES
(1, 1, 'addr1'),(2,1,'addr2'); |
DROP TABLE IF EXISTS volume;
CREATE TABLE `volume` (
`volume_id` int(11) NOT NULL AUTO_INCREMENT,
`volume_identifier` varchar(255) DEFAULT NULL,
`type` varchar(255) DEFAULT NULL,
`title` varchar(255) DEFAULT NULL,
`startDate` smallint(6) DEFAULT NULL,
`endDate` smallint(6) DEFAULT NULL,
`given_name` var... |
<filename>resources/assets/TabellaComuni.sql<gh_stars>0
-- MySQL dump 10.13 Distrib 5.7.12, for osx10.9 (x86_64)
--
-- Host: localhost Database: sys
-- ------------------------------------------------------
-- Server version 5.7.17
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD... |
<reponame>christophanneser/Bao-for-Presto
SELECT COUNT(*)
FROM site AS s,
so_user AS u1,
tag AS t1,
tag_question AS tq1,
question AS q1,
badge AS b1,
account AS acc
WHERE s.site_id = u1.site_id
AND s.site_id = b1.site_id
AND s.site_id = t1.site_id
AND s.site_id = tq1.site_id
AND s.... |
INSERT INTO burgers (burger_name) VALUES ('Burger');
INSERT INTO burgers (burger_name) VALUES ('Cheese Burger');
INSERT INTO burgers (burger_name) VALUES ('Double Cheeseburger');
INSERT INTO burgers (burger_name) VALUES ('Veggie Burger'); |
<reponame>dant02/work-report<gh_stars>0
SET SQL DIALECT 3;
SET NAMES UTF8;
CREATE DATABASE 'd:\work-report.fdb' USER 'SYSDBA' PASSWORD '<PASSWORD>' PAGE_SIZE 16384 DEFAULT CHARACTER SET UTF8;
CREATE TABLE Users (
id INTEGER NOT NULL,
name VARCHAR(32) NOT NULL,
createdBy INTEG... |
<reponame>Elrandra420/postgressql
-- SELECT * FROM people;
-- SELECT pfirstname, pstate FROM people WHERE pstate = 'CA';
SELECT pstate, COUNT(pstate) AS "total" FROM people GROUP BY pstate ORDER BY total; |
<reponame>ShuailongWang/FMDB<gh_stars>1-10
-- 创建个人表 --
CREATE TABLE IF NOT EXISTS T_Person (
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
name TEXT,
age INTEGER
);
-- 创建学生表 --
CREATE TABLE IF NOT EXISTS T_Student (
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
name TEXT,
age INTEGER,
scor... |
drop table if exists GL_BASE_SITUATION;
/*==============================================================*/
/* Table: GL_BASE_SITUATION */
/*==============================================================*/
create table GL_BASE_SITUATION
(
BRANCH varchar(20) not null comment ... |
<gh_stars>10-100
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 xmloption = content;
SET client_min_me... |
<filename>src/test/resources/analyze.test_13.sql
-- analyze.test
--
-- execsql {
-- INSERT INTO t1 VALUES(2,5);
-- ANALYZE main;
-- SELECT idx, stat FROM sqlite_stat1 ORDER BY idx;
-- }
INSERT INTO t1 VALUES(2,5);
ANALYZE main;
SELECT idx, stat FROM sqlite_stat1 ORDER BY idx; |
<reponame>hiphamster/postgresql-patterns-library<gh_stars>100-1000
create type gender as enum ('male', 'female', 'unknown');
create or replace function gender_by_name(
full_name text, -- ФИО, где фамилия имя и отчество могут следовать в любом порядке
-- или Ф\nИ\nО с переносами строк (порядок с... |
<filename>TABLES.sql
DROP TABLE IF EXISTS movie CASCADE;
DROP TABLE IF EXISTS actor CASCADE;
CREATE TABLE movie (
title TEXT PRIMARY KEY NOT NULL,
director TEXT NOT NULL
);
CREATE TABLE actor (
name TEXT PRIMARY KEY NOT NULL,
lastName TEXT NOT NULL,
title TEXT NOT NULL
);
INSERT INTO movie(title... |
-- Procedure to clear the db setup
DROP TABLE tags;
DROP TABLE guesses;
DROP TABLE images;
DROP TABLE game_log;
DROP TABLE game_survey;
DROP TABLE game_tokens;
DROP TABLE game_count;
DROP TABLE contentious_tags;
DROP TABLE cap_log;
DROP TABLE cap_survey;
DROP TABLE cap_tokens;
|
insert into employeedb.employee values(11111111,'Ranga', '<EMAIL>','ranga.ranga','M',9999912345);
insert into employeedb.employee values(11111112,'Ganga', '<EMAIL>','ganga.ganga','F',9999912345);
insert into employeedb.employee values(11111113,'Manga', '<EMAIL>','manga.manga','M',9999912345);
|
-- ----------------------------
-- Create table
-- ----------------------------
create table sys_inform_templates (
t_id VARCHAR2(32) default sys_guid() not null,
t_uid VARCHAR2(32) not null,
t_target VARCHAR2(10) default 'ALL',
t_provider VARCHAR2(10) not null,
t_title VARCHAR2(200) ... |
ALTER TABLE affiliations DROP FOREIGN KEY Fk_0 ;
ALTER TABLE answers DROP FOREIGN KEY Fk_1 ;
ALTER TABLE appointments DROP FOREIGN KEY Fk_2 ;
ALTER TABLE appointments DROP FOREIGN KEY Fk_3 ;
ALTER TABLE appointments DROP FOREIGN KEY Fk_4 ;
ALTER TABLE approvals DROP FOREIGN KEY Fk_5 ;
ALTER TABLE approvals DROP F... |
ALTER TABLE addresses CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE addresses DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
<filename>sql/_22_news_service_mysql_compatibility/_01_function_supporting/_07_conv/cases/_07_conv_dev.sql
-- tables
create table numerics (
_int int,
_smallint smallint,
_bigint bigint,
_numeric numeric,
_numeric_4_2 numeric(4,2),
_numeric_18_5 numeric(18,5),
_numeric_30_10 numeric(30,10),
_float float,... |
<reponame>lucas2500/escola-inteligente<gh_stars>0
CREATE TABLE codigo(
codigo VARCHAR(255),
ID INT PRIMARY KEY AUTO_INCREMENT
); |
CREATE TABLE klanten.dbo.TblOrderTechnician (
OrderId int NOT NULL,
EmployeeId int NOT NULL,
CONSTRAINT TblOrderTechnician$PrimaryKey PRIMARY KEY (OrderId,EmployeeId)
)
CREATE UNIQUE NONCLUSTERED INDEX TblOrderTechnician$CompoundKey ON klanten.dbo.TblOrderTechnician (OrderId, EmployeeId);
|
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: localhost Database: eshop
-- ------------------------------------------------------
-- Server version 5.7.17-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/... |
select "Student ID" from stud where "Well versed with the subject" > 400 and "Explains concepts in an undertandable way" > 4 and "Use of presentations" > 4 and "Degree of difficulty of assigments" > 4 and "Solves doubts willingly" > 4 and "Structuring of the course" > 4 and "Provides support for students going above an... |
<gh_stars>0
INSERT INTO admin.ubigeotipo( idubigeotipo, idpadre, descripcion) VALUES (nextval('admin.seq_ubigeotipo_pk'), 0, 'PAÍS');
INSERT INTO admin.ubigeotipo( idubigeotipo, idpadre, descripcion) VALUES (nextval('admin.seq_ubigeotipo_pk'), 1, 'DEPARTAMENTO');
INSERT INTO admin.ubigeotipo( idubigeotipo, idpadre, des... |
create table installed_migrations (
id int(10) unsigned NOT NULL AUTO_INCREMENT,
installation_time timestamp default CURRENT_TIMESTAMP,
migration_file_name varchar(255) not null,
migration_file_checksum varchar(32) not null,
success enum("true", "false"),
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=u... |
/* Create table using jsonb for performance */
CREATE TABLE IF NOT EXISTS statuses ( status jsonb );
/* Create GIN index to allow efficient querying of JSON object */
CREATE INDEX IF NOT EXISTS statuses_index ON statuses USING GIN ( status jsonb_path_ops );
/* Create unique index of id_str as we'll use it as our key */... |
<filename>data/open-source/extracted_sql/zinedistro_zinedistro.sql
CREATE TABLE faves ( id integer NOT NULL, user_id integer, zine_id integer, created_at timestamp without time zone, updated_at timestamp without time zone)
CREATE TABLE authorships ( author_id integer NOT NULL, zine_id integer NOT NULL)
CREATE TABLE com... |
-- Demonstrate Row Level Security
USE master;
GO
IF NOT EXISTS (SELECT 1 FROM sys.server_principals WHERE name = N'GreatLakesUser')
BEGIN
CREATE LOGIN GreatLakesUser
WITH PASSWORD = N'<PASSWORD>',
CHECK_POLICY = OFF,
CHECK_EXPIRATION = OFF,
DEFAULT_DATABASE = WideWorldImporters;
END;
GO
IF NOT EXISTS ... |
<gh_stars>10-100
DROP DATABASE planespotter;
DROP USER 'planespotter'@'%';
|
INSERT INTO text(text_id, text_type, english, german, swiss_german) values ('DL_Nuray_Congratulations', 'dl_npc_nuray', 'So you''re new here. Well done. Vincent won''t let just anyone join us.', 'Du bist also der neue hier. Gut gemacht. Vincent lässt nicht einfach jeden beitreten.', 'Du bisch also dä neu do. Guet gmach... |
<reponame>lotosbin/prestashop-docker-compose<filename>prestashop/install/upgrade/sql/0.9.1.2.sql
/* STRUCTURE */
CREATE TABLE `PREFIX_product_sale` (
`id_product` INT( 10 ) UNSIGNED NOT NULL ,
`quantity` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0',
`nb_vente` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0',
`date_upd` DATE NOT NUL... |
<reponame>dram/metasfresh
-- 2018-11-19T15:13:25.963
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Element_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2018-11-19 15:13:25','YYYY-MM-DD HH24:MI:SS'),Name='Client ',PrintName='Client ' WHERE AD_Element_ID=102 AND AD_Language='en_US'
;
-- 2018... |
-- phpMyAdmin SQL Dump
-- version 2.11.6
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 09, 2020 at 04:44 AM
-- Server version: 5.0.51
-- PHP Version: 5.2.6
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_... |
INSERT INTO BASE_TELEFONOS (
RUT,
DV,
TELEFONO,
ZONA,
COMUNA,
TIPO_TELEFONO , CEDENTE,
ORIGEN
) SELECT
CARGA.RUT,
CARGA.DV,
CARGA.F6,
SITREL_ZONA_GEOGRAFICA.CodZona AS ZONA,
SITREL_ZONA_GEOGRAFICA.CodZona AS COMUNA,
If (CARGA.T6 = "F", 15, 16) AS Expr1,
CARGA.CEDENTE,
6 AS Expr2
FROM
SITREL_ZONA_GEOG... |
USE [LMS]
GO
IF NOT EXISTS (SELECT NULL FROM sys.tables WHERE NAME='Account')
CREATE TABLE dbo.Account (
[Id] UNIQUEIDENTIFIER NOT NULL,
[UserName] NVARCHAR(50) NOT NULL,
[Email] VARCHAR(254) NOT NULL,
[Password] NVARCHAR(50) NOT NULL,
[Status]... |
<filename>backend/src/main/resources/db/migration/V1_0__schema.sql
CREATE TABLE key_pair (
id BIGINT PRIMARY KEY UNIQUE NOT NULL,
created TIMESTAMP NOT NULL,
public_key BYTEA NOT NULL,
private_key BYTEA NOT NULL,
owner VARCHAR(60) NOT NULL,
owner_type CHAR(... |
<gh_stars>0
-- heavy_metal
insert into heavy_metal(name) values('phnJ');
insert into heavy_metal(name) values('phnK');
insert into heavy_metal(name) values('phnL');
insert into heavy_metal(name) values('mdtN');
insert into heavy_metal(name) values('phnM');
insert into heavy_metal(name) values('phnF');
insert into heavy... |
-- ### 新表预置数据:
-- dev_label_define
-- 表:数据库名称、是否分区表、安全等级、数仓分层、表中文名称、数仓所属人、业务方所属人、数据资产、数据域、metabase地址、描述、业务过程
insert into idata.dev_label_define (creator, label_code, label_name, label_tag, label_param_type, subject_type,
label_required, folder_id)
values ('系统管理员', 'dbName:LABEL', '数据库名称', 'STRING_LABEL', 'STRING', 'TAB... |
<reponame>hlx1432469713/wgj-web
/*
Navicat MySQL Data Transfer
Source Server : 172.16.58.3
Source Server Version : 50639
Source Host : 172.16.58.3:3306
Source Database : wgj
Target Server Type : MYSQL
Target Server Version : 50639
File Encoding : 65001
Date: 2018-07-08 09:18:53
*/
... |
<reponame>dangel101/ovirt-engine
--
-- PostgreSQL database dump
--
INSERT INTO gluster_config_master(config_key, config_description, minimum_supported_cluster, config_possible_values, config_feature)
values('gluster_log_file', 'The path to the geo-replication glusterfs log file.', '3.5', '', 'geo_replication');
INSE... |
--create unique index IDX_TS_TIME_ENTRY_UNIQ_TASK_DATE on TS_TIME_ENTRY (USER_ID, TASK_ID, DATE_) where delete_ts is null^
create unique index I_IDX_TS_PROJECT_PARTICIPANT_UNIQ_USER_PROJECT on TS_PROJECT_PARTICIPANT (USER_ID, PROJECT_ID) where delete_ts is null^
create unique index I_IDX_TS_PROJECT_UNIQ_CODE on TS_PROJ... |
<reponame>UAMS-DBMI/PosdaTools
-- Name: GetValuesByEleVr
-- Schema: posda_phi
-- Columns: ['value']
-- Args: ['element_signature', 'vr']
-- Tags: ['NotInteractive', 'Update', 'ElementDisposition']
-- Description: Get All values in posda_phi by element, vr
select
distinct value
from
element_signature
join scan_e... |
CREATE TABLE ticker_market_volume (
token_id INTEGER NOT NULL REFERENCES tokens(id) ON UPDATE CASCADE,
market_volume NUMERIC NOT NULL,
last_updated TIMESTAMP with time zone NOT NULL,
PRIMARY KEY (token_id)
)
|
CREATE TABLE pastes (
paste_id int PRIMARY KEY AUTO_INCREMENT,
paste_slug varchar(16) NOT NULL COMMENT 'URL slug for the paste, must be unique',
paste_expires datetime COMMENT 'When the paste expires, or NULL if it never expires',
paste_type enum('paste', 'redirect') NOT NULL
COMMENT 'What type ... |
/**
* @copyright Copyright © <NAME>, <EMAIL>, 2015 - 2018
* @package yii2-tree-manager
* @version 1.0.9
*/
DROP TABLE IF EXISTS tbl_tree;
CREATE TABLE tbl_tree (
id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY
COMMENT 'Unique tree node identifier',
root INT(11) ... |
<gh_stars>10-100
select
extract(epoch from now())::int - (extract(epoch from now())::int % $1),
jsonb_build_object(
'state', a.state::text,
'wait_event', a.wait_event::text,
'wait_event_type', a.wait_event_type::text,
'count', count(a.pid)::bigint
) as result
from
pg_cata... |
<filename>Subqueries and joins/Homework/qrs_soft_uni_db.sql
USE soft_uni;
#1
SELECT e.employee_id, e.job_title, e.address_id, a.address_text
FROM employees AS e
INNER JOIN addresses AS a
ON a.address_id = e.address_id
ORDER BY a.address_id
LIMIT 5;
#2
SELECT e.employee_id, e.first_name, e.last_name, d.name
FROM emplo... |
<filename>src/server/DB/schema.sql
CREATE TABLE "users" (
"id" serial NOT NULL,
"username" varchar NOT NULL UNIQUE,
"password_digest" varchar NOT NULL,
"wpm_avg" int NOT NULL,
"completed_races" int NOT NULL,
CONSTRAINT Users_pk PRIMARY KEY ("ID")
) WITH (
OIDS=FALSE
);
CREATE TABLE "prompts" (
"id" serial N... |
CREATE DATABASE IF NOT EXISTS bamazon;
USE bamazon;
CREATE TABLE IF NOT EXISTS products (
item_id INT(10) NOT NULL AUTO_INCREMENT,
product_name CHAR(30) NOT NULL,
department_name CHAR(30) NOT NULL,
price DECIMAL(5,2) NOT NULL,
stock_quantity INT(10) NOT NULL DEFAULT 0,
pro... |
<reponame>dashtharindu/PHPShoppingCart<filename>tharindu_d .sql
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_C... |
<filename>Semester 3/Basis Data Lanjut/tugas_2/try_trigger.sql
update DETAIL_PEMBELIAN set JUMLAH_BARANG = 19 where ID_DETL_PEMB = 'DTLBL00001';
select * from BARANG |
<gh_stars>0
REM comments.sql
REM Chapter 3, Oracle9i PL/SQL Programming by <NAME>
REM This example demonstrates legal and illegal comments.
DECLARE
v_Department CHAR(3);
v_Course NUMBER;
BEGIN
INSERT INTO classes (department, course)
VALUES (v_Department, v_Course);
END;
/
DECLARE
v_Department CHAR... |
select * from City;
select Name, Population from City where ID = 3;
select ID, District from City where Name = 'Herat';
select * from City where ID > 50 and Population > 200000;
select Language from CountryLanguage;
select * from CountryLanguage where Percentage >= 70.0; |
<gh_stars>1-10
CREATE TABLE _sm_groups_temp ( id INTEGER PRIMARY KEY AUTOINCREMENT, flags varchar(30) NOT NULL, name varchar(120) NOT NULL, immunity_level INTEGER DEFAULT 0 NOT NULL)
SELECT id FROM sm_groups WHERE name = ?
INSERT INTO gaben VALUES(3, 'newell')
SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat3
CREATE ... |
<gh_stars>1-10
-- ------------------------------------------------------------------
-- Purpose: Create a view of the urine output for each ICUSTAY_ID over the first 24 hours.
-- Tested on MIMIC-III v1.2
-- Written by: <NAME>
-- References: TBA.
-- ------------------------------------------------------------------
dro... |
<gh_stars>1-10
-- WIFI
-- Ulvi Ulu
-- ##############################################
CREATE TABLE zutaten (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
titel VARCHAR(190) NOT NULL,
kcal_pro_100 DECIMAL(10,2) NULL DEFAULT NULL,
PRIMARY KEY (id),
KEY titel (titel)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=... |
<gh_stars>1-10
USE spotper
INSERT INTO faixa VALUES(
15,
'Piano Sonata No. 9 in D Major, K. 311: I. Allegro con spirito',
1,
'DDD',
'00:4:24',
1,
1
)
INSERT INTO faixa VALUES(
16,
'Piano Sonata No. 9 in D Major, K. 311: II. Andante con expressione',
2,
'DDD',
'00:6:09',
1,
1
)
INSERT INTO faixa VALUES(... |
CREATE DEFINER=`root`@`localhost` FUNCTION `retname`(statue varchar(2)) RETURNS varchar(45) CHARSET latin1
BEGIN
declare ans varchar(45) default '';
select
username into ans
from
bookista.login
where
state = statue;
RETURN ans;
END |
/*==============================================================*/
/* DB name: hl_basicdata */
/* Created on: 2019/4/21 星期日 1:15:16 */
/*==============================================================*/
CREATE DATABASE hl_basicdata DEFAULT CHARACTER SET utf... |
DROP TABLE IF EXISTS dec04;
CREATE TABLE dec04 (
input text NOT NULL
);
\COPY dec04 (input) FROM PROGRAM 'curl -b session.cookie https://adventofcode.com/2019/day/4/input';
VACUUM ANALYZE dec04;
/* FIRST STAR */
SELECT count(*)
FROM (SELECT CAST(substring(input FOR position('-' IN input)-1) AS integer) AS l... |
-- file:timetz.sql ln:9 expect:true
INSERT INTO TIMETZ_TBL VALUES ('02:03 PDT')
|
<filename>application/common/upgrade/74.sql
ALTER TABLE `qb_moneylog` ADD INDEX ( `money` ); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.