sql stringlengths 6 1.05M |
|---|
<filename>JD-shopping-mall-DB.sql
/*
Navicat Premium Data Transfer
Source Server : lin
Source Server Type : MySQL
Source Server Version : 50718
Source Host : localhost
Source Database : JD-shopping-mall-DB
Target Server Type : MySQL
Target Server Version : 50718
File Encoding ... |
/*
Warnings:
- You are about to drop the column `verified` on the `users` table. All the data in the column will be lost.
*/
-- AlterTable
ALTER TABLE "users" DROP COLUMN "verified";
|
#standardSQL
-- Copyright 2017 The Nomulus Authors. All Rights Reserved.
--
-- 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... |
SELECT (toDecimal128(materialize('1'), 0), toDecimal128('2', 0)) < (toDecimal128('1', 0), toDecimal128('2', 0));
|
INSERT INTO groups (id, name, rules, notes, created, modified) VALUES
(50052, 'Add-on Reviewer MOTD', 'AddonReviewerMOTD:Edit', '', NOW(), NOW());
INSERT INTO groups (id, name, rules, notes, created, modified) VALUES
(50053, 'App Reviewer MOTD', 'AppReviewerMOTD:Edit', '', NOW(), NOW());
INSERT INTO groups (id, nam... |
-- @testpoint:opengauss关键字version(非保留),作为视图名
--关键字explain作为视图名,不带引号,创建成功
CREATE or replace VIEW version AS
SELECT * FROM pg_tablespace WHERE spcname = 'pg_default';
drop view version;
--关键字explain作为视图名,加双引号,创建成功
CREATE or replace VIEW "version" AS
SELECT * FROM pg_tablespace WHERE spcname = 'pg_default';
drop VIEW... |
<gh_stars>0
CREATE TABLE IF NOT EXISTS `users` (
`id` int NOT NULL AUTO_INCREMENT PRIMARY KEY,
`name` varchar(50) NOT NULL,
`phone_number` varchar(50) NOT NULL,
`email` varchar(100),
`address` varchar(200),
`date_creation` DATETIME DEFAULT CURRENT_TIMESTAMP
);
|
CREATE DATABASE ci3_user_availability;
USE ci3_user_availability;
CREATE TABLE `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(60) NOT NULL,
`name` varchar(60) NOT NULL,
`email` varchar(80) NOT NULL,
`password` varchar(60) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf... |
DROP TRIGGER trg_testview_instead_of_delete ON testview;
DROP TRIGGER trg_testview_instead_of_insert ON testview;
CREATE TRIGGER trg_testview_instead_of_delete_new_name
INSTEAD OF DELETE ON testview
FOR EACH ROW
EXECUTE PROCEDURE fn_trg_testview();
CREATE TRIGGER trg_testview_before_update
BEFORE UPDATE ON testv... |
<reponame>ambayzos/Aplikasi-Sistem-Pendukung-Keputusan-Penilainan-Karyawan-Terbaik-PTSurya-Toto
-- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 27 Okt 2020 pada 14.46
-- Versi server: 10.1.31-MariaDB
-- Versi PHP: 7.2.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_Z... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 23 Bulan Mei 2019 pada 23.26
-- Versi server: 10.1.40-MariaDB
-- Versi PHP: 7.3.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
<reponame>rommeldayag/EXAM_52517<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 25, 2017 at 01:57 AM
-- Server version: 10.1.22-MariaDB
-- PHP Version: 7.1.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
S... |
<filename>SqlWatch.Monitor/Project.SqlWatch.Database/dbo/Contracts/sqlwatch_actions.sql<gh_stars>0
CREATE CONTRACT [sqlwatch_actions]
(
[mtype_sqlwatch_action_tsql] SENT BY INITIATOR,
[mtype_sqlwatch_action_external] SENT BY INITIATOR,
[DEFAULT] SENT BY INITIATOR
); |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 12, 2020 at 03:44 PM
-- Server version: 10.4.6-MariaDB
-- PHP Version: 7.3.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
<reponame>danishabdullah/lunatic<gh_stars>0
\echo # Creating country table
create table "country"(
-- Columns
iso iso primary key not null default 'de'::iso,
iso3 char(3) unique not null default 'deu'::char(3),
iso_numeric smallint unique not null default 276... |
<filename>solution/Database/ADSGoFastDbUp/AdsGoFastDbUp/1-0-0/A-Journaled/003-Views.sql
/****** Object: View [Pbi].[ADFPipelineRun] Script Date: 3/03/2022 12:56:03 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/*-----------------------------------------------------------------------
Copyright (c) M... |
<reponame>lgarin211/TUGASCICRUD_PAK_ANGGRA<filename>DataBase/CIDB.sql
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Waktu pembuatan: 29 Mar 2021 pada 09.05
-- Versi server: 10.4.13-MariaDB
-- Versi PHP: 7.4.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
S... |
<reponame>jdkoren/sqlite-parser
-- attach2.test
--
-- execsql {rollback}
rollback |
-- INSERTS CHARACTER
INSERT INTO public.character(id, name, description, modified) VALUES(nextval('character_seq'), 'Thor', 'Son of Odin', CURRENT_TIMESTAMP);
INSERT INTO public.character(id, name, description, modified) VALUES(nextval('character_seq'), 'Iron Man', 'Billionaire and philanthropist', CURRENT_TIMESTAMP);
... |
<filename>tests/root/run__split/18/test.sql<gh_stars>100-1000
set @counter := 0;
SET @s := '
split(test_cs.test_split_sparse:
delete from test_cs.test_split_twin
using test_cs.test_split_twin join test_cs.test_split_sparse using(id)
)
{
}
';
call run(@s);
select count(*) = 3996 f... |
DROP VIEW IF EXISTS "de.metas.fresh".PP_Product_Bom_And_Component;
CREATE OR REPLACE VIEW "de.metas.fresh".PP_Product_Bom_And_Component AS
SELECT
-- bom (header) stuff
b.PP_Product_Bom_ID,
-- the BOM-product, i.e. the "end-result"
b.M_Product_ID AS b_M_Product_ID, b_p.Value as b_p_Value, b_p.Name as b_p_Name,... |
-- phpMyAdmin SQL Dump
-- version 4.4.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 24 Nov 2015 pada 13.54
-- Versi Server: 5.6.26
-- PHP Version: 5.5.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!... |
<gh_stars>0
USE SOCCER_DB
GO
-- 7. Write a query in SQL to find the number of self-goals scored in EURO cup 2016.( goal_details)
SELECT COUNT(*) 'number of self-goals scored'
FROM goal_details
WHERE goal_type = 'O'; |
WITH comms AS (
SELECT CASE relkind
WHEN 'r' THEN 'table'
WHEN 'i' THEN 'index'
WHEN 'S' THEN 'sequence'
WHEN 'v' THEN 'view'
WHEN 'm' THEN 'materialized view'
WHEN 'c' THEN 'type'
WHEN 'f' THEN 'foreign table'
END AS objtype,
nsp.nspname, cls.relname AS objname, NULL AS objsubname, 0... |
<reponame>erizzolo/SPI<filename>2019_sim_1/DBSIM191.sql
DROP DATABASE IF EXISTS DBBikeRental;
CREATE DATABASE IF NOT EXISTS DBBikeRental;
USE DBBikeRental
CREATE TABLE Utente (
id INT AUTO_INCREMENT COMMENT "Unique auto generated user id",
nome VARCHAR(50) NOT NULL COMMENT "Nome utente",
cognome VARCHAR(50) NOT NUL... |
<reponame>alifianmahardhika/evoting
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 07, 2017 at 08:13 AM
-- Server version: 10.1.25-MariaDB
-- PHP Version: 7.1.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_... |
<gh_stars>0
{{ config(enabled=var('lever_using_posting_tag', True)) }}
with base as (
select *
from {{ ref('stg_lever__posting_tag_tmp') }}
),
fields as (
select
{{
fivetran_utils.fill_staging_columns(
source_columns=adapter.get_columns_in_relation(ref('stg_lever__p... |
<reponame>delchev/cloud-dirigible
SELECT * FROM DGB_FILES WHERE FILE_PATH LIKE ?
|
CREATE
FUNCTION
DBSINGULAR
.
dateDiffInDays
(
DATE1
TIMESTAMP,
DATE2
TIMESTAMP
)
RETURNs
int
AS
$$
BEGIN
RETURN
DATE_PART
(
'days',
DATE1
-
DATE2
);
END;
$$
LANGUAGE
PLPGSQL;
|
CREATE PROCEDURE dbo.ProcWithAllVariableTypesSpecifiedCastSpecified
AS
BEGIN
declare @Binary BINARY (10)
, @Char CHAR (10)
, @Decimal Decimal (10)
, @Float Float (10)
, @NChar NChar (... |
BEGIN;
ALTER TABLE builds
DROP COLUMN create_time;
COMMIT;
|
{% macro get_ad_history_columns() %}
{% set columns = [
{"name": "_fivetran_synced", "datatype": dbt_utils.type_timestamp()},
{"name": "account_id", "datatype": dbt_utils.type_int()},
{"name": "ad_set_id", "datatype": dbt_utils.type_int()},
{"name": "ad_source_id", "datatype": dbt_utils.type_int()},
... |
--
-- Add new tab
--
INSERT INTO `core_form_tab` (`Tab_ID`, `form`, `title`, `subtitle`, `icon`, `counter`, `sort_id`, `filter_check`, `filter_value`) VALUES
('contact-campaign', 'contact-single', 'Campaign', 'Recent Contact', 'fas fa-campaign', '', '1', '', '');
--
-- Add new partial
--
INSERT INTO `core_form_field` ... |
<filename>RMS_DatabaseTable.sql<gh_stars>0
CREATE TABLE "DESIGNATION"
( "ID" NUMBER(10,0),
"DESIGNATION_NAME" VARCHAR2(30) NOT NULL ENABLE,
"DESCRIPTION" VARCHAR2(50),
CONSTRAINT "DESIGNATION_PK" PRIMARY KEY ("ID")
USING INDEX ENABLE
)
/
CREATE TABLE "EMPLOYEE"
( "ID" NUMBER(10,0),
"E... |
<filename>openGaussBase/testcase/PROCEDURE/PROC_IF_ELSE/Opengauss_Function_Procedure_If_Else_Case0005.sql
-- @testpoint: 测试存储过程中if判断的条件为bool类型的变量
--创建存储过程
CREATE OR REPLACE PROCEDURE PROC_IF_ELSE_005
AS
v_bool boolean;
begin
v_bool:=true;
if(v_bool)
then
raise info 'The condition is true';
en... |
<reponame>nicostreri/Proyecto-Analisis-Sistema
insert into fixtures (id,name) values
(1,'RUSIA2018');
insert into schedules (id,date_name,fixture_id) values
(1,'PRIMERA FECHA',1),
(2,'SEGUNDA FECHA',1),
(3,'TERCERA FECHA',1),
(4,'CUARTA FECHA',1),
(5,'QUINTA FECHA',1);
insert into teams (id,name) values
(1,'EQUIPO... |
create table blog_post (
id char(36) primary key,
title varchar(255) not null,
summary text not null,
content text not null,
date_time timestamp not null
) |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 20-06-2021 a las 22:21:49
-- Versión del servidor: 10.4.14-MariaDB
-- Versión de PHP: 7.4.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40... |
<filename>10/bullseye/CreateDB.sql
create table entries (id serial primary key, key varchar(255) not null, value text not null, expiration bigint, unique(key));
|
<filename>database_scripts/sql/003_phone_number_column.sql<gh_stars>1-10
IF NOT EXISTS(SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS where TABLE_NAME = 'user' and COLUMN_NAME = 'phone_number')
BEGIN
ALTER TABLE [dbo].[user] ADD phone_number varchar(50) null
END
GO |
<gh_stars>1-10
insert into book.categories(book_id, name) values(1,'food'),(1,'entertaiment'),(1,'houshold'),(1,'others') |
alter table signons add column token text null;
|
USE [test_normalization];
execute('create view _airbyte_test_normalization."nested_stream_with_co___long_names_partition_ab2__dbt_tmp" as
-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type
select
_airbyte_nested_strea__nto_long_names_hashid,
double_array_data,... |
--
-- bcda_queue schema as of 2020-10-01
--
BEGIN;
--
-- Name: que_jobs; Type: TABLE; Schema: public;
--
CREATE TABLE public.que_jobs (
priority smallint DEFAULT 100 NOT NULL,
run_at timestamp with time zone DEFAULT now() NOT NULL,
job_id bigint NOT NULL,
job_class text NOT NULL,
args json DEFAU... |
<reponame>iuri/tutortronics
-- add define function args calls to the database.
select define_function_args('content_extlink__new','name,url,label,description,parent_id,extlink_id,creation_date;now,creation_user,creation_ip');
select define_function_args('content_extlink__delete','extlink_id');
select define_function_a... |
DELETE FROM trade_store;
INSERT INTO trade_store(id,trade_id,version,cp_id,book_id,maturity_date,created_date,expired) VALUES
(2,'T10',1,'CP-1','B1',parsedatetime('20-05-2021', 'dd-MM-yyyy'),parsedatetime('29-08-2020', 'dd-MM-yyyy'),'N');
INSERT INTO trade_store(id,trade_id,version,cp_id,book_id,maturity_date,created_... |
SELECT max(number) FROM numbers_mt(0) GROUP BY number % 4;
SELECT max(number) FROM numbers_mt (10) WHERE number > 99999999998 GROUP BY number % 3;
SELECT avg(number), max(number+1)+1 FROM numbers_mt(10000) where number > 2 GROUP BY 1;
SELECT number%3 as c1, number%2 as c2 FROM numbers_mt(10000) where number > 2 group b... |
<reponame>paser4se/grivet
ALTER TABLE class MODIFY json_schema JSON;
|
//=============================================================================
// create databases
//=============================================================================
USE ROLE SYSADMIN;
CREATE DATABASE MATILLION_DB
COMMENT='Database for MATILLION ingestion.';
//=========================================... |
drop database if exists `expr_filter`;
create database `expr_filter`;
use `expr_filter`;
create table t2 (id int primary key,
should_skip int,
c int,
gen int as (id + 1)
); |
<reponame>imalsogreg/collabplot<filename>sql/sampledata.sql
delete from project;
delete from member;
delete from pi;
delete from thrust;
INSERT INTO thrust(name) VALUES ('Circuits'),('Social'),('Vision'),('Theory'),('Development');
INSERT INTO pi(name,thrust) VALUES
('Boyden', (SELECT id FROM thrust WHERE name='Circ... |
CREATE OR REPLACE FUNCTION rebuild_cites_species_listing_mview() RETURNS VOID
LANGUAGE plpgsql
AS $$
BEGIN
DROP TABLE IF EXISTS cites_species_listing_mview_tmp;
CREATE TABLE cites_species_listing_mview_tmp AS
SELECT
taxon_concepts_mview.id AS id,
taxon_concepts_mview.taxonomic_position,
taxon_concepts... |
-- @testpoint:openGauss保留关键字As作为视图名
--不带引号-合理报错
CREATE or replace VIEW As AS
SELECT * FROM pg_tablespace WHERE spcname = 'pg_default';
--加双引号-创建成功
CREATE or replace VIEW "As" AS
SELECT * FROM pg_tablespace WHERE spcname = 'pg_default';
--清理环境
drop VIEW "As";
--加单引号-合理报错
CREATE or replac... |
SELECT p.PeakName,
m.MountainRange AS [Mountain],
p.Elevation
FROM Peaks AS p
JOIN Mountains AS m ON p.MountainId = m.Id
ORDER BY p.Elevation DESC |
<filename>db/seeds.sql
INSERT INTO managers (first_name, last_name)
VALUES
('Pedro', 'Smith'),
('Wanda', 'Jones');
INSERT INTO departments (name, manager_id)
VALUES
('Kitchen', 1),
('Admin', 1),
('Service', 2),
('Supervisors', 2);
INSERT INTO roles (title, salary, department_id)
... |
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
CREATE TABLE IF NOT EXISTS users (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
name VARCHAR(50) NOT NULL,
username VARCHAR(20) NOT NULL,
email VARCHAR(40) NOT NULL UNIQUE,
password_hash VARCHAR(60),
phone VARCHAR(12),
document_id VARCHAR(11),
... |
<reponame>ColeyG/logincms
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Apr 09, 2018 at 01:34 AM
-- Server version: 5.6.34-log
-- PHP Version: 7.1.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+0... |
drop table if exists bi_prod.d_sfdc_account cascade;
create table if not exists bi_prod.d_sfdc_account
(
account_key serial not null,
account_id varchar not null,
name varchar not null,
billing_city varchar null,
billing_state varc... |
<filename>raw/Spool/skip_batch.sql
set head on
set array 1
set linesize 10000
set pagesize 50000
set long 10000
set echo on
set trimspool on
set colsep ';'
set numformat 9999999999999999.99
SPOOL c:\skip_batch.spl
select * from eitb_pending_programs ;
UPDATE eitb_pending_programs SET run_stat='S' WHERE... |
<filename>hibernate-plus/src/test/java/com/baomidou/hibernateplus/spring/sql/hibernate-plus.sql
/*
Navicat MySQL Data Transfer
Source Server : 本地机
Source Server Version : 50527
Source Host : 127.0.0.1:3306
Source Database : hibernate-plus
Target Server Type : MYSQL
Target Server Version : 5... |
Use CVRP;
/* Listar en orden alfabético los usuarios registrados (nombres, apellidos) y el tipo de documento */
SELECT DescripcionTD,Documento, PrimerNombre, SegundoNombre, PrimerApellido, SegundoApellido
FROM tbl_usuario a
inner join tbl_tipodocumento b ON a.Pk_idTipoDocumento = b.idTipoDocumento
order by primerNombr... |
<reponame>dietervanhoof/openshift-flightsapi
CREATE TABLE IF NOT EXISTS flights (
flight_id serial PRIMARY KEY,
origin text,
destination text,
scheduleddeparturedate timestamp with time zone
); |
<filename>quan_li_ho_so_sinh_vien.sql
-- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 28, 2018 at 11:23 AM
-- Server version: 10.1.31-MariaDB
-- PHP Version: 7.1.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET ti... |
CREATE DATABASE taxablesData;
use taxablesData;
CREATE TABLE IF NOT EXISTS taxables (id int AUTO_INCREMENT,
Item VARCHAR(48) CHARACTER SET utf8,
Cost VARCHAR(48) CHARACTER SET utf8,
Tax NUMERIC(4, 2),
Total NUMERIC(8, 2),
PRIMARY KEY (id)
);
INSERT INTO taxables(Item, Cost, Tax, Total) VALUES
(... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 1172.16.31.10
-- Waktu pembuatan: 22 Nov 2021 pada 03.30
-- Versi server: 10.1.38-MariaDB
-- Versi PHP: 7.2.17
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!401... |
<reponame>olekstomek/simple-sql-query
#2. Wszystkie dane samochodów z rocznika 2010.
SELECT idauta, marka, model, przebieg, rocznik, kolor, ubezpieczenie FROM auta WHERE rocznik = 2010; |
<filename>Store.Infra/Scripts/Procedures/SaveCustomer.sql
CREATE PROCEDURE spSaveCustomer
@Id UNIQUEIDENTIFIER,
@FirstName VARCHAR(40),
@LastName VARCHAR(40),
@Document CHAR(11),
@Email VARCHAR(160),
@Phone VARCHAR(13)
AS
INSERT INTO [Customer](
[Id],
[FirstName],
[L... |
<reponame>maggie-lee/gga-services<gh_stars>1-10
BEGIN
drop table if exists gga.bills;
create table gga.bills like gga_staging.bills;
alter table bills
add column bill_passed tinyint DEFAULT 0,
add column predictions double;
insert into gga.bills
select a.*, b.bill_passed, b.prediction
from gga_st... |
<reponame>Wang-Yong2018/pgml<gh_stars>1-10
with source as
(
select
*
from
{{ref('train_2_raw')}}
where
row_id =1
)
select
row_number() over() as date_id,
key::date as date
from
source as rp,
jsonb_each_text(rp.ts) as tsv |
<filename>backend/sql/master_photo_caption_store/select.sql
SELECT
id,
master_photo_caption_store_id
FROM
draggable_category
WHERE
master_photo_caption_store_id = (
SELECT
id
FROM
master_photo_caption_store
WHERE
user_id = $1);
|
-- file:sysviews.sql ln:37 expect:true
select name, setting from pg_settings where name like 'enable%'
|
-- file:box.sql ln:147 expect:true
EXPLAIN (COSTS OFF) SELECT * FROM box_temp WHERE f1 &< '(10,4.333334),(5,100)'
|
-- CreateEnum
CREATE TYPE "BudgetStatus" AS ENUM ('ACTIVE', 'INACTIVE', 'PENDING');
-- CreateTable
CREATE TABLE "Budget" (
"id" TEXT NOT NULL,
"name" TEXT NOT NULL,
"description" TEXT,
"userId" TEXT NOT NULL,
"Status" "BudgetStatus" NOT NULL DEFAULT E'PENDING',
"createdAt" TIMESTAMP(3) NOT NULL... |
<filename>backend/de.metas.adempiere.adempiere/migration/src/main/sql/postgresql/system/10-de.metas.adempiere/5470580_sys_gh2306-period-action-open-close.sql
-- 2017-09-04T07:27:33.578
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Table_Process (AD_Client_ID,AD_Org_ID,AD_Process_ID,AD... |
<reponame>dram/metasfresh
DROP VIEW IF EXISTS de_metas_material.MD_ShipmentQty_V;
CREATE VIEW de_metas_material.MD_ShipmentQty_V AS
SELECT
sq.QtyToBeShipped,
p.C_UOM_ID,
p.M_Product_ID,
sq.AttributesKey,
sq.s_PreparationDate_Override,
sq.s_PreparationDate,
sq.o_PreparationDate,
sq.SalesOrderLastUpda... |
<filename>clj/imgscan/resources/migrations/20220208160318-imgscan.up.sql
CREATE TABLE imgscan_image (
id integer NOT NULL PRIMARY KEY AUTO_INCREMENT,
imgfile varchar(100) NOT NULL UNIQUE,
detect bool NOT NULL,
scanned datetime NULL);
CREATE TABLE imgscan_imgobject (
id integer NOT NULL PRIMARY KEY AUTO_INCRE... |
<reponame>Tsvetelin98/Solar
CREATE VIEW solardatum.da_loc_datum_data AS
SELECT d.ts, d.loc_id, d.source_id, d.posted, solardatum.jdata_from_datum(d) AS jdata
FROM solardatum.da_loc_datum d;
CREATE VIEW solaragg.agg_loc_datum_hourly_data AS
SELECT d.ts_start, d.local_date, d.loc_id, d.source_id, solaragg.jd... |
<reponame>jamiels/ptbe<filename>conf/evolutions/default/1.sql
# --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table ad (
id bigint auto_increment not null,
uuid varchar(255),
ad_image_... |
select col_date from `prqUnAll_0.parquet` where col_date = '1954-01-06' union all select col_date from `prqUnAll_1.parquet` where col_date = '1954-01-06';
|
/*
Onix CMDB - Copyright (c) 2018-2019 by www.gatblau.org
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... |
<reponame>haokandian/haokanshop
# 佣金明细 - 应用
DROP TABLE `{PREFIX}plugins_distribution_profit_log`; |
Create Table [Hrm].[EmployeesAddresses]
(
[AddressId] Uniqueidentifier Not Null Default NEWID(),
[AddressType] Int Not Null,
[AddressTypeName] As
Case [AddressType]
When 1 Then 'Mailing Address'
When 2 Then 'Primary Address'
End,
[EmployeeId] Uniqueidentifier Not Null,
[StreetOne] Varchar(1000) Not Nul... |
UPDATE CODE_STYLE_REPORT
SET GRADE = 0
WHERE GRADE = 'A';
UPDATE CODE_STYLE_REPORT
SET GRADE = 1
WHERE GRADE = 'B';
UPDATE CODE_STYLE_REPORT
SET GRADE = 2
WHERE GRADE = 'C';
UPDATE CODE_STYLE_REPORT
SET GRADE = 3
WHERE GRADE = 'D';
UPDATE CODE_STYLE_REPORT
SET GRADE = 4
WHERE GRADE = 'E';
UPDATE CODE_STYLE_REPORT
... |
<filename>doc/sample-data/im_depart.sql
INSERT INTO `im_depart` (`id`,`depart_name`,`priority`,`parent_id`,`status`,`created`,`updated`) VALUES (1,'测试部门',123456,0,0,1493984252,1493984252);
|
ALTER TABLE ${ohdsiSchema}.sec_user DROP COLUMN password;
ALTER TABLE ${ohdsiSchema}.sec_user DROP COLUMN salt; |
<reponame>GeorgeKirev/OpenOLAT
drop index if exists f_m_path_keys_idx;
drop index if exists f_m_filename_idx; |
<gh_stars>10-100
!connect jdbc:polyphenydbembedded:model=target/test-classes/wiki.json admin admin
values 'What are the largest cities in California?';
select c."Rank", c."City", c."State", c."Population" "City Population", s."Population" "State Population", (100 * c."Population" / s."Population") "Pct State Populatio... |
<filename>migrations/2020-12-18-055027_readpoint/up.sql
CREATE TABLE "comment_readpoints" (
user_id INTEGER NOT NULL REFERENCES users(id),
post_id INTEGER NOT NULL REFERENCES posts(id),
comment_readpoint INTEGER NOT NULL,
PRIMARY KEY (user_id, post_id)
);
|
-- This SQL file contains schema changes for gpperfmon needed to complete the creation of the schema
revoke all on database gpperfmon from public;
-- for web ui auth everyone needs connect permissions
grant connect on database gpperfmon to public;
|
<filename>docker/web/schema/migrations/sqls/20210603143546-schema-up.sql<gh_stars>0
CREATE SCHEMA usr; -- user shared area
CREATE SCHEMA prv; -- private user data (not accessible via postgraphile)
CREATE SCHEMA sys; -- system space for background jobs
ALTER DEFAULT privileges REVOKE EXECUTE ON functions FROM public;
|
/*
* This file is used to test pull down of subplan expressions
*/
create schema col_distribute_subplan_base_2;
set current_schema = col_distribute_subplan_base_2;
-- Create Table and Insert Data
create table t_subplan1(a1 int, b1 int, c1 int, d1 int) with (orientation = column) ;
create table t_subplan2(a2 int, b2 ... |
ALTER TABLE users ADD COLUMN roles jsonb NOT NULL DEFAULT '["ROLE_USER"]';
ALTER TABLE users RENAME COLUMN role_id TO group_id;
ALTER TABLE services_new RENAME TO service_instances;
ALTER SEQUENCE services_new_id_seq RENAME TO service_instances_id_seq;
ALTER TABLE services RENAME TO services_old;
ALTER TABLE service_... |
<gh_stars>0
INSERT INTO `competence` (`libelle`, `value`) VALUES
('Html / Css', 80),
('Php', 70),
('Javascript', 60),
('Symfony', 65),
('C#', 65),
('Design', 80),
('Java', 60),
('SQL / PLSQL', 70),
('Linux', 70),
('Gestion de Projet', 75);
INSERT INTO `etude` (`periode`, `libelle`, `description`, `cote`, `inverse`) V... |
<reponame>patlai/img-repo
CREATE TABLE IF NOT EXISTS Images (
fileName VARCHAR(255) NOT NULL,
date DATE,
description TEXT,
PRIMARY KEY (fileName)
) ENGINE=INNODB;
CREATE TABLE IF NOT EXISTS Tags (
tagId INT AUTO_INCREMENT,
tag VARCHAR(255) NOT NULL,
imageFileName VARCHAR(255) NOT NULL,
P... |
<filename>sql/schema.sql
DROP DATABASE IF EXISTS bamazon;
CREATE DATABASE bamazon;
USE bamazon;
CREATE TABLE products (
item_id INT NOT NULL AUTO_INCREMENT,
product_name VARCHAR(100) NOT NULL,
department_name VARCHAR(100) NOT NULL,
price DECIMAL(10, 4) NOT NULL,
stock_quantity INT NOT NULL,
product_sales... |
/****** Object: StoredProcedure [dbo].[app_MGCodeBreaker_Update] Script Date: 01/05/2015 14:43:21 ******/
--Create the Update Proc
CREATE PROCEDURE [dbo].[app_MGCodeBreaker_Update] (
@CBID INT,
@MGID INT,
@EasyString VARCHAR(250),
@EnableMediumDifficulty BIT,
@EnableHardDifficulty BIT,
@MediumString VARCHAR... |
-- MyEMS System Database
-- ---------------------------------------------------------------------------------------------------------------------
-- Schema myems_system_db
-- ---------------------------------------------------------------------------------------------------------------------
DROP DATABASE IF EXISTS `m... |
USE directory;
CREATE TABLE employee (
ID INT ,
Employeename VARCHAR(25),
Age INT,
Title VARCHAR(50),
Email VARCHAR(30)
PRIMARY KEY(ID)
);
INSERT INTO employee
VALUES(1, '<NAME>', 24, 'intern', '<EMAIL>')
SELECT * FROM employee;
|
<filename>prisma/migrations/20220222193054_published_at_to_type_string/migration.sql
-- AlterTable
ALTER TABLE "Post" ALTER COLUMN "published_at" DROP DEFAULT,
ALTER COLUMN "published_at" SET DATA TYPE TEXT;
|
<reponame>jdkoren/sqlite-parser
-- fts2d.test
--
-- execsql {
-- SELECT snippet(t1) FROM t1 WHERE t1 MATCH 'run jump';
-- }
SELECT snippet(t1) FROM t1 WHERE t1 MATCH 'run jump'; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.