sql
stringlengths
6
1.05M
<reponame>unifuzz/seeds CREATE TABLE t102 (i0 TEXT UNIQUE NOT NULL); INSERT INTO t102 VALUES ('0'); SELECT * FROM t102 AS t0 /* */JOIN t102 t1 ON t0.i0 LIKE 'a0' JOIN t102 AS t2 ON(t1.i0< t0.i0 OR 50 AND t0.i0=t1.i0 AND t1.i0=t2.i0) AND t2.i0<t1.i0));
<gh_stars>1-10 -- Aggregate and slice watershed polygons on and adjacent to double line -- rivers/canals, return portion of the watersheds upstream of provided point -- (in form of blue_line_key, downstream_route_measure) -- To do the slicing, xtract the watersheds on the waterbody and on the banks -- of the waterbody...
Insert into eg_roleaction (roleid,actionid) values ((select id from eg_role where name='BUSINESS'), (select id from eg_action where name='BpaCollectFees')); Insert into eg_roleaction (roleid,actionid) values ((select id from eg_role where name='CITIZEN'), (select id from eg_action where name='BpaCollectFees'));
<reponame>VictorAdad/sigi-api-adad ----------------------------------------------------- ----------------------------------------------------- --- EFECTO_DETALLE --- ----------------------------------------------------- ----------------------------------------------------- Insert into EF...
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SE...
<reponame>DigitalCoin1/L2SPERO DROP TABLE IF EXISTS `auto_chat`; CREATE TABLE `auto_chat` ( `groupId` INT NOT NULL default '0', `npcId` INT NOT NULL default '0', `chatDelay` BIGINT NOT NULL default '-1', PRIMARY KEY (`groupId`) ) ENGINE=InnoDB; INSERT INTO `auto_chat` VALUES -- Preacher of Doom (1,31093,-1)...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jan 02, 2018 at 09:18 AM -- Server version: 10.1.28-MariaDB -- PHP Version: 7.1.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!4...
<filename>db/schema.sql<gh_stars>0 DROP DATABASE IF EXISTS modular_db; CREATE DATABASE modular_db;
<gh_stars>0 ALTER TABLE `timestamps` CHANGE COLUMN `root_hash` `root_hash` VARCHAR(64) NULL , CHANGE COLUMN `transaction` `transaction` VARCHAR(64) NULL ;
-- pool = pythianpool -- select count rows -- 434.170.658 SELECT COUNT(*) FROM ds_gold_reviews_full -- query to test performance -- first execution = 15 seconds -- second execution = 4 seconds SELECT TOP 10 store_name, store_city, COUNT(*) AS Q FROM dbo.ds_gold_reviews_full WHERE user_importance = 'rockst...
<filename>1.32.0/var/www/html/indicia/modules/indicia_setup/db/indicia_views.sql DROP VIEW IF EXISTS gv_users; DROP VIEW IF EXISTS gv_surveys; DROP VIEW IF EXISTS list_samples; DROP VIEW IF EXISTS detail_samples; DROP VIEW IF EXISTS list_occurrences; DROP VIEW IF EXISTS detail_occurrences; DROP VIEW IF EXISTS list_loca...
# --- !Ups alter table ride drop constraint ck_ride_ride_status; alter table ride add constraint ck_ride_ride_status check (ride_status in ('RideRequested','RideAccepted','RideClosed', 'RideCancelled', 'Rescheduled', 'RideStarted')); alter table ride add column parcel_request_raised_at timestamp; # --- !Downs alter ...
<gh_stars>0 # --- Sample dataset # --- !Ups insert into person (name) values ('Alice'); insert into person (name) values ('Bob'); insert into person (name) values ('Charles'); insert into person (name) values ('Diana'); insert into person (name) values ('Eliza'); # --- !Downs delete from person;
alter sequence sender_case_id_seq restart with 1; INSERT INTO sender_case (send_case, project_id, enabled) VALUES ('ALWAYS', 1, true); INSERT INTO recipients(sender_case_id, recipient) VALUES (1, 'first'); INSERT INTO recipients(sender_case_id, recipient) VALUES (1, 'second');
create schema if not exists wb_dispatch; CREATE TABLE wb_dispatch.commit_log ( id character varying(64) NOT NULL, creation_time TIMESTAMP WITHOUT TIME ZONE NOT NULL DEFAULT (now() at time zone 'utc'), CONSTRAINT pk_commit_log PRIMARY KEY (id) );
<filename>examples/web-of-science/wos_schema_reduced_2.sql DROP TABLE IF EXISTS public.wos_dynamic_identifiers; DROP TABLE IF EXISTS public.wos_contributor_email_addr; DROP TABLE IF EXISTS public.wos_contributors; DROP TABLE IF EXISTS public.wos_chapters; DROP TABLE IF EXISTS public.wos_book_desc; DROP TABLE IF EXISTS ...
ALTER TABLE course ADD course_objectives TEXT; ALTER TABLE course ADD syllabus TEXT; ALTER TABLE course ADD books VARCHAR(255); ALTER TABLE course_aud ADD course_objectives TEXT; ALTER TABLE course_aud ADD syllabus TEXT; ALTER TABLE course_aud ADD books VARCHAR(255);
<reponame>strolch-li/strolch<filename>li.strolch.persistence.postgresql/src/main/resources/strolch_db_schema_0.3.0_initial.sql -- DB_VERSION CREATE TABLE IF NOT EXISTS db_version ( id SERIAL PRIMARY KEY, app varchar(255), version varchar(255), description varchar(255), created timestamp with time zone ); --...
-- CreateEnum CREATE TYPE "PostCategory" AS ENUM ('SPORT', 'EDUCATION', 'KIDS', 'OUTDOOR', 'HELP', 'OTHER'); -- AlterTable ALTER TABLE "Post" ADD COLUMN "category" "PostCategory"[];
<reponame>akash-coded/mysql DELIMITER // CREATE PROCEDURE whileLoopDemo() BEGIN DECLARE x INT; DECLARE str VARCHAR(255); SET x = 0; SET str = ''; WHILE x <= 5 DO SET x = x + 1; IF (x mod 2 <> 0) THEN SET str = CONCAT(str,...
<reponame>maketubo/liquibase<filename>liquibase-core/src/test/java/liquibase/verify/saved_state/compareGeneratedSqlWithExpectedSqlForMinimalChangesets/addForeignKeyConstraint/derby.sql<gh_stars>1000+ -- Database: derby -- Change Parameter: baseColumnNames=person_id -- Change Parameter: baseTableName=address -- Change P...
CREATE DATABASE IF NOT EXISTS gtas CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE SCHEMA ag; CREATE TABLE ag.ag_handout_kits ( kit_id varchar(9) , password varchar(11) , barcode varchar(9) , verification_code varchar(5) , sample_barcode_file varchar(13) , swabs_per_kit bigint , print_results varchar(1) DEFAULT 'n'::charac...
-- Advanced report of background write effectiveness SELECT set,scale,clients,rate_limit as "limit",tps,max_latency, -- cast(date_trunc('minute',start_time) AS timestamp) AS start, date_trunc('second',elapsed) AS elapsed, (checkpoints_timed + checkpoints_req) as ckpt, date_trunc('second',elapsed / (checkpoint...
-- [er]alter table which create using int,smallint,numeric,float,real,double,monetary,timestamp to add 1 range partition having maxvalue on monetary field create table range_test(id int not null , test_int int, test_smallint smallint, test_numeric numeric(38,10), test_float float, test_real real, tes...
<reponame>nurdiana15/uas-blog -- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 01, 2020 at 04:47 PM -- Server version: 10.4.13-MariaDB -- PHP Version: 7.4.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!4010...
-- update all non-publish(ed) views to have toolbar config; update portti_view_bundle_seq set config='{ "colours": { "hover": "#009FE3", "background": "#ffffff" } }' where bundle_id = (select id from portti_bundle where name = 'toolbar') and view_id NOT IN (select id from portti_view where type = 'PUBLIS...
CREATE procedure SaveIncidentActionComment( @incident_action_id int, @comment nvarchar(max), @responsible_id int = null ) as begin insert into incident_action_comment(incident_action_id, comment, created_by, created_at) values (@incident_action_id, @comment...
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1:3306 -- Généré le : lun. 24 août 2020 à 16:39 -- Version du serveur : 5.7.26 -- Version de PHP : 7.3.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET...
<gh_stars>0 CREATE TABLE "MLB_27"( "col_00" smallint NOT NULL, "col_01" decimal(4, 3), "col_02" decimal(4, 3), "col_03" decimal(4, 1), "col_04" smallint NOT NULL, "col_05" decimal(4, 1), "col_06" smallint NOT NULL, "col_07" decimal(4, 1), "col_08" smallint, "col_09" decimal(4, 1), "col_10" decimal...
<reponame>Elrandra420/postgressql<filename>querying-multiple-sets/06-union.sql -- UNION SELECT cname FROM customers UNION SELECT mname FROM movies; SELECT cname FROM customers UNION SELECT mname FROM movies ORDER BY cname; SELECT cname AS "RESULTS" FROM customers UNION SELECT mname FROM movies ORDER BY "RESULTS";
USE Alt_SXSW_db; CREATE TABLE User ( id int NOT NULL AUTO_INCREMENT, firstName varchar(255) NOT NULL, lastName varchar(255) NOT NULL, username varchar(255) NOT NULL, password varchar(255) NOT NULL, email varchar(255) NOT NULL, bandname varchar(255) NOT NULL, instrument varchar(255) NOT NULL, created...
<gh_stars>0 SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO -- ============================================= -- Author: <NAME> (copied from <NAME>'s BOQ Trend report) -- Create date: 09/18/2019 -- Description: BOQ FCC Trend Report -- ============================================= CREATE PROC [dbo].[rspBOQFCCT...
<reponame>freestylecoder/DevSpace2015<filename>Api/Scripts/Update01.sql CREATE TABLE Tokens ( Token UNIQUEIDENTIFIER NOT NULL, SpeakerId SMALLINT NOT NULL, Expires DATETIME NOT NULL, CONSTRAINT Tokens_PK PRIMARY KEY ( Token ), CONSTRAINT Tokens_Speakers_FK FOREIGN KEY ( SpeakerId ) REFERENCE...
<gh_stars>1-10 USE [ANTERO] GO /****** Object: View [dw].[v_haku_ja_valinta_toinen_aste_valmistava] Script Date: 22.2.2022 11:01:22 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER VIEW [dw].[v_haku_ja_valinta_toinen_aste_valmistava] AS SELECT --top 10 cast(f.loadtime as date) as Päivitysai...
drop table if exists MB_EXCHANGE_TRAN_ATTACH; /*==============================================================*/ /* Table: MB_EXCHANGE_TRAN_ATTACH */ /*==============================================================*/ create table MB_EXCHANGE_TRAN_ATTACH ( SEQ_NO varchar(50)...
SELECT c.Id, c.FirstName+' '+c.LastName as full_name FROM Colonists c JOIN TravelCards tc ON c.Id=tc.ColonistId WHERE tc.JobDuringJourney='Pilot' ORDER BY c.Id
SELECT data.unix_time, e1.name as entity_1_name, e2.name as entity_2_name FROM data JOIN entities as e1 ON data.entity_1 = e1.mid JOIN entities as e2 ON data.entity_2 = e2.mid
<reponame>TaleLearnCode/CPL20ArchiveSite CREATE PROCEDURE dbo.uspRetrieveSpeakersForSession ( @SessionId INT ) AS BEGIN SELECT DISTINCT Speaker.AspNetUserId, Contact.FirstName, Contact.LastName, Speaker.Biography FROM Speaker INNER JOIN Contact ON Contact.Id = Speaker.ContactId WHERE Speaker....
CREATE DATABASE IF NOT EXISTS `movie` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `movie`; -- MySQL dump 10.13 Distrib 5.6.13, for Win32 (x86) -- -- Host: localhost Database: movie -- ------------------------------------------------------ -- Server version 5.0.17-nt /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACT...
.mode csv .import demodata/stockbasic.csv info_stockbasic .import demodata/stockchips.csv info_stockchips .import demodata/stockprice.csv info_stockprice
<reponame>sandokandias/go-database-app DROP TABLE IF EXISTS orders;
<reponame>joelvisroman/dataviva-site UPDATE search_question set answer = '/industry/{0}?bra_id={1}#wages' WHERE profile_id = (SELECT id FROM search_profile where name_en = 'Entrepreneurs') AND description_pt = 'Qual o número de estabelecimentos na Atividade Econômica X, na Localidade Y?'; UPDATE search_question set ans...
<filename>solutions/monitoring/scripts/views/microsoft.vw_security_role_members.sql PRINT 'Info: Creating the ''microsoft.vw_security_role_members'' view'; GO CREATE VIEW microsoft.vw_security_role_members AS SELECT r.[name] AS role_principal_name , m.[name] AS member_principal_name FROM sys.database_role_mem...
-- file:tsearch.sql ln:437 expect:true SELECT ts_rewrite('foo & bar & qq & new & york', 'new & york'::tsquery, 'big & apple | nyc | new & york & city')
SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO CREATE Procedure [dbo].[Interfaz_ProvedorPorID] --'SITTI' @Usuario AS CHAR(10), @Proveedor AS CHAR(10) AS -- ************************************************************************* -- Variables -- *********************************************************************...
<gh_stars>0 -- -------------------------------------------------------- -- 主机: 172.16.31.10 -- 服务器版本: 5.6.20 - MySQL Community Server (GPL) -- 服务器操作系统: Linux -- HeidiSQL 版本: 9.5.0.5196 -- ---------------------------------------------...
<gh_stars>1-10 insert into tb_txn_rel(EXPRESS_NO,PROD_NO,PURCHASE_COUNT,REMARK) values('201208970788','RH035',1,'test'); insert into tb_txn_rel(EXPRESS_NO,PROD_NO,PURCHASE_COUNT,REMARK) values('201208970788','PT-LAOBING',1,'test'); insert into tb_txn_rel(EXPRESS_NO,PROD_NO,PURCHASE_COUNT,REMARK) values('201208970797',...
/* Navicat Premium Data Transfer Source Server : local Source Server Type : MySQL Source Server Version : 50722 Source Host : localhost:3306 Source Schema : know Target Server Type : MySQL Target Server Version : 50722 File Encoding : 65001 Date: 08/03/2020 08:21:20 ...
INSERT INTO OFFICE(ID, NAME, ADDRESS_ID, DEPARTMENT_ID) VALUES (1, 'Office of S&M Boston', 4, 1); INSERT INTO OFFICE(ID, NAME, ADDRESS_ID, DEPARTMENT_ID) VALUES (2, 'Office of S&M New York', 5, 1); INSERT INTO OFFICE(ID, NAME, ADDRESS_ID, DEPARTMENT_ID) VALUES (3, 'Office of R&D Boston', 6, 2); INSERT INTO OFFICE(ID, N...
ALTER TABLE t1 RENAME t2, RENAME t3
SET allow_experimental_live_view = 1; DROP TABLE IF EXISTS lv; DROP TABLE IF EXISTS mt; CREATE TABLE mt (a Int32) Engine=MergeTree order by tuple(); CREATE LIVE VIEW lv AS SELECT * FROM mt; INSERT INTO mt VALUES (1),(2),(3); SELECT * FROM lv FORMAT JSONEachRowWithProgress; DROP TABLE lv; DROP TABLE mt;
DROP TABLE IF EXISTS tbl_conversations;
SELECT c_nation, s_nation, d_year, SUM(lo_revenue) AS revenue FROM customer, lineorder, supplier, ddate WHERE lo_custkey = c_custkey AND lo_suppkey = s_suppkey AND lo_orderdate = d_datekey AND c_region = 'ASIA' AND s_region = 'ASIA' AND d_year >= 1992 AND d_year <= 1997 GROUP BY c_nation, s_nation, d_year ORD...
create schema `dimpleblog-vue` collate utf8mb4_0900_ai_ci; create table blacklist ( id bigint auto_increment comment 'id' primary key, ip varchar(128) null comment 'ip地址', description varchar(256) null comment '封禁描述', intercept_count bigint null comment '封禁后再访问次数', last_access_url varchar(256) null comment '上次访...
SELECT count(*), count(*) = 126245, zdb.count('idxevents', match_all()), zdb.count('idxevents', match_all()) = 126245 FROM events; ALTER TABLE events SET (autovacuum_enabled = false); VACUUM events; BEGIN; SELECT zdb.count('idxevents', match_all()); INSERT INTO events (id) SELECT generate_series(1000000, 1001000); SE...
<gh_stars>10-100 -- -- Tests for procedures / CALL syntax -- CREATE PROCEDURE test_proc1() LANGUAGE plpython3u AS $$ pass $$; CALL test_proc1(); -- error: can't return non-None CREATE PROCEDURE test_proc2() LANGUAGE plpython3u AS $$ return 5 $$; CALL test_proc2(); CREATE TABLE test1 (a int); CREATE PROCEDURE te...
-- @author prabhd -- @created 2012-12-05 12:00:00 -- @modified 2012-12-05 12:00:00 -- @tags dml HAWQ -- @db_name dmldb -- @description test21: Negative test case. INSERT has more expressions than target columns \echo --start_ignore set gp_enable_column_oriented_table=on; \echo --end_ignore SELECT COUNT(*) FROM dml_...
<reponame>f450/jforum2<filename>src/main/config/database/hsqldb/hsqldb_data_dump.sql<gh_stars>0 -- -- Groups -- INSERT INTO jforum_groups (group_id, group_name, group_description ) VALUES (1,'General', 'General Users'); INSERT INTO jforum_groups (group_id, group_name, group_description ) VALUES (2,'Administration', 'Ad...
-- %% ================================================================================= -- %% ========= SP: rover_db.sp_add_user | SPC: 10001 -- %% ================================================================================= DELIMITER % DROP PROCEDURE IF EXISTS `rover_db`.`sp_add_user`% CREATE PROCEDURE `rover_db`...
DROP TABLE "public"."Uploader";
-- @testpoint: opengauss关键字Identified非保留),作为索引名,部分测试点合理报错 --前置条件,创建一个表 drop table if exists explain_test; create table explain_test(id int,name varchar(10)); --关键字不带引号-成功 drop index if exists Identified; create index Identified on explain_test(id); drop index Identified; --关键字带双引号-成功 drop index if exists "Identified...
<reponame>masterkaizer/Eat-the-Burger INSERT INTO Burgers (id, name, devoured, date) VALUES (1, 'Regular Hamburger', 1, '2016-10-02 10:51:12'), (2, 'Cheese Burger', 1, '2016-10-02 10:52:15'), (3, 'Ultra Bacon Burger', 0, '2016-10-02 10:53:12'), (4, 'Veggie Burger', 0, '2016-10-02 10:54:22'), (5, 'Chicken Club Burg...
<reponame>n11-TalentHub-Java-Bootcamp/second-homework-fatihari INSERT INTO public.category(id, name, refractive, upper_category_id) VALUES (1 ,'Moda', 1 , null); INSERT INTO public.category(id, name, refractive, upper_category_id) VALUES (2 ,'Elektronik', 1, null); INSERT INTO public.category(id, name, refractive, uppe...
.mode columns .headers on .nullvalue NULL -- What is the number of occurrences per region? SELECT region, COUNT(*) AS numberOfOccurences FROM Hospital JOIN Ocurrence ON (Hospital.name=Ocurrence.hospital) GROUP BY region ORDER BY numberOfOccurences DESC;
CREATE TABLE IF NOT EXISTS users ( id INTEGER UNSIGNED PRIMARY KEY AUTO_INCREMENT, nickname VARCHAR(128) NOT NULL, login_name VARCHAR(128) NOT NULL, pass_hash VARCHAR(128) NOT NULL, UNIQUE KEY login_name_uniq (login_name) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; CREATE TABLE IF NOT E...
<reponame>handysofts/demo-wholesalers INSERT INTO products(name_, price) VALUES ('The Complete Problem Solver, Second Edition', 50.23); INSERT INTO products(name_, price) VALUES ('Developing Talent in Young People', 16.86); INSERT INTO products(name_, price) VALUES ('Head First Java, 2nd Edition', 26.79); INSERT INTO ...
-- tasks table CREATE TABLE IF NOT EXISTS tasks ( id integer PRIMARY KEY, name text NOT NULL, priority integer, project_id integer NOT NULL, status_id integer NOT NULL, begin_date text NOT NULL, end_date text NOT NULL, FOREIGN KEY (project_id) REFERENCES projects (id) );
SELECT * FROM :Entity
delimiter $$ drop procedure if exists filltable$$ create procedure filltable(IN records int, gap int, startingat int) Begin declare i int; set i = 0; while i < records do insert into origin VALUES(null, (startingat+gap*i),((startingat-1)+gap+gap*i)); SET i = i + 1; end while; END$$ DELIMITER ; truncate origin...
<filename>CRUD/22.AllMountainPeaks.sql SELECT PeakName FROM Peaks ORDER BY PeakName
<filename>xtee-misp2-postgresql/db/sql/alter_table_1.0.51.sql DELETE FROM misp2.producer_name USING misp2.producer_name pn2 WHERE producer_name.producer_id = pn2.producer_id AND producer_name.lang = pn2.lang AND producer_name.id < pn2.id; --Delete duplicate producer_name's DROP INDEX IF EXISTS misp2.in_producer_name_p...
/** Stored procedure to update a testing `A` DataObject :date_created: 2021-11-18 */ USE `testing`; DROP PROCEDURE IF EXISTS `testing`.`A_save`; DELIMITER $$ CREATE DEFINER = `root`@`localhost` PROCEDURE `testing`.`A_save` ( IN `_id` INT, IN `_string` VARCHAR(45), IN `_json` JSON, IN `_in...
<reponame>pradeepsavadi/treasure-boxes select rmse(p.predicted_cltv, t.cltv) as rmse, mae(p.predicted_cltv, t.cltv) as mae from predictions p join cltv_test t on p.customerid = t.customerid
<filename>migrations/000003_character_savedata.down.sql BEGIN; ALTER TABLE characters DROP COLUMN savedata; END;
CREATE TABLE IF NOT EXISTS synthetix.symbols ( symbol text, address bytea, block_time timestamptz, PRIMARY KEY(symbol, address) ); INSERT INTO synthetix.symbols VALUES ('sAUD', '\xB03dFc4b9C9756B6D4Fbc12DAde7732149Fcf00d'), ('sAUD', '\x710882750DDe5DBc64e5a7df23a8cF068dF74910'), ('sAUD', '\xa6FE8...
<filename>admin/update/sql/mysql/3.1.1.sql ALTER TABLE `#__phocadownload` ADD COLUMN `tags_string` varchar(255) NOT NULL default '';
--Problem URL: https://www.hackerrank.com/challenges/weather-observation-station-2/problem SELECT ROUND(SUM(LAT_N), 2) AS LAT, ROUND(SUM(LONG_W), 2) AS LON FROM STATION;
<reponame>l-tyagi/course-dbt-lucky {{ config( materialized='table', unique_key = 'user_guid' ) }} SELECT user_guid , first_name , last_name , email , split_part(email, '@', 2) as user_email_domain , created_at_utc , extract(day from now() - created_at_utc) as account_age_dd ...
DROP TABLE users; CREATE TABLE IF NOT EXISTS users( id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, name VARCHAR(16) NOT NULL, password VARCHAR(64) NOT NULL, email VARCHAR(64) NOT NULL, phoneNumber VARCHAR(32) NOT NULL)
create table beatle( id int primary key, name varchar, instrument varchar, lead_vocals bool ); insert into beatle values (1, 'john', 'guitar', true); insert into beatle values (2, 'paul', 'bass', true); insert into beatle values (3, 'george', 'guitar', false); insert into beatle values (4, 'ringo', 'dr...
DROP SCHEMA IF EXISTS `northwind`; CREATE SCHEMA IF NOT EXISTS `northwind` DEFAULT CHARACTER SET utf8; USE `northwind`; -- ----------------------------------------------------- -- Table `northwind`.`customers` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `northwind`.`customers` (...
<gh_stars>1-10 DROP TABLE IF EXISTS test.tab ; CREATE TABLE test.tab ( date Date, key UInt32, testMap Nested( k UInt16, v UInt64) ) ENGINE = SummingMergeTree(date, (date, key), 1); INSERT INTO test.tab SELECT today(), number, [toUInt16(number)], [number] FROM system.numbers ...
select users.user_id, transactions.currency, sum(transactions.amount) as amount from {{ ref('users') }} left join {{ ref('transactions') }} on users.user_id=transactions.user_id where leg='b' group by users.user_id, currency
<gh_stars>1-10 CREATE KEYSPACE pathstore_demo WITH replication = {'class' : 'SimpleStrategy', 'replication_factor' : 1 } AND durable_writes = true; CREATE TABLE pathstore_demo.users ( name text PRIMARY KEY, sport text, years int, vegetarian Boolean, color list<int> ) WITH bloom_filter_fp_chance = ...
<reponame>blinkops/blink-aws-query<filename>aws-test/tests/aws_wellarchitected_workload/test-get-query.sql select workload_id, workload_name, title, akas, account_id from aws.aws_wellarchitected_workload where workload_id = '{{ output.resource_id.value }}';
<filename>db/130_create_tables.sql -- -- Database Schema: music -- Automatically generated sql script for the service 130, created by the CAE. -- -------------------------------------------------------- -- -- Table structure for table songs. -- CREATE TABLE music.songs ( title String , id String , CONSTRAINT id_P...
<reponame>UKForeignOffice/lists -- CreateTable CREATE TABLE "Feedback" ( "id" SERIAL NOT NULL, "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "updatedAt" TIMESTAMP(3) NOT NULL, "type" TEXT NOT NULL, "jsonData" JSONB NOT NULL, PRIMARY KEY ("id") ); -- CreateIndex CREATE INDEX "Fee...
<reponame>AhmedDuraid/ADH-Medical-System -- ============================================= -- Author: dbo -- Create date: 2020-10-16 -- Description: Return all lab tests -- ============================================= CREATE PROCEDURE spLabTests_FindAll AS BEGIN SET NOCOUNT ON; SELECT [Id] ,[TestName] ...
<filename>database.sql<gh_stars>0 CREATE DATABASE if not exists dnd; use dnd; CREATE TABLE `users`( id INT UNIQUE NOT NULL AUTO_INCREMENT, firstname varchar(20) NOT NULL, lastname varchar(20) NOT NULL, email varchar(30) UNIQUE NOT NULL, password varchar(255) NOT NULL, sessionId varchar(255) UNIQUE NOT NULL, ...
<reponame>eroberti/api<filename>src/migrations/schema/1-2.sql CREATE TABLE public.users ( id integer NOT NULL GENERATED ALWAYS AS IDENTITY, first_name varchar(100) NOT NULL, last_name varchar(100) NOT NULL, email varchar(100), CONSTRAINT users_pk PRIMARY KEY(id) );
<reponame>Alvianrizky/kuesioner<filename>db/sg_kuesioner_db .sql -- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jan 01, 2020 at 06:21 PM -- Server version: 10.4.6-MariaDB -- PHP Version: 7.3.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0...
INSERT INTO `acsm_2a1c579781f0cfc`.`city` (`Id`, `Name`, `province_Id`) VALUES (1, "Toronto", 1); INSERT INTO `acsm_2a1c579781f0cfc`.`city` (`Id`, `Name`, `province_Id`) VALUES (2, "Kitchener", 1); INSERT INTO `acsm_2a1c579781f0cfc`.`city` (`Id`, `Name`, `province_Id`) VALUES (3, "Waterloo", 1); INSERT INTO `acsm_2a1c5...
<filename>users.sql -- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 09, 2021 at 10:43 PM -- Server version: 10.4.17-MariaDB -- PHP Version: 8.0.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
<reponame>uk-gov-mirror/hmcts.reform-scan-notification-service CREATE TABLE notifications ( id BIGSERIAL PRIMARY KEY, notification_id VARCHAR(50) NULL, zip_file_name VARCHAR(255) NOT NULL, po_box VARCHAR(50) NULL, service ...
-- AUTORZY: -- -- <NAME> 216796 -- -- <NAME> 216806 -- ------------------------------------------------------------ /* -- SPIS PROCEDUR I FUNKCJI -- PROCEDURY -- 1. [najpopularniejszy_pokoj_na_pietrze] - najczesciej rezerwowany pokoj na danym pietrze -- 2. [popraw_bledna_liczbe_osob_w_rejestracji] - poprawia reje...
CREATE TABLE external_user ( -- Foreign key to user_id eu_local_id BIGINT NOT NULL PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY (START WITH 1), -- Some opaque identifier provided by the external database eu_external_id VARCHAR(255) NOT NULL );
<gh_stars>0 /* Only look for queries within a reasonable elapsed time frame (microseconds) h_size * h_pos */ declare @min_avg_elapsed_time int, @max_avg_elapsed_time int; select @min_avg_elapsed_time = 1 * 1000000, @max_avg_elapsed_time = null --declare @query_type varchar(20); --select @query_type = 'iqr_all' --...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 25 Sep 2020 pada 11.55 -- Versi server: 10.4.11-MariaDB -- Versi PHP: 7.4.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SE...
-- In Spring Boot using Spring Data, we use ~/src/main/resources/data.sql to seed data. -- We no longer have to use ~/src/main/resources/database/h2/calendar-data.sql to seed data. -- New Calendar Users --------------------------- -- Password for user1 was '<PASSWORD>' insert into calendar_users(id, email, password, ...