sql stringlengths 6 1.05M |
|---|
<gh_stars>1-10
CREATE TABLE foo (n integer);
INSERT INTO foo VALUES (1), (2), (3);
SELECT * FROM foo
WHERE n > 1;
|
<reponame>GeorgeKirev/OpenOLAT
create table o_bbb_template (
id bigserial,
creationdate timestamp not null,
lastmodified timestamp not null,
b_name varchar(128) not null,
b_description varchar(2000) default null,
b_system bool default false not null,
b_enabled bool default true not null,
b_exter... |
-- =============================================
-- Author: <NAME>
-- Create date: February 4, 2021
-- Description: Given a term code, determine the corresponding Academic Year
-- Notes: I just saved this as an example of how to determine the academic year from the termcode.
-- It should be optimized for better effic... |
CREATE TABLE [dbo].[ONSPD_Parish] (
[PAR17CD] NVARCHAR (50) NOT NULL,
[PAR17NM] NVARCHAR (MAX) NOT NULL,
CONSTRAINT [PK_ONSPD_Parish] PRIMARY KEY CLUSTERED ([PAR17CD] ASC)
);
|
<filename>public/FERCO/1_pruebas/inventario_movs_tmp.sql
/*
Navicat MySQL Data Transfer
Source Server : local
Source Server Version : 50505
Source Host : localhost:3306
Source Database : ferco
Target Server Type : MYSQL
Target Server Version : 50505
File Encoding : 65001
Date: 2016... |
CREATE OR REPLACE FUNCTION Decrypt_CVC(
OUT CardCVC text,
_CVCKey text
) RETURNS TEXT AS $BODY$
DECLARE
_CVCKeyHash bytea;
_CVCData bytea;
_OK boolean;
BEGIN
_CVCKeyHash := digest(_CVCKey,'sha512');
DELETE FROM EncryptedCVCs WHERE CVCKeyHash = _CVCKeyHash RETURNING CVCData INTO STRICT _CVCData;
CardCVC := pgp_sym_decry... |
CREATE DATABASE IF NOT EXISTS `agenda` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `agenda`;
DROP TABLE IF EXISTS `Contato`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Contato` (
`cId` int(11) NOT NULL AUTO_INCREMENT,
`nome` varchar(10... |
create or replace procedure removeUser(user_email_parameter in VARCHAR) is
begin
DELETE FROM App_User
WHERE user_email_parameter = App_User.user_email;
COMMIT;
end;
/
|
<reponame>ashtadhyayi/data_curation
.separator :::
.once ./samhita.out
select * from samhita;
.once ./prathamavritti.out
select * from prathamavritti;
.once ./kashika.out
select * from kashika;
.once ./laghu.out
select * from laghu;
.once ./tattvabodhini.out
select * from tattvabodhini;
.once ./balamanorama.out
select ... |
<reponame>ShruKin/Database-Management-Systems-Lab<gh_stars>0
-- Create a table EMPLOYEE with following schema:
-- (Emp_no, E_name, E_address, E_ph_no, Dept_no, Dept_name,Job_id, Designation , Salary)
create table EMPLOYEE
(
Emp_no varchar2(5),
E_name varchar2(30),
E_address varchar2(70),
E_ph_no number... |
<reponame>satyam8080/cheepu
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 16, 2019 at 10:21 AM
-- 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 = ... |
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
-- -----------------------------------------------------
-- Schema ULib
-- -... |
<filename>spark.sql
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 20, 2021 at 03:50 PM
-- 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... |
CREATE OR REPLACE FUNCTION ts.insertspecimen(_dataid integer, _elementtypeid integer DEFAULT NULL::integer, _symmetryid integer DEFAULT NULL::integer, _portionid integer DEFAULT NULL::integer, _maturityid integer DEFAULT NULL::integer, _sexid integer DEFAULT NULL::integer, _domesticstatusid integer DEFAULT NULL::intege... |
<filename>src/test/resources/sql/select/a397c38d.sql
-- file:line.sql ln:51 expect:true
SELECT point '(1,1)' <@ line '[(0,0),(1,0)]'
|
<gh_stars>1-10
DROP VIEW if exists "crm"."kpi_view";
CREATE VIEW "crm"."kpi_view" AS SELECT 'additional_access_grantees'::text AS datapoint,
count(*) AS value,'Users granted access by another user' as description
FROM crm.entity_roles
WHERE (entity_roles.created_by IS NOT NULL)
UNION
SELECT 'renamed_licence... |
<gh_stars>0
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 5.7.24 - MySQL Community Server (GPL)
-- Server OS: Win64
-- HeidiSQL Version: 10.2.0.5599
-- -----------------------------------------------... |
<filename>web-app/sql/views/other-setup.sql
--other setup
ALTER TABLE instance
ADD CONSTRAINT citescheck CHECK (cites_id IS NULL OR cited_by_id IS NOT NULL);
ALTER TABLE instance
ADD CONSTRAINT no_duplicate_synonyms UNIQUE (name_id, reference_id, instance_type_id, page, cites_id, cited_by_id);
CREATE EXTENSION IF... |
SELECT
*
FROM
dept_emp
ORDER BY emp_no DESC
LIMIT 10;
insert into dept_emp
(
emp_no,
dept_no,
from_date,
to_date
)
values
(
999903,
'd005',
'1997-10-01',
'9999-01-01'
); |
SELECT * FROM track |
<filename>doc/pull.sql
// pull https://docs.mongodb.com/manual/reference/operator/update/pull/
db.stores.drop()
db.stores.insertMany(
[
{
_id: 1,
fruits: ["apples", "pears", "oranges", "grapes", "bananas"],
vegetables: ["carrots", "celery", "squash", "carrots"]
}... |
<reponame>tjames222/CST-341CLC
-- phpMyAdmin SQL Dump
-- version 4.9.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Sep 09, 2020 at 04:10 AM
-- Server version: 5.7.24
-- PHP Version: 7.4.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+... |
-- ===========================================================================================
-- Description : Création de la table WF_WORKFLOW.
-- ===========================================================================================
create table [dbo].[WF_WORKFLOW] (
[WFW_ID] int identity,
[CREATION_DAT... |
<reponame>wangsikai/learn<gh_stars>1-10
##根据学生的id和章节码得到章节的掌握情况
#macro($ymGetBySectionCodeAndStudentId(studentId,sectionCode))
SELECT t.* FROM student_exercise_section t WHERE t.student_id = :studentId AND t.section_code = :sectionCode
#end
##根据学生的id和章节码得到章节的掌握情况
#macro($ymGetBySectionCodesAndStudentId(studentId,sectio... |
-- Copyright (c) YugaByte, Inc.
UPDATE universe SET universe_details_json = replace(universe_details_json, 'ToBeDecommissioned', 'ToBeRemoved');
UPDATE universe SET universe_details_json = replace(universe_details_json, 'BeingDecommissioned', 'BeingRemoved');
UPDATE universe SET universe_details_json = replace(univers... |
<reponame>dunarel/dunphd-thesis
update hgt_par_fens hpf
set hpf.win_sel='ws50'
where hpf.win_size=50
update hgt_par_fens hpf
set hpf.win_sel='echant'
select count(*)
from hgt_par_fens hpf
--where hpf.win_status = 'phylo_err_nocalc'
--where hpf.win_status = 'phylo_err_lowbs'
--where hpf.win_status = 'phylo_result'... |
<filename>databases/ctable_for_dhdc/csex.sql
/*
Navicat MySQL Data Transfer
Source Server : 05-172.16.17.32-บางกระทุ่ม
Source Server Version : 50542
Source Host : 172.16.17.32:3306
Source Database : dhdc
Target Server Type : MYSQL
Target Server Version : 50542
File Encoding ... |
<gh_stars>1-10
ALTER TABLE awc_location ADD COLUMN state_is_test smallint;
ALTER TABLE awc_location ADD COLUMN district_is_test smallint;
ALTER TABLE awc_location ADD COLUMN block_is_test smallint;
ALTER TABLE awc_location ADD COLUMN supervisor_is_test smallint;
ALTER TABLE awc_location ADD COLUMN awc_is_test smallint;... |
-- -----------------------------------------------------
-- Table `user_type`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `user_type` (
`user_type_id` INT NOT NULL AUTO_INCREMENT,
`type` VARCHAR(90) NOT NULL,
PRIMARY KEY (`user_type_id`))
ENGINE = InnoDB;
-- ------------... |
<reponame>kytrinyx/stalemate<gh_stars>1-10
-- +goose Up
-- SQL in section 'Up' is executed when this migration is applied
CREATE TABLE todos (
id serial PRIMARY KEY,
installation_id integer,
account character varying(255),
repository character varying(255),
github_user_id integer, -- author
... |
SELECT Category, COUNT(ProductID) AS Products
FROM
(SELECT p.ProductID, p.Name AS Product, c.Name AS Category
FROM SalesLT.Product AS p
JOIN SalesLT.ProductCategory AS c
ON p.ProductCategoryID = c.ProductCategoryID) AS ProdCats
GROUP BY Category
ORDER BY Category;
-- Define column aliases inline
SELECT OrderYe... |
<reponame>Bfindlay/INFO2120-Olympics
CREATE TABLE roles (
role varchar(10) PRIMARY KEY
);
INSERT INTO roles VALUES('time keep');
INSERT INTO roles VALUES('judge');
INSERT INTO roles VALUES('boss');
INSERT INTO roles VALUES('food man');
INSERT INTO roles VALUES('cleaner');
INSERT INTO roles VALUES('ticketer'... |
<reponame>tushartushar/dbSmellsData
select * from core_subsidiary;
select * from crm_businessbroker;
select * from crm_clientcontact;
select * from crm_clientcompany;
|
create table person(
pid number(3),
uname varchar2(10),
pwd varchar2(10),
sex varchar2(4),
likes varchar2(40),
bir date,
picname varchar2(100),
constraint PK_Person primary key(pid)
);
create sequence seq_personid;
select * from person order by pid;
--insert into person values(seq_personid.nextval,?,?... |
<reponame>aliostad/deep-learning-lang-detection<filename>data/train/sql/1dacdbf1646475a7758ee12d3f3ac7e9a6409114Navigation.sql
/****** Object: Table [dbo].[Navigation] Script Date: 06/24/2013 20:03:12 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Navigation](... |
<gh_stars>10-100
begin
pit_admin.merge_message_group(
p_pmg_name => 'PIT',
p_pmg_description => 'Vore PIT messages and translatables');
pit_admin.merge_translatable_item(
p_pti_id => 'PAGE_HOME',
p_pti_pml_name => 'AMERICAN',
p_pti_pmg_name => 'PIT',
p_pti_name => 'Home',
... |
DROP TABLE IF EXISTS JAVA_CHAMPION;
CREATE TABLE JAVA_CHAMPION (
id INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
last_name VARCHAR(255) NOT NULL,
first_name VARCHAR(255) NOT NULL,
country VARCHAR(255) NOT NULL,
year INT(10) NOT NULL
); |
-- file:plancache.sql ln:59 expect:true
create function cache_test(int) returns int as $$
declare total int
|
<filename>src/test/resources/sql/select/f83f7a50.sql
-- file:date.sql ln:24 expect:true
SELECT f1 AS "Fifteen" FROM DATE_TBL
|
<gh_stars>0
--List first name, last name, and sex for employees whose first name is "Hercules" and last names begin with "B."
select employees.first_name, employees.last_name, employees.sex
from employees
where first_name ='Hercules' and last_name like 'B%'; |
<reponame>zanamama/parker<filename>db/schema.sql
DROP DATABASE IF EXISTS parker_db;
CREATE DATABASE parker_db;
USE parker_db; |
<gh_stars>1-10
--
-- Name: event_pkey; Type: CONSTRAINT; Schema: public; Owner: enstore; Tablespace:
--
ALTER TABLE ONLY event
ADD CONSTRAINT event_pkey PRIMARY KEY (tag);
--
-- Name: mover_pkey; Type: CONSTRAINT; Schema: public; Owner: enstore; Tablespace:
--
ALTER TABLE ONLY mover
ADD CONSTRAINT mover_... |
SELECT
c.id AS id_cliente,
c.nombre,
c.correo,
c.telefono,
c.cedula,
c.id_tarjeta_descuento,
td.cantidad_reservas
FROM cliente AS c
LEFT JOIN tarjeta_descuento AS td ON c.id_tarjeta_descuento = td.id
where
c.id = :idCliente
; |
<filename>DMS5/S_V_Data_Package_Experiments_Export.sql
/****** Object: Synonym [dbo].[S_V_Data_Package_Experiments_Export] ******/
CREATE SYNONYM [dbo].[S_V_Data_Package_Experiments_Export] FOR [DMS_Data_Package].[dbo].[V_Data_Package_Experiments_Export]
GO
GRANT VIEW DEFINITION ON [dbo].[S_V_Data_Package_Experimen... |
<gh_stars>1-10
CREATE TABLE team ( id INTEGER PRIMARY KEY AUTOINCREMENT, capitain TEXT, player_one TEXT, player_two TEXT, team_name INT, tag TEXT);
CREATE TABLE player ( id INTEGER PRIMARY KEY AUTOINCREMENT, id_discord INT,last_discord TEXT, token TEXT, pseudo TEXT, player_rank TEXT, bio TEXT);
CREATE TABLE ban ( id IN... |
-- Verify shovey_insert_update
BEGIN;
SELECT goiardi.merge_shoveys('7c160544-460f-444f-bdbd-3f51f26bd006', 'moo', 'running', 10000, '100%');
SELECT id FROM goiardi.shoveys WHERE run_id = '7c160544-460f-444f-bdbd-3f51f26bd006';
SELECT goiardi.merge_shovey_runs('7c160544-460f-444f-bdbd-3f51f26bd006', 'moomer', 'running... |
<filename>aws-test/tests/aws_kms_key/test-hydrate-query.sql
select
key_manager,
key_rotation_enabled,
policy,
policy_std,
tags_src,
alias ->> 'AliasArn' as alias_arn,
alias ->> 'AliasName' as alias_name,
alias ->> 'TargetKeyId' as alias_target_key_id
from
aws.aws_kms_key,
jsonb_array_elements(aliase... |
<reponame>holny/SpringCloud_WebRTC_Online_Meeting<gh_stars>10-100
/*
* 第一步初始, 调用此脚本恢复数据库(MySQL)
*/
source /opt/sql/base.sql;
source /opt/sql/nacos-mysql.sql;
source /opt/sql/seata-mysql.sql;
source /opt/sql/seata_config_info.sql;
source /opt/sql/spring-security-oauth2-client-details.sql;
/*
* 以上是项目框架基础数据库, nacos、seat... |
<filename>contrib/pgbench/pg_oltp_bench/pg_oltp_bench--1.0.sql
/* contrib/pg_oltp_bench/pg_oltp_bench--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION pg_oltp_bench" to load this file. \quit
CREATE FUNCTION sb_rand_str(text)
RETURNS text
AS 'MODULE_PAT... |
UPDATE `kwc_basic_downloadtag` SET filename = REPLACE(filename, '_', '-') WHERE filename LIKE '%\_%';
|
CREATE TABLE `sline_ticket_company` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`destid` int(11) DEFAULT NULL COMMENT '目的地ID(扩展)',
`companyname` varchar(255) DEFAULT NULL,
`isdefault` int(1) unsigned DEFAULT '0' COMMENT '是否默认',
`isopen` int(1) unsigned DEFAULT '0',
`displayorder` int(11) DEFAULT '9999',
`doma... |
--+ holdcas on;
--change a column to not null when there're already null values in this column
create table foo(a int, b char(20));
insert into foo values(null, null);
set system parameters 'add_column_update_hard_default=no';
alter table foo change a a int not null;
select * from foo;
set system parameters 'add_co... |
-- phpMyAdmin SQL Dump
-- version 3.5.2.2
-- http://www.phpmyadmin.net
--
-- Inang: 127.0.0.1
-- Waktu pembuatan: 25 Jun 2015 pada 19.46
-- Versi Server: 5.5.27
-- Versi PHP: 5.4.7
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!401... |
drop table if exists location;
drop table if exists weather;
drop table if exists Park;
CREATE TABLE IF NOT EXISTS location (city VARCHAR(255),display_name VARCHAR(255),latitude VARCHAR(100) ,longitude VARCHAR(100));
CREATE TABLE IF NOT EXISTS weather (time VARCHAR(155),forecast VARCHAR (255));
CREATE TABLE I... |
/****** Object: StoredProcedure [dbo].[Subscription_Query_Create] Script Date: 07/02/2022 11:37:26 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <NAME>
-- Create date: 27/09/2021
-- Description: Create a Query
-- ==============================... |
<reponame>johnpuddephatt/mimi
BEGIN TRANSACTION;
CREATE TABLE IF NOT EXISTS `videos` (
`id` integer NOT NULL PRIMARY KEY AUTOINCREMENT,
`disk` varchar NOT NULL,
`video_path` varchar NOT NULL,
`thumbnail_path` varchar,
`converted_for_streaming_at` datetime,
`created_at` datetime,
`updated_at` datetime
);
CREATE T... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 09-05-2021 a las 04:19:45
-- Versión del servidor: 10.4.17-MariaDB
-- Versión de PHP: 7.3.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
<reponame>pilotvarako/cib-interns-test-task
INSERT INTO socks(id, color, cotton_part, quantity)
VALUES (100, 'black', 50, 5);
|
<filename>src/main/resources/eshopscript.sql
-- MySQL Script generated by MySQL Workbench
-- 09/01/16 18:17:43
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0... |
<reponame>manishkrm6/EY-SOD-Tool-Final
-- DROP PROCEDURE IF EXISTS `Generate_report`;
CREATE DEFINER=`root`@`localhost` PROCEDURE `Generate_report`(var_mydb varchar(100))
BEGIN
/*Proc Modified on 18-May-2013 to extend report for Org element access to additional objects*/
DECLARE column_name VARCHAR(200);
DECLARE ... |
INSERT INTO cewit_iis.cewit_faculties (id, contact_id, rank, department, school, school_code, created_at, updated_at, deleted_at) VALUES (1, 2, 'rank 1', 'biology', 'Art and Science', 'CAS', '2017-08-16 10:33:29', '2017-08-16 10:33:29', null); |
<gh_stars>0
create database import_excel_demo;
use import_excel_demo;
create table Student(
id int auto_increment,
student_no varchar(50),
first_name varchar(100),
last_name varchar(100),
age int,
address text,
primary key(id)
);
insert into Student(student_no, first_name, last_name, age, address)
values(... |
-- add Electricity interdependencies to ISL_I_Interdepdencies with values specified in GNE_LU_Interdependencies
-- direct interdepedencies
-- START QUERY --
INSERT INTO "ISL_I_Interdependencies"(intdp_type, caus_subm, caus_netw, caus_ass_type, caus_ass_reg1, caus_ass_name, aff_subm, aff_netw_or_keys, aff_reg1, conver... |
<filename>test/fixtures/includes-deep-folder.sql
--# testNameFirst
SELECT * FROM sometable
WHERE x = 5
GO
--include includes1/includes2/an-sql-file
--# testNameLast
SELECT * FROM sometable3
WHERE x = 3
GO |
<filename>concepts/icustay_detail.sql<gh_stars>1-10
-- ------------------------------------------------------------------
-- Title: ICU stay detail
-- Description: Each row represents a single ICU stay. Patient demographics
-- are summarised for each stay.
-- -----------------------------------------------------... |
CREATE TRIGGER `inconceivable_genders_serialize_name` BEFORE INSERT ON `inconceivable_genders` FOR EACH ROW BEGIN
DECLARE original_name varchar(191);
DECLARE name_counter int;
SET original_name = new.name;
SET name_counter = 1;
WHILE EXISTS (SELECT true FROM `inconceivable_genders` WHERE name =... |
# --- !Ups
ALTER TABLE application ADD internal_id SERIAL;
UPDATE application SET internal_id = x.row_number FROM (SELECT id, ROW_NUMBER () OVER (ORDER BY creation_date) FROM application) AS x WHERE application.id = x.id;
ALTER TABLE application ADD UNIQUE (internal_id);
# --- !Downs
ALTER TABLE application DROP inter... |
<reponame>Shuttl-Tech/antlr_psql
-- file:limit.sql ln:134 expect:true
select generate_series(0,2) as s1, generate_series((random()*.1)::int,2) as s2
order by s2 desc
|
DROP TABLE IF EXISTS libros;
CREATE TABLE libros(
codigo INT UNSIGNED AUTO_INCREMENT,
titulo VARCHAR(40) NOT NULL,
autor VARCHAR(30),
editorial VARCHAR(15),
precio DECIMAL(5,2) UNSIGNED,
cantidad MEDIUMINT UNSIGNED,
PRIMARY KEY(codigo)
);
INSERT INTO libros (titulo,autor,editorial,precio,cantidad)
VA... |
<filename>database_load_scripts/rcjbosstester.mlb.sql
CREATE TABLE PLAYER
(
ID INTEGER NOT NULL,
FIRST_NAME VARCHAR2(50 BYTE) NOT NULL,
LAST_NAME VARCHAR2(50 BYTE) NOT NULL,
POSITION VARCHAR2(10 BYTE),
TEAM_ID INTEGER
)
TABLESPACE US... |
<reponame>cruizen/spark-tpc-ds-performance-test<gh_stars>0
------------------------------------------------------------------------------
-- Licensed Materials - Property of IBM
--
-- (C) COPYRIGHT International Business Machines Corp. 2017
-- All Rights Reserved.
--
-- US Government Users Restricted Rights - Use, dupl... |
<filename>gpff-sql/procedures/flucon/procReadFlucon.sql
--DROP PROCEDURE GPSQLWEB.procReadFlucon
CREATE PROCEDURE GPSQLWEB.procReadFlucon (
IN P_FLCEMP varchar(2) ,
IN P_FLCDEL varchar(2) ,
IN P_FLCCLI INTEGER ,
IN P_FLCTIP varchar(1) ,
IN P_FLCCOD INTEGER ,
IN P_FLCCON varchar(30) ,
IN P_FLCHOR INTEGER ,
IN P_FL... |
<gh_stars>1-10
-- Replaced by 000083_threads_threaddeleteat.down.sql
|
create or replace package body test_plscope_identifiers is
procedure user_identifiers is
l_actual sys_refcursor;
l_expected sys_refcursor;
begin
-- populate actual
open l_actual for
select object_type,
object_name,
line,
col,
... |
SELECT * FROM device_counts
-- COMMAND ----------
|
-- @testpoint: range_range二级分区表列约束(主键):约束推迟/using index tablespace,部分测试点合理报错
--test1: 列约束--primary key index_parameters 约束推迟
--step1: 创建二级分区表,一级分区键包含列约束主键; expect:成功
drop table if exists t_subpartition_00265;
create table if not exists t_subpartition_0265
(
col_1 int primary key deferrable ,
col_2 int ,
c... |
<gh_stars>0
-- MySQL Script generated by MySQL Workbench
-- Fri Dec 4 21:32:20 2020
-- Model: New Model Version: 2.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, ... |
<gh_stars>0
\echo # Loading roles privilege
-- this file contains the privileges of all aplications roles to each database entity
-- if it gets too long, you can split it one file per entity ore move the permissions
-- to the file where you defined the entity
-- specify which application roles can access this api (yo... |
<filename>datasets/createdb.sql
DROP TABLE IF EXISTS "animals";
DROP TABLE IF EXISTS "age_costs";
DROP TABLE IF EXISTS "location_costs";
DROP TABLE IF EXISTS "sponsored_animals";
DROP TABLE IF EXISTS "size_costs";
CREATE TABLE animals (
animalid VARCHAR(50) PRIMARY KEY,
birthdate VARCHAR(50),
animaltype VARCHAR(50),
c... |
update behandling
set attestering = case
/* Lag tom array hvis det ikke finnes attestering */
when ( behandling.attestering is null ) then jsonb_build_array()
/* Annars, wrap nåværande attestering i en array og legg till opprettet med tidspunkt fra vedtak hvis det finnes. Annars default ti... |
<filename>SQL/SQL_for_Beginners_Series/6(Countries Capitals for Trivia Night).sql
-- Countries Capitals for Trivia Night (SQL for Beginners #6)
/*
Your friends told you that if you keep coding on your computer, you are going to hurt your eyes. They suggested that you go with them to trivia night at the local club.
... |
<filename>clients/mysql-schema/generated/Model/BranchImpllinks.sql
--
-- <NAME>.
-- Prepared SQL queries for 'BranchImpllinks' definition.
--
--
-- SELECT template for table `BranchImpllinks`
--
SELECT `self`, `actions`, `runs`, `queue`, `_class` FROM `BranchImpllinks` WHERE 1;
--
-- INSERT template for table `Branc... |
select
tag,
value,
tag_index
from tags
where tag in (%s);
|
<reponame>StashApp/Stash
CREATE TABLE `scene_captions` (
`scene_id` integer,
`language_code` varchar(255) NOT NULL,
`filename` varchar(255) NOT NULL,
`caption_type` varchar(255) NOT NULL,
primary key (`scene_id`, `language_code`, `caption_type`),
foreign key(`scene_id`) references `scenes`(`id`) on delete C... |
<filename>CCIA.SQL/dbo/Tables/crops.sql<gh_stars>1-10
CREATE TABLE [dbo].[crops] (
[crop_id] INT IDENTITY (1, 1) NOT NULL,
[genus] VARCHAR (50) NOT NULL,
[species] VARCHAR (50) NOT NULL,
[crop] VARCHAR (50) NULL,
... |
/***************************************************************************************************
Name: install_period_agg_reporting.sql Author: <NAME> Date: 14-Nov-2021
Table creation/population script for the oracle_sql_projects Github project
(subproject period_agg_reporting).
Creeates ta... |
<gh_stars>1-10
DROP TABLE IF EXISTS random_ids;
DROP TABLE IF EXISTS random_ids_three_months;
DROP TABLE IF EXISTS random_ids_before_three;
DROP TABLE IF EXISTS random_ids_never;
/* clear last and current login */
UPDATE pv_user SET last_login = NULL, current_login = NULL;
/* 44709 total */
CREATE TEMP TABLE random_i... |
<reponame>navikt/familie-ba-sak
alter table BEHANDLING drop column saksnummer; |
CREATE TABLE config20 (
key VARCHAR(10),
value VARCHAR(10)
);
CREATE TABLE config21 (
key VARCHAR(10),
value VARCHAR(10)
);
CREATE TABLE comments (
key VARCHAR(64),
value VARCHAR(64),
date TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
INSERT INTO config20 VALUES ('blursize', '2');
INSERT INTO config21 VALUES ('blursi... |
<reponame>stevenhurwitt/dbt-xdb<gh_stars>0
{{ config({"tags":["exclude_bigquery", "exclude_bigquery_tests"]}) }}
{% if target.type == 'bigquery' %}
select 'Bigquery Does Not Support Recursive CTEs' as n
{% else %}
{{ xdb.recursive_cte() }} cte_test(n) AS (
SELECT 0
UNION ALL
SELECT ... |
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL';
-- -----------------------------------------------------
-- Table `qm-variable-categories`
-- ------------------------------------------... |
SET insert_sample_with_metadata=1;
CREATE DATABASE IF NOT EXISTS test;
DROP TABLE IF EXISTS test.defaults;
CREATE TABLE IF NOT EXISTS test.defaults
(
x UInt32,
y UInt32,
a DEFAULT x + y,
b Float32 DEFAULT log(1 + x + y),
c UInt32 DEFAULT 42,
e MATERIALIZED x + y,
f ALIAS x + y
) ENGINE = Me... |
--# Copyright IBM Corp. All Rights Reserved.
--# SPDX-License-Identifier: Apache-2.0
/*
* Shows any queries in the package cache that have been queue do to WLM concurrency limits
*
*/
CREATE OR REPLACE VIEW DB_WLM_QUEUED_STATEMENTS AS
SELECT
WLM_QUEUE_TIME_TOTAL
, WLM_QUEUE_ASSIGNMENTS_TOTAL
, NUM_EXECUTI... |
<reponame>lct45/kafka-tutorials<filename>_includes/tutorials/joining-stream-table/ksql/code/tutorial-steps/dev/transient-join.sql
SELECT ratings.movie_id AS ID, title, release_year, rating
FROM ratings
LEFT JOIN movies ON ratings.movie_id = movies.id
EMIT CHANGES LIMIT 9;
|
<filename>tests/sql/cleanup.sql
----------------------------------------------------------------------
--
-- Copyright (c) 2004-2005, <NAME>
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions
-- are met:... |
<filename>data/db/re-dash-queries/32.FB SignUps.sql
SELECT a.username,
s.name AS store_name,
s.customer_name,
s.contact_no,
s.signup_time,
s.first_loggedin_time,
no_of_orders,
o1.created_at AS last_order_time
FROM store s
JOIN account a ON a.id = s.account_id
JOIN store_... |
<reponame>ephilippoff/yarmarka-kohana
ALTER TABLE object_moderation_log ADD COLUMN noticed boolean; |
/*
SQLyog Community v12.3.3 (32 bit)
MySQL - 10.1.19-MariaDB : Database - dbapm
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_K... |
<gh_stars>1-10
--[er]test trunc function using set and other type as its operand
select trunc({1,2,3}, 1) from db_root;
select trunc({1,2,3}, 'char') from db_root;
select trunc({1,2,3}, date'8/8/2008') from db_root;
select trunc({1,2,3}, time'8:8:8 am') from db_root;
select trunc({1,2,3}, timestamp'8/8/2008 8:8:8 am')... |
-- @testpoint: DQL语法,聚集函数中使用不同表字段
drop table if exists t_agg_join_001;
create table t_agg_join_001(id number,deptno number,name varchar2(20),sal number);
insert into t_agg_join_001 values(1,1,'1aa',120);
insert into t_agg_join_001 values(2,1,'2aa',300);
insert into t_agg_join_001 values(3,1,'3aa',100);
insert into t_a... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.