sql
stringlengths
6
1.05M
-- file:union.sql ln:119 expect:true (SELECT 1,2,3 UNION SELECT 4,5,6 ORDER BY 1,2) EXCEPT SELECT 4,5,6
<filename>src/test/resources/sql/create_table/4050e633.sql -- file:domain.sql ln:479 expect:true create table ddtest2(f1 posint2)
SET @iKatID = (SELECT `kateg` FROM `sys_options` WHERE `Name` = 'bx_photos_uploader_switcher'); DELETE FROM `sys_options` WHERE `kateg` = @iKatID; INSERT INTO `sys_options` (`Name`, `VALUE`, `kateg`, `desc`, `Type`, `check`, `err_text`, `order_in_kateg`, `AvailableValues`) VALUES ('bx_photos_activation', 'on'...
{{ config( enabled=True ) }} {%- set source_model = "v_stg_customers_crm" -%} {%- set src_pk = "CUSTOMER_PK" -%} {%- set src_hashdiff = "CUSTOMER_HASHDIFF" -%} {%- set src_payload = ["age", "country"] -%} {%- set src_eff = "EFFECTIVE_FROM" -%} {%- set src_ldts = "LOAD_DATE" -%} {%- set src_source = "RE...
<reponame>stevenhurwitt/dbt-xdb {%- macro aggregate_strings(val, delim) -%} {# SUPPORTS: - Postgres - Snowflake - BigQuery #} {%- if target.type == 'postgres' -%} string_agg({{ val }}::varchar {{',' if delim else ''}} {{ delim }}) {%- elif target.ty...
<reponame>alexrios/the-amazing-ledger BEGIN; CREATE TYPE account_class AS ENUM ( 'liability', 'assets', 'income', 'expense', 'equity' ); CREATE TYPE operation_type AS ENUM ( 'debit', 'credit' ); CREATE TABLE entries ( id UUID primary key, account_class ACCOUNT_CLASS not null, account_group...
SELECT * FROM SYSTEMS ORDER BY INSERT_DATETIME %s LIMIT ? OFFSET ?;
<gh_stars>10-100 select name, arn, id, scope, region from aws.aws_wafv2_ip_set where akas::text = '["{{output.resource_aka_global.value}}"]';
<gh_stars>1000+ DROP TABLE IF EXISTS {$NAMESPACE}_dashboard.dashboard_dashboard_ngrams;
INSERT INTO TestTable( _bit ) values( @bit ) /*PARAM* bit, BOOLEAN, TRUE *PARAM*/
<filename>src/test/tinc/tincrepo/mpp/gpdb/tests/storage/uao/uao_heap_compaction/sql/stats.sql -- @Description Tests that the pg_class statistics are updated on -- lazy vacuum. -- -- ensure that the scan go through the index SET enable_seqscan=false; SELECT relname, reltuples FROM pg_class WHERE relname = 'foo'; SELEC...
<filename>src/test/tinc/tincrepo/mpp/gpdb/tests/storage/filerep_end_to_end/sync2/sql/sync2_heap_alter_part_add_default_part.sql -- start_ignore SET gp_create_table_random_default_distribution=off; -- end_ignore -- -- SYNC2 Heap Part Table 1 -- CREATE TABLE sync2_heap_alter_part_add_default_part1 (id int, name text, ran...
<gh_stars>0 CREATE DATABASE taskforce DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; USE taskforce; CREATE TABLE categories ( `id` INT AUTO_INCREMENT PRIMARY KEY, `title` VARCHAR(128) NOT NULL, `title_en` VARCHAR(128) NOT NULL ); CREATE TABLE proposal ( `id` INT AUTO_INCREMEN...
DROP FUNCTION IF EXISTS copy_questionnaire( in_questionnaire_id INTEGER, in_user_id INTEGER ); CREATE OR REPLACE FUNCTION copy_questionnaire( in_questionnaire_id INTEGER, in_user_id INTEGER ) RETURNS INTEGER LANGUAGE sql AS $$ WITH copied_questionnaires AS ( INSERT INTO questionnaires ( user_id, l...
--+ holdcas on; --add two new users create user test1 password '<PASSWORD>'; create user test2 password '<PASSWORD>'; --check current user level SELECT CURRENT_USER; --login use test1 without password, this operation will be success as current user is dba, will not check password CALL login ('test1', '') ON CLASS d...
<filename>pset7/fiftyville/log.sql -- Keep a log of any SQL queries you execute as you solve the mystery. -- All you know is that the theft took place on July 28, 2020 and that it took place on Chamberlin Street. -- Get description of the crime scene report on the day of the crime SELECT description FROM crime_scen...
-- phpMyAdmin SQL Dump -- version 4.8.0.1 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Waktu pembuatan: 13 Nov 2019 pada 23.35 -- Versi server: 5.7.19 -- Versi PHP: 7.1.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_S...
INSERT INTO `music_lyricists` VALUES ('agape_no_saisyu_teiri','wotaku','2020-01-01 00:00:00','2020-03-04 14:09:05'),('ai_ga_areba','kanzaki_iori','2020-01-01 00:00:00','2020-02-27 14:07:39'),('ame_to_cappuccino','nabuna','2020-01-01 00:00:00','2020-03-04 07:30:45'),('anonatsu_ga_howasuru','kanzaki_iori','2020-01-01 00:...
------------------------------区域/地址相关-------------------------------- SET NAMES utf8mb4; ----------------------------省份---------------------------------- DROP TABLE IF EXISTS `province`; CREATE TABLE `province` ( `code` varchar(16) NOT NULL COMMENT '省份 code', `name` varchar(16) NOT NULL COMMENT '省份', PRIMARY K...
BEGIN TRANSACTION; CREATE TABLE IF NOT EXISTS "user" ( "id" INTEGER, "username" TEXT NOT NULL UNIQUE, "password" TEXT NOT NULL, PRIMARY KEY("id" AUTOINCREMENT) ); CREATE TABLE IF NOT EXISTS "active_session" ( "id" TEXT, PRIMARY KEY("id") ); INSERT INTO "user" VALUES (4,'pera','<PASSWORD>'); INSERT INT...
<filename>ridr.sql -- MySQL dump 10.13 Distrib 5.7.9, for osx10.9 (x86_64) -- -- Host: localhost Database: rydr_db -- ------------------------------------------------------ -- Server version 5.5.42 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER...
CREATE TABLE flokkur( ID INT PRIMARY KEY NOT NULL AUTO_INCREMENT, nafn VARCHAR(255) ); INSERT INTO flokkur(nafn) VALUES ("Sóló"), ("Hljómsveit"), ("Dúó"); CREATE TABLE utgefandi( ID INT PRIMARY KEY NOT NULL AUTO_INCREMENT, nafn VARCHAR(255) ); INSERT INTO utgefandi(nafn) VALUES ...
CREATE DATABASE IF NOT EXISTS `cc` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci */; USE `cc`; -- MySQL dump 10.13 Distrib 5.5.44, for debian-linux-gnu (x86_64) -- -- Host: 127.0.0.1 Database: cc -- ------------------------------------------------------ -- Server version 5.5.44-0ubuntu0.14.04.1 /*!4...
UPDATE book SET price = 0.9 * price WHERE amount BETWEEN 5 AND 10; SELECT * FROM book;
<reponame>KungFuni0812/Burger2Sequelize INSERT INTO burgers (burger_name) VALUES ('Southern Charm Burger'); INSERT INTO burgers (burger_name) VALUES ('Whiskey River Burger'); INSERT INTO burgers (burger_name) VALUES ('Banzai Burger'); INSERT INTO burgers (burger_name) VALUES ('Bacon Cheese Burger');
-- Procedure GenericListColumnOption_GetChoices SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [GenericListColumnOption_GetChoices] ( @ColumnId int ) AS SET NOCOUNT ON SELECT o.Id, o.ColumnId, o.OptionTypeId, o.Rank, o.Caption, o.DefaultValue, ot.Id AS Expr1, ot.Label, ot.Template FROM ...
/* NULL, INNER JOIN, LEFT JOIN, RIGHT JOIN 1. List the teachers who have NULL for their department. Why we cannot use = You might think that the phrase dept=NULL would work here but it doesn't - you can use the phrase dept IS NULL That's not a proper explanation. */ SELECT name FROM teacher WHERE dept IS NULL /* 2...
SELECT * FROM employees; SELECT id, name, age FROM employees WHERE id=1; SELECT name, age FROM employees WHERE salary>=20000; SELECT MAX(age) FROM employees WHERE salary>=20000; SELECT age, COUNT(*), AVG(salary) FROM employees GROUP BY age; /***********************************************/ SELECT * FROM ...
<gh_stars>1-10 INSERT INTO LAYER_GROUP (NAME, GROUP_ORDER) VALUES ('Geologian tutkimuskeskus', (SELECT MAX(GROUP_ORDER) + 1 FROM LAYER_GROUP));
/* Post-Deployment Script Template -------------------------------------------------------------------------------------- This file contains SQL statements that will be appended to the build script. Use SQLCMD syntax to include a file in the post-deployment script. Example: :r .\myfile.sql ...
CREATE TABLE subdivision_RS (id VARCHAR(6) NOT NULL, name VARCHAR(255), level VARCHAR(64) NOT NULL, PRIMARY KEY(id)); INSERT INTO "subdivision_RS" ("id", "name", "level") VALUES (E'RS-00', E'Belgrad', E'city'); INSERT INTO "subdivision_RS" ("id", "name", "level") VALUES (E'RS-02', E'Kesk-Banat', E'district'); INSERT I...
<filename>data/train/sql/2bca992de4f821143e81c4393c6fb533503d0228init_data.sql DECLARE @i_new_id INTEGER; EXECUTE sp_com_new_post @nvc_sender_id = 'cfvbaibai', @nvc_content = 'Test Post 1', @i_new_id = @i_new_id OUTPUT; EXECUTE sp_com_new_reply @i_reply_to = @i_new_id, @nvc_sender_id = 'ohaoha', @nvc_content ...
CREATE TABLE [Metrics].[CollectionPeriodTolerance] ( [Id] INT IDENTITY(1,1) NOT NULL CONSTRAINT PK_CollectionPeriodTolerance PRIMARY KEY CLUSTERED, [AcademicYear] SMALLINT NOT NULL, [CollectionPeriod] TINYINT NOT NULL, [SubmissionToleranceLower] DECIMAL(15,5) NOT NULL, [SubmissionTolera...
<reponame>HenrikBauer/T-SQL-AsyncAgent CREATE PROCEDURE [AgentTests].[Test Started Agent job is running] AS BEGIN -- Align DECLARE @ExpectedJob NVARCHAR(128) = N'Test job'; DECLARE @ActualJob NVARCHAR(128) = NULL; -- Act EXEC [AsyncAgent].[Private_CreateJob] @JobName = @ExpectedJob; EXEC [AsyncAgent].[Private_...
# This patch creates the new videos table # It will not fill it with data at this time DROP TABLE IF EXISTS videos; CREATE TABLE videos ( id MEDIUMINT(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Show''s ID to be used in other tables as reference.', type TINYINT(1) UNSIGNED NOT NULL DEFAULT...
INSERT INTO todos VALUES (1, 'Task 1', 'WAITING', current_timestamp, null); INSERT INTO todos VALUES (2, 'Task 2', 'WAITING', current_timestamp, null); INSERT INTO todos VALUES (3, 'Task 3', 'WAITING', current_timestamp, null); INSERT INTO todos VALUES (4, 'Task 4', 'DONE', current_timestamp, null);
-- ====================================================================== -- Table: railway_point -- Description: Entries from planet_osm_point where railway IS NOT NULL -- Created: 2018-10-19 -- ====================================================================== CREATE SCHEMA IF NOT EXISTS railway; DROP...
<gh_stars>0 SELECT test_cal_dt.week_beg_dt ,test_category_groupings.meta_categ_name ,test_category_groupings.upd_user ,test_category_groupings.upd_date ,test_kylin_fact.leaf_categ_id ,test_category_groupings.leaf_categ_id ,test_kylin_fact.lstg_site_id ,test_category_groupings.site_id ,sum(price) as GM...
<reponame>kevin-at-datical/liquibase-test-harness<filename>src/main/resources/liquibase/harness/change/expectedSql/sqlite/enableTrigger.sql INVALID TEST Liquibase does not support enableTrigger changeType for SQLite -- See https://docs.liquibase.com/change-types/enable-trigger.html
DROP TABLE IF EXISTS user; CREATE TABLE user ( id BIGINT(20) NOT NULL COMMENT '主键ID', tenant_id BIGINT(20) NOT NULL COMMENT '租户ID', name VARCHAR(30) NULL DEFAULT NULL COMMENT '姓名', PRIMARY KEY (id) );
CREATE TABLE "DR$FLAT_TEXT_INDEX$K" ( "DOCID" NUMBER(38,0), "TEXTKEY" ROWID, PRIMARY KEY ("TEXTKEY") ENABLE ) ORGANIZATION INDEX NOCOMPRESS
<filename>ingest/src/main/resources/selectStar-lite.sql<gh_stars>1-10 select 's3://S3_BUCKET_HERE/' || p.path as fname, p.path as relpath, p.size, p.shasum256 as shasum_256, p.collection, u.universe, u.validity as universe_validity, a.timeout as arlington_timeout, a.exit_value as arlington_exit_value, mc.stderr mc_warn...
-- 20210812 this code runs on SAP HANA Cloud QRC2 -- This script complements and extends the Jupyter Notebook showcasing the hana-ml python client: -- see: https://github.com/SAP-samples/hana-graph-examples/tree/main/NOTEBOOKS/WELLINGTON_STORMWATER -- We will demonstrate how to use some advanced spatial and graph fea...
INSERT INTO waffle_sample (name, percent, note) VALUE ('elastic-search', 0, 'How often should we redirect to search/es?');
<filename>business_server/src/main/resources/business.sql /* Navicat Premium Data Transfer Source Server : 172.16.17.32_31260 Source Server Type : MySQL Source Server Version : 80021 Source Host : 172.16.17.32:31260 Source Schema : business Target Server Type : MySQL Target Ser...
<reponame>moldovanpaul75/city-building-education DROP DATABASE IF EXISTS city_building; CREATE DATABASE IF NOT EXISTS city_building; USE city_building; CREATE TABLE IF NOT EXISTS city( cityId INT NOT NULL AUTO_INCREMENT, cityName VARCHAR(150) NOT NULL, lat FLOAT(10,6) NOT NULL, lon FLOAT(10,6) NOT NULL, ...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 18, 2020 at 11:09 AM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
ALTER TABLE [dbo].[CostShareRecordEntries] ADD CONSTRAINT [FK_CostShareRecordEntries_Entries] FOREIGN KEY ([ID]) REFERENCES [dbo].[Entries] ([ID]) ON DELETE NO ACTION ON UPDATE NO ACTION;
<gh_stars>0 -- credentials and database name should be changes for production instances -- this following scripts should be run separately from the DB table and DATA scripts as ROOT create database cp default character set utf8 default collate utf8_general_ci; create user cp; grant all on cp.* to cp@localhost identifi...
INSERT INTO all_departments (department_name) VALUES ('Sales'), ('Opperations'), ('Finance'), ('Human Resources'); INSERT INTO all_roles (job_title, department_id, salary) VALUES ('Lead Salesman', 1, 150000), ('Lead Opperations', 2, 120000), ('Lead Finance', 3, 170000), ('Human Resources Manager', 4, 100000), ('Salesm...
<reponame>cicatrizwp/codeigniter-crud<filename>db/medico.sql -- phpMyAdmin SQL Dump -- version 4.6.6deb5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Jun 11, 2019 at 08:34 PM -- Server version: 5.7.26-0ubuntu0.18.04.1 -- PHP Version: 7.2.19-0ubuntu0.18.04.1 SET SQL_MODE = "NO_AUTO_VALU...
\c postgres create table urls ( url_id serial not null unique, url text, code varchar(12) unique, created_at timestamp default now() ); create extension "uuid-ossp"; create table users ( user_id uuid not null default uuid_generate_v4(), name varchar(64) not null, email varchar(64) not null unique, password v...
SET DEFINE OFF; CREATE INDEX AFW_25_VERSN_PUBLC_SUBST_FK1 ON AFW_25_VERSN_PUBLC_SUBST (REF_VERSN_PUBLC) LOGGING /
<gh_stars>1-10 CREATE TABLE BLOGPOST( ID INT AUTO_INCREMENT, NAME VARCHAR(255), SUB_DEPARTMENT VARCHAR(255), COMMENTS VARCHAR(2000), DESCRIPTION VARCHAR(255), LAST_UPDATED INT );
WITH conditional_data AS ( SELECT radar_id, date_trunc('hour', start_time) + date_part('minute', start_time)::int / 20 * interval '20 min' AS interval_start_time, CASE WHEN altitude >= 0.2 AND altitude < 1.6 THEN 1 WHEN altitude >= 1.6 THEN 2 END AS altitude_b...
ALTER TABLE EG_UOMCATEGORY RENAME COLUMN lastmodified TO lastmodifieddate; ALTER TABLE EG_UOMCATEGORY ADD COLUMN version numeric ; update EG_UOMCATEGORY set version=0 where version is null;
<gh_stars>10-100 ALTER TABLE addresses ADD is_passthrough_address TINYINT(1) NOT NULL DEFAULT '0' AFTER is_separator_address; UPDATE addresses SET is_passthrough_address=1 WHERE option_index=2; ALTER TABLE transaction_ios ADD is_passthrough TINYINT(1) NOT NULL DEFAULT '0' AFTER is_separator; UPDATE transaction_ios SET ...
-- 262. Trips and Users -- -- The Trips table holds all taxi trips. Each trip has a unique Id, while Client_Id and Driver_Id are both foreign keys to the Users_Id at the Users table. Status is an ENUM type of (‘completed’, ‘cancelled_by_driver’, ‘cancelled_by_client’). -- -- +----+-----------+-----------+---------+----...
-- T-SQL scripts to get relevant information from the Extended Event session ;WITH XEData AS ( SELECT CAST(xest.target_data as XML) xml_data FROM sys.dm_xe_session_targets xest INNER JOIN sys.dm_xe_sessions xes on xes.[address] = xest.event_session_address WHERE xes.name = 'AG_XE_DEMO' AND xest.target_name =...
-- TBE-654: - Update email column size (ORACLE) -- Step 1: Drop views DROP VIEW p28_cfg_doc_config_v; DROP VIEW p28_cfg_doc_config_nt; DROP VIEW p28_cfg_doc_email_cfg_v; DROP VIEW p28_cfg_doc_email_cfg_nt; -- Step 2: Alter column type ALTER TABLE p28_cfg_doc_config MODIFY extra_to varchar2(32767 char); ALTER TABLE p2...
<filename>@api/data/schema.sql<gh_stars>0 -- -- PostgreSQL database dump -- -- Dumped from database version 14.0 -- Dumped by pg_dump version 14.0 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 pg...
# Time: O(n) # Space: O(n) SELECT query_name, ROUND(AVG(rating * 100 / POSITION)) / 100 AS quality, ROUND(SUM(rating < 3) * 100 / COUNT(*), 2) AS poor_query_percentage FROM Queries GROUP BY query_name ORDER BY NULL;
DROP DATABASE IF EXISTS db; CREATE DATABASE db ENGINE = default; CREATE TABLE db.t(c1 int) ENGINE = Null; SELECT COUNT(1) from system.tables where name = 't' and database = 'db'; CREATE DATABASE IF NOT EXISTS db ENGINE = default; CREATE DATABASE db ENGINE = default; -- {ErrorCode 4001} DROP DATABASE IF EXISTS db; -...
<gh_stars>0 with account_history as ( select * from {{ var('account_history') }} ), latest_account as ( select *, row_number() over(partition by account_id order by last_updated_at desc) as latest_account_index from account_history ) select * from latest_account where latest_account_inde...
<filename>file-util-merger/src/main/resources/schema-test.sql DROP TABLE FILE_INFO IF EXISTS; CREATE TABLE FILE_INFO ( file_id BIGINT IDENTITY NOT NULL PRIMARY KEY, file_name VARCHAR(128), file_path VARCHAR(1024), file_created DATE, file_created_by VARCHAR(128), file_last_modified DATE, fi...
-- Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute -- Copyright [2016-2022] EMBL-European Bioinformatics Institute -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may ob...
<reponame>molinsp/course-dbt-pere<gh_stars>0 with source as ( select * from {{ source('stg_greenery', 'order_items') }} ), renamed as ( select id, order_id, product_id, quantity from source ) select * from renamed
<gh_stars>0 /****** Object: View [dbo].[V_Instrument_Name_RNA_PickList] ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE view [dbo].[V_Instrument_Name_RNA_PickList] as SELECT InstName.IN_name As Instrument, I.Usage as [Usage], dbo.GetInstrumentGroupDatasetTypeList(I.IN_Group) AS ...
CREATE TABLE [dbo].[Cut] ( [IdClip] INT NULL, [IdVideo] INT NULL, [Start] DECIMAL (18, 3) NULL, [Finish] DECIMAL (18, 3) NULL, [Sequence] INT NULL, CONSTRAINT [FK_Cuts_Clip] FOREIGN KEY ([IdClip]) REFERENCES [dbo].[Clip] ([Id]), CONSTRAINT [FK_Cut...
<gh_stars>10-100 -- 701 Number of drug occurrence records, by drug_concept_id --insert into @results_schema.heracles_results (cohort_definition_id, analysis_id, stratum_1, count_value) select c1.cohort_definition_id, 701 as analysis_id, de1.drug_CONCEPT_ID as stratum_1, cast( '' as varchar(1) ) as stratum_2, ca...
<gh_stars>0 -- @author prabhd -- @created 2012-12-05 12:00:00 -- @modified 2012-12-05 12:00:00 -- @tags dml -- @db_name dmldb -- @description union_update_test20: UNION/INTERSECT/EXCEPT within dml_union_sub-query \echo --start_ignore set gp_enable_column_oriented_table=on; \echo --end_ignore SELECT COUNT(DISTINCT(...
-- @testpoint:distinct的使用 drop view if exists acos_view; drop table if exists acos_test_01; create table acos_test_01(c_decimal decimal(38,4)); insert into acos_test_01(c_decimal) values(-1),(1),(-0.6542),(0.6542),(null); select distinct acos(abs(c_decimal)) t1,acos(abs(c_decimal)) t2 from acos_test_01 where c_decim...
<filename>benchmark/Taxpayer/queries-vectorwise/15.sql SELECT AVG(CAST(("Taxpayer_10"."average_Medicare_allowed_amt" - "Taxpayer_10"."average_Medicare_payment_amt") AS float8)) AS "avg:Calculation_9940518082838207:ok", "Taxpayer_10"."nppes_provider_first_name" AS "nppes_provider_first_name" FROM "Taxpayer_10" WHERE (...
INSERT INTO `districts` (`id`, `city_id`, `description`) VALUES ('1101010', '1101', 'TEUPAH SELATAN'), ('1101020', '1101', 'SIMEULUE TIMUR'), ('1101021', '1101', 'TEUPAH BARAT'), ('1101022', '1101', 'TEUPAH TENGAH'), ('1101030', '1101', 'SIMEULUE TENGAH'), ('1101031', '1101', 'TELUK DALAM'), ('1101032', '...
<gh_stars>0 CREATE SCHEMA IF NOT EXISTS users; SET search_path TO users; GRANT usage ON SCHEMA users to user; create table if not exists user_cohorts ( user_id varchar(64) not null, shard int4 NOT NULL, ups_id varchar(64) null, cohort_id varchar(64) not null, cohort_name varchar(128) null, cohort_value varc...
<gh_stars>0 CREATE TABLE process_definitions_actions ( id int(11) NOT NULL AUTO_INCREMENT primary key, name varchar(255), hashcode varchar(255), pdn_id int(11), active int(1) NOT NULL DEFAULT 1, created_at datetime, created_by varcha...
<gh_stars>0 CREATE PROCEDURE [procfwkHelpers].[SetDefaultSubscription] AS BEGIN DECLARE @Subscriptions TABLE ( [SubscriptionId] UNIQUEIDENTIFIER NOT NULL, [Name] NVARCHAR(200) NOT NULL, [Description] NVARCHAR(MAX) NULL, [TenantId] UNIQUEIDENTIFIER NOT NULL ) INSERT INTO @Subscriptions ( [Subscriptio...
<filename>07.IntroToSQLHomework/15.OrderEmployeesBySalaryDescending.sql use TelerikAcademy; select FirstName, LastName, Salary from Employees where Salary > 50000 order by -Salary;
create database T_Peoples use T_Peoples create table Funcionarios ( IdFuncionario int primary key identity ,Nome varchar(255) not null ,Sobrenome varchar(255) not null );
<filename>sql/tms_company_service_20200313.sql -- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Mar 13, 2020 at 11:20 AM -- Server version: 10.4.8-MariaDB -- PHP Version: 7.3.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 25, 2020 at 04:10 PM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACT...
CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; CREATE TABLE IF NOT EXISTS sequence ( seq BIGINT PRIMARY KEY, name VARCHAR, rev VARCHAR, created TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), updated TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now() ); CREATE TABLE IF NOT EXISTS packages ( name VARCHAR PRIMARY KEY,...
<filename>ADHDatabaseProject/dbo/Stored Procedures/spAssignedMedicines_FindAllByPatientId.sql -- ============================================= -- Author: <Author,,Name> -- Create date: <Create Date,,> -- Description: <Description,,> -- ============================================= CREATE PROCEDURE [dbo].[spAssignedMe...
-- AlterTable ALTER TABLE "lti_consumer" ADD COLUMN "platform_id" TEXT, ALTER COLUMN "secret" SET DEFAULT E''; -- CreateTable CREATE TABLE "lti_platform" ( "issuer" TEXT NOT NULL, "metadata" JSONB NOT NULL, PRIMARY KEY ("issuer") ); -- AddForeignKey ALTER TABLE "lti_consumer" ADD FOREIGN KEY ("platfo...
CREATE TABLE subdivision_NI (id VARCHAR(6) NOT NULL, name VARCHAR(255) NOT NULL, level VARCHAR(64) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB; INSERT INTO `subdivision_NI` (`id`, `name`, `level`) VALUES ('NI-AN', 'Atlántico Norte', 'autonomous region'); INSERT INTO `s...
CREATE TYPE [dbo].[ud_Price] FROM money NOT NULL GO
<reponame>jeanrvos/postgresql-udemyCourse SELECT ppoints AS "one", CAST(ppoints AS NUMERIC) AS "two" FROM people;
<filename>query/3.3.sql<gh_stars>0 select c_city, s_city, d_year, sum(lo_revenue) as revenue from customer, lineorder, supplier, date where lo_custkey = c_custkey and lo_suppkey = s_suppkey and lo_orderdate = d_datekey and c_nation = 'UNITED KINGDOM' and (c_city='UNITED KI1' or c_city='UNITED KI5') and (s_city='UNITED ...
<filename>bloc4/BDD_Introduction/sandbox/TP-Etudiant/correction/sql-murder-mystery.sql SELECT description FROM crime_scene_report where date = 20180115 and type = 'murder' and city = 'SQL City'; -- Security footage shows that there were 2 witnesses. -- The first witness lives at the last house on "Northwestern Dr". --...
<filename>src/relstorage/adapters/postgresql/procs/hf/lock_and_choose_tid.sql CREATE OR REPLACE FUNCTION lock_and_choose_tid() RETURNS BIGINT -- We're in the commit phase of two-phase commit. -- It's very important not to error out here. -- So we need a very long wait to get the commit lock. -- Recall PostgreSQ...
<gh_stars>0 INSERT INTO `companies` (`id`, `created`, `date`, `updated`, `business_key`, `domain`, `email`, `name`, `version`) VALUES (1, '2014-12-18 00:00:00', '2014-12-18 00:00:00', '2014-12-18 00:00:00', 'reimbursementRequest', 'www1.rushucloud.com', '<EMAIL>', 'dc=www', 0), (2, '2015-01-01 00:00:00', '2015-01-01 00...
<reponame>wvanheemstra/core<filename>apps/programmes/models/views/structures/sql/programme.sql /* Navicat MySQL Data Transfer Source Server : wvanheem_core_local Source Server Version : 50509 Source Host : 127.0.0.1 Source Database : core Target Server Version : 50509 File Encoding ...
<gh_stars>0 -- SENAYAN 3.0 stable 5 -- Senayan SQL Database upgrade script ALTER TABLE `mst_member_type` ADD `grace_periode` INT(2) NULL DEFAULT '0' AFTER `fine_each_day`; ALTER TABLE `mst_loan_rules` ADD `grace_periode` INT(2) NULL DEFAULT '0' AFTER `fine_each_day`; ALTER TABLE `stock_take_item` ADD `gmd_name` VARCHA...
ALTER TABLE `sys_menu` ADD COLUMN `antdv_uid_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用于非菜单显示页面的重定向url设置' AFTER `antdv_link_url`;
<gh_stars>0 DROP KEYSPACE dcim_journal; DROP KEYSPACE dcim_snapshot; CREATE KEYSPACE dcim_journal WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '3'} AND durable_writes = true; CREATE KEYSPACE dcim_snapshot WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '3'} AND durable_wri...
<reponame>bcgov/cas-ciip-portal<gh_stars>1-10 -- Verify ggircs-portal:function_search_ciip_user_organisation on pg begin; select pg_get_functiondef('ggircs_portal.search_ciip_user_organisation(text,text,text,text)'::regprocedure); rollback;
/* Navicat Premium Data Transfer Source Server : 本地连接 Source Server Type : MySQL Source Server Version : 50542 Source Host : localhost:3306 Source Schema : daimengshi_cms Target Server Type : MySQL Target Server Version : 50542 File Encoding : 65001 Date: 19/12/2017 ...
-- // CB-5245 add account telemetry -- Migration SQL that makes the change goes here. CREATE TABLE IF NOT EXISTS accounttelemetry ( id bigserial NOT NULL, features text, rules text, archived bool DEFAULT false, accountid varchar(255) NO...
BEGIN; DELETE FROM seguridad_rol_credenciales WHERE credencial_id IN (SELECT c.id FROM seguridad_credencial c WHERE c.nombre = 'reg_df_consulta' AND EXISTS ( SELECT 1 FROM seguridad_credencial c2 WHERE c2.nombre = c.nombre AND c2.id < c.id )); DELETE FROM seguridad_credencial c WHERE c.nombre = 'reg_df_consulta' A...
--test operators seteq, setneq with list(char) and list(varchar) create class tb1 ( a list(char(2))); create class tb2 ( b list(varchar(2))); insert into tb1 values({'a1'}); insert into tb1 values({'a2'}); insert into tb1 values({'a3'}); insert into tb2 values({'a1'}); insert into tb2 values({'a2'}); insert into tb2 ...