text stringlengths 1 1.05M |
|---|
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50525
Source Host : astaroth-sony:3306
Source Database : npeht
Target Server Type : MYSQL
Target Server Version : 50525
File Encoding : 65001
Date: 2017-07-21 11:41:03
*/
SET FOREIGN_KEY_CHECKS=0;
--... |
CREATE TABLE IF NOT EXISTS erc20.tokens (
contract_address bytea UNIQUE,
symbol text,
decimals integer
);
BEGIN;
DELETE FROM erc20.tokens *;
COPY erc20.tokens (contract_address, symbol, decimals) FROM stdin;
\\x4200000000000000000000000000000000000006 WETH 18
\\xda10009cbd5d07dd0cecc66161fc93d7c9000da1 DAI 18
\\x... |
delete from h2student;
insert into h2student (id, name, age)values (1, 'Tom', 1);
insert into h2student (id, name, age)values (2, 'Jerry', 1);
insert into h2student (id, name, age)values (12, '要开除的学生', 1);
insert into h2student (id, name, age)values (13, 'test1', 1);
insert into h2student (id, name, age)values (14, 'te... |
-- file:inherit.sql ln:396 expect:true
create table p1(f1 int)
|
/*
Missing Index Details from SQLQuery2.sql - (local).FAAD2 (sa (63))
The Query Processor estimates that implementing the following index could improve the query cost by 50.4191%.
*/
USE [FAAD2]
GO
CREATE NONCLUSTERED INDEX IDX_crmOppGood_01
ON [dbo].[crmOppGood] ([OppID])
GO
|
CREATE TABLE Student(
ID INT NOT NULL AUTO_INCREMENT,
NAME VARCHAR(20) NOT NULL,
AGE INT NOT NULL,
PRIMARY KEY (ID)
); |
-- TAB-308 Sits Status table
CREATE TABLE MODEOFATTENDANCE (
CODE NVARCHAR2(6) NOT NULL,
SHORTNAME NVARCHAR2(15),
FULLNAME NVARCHAR2(50),
LASTUPDATEDDATE TIMESTAMP,
CONSTRAINT "MODEOFATTENDANCE_PK" PRIMARY KEY ("CODE")
);
|
CREATE TABLE IDN_BASE_TABLE (
PRODUCT_NAME VARCHAR(20),
PRIMARY KEY (PRODUCT_NAME)
)ENGINE INNODB;
INSERT INTO IDN_BASE_TABLE values ('WSO2 Identity Server');
CREATE TABLE IDN_OAUTH_CONSUMER_APPS (
CONSUMER_KEY VARCHAR(255),
CONSUMER_SECRET VARCHAR(512),
USE... |
# --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table employment (
id bigserial not null,
company_name varchar(255),
role_name varchar(255),
start_date timestamp,... |
ALTER TABLE `devices` CHANGE `snmpEngineID` `snmpEngineID` VARCHAR(64) NULL DEFAULT NULL;
|
create table ACT_RU_JOB (
ID_ NVARCHAR2(64) NOT NULL,
REV_ INTEGER,
TYPE_ NVARCHAR2(255) NOT NULL,
LOCK_EXP_TIME_ TIMESTAMP(6),
LOCK_OWNER_ NVARCHAR2(255),
EXCLUSIVE_ NUMBER(1,0) CHECK (EXCLUSIVE_ IN (1,0)),
EXECUTION_ID_ NVARCHAR2(64),
PROCESS_INSTANCE_ID_ NVARCHAR2(64),
PROC_DEF_ID... |
CREATE TABLE list (id VARCHAR(64) NOT NULL, value VARCHAR(64) NOT NULL, PRIMARY KEY(id));
INSERT INTO "list" ("id", "value") VALUES (E'YE', E'也門');
INSERT INTO "list" ("id", "value") VALUES (E'TT', E'千里達和多巴哥');
INSERT INTO "list" ("id", "value") VALUES (E'TR', E'土耳其');
INSERT INTO "list" ("id", "value") VALUES (E'TM',... |
-- 13.07.2016 13:56
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET AD_Reference_ID=16,Updated=TO_TIMESTAMP('2016-07-13 13:56:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=554816
;
-- 13.07.2016 13:57
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurat... |
/******************************************************************************
** Description: Special services which are offered from a hotel
**
**
**
** Author: T. Erni
** Date: 09.03.2017
**
**
*******************************************************************************
** Change History
*******************... |
PRAGMA foreign_keys = ON;
DELETE FROM post_history;
DELETE FROM post_categories;
DELETE FROM post_tags;
DELETE FROM category;
DELETE FROM tag;
DELETE FROM post;
DELETE FROM user; |
-- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jun 01, 2018 at 06:03 AM
-- Server version: 10.1.31-MariaDB
-- PHP Version: 7.0.26
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
-- Name: CollectionSiteFromTp
-- Schema: posda_queries
-- Columns: ['collection_name', 'site_name']
-- Args: ['activity_timepoint_id']
-- Tags: ['activity_timepoint_support']
-- Description: Get the collection and site from a TP
select distinct
project_name as collection_name,
site_name
from
activity_timep... |
-- 데이터 그룹 (알파돔, 시립대)
INSERT INTO data_group(data_group_id, data_group_key, data_group_name, data_group_path, data_group_target, sharing, user_id, ancestor, parent, depth,
view_order, children, basic, available, tiling, data_count, location, altitude, metainfo)
VALUES
(50000, 'alphadom', 'alphadom... |
-- MySQL dump 10.13 Distrib 5.7.25, for Linux (x86_64)
--
-- Host: 172.19.0.2 Database: challenge
-- ------------------------------------------------------
-- Server version 5.6.43
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
... |
-- noteevents PTSD
SELECT subject_id,noteevents.text
FROM noteevents
where LOWER(noteevents.text) LIKE '%ptsd%'
and NOT LOWER(noteevents.text) LIKE '%anxiety%'
limit 20
|
ALTER TABLE "public"."transactions" ADD COLUMN "asset" text NULL;
|
DELIMITER $$
drop trigger if exists preventUpdateOnSurvey$$
CREATE TRIGGER preventUpdateOnSurvey
BEFORE UPDATE ON ProfessorsSemesterlySurvey
FOR EACH ROW
BEGIN
SIGNAL SQLSTATE '45000' -- "unhandled user-defined exception"
SET MESSAGE_TEXT = 'This table is meant to be used for statistical analysis. You can not change t... |
create or replace package flow_gateways
accessible by (flow_engine)
as
procedure process_para_incl_Gateway
( p_sbfl_info in flow_subflows%rowtype
, p_step_info in flow_types_pkg.flow_step_info
);
procedure process_exclusiveGateway
( p_sbfl_info in flow_subflows%rowtype
, p_step_info in flow_... |
/*TRUNCATE cne.rendi_urban_y_emisi_de;*/
describe cne.rendi_urban_y_emisi_de;
select * from cne.rendi_urban_y_emisi_de;
select DISTINCT RUE_SDESMARCA,RUE_SDESMODELO from cne.rendi_urban_y_emisi_de; /* Marca - Modelo */
select DISTINCT RUE_SDESNORMA from cne.rendi_urban_y_emisi_de; /*Norma*/
select DISTINCT RUE_SDES... |
/*
Copyright 2021 Snowplow Analytics Ltd. 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
Unless required by a... |
USE [AnteroAPI]
GO
DROP PROCEDURE IF EXISTS [dw].[p_lataa_api_koulutuksenkustannukset]
GO
/****** Object: StoredProcedure [dw].[p_lataa_api_koulutuksenkustannukset] Script Date: 15.11.2021 8:35:25 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dw].[p_lataa_api_koulutuksenkustannukset... |
USE pmfoverflow;
INSERT INTO User(username, password, fullname, avatar, email, major, enrollmentyear) VALUES ("perica", "nest@#!@#!@", "Pera Peric", "nesto.jpg", "perica@gmail.com", "Racunarske nauke", 2017);
INSERT INTO User(username, password, fullname, avatar, email, major, enrollmentyear) VALUES ("staraR", "nest@#... |
create table uploaded_file (
id integer generated always as identity,
path bytea not null,
name text not null,
created_date timestamptz not null default now(),
modified_date timestamptz not null default now(),
deleted_date timestamptz null,
constraint uploaded_file_synthetic_key
primary key (id),
... |
alter table "public"."ContentUploadableElement" rename to "RequiredContentItem";
|
USE [ANTERO]
IF EXISTS
(SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='sa' AND TABLE_NAME='sa_eter_students')
BEGIN
DROP TABLE [sa].[sa_eter_students];
END
IF NOT EXISTS
(SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='sa' AND TABLE_NAME='sa_eter_students')
BEGIN
CREATE TABLE [sa].[sa_et... |
----------------------------------------------------------------
-- [bookmarks] Table
--
CREATE OR REPLACE FUNCTION InsertBookmark (
v_bookmark_id UUID,
v_bookmark_name VARCHAR(40),
v_bookmark_value VARCHAR(300)
)
RETURNS VOID AS $PROCEDURE$
BEGIN
INSERT INTO bookmarks (
bookmark_Id,
... |
CREATE DATABASE OCTOPUSH;
USE OCTOPUSH;
CREATE TABLE jobs (
job_id int(11) NOT NULL AUTO_INCREMENT,
module varchar(100) NOT NULL DEFAULT '',
version varchar(15) NOT NULL DEFAULT '',
status varchar(15) NOT NULL DEFAULT 'queued',
environment varchar(20) NOT NULL DEFAULT '',
queue_date timestamp NOT NULL DEF... |
-- name: CreateListForUser :one
INSERT INTO filter_lists (user_id)
VALUES ($1)
RETURNING token;
-- name: GetListForUser :one
SELECT token,
downloaded,
(SELECT COUNT(*) FROM filter_instances WHERE filter_instances.user_id = $1) AS instance_count
FROM filter_lists
WHERE filter_lists.user_id = $1
LIMIT 1;
... |
SET DEFINE OFF;
Insert into DZ_SWAGGER3_SERVER_VAR_MAP
(SERVER_ID, SERVER_VAR_ID, SERVER_VAR_ORDER, VERSIONID)
Values
('sample1', 'port', 10, 'SAMPLE');
Insert into DZ_SWAGGER3_SERVER_VAR_MAP
(SERVER_ID, SERVER_VAR_ID, SERVER_VAR_ORDER, VERSIONID)
Values
('sample1', 'username', 20, 'SAMPLE');
Insert into ... |
-- @author tungs1
-- @modified 2013-07-28 12:00:00
-- @created 2013-07-28 12:00:00
-- @description groupingfunction groupingfunc35.sql
-- @db_name groupingfunction
-- @executemode normal
-- @tags groupingfunction
SELECT GROUPING(sale.pn) as g1 FROM product, sale WHERE product.pn=sale.pn GROUP BY ROLLUP((sale.pn,product... |
-- +goose Up
-- +goose StatementBegin
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
CREATE EXTENSION IF NOT EXISTS "pgcrypto";
CREATE TABLE IF NOT EXISTS "users"
(
id UUID DEFAULT uuid_generate_v4() NOT NULL UNIQUE,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
name TEXT ... |
/*
Warnings:
- Made the column `planWeekId` on table `PlanWorkout` required. The migration will fail if there are existing NULL values in that column.
*/
-- AlterTable
ALTER TABLE "PlanWeek" ADD COLUMN "startDate" TIMESTAMP(3);
-- AlterTable
ALTER TABLE "PlanWorkout" ALTER COLUMN "planWeekId" SET NOT NULL;
|
-- file:plpgsql.sql ln:3381 expect:true
create or replace function raise_test() returns void as $$
begin
raise 'check me'
using errcode = '1234F', detail = 'some detail info'
|
DROP TABLE utbetalingsreferanse;
|
/*
SQLyog Enterprise - MySQL GUI v8.12
MySQL - 5.5.5-10.1.21-MariaDB : Database - ranking
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/... |
-- revert cleanup on node_types
INSERT INTO node_types VALUES ('dummynet');
UPDATE nodes SET node_type='regular' WHERE node_type='reservable';
DELETE FROM node_types WHERE node_type='reservable';
-- drop new tables
DROP VIEW view_leases;
DROP VIEW view_all_leases;
DROP TABLE leases;
DROP FUNCTION IF EXISTS overlappi... |
-- This file is automatically generated by LogicalPlanToSQLSuite.
SELECT a, b, sum(c) FROM parquet_t2 GROUP BY a, b GROUPING SETS (b) ORDER BY a, b
--------------------------------------------------------------------------------
SELECT `gen_attr` AS `a`, `gen_attr` AS `b`, `gen_attr` AS `sum(c)` FROM (SELECT `gen_attr`... |
use ssafydb;
CREATE TABLE `food` (
`code` int(11) NOT NULL,
`name` text COLLATE utf8_bin,
`supportpereat` int(11) DEFAULT NULL,
`calory` double DEFAULT NULL,
`carbo` double DEFAULT NULL,
`protein` double DEFAULT NULL,
`fat` double DEFAULT NULL,
`sugar` double DEFAULT NULL,
`natrium` double DEFAULT N... |
CREATE TABLE subdivision_NO (id VARCHAR(6) NOT NULL, name VARCHAR(255), level VARCHAR(64) NOT NULL, PRIMARY KEY(id));
INSERT INTO "subdivision_NO" ("id", "name", "level") VALUES ('NO-02', 'Akershus', 'county');
INSERT INTO "subdivision_NO" ("id", "name", "level") VALUES ('NO-20', 'Finnmark', 'county');
INSERT INTO "su... |
/*
https://leetcode.com/problems/all-valid-triplets-that-can-represent-a-country/
https://leetcode.com/submissions/detail/450744826/
Amazon
*/
/* Write your T-SQL query statement below */
SELECT
a.student_name as member_A,
b.student_name as member_B,
c.student_name as member_C
FROM
SchoolA a
CROS... |
-- randexpr1.test
--
-- db eval {SELECT t1.d+coalesce((select max(t1.b*t1.b & ~case a & c & t1.d when t1.c then t1.a else t1.e end & e-13*b) from t1 where -t1.a in (select e from t1 union select t1.b from t1) and not exists(select 1 from t1 where (a) in (select min(13)* -cast(avg(t1.e) AS integer)*~case count(*) when... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Apr 14, 2019 at 04:27 PM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.3.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
DO $$
BEGIN
-- Add the 'enabled' column
BEGIN
ALTER TABLE integrationclients ADD COLUMN enabled boolean default true;
EXCEPTION
WHEN duplicate_column THEN RAISE NOTICE 'column integrationclients.enabled already exists, not creating it.';
END;
END;
$$;
|
DROP TABLE IF EXISTS `comment`;
SET character_set_client = utf8mb4 ;
CREATE TABLE `comment` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) DEFAULT NULL,
`entity_type` int(11) DEFAULT NULL,
`entity_id` int(11) DEFAULT NULL,
`target_id` int(11) DEFAULT NULL,
`content` text,
`status` int(11) DEFAU... |
--DROP PROCEDURE GPSQLWEB.procCreateAa2cta
CREATE PROCEDURE GPSQLWEB.procCreateAa2cta
(
IN P_CTAEMP VARCHAR(2),
IN P_CTADEL VARCHAR(2),
IN P_CTADIV NUMERIC(3 , 0),
IN P_CTAGEN VARCHAR(12),
IN P_CTACTE NUMERIC(14 , 0),
IN P_CTACAT NUMERIC(2 , 0),
IN P_CTASUB NUMERIC(2 , 0),
IN P_CTA... |
INSERT INTO `shipping_classes` VALUES (1,'Global',50,'1','fixed','2021-03-25 13:27:49','2021-03-25 13:27:49'); |
-- @Description UAOCS MVCC readserial and alter + vacuum
-- Transaction 1 of 2 (alter)
--
insert into sto_uaocs_mvcc_status (workload, script) values('readserial_concurr_alter_vacuum', 't1_alter_tuples');
select count(*) as only_visi_rows from sto_uaocs_mvcc_vacuum_alter_serial;
set gp_select_invisible = true;
sel... |
-- INICIO - carlos.alberto 27/05/2014
alter table delegacaocentroresultadoidresponsavelregistro int4 not null;
alter table delegacaocentroresultadoidresponsavelrevogacao int4 null;
alter table delegacaocentroresultadodatahoraregistro timestamp not null;
alter table delegacaocentroresultado datahorarevogacao ti... |
# SQL statements of the form key[.keyspace.columnfamily.[rowID0-2]]
# the based key should always be present
# the keyspace.columnfamily selectors are used to shard the column family (optional)
# the rowID0-2 is to shard on rowID, you can selectively shard hot rowID areas.
# If sharding ensure that any exiting data is ... |
/*
TimescaleDB schema to capture the analyzed data.
To install TimescaleDB, follow the instructions on https://docs.timescale.com/v1.3/getting-started/installation.
To deploy this
sudo psql -U postgres -d [database-name] -a -f tsdb-schema.sql
*/
DROP TABLE IF EXISTS "clean_audio";
CREATE TABLE "clean_audio"(
song_... |
INSERT INTO products (factory_id, name)
WITH a2z AS (
SELECT chr(generate_series(65, 122))::text letter
)
SELECT
(random() * 3364 + 1)::int factory_id,
('Widget ' || t1.letter || t2.letter)::text
FROM a2z t1
CROSS JOIN (SELECT * FROM a2z) t2
ON CONFLICT DO NOTHING
|
INSERT INTO tweb_apbd(`rangkuman`,`berkas_id`,`lembaga_id`, `lembaga_kode`,`pemda_kode`, `wilayah_kode`,`tahun`, `rekening_kode`,`rekening`, `uraian`, `nominal`,`nominal_sebelum`, `nominal_sesudah`, `nominal_perubahan`, `nominal_persen`, `keterangan`, `created_by`, `updated_by`) VALUES
('0','152','72','1.08.01,,,','1.... |
create or replace package ut authid current_user as
/*
utPLSQL - Version 3
Copyright 2016 - 2021 utPLSQL Project
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... |
-- phpMyAdmin SQL Dump
-- version 4.1.8
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Sep 12, 2014 at 11:21 AM
-- Server version: 5.5.36-cll
-- PHP Version: 5.4.23
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIEN... |
CREATE DATABASE launchapp_test; |
update salary set sex = CASE sex
when 'm' then 'f'
when 'f' then 'm'
END |
-- @testpoint:openGauss关键字method(非保留),作为列名带引号并且更新时使用该列,建表成功,method的值更新为100
drop table if exists explain_test;
create table explain_test(
c_id int, c_int int, c_integer integer, c_bool int, c_boolean int, c_bigint integer,
c_real real, c_double real,
c_decimal decimal(38), c_number number(38), c_numeric numeric(3... |
USE InternetSales
GO
INSERT INTO dbo.ShoppingCart
(
SessionID,
TimeAdded,
CustomerKey,
ProductKey,
Quantity
)
VALUES
(
1,
GETDATE(),
2,
3,
1
);
INSERT INTO dbo.ShoppingCart
(
SessionID,
TimeAdded,
CustomerKey,
ProductKey,
Quantity
)
VALUES
(
1,
GETDATE(),
2,
4,
1
);
S... |
-- start query 92 in stream 0 using template query92.tpl
SELECT
Sum(ws_ext_discount_amt) AS `Excess Discount Amount`
FROM web_sales ,
item ,
date_dim
WHERE i_manufact_id = 718
AND i_item_sk = ws_item_sk
AND d_date BETWEEN '2002-03-29' AND (
Cast... |
/**
* ID: 01795
* Title: Rearrange Products Table
* Difficulty: Easy
* Description: Table: Products
*
* +-------------+---------+ | Column Name | Type | +-------------+---------+ | product_id | int | | store1 | int | | store2 | int | | store3 | int | +-------------+---------+ product_id is the primary key for ... |
INSERT INTO report_type (cd, name) VALUES ('COVID-1', '新冠肺炎1号');
INSERT INTO report_type (cd, name) VALUES ('COVID-2', '新冠肺炎2号');
INSERT INTO report_type (cd, name) VALUES ('COVID-3', '新冠肺炎3号');
INSERT INTO report_type (cd, name) VALUES ('COVID-4', '新冠肺炎4号');
INSERT INTO report_type (cd, name) VALUES ('COVID-5', '新冠肺炎5... |
-- Local test migration.
-- This will be run on development environments. It should mirror what you
-- intend to apply on production, but do not include any sensitive data.
--
-- Data for Name: office_users; Type: TABLE DATA; Schema: public; Owner: postgres
--
INSERT INTO public.office_users VALUES ('7df9f7e9-597c-4b... |
USE [SEDC.Homework]
--1/3
SELECT COUNT(g.Grade) AS Total
FROM Grade AS g
SELECT COUNT(g.Grade) AS TotalPerTeacher
FROM Grade AS g
GROUP BY TeacherID
SELECT COUNT(g.Grade) AS TotalPerTeacher
FROM Grade AS g
WHERE StudentID <= 100
GROUP BY TeacherID
SELECT MAX(g.Grade) AS MaxPerStudent, AVG(g.Grade) AS A... |
-- @testpoint:openGauss保留关键字else作为视图名
--openGauss保留关键字else作为视图名,不带引号,合理报错
CREATE or replace VIEW else AS
SELECT * FROM pg_tablespace WHERE spcname = 'pg_else';
----openGauss保留关键字else作为视图名,加双引号,创建成功
CREATE or replace VIEW "else" AS
SELECT * FROM pg_tablespace WHERE spcname = 'pg_else';
drop VIEW "else... |
CREATE TABLE work_order_role_type
(
name VARCHAR(128) NOT NULL
, description VARCHAR(256)
, processed DATETIME2 NOT NULL CONSTRAINT WORK_ORDER_ROLE_TYPE_PROCESSED_DF DEFAULT GETDATE()
, CONSTRAINT WORK_ORDER_ROLE_TYPE_PK
PRIMARY KEY
(
name
)
) |
----- Group of very similar simple tests ------
DROP TABLE IF EXISTS zero_rows_per_granule;
CREATE TABLE zero_rows_per_granule (
p Date,
k UInt64,
v1 UInt64,
v2 Int64
) ENGINE ReplacingMergeTree() PARTITION BY toYYYYMM(p) ORDER BY k
SETTINGS index_granularity_bytes=20, write_final_mark = 0,
enable... |
-- @description function_in_select_column_withfunc2_107.sql
-- @db_name functionproperty
-- @author tungs1
-- @modified 2013-04-03 12:00:00
-- @created 2013-04-03 12:00:00
-- @tags functionProperties
SELECT func1_read_int_sql_stb(func2_read_int_stb(a)) FROM foo order by 1;
|
INSERT INTO public.users
(id, login, "password", email, firstname, lastname)
VALUES(
1,
'captain',
'$2a$14$RrWQZM2qrxbWbYI0YHuoKOt3KVKRxxxxaLUhYfgPm8g3fJiQn7Jea', -- Bucky --
'Steven.Rogers@avenge.rs',
'Steve',
'Rogers'
);
|
-- file:bit.sql ln:34 expect:true
SELECT v, b, (v || b) AS concat
FROM BIT_TABLE, VARBIT_TABLE
ORDER BY 3
|
CREATE FUNCTION [tSQLt].[Private_GetSchemaId](@SchemaName NVARCHAR(MAX))
RETURNS INT
AS
BEGIN
RETURN (
SELECT TOP(1) schema_id
FROM sys.schemas
WHERE @SchemaName IN (name, QUOTENAME(name), QUOTENAME(name, '"'))
ORDER BY
CASE WHEN name = @SchemaName THEN 0 ELSE 1 END
);
END; |
100500
100501
100502
100503
100504
100505
100506
100507
100508
100509
100510
|
create database comercio;
use comercio;
create table cliente(
IDCLIENTE INT primary key auto_increment,
nome varchar(30) not null,
sexo enum('M','F') not null,
email varchar(50) unique,
cpf varchar(15) unique
);
create table endereco(
IDEENDERECO INT PRIMARY KEY auto_increment,
RUA VARCHAR (30)... |
select acs_object_type__create_type (
'acs_sc_msg_type', -- object_type
'ACS SC Message Type', -- pretty_name
'ACS SC Message Types', -- pretty_plural
'acs_object', -- supertype
'acs_sc_msg_types', -- table_name
'm... |
CREATE KEYSPACE IF NOT EXISTS eth_raw
WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};
USE eth_raw;
CREATE TABLE block (
block_id_group int,
block_id int,
block_hash blob,
parent_hash blob,
nonce blob,
sha3_uncles blob,
logs_bloom blob,
transactions_root blob... |
CREATE TABLE Product
(product_id CHAR(4) NOT NULL,
product_name VARCHAR(100) NOT NULL,
product_type VARCHAR(32) NOT NULL,
sale_price INTEGER ,
purchase_price INTEGER ,
regist_date DATE ,
PRIMARY KEY (product_id));
BEGIN TRANSACTION;
INSERT INTO Product VALUES ('0001', 'T恤衫', '衣服', ... |
ALTER TABLE `blocksRawDatas_deleted` ADD `type` VARCHAR( 255 ) NOT NULL AFTER `blockID` ;
ALTER TABLE `blocksRawDatas_archived` ADD `type` VARCHAR( 255 ) NOT NULL AFTER `blockID` ;
ALTER TABLE `blocksRawDatas_edition` ADD `type` VARCHAR( 255 ) NOT NULL AFTER `blockID` ;
ALTER TABLE `blocksRawDatas_edited` ... |
--
-- Copyright 2005-2019 The Kuali Foundation
--
-- Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php
--
-- Unless required by ap... |
-- Final SQL mapping:
SELECT attribute_0,attribute_1,attribute_2,attribute_3,attribute_4,attribute_5,attribute_6,attribute_7,attribute_8,attribute_9,attribute_10,attribute_11,attribute_12,attribute_13,attribute_14,attribute_15,attribute_16,attribute_17,attribute_18,attribute_19,attribute_20,attribute_21,attribute_22,a... |
/*
Post-Deployment Script Template
--------------------------------------------------------------------------------------
This file contains SQL statements that will be appended to the build script.
Use SQLCMD syntax to include a file in the post-deployment script.
Example: :r .\myfile.sql
... |
CREATE OR REPLACE FUNCTION _rrule.explode(_rrule.RRULE)
RETURNS SETOF _rrule.RRULE AS 'SELECT $1' LANGUAGE SQL IMMUTABLE STRICT;
COMMENT ON FUNCTION _rrule.explode (_rrule.RRULE) IS 'Helper function to allow SELECT * FROM explode(rrule)';
|
ALTER TABLE stock ADD COLUMN time_fetched DATETIME; |
ALTER TABLE `t_enemy_deckport`
ADD COLUMN `BASE_EXP` int UNSIGNED NOT NULL DEFAULT 0 AFTER `SHIP`; |
SELECT
procpid AS {{ conn|qtIdent('PID') }},
usename AS {{ conn|qtIdent(_('User')) }},
datname AS {{ conn|qtIdent(_('Database')) }},
backend_start AS {{ conn|qtIdent(_('Backend start')) }},
CASE
WHEN client_addr IS NOT NULL AND client_addr::text != '' THEN
client_addr::text || ':' || cli... |
-- Verify pgcrypto
BEGIN;
SELECT 1/count(*) FROM pg_extension WHERE extname = 'pgcrypto';
SELECT has_function_privilege('crypt(text, text)', 'execute');
SELECT has_function_privilege('gen_salt(text)', 'execute');
ROLLBACK;
|
CREATE DATABASE logdisplayplatform_ds_tests;
GRANT ALL PRIVILEGES ON logdisplayplatform_ds_tests.* TO 'logdisplayplatform';
|
Perturbation Response excess over subset
[5Z]-[AK] -0.4143250306436319
[5Z]-[BI] 0.0
[5Z]-[CT] 0.0
[5Z]-[PD] 0.0
[5Z]-[PI] -0.014691413237924777
[5Z]-[PK] 0.0
[5Z]-[JN] -0.0069035947712419166
[5Z]-[D1] -0.002388059701492473
[5Z]-[60] 0.0
[5Z]-[SB] 0.0
[5Z]-[RU] 0.0
[5Z]-[D4] 0.0
[5Z]-[F4] -0.02144402050157268
[5Z]-[ST]... |
-- Copyright [1999-2013] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
--
-- 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/... |
-- Generated by Ora2Pg, the Oracle database Schema converter, version 17.4
-- Copyright 2000-2016 Gilles DAROLD. All rights reserved.
-- DATASOURCE: dbi:Oracle:host=sgd-nex2-db.stanford.edu;sid=SGD
SET client_encoding TO 'UTF8';
\set ON_ERROR_STOP ON
DROP TRIGGER IF EXISTS dbentity_aiudr ON nex.dbentity CASCADE;
CR... |
-- Table Definition
CREATE TABLE IF NOT EXISTS ${schema~}.nftproperties (
"nft_id" VARCHAR(64) NOT NULL,
"key" VARCHAR(255) NOT NULL,
"value" VARCHAR(255) NOT NULL,
CONSTRAINT PK_NFTProperties PRIMARY KEY ("nft_id", "key")
);
|
SELECT DISTINCT [fuel-type] AS fueltype,
[aspiration],
[num-of-doors] AS doors,
[body-style] AS body,
[drive-wheels] AS drive,
[engine-location] AS engineloc,
[wheel-base] AS wheelbase,
[length],
[width],
[height],
[curb-weight] AS weight,
... |
with ads_insights as (
select *
from {{ref('fb_ads_insights')}}
)
select
account_name,
campaign_name,
adset_name,
ad_name,
-- Get the start of the week
date_trunc('week', MIN(insights_date))::date as week_start,
-- Generate a nice label: "[2019-12-09,2019-12-15] | Ad name | Adset | Campaig... |
-- thread004.test
--
-- execsql { CREATE TABLE t1(a, b, c) }
CREATE TABLE t1(a, b, c) |
DO $$
BEGIN
/*
INSERT INTO oms."DecisionBeanDefDO"(id, description) values
(1000, 'Example')
ON CONFLICT (id) DO NOTHING;
INSERT INTO oms."DocumentMapperDefDO"(id,name) values
(1000, 'Example')
ON CONFLICT (id) DO NOTHING;
INSERT INTO oms."ExecutionBeanDefDO"(id, "decisionBeanDefRef", descript... |
ALTER TABLE `dataviva`.`blog_post`
CHANGE COLUMN `title` `title_pt` VARCHAR(400) NULL DEFAULT NULL ,
CHANGE COLUMN `text_call` `text_call_pt` VARCHAR(500) NULL DEFAULT NULL ,
CHANGE COLUMN `text_content` `text_content_pt` LONGTEXT NULL DEFAULT NULL ;
|
/**
zxx_admin_auth_rule,规则表
*/
DROP TABLE IF EXISTS `zxx_admin_auth_rule`;
CREATE TABLE `zxx_admin_auth_rule` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT COMMENT '规则ID',
`name` char(80) NOT NULL DEFAULT '' COMMENT '规则唯一标识',
`title` char(20) NOT NULL DEFAULT '' COMMENT '规则中文名称',
`type` tinyin... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.