sql
stringlengths
6
1.05M
COPY ( SELECT json_build_object( 'model_name', coalesce(rfam.short_name, model.model_name), 'model_id', id, 'model_source', model.model_source, 'model_alias', model.model_name, 'model_length', model.model_length, 'model_basepairs', model.model_basepair_count ) FROM rnc_secondary_structur...
<reponame>viswaratha12/dbwarden /****** Object: View [dbo].[V_GPM_Analysis_Job_Report] ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE VIEW [dbo].[V_GPM_Analysis_Job_Report] AS SELECT CONVERT(varchar(32), T_Analysis_Job.AJ_jobID) AS Job, T_Analysis_State_Name.AJS_name AS State, 'http:...
<filename>demo/database/versiontrace.sql -- MySQL dump 10.13 Distrib 8.0.20, for macos10.15 (x86_64) -- -- Host: localhost Database: versiontrace -- ------------------------------------------------------ -- Server version 8.0.20 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CH...
<reponame>jorikvankemenade/enduro ALTER TABLE collection DROP COLUMN `started_at`; DROP INDEX `collection_started_at_idx` ON `collection`;
-- start_ignore SELECT s.groupid, s.num_running, s.num_queueing, s.num_queued, s.num_executed FROM pg_resgroup_get_status(NULL::oid) s(groupid, num_running, num_queueing, num_queued, num_executed, total_queue_duration, cpu_usage, memory_usage); -- end_ignore CREATE TEMP TABLE resgroup_function_test(LIKE gp_toolkit.gp_r...
<gh_stars>1-10 -- create a hash partition table on string field that using to_time function and query all partitions CREATE TABLE za ( store_id string ) PARTITION BY HASH(to_time(store_id)) PARTITIONS 4; select * from db_partition where class_name like '%za%' order by 2; drop class za;
-- @testpoint:opengauss关键字parameter_mode(非保留),作为用户组名 --关键字不带引号-成功 drop group if exists parameter_mode; create group parameter_mode with password '<PASSWORD>'; drop group parameter_mode; --关键字带双引号-成功 drop group if exists "parameter_mode"; create group "parameter_mode" with password '<PASSWORD>'; drop group "paramete...
<filename>database/db_pesta.sql -- MySQL dump 10.17 Distrib 10.3.15-MariaDB, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: db_pesta -- ------------------------------------------------------ -- Server version 10.3.15-MariaDB-1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!4010...
<filename>d1/ltable.sql<gh_stars>0 CREATE TABLE lists ( lID SERIAL PRIMARY KEY, pID INT REFERENCES people NOT NULL, lNAME varchar(50) NOT NULL );
/* Navicat MySQL Data Transfer Source Server : 127.0.0.1 Source Server Version : 50519 Source Host : 127.0.0.1:3306 Source Database : order Target Server Type : MYSQL Target Server Version : 50519 File Encoding : 65001 Date: 2019-01-29 12:56:16 */ SET FOREIGN_KEY_CHECKS=0; -- ---...
/* 2019-10-25 Servers Activity and Utilization Returns discovery, RU, and service connection information to give a sense of when this device was last discovered or how it has been used. Includes fields like last attempted/successful discovery, last service comms and software install, last login, general device details ...
<reponame>developersworkspace/EPONS IF OBJECT_ID('[ValueObjects].[Cities]', 'U') IS NOT NULL DROP TABLE [ValueObjects].[Cities]; CREATE TABLE [ValueObjects].[Cities] ( [CityId] UNIQUEIDENTIFIER NOT NULL, [ProvinceId] UNIQUEIDENTIFIER NOT NULL, [Name] VARCHAR(256) )
INSERT INTO `roles` (`id`, `name`, `display_name`, `description`, `created_at`, `updated_at`) VALUES (1, 'admin', NULL, 'Admin', '2018-06-25 03:49:32', '2018-06-25 03:49:32'), (2, 'user', NULL, 'User', '2018-06-25 03:49:42', '2018-06-25 03:49:42'); INSERT INTO `languages` (`id`, `sort_id`, `slug`, `title`, `created_a...
<filename>dev_fr_20190125150205.sql -- -- PostgreSQL database dump -- -- Dumped from database version 10.6 -- Dumped by pg_dump version 10.6 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_catal...
<reponame>StephenDevenney/library-tracker-app<gh_stars>0 CREATE TABLE [book].[BookCollection] ( [BookId] INT IDENTITY(1,1) PRIMARY KEY, [FK_UserId] INT NOT NULL, [BookName] NVARCHAR(50) NOT NULL, [BookSubTitle] NVARCHAR(50) NOT NULL, [ISBN] NVARCHAR(50) NOT NULL, [Description] NVARCHAR(MAX) NO...
<filename>migrations/V20__movie_queue_collection_idx_unique.sql ALTER TABLE movie_queue ADD UNIQUE (collection_idx);
<gh_stars>1-10 SET QUOTED_IDENTIFIER ON GO CREATE VIEW vw_orders WITH SCHEMABINDING AS SELECT O.CustomerID, Sum(isnull(ol.Quantity,0)) AS TotalQuantity, Sum(isnull(ol.unitprice,0)) as price, COUNT_BIG(*) AS row_count FROM Sales.Orders o JOIN Sales.OrderLines ol ON o.OrderID=ol.OrderID GROUP BY o.CustomerID GO CRE...
alter table "public"."users" add constraint "users_oauth_id_key" unique (oauth_id); alter table "public"."users" alter column "oauth_id" drop not null; alter table "public"."users" add column "oauth_id" text;
CREATE TABLE public.product ( id serial NOT NULL, name text NOT NULL, price money NOT NULL, description text, category text, PRIMARY KEY (id) ) WITH ( OIDS = FALSE ) TABLESPACE pg_default; ALTER TABLE public.product OWNER to sa;
-- file:interval.sql ln:186 expect:true SELECT interval '1 2:03' day to minute
<gh_stars>1000+ {{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} -- SQL model to build a hash column based on the values of this record select {{ dbt_utils.surrogate_key([ '_airbyte_partition_hashid', 'id', ]) }} as _airbyte_double_array_data_hashid, tmp.* fro...
<gh_stars>0 -- CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; DROP DATABASE IF EXISTS nakama CASCADE; CREATE DATABASE IF NOT EXISTS nakama; SET DATABASE = nakama; CREATE TABLE IF NOT EXISTS users ( id UUID NOT NULL PRIMARY KEY DEFAULT gen_random_uuid(), email VARCHAR NOT NULL UNIQUE, username VARCHAR NOT NUL...
<filename>backend/de.metas.adempiere.adempiere/migration/src/main/sql/postgresql/system/10-de.metas.adempiere/5513990_sys_M_Product_IsQuotationGroupping.sql -- 2019-02-27T11:11:30.148 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnNam...
DELIMITER / ALTER TABLE IACUC_PROTO_STUDY_GROUP_LOCS ADD CONSTRAINT UQ_IACUC_PROTO_STUDY_GROUP_LOC UNIQUE (PROTOCOL_NUMBER, SEQUENCE_NUMBER, IACUC_PROTOCOL_STUDY_GROUPS_ID, STUDY_GROUP_LOCATION_ID) / DELIMITER ;
<filename>scripts/upgrades/2.3 to 2.4/db-updates/2013-09-21.sql -- -- Copyright 2005-2015 The Kuali Foundation -- -- Licensed under the Educational Community 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://...
<filename>postgis/build/postgis-2.5.4/raster/test/regress/rt_isempty.sql ----------------------------------------------------------------------- -- -- Copyright (c) 2011 <NAME> <<EMAIL>> -- Modifications Copyright (c) 2017 - Present Pivotal Software, Inc. All Rights Reserved. -- -- This program is free software; you ca...
/*Listar código, nombre, continente y población de todos los países. (Se esperan 4 columnas y 239 registros).*/ SELECT country.Code, country.Name, country.Continent, country.Population FROM world.country;
<reponame>scossin/Achilles -- 12 Number of persons by race and ethnicity --HINT DISTRIBUTE_ON_KEY(stratum_1) select 12 as analysis_id, CAST(RACE_CONCEPT_ID AS VARCHAR(255)) as stratum_1, CAST(ETHNICITY_CONCEPT_ID AS VARCHAR(255)) as stratum_2, cast(null as varchar(255)) as stratum_3, cast(null as varchar(255)) as str...
<filename>framework/resources/Functional/limit0/window_functions/multiple_partitions/data/q7.sql<gh_stars>0 select c_date, c_time, rank() over(partition by c_date order by c_time nulls first), rank() over(partition by c_time order by c_time nulls first) from j6_v order by 1,2 nulls first;
 DELETE FROM [dbo].[EntityIdentifier] GO DELETE FROM [dbo].[EntityExtension] GO DELETE FROM [dbo].[EntityNameComponent] GO DELETE FROM [dbo].[EntityName] GO DELETE FROM [dbo].[EntityAddressComponent] GO DELETE FROM [dbo].[EntityAddress] GO DELETE FROM [dbo].[EntityAssociation] GO DELETE FROM [dbo].[Enti...
<gh_stars>100-1000 ALTER TABLE workspaces DROP COLUMN change_id;
<reponame>yuanweikang2020/canal CREATE TABLE `tb_bxtlrumrtn` ( `col_uttbttlgkx` smallint(181) unsigned DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; CREATE TABLE `tb_irclltefag` ( `col_iabzixqyhm` tinyblob, `col_otoxjlwatj` date DEFAULT '2019-07-04', UNIQUE KEY `col_otoxjlwatj` (`col_otoxjlwatj`) ) ENGI...
CREATE OR REPLACE FUNCTION @extschema@.CDB_Organization_Member_Group_Role_Member_Name() RETURNS TEXT AS $$ SELECT 'cdb_org_member'::text || '_' || md5(current_database()); $$ LANGUAGE SQL STABLE PARALLEL SAFE; DO LANGUAGE 'plpgsql' $$ DECLARE cdb_org_member_role_name TEXT; BEGIN cdb_org_member_role_name ...
<reponame>cp3402-students/a2-cp3402-2019-team10<gh_stars>1-10 -- MySQL dump 10.13 Distrib 5.7.24, for Win64 (x86_64) -- -- Host: localhost Database: staging -- ------------------------------------------------------ -- Server version 5.7.24 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 ...
alter table mitigatingcircumstancessubmission add column contacted boolean, add column contacts varchar(255)[], add column contactOther text, add column noContactReason bytea ;
CREATE DATABASE wordpress; GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'admin' WITH GRANT OPTION; FLUSH PRIVILEGES;
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Počítač: localhost -- Vytvořeno: Stř 01. dub 2020, 20:00 -- Verze serveru: 5.5.62-0ubuntu0.14.04.1 -- Verze PHP: 7.1.22-1+ubuntu14.04.1+deb.sury.org+1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!4...
<reponame>SknightS/staffnetwork<filename>db/staffnet.sql -- MySQL Script generated by MySQL Workbench -- Wed Jan 3 01:35:02 2018 -- Model: New Model Version: 1.0 -- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN...
<filename>src/Scripts/SQLServer_DBA_Scripts/ServerInfo/IndexInfo.sql -- ============================================= -- PK Harici indexleri kolonlar ile birlikte dönen CTE -- ============================================= WITH CTE as ( SELECT ic.[index_id] + ic.[object_id] AS [IndexId],t.[name] AS [TableName] ...
<filename>notequal.sql -- Not equal SELECT title, released_year FROM books WHERE released_year != 2000 AND released_year != 2002 AND released_year != 2004 AND released_year != 2006 AND released_year != 2008 AND released_year != 2010 AND released_year != 2...
<reponame>edigonzales/oereb-gretljobs SELECT t_id AS t_id, -1::int8 AS t_basket, 'dm01vch24lv95dbodenbedeckung_projboflaeche'::varchar(60) AS t_type, NULL::varchar(200) AS t_ili_tid, geometrie, qualitaet, art, entstehung FROM agi_dm01avso24.bodenbedeckung_projboflaeche;
-- phpMyAdmin SQL Dump -- version 4.7.7 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 16, 2019 at 05:59 PM -- Server version: 10.1.30-MariaDB -- PHP Version: 7.2.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
<gh_stars>0 select o.Id, o.ShipCountry, (case when o.ShipCountry in ('USA', 'Mexico', 'Canada') then 'NorthAmerica' else 'OtherPlace' end ) FROM 'Order' as o WHERE Id >= 15445 ORDER BY Id LIMIT 20
CREATE DATABASE IF NOT EXISTS ims; use IMS; DROP TABLE IF EXISTS customers; DROP TABLE IF EXISTS items; DROP TABLE IF EXISTS orders; DROP TABLE IF EXISTS orderitem; INSERT INTO `customers` (`first_name`,`surname`) VALUES ("Amethyst","Howard"); INSERT INTO `items` (`name`,`price`) VALUES ("Gone Girl","5.99"); INSER...
<reponame>NilsFradin/AFrame-CV-NilsFradin<filename>resources/AFrame-CV-NilsFradin.sql -- phpMyAdmin SQL Dump -- version 4.6.6deb4 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Nov 21, 2017 at 10:47 AM -- Server version: 10.1.26-MariaDB-0+deb9u1 -- PHP Version: 7.0.19-1 SET SQL_MODE = "N...
<filename>data/sql/metadata.sql INSERT INTO "metadata" VALUES('EPSG.VERSION', 'v9.6.3'); INSERT INTO "metadata" VALUES('EPSG.DATE', '2019-05-25');
/* Navicat MySQL Data Transfer Source Server : local Source Server Version : 50624 Source Host : localhost:3306 Source Database : try_gallery Target Server Type : MYSQL Target Server Version : 50624 File Encoding : 65001 Date: 2017-05-03 17:24:15 */ SET FOREIGN_KEY_CHECKS=0; -- -...
<reponame>13523757729/ahc /*---------彩妆数据库的搭建---------*/ #设置客户连接服务器的编码为UTF8 SET NAMES UTF8; #丢弃指定的数据库,如果存在的话 DROP DATABASE IF EXISTS AHC; #创建数据库并设置存储的编码为UTF8 CREATE DATABASE AHC CHARSET=UTF8; #进入数据库 USE AHC; /*-----创建商品分类表-----*/ CREATE TABLE AHC_laptop_family( fid INT PRIMARY KEY AUTO_INCREMENT, name VARCHAR(32)...
CREATE TABLE country (id VARCHAR(2) NOT NULL, name VARCHAR(64) NOT NULL, PRIMARY KEY(id)); INSERT INTO "country" ("id", "name") VALUES ('ZA', 'Afrika Kusini'); INSERT INTO "country" ("id", "name") VALUES ('AF', 'Afuganistani'); INSERT INTO "country" ("id", "name") VALUES ('IS', 'Aislandi'); INSERT INTO "country" ("id"...
CREATE PROCEDURE [dbo].[WebPageElement_GetCount] ( @RecordId int = -1, @ObjectId int = -1, @TemplatePanelId int = -1 ) AS SET NOCOUNT ON SELECT COUNT(*) FROM WebPageElement WHERE (@RecordId = -1 OR RecordId = @RecordId) AND (@TemplatePanelId = -1 OR TemplatePanelId = @TemplatePanelId) AND (@Obje...
Alter table tblPeanut add MaximumParticipations INT null;
Select name from Employee where salary > 2000 and months < 10 order by employee_id asc;
-- MySQL Script generated by MySQL Workbench -- Tue Jun 12 18:19:32 2018 -- Model: New Model Version: 1.0 -- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TR...
<gh_stars>10-100 DROP TABLE contact_history; UPDATE schemainfo SET version=3; COMMIT;
<filename>src/main/sql/notebooks/VoterReportNotebook.sql -- Common Table Expression Query to find the biggest change in registration counts -- by city and zip WITH may_voters AS ( SELECT place_name, zip_code, count(*) FROM VOTER_REPORT_FACT JOIN DATE_DIM ON date_key = date_id JOIN ...
-- file:updatable_views.sql ln:961 expect:true DELETE FROM rw_view1 WHERE id = 1 AND snoop(data)
DROP TABLE IF EXISTS hmda_public.lar_2009; CREATE TABLE hmda_public.lar_2009( activity_year VARCHAR, respondent_id VARCHAR, agency_code VARCHAR, loan_type VARCHAR, loan_purpose VARCHAR, occupancy_type VARCHAR, loan_amount VARCHAR, action_taken VARCHAR, msa_md VARCHAR, state_c...
-- The ".<cmd>" instructions are to be executed with sqlite3.exe -- Follow step A) if you used dirt-rally-time-recorder PRIOR TO VERSION 1.0.0 -- Follow step B) if you used dirt-rally-time-recorder prior to version 2.6.2, but DID NOT use the bundled version (.exe). -- step A) -- Commit <PASSWORD> .open dirtrally-l...
insert into ReportedDifficulties( Puzzle, BeginIso8601, EndIso8601, ActiveMilliseconds, ReportedDifficulty, GameInstanceKey) values( :puzzle, :beginIso8601, :endIso8601, :activeMilliseconds, :reportedDifficulty, :gameInstanceKey);
/* Navicat MySQL Data Transfer Source Server : local_mysql Source Server Version : 50717 Source Host : localhost:3306 Source Database : shopping Target Server Type : MYSQL Target Server Version : 50717 File Encoding : 65001 Date: 2017-09-15 20:55:39 */ SET FOREIGN_KEY_CHECKS=0; -...
/** * <update id="20170804-01" applyRange="0.2.0.0-0.9.0.2" invariantName="npgsql"> * <summary>Fixes an issue with locked accounts set to 9999 as date</summary> * <remarks>Fixes issue with locked accounts</remarks> * <isInstalled>select ck_patch('20170804-01')</isInstalled> * </update> */ BEGIN TRANSACTION ;...
<reponame>thibauthourlier/ensembl -- Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute -- Copyright [2016-2018] EMBL-European Bioinformatics Institute -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in complian...
--Returns the list of Parent Group Ids for a given Group Id CREATE FUNCTION [dbo].[GetParentAppSettingGroups] ( @AppSettingGroupId INT ) RETURNS @Result TABLE ([Id] INT, [ParentGroupId] INT) AS BEGIN WITH Result ([Id],[ParentGroupId]) AS ( SELECT [AppSettingGroupId],[ParentGroupId] ...
SELECT tab0.v1 AS v1 , tab6.v7 AS v7 , tab4.v5 AS v5 , tab5.v6 AS v6 , tab3.v4 AS v4 , tab2.v3 AS v3 , tab1.v2 AS v2 FROM (SELECT obj AS v1 FROM sorg__contactPoint$$1$$ WHERE sub = 'wsdbm:Retailer7457' ) tab0 JOIN (SELECT sub AS v1 , obj AS v2 FROM wsdbm__likes$$2$$ ) tab1 ON(tab0.v1=tab1.v1) JO...
{% macro log_info(message) %} {{ return(adapter.dispatch('log_info', 'dbt_utils')(message)) }} {% endmacro %} {% macro default__log_info(message) %} {{ log(dbt_utils.pretty_log_format(message), info=True) }} {% endmacro %}
<reponame>plezentek/dbshepherd<filename>examples/schema/202102021430_remove_report.down.sql DELETE FROM reports WHERE id = 1;
/*=========================1===========================*/ DROP TABLE IF EXISTS `content_tag_ytex_T047_unique`; CREATE TABLE `content_tag_ytex_T047_unique` ( `blogId` varchar(40) DEFAULT NULL, /* blog id*/ `target` varchar(300) DEFAULT NULL, /* the term found in the blog*/ `cui` varchar(45) DEFAULT NU...
<gh_stars>0 --+ holdcas on; set system parameters 'dont_reuse_heap_file=yes'; create class imployees08 (imp08_id int); create class aonuses08 (attr imployees08, bonus int); create class imp08 (attr imployees08, salary int); insert into imployees08 values (153) into :a1; insert into aonuses08 values (:a1, 100); insert ...
CREATE TABLE IF NOT EXISTS `genres` ( `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, `name` varchar(32) NOT NULL, `description` varchar(255) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `uniq_name` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `films` ( `id` int(11) UNSIGNED NOT NULL ...
<reponame>hansfilipelo/TDDD97<gh_stars>0 -- Creator: MySQL Workbench 6.3.5/ExportSQLite Plugin 0.1.0 -- Author: <NAME> -- Caption: New Model -- Project: Name of the project -- Changed: 2016-02-23 14:36 -- Created: 2016-02-20 09:12 PRAGMA foreign_keys = OFF; -- Schema: database ATTA...
<reponame>rodglins/SQL_databases REM INSERTING into SYS.HCS_DIM_LVL_KEY$ SET DEFINE OFF;
-- *************************************************************************** -- File: 4_5.sql -- -- Developed By TUSC -- -- Disclaimer: Neither Osborne/McGraw-Hill, TUSC, nor the author warrant -- that this source code is error-free. If any errors are -- found in this source code, please repor...
<gh_stars>0 /* https://www.urionlinejudge.com.br/judge/pt/problems/view/2612 */ SELECT A.ID, A.NAME FROM MOVIES AS A INNER JOIN GENRES AS B ON (A.ID_GENRES = B.ID) INNER JOIN MOVIES_ACTORS AS C ON(A.ID = C.ID_MOVIES) INNER JOIN ACTORS AS D ON (C.ID_ACTORS = D.ID) WHERE D.NAME IN ('<NAME>', '<NAME>') AND B.DES...
<filename>onlineeducation/dbsql/device_detail.sql -- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server version: 5.7.24 - MySQL Community Server (GPL) -- Server OS: Win64 -- HeidiSQL Version: 10.1.0.5464 -- ---------...
<reponame>cagrin/tSQLt-edge CREATE SCHEMA Test_TestResult; GO CREATE PROCEDURE Test_TestResult.Test_InternalRun AS BEGIN EXEC('CREATE SCHEMA TestSchema;'); EXEC('CREATE TABLE TestSchema.TestTable(Column1 INT);'); EXEC('CREATE PROCEDURE TestSchema.TestCase AS EXEC tSQLt.AssertObjectExists ''TestSchema.TestT...
create table Person(person_id int auto_increment primary key, name varchar(127), age int);
drop table if exists RunStats.ActivityMetadata; drop table if exists RunStats.Users; drop schema RunStats;
<reponame>pollopollo-org/obyte-hub /*INSERT INTO bots (name, description, pairing_code) VALUES ( 'Transition bot', 'Allows you to link your Bitcoin and Byteball addresses for participation in Byteball distribution.', 'A2WMb6JEIrMhxVk+I0gIIW1vmM3ToKoLkNF8TqUV5UvX@obyte.org/bb#0000' );*/ INSERT INTO bots (name, desc...
<reponame>bogdanghita/public_bi_benchmark-master_project SELECT "TableroSistemaPenal_8"."Number of Records" AS "Number of Records", "TableroSistemaPenal_8"."PAÍS" AS "PAÍS", "TableroSistemaPenal_8"."Tipo Sentencia" AS "Tipo Sentencia", SUM(CAST("TableroSistemaPenal_8"."Number of Records" AS BIGINT)) AS "sum:Numbe...
-- fts3ak.test -- -- execsql { -- BEGIN; -- INSERT INTO t1 (rowid, content) VALUES(12, "third world"); -- COMMIT; -- SELECT rowid FROM t1 WHERE t1 MATCH 'third'; -- } BEGIN; INSERT INTO t1 (rowid, content) VALUES(12, "third world"); COMMIT; SELECT rowid FROM t1 WHERE t1 MATCH 'third';
<filename>src/test/resources/sql/create/dff84eb8.sql -- file:plpgsql.sql ln:2777 expect:true create or replace function shadowtest(in1 int) returns table (out1 int) as $$ declare in1 int
CREATE TABLE [dbo].[Exemplo]( [cod] [int] NOT NULL, [texto] [char](1) NULL, ) ON [PRIMARY] GO SET ANSI_PADDING OFF GO insert Exemplo(cod,texto)values(1,'S'); insert Exemplo(cod,texto)values(2,'N'); insert Exemplo(cod)values(3); select * from Exemplo; select * from Exemplo where texto <> 'N' OR texto is null --ht...
<reponame>amirhussen/Bootstrap-Templete -- phpMyAdmin SQL Dump -- version 4.2.7.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: May 13, 2017 at 06:25 AM -- Server version: 5.6.20 -- PHP Version: 5.5.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARAC...
<gh_stars>10-100 /* * Copyright 2019, <NAME> <<EMAIL>>. * All rights reserved. * Author: <NAME> * Date: 04/2019 */ CREATE OR REPLACE PROCEDURE transfer(senderAccountID integer, receiverAccountID integer, amount float) LANGUAGE plpgsql AS $$ DECLARE current_balance float; BEGIN ...
DO $$ BEGIN IF NOT EXISTS (SELECT 1 FROM pg_type WHERE typname = 'history') THEN CREATE TYPE history AS ( id text, event text, severity text, status text, value text, text text, type text, update_time timestamp ...
<filename>database/l10n/createTables.sql create table if not exists Localization( app int unsigned, appVersion varchar(16), country varchar(2), addedBy smallint unsigned not null, addedOn datetime not null default current_timestamp on update current_timestamp, primary key(app, appVersion, country) ); ...
<gh_stars>1-10 # What is the meaning of end_pos? SELECT svtype, IF(end IS NULL, FALSE, TRUE) AS has_end, MIN(end_pos - start_pos) AS min_length_delta, MAX(end_pos - start_pos) AS max_length_delta, IF((end_pos - start_pos) = 1, TRUE, FALSE) AS is_ref_allele_one_bp_long, COUNT(1) AS cnt, FROM [googl...
<filename>txdav/common/datastore/sql_schema/upgrades/postgres-dialect/upgrade_from_29_to_30.sql<gh_stars>1-10 ---- -- Copyright (c) 2012-2015 Apple Inc. All rights reserved. -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You m...
<filename>SQL Query Files/SQL-master/VerifyDBFiles.sql DECLARE @DBFiles TABLE ( ServerName varchar(24) , DatabaseName varchar(32) , LogicalName varchar(32) , FileName varchar(128) , LastUpdate datetime ); INSERT INTO @DBFiles EXEC sp_MSForEachDB 'SELECT CONVERT(nvarchar(32), SERVERPROPERTY(''Servername'')) AS S...
<filename>application/src/main/resources/db/migration/V20210630222707__MerchantNameToTransactionsView.sql create or replace VIEW transactions AS SELECT t.id, t.plaid_transaction_id, t.account_id, a.plaid_account_id, a.item_id, a.plaid_item_id, a.user_id, t.category, ...
<filename>hasura/migrations/1630525234062_alter_table_public_zones_stats_add_column_total_active_addresses_mainnet_rating_diff/down.sql ALTER TABLE "public"."zones_stats" DROP COLUMN "total_active_addresses_mainnet_rating_diff";
/* CSIL - Columnstore Indexes Scripts Library for Azure SQL Database: Extended Events Setup Script for Memory events 'column_store_object_pool_hit', 'column_store_object_pool_miss' Version: 1.5.0, August 2017 Copyright 2015-2017 <NAME>, OH22 IS (http://www.nikoport.com/columnstore/), (http://www.oh22.is/) Licen...
SELECT client, sizes, COUNT(0) AS freq, SUM(COUNT(0)) OVER (PARTITION BY 0) AS total, COUNT(0) / SUM(COUNT(0)) OVER (PARTITION BY 0) AS pct FROM `httparchive.almanac.summary_response_bodies`, UNNEST(REGEXP_EXTRACT_ALL(body, r'(?im)<(?:source|img)[^>]*sizes=[\'"]?([^\'"]*)')) AS sizes WHERE date = '2021-...
-- Responsiveness of reviewers WITH pulls AS ( SELECT * FROM unique_pulls WHERE owner = 'trinodb' AND repo = 'trino' ) , reviews AS ( SELECT r.pull_number AS number , r.submitted_at AS event_at , r.user_login = p.user_login AS is_author FROM pulls p JOIN reviews r ON (p.owner, p.repo, p.number...
/* Warnings: - The values [DRAFT] on the enum `InvoiceStatus` will be removed. If these variants are still used in the database, this will fail. */ -- AlterEnum BEGIN; CREATE TYPE "InvoiceStatus_new" AS ENUM ('PENDING', 'PAID'); ALTER TABLE "invoices" ALTER COLUMN "status" DROP DEFAULT; ALTER TABLE "invoices" ALT...
<filename>migrations/2019-04-05-191926_moderation-log/down.sql DROP TABLE moderation; DROP TRIGGER set_updated_at ON posts; DROP TRIGGER set_updated_at ON comments; ALTER TABLE posts DROP COLUMN updated_at; ALTER TABLE comments DROP COLUMN updated_at; ALTER TABLE posts DROP COLUMN rejected; ALTER TABLE comme...
<reponame>qingzma/DBEstClient<gh_stars>10-100 CREATE TABLE tpcds1t.store_sales(ss_sold_date_sk int, ss_sold_time_sk int, ss_item_sk int, ss_customer_sk int, ss_cdemo_sk int, ss_hdemo_sk int, ss_addr_sk int, ss_store_sk int, ss_promo_sk int, ss_ticket_number int, ss_quantity int, ss_wholesale_cost double, ss_list_price ...
<gh_stars>0 SET FOREIGN_KEY_CHECKS=0; DROP TABLE IF EXISTS `app_notification`; CREATE TABLE `app_notification` ( `id` bigint(20) NOT NULL AUTO_INCREMENT , `message` varchar(2000) NOT NULL , `action` varchar(255) NULL , `params` varchar(2000) NULL , `sent_type` varchar(100) NULL COMMENT dat...
<gh_stars>1-10 --test CHAR_LENGTH with time type select char_length(to_time('8:8:8 am')) from db_root order by 1;
<reponame>keerthiraja1988/EmployeeManage  CREATE PROC [dbo].[P_UpdateEmployeeDetails] @EmployeeId INT, @FullName [nvarchar](max) , @FirstName [nvarchar](max) , @LastName [nvarchar](max) , @Initial [nvarchar](200) , @Email [nvarchar](max) , @DateOfBirth DATETIME , @DateOfJoining DATETIME , ...