sql
stringlengths
6
1.05M
 CREATE view vwBranchMap as select bm.id, bm.branch_id, bm.incident_type incident_type_id, eit.name incident_type, bm.receive_voucher, bm.title, bm.start_hour, bm.start_minute, bm.end_hour, bm.end_minute, bm.base_description, isnull(( select bms.*, wdn.abre...
/* * METODO QUE LO LLAMA: verifyBusinessIsContact */ DROP PROCEDURE IF EXISTS `SP_INS_USER_BUS_CONTACT`; DELIMITER $$ CREATE DEFINER=`root`@`localhost` PROCEDURE `SP_INS_USER_BUS_CONTACT`(IN `i_user_id` INT UNSIGNED, IN `i_contact_id` INT UNSIGNED, IN `i_created` INT...
USE vibe16; SET NAMES utf8; -- -- Table Content -- DROP TABLE IF EXISTS oophp_Content; CREATE TABLE oophp_Content ( `id` INTEGER PRIMARY KEY AUTO_INCREMENT NOT NULL, `content` TEXT, `html` TEXT, `type` VARCHAR(200) NOT NULL, `created` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, `updated` TIMESTAMP DE...
-- phpMyAdmin SQL Dump -- version 3.4.11.1deb1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Apr 01, 2015 at 01:10 AM -- Server version: 5.5.35 -- PHP Version: 5.4.6-1ubuntu1.5 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_...
INSERT INTO `ams` (`id`,`AM_BIRTHDATE`,`AM_REGISTRATION_DATE`,`AM_BODY_NUMBER`,`AM_ENGINE_NUMBER`,`AM_COLOR`,`AM_REG_NUMBER`,`AM_TECHPASSPORT_NUMBER`,`driverId`,`markId`,`jackedCarId`) VALUES (1,"2017-07-13 04:09:47","2018-09-11 01:26:38","74BFCFA4-A50F-8FDC-4790-AE39DF222CFF","370C7F69-9D04-D44F-0D5F-47955A4FE26F","RE...
DECLARE some_cursor CURSOR FOR SELECT * FROM FOO FETCH NEXT FROM some_cursor;
CREATE TABLE Account( id serial PRIMARY KEY, name VARCHAR (50) NOT NULL, username VARCHAR (50) UNIQUE NOT NULL, passwordhash VARCHAR (64) NOT NULL ); CREATE TABLE Tournament( id serial PRIMARY KEY, account_id INTEGER, name VARCHAR (50) NOT NULL, created DATE NOT NULL, active BOOLE...
-- SQL > Advanced Select > Occupations -- Pivot the Occupation column so the Name of each person in OCCUPATIONS is displayed underneath their respective Occupation. -- -- https://www.hackerrank.com/challenges/occupations/problem -- https://www.hackerrank.com/contests/simply-sql/challenges/occupations -- challenge id: 1...
<gh_stars>0 Create Schema [VMS]
-- +migrate Up CREATE TABLE "account" ( "id" NUMBER GENERATED BY DEFAULT ON NULL AS IDENTITY, "subject" VARCHAR2(256) NOT NULL, "email" VARCHAR2(256) NOT NULL, "created_date" TIMESTAMP DEFAULT CURRENT_TIMESTAMP, "changed_date" TIMESTAMP DEFAULT CURRENT_TIMESTA...
<reponame>Krishnanand03/milk-calendar<filename>milk.sql<gh_stars>1-10 -- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: sql102.byethost33.com -- Generation Time: May 07, 2021 at 01:40 AM -- Server version: 5.6.48-88.0 -- PHP Version: 7.2.22 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET...
CREATE PROCEDURE SP334(OUT MYCOUNT INTEGER) SPECIFIC SP334_91632 LANGUAGE SQL NOT DETERMINISTIC READS SQL DATA NEW SAVEPOINT LEVEL BEGIN ATOMIC DECLARE MYVAR INT;SELECT COUNT(*)INTO MYCOUNT FROM TABLE227;SELECT COUNT(*)INTO MYCOUNT FROM TABLE163;SELECT COUNT(*)INTO MYCOUNT FROM TABLE168;SELECT COUNT(*)INTO MYCOUNT FROM...
-- -- period.sql -- SQL install script for the PERIOD data type. -- -- Portions Copyright (c) 2007-2008, <NAME> <<EMAIL>> -- -- Adjust this setting to control where the objects get created. SET search_path = public; CREATE TYPE period; CREATE OR REPLACE FUNCTION period_in(cstring) RETURNS period LANGUAGE C IMMUTAB...
-- MySQL dump 10.13 Distrib 5.7.21, for Linux (x86_64) -- -- Host: localhost Database: busCompany -- ------------------------------------------------------ -- Server version 5.7.21-0ubuntu0.16.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER...
<reponame>ViktorAleksandrov/SoftUni--CSharp-DB-Fundamentals CREATE FUNCTION ufn_IsWordComprised (@setOfLetters VARCHAR(MAX), @word VARCHAR(MAX)) RETURNS BIT AS BEGIN DECLARE @currentIndex INT = 1; DECLARE @currentChar CHAR; WHILE (@currentIndex <= LEN(@word)) BEGIN SET @currentChar = SUBSTRING(@word, @currentInd...
<reponame>kostadinlambov/Trading-Bot create table roles ( id varchar(255) not null, authority varchar(255) not null, primary key (id) ); create table users ( id varchar(255) not null, is_account_non_expired BOOLEAN DEFAULT TRUE not null, is_account_non...
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: 1172.16.31.10 -- Generation Time: Dec 24, 2021 at 11:44 AM -- Server version: 10.4.19-MariaDB -- PHP Version: 7.3.28 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_...
INSERT INTO department (name) VALUES ('Human Resources'); INSERT INTO department (name) VALUES ('IT'); INSERT INTO department (name) VALUES ('Administration'); INSERT INTO department (name) VALUES ('Software Development'); INSERT INTO department (name) VALUES ('Marketing'); INSERT INTO department (name) VALUES ('Sales'...
<reponame>Exus1/yourCloud -- phpMyAdmin SQL Dump -- version 4.7.1 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Jun 22, 2017 at 06:03 PM -- Server version: 5.7.18 -- PHP Version: 7.1.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; ...
DROP DATABASE IF EXISTS passport_demo; -- Creates the "database" database -- CREATE DATABASE passport_demo;
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server version: 10.4.11-MariaDB - mariadb.org binary distribution -- Server OS: Win64 -- HeidiSQL Version: 11.0.0.5919 -- -----------------------------------------------...
--############################################################################# --############################################################################# --## HRA-VCCF Create Tables --## Date: February 26, 2022 --## Database: Microsoft SQL Server --## Author: <NAME>, MD, PhD (<EMAIL>) --####################...
<filename>queries/role/add.sql INSERT INTO Role ( title, salary, department_id ) VALUES ( @title, @salary, @department_id )
<filename>bp2/vjezbe_video/bp2_vj07_zadatak05.sql USE NORTHWND CREATE PROCEDURE usp_OrderDetails_Insert ( @OrderId INT, @ProductID INT, @UnitPrice MONEY, @Quantity SMALLINT, @Discount REAL ) AS BEGIN INSERT INTO [Order Details] VALUES (@OrderId, @ProductID, @UnitPrice, @Quantity, @Discount) UPDATE Products S...
SELECT c.nome_cliente, e.total FROM cliente c JOIN devedor d ON c.cod_cliente = d.cod_cliente JOIN emprestimo e ON d.numero_emprestimo = e.numero_emprestimo WHERE c.cod_cliente IN (SELECT cod_cliente FROM devedor d JOIN emprestimo e ON d.numero_emprestimo = e.nu...
<reponame>lokijota/datadrivenastronomymooc select kepler_id, t_eff from Star where t_eff between 5000 and 6000
<filename>actor-persist/src/main/resources/sql/migration/V25__CreateFileBlocks.sql CREATE TABLE file_blocks ( file_id bigint NOT NULL, offset_ bigint NOT NULL, length bigint NOT NULL, PRIMARY KEY (file_id, offset_, length) );
-- Automatically generated, do not edit. \unset ON_ERROR_STOP SET search_path = 'cover_art_archive'; DROP TRIGGER IF EXISTS reptg_art_type ON art_type; DROP TRIGGER IF EXISTS reptg_cover_art ON cover_art; DROP TRIGGER IF EXISTS reptg_cover_art_type ON cover_art_type; DROP TRIGGER IF EXISTS reptg_image_type ON image_t...
<filename>src/test/resources/incrvacuum.test_39.sql -- incrvacuum.test -- -- execsql { -- INSERT INTO tbl2 SELECT * FROM tbl1; -- COMMIT; -- DROP TABLE tbl1; -- } INSERT INTO tbl2 SELECT * FROM tbl1; COMMIT; DROP TABLE tbl1;
--! Previous: sha1:e6c42d434282b7130c5c634ab4911d6a0dbbd444 --! Hash: sha1:cf46185fd1304571d740132706d36bcf936ccdf5 --! split: 1-current.sql -- Enter migration here grant select on app_public.category to :DATABASE_VISITOR
<reponame>cse-library/koha -- Item restrict access status associated with items.restricted. -- DELETE FROM authorised_values WHERE category='RESTRICTED'; -- restricted status of an item, linked to items.restricted INSERT INTO `authorised_values` (`category`, `authorised_value`, `lib`) VALUES ('RESTRICTED','1','досту...
-- -- Copyright (C) 2013 <NAME> <j.atienza at har.mrc.ac.uk> -- -- MEDICAL RESEARCH COUNCIL UK MRC -- -- Harwell Mammalian Genetics Unit -- -- http://www.har.mrc.ac.uk -- -- 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...
\c stock_db drop FUNCTION FN_IS_VALID_SESSION(int4, text); CREATE OR REPLACE FUNCTION FN_GET_SESSION_DATA(token text) RETURNS TABLE (is_valid_session int4, worker_id int4) AS $$ DECLARE is_valid_var int4 := 1; worker_id_var int4; BEGIN SELECT t.fk_worker INTO worker_id_var FROM t_tokens WHERE acces...
Use hospital; create Table StaffDetails( Staff_id int primary key auto_increment, Staff_Designation varchar(50) not null, Staff_Name varchar(200) not null, Staff_Age int not null, Staff_Email varchar(100) unique, Staff_Gender varchar(15) not null, Staff_Phoneno varchar(14) not null unique, Staff_Address varchar(200) ...
<gh_stars>0 /* Marketing campaign for active parents Population is parents Experiment id is 821192b5-4a3e-4c7c-a3d6-0cde36327f7f */ DROP TABLE if exists ab_platform.experiment_populations_alicanto_marketing_camp_active_parents_temp cascade; create table ab_platform.experiment_populations_alicanto_marketing_cam...
/* Navicat Premium Data Transfer Source Server : yao Source Server Type : MySQL Source Server Version : 80015 Source Host : localhost:3306 Source Schema : guli_wms Target Server Type : MySQL Target Server Version : 80015 File Encoding : 65001 Date: 24/08/2020 23:19:4...
<gh_stars>0 ALTER TABLE alldata add q24 smallint; ALTER TABLE alldata add p24 smallint; ALTER TABLE alldata add t24 smallint; ALTER TABLE alldata add ccg smallint; ALTER TABLE alldata add ppo smallint; ALTER TABLE alldata add pco char(1); ALTER TABLE alldata add cvs smallint;
<reponame>Warglaive/Database-Basics-MS-SQL-May-2018<filename>Database Programmability and Transactions/Database Programmability and Transactions/05. Salary Level Function.sql CREATE FUNCTION ufn_GetSalaryLevel(@salary DECIMAL(18,4)) RETURNS VARCHAR(10) AS BEGIN DECLARE @result VARCHAR(10); IF(@salary < 30000) BEGI...
<filename>IbaMonitoring.SQL/Security/iba_admin_1.sql CREATE LOGIN [iba_admin] WITH PASSWORD = N'<PASSWORD>', DEFAULT_DATABASE = [IBA], DEFAULT_LANGUAGE = [us_english], CHECK_POLICY = OFF;
<reponame>rbkmoney/payouter ALTER TABLE sht.payment ADD COLUMN inn CHARACTER VARYING;
<reponame>y-ok/gsp-dba-maven-plugin CREATE TABLE TYPETEST ( TYPE1 BIGINT, TYPE2 BIGSERIAL, TYPE4 BOOL, TYPE6 CHAR(10), TYPE7 DATE, TYPE8 FLOAT8, TYPE9 INTEGER, TYPE10 NUMERIC(10,2), TYPE11 REAL, TYPE12 SERIAL, TYPE13 SMALLINT, TYPE14 TEXT, TYPE15 TIMESTAMP(20), TYPE16 VARCHAR(10) ); COMMENT ...
<filename>src/gateway/sql/static/ansi/push_channels/delete_stale.sql<gh_stars>1-10 DELETE FROM push_channels WHERE push_channels.expires < ?;
<reponame>yunyexiangfeng/SpringLearning<filename>hibernate_user_guide/src/test/java/com/oct/chap4/schema-generation.sql create sequence book_sequence start with 1 increment by 1
<reponame>mpuening/learn-jpa-hibernate<filename>learn-jpa-hibernate-mapped-super-class/src/main/resources/data.sql -- No sales on the weekends insert into dim_date(id, fiscal_date) values (1, '2020-01-06'); insert into dim_date(id, fiscal_date) values (2, '2020-01-07'); insert into dim_date(id, fiscal_date) values...
BEGIN; DROP TABLE IF EXISTS locations CASCADE; DROP TABLE IF EXISTS nodes CASCADE; COMMIT;
<filename>migrations/2019-02-12-200540_track_version_published_by_email/down.sql DROP TABLE versions_published_by;
<reponame>marcoalaura/registro-comercio-backend -- ambito_accion NO SE ENCONTRO -- fecha_habilitacion NO SE ENCONTRO DEFAULT = fecha_creacion -- fecha_ultima_actualizacion EN BASE A QUE SE PUEDE MEDIR ESTO? -- cod_tipo_unidad_economica NO SE TIENE DEFECTO AA -- mes_cierre_gestion se puso a nullable porque hay muchos nu...
ALTER TABLE `queue` ADD COLUMN (`tester_pid` int(10) unsigned NULL, `source_id` int(10) unsigned NULL, `source_data` varchar(255) NULL, `fake_parent_glue` text NULL); ALTER TABLE `tests` ADD COLUMN (`source_id` int(10) unsigned NULL, `source_data` varchar(255) NULL); CREATE TABLE I...
-- @testpoint:opengauss关键字account(非保留),作为函数名 --关键字不带引号-成功 drop function if exists account; create function account(i integer) returns integer as $$ begin return i+1; end; $$ language plpgsql; / --清理环境 drop function account; --关键字带双引号-成功 drop function if exists "account"; create function "account"(i integer) retur...
<gh_stars>0 -- @testpoint: 修改索引字段类型和长度查看索引 --建普通表 DROP TABLE if EXISTS test_index_table_187 CASCADE; create table test_index_table_187( c_int int); drop index if exists index_187_01; create index index_187_01 on test_index_table_187(c_int) ; select relname from pg_class where relname like 'index_187_%'; explain sele...
<gh_stars>0 -- $Id$ -- -- MySQL dump 8.22 -- -- Host: venus.bnbt.de Database: chofmann --------------------------------------------------------- -- Server version 3.23.54 -- -- Table structure for table 'Dates' -- CREATE TABLE Dates ( EntryID int(10) unsigned NOT NULL auto_increment, Date date NOT NULL default...
create table posts ( id serial primary key, content text, author varchar(255) );
<reponame>Lonelyman6666/tugas-akhir -- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 24, 2021 at 09:10 AM -- Server version: 10.4.17-MariaDB -- PHP Version: 7.4.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; ...
<gh_stars>0 INSERT INTO Responses (questionnaire_id, question_id, answer_id, user_input, user_id) VALUES
-- USING INNER JOIN SELECT c.company_code, founder, COUNT(DISTINCT lead_manager_code), COUNT(DISTINCT senior_manager_code), COUNT( DISTINCT manager_code), COUNT(DISTINCT employee_code) FROM EMPLOYEE e INNER JOIN company c on c.company_code = e.company_code group by company_code,founder ORDER BY e.co...
<gh_stars>0 create definer = root@localhost procedure getIssueById(IN id_in int) begin select * from `issues` where id = id_in; end;
SET standard_conforming_strings = OFF; CREATE SCHEMA "public"; DROP TABLE IF EXISTS "public"."small_polygon_treatment_4326.geo" CASCADE; DELETE FROM geometry_columns WHERE f_table_name = 'small_polygon_treatment_4326.geo' AND f_table_schema = 'public'; BEGIN; CREATE TABLE "public"."small_polygon_treatment_4326.geo" ( "...
DROP TABLE IF EXISTS transaction_history CASCADE; create table transaction_history( sequence_number integer not null primary key, time timestamptz not null DEFAULT CURRENT_TIMESTAMP(3), entity varchar(255) not null, operation operation_type not null, txid integer ); create index on transaction_history(entity...
-- Revert procedures/verify_membership from pg BEGIN; DROP FUNCTION verify_membership; COMMIT;
-- AlterTable ALTER TABLE "Domain" ALTER COLUMN "lastPortScan" DROP NOT NULL, ALTER COLUMN "lastPortScan" DROP DEFAULT, ALTER COLUMN "lastDomainEnumeration" DROP NOT NULL, ALTER COLUMN "lastDomainEnumeration" DROP DEFAULT; UPDATE "Domain" SET "lastPortScan" = NULL, "lastDomainEnumeration" = NULL;
<filename>backend/migrations/20190722193937-create-tag-event-map.sql -- +migrate Up CREATE TABLE tag_event_map ( tag_id INT NOT NULL, event_id INT NOT NULL, created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, updated_at TIMESTAMP, PRIMARY KEY (tag_id, event_id), FOREIGN KEY (tag_id) REFERENCES tags(id)...
/* 27-01-2022 PPh Lexical innovation protoforms for semantic tagging * - Tag ones with highest reflex count first * - Try to introduce some measure of geographical / subgroup distribution too, * either in this query or with Python or R scripting. But I can do this * with the full sheet, this one is just for the...
DROP TABLE IF EXISTS USER; DROP TABLE IF EXISTS WORD; DROP TABLE IF EXISTS ASSOCIATION; DROP TABLE IF EXISTS VERIFICATION_TOKEN; CREATE TABLE USER ( id INT AUTO_INCREMENT PRIMARY KEY, first_name VARCHAR(250) NOT NULL, last_name VARCHAR(250) NOT NULL, mail_address VARCHAR(250) NOT NULL, password VARCHAR(250)...
<reponame>gabrielmdsantos/LMSBD Create table Usuario ( ID int identity not null, Login varchar(30) not null, senha varchar(30) not null, DtExpiracao date not null default ('1900/01/01') , CONSTRAINT PK_Usuario primary key (ID), CONSTRAINT UQ_login unique (Login) ); CREATE TABLE COORDENADOR( ID INT IDENTITY ...
/* Navicat MySQL Data Transfer Source Server : 本地 Source Server Version : 50553 Source Host : localhost:3306 Source Database : zero Target Server Type : MYSQL Target Server Version : 50553 File Encoding : 65001 Date: 2019-04-10 10:52:53 */ SET FOREIGN_KEY_CHECKS=0; ...
UPDATE system_auths SET tenant_id='00000000-0000-0000-0000-000000000000' WHERE tenant_id IS NULL; ALTER TABLE system_auths DROP CONSTRAINT tenantCheck; ALTER TABLE system_auths ALTER COLUMN tenant_id SET NOT NULL;
<gh_stars>10-100 library Example.RelatedContextRetrieve version '0.1.0' using QDM version '5.5' /* Consider the example of a "mother-infant" measure that requires data from both a mother and the infant. If we think about the measure as written from the infants perspective, then we need some way to be able to a...
<reponame>WeilerWebServices/PostgreSQL CREATE EXTENSION sslinfo SCHEMA test_extension_schema VERSION "1.0";
SET client_min_messages = warning; CREATE EXTENSION IF NOT EXISTS vector; CREATE TABLE t (val vector(3)); INSERT INTO t (val) VALUES ('[0,0,0]'), ('[1,2,3]'), ('[1,1,1]'), (NULL); CREATE TABLE t2 (val vector(3)); \copy t TO '/tmp/data.bin' WITH (FORMAT binary) \copy t2 FROM '/tmp/data.bin' WITH (FORMAT binary) SELE...
delete from delivery_trip_detail; delete from delivery_trip;
-- phpMyAdmin SQL Dump -- version 4.5.4.1deb2ubuntu2.1 -- http://www.phpmyadmin.net -- -- Client : localhost -- Généré le : Ven 14 Septembre 2018 à 10:53 -- Version du serveur : 5.7.23-0ubuntu0.16.04.1 -- Version de PHP : 7.0.30-0ubuntu0.16.04.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /...
/* Navicat Premium Data Transfer Source Server : localhost_3306 Source Server Type : MySQL Source Server Version : 80013 Source Host : localhost:3306 Source Schema : jeccgboot Target Server Type : MySQL Target Server Version : 80013 File Encoding : 65001 Date: 13/07/...
-- MySQL dump 10.13 Distrib 8.0.25, for Win64 (x86_64) -- -- Host: localhost Database: bikemania -- ------------------------------------------------------ -- Server version 8.0.25 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /...
<gh_stars>0 -- $$mskey$$ /^[0-9]+$/ -- $$logon_alias_attr$$ /^\w+$/ -- $$sam_account_attr$$ /^\w+$/ DECLARE @mskey INT; DECLARE @logon_alias_attr NVARCHAR(255); DECLARE @sam_account_attr NVARCHAR(255); SET @mskey = $$mskey$$; SET @logon_alias_attr = '$$logon_alias_attr$$'; SET @sam_account_attr = '$$sam_account_attr$...
DEFINE RECORD CDD$TOP.PO.PO_ORDERSLINE DESCRIPTION IS /*PO Subline Journal File*/. PO_ORDERSLINE_CDD STRUCTURE. /* Element = PO Description = Purchase order number */ PO DATATYPE IS TEXT SIZE IS 10. /* Element = LINE Description = Line */ ...
/********************************************************************************************************************* ** ** Procedure Name : h3giAddOnGetAddOns ** Author : ** Date Created : ** ******************************************************************************...
<gh_stars>1-10 --Bed Counts Per Hospital Compared to Previous Week select a.*, b.beds_used as prev_beds_used, b.total_beds as prev_total_beds, b.suspected_cases as prev_suspected_cases from ( select hospital_pk, hospital_name, hospital_capacity.state, lat,lon, inpatient_beds_used_7_day_sum as beds_u...
<filename>src/test/resources/randexpr1.test_783.sql -- randexpr1.test -- -- db eval {SELECT (d+f*t1.c-t1.e+coalesce((select c from t1 where c>=a),case when (c in (select e from t1 union select 13 from t1)) then 11+a else f end))-13 FROM t1 WHERE c not between c and b+coalesce((select c from t1 where t1.d<case when 13 ...
-- randexpr1.test -- -- db eval {SELECT d+~e-case when exists(select 1 from t1 where -a in (select max( -(select -count(*)-min(e)++cast(avg(case when d in (select +max(c) from t1 union select ((count(distinct (e)))) from t1) then (c) when t1.c<e then 13 else t1.f end) AS integer) from t1)++case 19 when a*t1.e then (...
<filename>src/TestDb/dbo/Stored Procedures/ProcWithCamelCaseColNames.sql CREATE PROCEDURE [dbo].[ProcWithCamelCaseColNames] AS SELECT * FROM CamelCaseColNames
<filename>packages/eba_stds_filter2_fw.pks create or replace package eba_stds_filter2_fw as -- Procedure: reset_collection -- Clears the collections if they exist. procedure reset_collection( p_collection in varchar2 default 'APEX_FILTER_'||v('APP_ID')||'_'||v('APP_PAGE_I...
<reponame>gaybro8777/usaspending-api -- Add in recipient location county and city info. update temp_load_subawards_subaward set recipient_location_county_code = ccl.county_code, recipient_location_county_name = ccl.county_name, recipient_location_city_code = ccl.city_code from temp_load_subawar...
<reponame>LeeBaekHaeng/god.com390 SELECT A.USER_ID, A.USER_NM, A.USER_SE, B.IP_INFO, B.DPLCT_PERM_AT, B.LMTT_AT, B.LAST_UPDUSR_ID, B.LAST_UPDT_PNTTM, IF(B.EMPLYR_ID IS NULL, 'N', 'Y') AS REG_YN FROM COMVNUSERMASTER A LEFT OUTER JOIN COMTNLOGINPOLICY B ON A.USER_ID = B.EMPLYR_ID WHERE 1 = 1 LIMIT 10 OFFSET...
<reponame>ytoren/sql-code WITH orders AS ( SELECT * FROM (VALUES (1001, 95, CAST('2021-01-01 10:00:00' AS TIMESTAMP), CAST('2021-01-10 10:00:00' AS TIMESTAMP), 'mobile', 10.45), (1001, 96, CAST('2021-01-01 15:00:00' AS TIMESTAMP), CAST('2021-01-10 10:00:00' AS TIMESTAMP), 'mobile', 9.64), ...
<filename>roles/ldsm-database/files/demo/sql/V1_0__Create.sql CREATE TABLE demo ( id character varying(128) NOT NULL, vol1 numeric, vol2 numeric, vol3 numeric, CONSTRAINT pk_demo PRIMARY KEY (id) ) WITH ( OIDS=FALSE );
CREATE TABLE `mdl_elp_quiz_attempt_export` ( `id` bigint(10) NOT NULL AUTO_INCREMENT, `attemptid` bigint(10) NOT NULL, `quiz` bigint(10) DEFAULT NULL, `userid` bigint(10) DEFAULT NULL, `attempt` mediumint(6) DEFAULT NULL, `slot` bigint(10) DEFAULT NULL, `questionid` bigint(10) DEFAULT NULL, `answer` lon...
{% macro get_version_columns() %} {% set columns = [ {"name": "_fivetran_synced", "datatype": dbt_utils.type_timestamp()}, {"name": "archived", "datatype": "boolean"}, {"name": "description", "datatype": dbt_utils.type_string()}, {"name": "id", "datatype": dbt_utils.type_int()}, {"name": "name", "d...
with associated_policy_users as( select user_id, u.iam_id, u.account_id as account_id, roles from ibm_iam_user as u left join ibm_iam_user_policy as p on u.iam_id = p.iam_id ) select -- Required Columns distinct iam_id as resource, case when roles is null then 'ok' else 'alarm'...
-- MySQL dump 10.13 Distrib 5.7.22, for Linux (x86_64) -- -- Host: localhost Database: db_shopify -- ------------------------------------------------------ -- Server version 5.7.22-0ubuntu0.16.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER...
SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [Profile.Cache].[List.Export.UpdatePublications] AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; SELECT *, ROW_NUMBER() OVER (PARTITION BY PersonID, EntityID ORDER BY PMID) k...
-- +goose NO TRANSACTION -- +goose Up -- +goose StatementBegin CREATE UNIQUE INDEX CONCURRENTLY user_settings_user_id_key ON user_settings(user_id); -- +goose StatementEnd -- +goose Down -- +goose StatementBegin DROP INDEX CONCURRENTLY user_settings_user_id_key; -- +goose StatementEnd
ALTER TABLE comment ADD COLUMN reply_to text references comment(id);
<reponame>beleo/devilbox-dolphin<gh_stars>0 SET @iLangId = (SELECT `ID` FROM `sys_localization_languages` WHERE `Name` = 'ru'); DELETE FROM `sys_email_templates` WHERE `LangID` = @iLangId;
USE [CAD_DINAMICO]; CREATE TABLE dbo.BANCO_DADOS ( ID_BANCO_DADOS INT PRIMARY KEY IDENTITY(1,1), NOME VARCHAR(120) NOT NULL );
<filename>sql_query_syntax/join_groupby_orderby.sql -- Join with Group by and Order By SELECT teams.conference AS conference , AVG(players.weight) AS average_weight FROM benn.college_football_players players JOIN benn.college_football_teams teams ON teams.school_name = players.school_name GROUP BY teams.co...
<reponame>shorfana/rumahrakata -- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 22 Bulan Mei 2019 pada 06.57 -- Versi server: 10.1.36-MariaDB -- Versi PHP: 5.6.38 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone...
# # TABLE STRUCTURE FOR: peoples # DROP TABLE IF EXISTS `peoples`; CREATE TABLE `peoples` ( `id` int(9) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(100) NOT NULL, `email` varchar(100) NOT NULL, `address` varchar(255) NOT NULL, PRIMARY KEY (`id`), KEY `email` (`email`) ) ENGINE=InnoDB AUTO_INCREMENT=1...
-------------------------------------------------------- -- DDL for Index SOK_USER_ROLE -------------------------------------------------------- CREATE INDEX "SOK_USER_ROLE_PK" ON "SOK_USER_ROLE" ("USER_ID", "ROLE_CODE"); CREATE INDEX "SOK_USER_ROLE_IDX1" ON "SOK_USER_ROLE" ("USER_ID"); CREATE INDEX "SOK_USER_R...
-- get categories SELECT * FROM wn18_categories; -- get subcategories SELECT * FROM wn18_subcategories; -- get subcategory by category SELECT * FROM wn18_subcategories WHERE categoryID = 1; -- get subcategory's category SELECT * FROM wn18_categories c JOIN wn18_subcategories s ON categoryID = c.ID WHERE s....
-- phpMyAdmin SQL Dump -- version 4.7.7 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Jul 29, 2018 at 08:48 PM -- Server version: 5.6.39-83.1 -- PHP Version: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @O...