text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
-- Upgrade SQL
-- Move old operators to pgroonga schema
DO LANGUAGE plpgsql $$
BEGIN
IF current_schema() = 'public' THEN
ALTER OPERATOR public.%% (text, text) SET SCHEMA pgroonga;
ALTER OPERATOR public.%% (text[], text) SET SCHEMA pgroonga;
ALTER OPERATOR public.%% (varchar, varchar) SET SCHEMA pgroonga;
ALTE... | the_stack |
--
-- Copyright 2009 Inspire-Software.com
--
-- 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 require... | the_stack |
set echo on
spool sqlOperations.log APPEND
--
def METADATA_OWNER = &1
--
def XFILES_SCHEMA = &2
--
create or replace package IMAGE_PROCESSOR
as
procedure HANDLE_EVENT(P_PAYLOAD XMLType);
procedure insertImageMetadata(P_TARGET_RESOURCE VARCHAR2);
procedure updateImageMetadata(P_TARGET_RESOURCE VARCHAR2, P_M... | the_stack |
SET NOCOUNT ON
-- ==================================================================
-- Set this variable to be some unique application name.
--
-- NOTE: This name MUST match resolved application name in
-- Membership provider on the WCF host project
-- ==========================================================... | the_stack |
--------------------------------------------------------------
-- delete pg_amop
--------------------------------------------------------------
CREATE OR REPLACE FUNCTION Delete_pg_amop_temp()
RETURNS void
AS $$
DECLARE
row_name record;
query_str text;
query_str_nodes text;
BEGIN
query_str_nodes := 'select * from dbe... | the_stack |
-- 2019-03-21T14:20:15.016
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Process (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Process_ID,AllowProcessReRun,Classname,CopyFromProcess,Created,CreatedBy,EntityType,IsActive,IsApplySecuritySettings,IsBetaFunctionality,IsDirectPrint,IsOneInstanceO... | the_stack |
--1.function
--a
create table hash_partition_truncate_table
(
c1 int ,
c2 int
)
partition by hash (c1)
(
partition p1,
partition p2
);
insert into hash_partition_truncate_table values(1),(2),(3),(4);
select count(*) from hash_partition_truncate_table;
--4 rows
alter table hash_partition_truncate_table truncate part... | the_stack |
-- 2020-02-13T10:29:48.161Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
DELETE FROM AD_Table_Process WHERE AD_Table_Process_ID=540788
;
-- 2020-02-13T10:30:25.084Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,Column... | the_stack |
-- MySQL dump 10.13 Distrib 8.0.27, for Linux (x86_64)
--
-- Host: 127.0.0.1 Database: crusher
-- ------------------------------------------------------
-- Server version 8.0.27-0ubuntu0.20.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SE... | the_stack |
--
-- UNION (also INTERSECT, EXCEPT)
--
-- Simple UNION constructs
SELECT 1 AS two UNION SELECT 2 ORDER BY 1;
SELECT 1 AS one UNION SELECT 1 ORDER BY 1;
SELECT 1 AS two UNION ALL SELECT 2;
SELECT 1 AS two UNION ALL SELECT 1;
SELECT 1 AS three UNION SELECT 2 UNION SELECT 3 ORDER BY 1;
SELECT 1 AS two UNION SELECT... | the_stack |
set define off verify off feedback off
whenever sqlerror exit sql.sqlcode rollback
--------------------------------------------------------------------------------
--
-- ORACLE Application Express (APEX) export file
--
-- You should run the script connected to SQL*Plus as the Oracle user
-- APEX_050000 or as the owner ... | the_stack |
CREATE EXTENSION pg_trgm;
CREATE EXTENSION IF NOT EXISTS pg_stat_statements WITH SCHEMA public;
COMMENT ON EXTENSION pg_stat_statements IS 'track execution statistics of all SQL statements executed';
\i sql/enforce-utc.sql
\i sql/utils.sql
\i sql/update_counts.sql
\i sql/currencies.sql
-- database metadata
CREAT... | the_stack |
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION pipelinedb" to load this file. \quit
CREATE SCHEMA pipelinedb;
CREATE TABLE pipelinedb._exec_lock ();
CREATE FUNCTION stream_fdw_handler()
RETURNS fdw_handler
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
CREATE FOREIGN... | the_stack |
--
-- 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;
--
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -
--
CREATE EXTENSION IF NOT EXISTS plpg... | the_stack |
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `Category`
-- ----------------------------
DROP TABLE IF EXISTS `Category`;
CREATE TABLE `Category` (
`Id` bigint(20) NOT NULL AUTO_INCREMENT,
`Name` varchar(64) NOT NULL,
`ParentId` bigint(20) DEFAULT NULL,
`CreateAt` datetime D... | the_stack |
-- 2020-01-03T08:32:31.374Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsSelectionColumn='Y', SelectionColumnSeqNo=20,Updated=TO_TIMESTAMP('2020-01-03 09:32:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=548306
;
-- 2020-01-03T08:32:31.381Z
-- I forgot to set ... | the_stack |
-- 2017-07-21T14:44:48.725
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,Help,IsActive,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName,Updated,UpdatedBy) VALUES (0,543385,0,'Sa... | the_stack |
-- apshop平台数据结构
-- inmyjs 20190101
-- 版本 V1.0.171101
-- ---------------------------------------------------------------
-- 文档需要对齐, Tab键设置为4个空格
-- 表的备注: 如: --序号表: Sequence
-- 字段名注释规范: 单行注释标志COMMENT+字段中文抬头+半角左括号+标志及详细说明+半角右括号。
-- 举例字段的备注: COMMENT '字典状态(*, 0=正常, S=失效)'。
-- 表命名规则: 以大小写英文来进行命名, 太长的英文可采用尽可能的规范缩写。
--... | the_stack |
CREATE TABLE [dbo].[COMBlockList](
[COMBlockListID] [int] IDENTITY(1,1) NOT NULL,
[COMBlockListReasonID] [int] NOT NULL,
[COREClientID] [int] NOT NULL,
[Source] [nvarchar](250) NOT NULL,
[SourceBy] [int] NULL,
[Date] [dateti... | the_stack |
-- Postgres SQL Statements from postgressql-8.4.1-US.pdf
--
-- Extracted 10/5/2009
-- ABORT [ WORK | TRANSACTION ]
ABORT;
ABORT WORK;
ABORT TRANSACTION;
-- ALTER AGGREGATE name ( type [ , ... ] ) RENAME TO new_name
-- ALTER AGGREGATE name ( type [ , ... ] ) OWNER TO new_owner
-- ALTER AGGREGATE name ( type [ , .... | the_stack |
-- 2018-08-08T11:30:01.702
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsTranslated='Y',Updated=TO_TIMESTAMP('2018-08-08 11:30:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=560725
;
-- 2018-08-08T12:05:49.326
-- I forgot to set the DICTIONARY_ID_COMMENTS Sys... | the_stack |
CREATE TABLE SCHEMA_TRACING.tag_key
(
id BIGINT NOT NULL GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
tag_type SCHEMA_TRACING_PUBLIC.tag_type NOT NULL,
key SCHEMA_TRACING_PUBLIC.tag_k NOT NULL
);
CREATE UNIQUE INDEX ON SCHEMA_TRACING.tag_key (key) INCLUDE (id, tag_type);
GRANT SELECT ON TABLE SCHEMA_TRACING.ta... | the_stack |
-- /***************************************************************************/
-- /* (c) Copyright IBM Corp. 2007 All rights reserved.
-- /*
-- /* The following sample of source code ("Sample") is owned by International
-- /* Business Machines Corporation or one of its subsidiaries ("IBM") and is
-- /* copyri... | the_stack |
-----------------------------------------------------------------------------
-- (c) Copyright IBM Corp. 2007 All rights reserved.
--
-- The following sample of source code ("Sample") is owned by International
-- Business Machines Corporation or one of its subsidiaries ("IBM") and is
-- copyrighted and licensed, not... | the_stack |
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.5.19
-- Dumped by pg_dump version 9.5.19
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'SQL_ASCII';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = fal... | the_stack |
--created by mpimentel, MIT book chapter project
-- Last Updated: June 2015
--drop materialized view cohort_book_chapter_labs;
--create materialized view cohort_book_chapter_labs as
with cohort as (
select *
from cohort_book_chapter
)
--select count(*) from cohort;
-- Datatype:
-- 1 - sodium, 2 - potassium, 3 -... | the_stack |
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for tb_app
-- ----------------------------
DROP TABLE IF EXISTS `tb_app`;
CREATE TABLE `tb_app` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`app_id` varchar(32) NOT NULL COMMENT '应用编号',
`api_key` varchar(32) NOT NULL... | the_stack |
alter table ACT_RE_PROCDEF add column ENGINE_VERSION_ varchar(255);
update ACT_RE_PROCDEF set ENGINE_VERSION_ = 'v5';
alter table ACT_RE_DEPLOYMENT add column ENGINE_VERSION_ varchar(255);
update ACT_RE_DEPLOYMENT set ENGINE_VERSION_ = 'v5';
alter table ACT_RU_EXECUTION add column ROOT_PROC_INST_ID_ varchar(64);
crea... | the_stack |
DROP TABLE IF EXISTS part;
DROP TABLE IF EXISTS supplier;
DROP TABLE IF EXISTS partsupp;
DROP TABLE IF EXISTS customer;
DROP TABLE IF EXISTS orders;
DROP TABLE IF EXISTS lineitem;
DROP TABLE IF EXISTS nation;
DROP TABLE IF EXISTS region;
CREATE TABLE part
(
p_partkey Int32, -- PK
p_name String,... | the_stack |
EXEC tSQLt.NewTestClass 'BasicTests';
-- Create a separate class for each of the CISL functionalities
EXEC tSQLt.NewTestClass 'Alignment';
EXEC tSQLt.NewTestClass 'Dictionaries';
EXEC tSQLt.NewTestClass 'Memory';
EXEC tSQLt.NewTestClass 'Fragmentation';
EXEC tSQLt.NewTestClass 'RowGroups';
EXEC tSQLt.NewTestClass... | the_stack |
-- 2021-05-26T14:41:12.502Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Ref_List_Trl SET Name='EXW - Ex Works',Updated=TO_TIMESTAMP('2021-05-26 17:41:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Language='en_US' AND AD_Ref_List_ID=501600
;
-- 2021-05-26T14:41:32.603Z
-- I forgot ... | the_stack |
CREATE SCHEMA databasetest;
CREATE TABLE databasetest.crossdatanumbers (col_1 smallint, col_2 integer, col_3 bigint, col_4 decimal, col_5 numeric, col_6 real, col_7 double precision, col_8 smallserial, col_9 serial, col_10 bigserial);
INSERT INTO databasetest.crossdatanumbers(col_1 , col_2 , col_3 , col_4 , col_5 , col... | the_stack |
--
\set VERBOSITY terse
--
-- 1. Input of datetime values from table form.
set timezone = 'GMT';
set datestyle = 'ISO,YMD';
do language pllua $$
print(pgtype.timestamptz{ year=2019, month=4, day=22, hour=12, min=23, sec=34.1 });
print(pgtype.timestamptz{ year=2419, month=4, day=22, hour=12, min=23, sec=34.1 })... | the_stack |
-- phpMyAdmin SQL Dump
-- version 3.4.10.1deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Sep 02, 2015 at 03:06 PM
-- Server version: 5.5.43
-- PHP Version: 5.3.10-1ubuntu3.18
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTE... | the_stack |
-- row based filtering
SELECT * FROM pglogical_regress_variables()
\gset
\c :provider_dsn
SELECT pglogical.replicate_ddl_command($$
CREATE TABLE public.basic_dml (
id serial primary key,
other integer,
data text,
"SomeThing" interval,
insert_xid bigint DEFAULT txid_current()
);
$$);
-- used to check if in... | the_stack |
--
-- CREATE_VIEW
-- Virtual class definitions
-- (this also tests the query rewrite system)
--
CREATE VIEW street AS
SELECT
r.name,
r.thepath,
c.cname AS cname
FROM
ONLY road r,
real_city c
WHERE
c.outline ## r.thepath;
CREATE VIEW iexit AS
SELECT
ih.name,
ih.thepath,
interpt_pp (i... | the_stack |
-- 平台初始化数据脚本
-- Inmyjs 20180917
-- 版本 V1.0.180917
/*===============================================================*/
-- ------------------------------------------------------------
-- 初始化管理员信息
-- ------------------------------------------------------------
INSERT INTO `user` VALUES (
10000000,'admin','Ad... | the_stack |
SET NAMES utf8mb4;
SET
FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for c_datasource_config
-- ----------------------------
DROP TABLE IF EXISTS `c_datasource_config`;
CREATE TABLE `c_datasource_config`
(
`id` bigint(20) NOT NULL COMMENT '主键ID',
`name` ... | the_stack |
IF OBJECT_ID('dbo.sp_helpExpandView', 'P') IS NULL
EXECUTE ('CREATE PROCEDURE dbo.sp_helpExpandView AS SELECT 1');
GO
ALTER PROCEDURE dbo.sp_helpExpandView (
@ViewName NVARCHAR(512),
@OutputFormat VARCHAR(15) = 'All',
@ShowObjectCount BIT = 0,
@Debug BIT = 0
)
AS
/*====================================... | the_stack |
-- 2017-07-26T08:46:57.550
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,544459,0,TO_TIMESTAMP('2017-07-26 08:46:57','YYYY-MM-DD HH24:MI:SS'),100,'de.... | the_stack |
-- Generated by CompileSchemaScripts.pl from:
-- 20170327-mbs-9271-standalone.sql
-- 20170401-mbs-8393-entity-attributes-fks.sql
-- 20170329-mbs-5452-fks.sql
-- 20170503-mbs-9329-event-meta-standalone.sql
\set ON_ERROR_STOP 1
BEGIN;
SET search_path = musicbrainz, public;
SET LOCAL statement_timeout = 0;
---------------... | the_stack |
-------------------------------------------------------------------------------
-- (c) Copyright IBM Corp. 2007 All rights reserved.
--
-- The following sample of source code ("Sample") is owned by International
-- Business Machines Corporation or one of its subsidiaries ("IBM") and is
-- copyrighted and licensed, not ... | the_stack |
/*
... | the_stack |
-- SET LATEST UPDATE
DO
$_$
BEGIN
PERFORM VOCABULARY_PACK.SetLatestUpdate(
pVocabularyName => 'AMT',
pVocabularyDate => (SELECT vocabulary_date FROM sources.amt_sct2_concept_full_au LIMIT 1),
pVocabularyVersion => (SELECT vocabulary_ver... | the_stack |
set query_dop = 1;
create schema nodegroup_misc;
set current_schema = nodegroup_misc;
set expected_computing_nodegroup='group1';
-- create node group
create node group ng1 with(datanode1, datanode11, datanode2, datanode12);
create node group ng2 with(datanode4, datanode8, datanode5, datanode10);
create node group ng3... | the_stack |
-- 2017-09-21T13:53:03.556
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_UI_Element SET AD_UI_ElementGroup_ID=540767, SeqNo=70,Updated=TO_TIMESTAMP('2017-09-21 13:53:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546138
;
-- 2017-09-21T13:53:12.461
-- I forgot to set th... | the_stack |
-- 2017-10-12T21:06:04.233
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Field SET Name='Bestellmenge (TU)',Updated=TO_TIMESTAMP('2017-10-12 21:06:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556859
;
-- 2017-10-12T21:06:11.857
-- I forgot to set the DICTIONARY_ID_COMMENTS... | the_stack |
-- 2019-08-29T10:44:04.510Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET MandatoryLogic='@Action/''XX''@="SU"',Updated=TO_TIMESTAMP('2019-08-29 12:44:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=540392
;
-- 2019-08-29T10:44:17.024Z
-- I forgot to set the DICTI... | the_stack |
-- #SPDX-License-Identifier: MIT
/***
Database update script. For release 8.
***/
-------------------------------------------------
-- Database history table. If the tables does not exist, then create it and populate it and run all this stuff.
-- This works for everything we already have deployed. After that, we... | the_stack |
-- 2021-01-28T13:49:56.991Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Process_Trl SET Name='Select HUs to return',Updated=TO_TIMESTAMP('2021-01-28 15:49:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Language='en_US' AND AD_Process_ID=584771
;
-- 2021-01-28T13:49:58.886Z
-- I for... | the_stack |
-- 4023 Distribution of greater than 0 US$ cost per subject by period_id, by drug_concept_id, by drug_type_concept_id, by cost_concept_id, by cost_type_concept_id, by cost_type_concept_id during the cohort period
{@rollupUtilizationDrug} ? {
with drug_records(cohort_definition_id, subject_id, drug_concept_id, drug_type... | the_stack |
-- 06.07.2016 18:15
-- 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,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMan... | the_stack |
-- Jira Ticket Number(s): DEV-5343
--
-- This script clones File B and C records and applies DEF codes to them.
--
-- Expected CLI:
--
-- None. Execution is controlled by a supporting Python script.
--
-- Purpose:
--
-- This script generates or participates in the generation of sample CARES Act data for te... | the_stack |
set enable_global_stats = true;
----
--- Create Talbe
----
create schema vector_window_engine;
set current_schema=vector_window_engine;
create table vector_window_engine.VECTOR_WINDOW_TABLE_01(
depname varchar
,empno bigint
,salary int
,enroll date
,timeset timetz
)with(orientation = orc) tablespace... | the_stack |
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for member
-- ----------------------------
DROP TABLE IF EXISTS `member`;
CREATE TABLE `member` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
`member_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_gene... | the_stack |
-- ----------------------------
-- Table structure for Base_AppSecret
-- ----------------------------
CREATE TABLE [Base_AppSecret] (
[Id] varchar(50) NOT NULL ,
[AppId] varchar(50) NULL ,
[AppSecret] varchar(50) NULL ,
[AppName] varchar(255) NULL
)
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Descriptio... | the_stack |
-- 2018-04-21T10:51:18.988
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Field SET Name='Pharma Produkt Kategorie',Updated=TO_TIMESTAMP('2018-04-21 10:51:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=563107
;
-- 2018-04-21T10:52:38.975
-- I forgot to set the DICTIONARY_ID_C... | the_stack |
-- // BUG-108475
-- Migration SQL that makes the change goes here.
-- cluster resource
ALTER TABLE cluster
ADD organization_id int8,
ADD CONSTRAINT clustername_in_org_unique UNIQUE (name, organization_id),
ADD CONSTRAINT fk_cluster_organization FOREIGN KEY (organization_id) REFERENCES organization(id);
UP... | the_stack |
-- 2018-11-06 --
ALTER TABLE `cms_category`
MODIFY COLUMN `path` varchar(1000) DEFAULT NULL COMMENT '首页路径' AFTER `template_path`,
MODIFY COLUMN `url` varchar(1000) DEFAULT NULL COMMENT '首页地址' AFTER `has_static`,
MODIFY COLUMN `content_path` varchar(1000) DEFAULT NULL COMMENT '内容路径' AFTER `url`;
ALTER T... | the_stack |
-- 02.02.2016 18:08
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Process (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Process_ID,Classname,CopyFromProcess,Created,CreatedBy,Description,EntityType,IsActive,IsBetaFunctionality,IsDirectPrint,IsOneInstanceOnly,IsReport,IsServerProcess,JasperRe... | the_stack |
drop table if exists grest.pool_history_cache;
CREATE TABLE grest.pool_history_cache (
pool_id varchar,
epoch_no int8 NULL,
active_stake lovelace NULL,
active_stake_pct numeric NULL,
saturation_pct numeric NULL,
block_cnt int8 NULL,
delegator_cnt int8 NULL,
pool_fee_variable float8 NULL,
pool_fee_fix... | the_stack |
;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
CREATE DATABASE /*!32312 ... | the_stack |
--
-- Licensed to the Apache Software Foundation (ASF) under one or more
-- contributor license agreements. See the NOTICE file distributed with
-- this work for additional information regarding copyright ownership.
-- The ASF licenses this file to You under the Apache License, Version 2.0
-- (the "License"); you may ... | the_stack |
-- 2020-10-07T11:59:13.538Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Menu (Action,AD_Client_ID,AD_Element_ID,AD_Menu_ID,AD_Org_ID,AD_Window_ID,Created,CreatedBy,Description,EntityType,InternalName,IsActive,IsCreateNew,IsReadOnly,IsSOTrx,IsSummary,Name,Updated,UpdatedBy) VALUES ('... | the_stack |
-- 2021-06-15T08:17:04.537Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,579349,0,'API Audit - Accessed Records',TO_TIMESTAMP('2021-06-15 11:17:0... | the_stack |
DROP SCHEMA bicoredata CASCADE;
CREATE SCHEMA bicoredata;
SET CURRENT_SCHEMA = bicoredata;
--FUNC_001
CREATE FUNCTION RmvDupstrWithSep(text, text, text)
RETURNS text
AS 'com.huawei.udf.RmvDupstrWithSep.evaluate'
LANGUAGE java;
SELECT RmvDupstrWithSep('AS,de,frd,s,de',',','&');
DROP FUNCTION RmvDupstrWithSep;
--FUN... | the_stack |
-- 2018-05-15T15:18:25.301
-- 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,AllowZoomTo,ColumnName,Created,CreatedBy,DDL_NoForeignKey,EntityType,FieldLength,IsActive,IsAdvancedText,IsAllowLogging,IsAlwa... | the_stack |
CREATE TABLE station_to_station_counts AS
SELECT start_station_id, end_station_id, COUNT(*) AS count
FROM trips
WHERE date(start_time) >= '2015-09-01'
GROUP BY start_station_id, end_station_id;
CREATE INDEX idx_station_to_station ON station_to_station_counts (start_station_id, end_station_id);
CREATE TABLE directions_... | the_stack |
-- 2019-06-13T15:03:34.811
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_ImpFormat (AD_Client_ID,AD_ImpFormat_ID,AD_Org_ID,AD_Table_ID,Created,CreatedBy,FormatType,IsActive,IsManualImport,IsMultiLine,Name,Processing,Updated,UpdatedBy) VALUES (0,540037,0,541372,TO_TIMESTAMP('2019-06-13... | the_stack |
-- Database dump of a db-version 1 schema. Used to test db migrations.
-- This dump consists of:
-- - project with name: 'db-migration-project'
-- - ..containing a suite with name: 'suite1'
-- - ..containing runs with screenshots 'First', 'Second', 'Third'
-- - in run with ID 1:
-- - First is accepted, Second rejected,... | the_stack |
--Licensed to the Apache Software Foundation (ASF) under one or more
--contributor license agreements. See the NOTICE file distributed with
--this work for additional information regarding copyright ownership.
--The ASF licenses this file to You under the Apache License, Version 2.0
--(the "License"); you may not use ... | the_stack |
SET client_encoding TO UTF8;
CREATE SCHEMA collate_tests;
SET search_path = collate_tests;
CREATE TABLE collate_test1 (
a int,
b text COLLATE "en_US" NOT NULL
);
\d collate_test1
CREATE TABLE collate_test_fail (
a int,
b text COLLATE "ja_JP.eucjp"
);
CREATE TABLE collate_test_fail (
a int,
... | the_stack |
DROP FUNCTION IF EXISTS schema_version() CASCADE;
-- it's imperative for `update-versions.sh` that this function be formatted exactly this way
CREATE FUNCTION zdb.schema_version() RETURNS text LANGUAGE sql AS $$
SELECT '3000.0.0-beta1 (5a9bf6980021200bce82961cccdb290fb42ba6d4)'
$$;
INSERT INTO zdb.filters(name, definit... | the_stack |
-- CreateEnum
CREATE TYPE "cli_status_status" AS ENUM ('Started', 'Completed');
-- CreateEnum
CREATE TYPE "integrations_integration_name" AS ENUM ('SLACK');
-- CreateEnum
CREATE TYPE "job_reports_status" AS ENUM ('PASSED', 'FAILED', 'MANUAL_REVIEW_REQUIRED', 'RUNNING');
-- CreateEnum
CREATE TYPE "jobs_build_trigger"... | the_stack |
-- 05.07.2016 10:13
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET DefaultValue='N',Updated=TO_TIMESTAMP('2016-07-05 10:13:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=11101
;
-- 05.07.2016 10:16
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
... | the_stack |
-- *************************************************************** -->
-- This file is for testing backwards compatibility with pre-9.0.0 -->
-- configurations using a relational database for the YADA index -->
-- *************************************************************** -->
-- List of Essential Queries
-- De... | the_stack |
drop table if exists d;
drop table if exists c;
drop table if exists b;
drop table if exists a;
-- basic list partition
create table ggg (a char(1), b char(2), d char(3))
partition by LIST (b);
CREATE TABLE ggg_aa PARTITION OF ggg FOR VALUES IN ('a','b','c','d');
CREATE TABLE ggg_bb PARTITION OF ggg FOR VALUES IN ('... | the_stack |
CREATE TABLE babel_cursor_t1 (i INT, d numeric(8, 4), c varchar(10), u uniqueidentifier, v sql_variant);
INSERT INTO babel_cursor_t1 VALUES (1, 1.1, 'a', '1E984725-C51C-4BF4-9960-E1C80E27ABA0', 1);
INSERT INTO babel_cursor_t1 VALUES (2, 22.22, 'bb', '2E984725-C51C-4BF4-9960-E1C80E27ABA0', 22.22);
INSERT INTO babel_curs... | the_stack |
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for course
-- ----------------------------
DROP TABLE IF EXISTS `course`;
CREATE TABLE `course` (
`id` int(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '课程ID',
`major_id` int(20) unsigned NOT NULL COMMENT '专业ID',
`name` varchar(50) NOT ... | the_stack |
--****************************************************************************
-- (c) Copyright IBM Corp. 2017 All rights reserved.
--
-- The following sample of source code ("Sample") is owned by International
-- Business Machines Corporation or one of its subsidiaries ("IBM") and is
-- copyrighted and licensed, not s... | the_stack |
-- Add iops_total_rate column and iops_rate_per_gb to disk_offering and disk_offering_view
ALTER TABLE `disk_offering`
ADD COLUMN `iops_total_rate` BIGINT,
ADD COLUMN `iops_rate_per_gb` BOOLEAN NOT NULL DEFAULT FALSE;
-- Update the volume_view
DROP VIEW IF EXISTS `volume_view`;
CREATE VIEW `volume_view` AS
SELEC... | the_stack |
-- 2021-05-31T13:10:08.383Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2021-05-31 16:10:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=573752
;
-- 2021-05-31T13:10:11.377Z
-- I forgot to set the DICTIONARY_ID_COMMENTS Syst... | the_stack |
alter table ACT_RE_PROCDEF add column ENGINE_VERSION_ varchar(255);
update ACT_RE_PROCDEF set ENGINE_VERSION_ = 'v5';
alter table ACT_RE_DEPLOYMENT add column ENGINE_VERSION_ varchar(255);
update ACT_RE_DEPLOYMENT set ENGINE_VERSION_ = 'v5';
alter table ACT_RU_EXECUTION add column ROOT_PROC_INST_ID_ varchar(64);
crea... | the_stack |
-- 2019-06-20T15:09:36.547
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Ref_List SET Name='JasperReports with SQL', Value='JasperReports with SQL', ValueName='JasperReportsSQL',Updated=TO_TIMESTAMP('2019-06-20 15:09:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Ref_List_ID=541738
;
... | the_stack |
-- MySQL dump 10.17 Distrib 10.3.12-MariaDB, for Linux (x86_64)
--
-- Host: localhost Database: schema-generator@financial
-- ------------------------------------------------------
-- Server version 5.7.23
--
-- Table structure for table `Campus`
--
DROP TABLE IF EXISTS `Campus`;
CREATE TABLE `Campus` (
`id` c... | the_stack |
-- AMZ-Driverless
-- Copyright (c) 2019 Authors:
-- - Huub Hendrikx <hhendrik@ethz.ch>
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitatio... | the_stack |
-----------------------------------------------------------------------
-- SELECT https://msdn.microsoft.com/en-us/library/ms187731.aspx
--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- Using SELECT to retrieve rows and columns
USE AdventureWorks2012;
GO
SELECT *
FROM Production.Product
ORDE... | the_stack |
--
-- XC_FOR_UPDATE
--
set enable_fast_query_shipping=true;
-- create some tables
create table t1(val int, val2 int);
create table t2(val int, val2 int);
create table t3(val int, val2 int);
create table p1(a int, b int);
create table c1(d int, e int) inherits (p1);
-- insert some rows in them
insert into t1 values(... | the_stack |
alter table "cicd_BuildStep" add column "typeDetail" text generated always as (type ->> 'detail') stored;
alter table "cicd_BuildStep" add column "typeCategory" text generated always as (type ->> 'category') stored;
alter table "cicd_BuildStep" add column "statusDetail" text generated always as (status ->> 'detail') st... | the_stack |
--********************************************************************/
-- */
-- IBM InfoSphere Replication Server */
-- Version 9.7FPs for Linux, UNIX AND Windows */
-- ... | the_stack |
DROP TABLE IF EXISTS sphere_sample CASCADE;
CREATE TABLE IF NOT EXISTS sphere_sample (x DOUBLE PRECISION NOT NULL, y DOUBLE PRECISION NOT NULL, z DOUBLE PRECISION NOT NULL,
a DOUBLE PRECISION NOT NULL, b DOUBLE PRECISION NOT NULL, c DOUBLE PRECISION NOT NULL, sampleno INTEGER NOT NULL, n_samples INTEGER NOT NULL);
INS... | the_stack |
-- 2018-08-30T00:30:36.527
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,IsActive,IsDisplayed,IsDisplayedGrid,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine... | the_stack |
SET NUMERIC_ROUNDABORT OFF
GO
SET ANSI_PADDING, ANSI_WARNINGS, CONCAT_NULL_YIELDS_NULL, ARITHABORT, QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
SET XACT_ABORT ON
GO
SET TRANSACTION ISOLATION LEVEL Serializable
GO
BEGIN TRANSACTION
GO
IF @@ERROR <> 0 SET NOEXEC ON
GO
PRINT N'Dropping foreign keys from [HangFire].[JobParameter]'... | the_stack |
SET search_path = public, pg_catalog;
--
-- Name: real_efile_f3x; Type: VIEW; Schema: public; Owner: fec
--
CREATE VIEW real_efile_f3x AS
SELECT f3x.repid,
f3x.comid,
f3x.com_name,
f3x.str1,
f3x.str2,
f3x.city,
f3x.state,
f3x.zip,
f3x.amend_addr,
f3x.qual,
f3x.rptcode,
f3x... | the_stack |
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for sys_api_logger
-- ----------------------------
DROP TABLE IF EXISTS `sys_api_logger`;
CREATE TABLE `sys_api_logger` (
`ID` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`URI` varchar(100)... | the_stack |
-- +migrate Up
-- Update to return alert escalation_level
CREATE OR REPLACE VIEW on_call_alert_users AS
WITH alert_users AS (
SELECT act.user_id, act.schedule_id, a.id as alert_id, a.status, a.escalation_level
FROM
alerts a,
service s,
alert_escalation_levels lvl,
escalation_policy_step step,
... | the_stack |
--
-- The contents of this file are subject to the license and copyright
-- detailed in the LICENSE and NOTICE files at the root of the source
-- tree and available online at
--
-- http://www.dspace.org/license/
--
----------------------------------------------------
-- Data Migration for XML/Configurable Workflow
--
... | the_stack |
-- 21.10.2015 18:19
-- 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,AllowZoomTo,ColumnName,Created,CreatedBy,DDL_NoForeignKey,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAdvancedTex... | the_stack |
When we group by, we apply the function PER GROUP, NOT on the ENTIRE DATA SET.
Group by use Split, Apply, Combine strategry.
*/
/* How many employees worked in each department ? */
SELECT d.dept_name AS "Department Name" ,COUNT(e.emp_no) AS "Number Of Employee"
FROM employees e
JOIN dept_emp de ON e.emp_no = de.emp_n... | the_stack |
DO
$$
BEGIN
IF NOT EXISTS (
SELECT 1
FROM pg_tables
WHERE schemaname = current_schema
AND tablename = 'firmware_file') THEN
-- Since we are dealing with firmware files, rename the firmware table to firmware_file.
ALTER TABLE firmware RENAME TO firmware_file;
-- Rename the sequence ... | the_stack |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.