sql
stringlengths
6
1.05M
{{ config( materialized='table' ) }} select a.order_id, a.promo_id, a.user_id, a.address_id, a.order_created_at, a.order_cost, a.shipping_cost, a.order_total, a.tracking_id, a.shipping_service, a.estimated_delivery_at, a.delivered_at, a.order_status, b.discount, b.status as discount_status from {{ source('stg_...
<gh_stars>1-10 /* Navicat MySQL Data Transfer Source Server : lucky Source Server Version : 50505 Source Host : 127.0.0.1:3306 Source Database : lucky Target Server Type : MYSQL Target Server Version : 50505 File Encoding : 65001 Date: 2018-05-24 15:41:15 */ SET FOREIGN_KEY_CHECKS...
CREATE TYPE ps_tag.tag_op_jsonb_path_exists AS (tag_key text, value jsonpath); CREATE TYPE ps_tag.tag_op_regexp_matches AS (tag_key text, value text); CREATE TYPE ps_tag.tag_op_regexp_not_matches AS (tag_key text, value text); CREATE TYPE ps_tag.tag_op_equals AS (tag_key text, value jsonb); CREATE TYPE ps_tag.tag_op_no...
BEGIN; ALTER TABLE kv_staging_p0 RENAME TO graveler_staging_kv_p0; ALTER TABLE kv_staging_p1 RENAME TO graveler_staging_kv_p1; ALTER TABLE kv_staging_p2 RENAME TO graveler_staging_kv_p2; ALTER TABLE kv_staging_p3 RENAME TO graveler_staging_kv_p3; ALTER TABLE kv_staging_p4 RENAME TO graveler_staging_kv_p4; ALTER TABLE k...
<reponame>davidjulien/banks_fetch<filename>test/banks_fetch_storage_SUITE_data/setup_db_for_get_new_transactions_for_purse.sql INSERT INTO clients(bank_id, client_id, client_credential) VALUES ('ing', 'client1', ''::BYTEA); INSERT INTO clients(bank_id, client_id, client_credential) VALUES ('ing', 'client2', ''::BYTEA);...
<filename>gekkostone.sql INSERT INTO `gkk_certificates` (`id`, `type`, `path`, `description`, `thumbnail`) VALUES (1, 'a', 'images/content/certificates/docs/image-22-04-15-20-47-6.jpeg', '№866 от 01.06.2014', 'images/content/certificates/docs/thumb/IMG_20151020_194441.jpg'), (2, 'b', 'images/content/certificates/docs/...
<gh_stars>1-10 IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'proc_LockItem') BEGIN DROP Procedure proc_LockItem END GO CREATE Procedure proc_LockItem ( @SessionId nvarchar(80), @ApplicationName nvarchar(255), @LockId int ) AS UPDATE tblSessions SET LockId = ...
<reponame>opengauss-mirror/Yat<filename>openGaussBase/testcase/KEYWORDS/Constraints/Opengauss_Function_Keyword_Constraints_Case0019.sql -- @testpoint: opengauss关键字constraints(非保留),作为外部数据源名,部分测试点合理报错 --关键字不带引号-成功 drop data source if exists constraints; create data source constraints; --关键字带双引号-成功 drop data source if e...
<filename>openGaussBase/testcase/KEYWORDS/Connection_Name/Opengauss_Function_Keyword_Connection_Name_Case0021.sql -- @testpoint: opengauss关键字connection_name(非保留),作为函数名,部分测试点合理报错 --关键字不带引号-成功 drop function if exists connection_name; create function connection_name(i integer) returns integer as $$ begin return i+1; ...
<reponame>sanctum32/AscemuDB<gh_stars>0 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET NAMES utf8 */; /*!50503 SET NAMES utf8mb4 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO'...
DROP TABLE ADMINISTRATEUR ; DROP TABLE BONREDUC; DROP TABLE COMMANDER; DROP TABLE FAIRE_PARTIE ; DROP TABLE PANIER ; DROP TABLE COMMERCANT ; DROP TABLE CLIENT ; DROP TABLE ENTREPRISE ; DROP TABLE POSTER_AVIS ; DROP TABLE PRODUIT ; CREATE TABLE ADMINISTRATEUR( idAdministrateur INT NOT NULL AUTO_IN...
-- Create database DROP DATABASE IF EXISTS blog_db; CREATE DATABASE blog_db; -- Use database USE blog_db;
<filename>src/Scripts/SQLServer_DBA_Scripts/Helpers/HtmlTag_Remover.sql<gh_stars>0 --========================================================= -- Author : <NAME> -- Date : 17 February 2011 -- Description : Removes all HTML tags from provided Text -- Link : Original version - -- http://blog.sqlauthority.com/2007/...
<filename>sql/khelo_cricket.sql -- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 18, 2021 at 02:43 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"; /*!40...
CREATE TABLE "COUNTERS"."WEBREQEST" ( "WEBREQESTID" NUMBER(18,0) NOT NULL ENABLE, "ID_BD" NUMBER(5,0) NOT NULL ENABLE, "PROCESSED" NUMBER(1,0) DEFAULT 0, "CCURR" VARCHAR2(1) DEFAULT '0', "CHOUR" VARCHAR2(1) DEFAULT '0', "C24" VARCHAR2(1) DEFAULT '0', "CSUM" VARCHAR2(1) DEFAULT '0', "DFROMHOUR" DATE, ...
<filename>data/train/sql/56f600ba62b770c95cf3221c5c39dc7be134f30dresults_summary.sql create view results_summary as select analysis_id, sum(rmse*case when model_id = 2 then 1 else 0 end) simple_regression, sum(rmse*case when model_id = 8 then 1 else 0 end) draw_regression, sum(rmse*case when model_id = 12 then 1 e...
-- file:join.sql ln:1953 expect:true reset enable_hashjoin
<filename>src/test/resources/sql/insert/d3ce3aca.sql<gh_stars>10-100 -- file:indirect_toast.sql ln:5 expect:true INSERT INTO toasttest(descr, f1, f2) VALUES('one-compressed,one-null', NULL, repeat('1234567890',1000))
-- --------------------------------------------------------------------------- -- RackMonkey - Know Your Racks - http://www.rackmonkey.org -- -- Version 1.2.5-1 -- -- (C)2004-2009 <NAME> (wgreen at users.sourceforge.net) -- -- Updat...
-- phpMyAdmin SQL Dump -- version 4.0.10.7 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Oct 19, 2015 at 09:59 PM -- Server version: 5.5.42-cll-lve -- PHP Version: 5.4.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_...
CREATE TABLE SUBCONTRACTING_BUD ( AWARD_NUMBER VARCHAR2(12) NOT NULL, LARGE_BUSINESS_GOAL NUMBER(12,2), SMALL_BUSINESS_GOAL NUMBER(12,2), WOMAN_OWNED_GOAL NUMBER(12,2), SDB_GOAL NUMBER(12,2), HUB_ZONE_GOAL NUMBER(12,2), VETERAN_OWNED_GOAL NUMBER(12,2), SDV_GOAL NUMBER(12,2), HBCU_GOAL NUMBER(12,2),...
UPDATE gui_element_vars set var_value = '{"A4 landscape": "A4_landscape_template.json","A4 portrait": "A4_portrait_template.json","A4 landscape": "A4_landscape_template.json", "A4 landscape official": "A4_landscape_official_template.json", "A4 portrait official": "A4_portrait_official_template.json", "A4 portrait (map...
<reponame>hiltonbruce/Igreja -- phpMyAdmin SQL Dump -- version 4.2.12deb2+deb8u2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Tempo de geração: 23/09/2016 às 11:39 -- Versão do servidor: 5.5.52-0+deb8u1-log -- Versão do PHP: 5.6.24-0+deb8u1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /...
INSERT INTO `guns`.`sys_menu` (`id`, `code`, `pcode`, `pcodes`, `name`, `icon`, `url`, `num`, `levels`, `ismenu`, `tips`, `status`, `isopen`) VALUES ('1187205060346601474', 'talHouse', '0', '[0],', '房屋管理', '', '/talHouse', '99', '1', '1', NULL, '1', '0'); INSERT INTO `guns`.`sys_menu` (`id`, `code`, `pcode`, `pcodes`, ...
INSERT INTO "D_MATERIAL_GROUP" ("ID", "F_NAME", "VERSION") VALUES ('me', 'Metal', '1'); INSERT INTO "D_MATERIAL_GROUP" ("ID", "F_NAME", "VERSION") VALUES ('pl', 'Kunststof', '1'); UPDATE "D_MATERIAL_GROUP" SET "F_NAME" = 'Kunststoff', "VERSION" = '2' WHERE "ID" = 'pl' AND "VERSION" = '1'; INSERT INTO "D_MATERIAL" ("ID...
/* Navicat Premium Data Transfer Source Server : qin Source Server Type : MySQL Source Server Version : 50726 Source Host : localhost:3306 Source Schema : test_kill Target Server Type : MySQL Target Server Version : 50726 File Encoding : 65001 Date: 07/0...
--paying a bill debits AP and credits cash. --this query creates both of those transactions. with bill_payments as ( select * from {{ref('quickbooks_bill_payments')}} ), billpayment_lines as ( select * from {{ref('quickbooks_billpayment_lines')}} ), d1 as ( select bp.id, bp.txn_date, bpl.amount,...
create or replace package body pa_01_handle_extends is pv_syex_model ot_syex_model; function merge_domains( p_syex_domain in ot_syex_domain, p_super_domain in ot_syex_domain ) return ot_syex_domain is v_syex_domain ot_syex_domain; v_syex_domaincolumn_list ct_syex_domaincolumn_list := new ct_syex_d...
<filename>dbt/include/athena/macros/materializations/models/helpers.sql {% macro set_table_classification(relation, default_value) -%} {%- set format = config.get('format', default=default_value) -%} {% call statement('set_table_classification', auto_begin=False) -%} alter table {{ relation }} set tblp...
<filename>metastore/scripts/upgrade/postgres/001-HIVE-972.postgres.sql SELECT '< HIVE-972: Support views >'; ALTER TABLE "TBLS" ADD COLUMN "VIEW_EXPANDED_TEXT" text; ALTER TABLE "TBLS" ADD COLUMN "VIEW_ORIGINAL_TEXT" text;
-- -- Test extended \du flags -- -- https://github.com/greenplum-db/gpdb/issues/1028 -- -- Problem: the cluster can be initialized with any Unix user -- therefore create specific test roles here, and only -- test the \du output for this role, also drop them afterwards CREATE ROLE test_psql_du_1 WITH ...
\o sagitta_create_indexes.out create index on catalogdb.sagitta(q3c_ang2ipix(ra,dec)); create index on catalogdb.sagitta(av); create index on catalogdb.sagitta(yso); create index on catalogdb.sagitta(yso_std); \o
<reponame>Zhaojia2019/cubrid-testcases --pass out-of-range data of time/timestamp/datetime type to the parameter --1. [error] out-of-range argument: time type select minute(time'24:00:00'); select minute(time'25:30:59 pm'); select minute(time'4:71:45 am'); select minute(time'13:24:88'); select minute(time'09:345...
<filename>src/gausskernel/storage/bulkload/dist_fdw--1.0.sql /* contrib/dist_fdw/dist_fdw--1.0.sql */ -- complain if script is sourced in psql, rather than via CREATE EXTENSION \echo Use "CREATE EXTENSION dist_fdw" to load this file. \quit CREATE FUNCTION dist_fdw_handler() RETURNS fdw_handler AS 'MODULE_PATHNAME' LA...
<reponame>Codentia/Codentia.Common.Membership IF EXISTS ( SELECT 1 FROM dbo.SysObjects WHERE id=OBJECT_ID('dbo.SystemUser_ExistsById') AND OBJECTPROPERTY(id,'IsProcedure')=1) BEGIN DROP PROCEDURE dbo.SystemUser_ExistsById END GO CREATE PROCEDURE dbo.SystemUser_ExistsById @SystemUserId INT, @Exists BIT OUTP...
<gh_stars>0 UPDATE public.user SET last_name = NULL WHERE last_name = ''; UPDATE public.user SET first_name = NULL WHERE first_name = ''; UPDATE public.user SET last_name = NULL WHERE last_name = ' '; UPDATE public.user SET first_name = NULL WHERE first_name = ' '; UPDATE public.user SET last_name = NULL WHERE last_...
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Mar 20, 2018 at 08:57 AM -- Server version: 10.1.30-MariaDB -- PHP Version: 5.6.33 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
<reponame>rizalsyamsul/LalajoFilm -- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 20, 2021 at 08:08 AM -- Server version: 10.1.38-MariaDB -- PHP Version: 7.3.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zo...
<gh_stars>0 /* 1. */ SELECT stadtname,COUNT(*) FROM dbsys08.stadt,dbsys08.ferienwohnung WHERE (stadt.plz = ferienwohnung.plz) GROUP BY (stadt.stadtname); /* 2. */ SELECT fw_name, AVG(sterne) FROM dbsys08.ferienwohnung fw,dbsys08.buchung b WHERE fw.landname = 'Spanien' AND b.ferienwohnung_ID = fw.ferienwohnung_ID GROU...
<filename>src/sql/buildTestData.sql CREATE TABLE users ( username character varying(100) NOT NULL, password character varying(100) NOT NULL, enabled boolean DEFAULT true, locked boolean DEFAULT false, failed_logins integer DEFAULT 0, last_login_date timestamp without time zone, CONSTRAINT "PK_USER" PRIMAR...
-- name: create-albums-table CREATE TABLE IF NOT EXISTS albums ( album_id INT UNSIGNED NOT NULL AUTO_INCREMENT, album_name VARCHAR(128) NOT NULL, artist_id INT UNSIGNED NOT NULL, release_date DATE NOT NULL, genre VARCHAR(64) NOT NULL, PRIMARY KEY (album_id), FOREIGN KEY (artist_id) REFERENCES artists(arti...
SELECT count(*) FROM pTab SELECT activecampaign FROM gamestateerror loading activecampaignUPDATE gamestate SET activecampaign = ?, version = ?;update campaign progress in database for %ssave progressINSERT OR REPLACE INTO maps (campaignid, mapid, locked, time, finishPoints, stars, version) VALUES (?,...
<filename>agi_avdpool_sogis/agi_dm01avso24_hgpkt.sql SELECT hoheitsgrenzpunkt.geometrie AS wkb_geometry, hoheitsgrenzpunkt.identifikator, hoheitsgrenzpunkt.lagegen, CASE WHEN hoheitsgrenzpunkt.lagezuv = 'ja' THEN 0 WHEN hoheitsgrenzpunkt.lagezuv = 'nein' THEN ...
CREATE TABLE Board ( ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY, `Name` VARCHAR(200) NOT NULL, IsActive tinyint not null default 1 ); INSERT INTO Board ( `Name` ) Values ( 'Naseif' ); INSERT INTO Board ( `Name` ) Values ( 'Stefan' );
<filename>Question4.sql insert into book values (11, 'The Pragmatic Programmer'); insert into member values (43, "<NAME>"); insert into checkout_item (member_id, book_id) values (43,11); select name from member where id in (select member_id from checkout_item where book_id in (select id from book where title = "The Pra...
create table if not exists tb_user(id serial primary key, name varchar(50), login varchar(50), password varchar(15), email varchar(50), create_date timestamp);
/* # # (c) Copyright 2016 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # 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 # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2....
<reponame>mdanese1954/mikes-uaa<filename>server/src/main/resources/org/cloudfoundry/identity/uaa/db/sqlserver/V3_10_2__Add_Created_By_To_Oauth_Client_Details.sql ALTER TABLE oauth_client_details ADD created_by CHAR(36) DEFAULT NULL;
<filename>src/Stats.Warehouse/Programmability/Stored Procedures/dbo.CleanupFactIpAddress.sql CREATE PROCEDURE [dbo].[CleanupFactIpAddress] AS BEGIN DELETE FROM [dbo].[Fact_IpAddress] WHERE [Id] NOT IN ( SELECT DISTINCT [Fact_EdgeServer_IpAddress_Id] FROM [dbo].[Fact_Download] (NOLOCK) ) AND [Id]...
<reponame>GarrisonC/zrp /* Navicat Premium Data Transfer Source Server : 本地连接 Source Server Type : MySQL Source Server Version : 80013 Source Host : localhost:3306 Source Schema : zrp Target Server Type : MySQL Target Server Version : 80013 File Encoding : 65001 Date...
<reponame>nickschwab/sdl_server<gh_stars>10-100 -- APP SERVICES UP MIGRATION -- DROP VIEW IF EXISTS view_mapped_permissions_production; DROP VIEW IF EXISTS view_mapped_permissions_staging; DROP VIEW IF EXISTS view_mapped_permissions; DROP VIEW IF EXISTS view_function_group_info; ALTER TABLE public.permissions ADD COLU...
<gh_stars>10-100 import Stdlib import Pair import Sum import Map import Array -- import PDF libraries: import PdfDecl -- not directly needed/wanted -- import PdfDeclStubs -- FIXME: TESTINGONLY import GenPdfValue import PdfValue import Unicode ---- CodeRange type ----------------------------------------------...
<filename>sql/_23_apricot_qa/_02_performance/_02_function_based_index/cases/function_based_index_function_UNIX_TIMESTAMP.sql<gh_stars>1-10 --+ holdcas on; set system parameters 'dont_reuse_heap_file=yes'; create table t1(a char(1200), b varchar(1200), c nchar(1200), d NCHAR VARYING(1200), e BIT(1200), f BIT VARY...
<gh_stars>0 -- @testpoint: opengauss关键字Listen非保留),作为索引名,部分测试点合理报错 --前置条件,创建一个表 drop table if exists explain_test; create table explain_test(id int,name varchar(10)); --关键字不带引号-成功 drop index if exists Listen; create index Listen on explain_test(id); drop index Listen; --关键字带双引号-成功 drop index if exists "Listen"; creat...
<reponame>RajakumaranC/Yaos CREATE TABLE [Person].[EmailAddress] ( [BusinessEntityID] INT NOT NULL, [EmailAddressID] INT IDENTITY (1, 1) NOT NULL, [EmailAddress] NVARCHAR (50) NULL, [rowguid] UNIQUEIDENTIFIER CONSTRAINT [DF_EmailAddress_rowguid] DEFAULT (newi...
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Хост: localhost:3306 -- Время создания: Янв 22 2021 г., 16:53 -- Версия сервера: 8.0.22 -- Версия PHP: 7.3.25 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR...
<filename>quote.sql -- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Sep 02, 2019 at 05:54 AM -- Server version: 10.1.41-MariaDB-cll-lve -- PHP Version: 7.2.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zon...
CREATE TABLE public."ecommerce_order" ( id serial NOT NULL, client_id varchar NOT NULL, created_on timestamp(0) NOT NULL DEFAULT now(), payment_plan varchar NOT NULL, products varchar NOT NULL, status varchar NOT NULL, PRIMARY KEY (id) ); CREATE TABLE public."ecommerce_order_record" ( i...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 27 Agu 2020 pada 12.35 -- Versi server: 10.4.11-MariaDB -- Versi PHP: 7.4.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET...
INSERT INTO story (storyid, title, url) VALUES (1, 'Realtek RTL836x series of Ethernet switch ICs has a 8051 hidden inside', 'https://twitter.com/whitequark/status/1175701730819895296'); INSERT INTO story (storyid, title, url) VALUES (2, 'I made a neural net that analyzes privacy policies', 'https://useguard.com/'); IN...
<reponame>siyoutechweb/s2c-PROD<filename>database/seeds/s2cSqlSeeders/S2C_member_levels.sql -- MySQL dump 10.13 Distrib 8.0.19, for Win64 (x86_64) -- -- Host: 172.16.58.3 Database: S2C -- ------------------------------------------------------ -- Server version 8.0.19 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARAC...
<reponame>BookStore2G/TokoBuku -- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: May 28, 2018 at 07:30 AM -- Server version: 10.1.13-MariaDB -- PHP Version: 5.6.23 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTE...
<filename>smk-bayar-spp.sql -- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 08 Mar 2021 pada 09.59 -- Versi server: 10.4.11-MariaDB -- Versi PHP: 7.4.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @O...
CREATE DATABASE feedback_system; USE feedback_system; CREATE DATABASE login_credentials_db; USE login_credentials_db; CREATE TABLE login_credentials( user_id varchar(10) PRIMARY KEY, password varchar(20) NOT NULL, role varchar(10) NOT NULL ); INSERT INTO login_credentials VALUES('ADM101', 'Admin@123', 'adm...
select distinct x.publisher from book as x,book as y where x.publisher=y.publisher and x.name!=y.name order by publisher;
<reponame>camromere/cmrsql USE Master; GO SET NOCOUNT ON -- 1 - Variable declaration DECLARE @ClientName varchar(60) DECLARE @DataPath nvarchar(500) DECLARE @DirTree TABLE (subdirectory nvarchar(255), depth INT) -- 2 - Initialize variables SET @ClientName = 'TestClientcmr'; SET @DataPath = 'b:\Client Rel...
<reponame>rickyork/Hot-Toddy DROP TABLE `{table}`
USE SQLBook; GO WITH Seed AS( SELECT o.ZipCode, z.pctInCollege, z.pctChild, z.MedianAge, z.pctMales, z.pctWorkAtHome, z.pctAsian1, z.pctEmployedFemales, z.MedianEarnings, o.OrderDate, o.TotalPrice FROM Orders o INNER JOIN ZipCensus z ON z.zcta5=o.Zi...
CREATE TRIGGER tU_Person ON Person FOR UPDATE AS /* ERwin Builtin Trigger */ /* UPDATE trigger on Person */ BEGIN DECLARE @numrows int, @nullcnt int, @validcnt int, @insperson_id uniqueidentifier, @errno int, @errmsg varchar(255) SELECT @numrow...
-- cast.test -- -- db eval {PRAGMA encoding} PRAGMA encoding
<reponame>bduggan/gcis<gh_stars>10-100 alter table article add unique(doi);
<reponame>neptuneresearch/monero-sql<filename>ringsql_count/txinput_rct_count/tx_input_list_rct_count_tx_version.sql -- Count transactions, per HF version, in current ring-membership-sql data CREATE MATERIALIZED VIEW tx_input_list_rct_count_tx_version AS ( WITH subquery AS ( SELECT DISTINCT bloc...
<filename>_o/dev/box/framework/dotphp/DelMaster/_source/xend/bunch/project/SHIM/resource/dbase/shimdb_SET01.sql -- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server version: 5.5.24-log - MySQL Community Server (GPL) -- Server OS: ...
<reponame>daileyet/Apps4APEX<gh_stars>1-10 create or replace PACKAGE "AMB_LOGGER" AS --@author: <EMAIL> --@desc: self service app logger --@since: 2014/12/4 L_DEBUG constant integer := 1; L_INFO constant integer := 2; L_WARN constant integer := 3; L_ERROR constant integer...
<gh_stars>1-10 whenever sqlerror exit sql.sqlcode set serverout on set verify on set echo on ------- Mandatory variables: ------- -- def v_table_name = Table with hashes = T_SOMETHING -- var v_table_cols = All columns of the normal table except CON_ID -- var v_table_id_cols = Columns used to identify a row wit...
-- MySQL dump 10.13 Distrib 8.0.22, for macos10.15 (x86_64) -- -- Host: 127.0.0.1 Database: calculator -- ------------------------------------------------------ -- Server version 8.0.23 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS...
{% macro union_metrics_query(temp_metrics_tables) %} {%- if temp_metrics_tables | length > 0 %} {%- set union_temp_query -%} with union_temps_metrics as ( {%- for temp_table in temp_metrics_tables -%} select * from {{- temp_table -}} {%- if not loop.la...
select 7 as SRTY, SALINV.DAT, ACC as ACDB, SANM as SADNM, SAID as SADID, SATY as SADTY, PAYMFR.TOT as DEBT, 'RECEIVABLE' as ACCR, DBCR.NME as SACNM, DBCR.IID as SACID, 1002 as SACTY, PAYMFR.TOT as CRED from PAYMFR join SALINV on SALINV.IID=PAYMFR.INV join DBCR on DBCR.IID=SALINV.DBCR where SALINV.RVID is null and SALI...
ALTER TABLE lab_group ADD COLUMN code VARCHAR(5) AFTER name; UPDATE lab_group SET code = substring(name,1,4); ALTER TABLE lab_group MODIFY COLUMN code VARCHAR(5) NOT NULL; ALTER TABLE lab_group ADD UNIQUE INDEX lab_group_code_uk_ind(code); ALTER TABLE project DROP INDEX project_code_uk_ind; ALTER TABLE project ADD ...
/* Copyright 2020 <NAME>, Strack Software Development 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 a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to ...
<gh_stars>0 -- @testpoint: opengauss关键字of(非保留),作为同义词对象名,部分测试点合理报错 --前置条件 drop table if exists explain_test; create table explain_test(id int,name varchar(10)); --关键字不带引号-成功 drop synonym if exists of; create synonym of for explain_test; insert into of values (1,'ada'),(2, 'bob'); update of set of.name='cici' where of...
CREATE TABLE `records` ( `record_id` int(11) unsigned NOT NULL AUTO_INCREMENT, `account_id` int(11) unsigned NOT NULL, `cluster_id` int(11) unsigned DEFAULT NULL, `gamespace_id` int(11) unsigned NOT NULL, `leaderboard_id` int(11) unsigned NOT NULL, `expire_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON...
<reponame>VenelinKadankov/CS-DB-MSSQL CREATE TABLE Majors ( MajorID INT IDENTITY PRIMARY KEY, [Name] VARCHAR(50) ) CREATE TABLE Subjects ( SubjectID INT IDENTITY PRIMARY KEY, SubjectName VARCHAR(50) ) CREATE TABLE Students ( StudentID INT IDENTITY PRIMARY KEY, StudentNumber NVARCHAR(10), StudentName VARC...
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Sep 03, 2021 at 02:55 PM -- Server version: 5.7.33 -- PHP Version: 7.4.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@...
<filename>lista-09/scripts/1-a.sql<gh_stars>0 CREATE VIEW conveniopacientes AS SELECT DISTINCT DESC_CONVENIO,COUNT(*) AS numero_pacientes FROM convenio JOIN paciente ON convenio.COD_CONVENIO=paciente.CONV_PAC GROUP BY convenio.DESC_CONVENIO;
<reponame>mskakuj/gugik2osm -- dodaj simc i ulic jeżeli zgadzają się z teryt - Kraków, Łódź, <NAME> Wrocław update prg.pa set ( teryt_msc, teryt_simc, teryt_ulica, teryt_ulic ) = ( case when substring(prg.pa.terc6, 1, 4) in ('0264', '1061', '1261', '1465', '3064') then prg.pa.msc else s1...
<filename>VS2013_PROJECT/DNN_DB/dbo/Stored Procedures/dnn_CoreMessaging_GetMessageThread.sql<gh_stars>1-10 CREATE PROCEDURE [dbo].[dnn_CoreMessaging_GetMessageThread] @ConversationID int, @UserID int, @AfterMessageID int, @NumberOfRecords int, @SortField nvarchar(25) = 'CreatedOnDate', @SortAscending bit = 0 ...
<reponame>GunnerJnr/_CodeInstitute<filename>Stream-2/Back-End-Development/13.Data-Creation-and-Modification/1.How-To-Insert-Information-Into-A-Table/2. Insert_Person_Into_Table.sql<gh_stars>1-10 /** * Insert a new record into the 'people' table */ INSERT INTO `mydb`.`people` ( `first_name`, `last_name`, `DO...
<filename>airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_nested_streams/first_output/airbyte_incremental/test_normalization/nested_stream_with_c__lting_into_long_names.sql create table "postgres".test_normalization."nested_stream_with_c__lting_into_lo...
<reponame>rhomicom-systems-tech-gh/Rhomicom-DB-Scripts /* Formatted on 10/6/2014 7:24:30 PM (QP5 v5.126.903.23003) */ CREATE TABLE ATTN.ATTN_ATTENDANCE_RECS_CNTR ( CNTR_ID NUMBER NOT NULL, RECS_HDR_ID NUMBER, METRIC_NAME_DESC VARCHAR2 (200 BYTE), CNTR_RESULT NUMBER NOT NULL, ...
<reponame>Shuttl-Tech/antlr_psql -- file:rangefuncs.sql ln:356 expect:true CREATE OR REPLACE FUNCTION foob(in f1 int, inout f2 int, out text) AS $$select $2-1, $1::text || 'z'$$ LANGUAGE sql
CREATE OR REPLACE VIEW Lekarze_view AS SELECT Konta.login, Konta.haslo, osoby.imie, osoby.nazwisko, osoby.data_urodzenia, osoby.pesel, kontakty.telefon, kontakty.email, adresy.miasto, adresy.ulica, adresy.nr_domu, adresy.nr_mieszkania, adresy.kod_pocztowy, specjalizacje.nazwa_specjalizacji, specja...
--counting select count(*), count(distinct line) from dftree where path like '%not.patternProperties'; --having a look at the 15 different cases select pkey, key, value, sibkeys, count(*) from treewithsiblings where path like '%.not.patternProperties' group by pkey, key, value, sibkeys; --analisyng the contexts --gro...
SELECT email, profile -> 'name' as Nachname, profile -> 'firstname' as name, customer_id ,type from landlord."user" where customer_id in (SELECT customer_id from landlord.customerproduct cp WHERE cp.duedate > now() AND enabled = true) AND email NOT LIKE '%immomio.de' AND email not like '%employee.de' ORDER BY custome...
-- INSERT INTO user (id, firstName, lastName, password, username, userRole) VALUES (1, 'Admin', '', '<PASSWORD>', 'admin', 'ROLE_ADMIN'); -- INSERT INTO user (id, firstName, lastName, password, username, userRole) VALUES (2, 'User', '', '<PASSWORD>', 'user', 'ROLE_USER');
select fn_db_add_column('storage_domain_static', 'storage_comment', 'text');
# ************************************************************ # Sequel Pro SQL dump # Version 4541 # # http://www.sequelpro.com/ # https://github.com/sequelpro/sequelpro # # Host: localhost (MySQL 5.6.35) # Database: blog # Generation Time: 2018-08-27 08:09:29 +0000 # **************************************************...
<filename>Database/VersionUpgrade_2.12.0_3.0.0/ProfilesRNS_MigrateWebsitesData.sql /******************************* * * Convert Websites Data. * If you did not have the open social websites app installed you can skip this script * * This Script is split into 3 sections * 1. Convert website data to the new format...
CREATE TABLE IF NOT EXISTS `items` ( `owner_id` INT, `object_id` INT NOT NULL DEFAULT 0, `item_id` SMALLINT UNSIGNED NOT NULL, `count` INT UNSIGNED NOT NULL DEFAULT 0, `enchant_level` SMALLINT UNSIGNED NOT NULL DEFAULT 0, `loc` VARCHAR(10), `loc_data` INT, `custom_type1` INT NOT NULL DEFAULT 0, `custo...
<gh_stars>0 CREATE OR REPLACE FUNCTION trainview_gtfs_shapes(isotime TEXT) RETURNS JSON AS $$ DECLARE retval JSON; BEGIN WITH _shapes AS ( SELECT _shapes.shape_id, ST_MakeLine(array_agg(ST_SetSRID(ST_MakePoint(shape_pt_lon, shape_pt_lat), 4326))) geom FROM ( S...