sql
stringlengths
6
1.05M
-- GW_BiologicConstituent downs DROP table if exists public.gwml2c_gw_biologicconstituent; drop SEQUENCE IF EXISTS public.gwml2c_gw_biologicconstituent_id_seq; Drop INDEX if EXISTS gwml2c_gw_biologicconstituent_id_uindex; Drop INDEX if EXISTS gwml2c_gw_biologicconstituent_gml_id_uindex; -- GW_ChemicalConst...
<gh_stars>10-100 {% set partition_clause = "partition by id order by created_at rows between unbounded preceding and unbounded following" %} with events as ( select * from {{ref('stripe_invoice_item_events')}} ) select distinct id, last_value(invoice_id ignore nulls) over ( {{ partition_clause }} ) as ...
<reponame>bcgov/cas-ciip-portal -- Verify ggircs-portal:computed_columns/application_revision_is_immutable on pg begin; select pg_get_functiondef('ggircs_portal.application_revision_is_immutable(ggircs_portal.application_revision)'::regprocedure); rollback;
<filename>sql/cls-summary.sql #standardSQL # This query only processes 117.5 MB because it uses the materialized dataset! SELECT p75_cls, small_cls AS good, medium_cls AS needs_improvement, large_cls AS poor FROM `chrome-ux-report.materialized.metrics_summary` WHERE yyyymm = 202003 AND origin = 'https://w...
/* * Calls all the SQL scripts needed to clear the entire conditions DB * Note: Does not include the CHANNELVIEW and VIEWDESCRIPTION tables/data! */ @clear_calibration_data @clear_calibration_core @clear_laser_data @clear_laser_core @clear_dcu_data @clear_dcu_core @clear_monitoring_data @clear_monitoring_core @c...
ALTER TABLE "source_collector"."Schema" ADD COLUMN "ConnectionId" uuid NOT NULL;
<reponame>SKalt/pg_sql_parser_tests CREATE SCHEMA myschema;
--Test collection type --Create class with collection type: set create class t1(c1 set of integer, c2 set of varchar(10), c3 set of date, c4 set of char(2), c5 set of timestamp, c6 set of bit(8)); insert into t1 values({1,2,3},{'abc','xxx','yyy','xxx'}, {date'05/...
/* test for partial indexes on partitioned tables */ create table part ( id integer unique, textlabel varchar(255), description varchar(4096) ) partition by range (id) ( partition p1 values less than (10), partition p2 values less than (20), partition p3 values less than (30), ...
-- @testpoint:opengauss关键字volatile非保留),作为序列名 --关键字不带引号-成功 drop sequence if exists volatile; create sequence volatile start 100 cache 50; drop sequence volatile; --关键字带双引号-成功 drop sequence if exists "volatile"; create sequence "volatile" start 100 cache 50; drop sequence "volatile"; --关键字带单引号-合理报错 drop sequence if ...
<reponame>jphacks/C_2101 CREATE TABLE IF NOT EXISTS `participation` ( `user_id` INT UNSIGNED NOT NULL, `room_id` INT UNSIGNED NOT NULL, `type` INT NOT NULL, `title` VARCHAR(255) NULL, PRIMARY KEY (`user_id`, `room_id`), INDEX `fk_participation_room_id_idx` (`room_id` ASC) VISIBLE, CONSTRAINT `fk_participa...
<filename>migrations/2017-06-18-GameHasPokemon.sql<gh_stars>0 /* -- Query: SELECT * FROM pokedex.gameHasPokemon LIMIT 0, 10000 -- Date: 2017-06-18 14:29 */ INSERT INTO `gameHasPokemon` (`gameId`,`pokeId`) VALUES (1,1); INSERT INTO `gameHasPokemon` (`gameId`,`pokeId`) VALUES (2,1); INSERT INTO `gameHasPokemon` (`gameId...
<reponame>cj2-site/cj2_backend<filename>schema.sql DROP TABLE IF EXISTS url; CREATE TABLE url ( id SERIAL PRIMARY KEY, long_url TEXT, short_url TEXT, clicks INTEGER, qr_code TEXT, times_created INT, created_at timestamp NOT NULL DEFAULT NOW() );
<filename>data/db/116-cascade.sql ALTER TABLE `conversation_text_editor` DROP FOREIGN KEY `fk_conversation_doc_10`, DROP FOREIGN KEY `fk_conversation_doc_20`; ALTER TABLE `conversation_text_editor` ADD CONSTRAINT `fk_conversation_doc_10` FOREIGN KEY (`conversation_id`) REFERENCES `conversation` (`id`) ON DELETE...
-- phpMyAdmin SQL Dump -- version 4.6.6deb5 -- https://www.phpmyadmin.net/ -- -- Client : localhost:3306 -- Généré le : Ven 05 Octobre 2018 à 03:56 -- Version du serveur : 5.7.23 -- Version de PHP : 7.2.9-1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@...
<gh_stars>0 CREATE PROCEDURE usp_no_result AS
<reponame>italoteix/foodfy CREATE TABLE "files" ( "id" SERIAL PRIMARY KEY, "name" text, "path" text NOT NULL ); CREATE TABLE "chefs" ( "id" SERIAL PRIMARY KEY, "name" text, "file_id" int REFERENCES files(id), "created_at" timestamp DEFAULT (now()) ); CREATE TABLE "recipes" ( "id" SERIAL PRIMARY KEY, ...
<reponame>bennokr/rdflib-r2r CREATE TABLE "Target" ( "PK" INT PRIMARY KEY, "key1attr1" CHAR(5), "key1attr2" CHAR(5), "key2attr1" CHAR(5), "key2attr2" CHAR(5), UNIQUE ("key1attr1", "key1attr2"), UNIQUE ("key2attr2", "key2attr1") ); CREATE TABLE "Source" ( "ID" INT PRIMARY KEY, "attrA" CHAR(5), "attrB" CHAR(5)...
<reponame>RG4421/codeshare<gh_stars>0 CREATE TABLE [dbo].[ProjectFile] ( [Id] INT IDENTITY (1, 1) NOT NULL, [Name] NVARCHAR (255) NOT NULL, [Url] NVARCHAR (2083) NOT NULL, [ProjectRelease_Id] INT NULL, CONSTRAINT [PK_dbo.ProjectFile...
-- ugyldige koblinger opprettet pga feil i k9-sak (eksisterer ikke der, så ute av synk). update kobling set aktiv=false where kobling_referanse in ('98272ad2-b511-424c-b1bf-7d8edc51b7ce' , '633c29ab-d17b-4b4b-bdc8-bd86d368c068' , '26c33466-6eff-4192-a225-1de59c83381e' , '9924ddef-43e9-4bce-a817-adaf4c16832f' , '2fab9c9...
CREATE DATABASE delilah_resto; USE delilah_resto; CREATE TABLE `favorites` ( `favorite_id` int primary key auto_increment not null unique, `user_id` int not null, `product_id` int not null ); CREATE TABLE `products_orders` ( `product_order_id` int primary key auto_increment not null unique, `product_id` in...
-- Example for creating a Star schema -- Create the Fact Table. In our case it would be the TripTable DROP TABLE dbo.FactTrips; CREATE TABLE dbo.FactTrips ( [tripId] INT NOT NULL, [driverId] INT NOT NULL, [customerId] INT NOT NULL, [tripdate] INT, [startLocation] VARCHAR (40), [endLocation] V...
-- file:guc.sql ln:243 expect:true select myfunc(0), current_setting('work_mem')
<filename>internal/pkg/db/mysql/migrations/000001_init.up.sql CREATE TABLE IF NOT EXISTS links ( id binary(16) NOT NULL DEFAULT (UUID_TO_BIN(UUID(), TRUE)), url varchar(255) NOT NULL, hash varchar(255) NOT NULL, description text NULL, created_at timestamp NULL D...
<filename>api/bonus_pulsa.sql -- MySQL dump 10.13 Distrib 5.7.19, for Linux (x86_64) -- -- Host: localhost Database: bonus_pulsa -- ------------------------------------------------------ -- Server version 5.7.19-0ubuntu0.16.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CH...
-- alter tables ALTER TABLE `sys_sessions` ADD INDEX `date` (`date`); -- regular updates/changes DELETE FROM `sys_admin_dashboard` WHERE `name` = 'sys_licenses_90days' OR `name` = 'sys_licenses_400days'; UPDATE `sys_email_templates` SET `Desc` = 'Admin notification - new user joined' WHERE `Name` = 't_UserJoined' ...
DROP FUNCTION IF EXISTS migrate_production(); CREATE OR REPLACE FUNCTION migrate_production() RETURNS void AS $$ DECLARE row_count integer; BEGIN raise notice '...importing wells_production_data data'; INSERT INTO production_data( production_data_guid , filing_number , well...
INSERT INTO settings(key, hint, value) VALUES('twitter-search', 'Twitter-søk', '{"type": "string", "value": "Switcharoo"}'); INSERT INTO services(key, value) VALUES('program-enabled', FALSE); INSERT INTO services(key, value) VALUES('twitter-enabled', FALSE); INSERT INTO csses(selector, property, value, type, title) V...
<filename>postgres/src/test/sql/configure.sql<gh_stars>1-10 CREATE OR REPLACE FUNCTION assert(actual int8, expected int8, message text) RETURNS bool LANGUAGE plpgsql AS $$ BEGIN IF expected IS DISTINCT FROM actual THEN RAISE EXCEPTION 'ASSERT: %: expected=%, actual=%', message, expected, actual; END IF; RETU...
<gh_stars>1-10 INSERT INTO `base_menu` VALUES ('111', 'assetAccountLogManager', '资产流水明细', '56', '/assets/assetAccountLog', null, 'menu', '0', '资产流水明细', '/assetsManager/assetAccountLog', null, '_import(\'assets/assetAccountLog/index\')', null, null, null, '2019-03-30 17:07:32', 'Tian'); INSERT INTO `base_menu_title` V...
-- SPDX-License-Identifier: Apache-2.0 -- Licensed to the Ed-Fi Alliance under one or more agreements. -- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0. -- See the LICENSE and NOTICES files in the project root for more information. USE [generate] GO SET ANSI_NULLS ON GO SET QUOTED...
create table rule_engine_condition ( id int auto_increment primary key, name varchar(50) not null, description varchar(500) null, workspace_id int null, create_user_id int null, create_user_name varchar(50) null, left_type...
-- AlterTable ALTER TABLE `Collection` MODIFY `updatedAt` DATETIME(3) NOT NULL; -- AlterTable ALTER TABLE `CollectionAuthor` MODIFY `updatedAt` DATETIME(3) NOT NULL; -- AlterTable ALTER TABLE `CollectionStory` MODIFY `updatedAt` DATETIME(3) NOT NULL; -- AlterTable ALTER TABLE `Image` MODIFY `updatedAt` DATETIME(3) N...
<filename>db_dump/photo_processing_db.sql -- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Хост: localhost -- Время создания: Ноя 01 2021 г., 02:16 -- Версия сервера: 8.0.25 -- Версия PHP: 8.0.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 ...
-- @testpoint:opengauss关键字where(保留),作为用户组名 --关键字不带引号-合理报错 drop group if exists where; create group where with password '<PASSWORD>'; --关键字带双引号-成功 drop group if exists "where"; create group "where" with password '<PASSWORD>'; --清理环境 drop group "where"; --关键字带单引号-合理报错 drop group if exists 'where'; create group 'whe...
-- @testpoint: opengauss关键字trigger_schema(非保留),作为存储过程名,部分测试点合理报错 --关键字不带引号-成功 drop procedure if exists trigger_schema; create procedure trigger_schema( section number(6), salary_sum out number(8,2), staffs_count out integer) is begin select sum(salary), count(*) into salary_sum, staffs_count from staffs where s...
create table feedbacks ( id bigserial primary key, create_time timestamptz not null default now(), user bigint references users (id), feedback text not null ); create index feedbacks_create_time_idx ON feedbacks (create_time); create index feedbacks_user_idx ON feedbacks (user);
-- Up CREATE TABLE "failed_extraction" ( id INTEGER PRIMARY KEY AUTOINCREMENT, searchQuery VARCHAR(255), title VARCHAR(255), errorMessage VARCHAR(255), pageSize INTEGER, page INTEGER, resultIndex INTEGER ); -- Down DROP TABLE "failed_extraction";
CREATE TABLE [dbo].[ExceptionLog] ( [ExceptionLogId] BIGINT NOT NULL CONSTRAINT PK_ExceptionLogId PRIMARY KEY IDENTITY, [Message] TEXT NOT NULL, [Exception] TEXT NOT NULL, [LoggedDateTime] DATETIMEOFFSET NOT NULL, [StackTrace] TEXT NOT NULL, [Url] TEXT NULL, [ApplicationName] NVARCHAR(50)...
UPDATE ewb_user SET hashed_password = $2, salt = $3 WHERE id = $1
DROP TABLE IF EXISTS #Stage CREATE TABLE #Stage ( Input int NOT NULL ) DROP TABLE IF EXISTS #Inputs CREATE TABLE #Inputs ( Id int IDENTITY NOT NULL , depth int NOT NULL ) BULK INSERT #Stage FROM 'D:\AdventOfCode2021\Day1\Input.csv' WITH ( FIRSTROW = 1, FIELDTERMINATOR = ',', --CSV field delimiter ROWTERMINATO...
<reponame>omoghrabi/SQL_exercise select firstname,surname, joindate from Members where joindate = (select max(joindate) from Members)
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jun 07, 2018 at 04:50 AM -- Server version: 10.1.13-MariaDB -- PHP Version: 7.0.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
SET DEFINE OFF; ALTER TABLE AFW_13_NAVGT ADD ( CONSTRAINT AFW_13_NAVGT_FK1 FOREIGN KEY (REF_ID_SESN) REFERENCES AFW_12_SESN (ID_SESN) ON DELETE CASCADE ENABLE VALIDATE) /
<reponame>marius11/studious-guacamole<filename>ApiService/Stored Procedures/dbo.UpdateStudent.sql CREATE PROCEDURE [dbo].[UpdateStudent] @Id INT, @FirstName NVARCHAR(64) = NULL, @LastName NVARCHAR(64) = NULL AS IF COALESCE(@FirstName, @LastName) IS NOT NULL BEGIN SET NOCOUNT ON; UPDATE Students SET FirstNam...
<filename>sql jangan ikut diupload/restodepo2_tambahan1.sql -- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 24, 2018 at 05:11 AM -- Server version: 10.1.26-MariaDB -- PHP Version: 7.0.23 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; STA...
-- Script per l'inserimento di uno o più impiegati nel database da utilizzare solamente dopo aver eseguito creazione.sql -- ed aver avviato per la prima volta la webapp. USE tirociniosmart; -- Inserimento dell'impiegato dell'ufficio tirocini -- Specificare i valori dei campi username, password, email, nome e login da...
<gh_stars>1-10 SELECT name, brewer FROM Beers b1 WHERE NOT EXISTS (SELECT * FROM Beers WHERE brewer = b1.brewer AND name != b1.name);
<reponame>kenzeng24/sqlzoo-exercises<filename>select-within-select.sql<gh_stars>1-10 /* Author: <NAME> Date: August 20 2021 A collection of questions from "SELECT within SELECT" section from sqlzoo https://sqlzoo.net/wiki/SELECT_within_SELECT_Tutorial */ /* 1. List each country name where the population is la...
<gh_stars>10-100 -- schemas CREATE SCHEMA IF NOT EXISTS bdot; CREATE SCHEMA IF NOT EXISTS changesets_processing; CREATE SCHEMA IF NOT EXISTS prg; CREATE SCHEMA IF NOT EXISTS teryt; -- extensions CREATE EXTENSION IF NOT EXISTS hstore WITH SCHEMA public; CREATE EXTENSION IF NOT EXISTS pg_trgm WITH SCHEMA public; CREATE ...
ALTER TABLE integration_entity ADD COLUMN api_endpoint varchar(255); UPDATE integration_entity SET api_endpoint = api_label; ALTER TABLE integration_entity MODIFY COLUMN api_endpoint varchar(255) NOT NULL;
-- file:json.sql ln:600 expect:true SELECT json_build_object(VARIADIC '{a,b,c}'::text[])
<reponame>dmitigr/cefeika<gh_stars>10-100 -- -*- SQL -*- -- Copyright (C) 2021 <NAME> -- -- This software is provided 'as-is', without any express or implied -- warranty. In no event will the authors be held liable for any damages -- arising from the use of this software. -- -- Permission is granted to anyone to use t...
<filename>ci-scripts/dsTesterDockerCompose/oai_db.sql -- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: 172.16.200.10:3306 -- Generation Time: Mar 22, 2021 at 10:31 AM -- Server version: 5.7.33 -- PHP Version: 7.4.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_z...
<gh_stars>0 select * from {{ var('customer_source') }}
ALTER TABLE project ADD COLUMN IF NOT EXISTS registry_id int; ALTER TABLE IF EXISTS cve_whitelist RENAME TO cve_allowlist; UPDATE role SET name='maintainer' WHERE name='master'; UPDATE project_metadata SET name='reuse_sys_cve_allowlist' WHERE name='reuse_sys_cve_whitelist'; CREATE TABLE IF NOT EXISTS execution ( i...
# 创建数据库 create database if not exists es_admin charset utf8mb4; use es_admin; # 后台管理员 create table if not exists `admin_auth` ( `id` int(10) unsigned not null AUTO_INCREMENT, `uname` varchar(20) not null comment '用户名', `pwd` text not null comment '密码', `encry` char(6) not null comment '加密串', `role_id` int(10) un...
<reponame>Ensembl/ensembl-taxonomy -- Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute -- Copyright [2016-2021] EMBL-European Bioinformatics Institute -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in complia...
<filename>dbt_packages/dbt_utils/integration_tests/models/cross_db_utils/test_bool_or.sql<gh_stars>1-10 select key, {{ dbt_utils.bool_or('val1 = val2') }} as value from {{ ref('data_bool_or' )}} group by key
<gh_stars>10-100 select network_interface_id, interface_type from aws.aws_ec2_network_interface where network_interface_id = '{{ output.resource_id.value }}'
<reponame>TTGS/IT_script --日期可以和数字相加,结果是天进位。时间和时间戳都不行,需要指定。 --当前日期可以直接加数字。 select current_date,current_date+1 ; -- 时间和时间戳会保持。 select current_time,current_time +1 ; select current_timestamp,current_timestamp +1 ; --使用指定单位进行相加。 select current_timestamp,current_timestamp +interval '1' month ; --如果是列中数字,可以使用拼接加...
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Servidor: localhost:3306 -- Tiempo de generación: 17-09-2018 a las 21:01:07 -- Versión del servidor: 5.7.19 -- Versión de PHP: 7.1.14 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /...
select Category , sum(case when EXTRACT(month from time) = 3 then cost else 0 end) as Mar , sum(case when EXTRACT(month from time) = 2 then cost else 0 end) as Feb , sum(case when EXTRACT(month from time) = 1 then cost else 0 end) as Jan from Expenses group by 1 order by category ;
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 23 Feb 2022 pada 16.33 -- Versi server: 10.4.17-MariaDB -- Versi PHP: 8.0.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET...
<reponame>horseyhorsey/Horsify_2.0 AS SELECT S.Id, S.Rating, S.Year, Art.Name AS Artist, S.Title, S.Time, S.Country, A.Title AS Album, M.MusicKey, S.Bpm, S.BitRate, S.Track, S.Comment, L.Name AS Label, G.Name AS Genre, I.DriveVolume || I.Folder || '\' || I.Filename AS FileLocation, S.D...
DROP DATABASE IF EXISTS health_db; CREATE DATABASE health_db;
<filename>sql/updates/005-upgrade-user.sql<gh_stars>0 ALTER TABLE `users` CHANGE `role` `role` INT( 11 ) NOT NULL ;
## SQL EXAMPLE WITH MACRO CONDITIONS AND MACRO INTERPRET CONSTANT #DEFINE @GERMAN #IFNDEF @ENGLISH #IFDEF @GERMAN #DEFINE @SELECT_LINE ProjektNr, DataDate, Deadline, TätigkeitNr, Beschreibung, FrühereBeginn, SpätereEnde, IsKritisch, Verantwortlicher, Kommentar #DEFINE @CONDITION SpätestesEnde > ...
/* Navicat Premium Data Transfer Source Server : 本地mysql8.0 Source Server Type : MySQL Source Server Version : 80012 Source Host : localhost:3306 Source Schema : goblog_new Target Server Type : MySQL Target Server Version : 80012 File Encoding : 65001 Date: 22/03/202...
CREATE USER rockmine_user WITH PASSWORD '<PASSWORD>' CREATEDB; GRANT SELECT on asteroid to rockmine_user; GRANT SELECT on composition to rockmine_user; GRANT SELECT on spec_header to rockmine_user; GRANT SELECT on spec_link to rockmine_user; GRANT SELECT on spec_data to rockmine_user;
<reponame>power-cosmic/cosc571_database_project<gh_stars>1-10 -- MySQL dump 10.13 Distrib 5.6.23, for osx10.8 (x86_64) -- -- Host: localhost Database: bbb_te -- ------------------------------------------------------ -- Server version 5.6.23 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101...
/* Tablas Temporales ----------------- Una tabla temporal es un tipo especial de tabla que permite almacenar un conjunto de resultado temporal, el cual puede ser reutilizado varias veces por una sesión. Una tabla temporal es útil cuando quieres consultar datos que requieren un SELECT sencillo con claúsulas JOIN. Usualm...
<reponame>saddam22/Jhinaiya-High-School -- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 19, 2020 at 02:57 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 t...
<gh_stars>1-10 create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB2" as ( -- SQL model to cast each column to its adequate SQL type converted from the JSON schema type select _AIRBYTE_NESTED_STREAM_WITH_COMPLEX_CO...
/* Creating memory-optimized key-value pairs table for caching purposes (drop existing if needed) */ DROP TABLE IF EXISTS Cache; GO CREATE TABLE Cache ( [key] BIGINT IDENTITY, value NVARCHAR(MAX), INDEX IX_Hash_Key HASH ([key]) WITH (BUCKET_COUNT = 100000) ) WITH ( MEMORY_OPTIMIZED = ON, DURABILITY = SCHEMA_ONL...
<reponame>StJudeWasHere/seonaut CREATE TABLE IF NOT EXISTS `users` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `email` varchar(256) NOT NULL DEFAULT '', `password` varchar(512) NOT NULL DEFAULT '', PRIMARY KEY (`id`) ); CREATE TABLE IF NOT EXISTS `issue_types` ( `id` int unsigned NOT NULL AUTO_INCREMENT, ...
<gh_stars>1-10 --Problem 16 CREATE DATABASE SoftUni CREATE TABLE Towns ( Id INT PRIMARY KEY IDENTITY(1,1), [Name] NVARCHAR(100) NOT NULL ) CREATE TABLE Addresses ( Id INT PRIMARY KEY IDENTITY(1,1), AddressText NVARCHAR(100), TownId INT NOT NULL ) CREATE TABLE Departments ( Id INT PRIMARY KEY IDENTITY(1,1), [N...
<filename>services/service-core-db/migrations/2018-06-07-115918_permissions_fix_to_user_details/down.sql DROP FUNCTION community_service_api.user_details(id uuid);
<filename>copy_my_subfolders_to_my_grandparent/adf/Projects/Project002/11_diabetes_model_reg/sql_demo_scripts/M11_AzureSQLDB_create_tables.sql -- DEMO Azure SQL Database source for M11_Diabetes model -- 1) IN DATA to Lake, anonymized CREATE TABLE [dbo].[esml_diabetes] ( -- PersonId: Not needed for ML scoring. It i...
<filename>backend/de.metas.purchasecandidate.base/src/main/sql/postgresql/system/5495680_gh4033-app_UC_C_PurchaseCandidate_Alloc_C_OrderLinePO_ID.sql -- 2018-06-11T15:26:39.332 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Index_Table (AD_Client_ID,AD_Index_Table_ID,AD_Org_ID,AD_Table...
<reponame>Sharko-21/exam-filippov_y_i<filename>app/sql/plate/findByEnsembleID.sql SELECT DISTINCT plate.* FROM composition_ensemble_plate INNER JOIN plate ON composition_ensemble_plate.plate_id = plate.id WHERE ensemble_id = ${id};
<gh_stars>0 select c_integer, COUNT(DISTINCT c_integer) from alltypes group by c_integer order by c_integer;
<reponame>majacQ/keywhiz ALTER TABLE clients ADD expiration BIGINT;
<reponame>albertoivo/log-analisys -- What are the three most popular articles of all time? SELECT a.title, count(a.title) AS quantity FROM log l, articles a WHERE l.path = '/article/' || a.slug GROUP BY a.title ORDER BY quantity DESC LIMIT 3
ALTER TABLE `staff_promotionals_details` ADD `spd_filename` VARCHAR(500) NULL AFTER `spd_specialgrddate`;
-- phpMyAdmin SQL Dump -- version 4.9.5deb2 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Mar 16, 2021 at 07:53 PM -- Server version: 10.5.9-MariaDB-1:10.5.9+maria~focal -- PHP Version: 7.4.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:...
<gh_stars>1-10 -- 更新实验室管理的基础配置数据 -- 陈乐为 update c_message_properties set business_config_status='yes' where business_config_status='1'; update c_message_properties set business_config_status='no' where business_config_status='2'; update c_message_properties_extend set business_config_extend_status='yes' where business_...
/* Script Generado por Evolution - Editor de Formulación de Planillas. 16-01-2017 2:36 PM */ begin transaction delete from [sal].[fac_factores] where [fac_codigo] = '7D1AF3D1-70A8-4168-8C97-E62AEFBA44B2'; insert into [sal].[fac_factores] ([fac_codigo],[fac_id],[fac_descripcion],[fac_vbscript],[fac_codfld],[fac_codpa...
begin param_admin.edit_parameter_group( p_pgr_id => 'PIT', p_pgr_description => 'Parameter for PIT', p_pgr_is_modifiable => true ); param_admin.edit_parameter( p_par_id => 'ADAPTER_PREFERENCE' ,p_par_pgr_id => 'PIT' ,p_par_description => 'Order in which PIT tries to use adapter preferences...
-- -------------------------------------------------------- -- Servidor: localhost -- Versão do servidor: 10.4.6-MariaDB - mariadb.org binary distribution -- OS do Servidor: Win64 -- HeidiSQL Versão: 11.2.0.6213 -- ------------------------------------------------...
/* SQLyog Ultimate v11.11 (64 bit) MySQL - 5.5.5-10.1.21-MariaDB : Database - mine_craft_mods ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET ...
<reponame>IgorSilvaFreitas/MySQL create table assite ( id int not null auto_increment, data date, idcadastro int, idcurso int, primary key (id), foreign key (idcadastro) references cadastro(id), foreign key (idcurso) references cursos(idcurso) )default charset = utf8; insert into assite values (default, '2921-09-26', ...
USE master GO SELECT COUNT(*) FROM sys.certificates
{{ config( materialized='table', unique_key = 'table_name', on_schema_change='sync_all_columns', ) }} -- depends_on: {{ ref('re_data_last_table_samples') }} -- depends_on: {{ ref('re_data_last_table_samples_part') }} select table_name, sample_data, {{- dbt_utils.current_tim...
<reponame>Jon-NJ/bookclub-plugin CREATE TABLE `{{table}}` ( `event_id` varchar(40) NOT NULL, `organiser` int(10) UNSIGNED NOT NULL DEFAULT '0', `starttime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `endtime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `modtime` timestamp NOT NULL DEFAULT '0000-00-...
CREATE SCHEMA playlist; CREATE TABLE playlist.name ( id SERIAL, name VARCHAR(75), PRIMARY KEY (id) ) ENGINE INNODB; CREATE UNIQUE INDEX by_names ON playlist.name (name); CREATE TABLE playlist.playlist ( id SERIAL, name_key BIGINT(20) UNSIGNED NOT NULL, idx INTEGER UNSIGNED, object VARCHAR(256), PRIMA...
drop table if exists MB_ACCT_WITHDRAW_TYPE; /*==============================================================*/ /* Table: MB_ACCT_WITHDRAW_TYPE */ /*==============================================================*/ create table MB_ACCT_WITHDRAW_TYPE ( INTERNAL_KEY Decimal(15)...
ALTER TABLE ONLY analysis_record ALTER COLUMN set_id SET DEFAULT currval('analysis_sets_set_id_seq'); -- CREATE TABLE analysis_sets_record_xref ( -- set_id integer NOT NULL, -- analysis_id integer NOT NULL, -- CONSTRAINT fk_set -- FOREIGN KEY(set_id) -- REFERENCES analysis_sets(set_id), -- ...
-- original: e_fkey.test -- credit: http://www.sqlite.org/src/tree?ci=trunk&name=test CREATE TABLE p(a UNIQUE); CREATE TABLE c(b REFERENCES p(a) ON DELETE SET NULL); INSERT INTO p VALUES('x'); INSERT INTO c VALUES('x'); BEGIN; DROP TABLE p; SELECT * FROM c; ROLLBACK ;PRAGMA foreign_ke...
<gh_stars>1-10 DELIMITER | CREATE TRIGGER `nas_insert` AFTER INSERT ON `nas` FOR EACH ROW BEGIN INSERT INTO `nas_changes` (kind) VALUES ("insert"); END; | DELIMITER ; DELIMITER | CREATE TRIGGER `nas_update` AFTER UPDATE ON `nas` FOR EACH ROW BEGIN INSERT INTO `nas_changes` (kind) VALUES ("update"); END; | DELIMITER ; ...