sql
stringlengths
6
1.05M
<filename>research_queries.sql -- SQLite select count(member_id) as count, member_id, movie_id from scrotten_movie_to_member_scrottenmovietomember group by member_id having count(member_id) > 1 -- select * -- from scrotten_movie_to_member_scrottenmovietomember s -- where s.member_id = '/celebrity/1040476-jerry_adler'...
-- Lab 7: Using Table Expressions /* 1. Retrieving Product Information AdventureWorks sells many products that are variants of the same product model. You must write queries that retrieve information about these products. INSTRUCTIONS 50 XP Retrieve the product ID, product name, product model name, and product...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.0.10deb1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Aug 09, 2016 at 11:01 PM -- Server version: 5.5.47-0ubuntu0.14.04.1 -- PHP Version: 5.5.9-1ubuntu4.17 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHA...
CREATE DATABASE Bamazon; USE Bamazon; CREATE TABLE Products (ItemID int AUTO_INCREMENT, ProductName varchar(50) NOT NULL, DepartmentName varchar(50) NOT NULL, Price varchar(30) NOT NULL, StockQuantity int NOT NULL, PRIMARY KEY(ItemID) ); describe Products; select * from Products; INSERT INTO Products (ProductName, De...
<filename>SQL/evaluation/evaluation_northwind.sql<gh_stars>1-10 -- 1 Liste des contacts français -- On travail sur la table Custommers, on affiche la liste des contacts français SELECT customers.CompanyName AS Société, customers.ContactName AS Contact, customers.ContactTitle AS Fonction, customers.Phone AS Téléphone F...
<gh_stars>1-10 ALTER TABLE [dbo].[ZFC_SECURITY_FUNCT_RLS] ADD CONSTRAINT [FK_ZFC_FUNCT_PER_RLS_ZFC_RLS_SE] FOREIGN KEY ([RLS_SE_SEQ_ID]) REFERENCES [dbo].[ZFC_SECURITY_RLS_SE] ([RLS_SE_SEQ_ID]) ON DELETE CASCADE ON UPDATE CASCADE;
<filename>src/test/resources/sql/begin/fe6d4df1.sql<gh_stars>10-100 -- file:plpgsql.sql ln:2013 expect:false begin open c1(20, param1 := 21)
<filename>SQL/627. SwapSalary.sql<gh_stars>100-1000 # We want to swap the sex-column in the salary table # Therefor we do an update-query on the salary table and set the sex-column. # Now we enter the case-block, which looks at the sex-value for each altered row. # if it matches 'm' we will set it to 'f'. otherwise it...
drop database if exists lab3; create database lab3; use lab3; CREATE TABLE `rol` ( `idrol` int(11) NOT NULL, `rol` varchar(45) DEFAULT NULL, PRIMARY KEY (`idrol`) ); create TABLE `usuario` ( `idusuario` int(11) NOT NULL AUTO_INCREMENT, `usuario` varchar(45) DEFAULT NULL, `contraseña` varchar(45) DEFAULT N...
<reponame>sagarmahapatro/rentabook --liquibase formatted sql --changeset rent_a_book:release_0.0.2.add_user_role_table.sql insert into user(firstName,lastName,email,password) values('appadmin','app!@#','<EMAIL>','<PASSWORD>'); insert into role(role_name,role_description) values('superuser','user having all powers'); ...
use accompany; create table user( user_id int primary key not null auto_increment, user_name varchar(100), email varchar(100) not null unique, phone_number varchar(20) not null unique, head_portrait_path varchar(100), user_password varchar(100), motto varchar(100)); create table user_message( user_id int, send_time ...
CREATE TABLE IF NOT EXISTS %AUDIT_TABLE_NAME% ( version BIGINT NOT NULL, -- guaranteed to be contiguous and strictly increasing who VARCHAR(%USER_UID_LEN%) NOT NULL, at_time TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), PRIMARY KEY (version) ) %TABLESPACE%; DO $$ BEGIN IF N...
CREATE SEQUENCE "SQ_MEDIA_ID" MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 3781669 NOCACHE NOORDER NOCYCLE
# --- !Ups INSERT INTO user (name,email,password,salt,created) VALUES ('alice','<EMAIL>','password','salt','2014-01-01 00:00:00'); INSERT INTO user (name,email,password,salt,created) VALUES ('ben','<EMAIL>','password','salt','2014-01-01 00:00:00'); INSERT INTO user (name,email,password,salt,created) VALUES ('carl',...
BEGIN SET plhql.onerror = SETERROR; HOST 'abcd'; IF HOSTCODE <> 0 THEN PRINT 'Correct'; END IF; EXCEPTION WHEN OTHERS THEN PRINT 'FAILED'; END
# MY SQL SCRIPT TO INITIALISE THE LOG AND SFN DB'S ON THE MY SQL SERVER CREATE DATABASE IF NOT EXISTS sfn_database; CREATE DATABASE IF NOT EXISTS log_database;
select xmlelement("other_attrs", xmlelement("parsing_user_id", parsing_user_id)).getClobVal() other from f
create extension if not exists pg_trgm; create index repository_name_idx on repository using gin (name gin_trgm_ops); drop function if exists get_all_repositories(boolean); drop function if exists get_org_repositories(uuid, text, boolean); drop function if exists get_repositories_by_kind(int, boolean); drop function if...
DO $$ DECLARE identity_id1 integer; DECLARE identity_id2 integer; DECLARE identity_id3 integer; DECLARE thread_id1 integer; DECLARE comment_id1 integer; DECLARE comment_id3 integer; BEGIN WITH t1 as( DELETE FROM comment WHERE thread_id = (SELECT id FROM thread WHERE client_id = 'demo') ), t...
-- upgrade -- ALTER TABLE "clinic" ADD "drug_license" VARCHAR(1000); ALTER TABLE "clinic" ADD "gst_percentage" DOUBLE PRECISION NOT NULL DEFAULT 0; -- downgrade -- ALTER TABLE "clinic" DROP COLUMN "drug_license"; ALTER TABLE "clinic" DROP COLUMN "gst_percentage";
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1:3306 -- Tiempo de generación: 23-01-2021 a las 13:44:10 -- Versión del servidor: 5.7.31 -- Versión de PHP: 7.3.21 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHA...
<filename>SQL/2-insert-dandelion-sql-v2.sql INSERT INTO schedule_status (id, name) VALUES (NULL, 'Confirmed'), (NULL, 'Confirmed (Edited)'); INSERT INTO schedule_status (id, name) VALUES (NULL, 'Cancelled'), (NULL, 'Done');
-- -- Database: `pmb` -- -- -------------------------------------------------------- -- -- Struktur dari tabel `desa` -- CREATE TABLE `desa` ( `NO` varchar(20) NOT NULL, `ID_DESA` varchar(20) NOT NULL, `DES` varchar(20) NOT NULL, `ID_KECAMATAN` varchar(20) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; --...
select name from Employee where months < 10 and salary > 2000 order by employee_id;
<filename>SCRIPTS/fscanavg.sql REM FILE NAME: fscanavg.sql REM LOCATION: System Monitoring\Reports REM FUNCTION: Report the average lengths of the full table scans by user REM TESTED ON: 7.3.3.5, 8.0.4.1, 8.1.5, 8.1.7, 9.0.1 REM PLATFORM: non-specific REM REQUIRES: Full_Table_Scans (created by fullscan.sql) R...
USE [Commerce] GO /****** Object: Table [dbo].[Product] Script Date: 9/7/2017 8:22:58 AM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[Product]( [ID] [int] IDENTITY(1,1) NOT NULL, [CategoryID] [int] NULL, [Description] [nvarchar](50) NULL, [DiscountAmount] [decimal](18, 0) NULL...
CREATE TABLE IF NOT EXISTS `xcolab_BalloonLink` ( `uuid_` varchar(75) NOT NULL PRIMARY KEY, `targetUrl` varchar(75) DEFAULT NULL, `visits` int(11) DEFAULT NULL, `balloonUserUuid` varchar(75) DEFAULT NULL, `createDate` datetime DEFAULT NULL, INDEX `IX_1AD9FFEC` (`balloonUserUuid`) ) ENGINE=InnoDB DEFAULT CHA...
<gh_stars>0 use mysql; grant usage on * to 'myfx'@'localhost', '<EMAIL>'@'<EMAIL>'; revoke all privileges, grant option from 'myfx'@'localhost', '<EMAIL>'@'<EMAIL>'; grant select, insert, update, delete, lock tables, create, execute, drop, create temporary t...
<reponame>bbortt/codebase<gh_stars>0 ALTER TABLE game ADD COLUMN possession_team_id BIGINT, ADD CONSTRAINT fk_team3 FOREIGN KEY (possession_team_id) REFERENCES team (id);
CREATE TABLE IF NOT EXISTS `bbs_replies` ( `replyid` int(10) UNSIGNED NOT NULL, `threadid` int(10) UNSIGNED NOT NULL, `postercid` int(10) UNSIGNED NOT NULL, `timestamp` bigint(20) UNSIGNED NOT NULL, `content` varchar(26) NOT NULL DEFAULT '', `guildid` int(11) NOT NULL DEFAULT 0 ) ENGINE=InnoDB DEFAULT CHARS...
<filename>migrations/auth/templates/template.up.sql<gh_stars>100-1000 -- Put upgrade SQL here
SET search_path = public; DROP FUNCTION gp_heap_distribution_check(text); DROP FUNCTION gp_distribution_policy_heap_table_check(oid, smallint[]);
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; CREATE TABLE `auth_assignment` ( `item_name` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL, `user_id` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf...
DROP FUNCTION IF EXISTS get_case_transactions_by_type(TEXT, INTEGER); CREATE FUNCTION get_case_transactions_by_type(case_id TEXT, transaction_type INTEGER) RETURNS SETOF form_processor_casetransaction AS $$ CLUSTER '{{ PL_PROXY_CLUSTER_NAME }}'; RUN ON hash_string(case_id, 'siphash24'); $$ LANGUAGE plproxy;
-- @describe: 存储过程中调试语句 CREATE OR REPLACE PROCEDURE proc_raise6(user_id in integer) AS BEGIN RAISE EXCEPTION 'Noexistence ID --> %',user_id USING HINT = 'Please check your user ID'; END; / call proc_raise6(300011); drop PROCEDURE proc_raise6;
<filename>web/dbWebSource/table_types/select_options_tt.sql CREATE TYPE select_options_tt AS TABLE( select_id INT NULL ,code VARCHAR(30) NULL ,table_name VARCHAR(30) NULL ,text VARCHAR(500) NULL ,value VARCHAR(500) NULL ,condition_text VARCHAR(100) NULL ,order_by VARCHAR(100) NULL)
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1:3306 -- Время создания: Мар 15 2018 г., 23:31 -- Версия сервера: 5.5.53 -- Версия PHP: 7.0.14 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER...
<reponame>kwalm1/seniorMVCBar_N013 -- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 29, 2019 at 06:52 PM -- Server version: 10.4.6-MariaDB -- PHP Version: 7.3.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_...
<reponame>rafiq/codeWars<gh_stars>0 select (n * 2 - 4) * 90 as res from angle;
CREATE TABLE catalogue.Suppliers_History ( Id int NOT NULL, [Name] nvarchar(255) NOT NULL, LegalName nvarchar(255) NOT NULL, Summary nvarchar(1100) NULL, SupplierUrl nvarchar(1000) NULL, [Address] nvarchar(500) NULL, Deleted bit NOT NULL, LastUpdated datetime2(7) NOT NULL, ...
-- file:plpgsql.sql ln:4662 expect:true ANALYZE transition_table_level2
-- Scenario: -- * One junction table record per unique pair of nodes (enforced by PK constraint) -- * No additional junction table columns drop schema if exists a cascade; create schema a; create table a.foo ( foo_id integer primary key, foo_name text not null ); create table a.bar ( bar_id integer primary key...
<gh_stars>1-10 ------------------ select null as maint, 'nsp_a' UNION select 'analyze pg_amop', 'nsp_b' UNION select null, 'nsp_c' ------------------
SELECT mukey, pwsl1pomu FROM Valu1
-- Name: user_validated(text, text); Type: FUNCTION; Schema: basic_auth; Owner: - -- CREATE FUNCTION basic_auth.user_validated(email text, pass text) RETURNS timestamp with time zone LANGUAGE plpgsql AS $$ begin return ( select validated from basic_auth.users where users.email = user_validated.email ...
-- 2019-07-01T15:09:08.926 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Table_Process (AD_Client_ID,AD_Org_ID,AD_Process_ID,AD_Table_ID,AD_Table_Process_ID,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,WEBUI_DocumentAction,WEBUI_IncludedTabTopAction,WEBUI_ViewAction,WEBUI_V...
CREATE OR REPLACE VIEW rv_c_rfq_unanswered AS SELECT q.ad_client_id, q.ad_org_id, q.c_rfq_id, q.name, q.description, q.help, q.salesrep_id, q.c_rfq_topic_id , q.quotetype, q.isquotetotalamt, q.isquoteallqty, q.c_currency_id , q.dateresponse, q.isrfqresponseaccepted, q.dateworkstart, q.deliverydays, q.dateworkcomple...
select * from {{ var('ar_invoice_item') }}
<filename>Windows/Server/SQL Server/GetDatabaseCreationDate.sql SELECT * FROM sys.databases ORDER BY create_date
<reponame>beichenRoot/TG-Snowflake-Connector create database test_connect; use database test_connect; create schema friend; use schema friend; create table persons(ID varchar(64)); create table friends(PERSON1 varchar(64), PERSON2 varchar(64)); create table coworkers(PERSON1 varchar(64), PERSON2 varchar(64)); INSERT ...
<filename>OpenSim/Data/MSSQL/Resources/013_RegionStore.sql BEGIN TRANSACTION CREATE TABLE dbo.Tmp_prims ( UUID uniqueidentifier NOT NULL, RegionUUID uniqueidentifier NULL, ParentID int NULL, CreationDate int NULL, Name varchar(255) NULL, SceneGroupID uniqueidentifier NULL, Text varchar(255) NULL, Description ...
UPDATE `oxconfigdisplay` SET OXGROUPING='navigation' WHERE OXCFGVARNAME='blLongNavbar' AND OXCFGMODULE='theme:roxid3';
-- ============================================= -- Author: dbo -- Create date: 2020-10-13 -- Description: add new user to user role table, Auth system -- ============================================= CREATE PROCEDURE [dbo].[spUserRole_AddUserRole_Auth] @UserId nvarchar(256), @RoleId nvarchar(256) AS BEGIN SET ...
<reponame>dannbuckley/monopoly-sql USE [Monopoly] GO /****** Object: StoredProcedure [Player].[uspBuyUtilityAtAuction] Script Date: 2/19/2022 10:37:03 AM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROC [Player].[uspBuyUtilityAtAuction] @player int, @utility varchar(50), @bid int AS BEGIN ...
<reponame>hseyindemir/Index-SQL SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_CATALOG='dbName'
<filename>database/PermissionGroupMember.sql CREATE TABLE PermissionGroupMember( Id int IDENTITY(1,1) PRIMARY KEY NOT NULL, GroupId int FOREIGN KEY REFERENCES PermissionGroup(Id), UserId int FOREIGN KEY REFERENCES [User](Id), Enabled bit NOT NULL DEFAULT 1 );
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Nov 28, 2016 at 11:13 AM -- Server version: 10.1.13-MariaDB -- PHP Version: 5.6.21 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL...
/* 3 - Informar todas as obras cadastradas no acervo, ordenada por data de publicacao */ SELECT ID_Obra, Data_Publicacao FROM Obra Order by Data_Publicacao ASC; /* 4 - Informar a contagem de todas as obras cadastradas no acervo atualmente */ SELECT COUNT(ID_Obra) AS "Quantidade_obras_atual" FROM Obra; SELECT * FROM...
<gh_stars>0 CREATE TABLE `Customer` ( `id` varchar(50) NOT NULL DEFAULT '', `name` varchar(100) NOT NULL DEFAULT '', `created_time` datetime NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; CREATE TABLE `Group` ( `id` varchar(50) NOT NULL DEFAULT '', `name` varchar(100) NOT NULL DEFAULT...
/* leave this l:see LICENSE file g:utility k:download,web,get,internet v:140108.1506\s.zaglio: moved @dbs before @uri for fast db search v:131215\s.zaglio: @uri -> @src v:131208.0900\s.zaglio: refined load from smb v:130531\s.zaglio: excl. sys dbs and test, removed try-catch r:130529\s...
<gh_stars>1-10 -- Drop and recreate companies table DROP TABLE IF EXISTS companies; CREATE TABLE companies ( id SERIAL, name varchar(255) NOT NULL, created_at timestamp NOT NULL ); -- Insert example records INSERT INTO companies (id, name, created_at) VALUES (1, 'Google', current_timestamp), (2, 'Apple', current...
<gh_stars>10-100 IF EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[vw_carrot_ContentChild]')) DROP VIEW [dbo].[vw_carrot_ContentChild] GO CREATE VIEW [dbo].[vw_carrot_ContentChild] AS SELECT DISTINCT cc.SiteID, cc.Root_ContentID, cc.[FileName], cc.RetireDate, cc.GoLive...
/***** Book *****/ DECLARE @BookKey INT = 8; DECLARE @FirstAuthorKey INT = 8; DECLARE @Book TABLE ( BookKey INT NOT NULL, BookName NVARCHAR(500) NOT NULL, AlternateBookName NVARCHAR(500) NULL, Slug CHAR(50) NOT NULL ); INSERT INTO @Book ( BookKey, BookName, AlternateBookName, Slug ) ...
<filename>src/test/resources/sql/drop_role/7d420248.sql -- file:foreign_data.sql ln:10 expect:true DROP ROLE IF EXISTS regress_foreign_data_user, regress_test_role, regress_test_role2, regress_test_role_super, regress_test_indirect, regress_unprivileged_role
-- file:int8.sql ln:105 expect:true SELECT '' AS to_char_3, to_char( (q1 * -1), '9999999999999999PR'), to_char( (q2 * -1), '9999999999999999.999PR') FROM INT8_TBL
INSERT INTO `#__joomlawatch_ip2c` (`start`, `end`, `a2`, `a3`, `country`) VALUES (1410236712, 1410236719, 'GB', 'GBR', 'UNITED KINGDOM'), (1410236720, 1410236895, 'FR', 'FRA', 'FRANCE'), (1410236896, 1410236903, 'GB', 'GBR', 'UNITED KINGDOM'), (1410236904, 1410237183, 'FR', 'FRA', 'FRANCE'), (1410237184, 1410237439...
<filename>modules/core/db/init/hsql/20.create-db.sql -- begin IMAGEFIELD_CUSTOMER alter table IMAGEFIELD_CUSTOMER add constraint FK_IMAGEFIELD_CUSTOMER_LOGO foreign key (LOGO_ID) references SYS_FILE(ID)^ create index IDX_IMAGEFIELD_CUSTOMER_LOGO on IMAGEFIELD_CUSTOMER (LOGO_ID)^ -- end IMAGEFIELD_CUSTOMER
<gh_stars>0 -- Stored procedure with help from http://www.mysqltutorial.org/mysql-stored-procedure-tutorial.aspx DROP TABLE IF EXISTS Grades; CREATE TABLE Grades ( id INT(11) NOT NULL AUTO_INCREMENT, `name` varchar(50) DEFAULT NULL, `grade` INT(3) DEFAULT 0, PRIMARY KEY (`id`) ); INSERT INTO Grades (`...
if object_id('dbo.MemberRoleDeleteOne', 'P') is not null drop procedure dbo.MemberRoleDeleteOne go create procedure dbo.MemberRoleDeleteOne @memberID int, @roleID int as delete from dbo.MemberRole where memberID = @memberID and roleID ...
<filename>presto-product-tests/src/main/resources/sql-tests/testcases/group-by/runAggregatesWithWherePredicatesAndGroupByOrdinal.sql -- database: presto; tables: nation; groups: group-by; select n_regionkey, count(*), sum(n_regionkey) from nation where n_regionkey > 2 group by 1
/* * Copyright 2018-2021 Crown Copyright * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
<reponame>jlmasa/IEC -- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 31, 2019 at 05:41 AM -- Server version: 10.1.38-MariaDB -- PHP Version: 7.3.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"...
insert into etsis.canvaslms_web_audit (audience, action, event_timestamp, payload_json) values (:audience, :action, systimestamp, :payload)
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 31, 2020 at 05:42 PM -- Server version: 10.1.39-MariaDB -- PHP Version: 7.3.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
/* 1. Analise a tabela rental e responda: a. Qual é a ordenação padrão da tabela? Qual comando você utilizou para analisar? Resposta: Ascendente da coluna rental_id. */ /* b. Qual consulta SQL você pode usar para ordenar os registros de forma descendente por data de retorno do DVD? */ SELECT * FROM sakila.rental ...
<filename>NEWARSIPLIDE.sql -- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Waktu pembuatan: 08 Jun 2020 pada 07.46 -- Versi server: 10.4.11-MariaDB -- Versi PHP: 7.4.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"...
CREATE TABLE IF NOT EXISTS `location` ( `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, `name` varchar(100), `address_country` varchar(100), `address_city` varchar(100), `address_county` varchar(100), `address_street_address` varchar(100) );
<reponame>LibrariesWest/reporting-solution<gh_stars>0 --------------------------------------------------------------- -- table: fund. indexes --------------------------------------------------------------- -- index: cuix_fund_key -- drop index cuix_fund_key; create unique index cuix_fund_key on fund using btree (key)...
CREATE OR REPLACE FUNCTION simple_val(_saved_answers jsonb, _survey_questions jsonb) RETURNS jsonb AS $$ SELECT jsonb_object_agg( value->>'questionId', CASE WHEN pg_typeof(value)::text <> 'jsonb' THEN value WHEN _survey_questions->(value->>'questionId')->>'componentType' = 'inp...
--item f /* T1 <- pi (p_id) (pecas) T2 <- pi (f_nome, endereco, p_id) (fornecedores THETA_JOIN(fornecedores.f_id=catalogo.f_id) catalogo) T3 <- T2 dividido por T1 T4 <- listar(f_nome, f_endereco) (T3) */ --item g /* T1 <- pi (p_id) (sigma(cor='vermelho')) (pecas) T2 <- pi (p_id) (sigma(cor='verde')) (pecas) T3 <- pi (...
SET DEFINE OFF; CREATE TABLE AFW_21_PLUGN_MENU ( SEQNC NUMBER(10), CODE VARCHAR2(23 BYTE), DATE_CREAT DATE, UTILS_CREAT VARCHAR2(123 BYTE), DATE_MODFC DATE, UTILS_MODFC VARCHAR2(123 BYTE), DNR_REF_PRODT NUMBER(10), REF_DV_TYPE_MENU ...
CREATE TABLE MYTODOLIST.CATEGORIES ( id serial NOT NULL, name VARCHAR(256) NOT NULL );
# Time: O(p * b + blogb) # Space: O(p * b) WITH arrival_time_cte AS ( SELECT bus_id, b.arrival_time, capacity, count(passenger_id) AS prefix_sum FROM Buses b LEFT JOIN Passengers p ON p.arrival_time <= b.arrival_time GROUP BY bus_id ORDER BY arrival_time ) SELECT bus_id, passengers_cnt FROM (...
<filename>egov/egov-pgr/src/main/resources/db/migration/main/V20161020152213__pgr_citizen_rating_update_dml.sql update egpgr_complaint set citizenfeedback = 5 where citizenfeedback=1; update egpgr_complaint set citizenfeedback = 2 where citizenfeedback=2;
CREATE INDEX scannable_items_envelope_id_idx ON scannable_items (envelope_id); CREATE INDEX non_scannable_items_envelope_id_idx ON non_scannable_items (envelope_id); CREATE INDEX payments_envelope_id_idx ON payments (envelope_id);
<filename>docs/comic.sql -- MySQL dump 10.13 Distrib 8.0.15, for macos10.14 (x86_64) -- -- Host: localhost Database: comic -- ------------------------------------------------------ -- Server version 8.0.15 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@C...
<gh_stars>10-100 SELECT a * b IS NULL as mul FROM is_bench;
<reponame>IASA-GR/appdb-core /* Copyright (C) 2015 IASA - Institute of Accelerating Systems and Applications (http://www.iasa.gr) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.ap...
/* Navicat Premium Data Transfer Source Server : Rool阿里云服务器 Source Server Type : MySQL Source Server Version : 50564 Source Host : 192.168.3.11:3306 Source Schema : roll_race Target Server Type : MySQL Target Server Version : 50564 File Encoding : 65001 Date: 26/05/2...
-- -- Kill cl_collation index. -- @since 1.27 -- DROP INDEX /*i*/cl_collation ON /*_*/categorylinks;
<reponame>hackthebox/dbt_stripe_source {% macro get_card_columns() %} {% set columns = [ {"name": "_fivetran_synced", "datatype": dbt_utils.type_timestamp()}, {"name": "account_id", "datatype": dbt_utils.type_string()}, {"name": "address_city", "datatype": dbt_utils.type_string()}, {"name": "address_co...
<gh_stars>1-10 DROP TABLE IF EXISTS test.count; CREATE TABLE test.count (x UInt64) ENGINE = MergeTree ORDER BY tuple(); INSERT INTO test.count SELECT * FROM numbers(1234567); SELECT count() FROM remote('127.0.0.{1,2}', test.count); SELECT count() / 2 FROM remote('127.0.0.{1,2}', test.count); DROP TABLE test.count;
DROP PROCEDURE IF EXISTS upgrade_schema_to_1_1_1; DELIMITER '//' CREATE PROCEDURE upgrade_schema_to_1_1_1() BEGIN IF(NOT EXISTS(SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA='hirs_db' AND TABLE_NAME='Certificate' AND COLUMN_NAME='tcgCredentialMajorVersion')) THEN ALTER TABLE Certificate ADD tcgCredential...
<gh_stars>0 -- -- PostgreSQL database dump -- SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages = warning; -- -- Name: pguser; Type: DATABASE; Schema: -; Owner: pguser -- CREATE DATABASE pgus...
<reponame>taritom/bn-api<filename>db/migrations/00000000000007_artists/down.sql DROP INDEX IF EXISTS index_artists_name; DROP INDEX IF EXISTS index_artists_organization_id DROP TABLE IF EXISTS artists;
<reponame>hirokai/virtual-poster ALTER TABLE poster DROP COLUMN attr1_key, DROP COLUMN attr1_val, DROP COLUMN attr2_key, DROP COLUMN attr2_val, DROP COLUMN attr3_key, DROP COLUMN attr3_val, DROP COLUMN attr4_key, DROP COLUMN attr4_val, DROP COLUMN attr5_key, DROP COLUMN attr5_val...
BEGIN TRANSACTION; DROP TABLE IF EXISTS tbl_data_reading; CREATE TABLE tbl_data_reading ( ID integer primary key, FileURL varchar, FileName varchar, ReadDate timestamp, LastScrapeDate timestamp ); COMMIT;
<reponame>capteinn/amolana<filename>db/amolana.sql -- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 03, 2020 at 09:26 AM -- Server version: 10.1.29-MariaDB -- PHP Version: 7.2.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSAC...
<reponame>adityadees/florist -- phpMyAdmin SQL Dump -- version 4.7.9 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 18, 2018 at 06:27 AM -- Server version: 10.1.31-MariaDB -- PHP Version: 7.2.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = ...
--liquibase formatted sql --changeset <NAME>:db-init -- Create a keyspace CREATE SCHEMA IF NOT EXISTS cookbook; CREATE SEQUENCE cookbook.user_seq START WITH 1 INCREMENT BY 1 ; -- Create users table CREATE TABLE cookbook.users ( id BIGINT DEFAULT nextval('cookbook.user_seq') PRIMARY KEY, username VARC...