sql stringlengths 6 1.05M |
|---|
<filename>test_and_ground/asist/prc/scx_cpu1_hs_emt2.prc<gh_stars>10-100
PROC scx_cpu1_hs_emt2
;*******************************************************************************
; Test Name: hs_emt2
; Test Level: Build Verification
; Test Type: Functional
;
; Test Description
; The purpose of this procedure is to g... |
<reponame>andreylipattsev/almanac.httparchive.org
#standardSQL
CREATE TEMPORARY FUNCTION getSupports(css STRING)
RETURNS ARRAY<STRING>
LANGUAGE js
OPTIONS (library = "gs://httparchive/lib/css-utils.js")
AS '''
try {
function compute(ast) {
let ret = {};
walkRules(ast, rule => {
incrementByKey(ret, "tot... |
<gh_stars>10-100
DROP TABLE IF EXISTS tmp_report_definition_compliance;
CREATE TEMPORARY TABLE tmp_report_definition_compliance(
tmp_id serial primary key,
mrd_id integer,
report_name character varying(100),
due_date_type character varying(3),
due_date_period integer,
compliance_act character varying(5),
comp... |
<reponame>vivivibo/pipeline
BEGIN;
SELECT
_v.unregister_patch ('022-create-fastpath-btree-idx');
DROP INDEX measurement_start_time_btree_idx
COMMIT;
|
<reponame>opengauss-mirror/Yat<filename>openGaussBase/testcase/SQL/DATATYPE/decimal/int/Opengauss_Function_Datatype_Int_Case0011.sql<gh_stars>0
-- @testpoint: 插入负整数
drop table if exists int11;
create table int11 (name int);
insert into int11 values (-1223340);
insert into int11 values (-999999999);
insert into int11 v... |
-- MySQL dump 10.16 Distrib 10.1.36-MariaDB, for Win32 (AMD64)
--
-- Host: localhost Database: dspfish
-- ------------------------------------------------------
-- Server version 10.1.36-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SE... |
<gh_stars>0
DROP TABLE `flights`; |
rem
rem NAME
rem soedgindexes_none_2.sql - create indexes for V2 SOE Schema
rem
rem DESCRIPTON
rem Empty Stub
rem
-- Nothing here... Move on
--End
|
<gh_stars>0
SET search_path TO NOTIFICATIONS;
LISTEN "SIMPLE_NOTIFY_CHANNEL";
INSERT INTO SIMPLE_NOTIFICATIONS(message) VALUES ('a');
INSERT INTO SIMPLE_NOTIFICATIONS(message) VALUES ('a');
INSERT INTO SIMPLE_NOTIFICATIONS(message) VALUES ('a');
INSERT INTO SIMPLE_NOTIFICATIONS(message) VALUES ('a');
INSERT INTO SIMPL... |
SELECT * from user_account;
SELECT * from doc;
SELECT * from keyword;
SELECT * from doc_keyword;
SELECT * from doc_owner;
SELECT * from doc_note;
SELECT * from doc_note_history;
|
<filename>migrations/sqls/20150917154020-questions-down.sql
DROP TABLE IF EXISTS `Question`;
|
-- Inserts some sample data into the database.
-- Included memos contain:
-- One thread (3) with a single note
-- One thread (1) with two notes
-- One thread (2) with two notes, newer one being marked as deleted.
insert into memos(title, content, version, deleted, created, modified, threadid) values
('Groceries', 'Egg... |
<filename>sql_templates/insert_data_source.sql<gh_stars>0
{# record info about a file we downloaded #}
insert into public.data_source(url, description, data_source_type, downloaded, group_name)
values('{{ url }}','{{ description }}','{{ data_source_type }}', '{{ downloaded }}', '{{group_name}}'); |
<filename>test_books.sql
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Nov 08, 2018 at 12:12 PM
-- Server version: 10.1.36-MariaDB
-- PHP Version: 7.2.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+0... |
SELECT e.EmployeeID,
e.FirstName,
m.EmployeeID AS ManagerID,
m.FirstName AS ManagerName
FROM Employees AS e
LEFT JOIN Employees AS m
ON m.EmployeeID = e.ManagerID
WHERE m.EmployeeID IN (3, 7)
ORDER BY EmployeeID ASC
GO |
<gh_stars>0
CREATE OR REPLACE FUNCTION pgl_ddl_deploy.deployment_check_wrapper(p_set_config_id integer, p_set_name text)
RETURNS boolean
LANGUAGE plpgsql
AS $function$
DECLARE
v_count INT;
c_exclude_always TEXT = pgl_ddl_deploy.exclude_regex();
c_set_config_id INT;
c_include_schema_regex TEXT;
v_include_onl... |
DROP VIEW ObjectFile CASCADE;
ALTER TABLE db.object_file
ADD COLUMN owner uuid REFERENCES db.user(id) ON DELETE RESTRICT;
CREATE INDEX ON db.object_file (owner);
UPDATE db.object_file SET owner = '00000000-0000-4000-a001-000000000001';
ALTER TABLE db.object_file
ALTER COLUMN owner SET NOT NULL;
COMMENT ON COLU... |
<reponame>SAGA8866/saga
/*
Navicat MySQL Data Transfer
Source Server : 88
Source Server Version : 50045
Source Host : 192.168.1.3:3306
Source Database : web
Target Server Type : MYSQL
Target Server Version : 50045
File Encoding : 65001
Date: 2012-09-19 16:25:04
*/
SET FOREIGN_KEY_... |
<reponame>bbeny123/motorcycle-rental
--------------------------------------------------------
-- Example data for Table USERS
--------------------------------------------------------
Insert into CCM_MOBILE.USERS (USR_ID,USR_LOGIN,USR_PASSWORD,USR_FIRST_NAME,USR_LAST_NAME,USR_EMAIL,USR_ADMIN) values (SEQ_USR_ID.nextva... |
<filename>bamazon.sql
DROP DATABASE IF EXISTS Bamazon_DB;
CREATE DATABASE Bamazon_DB;
USE Bamazon_DB;
CREATE TABLE products (
item_id INT(11) AUTO_INCREMENT NOT NULL,
product_name VARCHAR(100) NOT NULL,
department_name VARCHAR(100) NOT NULL,
price DECIMAL(20,2) NOT NULL,
stock_quantity INT(11) NOT NULL,
PRIMARY KEY ... |
<filename>sendashApi/src/main/resources/db/migration/V10__rejectedEndpointTable.sql
CREATE table REJECTED_ENDPOINT(
ID BIGINT NOT NULL AUTO_INCREMENT,
CLIENT_ID BIGINT NOT Null,
HOST_NAME varchar(255) NOT NULL,
API_KEY varchar(255) NOT NULL,
PRIMARY KEY(ID),
CONSTRAINT rejected_client_host ... |
<gh_stars>1-10
create view "postgres"._airbyte_test_normalization."unnest_alias_children_owner_ab2__dbt_tmp" as (
-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type
select
_airbyte_children_hashid,
cast(owner_id as
bigint
) as owner_id,
_airbyte_ab_id,... |
GRANT ALL PRIVILEGES ON DATABASE gis TO osmhu;
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO osmhu;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT, INSERT, UPDATE, DELETE ON TABLES TO osmhu;
CREATE EXTENSION postgis;
CREATE EXTENSION hstore;
|
-- io.test
--
-- execsql { ROLLBACK; }
ROLLBACK; |
CREATE TABLE `employee`
(
`ename` VARCHAR(40) NULL,
`essn` VARCHAR(40) NOT NULL,
`address` VARCHAR(40) NULL,
`salary` DECIMAL(7, 2) NULL,
`superssn` VARCHAR(40) NULL,
`dno` VARCHAR(40) NULL,
CONSTRAINT department_pk
PRIMARY KEY (`essn`)
) ENGINE = InnoDB
DEFAULT CHARSET = ut... |
<gh_stars>10-100
-- file:alter_table.sql ln:378 expect:true
alter table nv_child_2011 VALIDATE CONSTRAINT nv_child_2011_d_check
|
-- file:aggregates.sql ln:40 expect:true
SELECT stddev_pop(3.0::numeric), stddev_samp(4.0::numeric)
|
<filename>backend/de.metas.vertical.pharma/src/main/sql/postgresql/system/5521270_sys_gh5177_IsPharmaProduct_Column_DDL.sql
-- 2019-05-09T16:58:58.292
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
/* DDL */ SELECT public.db_alter_table('M_Product','ALTER TABLE public.M_Product ADD COLUMN IsPharmaPro... |
-- 2020-02-17T13:14:26.869Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Val_Rule (AD_Client_ID,AD_Org_ID,AD_Val_Rule_ID,Code,Created,CreatedBy,EntityType,IsActive,Name,Type,Updated,UpdatedBy) VALUES (0,0,540480,'-- GENERAL
M_HU_PI_Item_Product.AD_Org_ID IN (0, @AD_Org_ID@)
AND (M_HU... |
<filename>sql/updates/0.11/5778_mangos_spell_affect.sql
ALTER TABLE `spell_affect`
DROP `SpellFamily`,
DROP `Charges`;
|
-- CreateEnum
CREATE TYPE "PetExp" AS ENUM ('Y', 'N');
-- CreateTable
CREATE TABLE "tbl_users" (
"id" BIGSERIAL NOT NULL,
"uuid" TEXT NOT NULL,
"firstName" TEXT NOT NULL,
"lastName" TEXT NOT NULL,
"email" TEXT NOT NULL,
"state" TEXT NOT NULL,
"petExp" "PetExp" NOT NULL DEFAULT E'Y',
CO... |
DROP TABLE IF EXISTS #insurance;
SELECT
e.ENC_ID,
e.PERSON_ID,
BENEFIT_CAT,
CASE
WHEN BENEFIT_CAT IN ('CC', 'CP', 'MC', 'MD') THEN 'Public (non-military)'
WHEN BENEFIT_CAT IN ('CO') THEN 'Private'
ELSE 'Other or unknown' -- OG, NC, OT, UN, WC, NI
END as insurance_type
INTO #insurance
FROM @SCHEMA.@ENCOU... |
update CAR set game_id = null;
update GAME set map_id = null;
update MOVEMENT_HISTORY set game_id = null;
update MOVEMENT_HISTORY set car_id = null;
delete from CAR;
delete from MAP;
delete from GAME;
delete from MOVEMENT_HISTORY; |
INSERT INTO `person` (`id`, `first_name`, `last_name`) VALUES ('2', '哈哈', '呵呵');
|
-- start query 34 in stream 0 using template query34.tpl
select
c_last_name,
c_first_name,
c_salutation,
c_preferred_cust_flag,
ss_ticket_number,
cnt
from
(select
ss_ticket_number,
ss_customer_sk,
count(*) cnt
from
store_sales,
date_dim,
store,
household_demographics
where
... |
create or replace package wt_core_report
authid definer
as
-- To report the latest Test Runner results:
-- begin
-- wt_core_report.dbms_out(30, TRUE);
-- end;
-- /
-- Turn this off to allow output across multiple lines of text
g_single_line_output boolean := TRUE;
-- DATE data type f... |
<gh_stars>1-10
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50721
Source Host : localhost:3306
Source Database : wx-nacos
Target Server Type : MYSQL
Target Server Version : 50721
File Encoding : 65001
Date: 2021-01-20 16:13:42
*/
SET FOREIGN_KEY... |
-- EPINEPHRINE
SELECT
dose.icustay_id,
dose.starttime,
dose.endtime,
dose.vaso_rate,
dose.vaso_amount
FROM `physionet-data.mimiciii_derived.epinephrine_dose` as dose
INNER JOIN `milan-datathon.temp7.icustays` as icustays
ON icustays.ids = dose.icustay_id
ORDER BY icustay_id |
--
-- Kingbase database dump
--
-- Dumped from database version V008R003C002B0320
-- Dumped by sys_dump version V008R003C002B0320
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 sys_catalog.set_con... |
<reponame>mirage-sql/mirage
SELECT BOOK_ID, BOOK_NAME, AUTHOR, PRICE
FROM BOOK
/*IF bookName != null*/
WHERE BOOK_NAME IN /*bookNames*/('Mirage in Action')
/*END*/
|
select /* SPMTEST */ /*+ INDEX(sales salesi) */ * from sales WHERE sale_date >= trunc(sysdate);
@plan
|
<reponame>todoyuo/todoyu<filename>ext/timetracking/test/data/data_demo.sql<gh_stars>1-10
TRUNCATE TABLE `ext_timetracking_track`;
INSERT INTO `ext_timetracking_track` (`id`, `date_create`, `date_update`, `id_person_create`, `date_track`, `id_task`, `workload_tracked`, `workload_chargeable`, `comment`) VALUES
(1, 12... |
<reponame>LasseWolter/clowdr
alter table "public"."Tag" drop constraint "Tag_conferenceId_fkey";
|
-- selectUsingTwoOfSameKey
SELECT mt.blah_id
FROM public.mytable mt
WHERE mt.customer_id = :'customerId'
UNION
SELECT ot.blah_id
FROM public.othertable ot
WHERE ot.customer_id = :'customerId'
ORDER BY blah_id
;
|
-- TAB-4132
-- default to having been sent for all existing data
alter table Notification add listeners_processed number (1, 0) default 1; |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost
-- Tiempo de generación: 31-07-2019 a las 03:57:49
-- Versión del servidor: 10.3.16-MariaDB
-- Versión de PHP: 7.3.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00"... |
-- This is where I create the table of the resulting queries.
-- Instead of loading the whole, huge database into Heroku (> 7 million lines)
-- the idea is only to load in the query results (13k lines)
-- TODO: figure out how to run this will all 13K+ bikeids
\set $1
DROP TABLE bikeid_stats
-- All queries except f... |
<filename>sql/immutable/01-session-account.sql
CREATE TABLE `sessionAccount` (
`sessionId` binary(16) NOT NULL,
`accountId` binary(16) NOT NULL,
`sessionAccountCreateTime` datetime(6) NOT NULL,
PRIMARY KEY (`sessionId`),
KEY `accountId` (`accountId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO sessionA... |
<filename>livraison/sql/2.1.5/00_update_schema.sql
ALTER TABLE CREP DROP (SHD_TITULAIRE);
commit;
exit; |
CREATE PROCEDURE [dbo].[SetPaymentOrder]
@employerAccountId INT
AS
-- calculate the payment order for all approved apprentices related to the specified employer account.
-- NOTE: does not update the payment order for any apprentices that are not approved
UPDATE Apprenticeship
SET
PaymentOrder = npo.NewPaymentOrder... |
-- the titles of all movies with a release date on or after 2018, in alphabetical order
SELECT title FROM movies
WHERE year >= 2018
ORDER BY title; |
--
-- Database: `artur_butov_shop`
--
--
-- Dumping data for table `user`
--
INSERT INTO `user` (`id`, `username`, `username_canonical`, `email`, `email_canonical`, `enabled`, `salt`, `password`, `last_login`, `confirmation_token`, `password_requested_at`, `roles`) VALUES
(1, 'test', '<PASSWORD>', '<EMAIL>', '<EMAIL... |
CREATE TABLE pet (
id IDENTITY NOT NULL PRIMARY KEY,
name VARCHAR(252),
species VARCHAR(255)
);
|
-- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 05, 2019 at 05:45 AM
-- Server version: 5.7.14
-- PHP Version: 7.0.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... |
<filename>supermercado.sql
/*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 50724
Source Host : localhost:3306
Source Schema : supermercado
Target Server Type : MySQL
Target Server Version : 50724
File Encoding ... |
------ Fees Detail sample data ----------------------
update egswtax_feesdetail_master set code='DONATIONCHARGE' where code='DONATIONCHARGES';
|
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 5.7.26 - MySQL Community Server (GPL)
-- Server OS: Win64
-- HeidiSQL Version: 11.0.0.5919
-- --------------------------------------------------------
/... |
CREATE TABLE go (
code VARCHAR(128),
status INT,
data VARCHAR(2500),
uptime INT,
winner INT
);
|
CREATE OR REPLACE FUNCTION u_posts_del_images(
featured_image_id BIGINT
)
RETURNS VOID
LANGUAGE PLPGSQL
VOLATILE
CALLED ON NULL INPUT
PARALLEL UNSAFE
AS $$
BEGIN
UPDATE t_posts
SET tp_featured_image = NULL
WHERE tp_featured_image = featured_image_id;
END;
$$;
|
<filename>dogeeku.sql
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 06, 2019 at 11:56 AM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.3.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00... |
-- Core Blockchain Tables
CREATE TABLE IF NOT EXISTS "blockchain_segments" (
"id" INTEGER NOT NULL,
"parent_blockchain_segment_id" INTEGER NULL,
"nested_set_left" INTEGER NULL,
"nested_set_right" INTEGER NULL,
PRIMARY KEY ("id"),
FOREIGN KEY("parent_blockchain_segment_id") REFERENCES "blockchain_segments" ("id")... |
<reponame>Shuttl-Tech/antlr_psql
-- file:polymorphism.sql ln:375 expect:true
select f3, myaggn09a(f1) from t group by f3 order by f3
|
<filename>models/as_of_date.sql
{{ config(materialized='table') }}
{%- set datepart = "day" -%}
{%- set start_date = "TO_DATE('2022/01/01', 'yyyy/mm/dd')" -%}
{%- set end_date = "TO_DATE('2022/03/10', 'yyyy/mm/dd')" -%}
WITH as_of_date AS (
{{ dbt_utils.date_spine(datepart=datepart,
s... |
-- Copyright 2018 <NAME>. All rights reserved. More info at http://tanelpoder.com
-- Licensed under the Apache License, Version 2.0. See LICENSE.txt for terms & conditions.
col bugno format 999999999
col VALUE format 999
col sql_feature format a40... |
<filename>database/sample_db_schema.sql<gh_stars>1-10
-- create tables
create table departments (
name varchar2(255),
location varchar2(255),
country varchar2(255)
)
;
create table employees (
department_id number
... |
CREATE database IF NOT EXISTS cdc;
use cdc;
show tables;
-- Cleanup
drop table cdc;
drop table cdc_raw;
CREATE external TABLE
IF NOT EXISTS cdc_raw(id String, update_date TIMESTAMP, source_code INT, source_ip String,
direction String, target_ip String, offset INT, contrast BIGINT, amount_due DOUBLE, pass_due
BO... |
-- phpMyAdmin SQL Dump
-- version 4.6.6
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: 2017-04-17 09:20:25
-- 服务器版本: 10.1.21-MariaDB
-- PHP Version: 7.1.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!4... |
<gh_stars>1000+
/* contrib/pg_surgery/pg_surgery--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION pg_surgery" to load this file. \quit
CREATE FUNCTION heap_force_kill(reloid regclass, tids tid[])
RETURNS VOID
AS 'MODULE_PATHNAME', 'heap_force_kill'
LAN... |
<filename>ddl/nautilus.sql<gh_stars>0
DROP TABLE IF EXISTS nautilus_sdg_staging;
DROP TABLE IF EXISTS nautilus_visit_staging;
DROP TABLE IF EXISTS nautilus_aliquot_staging;
CREATE TABLE nautilus_sdg_staging
(
sdg_id numeric(16,0),
sample_subject_id character varying(255),
external_reference character varying(25... |
CLUSTER lite.observations_1761_land_0 USING observations_1761_land_0_date_time_idx;
CLUSTER lite.observations_1761_land_2 USING observations_1761_land_2_date_time_idx;
CLUSTER lite.observations_1761_land_3 USING observations_1761_land_3_date_time_idx;
CLUSTER lite.observations_1762_land_0 USING observations_1762_land_0... |
ALTER TABLE ProgramStage ADD COLUMN featureType TEXT;
|
ALTER TABLE "job_queues"."UploadYouTubeVideoJob" DROP COLUMN "playlistId";
|
<reponame>agence-web-france/chapiter<filename>src/prisma/migrations/20220122214138_one_to_one_seo/migration.sql<gh_stars>0
/*
Warnings:
- A unique constraint covering the columns `[pageId]` on the table `Seo` will be added. If there are existing duplicate values, this will fail.
*/
-- CreateIndex
CREATE UNIQUE IN... |
<reponame>albandewilde/in-Projects
--SetupConfig: {"Requires": [ "CK.sGroupDestroy" ]}
--
CREATE PROCEDURE sDeleteEventSchool
(
@ActorId INT,
@EventId INT,
@ForceDestroy BIT,
@Status INT = 0 OUTPUT
)
AS
BEGIN
--[beginsp]
--<PreCreate />
IF NOT EXISTS(SELECT es.EventId FROM IPR.tEventSchool es join CK.tGrou... |
<reponame>aleksander73/shop-backend<filename>src/db-creation/functions.sql
CREATE OR REPLACE FUNCTION product_exists(param_productID integer) RETURNS boolean
AS $$
DECLARE numberOfRows integer;
BEGIN
numberOfRows := (SELECT COUNT(*)::int FROM (
SELECT * FROM Product WHERE Product.id = para... |
-- noinspection SqlNoDataSourceInspectionForFile
create sequence HIBERNATE_SEQUENCE;
create table conta (
id bigint auto_increment not null,
str_nome varchar(255) not null,
str_chave varchar(255) not null,
str_chave_vendedor varchar(255) not null,
str_chave_comprador varchar(255) not null,
... |
create sequence entreprise_id;
create table entreprise (
id integer primary key default nextval('entreprise_id'),
siren varchar(9),
version integer default 0,
date_add timestamp default current_timestamp,
siret_siege char(14),
raison_sociale text,
prenom1 text,
prenom2 text,
prenom3 text,
prenom4 te... |
<reponame>linminglu/Fgame<filename>sql/1.23/update_game_1.23.sql
set names 'utf8mb4';
set character_set_database = 'utf8mb4';
set character_set_server = 'utf8mb4';
USE `game`;
-- create by zrc 2019-06-04
-- ----------------------------
-- Table structure for t_player_week 玩家周卡数据
-- ----------------------------
CREA... |
<reponame>pntone/CORE
prompt --application/pages/page_00990
begin
-- Manifest
-- PAGE: 00990
-- Manifest End
wwv_flow_api.component_begin (
p_version_yyyy_mm_dd=>'2021.04.15'
,p_release=>'21.1.7'
,p_default_workspace_id=>9014660246496943
,p_default_application_id=>770
,p_default_id_offset=>0
,p_default_owner=>... |
<reponame>darojuv/cset
USE [CSETWeb]
GO
/****** Object: StoredProcedure [dbo].[GetApplicationModeDefault] Script Date: 11/14/2018 3:57:31 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[GetApplicationModeDefault]
-- Add the parameters for the stored procedure here
@Assessment_I... |
<gh_stars>1000+
DROP SCHEMA IF EXISTS foo; |
select StudentId, StudentName, GroupId
from Students
where exists (
select Mark
from Marks
where Mark = :Mark
and Marks.StudentId = Students.StudentId
and exists (
select CourseId
from Courses
where CourseName = :CourseName
and Courses.CourseId = Marks.CourseId
... |
<reponame>cingireh/stellar
-- +migrate Up
ALTER TABLE public.encrypted_keys
DROP COLUMN salt,
DROP COLUMN encrypter_name,
DROP COLUMN encrypted_keys_data;
TRUNCATE public.encrypted_keys;
ALTER TABLE public.encrypted_keys
ADD COLUMN encrypted_keys_data jsonb NOT NULL;
-- +migrate Down
ALTER TABLE public.encrypt... |
<reponame>CertiPath/DLTGateway
CREATE VIEW [dbo].[vNamespaceAndObjectTree]
AS
SELECT bnn.BusinessNetworkGUID, bnn.[GUID] as BusinessNetworkNamespaceGUID, bnn.Name as BusinessNetworkNamespaceName,
bno.[GUID] as BusinessNetworkObjectGUID, bno.ClassName as BusinessNetworkObjectClassName,
bno.Name as Bu... |
<gh_stars>0
create table "t_department"(
"id" int not null primary key auto_increment,
"name" varchar(128) not null,
"location" varchar(128) not null,
"mixedCase" varchar(128)
);
create table "t_employee"(
"id" int not null primary key auto_increment,
"name" varchar(128) not null,
"job" varchar(128) not... |
-- Start transaction and plan tests
begin;
select plan(4);
-- Declare some variables
\set user1ID '00000000-0000-0000-0000-000000000001'
\set user2ID '00000000-0000-0000-0000-000000000002'
\set org1ID '00000000-0000-0000-0000-000000000001'
\set repo1ID '00000000-0000-0000-0000-000000000001'
\set repo2ID '00000000-0000... |
create database AlohaDB;
create table categories
(
id int(255) auto_increment
primary key,
name varchar(100) not null,
created_at datetime null,
updated_at datetime null,
constraint categories_name_uindex
unique (name)
);
create table photos
(
id int aut... |
<filename>schema/test/unit/computed_columns/application_latest_submitted_revision_status_test.sql
begin;
set client_min_messages to warning;
create extension if not exists pgtap;
select plan(3);
truncate ggircs_portal.application restart identity cascade;
select test_helper.modify_triggers('disable');
reset client_min... |
<gh_stars>1-10
-- Name: BackgroundSubprocessBySubprocessId
-- Schema: posda_queries
-- Columns: ['background_subprocess_id', 'subprocess_invocation_id', 'input_rows_processed', 'when_script_started', 'when_background_entered', 'when_script_ended', 'user_to_notify', 'process_error']
-- Args: ['subprocess_invocaton_id']
... |
<filename>tests/queries/0_stateless/00519_create_as_select_from_temporary_table.sql
DROP TEMPORARY TABLE IF EXISTS t1_00519;
DROP TEMPORARY TABLE IF EXISTS t3_00519;
CREATE TEMPORARY TABLE t1_00519 AS SELECT 1;
CREATE TEMPORARY TABLE t3_00519 AS SELECT * FROM t1_00519;
SELECT * FROM t3_00519;
|
<gh_stars>0
CREATE TABLE [ExampleComments] (
[Id] bigint NOT NULL IDENTITY,
[ExampleId] bigint NOT NULL,
[UserId] nvarchar(450) NULL,
[Data] nvarchar(max) NULL,
[CreationDate] datetime2 NOT NULL,
CONSTRAINT [PK_ExampleComments] PRIMARY KEY ([Id]),
CONSTRAINT [FK_ExampleComments_Examples_Exa... |
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [Profile.Data].[Funding.GetPersonFunding]
@PersonID INT
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
SELECT
ISNULL(a.Abstract,'') Abstract,
ISNULL(a.AgreementLabel,'... |
CREATE TABLE `phpvms_downloads` (
`id` INT NOT NULL AUTO_INCREMENT,
`pid` INT,
`name` VARCHAR(50),
`link` TEXT ASCII,
`image` TEXT ASCII,
`hits` INT,
PRIMARY KEY (`id`)
) ENGINE = MyISAM;
CREATE TABLE `phpvms_expenses` (
`id` INT NOT NULL AUTO_INCREMENT ,
`name` VARCHAR( 25 ) NOT NULL ,
`cost` F... |
<filename>Lab/lab3_PySpark/lab3_athena_Bartosz_Bielinski.sql
-- in Athena:
/* After saving data in bucket with PySpark:
From S3 bucket:
"s3://bartosz-bielinski/lab3-data/"
create DataBase named "lab3" with table "meteodata" with columns of types:
Wban_Number STRING, YearMonthDay STRING, Max_Temp STRING, Min_Temp... |
<gh_stars>0
select
employee.employee_id as employee_id,
concat(employee.first_name, ' ', employee.last_name) as employee_name,
manager.employee_id as manager_id,
concat(manager.first_name, ' ', manager.last_name) as manager_name
from
employees employee left join employees manager on (manager.emplo... |
-- CREATE TABLE "prospecto_vendedor" ---------------------------
CREATE TABLE `prospecto_vendedor` (
`id_prospecto_vendedor` Int( 11 ) NOT NULL,
`id_vendedor` Int( 11 ) NOT NULL,
`id_proyecto` Int( 11 ) NOT NULL,
`tipo_cliente` VarChar( 100 ) NOT NULL,
`id_cliente` Int( 11 ) NOT NULL,
PRIMARY KEY ( `id_proyecto`... |
USE Gringotts
GO
SELECT DepositGroup, IsDepositExpired, AVG(DepositInterest) AS AverageInterest
FROM WizzardDeposits
WHERE DepositStartDate > '01/01/1985'
GROUP BY DepositGroup, IsDepositExpired
ORDER BY DepositGroup DESC, IsDepositExpired ASC |
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 30, 2021 at 08:19 AM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 8.0.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
CREATE PROC usp_CalculateFutureValueForAccount(@AccountID INT, @InterestRate FLOAT)
AS
BEGIN
SELECT
ah.Id,
ah.FirstName AS [First Name],
ah.LastName AS [Last Name],
a.Balance AS [Current Balance],
dbo.ufn_CalculateFutureValue(a.Balance, @InterestRate, 5) AS [Balance in 5 years]
FROM Accounts AS a
JOIN Accoun... |
<filename>VotingInfo/Database/SQL/Alter/08-FKeys/Data/ContentInspection.sql
ALTER TABLE [Data].[ContentInspection]
ADD CONSTRAINT [FK_Data_ContentInspection_ProposedByUserId] FOREIGN KEY ([ProposedByUserId]) REFERENCES [Auth].[User] ([UserId])
, CONSTRAINT [FK_Data_ContentInspection_ConfirmedByUserId] FOREIGN KEY ([Co... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.