sql
stringlengths
6
1.05M
<filename>migrations/20191209214430_initialize_schema.down.sql<gh_stars>1-10 DROP TABLE IF EXISTS vehicles; DROP TABLE IF EXISTS revisions; DROP TYPE VEHICLE_STATUS_T;
<reponame>cincuranet/FirebirdDbComparer create table t (i int, j date); create unique asc index idx on t(i, j);
<reponame>Shuttl-Tech/antlr_psql -- file:xml.sql ln:212 expect:false IF degree_symbol <> res[1]::text THEN RAISE 'expected % (%), got % (%)', degree_symbol, convert_to(degree_symbol, 'UTF8'), res[1], convert_to(res[1]::text, 'UTF8')
<filename>coeus-db/coeus-db-sql/src/main/resources/org/kuali/coeus/coeus-sql/log/Release_3_1_sp_1_logs/KRACOEUS-4269.sql --create citizenship type table CREATE TABLE "CITIZENSHIP_TYPE_T" ( "CITIZENSHIP_TYPE_CODE" NUMBER(15,1) NOT NULL, "DESCRIPTION" VARCHAR2(40) NOT NULL, "ACTIVE_FLAG" CHAR(1) ...
<filename>packages/acs-events/sql/postgresql/upgrade/upgrade-0.6d6-0.6d7.sql create index acs_events_timespan_id_idx on acs_events(timespan_id);
-- phpMyAdmin SQL Dump -- version 4.4.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jan 23, 2016 at 07:14 PM -- Server version: 5.6.26 -- PHP Version: 5.6.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
INSERT INTO `interiors` (`Name`,`Interior`,`X`,`Y`,`Z`) VALUES ('24/7 1', '17', -25.884498,-185.868988,'1003.546875'), ('24/7 2', '10', 6.091179,-29.271898,'1003.549438'), ('24/7 3', '18', -30.946699,-89.609596,'1003.546875'), ('24/7 4', '16', -25.132598,-139.066986,'1003.546875'), ('24/7 5', '4', -27.312299,-29.27759...
CREATE DATABASE IF NOT EXISTS ${DB}; USE ${DB}; DROP TABLE IF EXISTS kafka_temp_table_q22; SET spark.testing=${TESTING_ENABLE}; SET spark.sql.streaming.query.timeout.ms=${TESTING_TIMEOUT_MS}; SET streaming.query.name=job22; SET spark.sql.streaming.checkpointLocation.job22=${CHECKPOINT_ROOT}/job22; CREATE TABLE kafka...
<gh_stars>1-10 CREATE TABLE IF NOT EXISTS Record ( id UUID NOT NULL, typeId UUID NOT NULL, data bytea NOT NULL, PRIMARY KEY (typeId, id) ); CREATE INDEX k_record_id ON Record (id); CREATE OR REPLACE VIEW Record_d AS SELECT id, typeId, CONVERT_FROM(data, 'UTF-8') AS data FROM Record; CREATE EXTENSION ...
<filename>tools/perf/core/tbmv3/metrics/webview_power_usage_metric.sql<gh_stars>0 -- WebView is embedded in the hosting app's main process, which means it shares some threads -- with the host app's work. We approximate WebView-related power usage -- by selecting user slices that belong to WebView and estimating their p...
<filename>assets/template_web/db/ccm.sql -- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 25 Jan 2018 pada 01.39 -- Versi Server: 10.1.16-MariaDB -- PHP Version: 5.6.24 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
<filename>sql/init.sql CREATE DATABASE "my-site2"; GRANT ALL PRIVILEGES ON DATABASE "my-site2" TO "my-site";
-- phpMyAdmin SQL Dump -- version 4.8.2 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Aug 26, 2018 at 08:29 AM -- Server version: 10.1.34-MariaDB -- PHP Version: 7.2.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 03, 2020 at 10:48 AM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
<reponame>dzikrisinatria/tubes-webpro<gh_stars>0 CREATE TABLE `obat` ( `id_obat` int NOT NULL AUTO_INCREMENT, `kode_obat` varchar(5) NOT NULL, `nama_obat` varchar(128) NOT NULL, `id_jenis_obat` int NOT NULL, `harga` int(6) NOT NULL, `stok` int(6) NOT NULL, `bentuk` varchar(10) NOT NULL, `fungsi` varchar(128) NO...
<filename>Tp01/Ex01/drop_create_table-dbo.DimAccessory.sql<gh_stars>0 USE [UdeS.Cefti.Inf735.Lab01.Ex1.DW] GO EXEC sys.sp_dropextendedproperty @name=N'MS_Description' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DimAccessory' GO EXEC sys.sp_dropextendedproperty @name=N'MS_Description...
<reponame>danishabdullah/lunatic<gh_stars>0 \echo Creating the api schema drop schema if exists api cascade; create schema api; set search_path = api, public; -- this role will be used as the owner of the views in the api schema -- it is needed for the definition of the RLS policies drop role if exists api; create rol...
<reponame>GUSAR1T0/VXDS-DEV-TOOLS CREATE TABLE [authentication].[User] ( [Id] INT IDENTITY (1, 1) NOT NULL, [FirstName] NVARCHAR(50) NOT NULL, [LastName] NVARCHAR(50) NOT NULL, [Email] NVARCHAR(255) NOT NULL, [Password] NVARCHAR(50) NOT NULL, ...
<filename>assets/sql/sql_recipe_tutorial_003.sql /************************************* * * SQL Recipe for Analysis Tutorial #3 * ************************************* * @version 1.0.0 2020-01-28 17:37:10 dorbae Initialize * @author dorbae(<EMAIL>) */ -- DROP TABLE IF EXISTS mst_user_location; -- Create user l...
<gh_stars>0 create table danp_stop_times ( trip_rowid int, stop_rowid int, stop_sequence int NOT NULL, stop_headsign text, departure_time_seconds int, danp_last_stop bool ); --create index dan_dep_time_index on danp_stop_times(departure_time_seconds); --create index dan_stop_id_index on danp_stop_times(st...
<gh_stars>1-10 -- =============================================================================== -- Author: <NAME> -- Create date: 24/03/2010 -- Description: The Multiple Use of Bank Details report in data warehousing form -- =============================================================================== CREAT...
<filename>Complementares/BDNSQL/Mini-Projeto-01/create_tables.sql CREATE TABLE "SENSOR"."PATIENT" ( "ID" NUMBER NOT NULL ENABLE, "NAME" VARCHAR2(45 BYTE) NOT NULL ENABLE, "BIRTHDATE" DATE NOT NULL ENABLE, "AGE" NUMBER NOT NULL ENABLE, CONSTRAINT "PATIENT_PK" PRIMARY KEY ("ID") USING INDEX PCTFREE 10 IN...
<reponame>richardswinbank/sprockit /* * sprockit.[ReportBatch] * Copyright (c) 2021 <NAME> (<EMAIL>) * http://richardswinbank.net/sprockit * * Batch details for monitoring dashboard. */ CREATE VIEW [sprockit].[ReportBatch] AS SELECT BatchId , ProcessGroup , CONVERT(NVARCHAR, batch.[CreatedDateTime], 120) ...
<filename>hasura/migrations_history/1611558872027_run_sql_migration/up.sql CREATE OR REPLACE VIEW "public"."search" AS SELECT a.id, a.title as s, 'artwork' as type FROM artworks a UNION SELECT u.id, u.username as s, 'user' as type FROM users u UNION SELECT DISTINCT uuid_generate_v4() as id, t.tag as s, 'tag' as ty...
<reponame>smith750/kc TRUNCATE TABLE PROTOCOL_ATTACHMENT_GROUP DROP STORAGE / INSERT INTO PROTOCOL_ATTACHMENT_GROUP (GROUP_CD,DESCRIPTION,UPDATE_USER,UPDATE_TIMESTAMP,OBJ_ID,VER_NBR) VALUES ('1','Protocol Attachments','admin',SYSDATE,SYS_GUID(),1) / INSERT INTO PROTOCOL_ATTACHMENT_GROUP (GROUP_CD,DESCRIPTION,UPDAT...
delete from custom_armor where item_id in (9710,9711,9712,9713,9714,9715,9716); INSERT ignore INTO `custom_armor` VALUES ('9710', 'Angel Wings', 'hair', 'false', 'none', '10', 'none', '0', '-1', '0', '0', '0', '0', '0', 'true', 'true', 'true', 'true', '0', '0'), ('9711', 'Fallen Angel Wings', 'hair', 'false', 'none...
<filename>fao-mozfis-api/src/main/resources/db/migration/V001__create_tables_for_territory_and_initial_load.sql ------------------------------------------------------------------------------------------------------------------------- -- Creating structure for PROVINCE -------------------------------------------------...
SELECT /* select */ A.* FROM ALL_OBJECTS A WHERE 1 = 1 AND A.OWNER = 'SYS' -- AND A.OBJECT_NAME LIKE 'ALL_TA%' -- AND A.OBJECT_NAME LIKE 'ALL_%COMMENTS%' -- AND A.OBJECT_NAME LIKE 'ALL_%PK%' AND A.OBJECT_NAME LIKE 'ALL_%CONS%' ORDER BY A.OBJECT_NAME ; SELECT * FROM ALL_TABLES A WHERE A.OWNER = ...
<filename>misc/logging/src/apache-views.sql CREATE OR REPLACE VIEW apache_agents AS SELECT agent,COUNT(*) FROM apache_log GROUP BY agent ORDER BY count(*) DESC; CREATE OR REPLACE VIEW apache_countable AS SELECT src_bin,A.* FROM apache_log A JOIN src_bin B on A.src=B.src WHERE req ~ '^GET ' AND req !~ '/(av/|js/|robot...
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Type : MySQL Source Server Version : 50725 Source Host : localhost:3306 Source Schema : meeting_rest Target Server Type : MySQL Target Server Version : 50725 File Encoding : 65001 Date: 01/08/2019...
-- 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. CREATE INDEX IF NOT EXISTS UX_91a31b_ChangeVersion...
---------------------------------------------------------------- -- [all_disks] View -- Create or replace FUNCTION GetAllFromDisks() RETURNS SETOF all_disks AS $procedure$ BEGIN RETURN QUERY SELECT * FROM all_disks; END; $procedure$ LANGUAGE plpgsql; Create or replace FUNCTION GetDiskByDiskId...
-- phpMyAdmin SQL Dump -- version 4.7.0-beta1 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: 2017-09-20 06:53:51 -- 服务器版本: 5.5.53 -- PHP Version: 5.5.38 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!401...
DROP TABLE IF EXISTS quotes; CREATE TABLE quotes ( id int(11) NOT NULL AUTO_INCREMENT, quote VARCHAR(600), PRIMARY KEY (id), UNIQUE KEY quote (quote)); INSERT INTO quotes (id, quote) VALUES (1, 'quote 1'); INSERT INTO quotes (id, quote) VALUES (2, 'quote 2'); INSERT INTO quotes (id, quote) VALUES...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Jun 12, 2020 at 08:02 AM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
-- View: public.corp_emissions_target -- DROP VIEW public.corp_emissions_target; CREATE OR REPLACE VIEW public.corp_emissions_target AS SELECT cr.corp_id, cr.survey_year, cr.response FROM corp_responses cr JOIN corp_questions cq ON cr.question_id = cq.id AND cq.question_number::text = 'C4.1'::text; ...
ALTER TABLE books ADD CONSTRAINT fk_bookshelves FOREIGN KEY (bookshelf_id) REFERENCES bookshelves(id); this command will modify the data type of the bookshelf_id in the books table, setting it as a foreign key which references the primary key in the bookshelves table. Now PostgreSQL knows HOW these 2 tables are conne...
/**************************************************************************************************************************** Create the examiner and test centre record if they don't already exist ************************************************************************************************************************...
<reponame>cliffordcarnmo/generic-db-template<gh_stars>0 CREATE UNIQUE INDEX id_UNIQUE ON contractdetails(id ASC);
-- MySQL Administrator dump 1.4 -- -- ------------------------------------------------------ -- Server version 5.0.19-nt /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CON...
insert into test values (default, 'tomorrow', 1, 1.1, 'tomorrow', '{1,2,3}') insert into test values (default, 'today', 0, 0, 'today', '{0,1,2}') insert into reftest values (3,1) create table reftest ( test_id integer not null references test on delete cascade, another_test_id integer not null references test on dele...
-- phpMyAdmin SQL Dump -- version 4.4.15.10 -- https://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: 2020-05-03 20:06:07 -- 服务器版本: 5.5.62-log -- PHP Version: 5.6.40 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40...
<filename>src/main/resources/test/sqls/preset_add_1_review.sql -- requires: preset_add_1_group INSERT INTO "review" (id, group_id, visibility, rate, review, created_at, created_by) VALUES (103001, 101001, 1, 2, 'long review text', '2021-01-16 01:50:01', 105001);
<reponame>KorawitRupanya/SeasonPredictor -- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: db:3306 -- Generation Time: Dec 20, 2019 at 12:16 PM -- Server version: 8.0.18 -- PHP Version: 7.2.23 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone ...
<filename>06. Databases/2018/2018.11.01/12.sql /* 12. Намерете всички служители със заплата повече от 50000 */ use soft_uni; SELECT first_name, last_name, salary FROM employees WHERE salary >= 50000 ORDER BY salary DESC;
<reponame>NathanHowell/sqlfluff<filename>test/fixtures/parser/mysql/handler_sqlstate.sql<gh_stars>1000+ DECLARE exit handler for SQLSTATE '1' begin select 1; end;
-- 2019-04-19T13:25:51.855 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Ref_List_ID,AD_Reference_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value,ValueName) VALUES (0,0,541953,183,TO_TIMESTAMP('2019-04-19 13:25:51','YYYY-MM-DD ...
CREATE OR REPLACE FUNCTION public.findvoucherlabels() RETURNS SETOF voucherlabeltype LANGUAGE plpgsql IMMUTABLE STRICT AS $function$ DECLARE sheetcount integer; r voucherlabeltype%rowtype; n integer; BEGIN FOR r IN select co1.objectnumber, fin...
/* utils.aggRepGroupField(coid varchar, tname varchar, cname varchar, sepval varchar) * -- aggregates values of a repeating group of fields * -- requires: * -- coid = collectionobjects_common.id of the parent Collection Object * -- tname = table name of the repeating group * -- cname = colum...
<reponame>Ambal/mangos ALTER TABLE db_version CHANGE COLUMN required_8931_01_mangos_spell_bonus_data required_8932_01_mangos_spell_chain bit; DELETE FROM spell_chain WHERE spell_id IN (50518,53558,53559,53560,53561,53562); INSERT INTO spell_chain VALUES (50518,0,50518,1,0), (53558,50518,50518,2,0), (53559,53558,50518,...
<gh_stars>0 -- DRB: Deleting notification requests failed if any notification were pending create or replace package body notification_request as function new ( request_id in notification_requests.request_id%TYPE default null, object_type in acs_objects.objec...
--############################################################################## --############################################################################## --### 4CE Phase 1.2 and 2.2 --### Date: April 21, 2021 translated May 19, 2021 --### Database: Oracle --### Data Model: i2b2 --### Created By: <NAME> (<...
<gh_stars>1-10 CREATE TABLE t_actor ( id int NOT NULL AUTO_INCREMENT COMMENT 'ID', first_name varchar(255) NULL COMMENT 'first_name', last_name varchar(255) NOT NULL COMMENT 'last_name', PRIMARY KEY (id) );
SELECT DISTINCT SOURCE_CODE, 1 as concept_id, SOURCE_CODE_DESCRIPTION FROM SOURCE_TO_CONCEPT_MAP WHERE SOURCE_CODE in ('798.1', '761.6', '798', 'E913.1', '798.2', 'E978', '798.9', '798.0')
<reponame>CD30-Devil/SI3P0<gh_stars>1-10 /*==============================================================*/ /* Nom de SGBD : PostgreSQL SI3P0 */ /* Date de création : 21/07/2021 22:26:29 */ /*==============================================================*/ -- schéma...
/* Object: dbo.Query_311 Transaction: NCU:MCN Note: Before images (MCO) are used for consistency checks, and to delete the multi IP name connection between the IP-NAME-NUMBER of the PG/HR and the IP-BASE-NUMBER-ref. in the detail record. */ CREATE PROCEDURE [dbo].[Query_311] @HeaderID AS bigint AS...
<reponame>MyintMyatKaungPHP/TandT<filename>travel.sql -- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Oct 06, 2018 at 02:52 PM -- Server version: 10.1.35-MariaDB -- PHP Version: 7.2.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRAN...
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 03, 2019 at 02:00 PM -- Server version: 10.1.38-MariaDB -- PHP Version: 7.2.16 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 17-02-2021 a las 13:59:54 -- Versión del servidor: 10.4.17-MariaDB -- Versión de PHP: 7.4.13 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
<gh_stars>0 /* * * CREATE TABLE scraped_data */ CREATE TABLE `scraped_data` ( `id` int(11) NOT NULL AUTO_INCREMENT, `codigo_item` varchar(30) DEFAULT NULL, `nombre` varchar(255) DEFAULT NULL, `descripcion` varchar(2000) DEFAULT NULL, `imagen` varchar(100) DEFAULT NULL, `precio` decimal(8,2) DEFAULT NULL,...
<reponame>PaulACoroneos/CS50x SELECT name from people JOIN stars ON people.id = stars.person_id WHERE stars.movie_id IN( SELECT movies.id FROM movies JOIN stars ON movies.id = stars.movie_id JOIN people ON people.id = stars.person_id WHERE name = "<NAME>" AND birth = "1958" ) AND NOT name = "<NAME>";
<gh_stars>0 # --- Created by Ebean DDL # To stop Ebean DDL generation, remove this comment and start using Evolutions # --- !Ups create table image_entry ( id bigint not null, image blob, constraint pk_image_entry primary key (id) ); create sequence image_entry...
-- phpMyAdmin SQL Dump -- version 4.6.6deb5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Oct 30, 2019 at 08:58 AM -- Server version: 5.7.27-0ubuntu0.18.04.1 -- PHP Version: 7.3.10-1+ubuntu18.04.1+deb.sury.org+1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!4010...
-- Adminer 4.7.0 MySQL dump SET NAMES utf8; SET time_zone = '+00:00'; SET foreign_key_checks = 0; SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; DROP TABLE IF EXISTS `konfirmasi_pesanan`; CREATE TABLE `konfirmasi_pesanan` ( `id_konfirmasi` int(11) NOT NULL AUTO_INCREMENT, `id_pesan` int(11) NOT NULL, `nm_pembayar` var...
CREATE VIEW `v_rekap_asatid` AS SELECT `k`.`id_asatid` AS `id_asatid`, `j`.`id_jurnal` AS `id_jurnal`, `j`.`kbm_id` AS `kbm_id`, `j`.`tgl` AS `waktu`, SUBSTRING_INDEX(`j`.`tgl`,',',1) AS `hari`, SUBSTRING_INDEX(SUBSTRING_INDEX(`j`.`tgl`,' ',2),' ',-1) AS `tgl`, SUBSTRING_INDEX(SUBSTRING_INDEX(`j...
DECLARE @UserId INT = (SELECT Id FROM Users WHERE Username = 'Alex') DECLARE @GameId INT = (SELECT Id FROM Games WHERE [Name] = 'Edinburgh') DECLARE @UserGameId INT = (SELECT Id FROM UsersGam...
CREATE TABLE IF NOT EXISTS `music` ( `id` int(10) NOT NULL AUTO_INCREMENT, `song` varchar(50) NOT NULL, `artist` varchar(50) NOT NULL, `album` varchar(100) NOT NULL, `genre` varchar(50) NOT NULL, `artwork` varchar(255) NOT NULL, `source` varchar(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET...
<reponame>cerad/cerad # List of emails for registered people select distinct email from person left join person_plan on person_plan.person_id = person.id where person_plan.project_key = 'AYSOS5Games2013'; # Distinct list of physical teams select distinct level.age, level.sex, game_team.name from game left join projec...
<reponame>h-ssiqueira/HackerRank-problems select round(abs(max(LAT_N)-min(LAT_N))+abs(max(LONG_W)-min(LONG_W)),4) from STATION;
CREATE TABLE users ( username VARCHAR(50) NOT NULL, password VARCHAR(100) NOT NULL, enabled TINYINT NOT NULL DEFAULT 1, PRIMARY KEY (username) ); CREATE TABLE authorities ( username VARCHAR(50) NOT NULL, authority VARCHAR(50) NOT NULL, FOREIGN KEY (username) REFERENCES users(username) ); CREATE UNIQUE I...
/* ag parse get functions for PL/PGSQL */ create or replace function ag_parse_get (p_get varchar, p_param varchar, p_default varchar default '') returns varchar as $body$ declare v_get varchar := '&' || p_get || '&'; v_param varchar := '&' || p_param || '='; x integer; begin x = posit...
<reponame>abnesh/transportManagement insert into driverdb.driver values(101,'Ram','RAMKU6787R','1234-5678-9876-5432',9999912345,'KA03-MA-6754'); insert into driverdb.driver values(102,'Shyam','SHYKU1232S','4585-9846-3434-3432',1234567890,'KA10-FA-0098'); insert into driverdb.driver values(103,'Ghanshyam','GHNKU6339G'...
SET NAMES UTF8; DROP DATABASE IF EXISTS dessert; CREATE DATABASE dessert CHARSET=UTF8; USE dessert; /**创建用户表**/ CREATE TABLE user( uid INT PRIMARY KEY AUTO_INCREMENT, uname VARCHAR(20), upwd VARCHAR(15) ); INSERT INTO user VALUES(null,"root","<PASSWORD>"); /**创建类别表**/ CREATE TABLE type( tid INT PRIMARY KEY AUTO_INCREME...
-- missing_data_user (view) SELECT run_days.report_date AS report_date, gen_data.drive AS drive, gen_data.gmail AS gmail, gen_data.gplus AS gplus, FROM ( SELECT report_date FROM [YOUR_PROJECT_ID:raw_data.daily_report_status] GROUP BY 1 ) run_days LEFT JOIN ( SELECT date, SUM(CASE ...
<reponame>reshke/gpdb !\retcode gpconfig -r statement_timeout; !\retcode gpstop -u;
ALTER TABLE `abuse_reports` ADD COLUMN `client_id` varchar(64), ADD COLUMN `addon_name` varchar(255), ADD COLUMN `addon_summary` varchar(255), ADD COLUMN `addon_version` varchar(255), ADD COLUMN `addon_signature` smallint UNSIGNED, ADD COLUMN `application` smallint UNSIGNED, ADD COLUMN `appl...
\connect upmugateway SET default_tablespace=upmu_datastore; DROP TABLE IF EXISTS upmu_data_file; DROP TYPE IF EXISTS file_state; CREATE TYPE file_state AS ENUM ('abandoned', 'processing', 'released'); CREATE TABLE upmu_data_file (id serial PRIMARY KEY, file_name varchar(32) NOT NULL, directory serial references upmu_da...
<filename>ExoCompteBancaire/Tables/Tables.sql DROP TABLE [bank_operation]; DROP TABLE [bank_compte]; DROP TABLE [bank_client]; CREATE TABLE [dbo].[bank_operation] ( [id] INT IDENTITY (1, 1) NOT NULL, [numCompte] VARCHAR (50) NOT NULL, [dateCreation] DATETIME NOT NULL, [type] VARCHA...
<reponame>osamhack2020/WEB_AmongUs_0262 INSERT INTO user VALUES ("admin", "1q2w3e4r!","어드민", "111111", 1, 1, 8, "<EMAIL>", "01088888888", "2222"); INSERT INTO user VALUES ("user1", "1q2w3e4r!","유저1", "111111", 0, 0, 2, "<EMAIL>", "01088888888", "2222"); INSERT INTO user VALUES ("user2", "1q2w3e4r!","유저2", "111111", 0, ...
<filename>opzet.sql CREATE TABLE contactpersoon ( id int not null auto_increment, contact_achternaam varchar(25), contact_voornaam varchar(25), contact_bedrijf varchar(25), contact_straatnaam varchar(50), contact_postcode varchar(25), contact_plaats varchar(25), co...
--create database vehicleloanproject create table UserRegistration( UserId varchar(50) NOT NULL, Password varchar(50) not null, RoleId int not null, constraint pk_user_registration primary key (UserId), constraint fk_user_registration foreign key(RoleId) references RoleType(RoleId) ) create table RoleType( RoleId in...
-- MySQL dump 10.16 Distrib 10.1.26-MariaDB, for osx10.6 (i386) -- -- Host: 127.0.0.1 Database: opentradeengine -- ------------------------------------------------------ -- Server version 10.1.26-MariaDB /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHA...
<filename>db/delta/25-epg_claims.sql -- ALTER TABLE `media_claims` ADD `no_epg` int not null default 0; ALTER TABLE `media_claims` ADD `wrong_epg` int not null default 0; ALTER TABLE `daily_media_claims` ADD `no_epg` int not null default 0; ALTER TABLE `daily_media_claims` ADD `wrong_epg` int not null default 0; --//@U...
<gh_stars>10-100 DO $body$ BEGIN IF NOT EXISTS (SELECT * FROM pg_catalog.pg_user WHERE usename = 'gh1') THEN CREATE USER gh1 WITH PASSWORD '<PASSWORD>'; GRANT usage on schema public to gh1; END IF; END $body$; DROP DATABASE IF EXISTS gh1; CREATE DATABASE gh1 WITH OWNER gh1 TEMPLATE template0 ...
<filename>sql/booru_settings.sql CREATE TABLE IF NOT EXISTS booru_settings ( guild_id bigint PRIMARY KEY, tags text[] DEFAULT '{}', sites text[] DEFAULT '{}', nsfwServer boolean DEFAULT FALSE, minScore integer DEFAULT null, topicEnable boolean DEFAULT FALSE, disableNextImage boolean DEFAULT FALSE );
SELECT authors.name, books.name, publishers.name FROM books JOIN authors ON books.author_id = authors.id JOIN publishers ON books.publisher_id = publishers.id;
-- file:privileges.sql ln:519 expect:true CREATE OPERATOR !+! (PROCEDURE = int4pl, LEFTARG = testdomain1, RIGHTARG = testdomain1)
<reponame>kevinhillinger/openhack-serverless SELECT productId, productName, ROUND(AVG(sentimentScore), 2) as [averageSentimentScore], COUNT(*) AS [count] INTO [powerbi-sentiment] FROM [productsentiment] GROUP BY productId, productName, TumblingWindow(minute, 5) SELECT productId, ...
<reponame>danchris/DatabaseSystemsProject<filename>sql/triggers.sql<gh_stars>0 CREATE TRIGGER totalPaymentAmount BEFORE INSERT ON Payment_Transaction FOR EACH ROW SET @tPA = @tPA +NEW.Payment_Amount; CREATE TRIGGER totalDeletedCustomer BEFORE DELETE ON Customer FOR EACH ROW SET @tDC = @tDC +1;
-------------------------------------------------------------- ciudad -------------------------------------------------------------- CREATE TABLE `reservas`.`ciudad` ( `ciudad` VARCHAR(25) NOT NULL, PRIMARY KEY (`ciudad`) ) ENGINE = InnoDB; -------------------------------------------------------------- ----------...
# --- Created by Ebean DDL # To stop Ebean DDL generation, remove this comment and start using Evolutions # --- !Ups create table image ( id bigint not null, constraint pk_image primary key (id)) ; create table product ( id bigint not null, name ...
<gh_stars>0 -- Copyright © 2018 <NAME> -- -- 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 agre...
<gh_stars>0 ALTER TABLE `collaborators` ADD COLUMN `external_id` varchar(255) NULL COMMENT 'An identifier for the data submitter. If that submitter is an individual, ORCID identifiers are recommended.' AFTER `phone`; ALTER TABLE `datasetcollaborators` ADD COLUMN `collaborator_roles` varchar(255) NULL COMMENT 'Type of ...
<reponame>webignorant/chipcore /* Navicat MySQL Data Transfer Source Server : localhost_mysql Source Server Version : 50553 Source Host : localhost:3306 Source Database : chipcore_community Target Server Type : MYSQL Target Server Version : 50553 File Encoding : 65001 Date: 2017-12...
<reponame>tharangar/k8s-webserver -- db_patches INSERT INTO `system_patches` (`issue`, `created`) VALUES('POCOR-3728', NOW()); -- alerts Table UPDATE `alerts` SET `process_name` = 'AlertAttendance' WHERE `name` = 'Attendance'; INSERT INTO `alerts` (`name`, `process_name`, `process_id`, `modified_user_id`, `modified`,...
<reponame>Smithsonian/DPO-Informatics-Data-Sources<gh_stars>1-10 --gbif_vernacularnames DROP MATERIALIZED VIEW gbif_vernacularnames; CREATE MATERIALIZED VIEW gbif_vernacularnames AS SELECT t.taxonID, t.scientificName, t.scientificNameAuthorship, t.canonicalName, t.genericName...
-- No good reason to drop the btree_gist extension again
drop table if exists ao1; create table ao1(a int, b int) with (appendonly=true); -- test insert and select from within same transaction begin; insert into ao1 select i, i from generate_series(1, 1000) i; select * from ao1; abort; insert into ao1 select i, i from generate_series(1, 1000) i; select * from ao1;
<filename>src/test/tinc/tincrepo/mpp/gpdb/tests/queries/basic/window/mpp23955/mpp23955.sql -- @optimizer_mode on with t (a,b,d) as (select 1,2,1 from pg_class limit 1) SELECT cup.* FROM t, ( SELECT sum(t.b) OVER(PARTITION BY t.a ) AS e FROM (select 1 as a, 2 as b from pg_class limit 1)foo,t ) as cup GROUP BY cup.e;
-- -- Adds a view to flatten location terminology definitions -- DROP VIEW IF EXISTS location_terminologies_v; CREATE VIEW location_terminologies_v AS SELECT t0.description AS country , t1.description AS subnational1 , t2.description AS subnational2 , t3.description AS subnational3 , t4.description AS subnatio...