sql stringlengths 6 1.05M |
|---|
drop table if exists midata.mi_visit_local;
drop table if exists midata.web_visit_local;
drop table if exists midata.mi_action_local;
drop table if exists midata.web_action_local;
drop table if exists midata.mi_action_agg_customer_1m_local;
drop table if exists midata.web_action_agg_customer_1m_local;
... |
CREATE DATABASE db_cidade_das_frutas;
USE db_cidade_das_frutas;
CREATE TABLE tb_categoria(
idCategoria INT PRIMARY KEY AUTO_INCREMENT,
categoria VARCHAR(45),
tipo VARCHAR(45),
Preco BIGINT(10.52),
TipoPag VARCHAR(45)
);
ALTER TABLE tb_categoria
DROP Preco;
INSERT INTO tb_categoria(categoria, Tipo, t... |
CREATE OR REPLACE PACKAGE BODY json_parser IS
/*
Copyright 2017 <NAME>
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/lic... |
<gh_stars>1-10
/*
SQLyog v10.2
MySQL - 5.6.16-log
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
create table `district` (
`id` smallint (5),
`name` varchar (270),
`parent_id` smallint (5),
`initial` char (3),
`initials` varchar (30),
`pinyin` ... |
<filename>jdbc-manager/src/main/resources/postgres/create_session.sql<gh_stars>1-10
DROP table IF EXISTS light_session;
DROP table IF EXISTS light_session_attributes;
CREATE TABLE light_session (
session_id VARCHAR2(100) NOT NULL,
creation_time bigint NOT NULL,
last_access_time bigint NOT NULL,
max_i... |
{% macro sqlserver__get_external_build_plan(source_node) %}
{% set build_plan = [] %}
{% set old_relation = adapter.get_relation(
database = source_node.database,
schema = source_node.schema,
identifier = source_node.identifier
) %}
{% set create_or_replace = (old_relation is ... |
<filename>kata-files/lesson2/hsql/expected/MYLARGESCHEMA/table/TABLE493.sql
//// CHANGE name=change0
CREATE MEMORY TABLE TABLE493(ID INTEGER NOT NULL PRIMARY KEY,FIELD1 VARCHAR(30),USERTYPE1FIELD USERTYPE1,USERTYPE7FIELD USERTYPE7,USERTYPE5FIELD USERTYPE5)
GO
|
<gh_stars>1-10
#standardSQL
# 02_36: Distribution of unqiue font-size values per page
CREATE TEMPORARY FUNCTION getFontSizes(css STRING)
RETURNS ARRAY<STRING> LANGUAGE js AS '''
try {
var reduceValues = (values, rule) => {
if ('rules' in rule) {
return rule.rules.reduce(reduceValues, values);
}
if (... |
<reponame>wudixiaotie/simple_im<filename>doc/db/postgresql/function/create_user.sql
CREATE OR REPLACE FUNCTION create_user(name users.name%TYPE,
phone users.phone%TYPE,
password users.password%TYPE,
... |
-- @testpoint:opengauss关键字true(保留),作为逻辑操作符,验证功能正常
select true and false as result;
select false and true as result;
select true or false as result;
select false or true as result;
select true and null as result;
select true or null as result;
select not true as result;
|
<gh_stars>0
alter table APPLICATIONINSTANCE ADD
(
lifeCycleStatus VARCHAR(255),
deletedetails_id number(19)
);
alter table APPLICATIONINSTANCE_AUD ADD
(
lifeCycleStatus VARCHAR(255),
deletedetails_id number(19)
);
|
<gh_stars>0
--CREATION DE TOUTES LES TABLES NECESSAIRES DANS LE MODELE--
CREATE TABLE IF NOT EXISTS timezone(
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
timezone VARCHAR(100) NOT NULL,
pays INTEGER NOT NULL,
code_du_pays_ou_de_la_region VARCHAR(100) NOT NULL,
FOREIGN KEY (pays) REFERENCES pays(id)
);
CREATE T... |
UPDATE DIR_SCORE
SET INJUSTICE = ?,
WITHDRAW = ?,
NOTES = ?
WHERE ID = ?;
|
<reponame>FaridNegm/egypt_acadmy<filename>egypt_acadmy (2).sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 11, 2019 at 03:59 PM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.3.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCO... |
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 26, 2020 at 06:25 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
<filename>cassandra-chica-ddl.sql
CREATE TABLE user_roles (
role text,
username text,
password <PASSWORD>,
email text,
age int,
PRIMARY KEY (username, role)
);
|
<filename>DB.sql
-- phpMyAdmin SQL Dump
-- version 4.3.7
-- http://www.phpmyadmin.net
--
-- Host: mysql04-farm59.uni5.net
-- Tempo de geração: 25/01/2017 às 16:41
-- Versão do servidor: 5.5.40-log
-- Versão do PHP: 5.3.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_S... |
<gh_stars>0
CREATE DATABASE todolist;
USE todolist;
CREATE TABLE User
(
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(60) NOT NULL,
lastName VARCHAR (60) NOT NULL,
nickName VARCHAR (40) NOT NULL UNIQUE,
email VARCHAR(60) NOT NULL UNIQUE,
password VARCHAR (60) NOT NULL,
sex char(1) NOT NULL... |
<filename>Samples/Northwind/Acme.Northwind.Install/Views/Model/Views.sql<gh_stars>0
--DO NOT MODIFY THIS FILE. IT IS ALWAYS OVERWRITTEN ON GENERATION.
--Model Version 0.0.0.0
--This SQL is generated for the model defined view [Alphabetical list of products]
if exists (select * from dbo.sysobjects where id = obje... |
-- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Oct 05, 2015 at 11:37 AM
-- Server version: 5.6.21
-- PHP Version: 5.6.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... |
CREATE TABLE product
(
id INTEGER PRIMARY KEY,
name TEXT,
type TEXT,
quantity REAL,
price REAL
);
CREATE TABLE sqlite_sequence
(
name TEXT,
seq TEXT
);
CREATE TABLE user
(
id INTEGER PRIMARY KEY,
email TEXT,
password TEXT,
firstname TEXT,
lastname TEXT,
phone TEXT
);
|
<filename>sql/yjbb/600335.sql
EXEC [EST].[Proc_yjbb_Ins] @Code = N'600335',@CutoffDate = N'2017-09-30',@EPS = N'0.6379',@EPSDeduct = N'0',@Revenue = N'375.78亿',@RevenueYoy = N'-4.25',@RevenueQoq = N'-2.94',@Profit = N'6.57亿',@ProfitYoy = N'22.64',@ProfiltQoq = N'-54.83',@NAVPerUnit = N'7.2727',@ROE = N'9.05',@CashPerUn... |
<filename>sql/ttop2_1.sql
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 11, 2019 at 07:55 AM
-- Server version: 10.1.36-MariaDB
-- PHP Version: 7.0.32
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+... |
<reponame>todosantana/QuarterlyReportAPI<filename>api.sql
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 17 Jun 2021 pada 11.12
-- Versi server: 10.4.18-MariaDB
-- Versi PHP: 7.4.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zon... |
-- Procedure WebObjectHeader_Set
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[WebObjectHeader_Set]
(
@ObjectHeaderId int = -1,
@ObjectId int,
@RecordId int,
@TextResourceId int
)
AS
SET NOCOUNT ON
IF(@ObjectHeaderId < 1)
BEGIN
-- Insert
EXEC @ObjectHeaderId = WebObject... |
<filename>src/test/resources/sql/crown.sql<gh_stars>1-10
-- ----------------------------
-- Table structure for `sys_menu`
-- ----------------------------
DROP TABLE IF EXISTS sys_menu;
DROP SEQUENCE IF EXISTS sys_menu_seq;
CREATE SEQUENCE sys_menu_seq;
CREATE TABLE sys_menu (
id int NOT NULL DEFAULT NEXTVAL ('sys_... |
<gh_stars>1-10
SET default_tablespace = '';
SET default_table_access_method = heap;
CREATE TABLE public.account (
id integer NOT NULL
);
ALTER TABLE public.account OWNER TO postgres;
ALTER TABLE public.account ALTER COLUMN id ADD GENERATED ALWAYS AS IDENTITY (
SEQUENCE NAME public.account_id_seq
START ... |
CREATE TABLE editeurs (
raisonsociale TEXT NULL,
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
);
CREATE TABLE lien_auteur_livre (
id_auteur INTEGER NOT NULL,
id_livre INTEGER NOT NULL
);
CREATE TABLE livres (
gencod TEXT NULL,
titre TEXT NULL,
commentaire TEXT NULL,
couverture BLOB NULL... |
/* Formatted on 10/3/2014 3:50:35 PM (QP5 v5.126.903.23003) */
-- FUNCTION: APLAPPS.GET_PYMNT_MTHD_NAME(BIGINT)
-- DROP FUNCTION APLAPPS.GET_PYMNT_MTHD_NAME(BIGINT);
CREATE OR REPLACE FUNCTION APLAPPS.GET_PYMNT_MTHD_NAME (P_PYMNTMTHDID NUMBER)
RETURN VARCHAR2
AS
L_RESULT VARCHAR2 (200) := '';
BEGIN
SELECT ... |
INSERT INTO public.users (id, created_at, updated_at, display_name, avatar_url, username, location, bio, website, email, full_name, mnemonic, address, multisig, is_artist, is_admin, wallet_initialized, twitter, instagram, pubkey, info, confidential, blindkey) VALUES ('0d7cb9bb-df91-4625-a917-0a2267d9ad01', '2021-04-19 ... |
<gh_stars>10-100
-- file:collate.icu.utf8.sql ln:191 expect:true
SELECT a, lower(coalesce(x, 'foo')), lower(coalesce(y, 'foo')) FROM collate_test10
|
<gh_stars>1-10
IF EXISTS (select * from dbo.sysobjects where id = object_id(N'uspAddEntityToEntityProject') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE uspAddEntityToEntityProject
GO
/* uspAddEntityToEntityProject 506, 230745, 4, 506
*
*
*
*
*/
CREATE PROCEDURE [dbo].[uspAddEntityToEntityProject]... |
SET search_path = public, pg_catalog;
CREATE MATERIALIZED VIEW ofec_elections_list_mv AS
WITH incumbents AS (
--So we don't show duplicate elections
SELECT DISTINCT ON (
cand_id,
race_pk)
race_pk,
cand_id,
cand_name,
lst_updt_dt
FROM disclosure.cand_vali... |
<reponame>danadel/sakai
-- This is the Oracle Sakai 2.2.0 -> 2.2.1 conversion script
-- --------------------------------------------------------------------------------------------------------------------------------------
--
-- use this to convert a Sakai database from 2.2.0 to 2.2.1. Run this before you run your fir... |
<reponame>paulpierre/pp_chartvisual<filename>app_server/tl/uploads/USDJPY_H4.sql
DROP TABLE IF EXISTS `USDJPY_H4`;
CREATE TABLE IF NOT EXISTS `USDJPY_H4`(
`id` int(5) NOT NULL,
`bull` varchar(10) NOT NULL,
`bear` varchar(10) NOT NULL,
`buy` varchar(10) NOT NULL,
`sell` varchar(10) NOT NULL,
`av` varchar(10) NOT ... |
/*
https://leetcode.com/problems/department-highest-salary/description/
# Time: O(n^2)
# Space: O(n)
#
# The Employee table holds all employees. Every employee has an Id, a salary, and there is also a column for the department Id.
#
# +----+-------+--------+--------------+
# | Id | Name | Salary | DepartmentId |... |
<reponame>elvac-solutions-s-r-o/sql-benchmark
SELECT TOP (1000) * FROM [dbo].[Activity] |
<gh_stars>0
CREATE SCHEMA USECASE;
CREATE TABLE USECASE.T_ERROR (
ID BIGINT AUTO_INCREMENT NOT NULL PRIMARY KEY,
ERROR_CODE SMALLINT NOT NULL,
ERROR_MESSAGE VARCHAR(255),
MESSAGE VARCHAR(512),
STATUS CHAR(6)
);
|
--
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET default_tablespace = '';
SET default_with_oids = false;
---
--- drop tables
---
DROP ... |
<gh_stars>0
SET DEFINE OFF;
Insert into MDM_OWNER.REF_ENTITY_OBJECT_TYPE
(ID_PK, VERSION, CREATED_TS, UPDATED_TS, UPDATED_BY_USER, UPDATED_BY_TXN_ID, CONFIG_LANGUAGE_CODE_KEY, KEY, VALUE, DESCRIPTION)
Values
('1', 0, TO_TIMESTAMP('6/30/2017 1:20:38.312000 PM','fmMMfm/fmDDfm/YYYY fmHH12fm:MI:SS.FF AM'), TO_TIMEST... |
create table tab_create
(
id number(15) not null
);
create table tab_ins_col
(
id number(15) not null,
new_col number(15) default "66" not null
);
create table tab_del_col
(
id number(15) not null
);
create table tab_mod_cols
(
col_chg_size number(14) not null,
col_chg_precision numb... |
CREATE TABLE personas (
id VARCHAR(255) PRIMARY KEY,
nombre VARCHAR(255) NOT NULL,
apellido VARCHAR(255) NOT NULL,
edad INT NOT NULL
); |
with
users as (
select * from {{ ref('dim__user') }}
),
key_result_comment as (
select * from {{ ref('dim__key_result_comment') }}
),
final as (
select
users.id as user_id,
key_result_comment.id as key_result_comment_id,
key_result_comment.created_at as created_at
from ke... |
-- insertSelective database if not exists
CREATE DATABASE IF NOT EXISTS `eggroll_meta`;
USE `eggroll_meta`;
-- insertSelective table for fdn_meta
-- table
CREATE TABLE IF NOT EXISTS `eggroll_meta`.`dtable` (
`table_id` SERIAL PRIMARY KEY,
`namespace` VARCHAR(2000) NOT NULL DEFAULT 'DEFAULT',
`table_name` VARCHA... |
-- =============================================
-- Create basic stored procedure template
-- =============================================
-- Drop stored procedure if it already exists
IF EXISTS (
SELECT *
FROM INFORMATION_SCHEMA.ROUTINES
WHERE SPECIFIC_SCHEMA = N'dbo'
AND SPECIFIC_NAME = N'spInsertOr... |
CREATE TABLE `experiment_rollup` (
`experiment_id` varbinary(16) NOT NULL,
`day` date NOT NULL,
`cumulative` boolean NOT NULL,
`bucket_label` varchar(64) NOT NULL,
`action` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`impression_count` integer DEFAULT NULL,
`impression_user_count` integer DEFAULT NU... |
<filename>migrations/migrations/default/1619663698233_alter_table_railroad_systems_railroads_add_column_description/down.sql
-- Could not auto-generate a down migration.
-- Please write an appropriate down migration for the SQL below:
-- alter table "railroad_systems"."railroads" add column "description" text
null;
|
<filename>java/yb-cdc/src/test/resources/ddl_test_scripts/cdc_ddl_truncate.sql
--drop table if exists test;
--create table test (a int primary key, b int);
insert into test values (1, 2);
begin;
insert into test values (5, 6);
commit;
insert into test values (7, 8);
begin;
insert into test values (0, 1);
end;
trun... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Feb 28, 2021 at 10:22 PM
-- Server version: 10.3.22-MariaDB
-- PHP Version: 7.2.29
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET... |
<reponame>osgvsun/lubanlou<filename>lubanlou-master/lubanlou-provider/lubanlou-provider-attendance/src/main/resources/db/migration/V20210813_1.0__add_table.sql
-- attendance_status新增表-学生考勤状态表
-- 作者:陈佳利
-- 日期:2021-08-13
CREATE TABLE `attendance_status` (
`id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NO... |
-- name: new_genre
-- Creates new genre
-- # Parameters
-- param: id: i32 - new genre ID
-- param: name: &str - genre name
INSERT INTO genre (genre_id, name) VALUES (:id, :name);
-- name: delete_genre
-- Deletes genre
-- # Parameters
-- param: id: i32 - genre ID
DELETE FROM genre WHERE genre_id = :id;
|
<filename>Demos/Mod06_Demos/02 - Multi-Valued Subquery.sql
--List products that have an order quantity greater than 20
SELECT Name
FROM SalesLT.Product
WHERE ProductID IN
(SELECT ProductID from SalesLT.SalesOrderDetail
WHERE OrderQty>20)
SELECT Name
FROM SalesLT.Product P
JOIN SalesLT.SalesOrderDetail SOD
ON P.Prod... |
/*
Warnings:
- Added the required column `maximumVehicles` to the `Property` table without a default value. This is not possible if the table is not empty.
*/
-- AlterTable
ALTER TABLE "Property" ADD COLUMN "maximumVehicles" INTEGER NOT NULL;
-- CreateTable
CREATE TABLE "ActiveRental" (
"id" SERIAL NOT N... |
SET SERVEROUT ON
SET VERIFY OFF
SPO DDL_DYNAMIC_AUDIT_OBJ.log
PRO INITIANTING CREATION OF TABLES, INDEXES, TRIGGER AND PACKAGE
PRO
DEF OWNER = '&1'
DEF TS_DAT = '&2'
DEF TS_IDX = '&3'
PRO CREATE TABLE > MONIT_DML_LOG
PRO
CREATE TABLE "&&OWNER"."MONIT_DML_LOG"
(
TIMESTAMP DATE
, SESSIONID NUMBER(24)
, USER... |
-- phpMyAdmin SQL Dump
-- version 4.1.12
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: May 26, 2021 at 05:05 AM
-- Server version: 5.6.16
-- PHP Version: 5.5.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... |
<reponame>ajah/country-list
CREATE TABLE country (id NVARCHAR(2) NOT NULL, name NVARCHAR(64) NOT NULL, PRIMARY KEY (id));
INSERT INTO [country] ([id], [name]) VALUES ('AZ', 'Acerbaixán');
INSERT INTO [country] ([id], [name]) VALUES ('AF', 'Afganistán');
INSERT INTO [country] ([id], [name]) VALUES ('AL', 'Albania');
IN... |
-----------------Update Sewerage Change In Closets Role action Mapping--------------------
INSERT INTO EG_ACTION (id,name,url,queryparams,parentmodule,ordernumber,displayname,enabled,contextroot,version,createdby,createddate,lastmodifiedby,lastmodifieddate,application) VALUES (nextval('SEQ_EG_ACTION'),'UpdateSewerageC... |
/*
Fantastic tool from <NAME>
http://michaeljswart.com/2018/10/uncovering-hidden-complexity/
*/
DECLARE @object_name SYSNAME = 'Sales.SalesOrderDetail';
WITH dependencies AS
(
SELECT @object_name AS [object_name],
CAST(
QUOTENAME(OBJECT_SCHEMA_NAME(OBJECT_ID(@object_name))) + '.' +
... |
/* DPI Exposure of POAP holders calculated based on DEX data
/* https://dune.xyz/queries/209954/401812 */
with
-- Provide symbol of focal token (the token for which address exposure is needed) as input
token as (
select
*
from erc20.tokens
where symbol = 'DPI'
)
-- Pull all uniswap v2 poo... |
INSERT INTO department (id,name) VALUES
(1,'Sales'),
(2,'Engineering'),
(3,'Finance'),
(4,'Legal');
INSERT INTO role(id,title, salary, department_id) VALUES
(1,'Sales Lead', 100000, 1),
(2,'Salesperson', 80000, 1),
(3,'Lead Engineer', 150000, 2),
(4,'Software Engineer', 120000, 2),
... |
-- 2018-11-27T16:43:58.165
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DDL_NoForeignKey,Description,EntityType,FieldLength,Help,IsActive,IsAdvancedText,IsAllowLogging,I... |
<gh_stars>0
CREATE TABLE `typecho_gallery` (
`gid` INTEGER NOT NULL PRIMARY KEY,
`thumb` varchar(200) default NULL,
`image` varchar(200) default NULL,
`sort` int(10) default '0',
`name` varchar(200) default NULL,
`description` varchar(200) default NULL,
`order` int(10) default '0'
);
|
<filename>coeus-db/coeus-db-sql/src/main/resources/org/kuali/coeus/coeus-sql/log/Release_3_1_sp_4_logs/KRACOEUS-4804-KC.sql
delete from appointment_type where appointment_type_code='7';
commit;
|
<reponame>Falumpaset/handson-ml2
create type landlord.propertystatus as enum ('IMPORTED', 'RESERVED');
alter table landlord.property
add column status landlord.propertystatus; |
<gh_stars>0
-- MySQL dump 10.13
--
-- Host: localhost Database: computer_store
-- ------------------------------------------------------
-- Server version 5.1.22-rc-community
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
... |
<reponame>navygit/ncRNA_Pipeline
-- Copyright [1999-2014] EMBL-European Bioinformatics Institute
-- and Wellcome Trust Sanger 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
--... |
<reponame>sap-contributions/flowable-engine
update ACT_GE_PROPERTY set VALUE_ = '6.7.2.0' where NAME_ = 'eventsubscription.schema.version';
|
SELECT
fee,
COUNT(1) jobs_count,
SUM(works_count) works_count
FROM snark_jobs
WHERE prover = $1
GROUP BY fee
ORDER BY jobs_count DESC
|
<gh_stars>10-100
-- Average time between diagnosis and treatment
select e.cancer_type, e.is_metastatic,
avg(e.time_diagnosis_treatment_days) as avg_time_diagnosis_treatment_days
from
(select
c.concept_name as cancer_type,
case coalesce(reverse(substring(reverse(m.value_source_value) from 1
for position('@' in re... |
select name, id, type, region, resource_group, subscription_id, tags, sql_administrator_login
from azure.azure_synapse_workspace
where name = '{{ resourceName }}' and resource_group = '{{ resourceName }}';
|
-- @Description Ensures that pinCount is released on SessionState after QE cleaned up by idle gang
-- @author Zhongxian
-- session1: issue the testing query
1: set gp_vmem_idle_resource_timeout=20000;
1&: select count(*), pg_sleep(5) from rp a where a.c1 > (select sum(c1) from rp b where b.c2 < a.c1);
-- session2: qu... |
INSERT OR ABORT INTO ThresholdTable ( BlockID, Threshold) SELECT threshold.EventID,threshold.DetectionThreshold FROM systemDB.threshold;
|
<gh_stars>1-10
--
-- Created by SQL::Translator::Producer::MySQL
-- Created on Wed Jun 26 15:47:27 2019
--
;
SET foreign_key_checks=0;
--
-- Table: `custom_params`
--
CREATE TABLE `custom_params` (
`type` text NOT NULL,
`schema` jsonb NOT NULL,
PRIMARY KEY (`type`)
);
SET foreign_key_checks=1;
|
--
-- Windshaft test database
--
-- To use:
--
-- > dropdb windshaft_test
-- > createdb -EUTF8 windshaft_test
-- > psql -c 'create extension postgis' windshaft_test
-- > psql windshaft_test < windshaft.test.sql
--
--
--SET statement_timeout = 0;
--SET client_encoding = 'UTF8';
--SET standard_conforming_strings = off... |
/*
* Version
*/
UPDATE cuyahoga_version SET major = 1, minor = 5, patch = 1 WHERE assembly = 'Cuyahoga.Modules.RemoteContent'; |
CREATE OR REPLACE FUNCTION rebuild_ancestor_valid_tc_appdx_year_designation_mview_for_node(designation_name VARCHAR, node_id INT) RETURNS VOID
LANGUAGE plpgsql STRICT
AS $$
DECLARE
children_node_ids INTEGER[];
tmp_node_id INT;
mview_name VARCHAR;
appendix VARCHAR;
sql TEXT;
BEG... |
create database dbProdutos CHARACTER SET utf8 COLLATE utf8_general_ci;
use dbProdutos;
create table tbProdutos(
codPro int not null auto_increment,
nomePro varchar(100),
descricao varchar(100),
categoria varchar(15),
preco decimal(15,2),
primary key(codPro))ENGINE=InnoDB DEFAULT CHARSET=utf8 DEFAULT COLLATE utf8_unic... |
<reponame>lrewater/up-poc<filename>packages/backend/core/models/schema/app.contacts.sql
create table app.contacts
(
id uuid default uuid_generate_v4() not null
constraint contacts_pkey
primary key,
parent_id uuid,
former_parent_id uuid,
status_id integer default 1
constraint ... |
-- assert
CREATE OR REPLACE FUNCTION assert(bool BOOLEAN, OUT _ BOOLEAN) AS $$ BEGIN
IF NOT bool THEN RAISE 'assert failed' USING ERRCODE = 'AFAIL'; END IF;
END $$ LANGUAGE plpgsql;
-- assert with failure message
CREATE OR REPLACE FUNCTION assert(bool BOOLEAN, message TEXT, OUT _ BOOLEAN) AS $$ BEGIN
IF NOT bo... |
<filename>test/_settings.sql
.headers off
.mode json
.timer off
.echo on
|
CREATE TABLE IF NOT EXISTS `revenue`(
`id` BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
`idLocation` INTEGER,
`date` DATE,
`sum` DECIMAL,
CONSTRAINT FK_REVENUE_LOCATION FOREIGN KEY (`idLocation`) references `location`(`id`)
); |
<filename>scriptSQL.sql
DROP DATABASE IF EXISTS raspagem_despesas;
CREATE DATABASE raspagem_despesas;
USE raspagem_despesas;
CREATE TABLE IF NOT EXISTS info(
id INT AUTO_INCREMENT NOT NULL PRIMARY KEY,
mes_ano VARCHAR(7),
orgao_superior VARCHAR(100),
entidade_vinculada VARCHAR(100),
valor_empenhado FLOAT,
valor_liquida... |
/*************************************************************************************************
* Author: <NAME>
*
* Description: This script is created to teach students Structure Query Language for Data Management.
*
* Notes: Lecture 8: INSERT, UPDATE & DELETE data to Tables
***************************************... |
CREATE USER SCOTT IDENTIFIED BY tiger
DEFAULT TABLESPACE "USERS"
TEMPORARY TABLESPACE "TEMP";
-- ROLES
GRANT "SELECT_CATALOG_ROLE" TO SCOTT ;
GRANT "CONNECT", "RESOURCE" TO SCOTT ;
-- SYSTEM PRIVILEGES
GRANT SELECT ANY DICTIONARY TO SCOTT;
CREATE TABLE SCOTT.CATEGORIES
(
ID NUMBER(9),
NAME NVARCHA... |
<reponame>DaveBathnes/Plymouth-3D
------------------------------------------------------
-- table: oas. indexes
------------------------------------------------------
-- index: cuix_oas_objectid
-- drop index cuix_oas_objectid;
create unique index cuix_oas_objectid on oas using btree (objectid);
alter table oas cluste... |
SELECT
c.CurrencyCode AS [CurrencyCode],
c.Description AS [Currency],
count(c2.CountryName) AS [NumberOfCountries]
FROM Currencies AS c
LEFT JOIN Countries c2
ON c.CurrencyCode = c2.CurrencyCode
GROUP BY c.CurrencyCode, c.Description
ORDER BY NumberOfCountries DESC, Currency ASC |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: May 16, 2018 at 11:20 AM
-- Server version: 10.1.13-MariaDB
-- PHP Version: 7.0.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... |
<reponame>carloso0114/sql-zoo
-- List each country name where the population is larger than that of 'Russia'.
SELECT name FROM world
WHERE population >
(SELECT population FROM world
WHERE name='Russia')
-- Show the countries in Europe with a per capita GDP greater than 'United Kingdom'.
SELECT name FROM w... |
<reponame>ndq809/EPLUS
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[SPC_PROFILE_LST1]') AND type IN (N'P', N'PC'))
/****** Object: StoredProcedure [dbo].[SPC_M001L_FND1] Script Date: 2017/11/23 16:46:46 ******/
DROP PROCEDURE [dbo].[SPC_PROFILE_LST1]
GO
/****** Object: StoredPro... |
CREATE TABLE subdivision_IN (id VARCHAR(6) NOT NULL, name VARCHAR(255), level VARCHAR(64) NOT NULL, PRIMARY KEY(id));
INSERT INTO "subdivision_IN" ("id", "name", "level") VALUES (E'IN-GA', E'Goa', E'state');
|
CREATE TABLE "HDC_BOARD_DECISIONS"
( "DECISION_SEQ" NUMBER(6,0) NOT NULL,
"HDC_REQUEST_REFERRAL_ID" NUMBER(10,0) NOT NULL,
"COMMENT_TEXT" VARCHAR2(4000 CHAR) NOT NULL,
"BOARD_ATTENDEES" VARCHAR2(240 CHAR) NOT NULL,
"CHAIR_STAFF_ID" NUMBER(10,0) NOT NULL,
"BOARD_RECOMMENDATION" VARCHAR2(12 C... |
ALTER TABLE AccessionRejectionCriteria ADD INDEX (acc_rejection_uid);
ALTER TABLE Accessions ADD INDEX (accession_uid);
ALTER TABLE Accessions_GroupVersions ADD INDEX (accession_uid), ADD INDEX (group_version_uid);
ALTER TABLE BuildQualityTests ADD INDEX (build_uid), ADD INDEX (qa_analysis_id);
ALTER TABLE Builds ADD I... |
<gh_stars>10-100
alter table application_form
add column prefix varchar(255) not null default 'default';
--;;
alter table application_form
alter column prefix drop default;
|
<reponame>ekzemplaro/data_base_language
connect to cities user scott using tiger;
drop table cities;
create table cities (id varchar(10) not null primary key, name varchar(32), population int, date_mod date);
|
<reponame>whtahy/leetcode
# Write your MySQL query statement below
select
a.firstname,
a.lastname,
b.city,
b.state
from person a
left join address b
on a.personid = b.personid
|
<reponame>platonai/pulsar<gh_stars>100-1000
# noinspection SqlNoDataSourceInspectionForFile
-- asin
CREATE TABLE `asin` (
`id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '自增ID',
`category` varchar(255) DEFAULT NULL COMMENT '所属分类nodeID', -- 从 Breadcrumbs links 中找
`col1` varchar(255) DEFAULT NULL COMMENT '预... |
/*
Navicat MySQL Data Transfer
Source Server : test
Source Server Version : 50553
Source Host : localhost:3306
Source Database : xm
Target Server Type : MYSQL
Target Server Version : 50553
File Encoding : 65001
Date: 2018-12-07 14:07:24
*/
SET FOREIGN_KEY_CHECKS=0;
-- -----------... |
DROP TRIGGER TG_TRX_TEST_AUTO_GEN_KEY
/
DROP SEQUENCE UPDATE_GENERATED_KEYS_SEQ1
/
DROP TABLE TRX_TEST_AUTO_GEN_KEY
/
DROP TABLE TRX_TEST
/
|
<gh_stars>0
CREATE TABLE `go_xref` (
`object_xref_id` int(10) unsigned NOT NULL default '0',
`linkage_type` enum('IC','IDA','IEA','IEP','IGI','IMP','IPI','ISS','NAS','ND','TAS','NR','RCA') NOT NULL,
`source_xref_id` int(10) unsigned default NULL,
UNIQUE KEY `object_xref_id_2` (`object_xref_id`,`source_xref_id`,... |
SELECT
L_RETURNFLAG,
L_LINESTATUS,
SUM(L_QUANTITY) AS SUM_QTY,
SUM(L_EXTENDEDPRICE) AS SUM_BASE_PRICE,
SUM(L_EXTENDEDPRICE * (1 - L_DISCOUNT)) AS SUM_DISC_PRICE,
SUM(L_EXTENDEDPRICE * (1 - L_DISCOUNT) * (1 + L_TAX)) AS SUM_CHARGE,
AVG(L_QUANTITY) AS AVG_QTY,
AVG(L_EXTENDEDPRICE) AS AVG_PRICE,
AVG(L_DISCOUNT) A... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.