sql stringlengths 6 1.05M |
|---|
SELECT
COUNT(*) AS cnt,
CONCAT(
SUM(CONV(SUBSTRING(@CRC:=SHA1(CONCAT_WS('/##/',nid,strname)),1,8),16,10)),
SUM(CONV(SUBSTRING(@CRC, 9,8),16,10)),
SUM(CONV(SUBSTRING(@CRC,17,8),16,10)),
SUM(CONV(SUBSTRING(@CRC,25,8),16,10))
) AS sig
FROM
channel;
SELECT
COUNT(*) AS cnt,
CON... |
INSERT INTO `task_respond` (`id`,`task_id`,`user_id`,`text`,`price`,`status`,`public_date`) VALUES ('1','1','2','Curabitur gravida nisi at nibh','300','new','2019-05-09'),('2','1','3','Curabitur gravida nisi at nibh','700','new','2019-05-09'),('3','1','4','Curabitur gravida nisi at nibh','1200','new','2019-05-09'); |
<filename>instrumentor/daikount/mining/build-tables.sql
CREATE SEQUENCE sessions_seq;
CREATE TABLE sessions (
id int NOT NULL CHECK (id > 0) PRIMARY KEY DEFAULT NEXTVAL('sessions_seq'),
application text NOT NULL CHECK (application <> ''),
sparsity int NOT NULL CHECK (sparsity > 0),
seed int NOT NULL CHECK (see... |
-- PARTITIONS
-- ==========
-- Table level tests on partitioning
USE tap;
DELIMITER //
/************************************************************************************/
-- _has_partition( schema, table, partition, description )
DROP FUNCTION IF EXISTS _has_partition //
CREATE FUNCTION _has_partition(sname VARC... |
/*Script name: TygerValleyPT sp_Report
Author: <NAME>
Date: 26 September 2016
Description: Create Store Procedure for DATABASE TygerValley Pet Shelter
*/
--=========================================================================
USE TygerValleypt
GO
/*This stored procedure will be used to print ... |
<reponame>Adorax/ConnectNPlay_Backend
/* Inserts for app dev phase test data */
INSERT INTO JobTitle
(name)
VALUES
('Manager'),
('UI Manager'),
('Consultant'),
('Web Developer'),
('HR'),
('Accounting'),
('Logistics'),
('CEO'),
('Operations Manager'),
('Project Manager');
INSERT INTO... |
<reponame>bcd29008/agenda-web-flask<gh_stars>0
-- MySQL dump 10.13 Distrib 8.0.25, for Linux (x86_64)
--
-- Host: localhost Database: appweb
-- ------------------------------------------------------
-- Server version 8.0.25
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACT... |
<gh_stars>0
CREATE TABLE `info` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`whastapp` varchar(100) COLLATE utf8mb4_spanish2_ci DEFAULT NULL,
`call` varchar(100) COLLATE utf8mb4_spanish2_ci DEFAULT NULL,
`facebook` varchar(100) COLLATE utf8mb4_spanish2_ci DEFAULT NULL,
`instagram` varchar(100) COLLATE utf8mb4_spa... |
CREATE DATABASE johns08mysql2;
use johns08mysql2;
CREATE TABLE categories (
category_id int(5) unsigned NOT NULL auto_increment,
category_name varchar(50) NOT NULL default '',
description varchar(100),
PRIMARY KEY (category_id)
);
INSERT INTO categories (category_name, description) VALUES ('Backpacks', 'Bag... |
USE [Movies]
GO
/****** Object: StoredProcedure [dbo].[spGetAllMovies] Script Date: 2/28/2016 4:14:37 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <NAME>
-- Create date: 2/19/2015
-- Description: Gets all of the active movies from the Da... |
SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for `km_i_ins`
-- ----------------------------
DROP TABLE IF EXISTS `km_i_ins`;
CREATE TABLE `km_i_ins` (
`id` varchar(160) NOT NULL,
`commit` varchar(160) NOT NULL,
`owner_id` varchar(160) NOT NULL,
`sub_id` varcha... |
/**
* Inserts data for users
*/
INSERT INTO account VALUES ('<NAME>','<EMAIL>','cs2102aplus','West','6 College Avenue East','138614');
INSERT INTO account VALUES ('<NAME>','<EMAIL>','hhh8isudis','West','12 Kent Ridge Drive','119243');
INSERT INTO account VALUES ('Vera','<EMAIL>','skdjskc','East','Blk 135 Jurong East S... |
drop table if exists IRL_INT_SPLIT;
/*==============================================================*/
/* Table: IRL_INT_SPLIT */
/*==============================================================*/
create table IRL_INT_SPLIT
(
SYSTEM_ID varchar(20) not null comment '系统ID',
... |
<reponame>manureta/segmentacion<filename>procesa_lados_comuna.sql
/*
-- Hacer a mano:
-- createdb comuna11
-- vi dump.sql para hacer un drop table antes del begin para evitar error
-- psql comuna11
-- create extension postgis
-- psql -f dump.sql comuna11
----- xej alpe@notebook:~/indec/COMUNA11$ psql -f LadoComuna11.s... |
SELECT f1.X, f1.Y FROM Functions f1
INNER JOIN Functions f2 ON f1.X=f2.Y AND f1.Y=f2.X
GROUP BY f1.X, f1.Y
HAVING COUNT(f1.X)>1 or f1.X<f1.Y
ORDER BY f1.X; |
<reponame>vagrantism/airbyte<filename>airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_simple_streams/second_output/airbyte_tables/test_normalization/pos_dedup_cdcx.sql
create or replace table `dataline-integration-testing`.test_normalization.`pos_dedup_cdcx`
... |
<filename>initialize.sql
CREATE DATABASE changebook;
USE changebook;
CREATE TABLE usuario (
id INT PRIMARY KEY AUTO_INCREMENT,
dataCriacao TIMESTAMP NOT NULL,
nomeUsuario VARCHAR(255) NOT NULL,
email VARCHAR(255) NOT NULL UNIQUE,
senha VARCHAR(255) NOT NULL,
fotoPerfil VARCHAR(255)
)engine = I... |
<reponame>Shuttl-Tech/antlr_psql
-- file:domain.sql ln:308 expect:true
alter domain con add constraint t check (VALUE < 34)
|
SET NOCOUNT, ARITHABORT, XACT_ABORT ON;
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
DECLARE @MinPendingTasksForAlert INT;
DECLARE @MinCreatedWorkersPercent INT;
SET @MinPendingTasksForAlert = 25;
SET @MinCreatedWorkersPercent = 85;
DECLARE @results AS TABLE
(
id INT IDENTITY(1,1) NOT NULL PRIMARY KEY CLUSTERED... |
<reponame>soxhwhat/soxh-music
ALTER TABLE `music`
ADD COLUMN `file_id` VARCHAR(32) NULL COMMENT '音乐文件ID' AFTER `description` ,
ADD CONSTRAINT `c_music_file_id`
FOREIGN KEY (`file_id`) REFERENCES `file`(`id`); |
create table t_demo_user (
id varchar(32) not null,
user_id varchar(100) not null,
user_name varchar(100) not null,
primary key (id)
); |
<filename>server/db.sql
#设置客户端连接服务器端编码
SET NAMES UTF8;
#丢弃数据库
DROP DATABASE IF EXISTS goodlive;
#创建数据库
CREATE DATABASE goodlive CHARSET=UTF8;
#进入该数据库
USE goodlive;
#保存家具分类列表
CREATE TABLE product_family(
fid INT PRIMARY KEY,
fname VARCHAR(15)
);
#插入家具分类数据
INSERT INTO product_family VALUES(10,'沙发');
INSERT INTO pro... |
/* Correct project_metadata.public value, should only be true or false, other invaild value will be rewrite to false */
UPDATE project_metadata SET value='false' WHERE name='public' AND value NOT IN('true', 'false'); |
-- up revolution --
CREATE TABLE IF NOT EXISTS master_provinsi (
id serial PRIMARY KEY NOT NULL,
name varchar(30) NOT NULL,
code varchar(5) UNIQUE NOT NULL
);
CREATE TABLE IF NOT EXISTS master_kabupaten (
id serial PRIMARY KEY NOT NULL,
name varchar(30) NOT NULL,
code varchar(8) UNIQUE NOT NULL... |
<gh_stars>0
CREATE TABLE taskrunner_test5_example1 (
cola int,
colb int );
INSERT INTO taskrunner_test5_example1 VALUES (1,1);
INSERT INTO taskrunner_test5_example1 VALUES (2,2);
INSERT INTO taskrunner_test5_example1 VALUES (3,3);
INSERT INTO taskrunner_test5_example1 VALUES (4,4);
INSERT INTO taskrunner_test5... |
DROP VIEW IF EXISTS public.csm_deployments_weekly CASCADE;
CREATE VIEW public.csm_deployments_weekly AS
SELECT
provider_name,
date_trunc('week', event_time_local) AS event_week,
vehicle_type,
count(DISTINCT device_id) AS unique_devices,
count(*) AS total_deployments,
round(count(*) / count(DIS... |
<reponame>timechild/TflRestClient<gh_stars>0
CREATE DATABASE IF NOT EXISTS `tlf_resource` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `tlf_resource`;
-- MySQL dump 10.13 Distrib 5.5.44, for debian-linux-gnu (x86_64)
--
-- Host: 127.0.0.1 Database: tlf_resource
-- ---------------------------------------------------... |
<reponame>ramarb/admin-fight-callout
-- phpMyAdmin SQL Dump
-- version 4.0.10.14
-- http://www.phpmyadmin.net
--
-- Host: localhost:3306
-- Generation Time: Nov 20, 2016 at 09:56 PM
-- Server version: 5.6.34
-- PHP Version: 5.6.20
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... |
SELECT ds.datasetid AS datasetid,
smp.sampleid,
jsonb_build_object('repositoryid', repin.repositoryid,
'acronym', repin.acronym,
'repository', repin.repository) AS repository,
tx.taxonid,
tx.taxonname,
spec.specimenid AS specimeni... |
--create
create database internalmachine; |
<reponame>umpirsky/currency-list
CREATE TABLE list (id VARCHAR(10) NOT NULL, value VARCHAR(64) NOT NULL, PRIMARY KEY(id));
INSERT INTO "list" ("id", "value") VALUES (E'BGL', E'BGL');
INSERT INTO "list" ("id", "value") VALUES (E'BGM', E'BGM');
INSERT INTO "list" ("id", "value") VALUES (E'XOF', E'CFA/BCEAO frank');
INSE... |
<filename>src/SqlStreamStore.MySql/MySqlScripts/ReadHeadPosition.sql
DROP PROCEDURE IF EXISTS read_head_position;
CREATE PROCEDURE read_head_position()
BEGIN
SELECT max(messages.position)
FROM messages;
END; |
<filename>plugins/notes/migrate.sql
ALTER TABLE ap_tender_tenders_tenants ADD expired_negotiation timestamp DEFAULT NULL NULL;
|
select Country.Name, count(*) from Country join City on City.CountryCode = Country.Code where City.Population >= 1000000 group by Country.Name order by count(*) desc; |
<filename>development-search/doc/sql/tb_basic_menu.sql
INSERT INTO `tb_basic_menu` VALUES ('70d39ffec3654d24977fa2518a6ab427', '控制台', '0', 'ti-spray', NULL, NULL, '系统信息', NULL, 1, NULL, NULL, 'admin', '2016-8-29 16:52:27');
INSERT INTO `tb_basic_menu` VALUES ('2ab11cc9846748d8aaa9247e96f730ef', '系统设置', '0', 'ti-light-b... |
-- sitestructure clear
truncate site_db.metatag;
truncate site_db.page_description;
delete from site_db.page where id > 0;
alter table site_db.page auto_increment = 1;
truncate site_db.subgallery;
delete from site_db.photo where id > 0;
alter table site_db.photo auto_increment = 1;
delete from site_db.gallery where ... |
<gh_stars>0
SELECT
FEED_SYSTEM_CODE
,FEED_DATE
,PERIOD_ENDING_DATE
,CHARGE_ACCOUNT_ID
,CHARGE_OBJECT_CODE_OLD
,CHARGE_OBJECT_CODE
,CHARGE_SUB_ACCOUNT
,INCOME_ACCOUNT_ID
,INCOME_OBJECT_CODE_OLD
,INCOME_OBJECT_CODE
,INCOME_SUB_ACCOUNT
,SERVICE_CODE
,TRANSACTION_TYPE_FLAG
,SALES_TAXABLE_FLAG
,BILL_DESCRIPTION_EXTERNAL
,TR... |
<reponame>Acidburn0zzz/kouign-amann-cloud
DROP TABLE IF EXISTS votes;
CREATE TABLE votes (
vote_id VARCHAR(100),
nfc_id VARCHAR(100) NOT NULL,
rasp_id VARCHAR(100) NOT NULL,
slot_dt VARCHAR(100) NOT NULL,
note INTEGER NOT NULL,
dt DATETIME NOT NULL,
PRIMARY KEY (vote_id)
);
DROP TABLE IF EXISTS rasp_slo... |
<filename>application/tp5cms.sql
/*
SQLyog Community v13.1.5 (64 bit)
MySQL - 5.7.26 : Database - tp5cms
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET ... |
create view TODAY_CURRENCY_RATES as
select
cr.CURRENCY_CODE,
cr.FIXING
from
CURRENCY_RATES cr
where
(cr.RATE_DATE = ContextDate)
|
-- This code is called just before the expdp. EXPDIR is used by expdp and must exist.
WHENEVER SQLERROR EXIT SQL.SQLCODE
CREATE OR REPLACE DIRECTORY expdir AS '&1';
EXIT 0 |
-- Name: GetCurrentPosdaFileId
-- Schema: posda_files
-- Columns: ['file_id']
-- Args: []
-- Tags: ['NotInteractive', 'Backlog', 'used_in_file_import_into_posda']
-- Description: Get posda file id of created file row
select currval('file_file_id_seq') as id
|
<filename>src/main/resources/liquibase/harness/change/expectedSql/firebird/addDefaultValueBoolean.sql
ALTER TABLE authors ADD booleanColumn BOOLEAN
ALTER TABLE authors ALTER COLUMN booleanColumn SET DEFAULT TRUE |
insert into CLUSTER_TBL (id,cluster_name,activedc_id,cluster_description,deleted,cluster_org_id,cluster_admin_emails) values (1,'cluster1',1,'first',0,1,'<EMAIL>');
insert into CLUSTER_TBL (id,cluster_name,activedc_id,cluster_description,deleted,cluster_org_id,cluster_admin_emails) values (2,'cluster2',1,'second',1,1,'... |
<filename>install/XtalPiMS/lib/sql/userdb_example.sql
--
-- PostgreSQL database dump
--
-- Started on 2009-02-03 11:47:27 GMT Standard Time
SET client_encoding = 'UTF8';
SET check_function_bodies = false;
SET client_min_messages = warning;
--
-- TOC entry 1547 (class 0 OID 0)
-- Dependencies: 5
-- Name: SCHEMA publi... |
<reponame>Vishal19111999/addons-server
INSERT INTO waffle_switch (name, active, note, created, modified) VALUES ('enable-wat', 0, 'Enable the wat task during submission.', NOW(), NOW());
|
-- @testpoint: 创建表,插入正常范围值
drop table if exists test_text_02;
create table test_text_02(id int,c_text text);
insert into test_text_02 values(1,'abcqjigjlfdjpog2ow3-0r43eurt9eiuopfjdgjljgabcqjigjlfdjpog2ow3j');
insert into test_text_02 values(2,'abc');
insert into test_text_02 values(3,'中国');
insert into test_text_02 ... |
<reponame>opengauss-mirror/Yat
-- @testpoint: to_clob和‘||’结合
drop table if exists test2;
create table test2 (f2 clob);
insert into test2 values(to_clob('1111111??????????')||to_clob('444aaaaaaaa44444')||to_clob('qqq55555'));
select * from test2;
drop table if exists test2; |
2 13 3 0000-00-00 00:00:00 2015-05-29 11:35:12
|
<filename>src/test/resources/schema/hr_dev_dif_add.sql
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 1172.16.31.10
-- Generation Time: Aug 14, 2018 at 10:07 AM
-- Server version: 10.1.28-MariaDB
-- PHP Version: 7.1.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
STAR... |
DROP DATABASE IF EXISTS coolblog_db;
CREATE DATABASE coolblog_db;
|
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jan 18, 2017 at 11:51 PM
-- Server version: 10.1.16-MariaDB
-- PHP Version: 7.0.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA... |
/* File to create the tables and database */
/* DROP will delete the database if it exists and then the CREATE will create a new from scratch */
DROP DATABASE IF EXISTS company;
CREATE DATABASE company;
/* This tells mysql which database to use */
USE company;
/* Creates the Department Table */
CREATE TABLE Departmen... |
<filename>APEX/f402/application/shared_components/logic/application_processes/get_blogger_details.sql
prompt --application/shared_components/logic/application_processes/get_blogger_details
begin
-- Manifest
-- APPLICATION PROCESS: Get Blogger Details
-- Manifest End
wwv_flow_api.component_begin (
p_version_yyy... |
<reponame>thortek/4790-react-node-app
-- CreateTable
CREATE TABLE "Instructor" (
"id" SERIAL NOT NULL,
"email" TEXT NOT NULL,
"name" TEXT,
PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "Course" (
"id" SERIAL NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"update... |
SELECT * FROM layouts
ORDER BY alternation DESC, score DESC;
|
CREATE TABLE "public"."finals"("id" serial NOT NULL, "mod" integer NOT NULL, "capacity" integer, "room" text NOT NULL, "course_id" integer NOT NULL, "created_at" timestamptz NOT NULL DEFAULT now(), "updated_at" timestamptz NOT NULL DEFAULT now(), PRIMARY KEY ("id") , FOREIGN KEY ("course_id") REFERENCES "public"."cours... |
<reponame>coderZsq/coderZsq.practice.server<filename>study-notes/j2ee-collection/java-web/02-MySQL基础/src/com/coderZsq/dml/UPDATE.sql
-- 需求: 修改西门吹雪的名字为叶孤城
UPDATE t_student SET name = '叶孤城' WHERE name = '西门吹雪'
-- 需求2: 修改id为3的学生, 名字改为张三, 年龄改为18, 邮箱改为zhang@
UPDATE t_student SET name = '张三', age = 18, email = 'zhang@' WHERE... |
/* Mysql dokumentaatio SELECT -komennon syntaksista.
*
* https://dev.mysql.com/doc/refman/5.7/en/select.html
*
* - WHERE ehdolla voidaan muodostaa hakuehtoja, jolla suodatetan
* tulosjoukkoa.
* - Yhtäsuuri ( = )
* - Suurempi kuin ( > )
* - Pienempi kuin ( < )
* - Suurempi tai yhtäsuuri kuin ( >= )
* - Pi... |
<gh_stars>1-10
CREATE TABLE IF NOT EXISTS `change_request` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`requester` VARCHAR(100) NULL DEFAULT NULL,
`number_id` INT(11) NULL DEFAULT NULL,
`request_date` DATE NULL DEFAULT NULL,
`type` VARCHAR(100) NULL DEFAULT NULL,
`description` VARCHAR(1000) NU... |
<reponame>Andrelirao/aulas-graduacao
DECLARE
--Declarando um cursor
CURSOR C_ALUNO IS
-- Passa a consulta
SELECT RA, NOME
FROM ALUNO;
V_ALUNO C_ALUNO%ROWTYPE;
BEGIN
-- Segundo passo - Abrir o cursor
OPEN C_ALUNO;
FETCH C_ALUNO INTO V_ALUNO;
WHILE C_ALUNO%FOUND LOOP
db... |
INSERT INTO roles (role_id, role_code, role_name)
VALUES (newid(), 'ARTEMIS_USER', 'Artemis user');
|
--------------------------------------------------------
-- Constraints for Table INVENT
--------------------------------------------------------
ALTER TABLE "INVENT" ADD CONSTRAINT "PK_EPI_INVENT" PRIMARY KEY ("INVENT_ID")
USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536... |
<reponame>Shuttl-Tech/antlr_psql
-- file:create_function_3.sql ln:171 expect:true
DROP SCHEMA temp_func_test CASCADE
|
<reponame>Shuttl-Tech/antlr_psql<filename>src/test/resources/sql/drop_function/818dbd9d.sql
-- file:updatable_views.sql ln:1022 expect:true
DROP FUNCTION leakproof(anyelement)
|
<gh_stars>0
CREATE TABLE Endereco(
idEndereco INT NOT NULL,
logradouro VARCHAR(45),
numero VARCHAR(5),
bairro VARCHAR(45),
complemento VARCHAR(45)
)
--Consulta: Exiba todas as ocorrências do Bairro Centro, da cidade de Valença (id 4), do estado RJ (id 2) --
SELECT o.idOcorrencia FROM Ocorrencia o
I... |
insert into k_user(t_id,t_address,t_age,t_name) values(1,'test_1',100,'test_1'); |
--
-- PostgreSQL database dump
--
-- Dumped from database version 12.3
-- Dumped by pg_dump version 13.1
-- Started on 2021-08-03 19:17:11 CEST
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_c... |
<reponame>Johnny-Three/prom2click
# note:REPLACE {shard} AND {REPLICA} AND run ON EACH SERVER
// LOCAL test TABLE ON ubuntu ..
CREATE TABLE metrics.samples (
ip STRING DEFAULT 'default',
app STRING DEFAULT 'x',
name STRING DEFAULT 'x',
job STRING DEFAULT 'x',
... |
<filename>database/migration_areatable.sql
INSERT INTO area
SELECT
AreaTableId,
areabit,
mapId,
areaname,
nullif(parentareatableid,0) as parentarea,
(flags & b'1') as snow,
(flags >> 1 & b'1') as unk1,
(flags >> 2 & b'1') as unk2,
(flags >> 3 & b'1') as slaveCapital,
(flags >> 4 & ... |
<reponame>greck2908/DS
PROC $sc_$cpu_ds_enablestate
;*******************************************************************************
; Test Name: ds_resetnocds
; Test Level: Build Verification
; Test Type: Functional
;
; Test Description
; This test verifies that the CFS Data Storage (DS) application sets its
; i... |
<gh_stars>100-1000
drop database if exists `extend_column1`;
create database `extend_column1`;
use `extend_column1`;
create table t1 (c1 int, c2 int, c3 int, primary key(c1));
insert into t1 values(1, 1, 1);
insert into t1 values(2, 2, 2);
create table y1 (c1 int, c2 int, c3 int, gc3 int GENERATED ALWAYS AS (c1 + 1) VI... |
<gh_stars>1-10
-- Name: DupSopCountsByCSS
-- Schema: posda_files
-- Columns: ['sop_instance_uid', 'min', 'max', 'count']
-- Args: ['collection', 'site', 'subject']
-- Tags: []
-- Description: Counts of DuplicateSops By Collection, Site, Subject
--
select
distinct sop_instance_uid, min, max, count
from (
select
... |
<gh_stars>10-100
select title, akas, tags
from azure.azure_storage_account
where name = '{{resourceName}}' and resource_group = '{{resourceName}}' |
<filename>resources/sql/autopatches/20160623.phame.blog.fulldomain.3.sql
UPDATE {$NAMESPACE}_phame.phame_blogtransaction
SET transactionType = 'phame.blog.full.domain'
WHERE transactionType = 'phame.blog.domain';
|
drop procedure if exists sp_CreateAttributePossibleValues;
create procedure sp_CreateAttributePossibleValues(parAttributeId int, parValues json, parUserId int)
begin
set @isValid = 0;
select id into @isValid from tbl_AttributeMaster where id = parAttributeId and is_active = 1;
if @isValid > 0 then
d... |
$function$
BEGIN
RETURN ($1 ~ $q$[\t\r\n\v\\]$q$);
END;
$function$
|
<reponame>TreeBASE/treebasetest<gh_stars>1-10
BEGIN transaction;
select pg_owner('postgres', 'treebase_owner', 'stepmatrixelement_id_sequence', 'public');
select pg_grant('treebase_owner', 'ALL', 'stepmatrixelement_id_sequence', 'public');
select pg_grant('treebase_app', 'ALL', 'stepmatrixelement_id_sequence', 'pu... |
<gh_stars>0
CREATE TABLE [dbo].[Person] (
[ID] INT IDENTITY (1, 1) NOT NULL,
[LastName] NVARCHAR (50) NOT NULL,
[FirstName] NVARCHAR (50) NOT NULL,
[HireDate] DATETIME NULL,
[EnrollmentDate] DATETIME NULL,
CONSTRAINT [PK_dbo.Person] PRIMARY K... |
insert into authors (id, name) values (1, 'Swift')
insert into authors (id, name) values (2, 'Dostoevsky')
insert into authors (id, name) values (3, 'Goethe')
insert into genres (id, name) values (1, 'Satire')
insert into genres (id, name) values (2, 'Novel')
insert into genres (id, name) values (3, 'Tragedy')
insert... |
<filename>base de datos/testidi.sql
-- phpMyAdmin SQL Dump
-- version 3.5.1
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tiempo de generación: 25-05-2018 a las 05:20:30
-- Versión del servidor: 5.5.24-log
-- Versión de PHP: 5.4.3
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 ... |
<reponame>gooper24/PortalCMS<gh_stars>0
CREATE TABLE IF NOT EXISTS user_role (
user_id INTEGER NOT NULL,
role_id INTEGER NOT NULL DEFAULT '1',
FOREIGN KEY (user_id) REFERENCES users(user_id),
FOREIGN KEY (role_id) REFERENCES roles(role_id)
);
INSERT INTO `user_role` (`user_id`, `role_id`) VALUES ('1', '2'); |
CREATE TABLE IF NOT EXISTS "images" (
"id" text NOT NULL,
"blur_hash" text NOT NULL,
"source" text NOT NULL,
PRIMARY KEY ("id")
);
ALTER TABLE "gphotos_photos"
ADD COLUMN "image_id" text references images(id) NOT NULL;
CREATE TABLE IF NOT EXISTS "notion_recipe" (
"page_id" text NOT NULL,
"page_title" text NOT NUL... |
CREATE TABLE [RBApp].[RobotBehaviorKeyphrase](
[Id] bigint IDENTITY NOT NULL,
[SynAppsId] int NOT NULL,
[SynAppsDeviceId] NVARCHAR(255) NULL,
[Keyphrase] [nvarchar](100) NULL,
[KeyphraseReply] [nvarchar](100) NULL,
[Status] [nvarchar](40) NOT NULL DEFAULT 'InActive',
[IsSynAppsLinked] BIT NOT NULL DEFAULT... |
<filename>db/2020-05-03 - Nuevas tablas solicitud_retiro_fondos y estado_solicitud_retiro.sql
-- Creamos la nueva tabla de estado_solicitud_retiro
CREATE TABLE estado_solicitud_retiro
(
id INT NOT NULL,
nombre VARCHAR(255) NOT NULL,
slug VARCHAR(255) NOT NULL
);
ALTER TABLE estado_solicitud_retiro
ADD PR... |
-- 14. Extract the less popular job
-- https://judge.softuni.bg/Contests/Practice/Index/1265#14
SELECT tc.job_during_journey AS job_name
FROM travel_cards AS tc
WHERE tc.journey_id =
(
SELECT j.id
FROM journeys AS j
ORDER BY DATEDIFF(j.journey_start, j.journey_end) ASC
LIMIT 1
)
GROUP BY job_name
ORDER B... |
<reponame>jdkoren/sqlite-parser
-- wal.test
--
-- execsql { ROLLBACK TO tr }
ROLLBACK TO tr |
-- file:horology.sql ln:210 expect:true
SELECT (timestamp without time zone '2000-11-27', timestamp without time zone '2000-11-28')
OVERLAPS (timestamp without time zone '2000-11-27 12:00', interval '1 day') AS "True"
|
<reponame>jmvillaveces/miabis-server<filename>src/main/resources/db/db-schema.sql
CREATE TABLE CONTACT_INFORMATION (
ID VARCHAR(100) NOT NULL PRIMARY KEY,
FIRST_NAME VARCHAR(100),
LAST_NAME VARCHAR(100),
PHONE VARCHAR(100),
EMAIL VARCHAR(100),
ADDRESS VARCHAR(100),
ZIP VARCHAR(100),
CITY VARCHAR(100),
COUNTRY... |
<filename>09-data-processing-tools/09-03-streaming-sql/enriched_weblog.sql
-- Copyright 2021, Google, Inc.
-- 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/licen... |
<gh_stars>10-100
library Falls_Logic version '9.1.000'
using FHIR version '4.0.1'
include FHIRHelpers version '4.0.1' called FHIRHelpers
include Hospice_FHIR4 version '2.0.000' called Hospice
include MATGlobalCommonFunctions_FHIR4 version '5.0.000' called Global
include SupplementalDataElements_FHIR4 version '2.0.0' ... |
<reponame>tverona1/yugabyte-db<gh_stars>1000+
--DROP TABLE IF EXISTS test;
--CREATE TABLE test (a int primary key, b int);
INSERT INTO test VALUES (1, 2);
|
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 22, 2018 at 02:42 PM
-- Server version: 10.1.36-MariaDB
-- PHP Version: 7.2.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
EXEC [EST].[Proc_yjbb_Ins] @Code = N'601566',@CutoffDate = N'2017-09-30',@EPS = N'0.6',@EPSDeduct = N'0',@Revenue = N'17.84亿',@RevenueYoy = N'15.60',@RevenueQoq = N'35.51',@Profit = N'3.43亿',@ProfitYoy = N'9.78',@ProfiltQoq = N'82.64',@NAVPerUnit = N'7.3856',@ROE = N'7.83',@CashPerUnit = N'0.4900',@GrossProfitRate = N'... |
<gh_stars>0
--liveplan10g_sqlid.sql
-- this is for 10g and later
-- see liveplan_10g.sql
@clears
col usql_id new_value usql_id noprint
prompt SQL_ID Value of SQL from V$SQL:
set echo off term off head off
select '&1' usql_id from dual;
set term on head on
var sqlidvar varchar2(20)
var childnumvar number
begin
:s... |
<gh_stars>0
CREATE TYPE master_pages_tt AS TABLE(
master_page_id INT NULL
,master_page_name VARCHAR(50) NOT NULL) |
<filename>dbv-1/data/schema/prc_deleteJobOrCronJobLogByRetention.sql
CREATE DEFINER=`root`@`localhost` PROCEDURE `prc_deleteJobOrCronJobLogByRetention`(IN `p_CompanyID` INT, IN `p_DeleteDate` DATETIME, IN `p_ActionName` VARCHAR(200))
BEGIN
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
-- cron job log ... |
<reponame>ikantspel9/DBOps<gh_stars>1-10
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE OR ALTER PROCEDURE [dbo].[prc_is_sql_under_memory_pressure]
with recompile
as
/* =========================================================================================================
Author: <NAME>
Create Date: 06/... |
<gh_stars>1-10
/*
Author: <NAME>
This script is part of a set that defines several procedures for XMLTABLE based parsing of LexisNexis XML patent files.
This section covers base patent data and patent title data.
*/
\set ON_ERROR_STOP on
\set ECHO all
-- DataGrip: start execution from here
SET TIMEZONE = 'US/Ea... |
<filename>src/test/resources/sql/insert/49e19206.sql
-- file:insert_conflict.sql ln:468 expect:true
insert into selfconflict values (6,1), (6,2) on conflict(f1) do update set f2 = 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.