sql
stringlengths
6
1.05M
<reponame>pirocorp/Databases-Basics-MS-SQL-Server /*============================================================================ File: 5.1 Partitioning 2012.sql Summary: The script demonstrates some of the maintenance problems that were present with partitioned tables in SQL Server 2012. The code is used a...
-- phpMyAdmin SQL Dump -- version 4.7.3 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Dec 19, 2017 at 11:26 PM -- Server version: 10.0.31-MariaDB-cll-lve -- PHP Version: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!...
<filename>JobExecutionFramework/SSISDB/catalog/Stored Procedures/create_environment_variable.sql  CREATE PROCEDURE [catalog].[create_environment_variable] @folder_name sysname, @environment_name nvarchar(128), @variable_name nvarchar(128), ...
CREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT BEGIN declare i int; set i = N - 1; RETURN ( SELECT (SELECT DISTINCT salary FROM Employee ORDER BY salary DESC LIMIT i, 1) ); END
<gh_stars>1-10 -- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 09, 2020 at 07:33 PM -- Server version: 10.4.8-MariaDB -- PHP Version: 7.3.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*...
<reponame>Nalhin/Leetcode -- #Table: Sales -- # -- # -- #+--------------+---------+ -- #| Column Name | Type | -- #+--------------+---------+ -- #| sale_id | int | -- #| product_name | varchar | -- #| sale_date | date | -- #+--------------+---------+ -- #sale_id is the primary key for this table. --...
<reponame>chrisoldwood/SS-Unit /** * \file * \brief The TestResult_SetTestPassed stored procedure. * \author <NAME> */ if (object_id('ssunit_impl.TestResult_SetTestPassed') is not null) drop procedure ssunit_impl.TestResult_SetTestPassed; go /** * Stores the outcome of the test as successul. */ create proced...
-- Revert procedures/verify_type from pg BEGIN; DROP FUNCTION verify_type; COMMIT;
DROP TABLE IF EXISTS `persons`; DROP TABLE IF EXISTS `person_details`; CREATE TABLE persons ( id int PRIMARY KEY, name varchar(255), email varchar(255) DEFAULT Null, signup_date datetime NOT NULL ); CREATE TABLE `person_details` ( `person_id` int(11) NOT NULL, `city_id` int(11) NOT NULL ) ENGINE=I...
<filename>src/test/resources/randexpr1.test_1891.sql<gh_stars>100-1000 -- randexpr1.test -- -- db eval {SELECT (abs(b)/abs((select max(c) from t1)))+case when (select +cast(avg(17 | ~coalesce((select e from t1 where t1.b>(13) | -11 and c>f),19)+t1.c) AS integer)-(~case cast(avg(t1.f) AS integer)*abs(max(b)+(count(*))...
<filename>src/test/resources/sql/drop_table/b200469e.sql -- file:alter_table.sql ln:939 expect:true drop table test1
<reponame>luno/reflex create table `client_cursors` ( `id` varchar(255) not null, `updated_at` datetime not null, `last_event_id` int not null, primary key (`id`) );
<gh_stars>10-100 SET NAMES 'utf8'; UPDATE `PREFIX_image_shop` ish, `PREFIX_image` i SET ish.id_product = i.id_product WHERE i.id_image=ish.id_image; REPLACE INTO `PREFIX_tag_count` (id_group, id_tag, id_lang, id_shop, counter) SELECT cg.id_group, pt.id_tag, pt.id_lang, id_shop, COUNT(pt.id_tag) AS times FROM `...
<reponame>bit-twidd1er/keywhiz<filename>server/src/main/resources/db/h2/migration/V2.4__encrypted_secret_content.sql /* Adds a NULL column for encrypted content, to be filled in later. */ ALTER TABLE secrets_content ADD COLUMN encrypted_content TEXT;
CREATE TABLE `form_evaluation` ( `id` int(11) NOT NULL auto_increment, `temp` varchar(8) default NULL, `p` varchar(8) default NULL, `r` varchar(8) default NULL, `bp` varchar(10) default NULL, `ht` varchar(6) default NULL, `wt` varchar(6) default NULL, `bmi` char(3) default NULL, `lmp` varchar(10) defa...
--liquibase formatted sql --changeset blaze:search_configuration dbms:postgresql create table search_configuration ( id bigserial primary key, element_type text not null, param_type text not null, path jsonb[] not null, constraint search_configuration_element_type_param_type_ukey unique (element_type...
CREATE TABLE biz_activity ( id varchar(50) NOT NULL DEFAULT '', name varchar(255) NOT NULL, pc_link varchar(255) DEFAULT NULL, h5_link varchar(255) DEFAULT NULL, sort varchar(255) NOT NULL, status int NOT NULL, versi...
<reponame>Mephostopilis/mall CREATE TABLE `ums_app` ( `id` bigint(20) unsigned NOT NULL COMMENT 'id', `name` varchar(255) DEFAULT NULL COMMENT '名称', `secret` varchar(255) DEFAULT NULL COMMENT '密钥', `domain` varchar(255) DEFAULT NULL COMMENT 'domain', `user_id` bigint(20) unsigned DEFAULT NULL COMMENT '用户id', ...
CREATE TABLE user_settings ( user_id UUID, key varchar(1024), value varchar(1024), PRIMARY KEY(user_id, key), UNIQUE (user_id, key), FOREIGN KEY (user_id) REFERENCES users(id) );
<reponame>InsightsDev-dev/tajo select n_regionkey, count(*) as cnt from nation group by n_regionkey having percent(cnt, 25) > 10
<reponame>FANsZL/hive ALTER TABLE COMPACTION_QUEUE ADD CQ_TBLPROPERTIES varchar(2048); ALTER TABLE COMPLETED_COMPACTIONS ADD CC_TBLPROPERTIES varchar(2048);
ALTER TABLE public.cities DROP CONSTRAINT fk_regions_cities RESTRICT; ALTER TABLE "cities" ADD CONSTRAINT "fk_region_cities" FOREIGN KEY ("region") REFERENCES "regions" ("id") ON DELETE CASCADE ON UPDATE NO ACTION; idx_region_cities status string idx_polyclinics_city ALTER TABLE "polyclinics" ADD CONSTRAINT "f...
INSERT INTO `nolims_data_mahasiswa_peneliti` (`id`, `nama_peneliti`, `nip_nrp_nim`, `departemen_id`) VALUES ('','<NAME>','A24154004','2'), ('','<NAME>','A34130025','2'), ('','<NAME>','A34130045','2'), ('','<NAME>','G64140042','27'), ('','<NAME>','G64140051','27'), ('','<NAME>','G64140060','27'), ('','<NAME>','G641400...
-- test with many data types -- int create table table_int(id int); insert into table_int values(9910); insert into table_int values(1253); insert into table_int values(8535); insert into table_int values(3443); insert into table_int values(2532); insert into table_int values(3564); insert into table_int values(4335)...
<filename>SQLCode/OLTP To DW Database ETL Script.sql /*************************************************************************** Info498 Final Project Dev: <NAME> Date:2/21/2017 Desc: This file syncronize OLTP and OLAP. The flush and fill technique is used. -- Change Log: When,Who,What -- 08/15/2018,ByungsuJung,Create...
<filename>prisma/migrations/20210910023104_add_device_model/migration.sql -- CreateTable CREATE TABLE "Device" ( "id" TEXT NOT NULL, "serial" TEXT NOT NULL, "name" TEXT NOT NULL, "type" TEXT NOT NULL, "operativeSystem" TEXT NOT NULL, "assignedAt" TIMESTAMP(3) NOT NULL, "ownerId" TEXT NOT NUL...
<gh_stars>0 SET NOCOUNT ON; GO USE master; GO CREATE ENDPOINT [Hadr_endpoint] AS TCP (LISTENER_IP = (0.0.0.0), LISTENER_PORT = 5022) FOR DATABASE_MIRRORING ( ROLE = ALL, AUTHENTICATION = CERTIFICATE dbm_certificate, ENCRYPTION = REQUIRED ALGORITHM AES ); ALTER ENDPOINT [Hadr_endpo...
create table dbo.tStaticProjectAccessRight ( Id int identity(1, 1) not null, AccessRight nvarchar(100) not null constraint PK_tStaticProjectAccessRight primary key(Id), );
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; CREATE TABLE IF NOT EXISTS `ff_admin` ( `admin_id` smallint(6) unsigned NOT NULL AUTO_INCREMENT, `admin_name` varchar(50) NOT NULL, `admin_pwd` char(32) NOT NULL, `admin_count` smallint(6) NOT NULL, `admin_ok` varchar(50) NOT NULL, `admin_del` bigint(1) NOT NULL, `a...
INSERT INTO attachments (MailId, Name, MimeType, S3Key, Size) VALUES ($1, $2, $3, $4, $5);
<reponame>coderbunker/timesheet-backend CREATE OR REPLACE FUNCTION model.convert_organization(_id TEXT) RETURNS SETOF model.organization AS $convert_organization$ INSERT INTO model.organization(name, properties) SELECT * FROM ( WITH properties AS ( SELECT account.client AS name, ARRAY[ 'legal_...
/*pga4dash*/ SELECT (SELECT sum(xact_commit) + sum(xact_rollback) FROM pg_stat_database{% if did %} WHERE datname = (SELECT datname FROM pg_database WHERE oid = {{ did }}){% endif %}) AS "{{ _('Transactions') }}", (SELECT sum(xact_commit) FROM pg_stat_database{% if did %} WHERE datname = (SELECT datname FROM pg_d...
<gh_stars>10-100 create table report_email_configuration ( id integer generated by default as identity (start with 100, increment by 1), logo_url varchar(2083) not null, created bigint not null, updated bigint not null );
<gh_stars>1-10 USE [CrimeDW] GO CREATE TABLE [CrimeDW].[DimCity]( [CityID] [int] IDENTITY(1,1) NOT NULL, [City] [varchar](100) NULL, [StateID] [int] NULL, PRIMARY KEY CLUSTERED ( [CityID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOC...
<gh_stars>10-100 -- file:rowtypes.sql ln:63 expect:true select * from quadtable
INSERT INTO "npc" ("realid", "zone", "type", "x", "y", "town", "nation") VALUES (18749, 73, 'Inn', 500, 114, 1, 1); INSERT INTO "npc" ("realid", "zone", "type", "x", "y", "town", "nation") VALUES (18750, 73, 'Sunderies', 516, 100, 1, 1); INSERT INTO "npc" ("realid", "zone", "type", "x", "y", "town", "nation") VALUES (...
<filename>migrations/postgres/20170607004_add_constraint_account_tags_account_id_fkey.down.sql ALTER TABLE ONLY account_tags DROP CONSTRAINT IF EXISTS account_tags_account_id_fkey;
<gh_stars>10-100 ALTER SYSTEM SET wal_level='logical'; ALTER SYSTEM SET max_wal_senders='10'; ALTER SYSTEM SET max_replication_slots='10'; -- Create the Replication publication CREATE PUBLICATION supabase_realtime FOR ALL TABLES; -- Create a second schema CREATE SCHEMA personal; -- USERS CREATE TYPE public.user_st...
SELECT '{{index .header "X-Application"}}'
DELETE FROM `wp_attribute` WHERE `model_name`='suggestions'; DELETE FROM `wp_model` WHERE `name`='suggestions' ORDER BY id DESC LIMIT 1; DROP TABLE IF EXISTS `wp_suggestions`;
-- Revert postgraphile_user_system:user_authentication_secrets from pg BEGIN; SET search_path TO app_private,public; DROP TABLE user_authentication_secrets; COMMIT;
<filename>alt-oracle-functions/add_months.sql CREATE FUNCTION add_months_ora(DATE, INTEGER) RETURNS DATE LANGUAGE plpgsql AS $$ DECLARE add_months DATE := ($1 + ($2 || ' months') :: INTERVAL) :: DATE; BEGIN IF $1 != last_day_ora($1) THEN RETURN add_months; ELSE RETURN last_day_ora(add_months); END ...
insert into exchange_value(id,currency_from,currency_to,conversion_multiple,port) values(10001,'USD', 'INR' ,65,0); insert into exchange_value(id,currency_from,currency_to,conversion_multiple,port) values(10002,'EUR', 'INR' ,75,0); insert into exchange_value(id,currency_from,currency_to,conv...
<gh_stars>1-10 -- begin DDCSR_SCHEDULED_REPORT create table DDCSR_SCHEDULED_REPORT ( ID uuid, VERSION integer not null, CREATE_TS timestamp, CREATED_BY varchar(50), UPDATE_TS timestamp, UPDATED_BY varchar(50), DELETE_TS timestamp, DELETED_BY varchar(50), -- FREQUENCY_FREQUENCY va...
<filename>brewer/src/main/resources/db/migration/V06__alterar_cpf_cnpj_para_not_null.sql ALTER TABLE cliente MODIFY cpf_cnpj VARCHAR(30) NOT NULL;
<gh_stars>1-10 BEGIN TRANSACTION; CREATE TABLE "rule_task" ( `rule_name` TEXT NOT NULL, `task` INTEGER ); INSERT INTO `rule_task` (rule_name,task) VALUES ('ref_1_rule',62); INSERT INTO `rule_task` (rule_name,task) VALUES ('legend_rule',1); INSERT INTO `rule_task` (rule_name,task) VALUES ('ref_2_rule',62); INSERT INTO...
<gh_stars>1-10 --! Previous: sha1:e72e8d4d74c4bf4a81f37ba0fa4cde6833541002 --! Hash: sha1:cb794d1eab4242f730ca6106e2f602dfd7b398ea -- DROP all the things so that current.sql can be re-run idempotently DROP FUNCTION IF EXISTS projects_url (projects projects); DROP FUNCTION IF EXISTS projects_default_locale (projects);...
-- Table: c02_rate -- DROP TABLE c02_rate; CREATE TABLE c02_rate ( rate_id serial NOT NULL, person_idref integer NOT NULL DEFAULT 0, project_idref integer NOT NULL DEFAULT 0, rate numeric NOT NULL DEFAULT 0.00, effective_asof date NOT NULL DEFAULT (now() - '2 years'::interval), expire_asof date, "timest...
<reponame>stowpass/Sistema-EHP-2020 -- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Tempo de geração: 30-Abr-2020 às 07:00 -- Versão do servidor: 10.4.11-MariaDB -- versão do PHP: 7.4.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; ...
INSERT INTO `video_singers` VALUES ('-N9hu5TAQ-M','sister_cleaire','2020-01-01 00:00:00','2020-03-04 14:09:05'),('1boL5rnvJdk','inui_toko','2020-01-01 00:00:00','2020-02-28 17:01:16'),('1ODjE0dX970','asahina_miya','2020-01-01 00:00:00','2020-03-03 12:29:29'),('2k8AIzE87Mo','inui_toko','2020-01-01 00:00:00','2020-03-04 ...
ALTER TABLE Run ALTER COLUMN warmup TYPE int; ALTER TABLE Run ALTER COLUMN maxInvocationTime TYPE int; ALTER TABLE Run ALTER COLUMN minIterationTime TYPE int; ALTER TABLE Timeline ALTER COLUMN numSamples TYPE int;
<filename>database/03-file_management_byself.sql /* Navicat MySQL Data Transfer Source Server : MY LOCAL Source Server Version : 50505 Source Host : localhost:3306 Source Database : siapp Target Server Type : MYSQL Target Server Version : 50505 File Encoding : 65001 Date: 2016-05-1...
<reponame>doubleirish/lecture2_jpa_Intro<filename>src/test/resources/lecture2_drop.sql DROP TABLE PHONE ; DROP TABLE USERS ; DROP TABLE ADDRESS ;
<reponame>ferdn4ndo/infotrem # tblFerroviaVagaoSubTipo # # DESC: Tabela de armazenamento dos subtipos dos vagões das ferrovias # TODO: - # NOTES: - # DROP TABLE IF EXISTS tblFerroviaVagaoSubTipo; CREATE TABLE tblFerroviaVagaoSubTipo ( CodFerroviaVagaoSubTipo INT(8) NOT NULL AUTO_INCREMENT PRIMARY KEY COMMENT ...
-- +migrate Up ALTER TABLE scopes ALTER COLUMN id TYPE VARCHAR; -- +migrate Down ALTER TABLE scopes ALTER COLUMN id TYPE VARCHAR(36);
<gh_stars>1-10 INSERT INTO tweb_apbd(`rangkuman`,`berkas_id`,`lembaga_id`, `lembaga_kode`,`pemda_kode`, `wilayah_kode`,`tahun`, `rekening_kode`,`rekening`, `uraian`, `nominal`,`nominal_sebelum`, `nominal_sesudah`, `nominal_perubahan`, `nominal_persen`, `keterangan`, `created_by`, `updated_by`) VALUES ('0','31','11','1...
UPDATE repositories SET repo_oai_name = REPLACE(REPLACE(SUBSTR(homepage_url,9),'/','-'),'www.','') where homepage_url like 'https%' and (repo_oai_name = '' or repo_oai_name is null); UPDATE repositories SET repo_oai_name = REPLACE(REPLACE(SUBSTR(homepage_url,8),'/','-'),'www.','') where homepage_url like 'http%' and (r...
<filename>standard/instant/initdb.d/01_creata_dummy_table.sql CREATE TABLE dummy ( id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, contents VARCHAR(100) NOT NULL ) ENGINE = innodb, CHARSET = utf8mb4; DELIMITER // CREATE PROCEDURE gen_rows_power_of_2(n INT) BEGIN DECLARE i INT; SET i = 0; WHILE i ...
-- (application) template table CREATE TYPE public.template_status AS ENUM ( 'DRAFT', 'AVAILABLE', 'DISABLED' ); CREATE TABLE public.template ( id serial PRIMARY KEY, name varchar, name_plural varchar, code varchar NOT NULL, is_linear boolean DEFAULT TRUE, start_message jsonb, s...
ALTER TABLE files ADD COLUMN f_media_type t_media_file_type DEFAULT 'text';
<reponame>trvedata/move-op CREATE SEQUENCE move_ops_seq; CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; CREATE TYPE unique_timestamp AS ( time timestamptz, counter bigint, id uuid ); CREATE TABLE move_ops2 ( time unique_timestamp PRIMARY KEY DEFAULT (now(), nextval('move_ops_seq'), uuid_generat...
<reponame>kxbmap/MyFleetGirls<filename>server/conf/db/migration/default/V126__add_event_record.sql insert into area_name values (34, "'16 春 E", '開設!基地航空隊');
<reponame>Shuttl-Tech/antlr_psql -- file:create_table.sql ln:37 expect:true CREATE TABLE tenk1 ( unique1 int4, unique2 int4, two int4, four int4, ten int4, twenty int4, hundred int4, thousand int4, twothousand int4, fivethous int4, tenthous int4, odd int4, even int4, stringu1 name, stringu2 n...
<reponame>Shuttl-Tech/antlr_psql -- file:box.sql ln:143 expect:true SELECT * FROM box_temp WHERE f1 << '(10,20),(30,40)'
/* Query para publicar a tabela. Esse é o lugar para: - modificar nomes, ordem e tipos de colunas - dar join com outras tabelas - criar colunas extras (e.g. logs, proporções, etc.) Qualquer coluna definida aqui deve também existir em `table_config.yaml`. # Além disso, sinta-se à vontade para alterar alg...
<filename>atd-vzd/schema/atd_txdot__insurance_proof_lkp.sql -- -- PostgreSQL database dump -- -- Dumped from database version 10.6 -- Dumped by pg_dump version 10.10 -- Started on 2019-10-15 13:54:08 CDT SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding...
ALTER TABLE db_version CHANGE COLUMN required_10323_02_mangos_command required_10331_01_mangos_mangos_string bit; DELETE FROM mangos_string WHERE entry IN (131,132,562,563,564,565,566,567,568,569,570,571,572,575,576,1153,1154,1155,1156,1157,1158,1159,1160); INSERT INTO mangos_string VALUES (131,'You changed the %s sp...
-- server agent query insert into `creature_names` (`entry`, `name`, `subname`, `info_str`, `Flags1`, `type`, `family`, `rank`, `unk4`, `spelldataid`, `male_displayid`, `female_displayid`, `male_displayid2`, `female_displayid2`, `unknown_float1`, `unknown_float2`, `civilian`, `leader`) values ('89000', "Server Agent"...
-- @description query01 for PXF Hive feature checking error when Hive metastore is down. -- start_matchsubs -- -- # create a match/subs -- -- m/(ERROR|WARNING):.*remote component error.*\(\d+\).*from.*'\d+\.\d+\.\d+\.\d+:\d+...
<filename>org.eniware.edge.dao.jdbc/src/org/eniware/edge/dao/jdbc/general/find-upload.sql SELECT created, source_id, jdata FROM eniwareedge.sn_general_Edge_datum WHERE uploaded IS NULL ORDER BY created, source_id
<filename>Kinetix/Kinetix.Workflow/SQLResources/DeleteActivitiesByDefinitionIds.sql  DELETE WDE FROM WF_ACTIVITY WFA JOIN WF_DECISION WDE ON (WFA.WFA_ID = WDE.WFA_ID) WHERE WFAD_ID = @WFAD_ID; DELETE FROM WF_ACTIVITY WHERE WFAD_ID = @WFAD_ID;
--------------------------------------------------------------------- -- LAB 15 -- -- Exercise 3 --------------------------------------------------------------------- USE TSQL; GO --------------------------------------------------------------------- -- Task 1 -- -- Write an EXECUTE statement to invoke the sys.sp_hel...
<gh_stars>1-10 -- +goose Up -- SQL in section 'Up' is executed when this migration is applied ALTER TABLE `issues` ADD `draft_comment` TEXT COLLATE utf8_bin; -- +goose Down -- SQL in section 'Down' is executed when this migration is rolled back ALTER TABLE issues DROP COLUMN `draft_comment`;
UPDATE customers SET name='new' WHERE CURRENT OF customer
{% macro get_comment_columns() %} {% set columns = [ {"name": "_fivetran_synced", "datatype": dbt_utils.type_timestamp()}, {"name": "author_id", "datatype": dbt_utils.type_string()}, {"name": "body", "datatype": dbt_utils.type_string()}, {"name": "created", "datatype": dbt_utils.type_timestamp()}, ...
CREATE TYPE [dbo].[UserAgentFactTableType] AS TABLE ( [UserAgent] NVARCHAR(2048) NULL )
DROP TABLE IF EXISTS `provisioning_profile_devices`; CREATE TABLE `provisioning_profile_devices` ( `id` BIGINT(20) NOT NULL AUTO_INCREMENT, `provisioning_profile_id` BIGINT(20) NOT NULL, `agent_device_id` BIGINT(20) DEFAULT NULL, `device_udid` VARCHAR(255) NOT NULL, ...
CREATE TABLE `archivos` ( `id_archivo` int NOT NULL AUTO_INCREMENT, `id_documento` int NOT NULL, `nombre` varchar(255) NOT NULL, `ruta` varchar(255) NOT NULL, `flg_tipo` int NOT NULL, `estado` int NOT NULL, PRIMARY KEY (`id_archivo`) ); CREATE TABLE `areas` ( `id_area` int NOT NULL AUTO_INCREMENT, ...
<reponame>Archer039/414045-task-force-1 INSERT INTO tasks (executor_id, customer_id, category_id, description, deadline, title, address, price, state) VALUE ('3','4','2','Suspendisse potenti. In eleifend quam a odio. In hac habitasse platea dictumst.','2019-11-15','enable impactful technologies','1 Eagan Crossing','658...
<reponame>reGative/Phorumph -- Adminer 3.6.2 MySQL dump SET NAMES utf8; SET foreign_key_checks = 0; SET time_zone = 'SYSTEM'; SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; DROP TABLE IF EXISTS `categories`; CREATE TABLE `categories` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` text NOT NULL, `descriptio...
<filename>Stored Procedures.sql USE elearning; DELIMITER // CREATE PROCEDURE get_assignment ( IN id char(10) ) BEGIN SELECT assignment_question.id AS 'ID', assignment_question.title AS 'Assignment Title', assignment_question.question_file_path AS 'Assignment File Path' FROM assignment_question INN...
<filename>db/20160603_create_table.sql -- phpMyAdmin SQL Dump -- version 4.2.11 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jun 02, 2016 at 11:19 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...
DROP TABLE IF EXISTS notes cascade; --NOTE TABLE CREATE TABLE notes ( id SERIAL PRIMARY KEY, note TEXT, done BOOLEAN DEFAULT FALSE, created_at TIMESTAMP NOT NULL DEFAULT NOW(), updated_at TIMESTAMP NOT NULL DEFAULT NOW() )
CREATE TABLE Stg.[FAA_ContactMessages] ( SourseSK BIGINT IDENTITY(1,1) NOT NULL ,BinaryId varchar(256) ,TypeCode varchar(256) ,EntityId varchar(256) ,EntityTypeCode varchar(256) ,DateCreatedTimeStamp varchar(256) ,DateUpdatedTimeStamp varchar(256) ,UserId varchar(256) ,Enquiry varchar(max) ,RunId bigint d...
<reponame>GeorgenaGeorgieva/Databases-MSSQL<filename>04. Data Aggregation/Data Aggregation.sql USE Gringotts GO --Problem 1.Records’ Count --****************************** SELECT COUNT(w.Id) AS [Count] FROM WizzardDeposits AS w --Problem 2.Longest Magic Wand --********************************** SELECT MAX(w.MagicW...
SELECT "TrainsUK2_1"."Calculation_4220604162631191" AS "Calculation_4220604162631191" FROM "TrainsUK2_1" WHERE ((TABLEAU.NORMALIZE_DATETIME("TrainsUK2_1"."Date") >= (DATE '2014-04-01')) AND (TABLEAU.NORMALIZE_DATETIME("TrainsUK2_1"."Date") <= (DATE '2015-05-30')) AND (NOT (((1 + CAST(TRUNC(DATE_PART('DOW', TABLEAU.NORM...
DROP TABLE IF EXISTS teacher_mst CASCADE; DROP TABLE IF EXISTS student_mst CASCADE; DROP TABLE IF EXISTS webinar_mst CASCADE; DROP TABLE IF EXISTS participant_mst CASCADE;
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 02-06-2018 a las 03:20:27 -- Versión del servidor: 10.1.16-MariaDB -- Versión de PHP: 5.6.24 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT...
-- phpMyAdmin SQL Dump -- version 4.0.10.16 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Sep 16, 2016 at 12:50 PM -- Server version: 5.7.13-0ubuntu0.16.04.2 -- PHP Version: 5.6.25-2+deb.sury.org~xenial+1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Database: `apoll...
<filename>APP(BE)/mockdata_per_table/1. init_db.sql /*!40101 SET NAMES utf8 */; /*!40014 SET FOREIGN_KEY_CHECKS=0 */; /*!40101 SET SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET SQL_NOTES=0 */; CREATE DATABASE /*!32312 IF NOT EXISTS*/ do_nation /*!40100 DEFAULT CHARACTER SET utf8mb4 */; USE do_nation; DROP TABLE IF...
-- This will add 3.594.280 visits considering you have 10 animals, 4 vets, and it will use around ~87.000 timestamps (~4min approx.) INSERT INTO visits (animal_id, vet_id, date_of_visit) SELECT * FROM (SELECT id FROM animals) animal_ids, (SELECT id FROM vets) vets_ids, generate_series('1980-01-01'::timestamp, '2021-01-...
CREATE TABLE `jenis_tinggal` ( `id_jns_tinggal` int(2) NOT NULL AUTO_INCREMENT, `nm_jns_tinggal` varchar(50) DEFAULT NULL, PRIMARY KEY (`id_jns_tinggal`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC COMMENT='REF';
drop view if exists pitt_movies cascade; drop view if exists pitt_coworkers cascade; drop view if exists pitt_coworker_counts cascade; drop view if exists movie_keyword_count cascade; drop view if exists distinct_actors cascade; drop view if exists distinct_people cascade; drop view if exists movie_different_people cas...
<gh_stars>10-100 CREATE SCHEMA misc; GRANT USAGE ON SCHEMA misc TO visitor; GRANT USAGE, SELECT ON ALL SEQUENCES IN SCHEMA misc TO visitor;
Drop schema if exists tech_blog; Create Schema tech_blog;
<filename>PageTool/User/Database/GetType.sql select `User_Type`.`ID` as `ID`, `User_Type`.`name` as `name` from `User` inner join `User_Type` on (`User_Type`.`ID` = `User`.`FK_User_Type`) where `User`.`ID` = :ID limit 1;
<reponame>ZGMFX01A/Second-HandTradingPlatform<filename>DB/Second-hand trading platform.sql /* Navicat Premium Data Transfer Source Server : MySql Source Server Type : MySQL Source Server Version : 80023 Source Host : localhost:3306 Source Schema : test1 Target Server Type : MySQ...
<reponame>oleg-cherednik/hackerrank<filename>SQL/Advanced Join/Symmetric Pairs/mysql.sql select f1.x, f1.y from functions f1 join functions f2 on f2.x = f1.y and f2.y = f1.x where f1.x < f1.y or f1.x = f1.y and (select count(*) from functions f3 where f3.x = f1.x and f3.y = f1.y) > 1 group by f1.x, f1.y order by f1.x, ...
<reponame>TecArt/servicecatalog-development ------------------------------------------------------------ -- modifications for service operation parameters ------------------------------------------------------------ -- new parameter table CREATE TABLE "operationparameter" ( "tkey" BIGINT NOT NULL, "version" INTEGER ...
--Needed for JPA/hibernate CREATE SEQUENCE ${ohdsiSchema}.HIBERNATE_SEQUENCE MAXVALUE 9223372036854775807 NO CYCLE; --Example CREATE TABLE ${ohdsiSchema}.EXAMPLEAPP_WIDGET ( ID BIGINT NOT NULL PRIMARY KEY , NAME VARCHAR(50) );