sql
stringlengths
6
1.05M
<gh_stars>1-10 -- +goose Up ALTER TABLE vrf_specs ADD COLUMN chunk_size bigint NOT NULL DEFAULT 20; -- +goose Down ALTER TABLE vrf_specs DROP COLUMN chunk_size;
if OBJECT_ID('[spGrantReadonly]') is not null exec ('drop proc spGrantReadonly') go CREATE PROCEDURE [dbo].[spGrantReadonly] AS declare sites_cursor cursor for select DatabaseName from Sites s join sys.databases d on s.DatabaseName = d.name open sites_cursor declare @database_name nvarchar(max) ...
<reponame>Shuttl-Tech/antlr_psql<filename>src/test/resources/sql/create_collation/1565d617.sql -- file:collate.icu.utf8.sql ln:358 expect:true CREATE COLLATION test3 (provider = icu, lc_collate = 'en_US.utf8')
<reponame>Shuttl-Tech/antlr_psql -- file:jsonb.sql ln:208 expect:true SELECT '[[1,2]]'::jsonb @> '[[1,2,2]]'::jsonb
<gh_stars>10-100 -- file:polymorphism.sql ln:784 expect:true select dfunc('a'::text, 'b', flag => false)
<reponame>windwiny/Oracle-DBA-tips-scripts -- +----------------------------------------------------------------------------+ -- | <NAME> | -- | <EMAIL> | -- | www.idevelopment.info ...
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 05, 2021 at 03:33 PM -- Server version: 10.4.20-MariaDB -- PHP Version: 7.3.29 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
CREATE OR REPLACE VIEW gv_taxon_designations AS SELECT td.id, td.title, t.term AS category, td.deleted FROM taxon_designations td LEFT JOIN (termlists_terms tlt JOIN terms t ON t.id = tlt.term_id AND t.deleted = false) ON tlt.id = td.category_id AND tlt.deleted = false WHERE td.deleted = false;
CREATE SEQUENCE insult_id_seq; CREATE TABLE insult ( id integer PRIMARY KEY default nextval('insult_id_seq'), text text NOT NULL ); ALTER SEQUENCE insult_id_seq owned by insult.id;
select backup_plan_id, selection_id, arn from aws.aws_backup_selection where akas::text = '["{{ output.resource_aka.value }}"]';
-- @(#)4.sql 2.1.8.1 -- TPC-H/TPC-R Order Priority Checking Query (Q4) -- Functional Query Definition -- Approved February 1998 :b :x :o select o_orderpriority, count(*) as order_count from orders where o_orderdate >= date ':1' and o_orderdate < date ':1' + interval '3 month' and exists ( select * from ...
<filename>database.sql<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1:3306 -- Время создания: Окт 12 2020 г., 15:33 -- Версия сервера: 10.3.13-MariaDB-log -- Версия PHP: 7.3.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET t...
<filename>db/patch50.sql -- need more space for storing better-hashed passwords alter table user modify password varchar(100); INSERT INTO patch_history SET patch_number = 50;
<reponame>opengauss-mirror/Yat -- @testpoint:opengauss关键字references(保留),作为角色名 --关键字不带引号-合理报错 drop role if exists references; create role references with password '<PASSWORD>' valid until '2020-12-31'; --关键字带双引号-成功 drop role if exists "references"; create role "references" with password '<PASSWORD>' valid until '2020...
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 1192.168.127.12 -- Generation Time: Jan 23, 2019 at 06:40 AM -- Server version: 10.1.36-MariaDB -- PHP Version: 7.2.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 S...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jan 26, 2022 at 02:27 PM -- Server version: 10.4.21-MariaDB -- PHP Version: 8.0.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARAC...
<filename>db/amounts/psql_schema.sql DROP TABLE IF EXISTS btc_amounts; CREATE TABLE IF NOT EXISTS btc_amounts ( height integer NOT NULL, tm integer NOT NULL, amt bigint NOT NULL, q integer NOT NULL DEFAULT 1 ); CREATE INDEX idx_amounts_height ON btc_amounts (height); CREATE INDEX idx_amounts_...
<filename>database/init/cities/city.list034.sql<gh_stars>0 insert into city values (6697217,"<NAME>","ES",1.29553,38.984501), (5374376,"Monterey County","US",-121.251587,36.250519), (5354812,"<NAME>","US",-121.87912,36.537182), (6450024,"Armentières","FR",2.88333,50.683331), (3036903,"Armentieres","FR",2.88214,50.68568...
<gh_stars>0 -- showkey.sql -- find primary and unique keys, -- and unique indexes for a table @clears @columns col cowner noprint new_value uowner col ctable noprint new_value utable prompt Table Owner: set term off feed off select upper('&1') cowner from dual; set term on prompt Table Name: set term off selec...
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 28, 2022 at 09:46 AM -- Server version: 10.4.21-MariaDB -- PHP Version: 8.0.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server version: 5.6.17 - MySQL Community Server (GPL) -- Server OS: Win32 -- HeidiSQL Version: 9.1.0.4867 -- -------------------------------------------------------- /*...
/* SQLyog Ultimate v11.21 (64 bit) MySQL - 5.5.21 : Database - db_sims ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS...
<reponame>YourFrog/Toilet -- -- PostgreSQL database dump -- -- Dumped from database version 11.5 -- Dumped by pg_dump version 11.5 -- Started on 2019-11-05 01:33:03 SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_stri...
--SELECT * FROM [cmsContentType] declare @now datetime = getdate() declare @dateFrom datetime = getdate() set @dateFrom = dateadd(day,-7,@now) -- last 7 days /* List all current versions of documents newer than @dateFrom Trimmed view */ select umbdocument.nodeId, umbContentVersion.versionDate, umbContentV...
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Tempo de geração: 10-Maio-2020 às 21:17 -- Versão do servidor: 10.4.11-MariaDB -- versão do PHP: 7.4.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET ...
<reponame>ligana/Ensemble-om-SpringBoot TRUNCATE TABLE mb_guaranty_style; INSERT INTO mb_guaranty_style (GUARANTY_STYLE, GUARANTY_STYLE_DESC, TRAN_TIMESTAMP, TRAN_TIME) VALUES ('C101', '信用', NULL, NULL); INSERT INTO mb_guaranty_style (GUARANTY_STYLE, GUARANTY_STYLE_DESC, TRAN_TIMESTAMP, TRAN_TIME) VALUES ('C102', '保证',...
/********************************************************************************************************************* ** ** Procedure Name : h3giUpdateStore ** Author : <NAME> ** Date Created : 28/02/06 ** *****************************************************************************...
---Check if all foreign key relationships are indexed--- ---https://www.cybertec-postgresql.com/en/index-your-foreign-key/--- SELECT c.conrelid::regclass AS "table", /* list of key column names in order */ string_agg(a.attname, ',' ORDER BY x.n) AS columns, pg_catalog.pg_size_pretty( pg_c...
<reponame>ccallergard/platform<filename>db/src/main/resources/db/migration/V20170414221852__refactor_request_with_parsed_github.sql ALTER TABLE request CHANGE label title VARCHAR(2000); ALTER TABLE request ADD COLUMN owner VARCHAR(250); ALTER TABLE request ADD COLUMN repo VARCHAR(250); ALTER TABLE request AD...
-- name: Sales by group -- description: Computes metrics grouped by dimensions. If the description is -- really long you can just continue on the next line with a single-space -- indent. -- params: -- - name: dimensions -- description: dimensions to group by -- default: country -- - name: metrics -- d...
create table matches ( id serial primary key not null, white_player_id integer not null references players(id), black_player_id integer not null references players(id), game_type text not null, winner_id integer references players(id), loser_id integer references players(id), is_draw boolean...
-- fkey2.test -- -- execsql { -- DELETE FROM t1; -- SELECT * FROM t3; -- } DELETE FROM t1; SELECT * FROM t3;
<filename>src/test/resources/sql/alter_foreign_table/5614b910.sql -- file:foreign_data.sql ln:351 expect:true ALTER FOREIGN TABLE ft1 DROP COLUMN c9
USE [master] GO IF NOT EXISTS (SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_NAME = 'sp_RestoreGene') EXEC ('CREATE PROC dbo.sp_RestoreGene AS SELECT 1') GO /********************************************************************************************* Restore Generator v4.3 (2014-10-03) (C) 2012, <...
<reponame>svetasmirnova/mysqlcookbook # groceries.sql DROP TABLE IF EXISTS `groceries`; #@ _CREATE_TABLE_ CREATE TABLE `groceries` ( `id` int NOT NULL, `name` varchar(255) DEFAULT NULL, `forbidden_after` time DEFAULT NULL, `forbidden_before` time DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARS...
ALTER TABLE db_version CHANGE COLUMN required_2008_12_22_01_mangos_creature_equip_template required_2008_12_22_03_mangos_item_template bit; alter table `item_template` add column `ScalingStatDistribution` smallint(6) DEFAULT '0' NOT NULL after `stat_value10`, add column `ScalingStatValue` smallint(6) DEFAULT '...
<filename>db/sql/afterMigrate__99_assign_permissions.sql GRANT SELECT ON TABLE geo_api_usage_log TO ${username};
<filename>query/ec2/large_ec2_instances.sql select arn as resource, case when instance_state not in ('running', 'pending', 'rebooting') then 'info' when instance_type like '%.__xlarge' then 'alarm' when instance_type like '%.metal' then 'alarm' else 'ok' end as status, title || ' has type ' || i...
CREATE TABLE PARTY_STRUCT_TYPE( ID BIGINT AUTO_INCREMENT, NAME VARCHAR(50), REF VARCHAR(50), DIM_ID BIGINT, SCOPE_ID VARCHAR(50), CONSTRAINT PK_PARTY_STRUCT_TYPE PRIMARY KEY(ID), CONSTRAINT FK_PARTY_STRUCT_TYPE_DIM FOREIGN KEY(DIM_ID) REFERENCES PARTY_DIM(ID) ) ENGINE=INNODB...
<reponame>jxiang/spatial create temporary function ST_AsBinary as 'com.esri.hadoop.hive.ST_AsBinary'; create temporary function ST_AsGeoJSON as 'com.esri.hadoop.hive.ST_AsGeoJson'; create temporary function ST_AsJSON as 'com.esri.hadoop.hive.ST_AsJson'; create temporary function ST_AsText as 'com.esri.hadoop.hive.ST_A...
<filename>queries/query81.sql -- start query 1 in stream 0 using template query81.tpl using seed 1819994127 with customer_total_return as (select cr_returning_customer_sk as ctr_customer_sk ,ca_state as ctr_state, sum(cr_return_amt_inc_tax) as ctr_total_return from catalog_returns ,date_dim ,cust...
ALTER TABLE {$NAMESPACE}_dashboard.dashboard ADD COLUMN layoutConfig LONGTEXT NOT NULL COLLATE utf8_bin AFTER name; UPDATE {$NAMESPACE}_dashboard.dashboard SET layoutConfig = '[]';
<gh_stars>1000+ use bts; select count(dest) from flights where arr_delay < ARR_DELAY_THRESH and dep_delay < DEP_DELAY_THRESH; select count(dest) from flights where arr_delay >= ARR_DELAY_THRESH and dep_delay < DEP_DELAY_THRESH; select count(dest) from flights where arr_delay < ARR_DELAY_THRESH and dep_delay >= DEP_DELA...
<reponame>opengauss-mirror/Yat -- @testpoint:opengauss关键字into(保留),作为用户组名 --关键字不带引号-合理报错 drop group if exists into; create group into with password '<PASSWORD>'; --关键字带双引号-成功 drop group if exists "into"; create group "into" with password '<PASSWORD>'; --清理环境 drop group "into"; --关键字带单引号-合理报错 drop group if exists '...
<filename>hms.sql -- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 06, 2020 at 06:57 PM -- Server version: 10.1.38-MariaDB -- PHP Version: 7.1.27 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; ...
<reponame>sevdalin/Software-University-SoftUni<gh_stars>0 CREATE TRIGGER tr_OnDeleteProduct ON Products INSTEAD OF DELETE AS DECLARE @ProductId int = (SELECT Id FROM deleted) DELETE FROM ProductsIngredients WHERE ProductId = @ProductId DELETE FROM Feedbacks WHERE ProductId = @ProductId DELETE FROM Products ...
<reponame>irfaardy/ta_rka<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 14, 2020 at 11:15 AM -- Server version: 10.1.38-MariaDB -- PHP Version: 7.3.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time...
<filename>database/NHSD.GPITBuyingCatalogue.Database/PostDeployment/InsertStandardsCapabilities.sql DELETE FROM catalogue.StandardsCapabilities; INSERT INTO catalogue.StandardsCapabilities(StandardId, CapabilityId) VALUES ('S33', 13), -- 111 -> Patient Information Maintainance ('S34', 8), -- Digital Diagnostics & Pa...
CREATE TABLE permissions( id int NOT NULL, perName varchar(45), description varchar(500), PRIMARY KEY (id) )
-- -- Volcado de datos para la tabla t_account -- INSERT INTO t_account VALUES ('c4d5b14a-706e-4959-8d20-12d6d06aec39', '2017-11-14 18:07:59', '2017-11-14 18:08:39', '0', '<EMAIL>', '<NAME>', '<PASSWORD>', X'243261243130246d2f6e346b4a784e6d5268754c68463234677135446572415847696b766a7a4c786d544346754b75314679736f654e593...
drop table if exists T_TABLE; drop table if exists T_TABLE1; drop table if exists T_TABLE2; drop table if exists T_TABLE3; drop table if exists T_TABLE4; drop table if exists T_TABLE5; drop table if exists T_TAB; CREATE TABLE T_TAB (ID IDENTITY PRIMARY KEY, _value VARCHAR(250)); INSERT INTO T_TAB (_value) VALUES(''); ...
<filename>demo.sql -- phpMyAdmin SQL Dump -- version 4.2.11 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jan 04, 2016 at 05:01 AM -- Server version: 5.6.21 -- PHP Version: 5.6.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARAC...
<reponame>status-im/status-nim ALTER TABLE user_messages ADD COLUMN audio_payload BLOB; ALTER TABLE user_messages ADD COLUMN audio_type INT; ALTER TABLE user_messages ADD COLUMN audio_duration_ms INT; ALTER TABLE user_messages ADD COLUMN audio_base64 TEXT NOT NULL DEFAULT "";
<filename>babaata.sql -- MySQL Workbench Synchronization -- Generated: 2021-09-17 14:43 -- Model: New Model -- Version: 1.0 -- Project: Name of the project -- Author: lenovo SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OL...
<reponame>stepheku/cclqueries select powerplan = pwcat.description , powerplan_cmt = substring(1,100,lt.long_text) , phase_name = pwcat2.description , display_method = uar_get_code_display(pwcat2.display_method_cd) , duration = pwcat2.duration_qty , duration_unit = uar_get_code_display(pwcat2.durati...
<reponame>g-sam/elife-xpub<filename>scripts/test.sql CREATE DATABASE test;
-- +----------------------------------------------------------------------------+ -- | <NAME> | -- | <EMAIL> | -- | www.idevelopment.info | -- |-----------------...
INSERT INTO messages SET (id, uid, sender, recipient, contact) VALUES (NULL, NULL, NULL, NULL, NULL);
<reponame>pydemo/spv_14.4 select int64_4 from nulls where rowid = 58 and int64_4 <> '-8000000000' -7000000000
-- SENTRY-327 ALTER TABLE SENTRY_DB_PRIVILEGE ADD WITH_GRANT_OPTION CHAR(1) NOT NULL; -- SENTRY-339 DROP INDEX SENTRYPRIVILEGENAME; CREATE UNIQUE INDEX SENTRYPRIVILEGENAME ON SENTRY_DB_PRIVILEGE ("SERVER_NAME",DB_NAME,"TABLE_NAME",URI,"ACTION",WITH_GRANT_OPTION); ALTER TABLE SENTRY_DB_PRIVILEGE DROP PRIVILEGE_NAME; -...
-- #df:assertListExists@ut# select * from MEMBER_STATUS where MEMBER_STATUS_CODE in ('SEA', 'LAN'); -- #df:assertListExists@ut# select * from PRODUCT_STATUS where PRODUCT_STATUS_CODE in ('MYS', 'ONE', 'BBB'); -- delete records registered by TSV delete from MEMBER_STATUS where MEMBER_STATUS_CODE in ('SEA', 'LAN'); del...
<filename>tsl/test/sql/include/compression_alter.sql -- This file and its contents are licensed under the Timescale License. -- Please see the included NOTICE for copyright information and -- LICENSE-TIMESCALE for a copy of the license. \ir compression_utils.sql CREATE TABLE test1 ("Time" timestamptz, intcol integer,...
SELECT table_name, column_name, data_type, FROM information_schema.columns WHERE table_name LIKE '%bucket%';
<reponame>lintzc/GPDB -- @author prabhd -- @created 2012-12-05 12:00:00 -- @modified 2012-12-05 12:00:00 -- @tags dml -- @db_name dmldb -- @description union_test13: EXCEPT with predicate \echo --start_ignore set gp_enable_column_oriented_table=on; \echo --end_ignore SELECT COUNT(*) FROM dml_union_r; SELECT COUNT(...
<gh_stars>1-10 DROP table IF EXISTS Passenger; DROP table IF EXISTS Person; CREATE TABLE IF NOT EXISTS Passenger ( id int auto_increment primary key, name varchar(1024) null, age int default '18' null, sex varchar(12) null, dob datetime null, constraint Passenger_id_uindex unique (id) ); CREATE TABLE IF NOT...
<filename>openGaussBase/testcase/SQL/DDL/partition/Opengauss_Function_DDL_Partition_List_Case0023.sql -- @testpoint: 参数填充因子为9合理报错 --step1:创建分区表填充因子为9,expect失败 drop table if exists t_partition_list_0023; create table t_partition_list_0023(p_id int,p_name varchar,p_age int) with (fillfactor = 9) partition by list(p_id) ...
ALTER TABLE users ADD COLUMN Followers TEXT; ALTER TABLE users ADD COLUMN Following TEXT;
<filename>prisma/migrations/20220116154447_init/migration.sql<gh_stars>0 /* Warnings: - You are about to drop the `Block` table. If the table is not empty, all the data it contains will be lost. */ -- DropTable DROP TABLE "Block"; -- CreateTable CREATE TABLE "block" ( "id" SERIAL NOT NULL, "level" INTEGE...
SELECT CountryName, CountryCode, CASE [CurrencyCode] WHEN 'EUR' THEN 'Euro' ELSE 'Not Euro' END AS [Currency] FROM Countries ORDER BY CountryName ASC
CREATE PROC FI_SP_IncBeneficiario @CPF VARCHAR (11) , @NOME VARCHAR (50) , @IDCLIENTE BIGINT AS BEGIN INSERT INTO BENEFICIARIOS (CPF, NOME, IDCLIENTE) VALUES (@CPF, @NOME, @IDCLIENTE) SELECT SCOPE_IDENTITY() END
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1 -- Час створення: Гру 21 2020 р., 18:51 -- Версія сервера: 10.4.11-MariaDB -- Версія PHP: 7.4.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET...
<reponame>md3997/FYP -- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Jan 02, 2015 at 07:20 PM -- Server version: 10.1.37-MariaDB -- PHP Version: 7.3.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"...
<filename>ScriptsBD/s-07-sinonimos.sql -- Companía: Scooters Anywhere -- Project: Modelo Proyecto Final -- Author: <NAME> y <NAME> -- Fecha: 04 de Junio del 2020 -- SINÓNIMOS PÚBLICOS CREATE OR REPLACE PUBLIC SYNONYM XXMARCA FOR MARCA; CREATE OR REPLACE PUBLIC SYNONYM UBICACION FOR UBICACION; CREATE OR REPLA...
-- removes all records with a score <= 5 in the table second_table DELETE FROM second_table WHERE score <= 5;
-- phpMyAdmin SQL Dump -- version 4.8.1 -- https://www.phpmyadmin.net/ -- -- Host: 1192.168.3.11 -- Waktu pembuatan: 10 Jul 2019 pada 14.18 -- Versi server: 10.1.33-MariaDB -- Versi PHP: 7.2.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_C...
drop table if exists MB_PRICE_FEE_DEFINE; /*==============================================================*/ /* Table: MB_PRICE_FEE_DEFINE */ /*==============================================================*/ create table MB_PRICE_FEE_DEFINE ( PROD_FEE_TYPE varchar(8) not n...
<filename>database/mssql/004_add_saml_assertions.sql IF NOT EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'serviceAssertions' AND TABLE_SCHEMA = 'dbo') BEGIN CREATE TABLE serviceAssertions ( id uniqueidentifier NOT NULL, serviceId uniqueidentifier NOT NULL, ...
<reponame>deniscostadsc/playground select TRUNC(AVG(price), 2) as price from products;
<reponame>KhadijaMahanga/bluetail -- DROP MATERIALIZED VIEW contracts_finder.notice_view; -- drop view contracts_finder.notice_view; CREATE OR REPLACE VIEW contracts_finder.notice_view AS ( SELECT awards.source, awards.source_id, f_cast_isots(NULLIF(releases ->> 'date', ''::text)) as releasedate, awa...
<filename>SQL/01 - Basic Select/20 - Employee Salaries.sql -- ======================== -- Information -- ======================== -- Direct Link: https://www.hackerrank.com/challenges/salary-of-employees/problem -- Difficulty: Easy -- Max Score: 10 -- DBMS: mySQL -- ======================== -- Solution ...
CREATE DATABASE `wetext.accounts` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `wetext.accounts`; CREATE TABLE `accounts` ( `Id` varchar(64) NOT NULL, `Name` varchar(16) NOT NULL, `Email` varchar(32) NOT NULL, `Password` varchar(16) NOT NULL, `DisplayName` varchar(32) DEFAULT NULL, PRIMARY KEY (`Id`)...
<reponame>SpencerWhitehead7/no-manga<gh_stars>0 -- CUSTOM CHECKS CREATE OR REPLACE FUNCTION not_empty(v varchar) RETURNS boolean AS $$ SELECT TRIM(v) <> '' $$ LANGUAGE SQL STRICT IMMUTABLE; CREATE OR REPLACE FUNCTION array_no_empties(v varchar[]) RETURNS boolean AS $$ SELECT v <> '{}' AND (NOT EXISTS (SELECT 1 FR...
-------------------------------------------------------------------------------------------------------------------------------- -- Script: next_exec_timestamp.sql -- Licence: Apache License 2.0 -- Author: <EMAIL> -- Version: 2021.10.30 -- -- Description: Function CTL.SCHEDULE.NEXT_EXEC_TIMESTAMP -- ...
<gh_stars>0 create table usuario ( id int(11) not null auto_increment, nombre_Propietario varchar(100) null, id_Propietario int(11) not null, tipo_Animal varchar(100) not null, fecha_Ingreso datetime null, dias_Estadia int(11) not null, primary key (id) );
<reponame>kccb-karp/IQCareMigration IF NOT EXISTS(SELECT * FROM sys.columns WHERE Name = N'RegistrationDate'AND Object_ID = OBJECT_ID(N'Person')) BEGIN ALTER TABLE [dbo].[Person] ADD RegistrationDate datetime null; END;
IF OBJECT_ID('inventory.is_valid_unit_id') IS NOT NULL DROP FUNCTION inventory.is_valid_unit_id; GO CREATE FUNCTION inventory.is_valid_unit_id(@unit_id integer, @item_id integer) RETURNS bit AS BEGIN IF EXISTS ( SELECT 1 FROM inventory.items WHERE inventory.items.item_i...
<filename>tests/tpc/mini_1.sql select count(*) as count from lineitem where l_shipdate <= date '1993-12-01';
<reponame>a-ikegame/it-automation ALTER TABLE A_SEQUENCE ADD COLUMN MENU_ID INT AFTER VALUE; ALTER TABLE A_SEQUENCE ADD COLUMN DISP_SEQ INT AFTER MENU_ID; ALTER TABLE A_SEQUENCE ADD COLUMN NOTE VARCHAR (4000) AFTER DISP_SEQ; ALTER TABLE A_SEQUENCE ADD COLUMN LAST_UPDATE_TIMESTAMP DATETIME(6) AFTER NOTE; ALTER TABLE A_...
<reponame>pkiraly/dataverse -- If the installation is using a stored procedure for generating -- sequential numeric identifiers, create a wrapper function that -- works with the new framework (the stored procedure now needs to -- return a string) and update the database setting DO $BODY$ BEGIN UPDATE setting SET cont...
<reponame>ferchoa90/sae-bagsacorp<filename>migracion/M_inventariodetalle.sql INSERT INTO `dbbagsacorp`.`inventariodetalle` ( `id`, `numero`, `item`, `tipomovimiento`, `fecha`, `articulo`, `cantidad`, `valorunitario`, `costo`, `descuento`, `ivalinea`, `bodegaorigen`, `bodegadestino`, `liquida...
<filename>yii2evg.sql<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.7.7 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1:3306 -- Время создания: Мар 05 2019 г., 14:39 -- Версия сервера: 5.7.20-log -- Версия PHP: 7.2.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "...
-- Add columns for additional forms ALTER TABLE agg_awc ADD COLUMN usage_num_hh_reg integer; ALTER TABLE agg_awc ADD COLUMN usage_num_add_person integer; ALTER TABLE agg_awc ADD COLUMN usage_num_add_pregnancy integer;
SELECT public."User_hope".user_id, h_company_name, place_id, scale_number_id, work_id,scale_type_id, income, big_industry,middle_industry,small_industry,big_industry_id,middle_industry_id,small_industry_id, big_category,middle_category,small_category,big_category_id,middle_category_id,small_category_id FROM public."Use...
-- phpMyAdmin SQL Dump -- version 4.3.11 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jan 11, 2017 at 01:25 PM -- Server version: 5.6.24 -- PHP Version: 5.6.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; ...
INSRT INTO `test` (`id`) VALUES ('This is an id');
<reponame>AntoniyaIvanova/SoftUni SELECT mc.CountryCode, m.MountainRange, p.PeakName, p.Elevation FROM Peaks AS p INNER JOIN Mountains AS m ON (p.MountainId = m.Id) INNER JOIN MountainsCountries AS mc ON (mc.MountainId = m.Id AND mc.CountryCode = 'BG') WHERE p.Elevation > 2835 ORDER BY p.Elevation DESC
<gh_stars>0 -- DESIGNATES WHICH DATABASE TO BE AFFECTED USE burgers_db; -- SEED QUERIES FOR TESTING PURPOSES INSERT INTO burgers (burger_name, devoured) VALUES ("Goodburger",false); INSERT INTO burgers (burger_name, devoured) VALUES ("Hamburger",false); INSERT INTO burgers (burger_name, devoured) VALUES ("Cheeseburg...
<reponame>lewor14/powerprint<filename>ecom 111818.sql -- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 18, 2018 at 08:45 AM -- Server version: 10.1.36-MariaDB -- PHP Version: 5.6.38 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRA...
<reponame>bethanysciences/salesforce SELECT Industry_Vertical__c, Email, LeadSource, Company, CreatedDate, Lead_Type__c, Unqualified_Reason__c, Id, ConvertedAccountId, ConvertedOpportunityId, ConvertedContactId FROM Lead WHERE CreatedDate > 2019-03-01T00:00:00.000Z AND Email in (
DROP DATABASE IF EXISTS employee_DB; CREATE DATABASE employee_DB; USE employee_DB; CREATE TABLE departments( id INT NOT NULL AUTO_INCREMENT, name VARCHAR(30) NOT NULL, PRIMARY KEY (id) ); CREATE TABLE role ( id INT NOT NULL AUTO_INCREMENT, title VARCHAR(30) NOT NULL, salary VARCHAR(45) NOT NULL, depart...