sql
stringlengths
6
1.05M
create table code_annotation ( `id` varchar(36) primary key, `targetType` varchar(255) not null, `targetId` varchar(36) not null, `name` varchar(255) not null ) collate = utf8mb4_unicode_ci; create table code_annotation_value ( `id` varchar(36) primary key, `annotationId` varchar(36) not null, ...
<filename>CSETWebApi/CSETWeb_Api/Database/dbo.UNIVERSAL_SUB_CATEGORIES.Table.sql<gh_stars>100-1000 USE [CSETWeb] GO /****** Object: Table [dbo].[UNIVERSAL_SUB_CATEGORIES] Script Date: 11/14/2018 3:57:21 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[UNIVERSAL_SUB_CATEGORIES]( [Univ...
<reponame>sy3kic/nZEDb<filename>resources/db/patches/mysql/0113~tmux.sql ALTER TABLE nzbs change `article-number` articlenumber varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0'; UPDATE site SET value = '113' WHERE setting = 'sqlpatch';
CREATE TABLE IF NOT EXISTS dns_pc ( id bigint(20) NOT NULL AUTO_INCREMENT, pc varchar(50) NOT NULL, ip varchar(15) NOT NULL, PRIMARY KEY (id), UNIQUE KEY pc (pc) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
<filename>src/main/resources/data.sql -- USER -- hashed password: <PASSWORD> INSERT INTO USER (id, name, email, password, last_login, token, is_active, created, modified) VALUES ('1cb2a08a-1bca-479d-9e3e-15b869cda8c5', '<NAME>', '<EMAIL>', <PASSWORD>', '2021-09-24T15:28:03.123456789', '<KEY>', true, '2021-09-24T15:28:...
CREATE TABLE TIME ( ID SERIAL PRIMARY KEY, STARTDATE date NOT NULL, ENDDATE date NOT NULL, TYPE varchar(50) NOT NULL, ORDINAL int NOT NULL ); CREATE TABLE DAYOFF ( ID SERIAL PRIMARY KEY, CODE varchar(50) NOT NULL, NAME varchar(50) NOT ...
-- TEST0009 Change Statement secured party transfer on TEST0001. INSERT INTO draft(draft_id, document_number, account_id, create_ts, registration_type_cl, registration_type_cd, registration_number, update_ts, draft) VALUES(200000013, 'D-T-00C9', 'PS12345', sysdate, 'CHANGE', 'ST', 'TEST0001', nu...
<reponame>abhisheks008/Design-and-Analysis-Algorithm-Lab-4th-Semester<gh_stars>1-10 -- ASSIGNMENT : 5 [CONTINUED FROM LAB 5] -- Q2. a) Create a table Depart with the columns dept_id, dept_name, location_name where dept_id is primary key. -- b) Create another table Employ with the columns empid, name, salary, address, h...
<filename>tagcloud_package/examples/TagCloud.sql \set textCorpus '\''`pwd`'/examples/text_corpus.txt\'' \set htmlFile '\''`pwd`'/output.html\'' \echo ***************** Search 'vertica' in the small text_corpus.txt ***************** select RelevantWordsNoLoad('vertica', :textCorpus) over() order by weight desc limit 2...
<reponame>muntaza/Open_Persediaan DROP VIEW IF EXISTS view_buku_penerimaan_setda; CREATE VIEW view_buku_penerimaan_setda AS SELECT * FROM view_buku_penerimaan_kabupaten WHERE 1 = 1 AND id_skpd = 2; GRANT ALL PRIVILEGES ON view_buku_penerimaan_setda TO lap_setda; REVOKE INSERT, UPDATE, DELETE ON view_buku_penerima...
create table t1 (i1 int,d1 double); insert into t1 values(1,1.2); insert into t1 values(2,2.5); insert into t1 values(2,2.5); insert into t1 values(10,1.2e1); insert into t1 values(20,2.5e1); select * from t1 order by 1,2; prepare st from 'select distinct(i1+?) from t1 order by 1' execute st using 3; prepare st from...
-- @testpoint:opengauss关键字current_user(保留),作为游标名 --前置条件 drop table if exists current_user_test cascade; create table current_user_test(cid int,fid int); --关键字不带引号-失败 start transaction; cursor current_user for select * from current_user_test order by 1; close current_user; end; --关键字带双引号-成功 start transaction; cursor...
<reponame>hmatsu47/kuso-code-samples CREATE DATABASE `picture`; CREATE TABLE `picture`.`access_count` ( `id` int(11) NOT NULL AUTO_INCREMENT, `picture_id` int(11) NOT NULL, `access_count` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; CREATE TABLE `picture`.`picture` ( `id` int(...
<filename>dbv-3/data/revisions/4.14/fusionpbx_api.sql USE RMCDR3; CREATE TABLE IF NOT EXISTS `tblUCall` ( `UID` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `UUID` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`UID`), KEY `UUID` (`UUID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unico...
--use [ObservationDB] Declare @TimUserId UniqueIdentifier = (Select UserId from aspnet_Users where LoweredUserName = 'tim') Declare @StatusID UniqueIdentifier = (Select ID from Status where Code = 'QA-98') Declare @StatusReasonID UniqueIdentifier = (Select ID from StatusReason where Code = 'QAR-38') -- Import batch Up...
SELECT "MedPayment2_1"."hcpcs_code" AS "hcpcs_code", "MedPayment2_1"."hcpcs_description" AS "hcpcs_description", "MedPayment2_1"."nppes_provider_state" AS "nppes_provider_state", SUM("MedPayment2_1"."Calculation_0820513143749095") AS "sum:Calculation_0820513143749095:ok", SUM("MedPayment2_1"."average_submitted_...
-- MySQL dump 10.13 Distrib 5.7.19, for Linux (x86_64) -- -- Host: 192.168.77.195 Database: zadmin_banco -- ------------------------------------------------------ -- Server version 5.5.52-0+deb8u1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_...
<gh_stars>0 alter table inventory_item_list add version int;
CREATE PROCEDURE [dbo].[page_templates_sel] @pt_id int =null ,@page_name varchar(50) =null ,@search_page_name varchar(50) =null ,@pt_content varchar(max)=null ,@self_backup int=null ,@user_id int as BEGIN SET NOCOUNT ON DECLARE @stmt NVARCHAR(MAX) = ''; SET @stmt = 'select * from dbo.page_templates_v WHE...
INSERT INTO ims.product_details (id, created_at, updated_at, pr_id, grn_id, qty, rem_qty, sold_qty, warranty, warranty_status, discount, purchase_price) VALUES (2, '2018-11-15 02:27:03', '2018-11-15 02:27:03', 1, 1, 3, 3, 0, 0, 0, 0, 63000); INSERT INTO ims.product_details (id, created_at, updated_at, pr_id, grn_id, qt...
<filename>08-1-Numeric-Examples.sql --The example shows the number who responded for: --question 1 --at 'Edinburgh Napier University' --studying '(8) Computer Science' --Show the the percentage who STRONGLY AGREE SELECT A_STRONGLY_AGREE FROM nss WHERE question='Q01' AND institution='Edinburgh Napier University' AND sub...
<filename>queries/22.sql -- using 1433771997 as a seed to the RNG select cntrycode, count(*) as numcust, sum(c_acctbal) as totacctbal from ( select substr(c_phone, 1, 2) as cntrycode, c_acctbal from customer where substr(c_phone, 1, 2) in ('20', '14', '21', '28', '15', '24', '27') and c_a...
<reponame>DeyanDanailov/MS-SQL-Server SELECT CONCAT(m.FirstName, ' ', m.LastName) AS Mechanic, AVG(DATEDIFF(DAY, j.IssueDate, j.FinishDate)) AS [Average Days] FROM Mechanics m JOIN Jobs j ON j.MechanicId = m.MechanicId WHERE j.Status LIKE 'Finished' GROUP BY m.FirstName, m.LastName, m.MechanicId ORDER BY m.Me...
<reponame>yuweijun/spring-boot-examples --liquibase formatted sql --changeset yuweijun:4 date:2016-06-11 DROP TABLE IF EXISTS `hotel`; CREATE TABLE `hotel` ( `city` int(11) NOT NULL, `name` varchar(255) NOT NULL, `address` varchar(255) DEFAULT NULL, `zip` varchar(20) DEFAULT NULL, PRIMARY KEY (`city`) ) ENGI...
<gh_stars>1-10 INSERT INTO `modelos` (`id`, `name`, `marca`, `host_type_id`, `comentario`, `created_at`, `updated_at`, `marca_id`) VALUES (NULL, '', '123', '', NULL, NULL, NULL, NULL), (NULL, '123', '', '', NULL, NULL, NULL, NULL);
<gh_stars>10-100 CREATE VIEW [Test].[vwTestQuery] AS /* * This is automatically generated; any changes will be lost. */ SELECT [t].[TableId], [t].[Name], [t].[Count], [t].[Amount], [t].[Other], [t].[GenderCode], [t].[OrgUnitId], [t].[RowVersion], [t].[Cre...
/* bi-11 */
<reponame>d-bytebase/bytebase<filename>store/demo/prod/10060__instance.sql INSERT INTO instance ( id, creator_id, updater_id, environment_id, name, engine, engine_version, host, port, external_link ) VALUES ( 6001, ...
<reponame>dram/metasfresh -- 17.07.2015 16:27:15 -- URL zum Konzept INSERT INTO AD_Process_Para (AD_Client_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,DefaultValue,DisplayLogic,EntityType,FieldLength,IsActive,IsAutocomplete,IsCentrallyMaintained,IsEncrypted,IsMandatory,Is...
<reponame>davidbhon/dpc-app<gh_stars>10-100 CREATE TABLE "group" ( id uuid DEFAULT gen_random_uuid() PRIMARY KEY, organization_id uuid NOT NULL, version bigint DEFAULT 0, created_at timestamp with time zone DEFAULT now(), updated_at timestamp with time zone DEFAULT now(), info jsonb NOT NULL, ...
<reponame>apavlo/benchbase<filename>src/main/resources/benchmarks/epinions/ddl-postgres.sql -- WARNING!!! -- All of the indexes were removed for the 15-799 project. Do not use this for real benchmarking! -- https://15799.courses.cs.cmu.edu/spring2022/project1.html DROP TABLE IF EXISTS review CASCADE; DROP TABLE IF EXI...
/*CREATE database scrinia*/ CREATE TABLE usuarios ( idUsuario INTEGER PRIMARY KEY, email varchar(64), senha varchar(64), nome varchar(64) ); CREATE TABLE leitor ( ddi INTEGER, ddd INTEGER, numero INTEGER, tipo varchar(64), idLeitor INTEGER PRIMARY KEY, cpf varchar(14), nascimento datetime, nascionalidade varchar(64),...
<reponame>Dobrynin91/jepria-showcase begin pkg_JepRiaShowcaseTest.testFeatureOperator(); end; /
<gh_stars>1-10 CREATE TABLE provider_url_domain ( provider_url VARCHAR, domain_name VARCHAR, PRIMARY KEY (provider_url, domain_name)); --//@UNDO DROP TABLE provider_url_domain;
CREATE TABLE VIEWERHASH ( ViewerHashKey INT NOT NULL PRIMARY KEY GENERATED ALWAYS AS IDENTITY , StudyKey INT NOT NULL, PoolKey INT NOT NULL, Hash VARCHAR(2048), Expires TIMESTAMP ); CREATE INDEX ViewerHash_UNIQUE on VIEWERHASH (Hash); CREATE INDEX ViewerHash_Expires on VIEWERHASH (Expires);
DROP TABLE IF EXISTS "overviewbuildgroups"; CREATE TABLE "overview_components" ( "projectid" bigint NOT NULL, "buildgroupid" bigint NOT NULL, "position" bigint NOT NULL, "type" text DEFAULT 'build' NOT NULL ); CREATE INDEX "overview_components_projectid" on "overview_components" ("projectid"); CREATE INDEX "ov...
CREATE TABLE IF NOT EXISTS `customer` ( `customer_id` SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT, `first_name` VARCHAR(45) NOT NULL, `last_name` VARCHAR(45) NOT NULL, `birth_date` DATE, `email` VARCHAR(50) NULL DEFAULT NULL, `active` TINYINT(1) NOT NULL DEFAULT TRUE, `create_date` DATETIME NOT NULL, PRI...
<reponame>guibv/sqlp -- MODULE DML044 -- SQL Test Suite, V6.0, Interactive SQL, dml044.sql -- 59-byte ID -- TEd Version # -- AUTHORIZATION HU SELECT USER FROM HU.ECCO; -- RERUN if USER value does not match preceding AUTHORIZATION comment -- date_time print -- TEST:0215 FIPS sizing -- 6 columns in a UNIQUE const...
<reponame>jackiedong168/wuid<filename>mysql/db.sql CREATE TABLE IF NOT EXISTS `wuid` ( `h` int(10) NOT NULL AUTO_INCREMENT, `x` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`x`), UNIQUE KEY `h` (`h`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
EXEC [EST].[Proc_yjbb_Ins] @Code = N'600432',@CutoffDate = N'2017-09-30',@EPS = N'-0.59',@EPSDeduct = N'0',@Revenue = N'22.07亿',@RevenueYoy = N'9.91',@RevenueQoq = N'22.91',@Profit = N'-9.46亿',@ProfitYoy = N'-56.24',@ProfiltQoq = N'25.97',@NAVPerUnit = N'0.8796',@ROE = N'-58.99',@CashPerUnit = N'0.1917',@GrossProfitRat...
-- Create a new table called oscars CREATE TABLE oscars ( title VARCHAR, award VARCHAR ); -- Insert the data into the oscars table INSERT INTO oscars (title, award) VALUES ('TRANSLATION SUMMER', 'Best Film'), ('<NAME>', 'Best Film'), ('<NAME>', 'Best Film'), ('CUP<NAME>', 'Best Film'), ('LONELY ELEPHANT', 'Bes...
CREATE PROCEDURE [dbo].[P_F_G_GET_LEDGER_OPEN_PERIOD] AS BEGIN SET NOCOUNT ON SELECT * FROM OpenPeriods SET NOCOUNT OFF END;
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 27 Bulan Mei 2021 pada 07.32 -- Versi server: 10.4.11-MariaDB -- Versi PHP: 7.4.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
<reponame>NorthKing2812/Sistema-de-Votacion /* SQLyog Community v13.1.2 (32 bit) MySQL - 10.1.38-MariaDB : Database - db_votacion ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CH...
CREATE TABLE usuarios ( id SERIAL, login VARCHAR(40), senha VARCHAR(8), email VARCHAR(40) ); INSERT INTO usuarios (login, senha, email) VALUES ('laura', '1234', '<EMAIL>');
<filename>app/database/migrations/2016.08.28.11.05.alpha_ncategory.sql -- phpMyAdmin SQL Dump -- version 4.2.7.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Aug 28, 2016 at 06:05 AM -- Server version: 5.5.39 -- PHP Version: 5.4.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:...
SELECT name, COUNT(*) FROM customers INNER JOIN orders on customers.cid = orders.cid GROUP BY name ORDER BY name
<gh_stars>1-10 insert into MEPages_datatablecelltissuetype values(301,1,1,0); insert into MEPages_datatablecelltissuetype values(302,1,2,0); insert into MEPages_datatablecelltissuetype values(303,2,1,0); insert into MEPages_datatablecelltissuetype values(304,2,2,0); insert into MEPages_datatablecelltissuetype values(30...
<filename>CMC030/tv/open/tv_copy_instr.ddl DEFINE RECORD CDD$TOP.TV.TV_COPY_INSTR DESCRIPTION IS /*TV Copy Instructions*/. TV_COPY_INSTR_CDD STRUCTURE. /* Element = Description = Form number */ FRMNUM DATATYPE IS TEXT SIZE IS 8. /* Element = D...
<reponame>goyoambrosio/RobotAtHome2 select home_session_id, rh_home_sessions.name, rh2_sensor_observations.home_id, rh_homes.name, rh2_sensor_observations.room_id, rh_rooms.name, rh2_sensor_observations.home_subsession_id, rh2_sensor_observations.sensor_id, rh_sensors.name, count(rh2_sensor_observations....
<reponame>dram/metasfresh<gh_stars>1000+  -- 18.05.2016 09:09 -- URL zum Konzept UPDATE AD_Column SET AD_Reference_ID=30,Updated=TO_TIMESTAMP('2016-05-18 09:09:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=551018 ; -- 18.05.2016 09:09 -- URL zum Konzept UPDATE AD_Column SET AD_Reference_ID=30,Updated=...
CREATE TABLE cartrulelang ( id CHAVE NOT NULL, id_cart_rule CHAVE NOT NULL, id_lang CHAVE NOT NULL, name CHARACTER VARYING(254) NOT NULL, CONSTRAINT pk_cartrulelang PRIMARY KEY (id) );
<reponame>AndreyKaBelka/MoneySaver CREATE TABLE IF NOT EXISTS `moneysaver`.`users` ( `user_id` INT UNSIGNED NOT NULL, `user_bank` DOUBLE NOT NULL DEFAULT 0, PRIMARY KEY (`user_id`), UNIQUE INDEX `user_id_UNIQUE` (`user_id` ASC) VISIBLE ) COMMENT = 'User database';
CREATE SCHEMA [CMS]
<reponame>qiankunshe/sharding-jdbc<filename>sharding-jdbc/src/test/resources/integrate/schema/table/drop/tbl.sql DROP TABLE t_order_0 ; DROP TABLE t_order_1 ; DROP TABLE t_order_2 ; DROP TABLE t_order_3 ; DROP TABLE t_order_4 ; DROP TABLE t_order_5 ; DROP TABLE t_order_6 ; DROP TABLE t_order_7 ; DROP TABLE t_order_8 ; ...
<reponame>scala-steward/switchmap<filename>src/main/resources/db/migration/V2__IP_to_string.sql ALTER TABLE switches ALTER COLUMN ip TYPE VARCHAR(15);
<reponame>arifng/spring-webservice-oauth2 -- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server version: 5.7.18-log - MySQL Community Server (GPL) -- Server OS: Win64 -- HeidiSQL Version: 9.4.0.5125 -- --------------...
<reponame>dbt-labs/dbt-slack with messages as ( select * from {{ ref('fct_slack_messages') }} ), replies as ( select * from {{ ref('fct_slack_replies') }} ), post_replies as ( select parent_message_id, count(*) as number_of_replies, min(sent_at) as first_reply_at from rep...
DROP TABLE IF EXISTS incomplete_blocks; ALTER TABLE block_metadata ADD CONSTRAINT block_metadata_block_number_fkey FOREIGN KEY (block_number) REFERENCES blocks(number) ON DELETE CASCADE;
<gh_stars>0 DROP SCHEMA mystuff CASCADE;
<filename>sql/_04_operator_function/_02_type_conversion/_003_to_time/cases/1011.sql --test to_time function with int value 360 select to_time(360) from db_root order by 1;
-- @testpoint: pg_stat_get_backend_userid(integer),给定服务器进程的用户ID,当入参为无效值时,合理报错 --入参为有效值时 select pg_stat_get_backend_userid(1); --当入参为无效值(为空、字母、特殊字符、多参)时 select pg_stat_get_backend_userid(); select pg_stat_get_backend_userid('abc'); select pg_stat_get_backend_userid('@#%'); select pg_stat_get_backend_userid(1,2);
CREATE TABLE melding ( id BIGSERIAL PRIMARY KEY, type VARCHAR(32) NOT NULL, fnr VARCHAR(32) NOT NULL, opprettet TIMESTAMP NOT NULL, duplikatkontroll CHAR(128) NOT NULL, data JSONB NOT NULL ); CREATE INDEX melding_opprettet_idx ...
<reponame>Club2014/Symfony -- phpMyAdmin SQL Dump -- version 4.2.9.1 -- http://www.phpmyadmin.net -- -- Client : 127.0.0.1 -- Généré le : Mar 03 Mars 2015 à 19:29 -- Version du serveur : 5.6.17 -- Version de PHP : 5.5.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTE...
<reponame>MalangDeveloper/tataruan<filename>skripsifix.sql<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.7.7 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 14 Jul 2020 pada 08.14 -- Versi server: 10.1.30-MariaDB -- Versi PHP: 7.2.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; ...
#h2 in memory database test setup INSERT INTO PERSON (ID, FIRSTNAME, LASTNAME, MODIFIED_AT, MODIFIED_BY) VALUES (10, ' basic ', 'test ', TIMESTAMP '2019-12-22 15:02:09.567', 'testname'); INSERT INTO ACCOUNT(EMAIL, ACCNAME, MODIFIED_AT, MODIFIED_BY, PERSON_ID) VALUES ('<EMAIL>', 'testname', TIMESTAMP '2019-12-22 15:02...
use plagekom; CREATE TABLE personnel ( Matricule varchar(10) Primary key, Date_d_embauche date, Nom varchar(250) , Prenom varchar(250) , Date_de_naissance date, Lieu_de_naissance varchar(50), Sexe varchar(10), Situation_Ma...
<filename>MISC__SQL/READING_STORED_PROCEDURES.sql<gh_stars>0 /* Retrieve all data and return the result */ CREATE PROCEDURE PROC_GET_ALL_DATA AS BEGIN SET NOCOUNT ON; SELECT s.sensorName ,r.[messageDate] ,r.[rawData] ,r.[dataValue] ,dt.[dataType] ,r.[plotValue] ,pl.[plotLabel] FROM [salfordMove].[dbo].[...
<reponame>dave-007/RML-Utilities-Demo USE tempdb GO /* PURPOSE: Compare trace on Baseline environment versus replay and trace on Comparison environment, Looking at unique batches and comparing key metrics. For use with RML Utilities(https://support.microsoft.com/en-us/kb/944837/) , Performance Analysis databases gener...
<reponame>JelF/rest-psql-web-server<filename>objects/app/forms/utils.sql DROP TYPE IF EXISTS app.forms__error CASCADE; CREATE TYPE app.forms__error AS ( field text, error text ); CREATE OR REPLACE FUNCTION app.forms__error(field text, error text) RETURNS app.forms__error AS 'SELECT field, error;' LANGUAGE SQL
<reponame>CanonTino/javadesdecero CREATE DATABASE IF NOT EXISTS `banco` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `banco`; -- MySQL dump 10.13 Distrib 8.0.21, for Win64 (x86_64) -- -- Host: localhost Database: banco -- ------------------------------------------------------ -- Server version 5.7.31-log /*!4010...
/******************************************************************************* Create Tables ********************************************************************************/ CREATE TABLE `Album` ( `AlbumId` INT NOT NULL AUTO_INCREMENT, `Title` NVARCHAR(160) NOT NULL, `ArtistId` INT NOT NULL, CONST...
CREATE SEQUENCE character_character_id_seq INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 9223372036854775807 CACHE 1; CREATE TABLE character_profile ( character_id integer NOT NULL DEFAULT nextval('character_character_id_seq'::regclass), name character varying(50) COLLATE pg_c...
<gh_stars>1-10 SET DEFINE OFF; CREATE INDEX AFW_11_UTILS_FK2 ON AFW_11_UTILS (REF_UTILS) LOGGING /
<reponame>coco-help/backend ALTER TABLE helper ADD COLUMN last_called TIMESTAMP; UPDATE helper SET last_called = current_timestamp; ALTER TABLE helper ALTER COLUMN last_called SET NOT NULL;
<reponame>Emmyn5600/SQLZOO-Database<filename>tutorial09.sql<gh_stars>1-10 -- SQL tasks from https://sqlzoo.net/wiki/SQL_Tutorial /* *************************************************************** ** ** ***** ***** TUTORIAL - 9 - Window functions ***** *****...
<gh_stars>10-100 INSERT INTO COUNTRY (ENGLISH_NAME, ARABIC_NAME, ALPHA2_CODE, ALPHA3_CODE, PHONE_CODE) VALUES('Afghanistan', 'أفغانستان', 'AF', 'AFG', '93'); INSERT INTO COUNTRY (ENGLISH_NAME, ARABIC_NAME, ALPHA2_CODE, ALPHA3_CODE, PHONE_CODE) VALUES('Åland Islands', 'جزر أولاند', 'AX', 'ALA', '358'); INSERT INTO COUNT...
-- file:numeric.sql ln:482 expect:true INSERT INTO num_data VALUES (8, '74881')
<reponame>Shuttl-Tech/antlr_psql -- file:copy2.sql ln:47 expect:false 10001 22 32 42 52 10002 23 33 43 53 10003 24 34 44 54 10004 25 35 45 55 10005 26 36 46 56 \. COPY x (xyz) from stdin
<reponame>srinathman/semaphore alter table `project__template` add allow_override_args_in_task bool not null default false; alter table `task` add arguments text; alter table `project__template` drop column `override_args`;
INSERT INTO auth_user ('id','password','is_superuser', 'is_staff', 'username', 'email', 'is_active', 'first_name', 'last_name', 'date_joined') VALUES (2,'pbkdf2_sha256$260000$gbppPUYGKnb6W0o7w1CVW1$PR01ycCSgSGyQWek6UjFyDDky00mZWLKbm1QrGBAcxE=',0,0,'customer1','<EMAIL>',1,'','',date('now')), (3,'pbkdf2_sha256$26...
<reponame>sydney-williams/sql-challenge<filename>schema.sql drop table if exists 'department_employees'; drop table if exists 'department_manager'; drop table if exists 'departments'; drop table if exists 'title'; drop table if exists 'employees'; drop table if exists 'salaries'; -- Exported from QuickDBD: https://ww...
CREATE TABLE `persistableUser` ( `userId` int(255) UNSIGNED NOT NULL AUTO_INCREMENT, `username` varchar(50) NOT NULL, `password` varchar(200) DEFAULT NULL, `authorities` varchar(500) DEFAULT NULL, `nonExpired` tinyint(1) DEFAULT NULL, `nonLocked` tinyint(1) DEFAULT NULL, `credentialsNonExpired` tinyint(1)...
DO $$ BEGIN IF NOT EXISTS ( SELECT 1 FROM information_schema.columns WHERE TABLE_SCHEMA = current_schema AND TABLE_NAME = 'device' AND COLUMN_NAME = 'bts_id') THEN ALTER TABLE device ADD COLUMN bts_id INTEGER; END IF; COMMENT ON COLUMN device.bts_id IS 'The ID of the Base Transceive...
# Drop the 'unique_event_execution' index if it exists SET @exist := (SELECT COUNT(INDEX_NAME) FROM information_schema.STATISTICS WHERE `TABLE_NAME` = 'event_execution' AND `INDEX_NAME` = 'unique_event_execution' AND TABLE_SCHEMA = database()); SET @sqlstm...
DELETE from datadictionary where instance='lava' and scope='crms-nacc' and entity='udsmedicalconditions3'; DELETE from viewproperty where instance='lava' and scope='crms-nacc' and entity='udsmedicalconditions3'; DELETE from hibernateproperty where instance='lava' and scope='crms-nacc' and entity='udsmedicalconditions...
create schema main_schema; create table main_schema.city ( id integer primary key, country varchar(50), city varchar(50) ); create table main_schema.users ( id integer primary key, name varchar(30), email varchar(50), registration_date timestamp, id_city integer ); create index main...
# Write your MySQL query statement below SELECT T.Request_at AS Day, ROUND(SUM(if(T.Status <> 'completed', 1,0))/COUNT(*),2) AS `Cancellation Rate` FROM Trips AS T LEFT JOIN (SELECT * FROM Users WHERE Role = 'client') AS C ON T.Client_Id = C.Users_Id LEFT JOIN (SELECT * FROM Users WHERE Role = 'driver') AS D ON T.Driv...
-- Exercise -- 1. Employee Address SELECT e.employee_id, e.job_title, e.address_id, a.address_text FROM employees AS e LEFT JOIN addresses AS a USING (address_id) ORDER BY address_id LIMIT 5; -- 2. Addresses with Towns SELECT e.first_name,e.last_name, t.name, a.address_text FROM employees AS e JOIN addresses AS a USIN...
CREATE TABLE `nota` ( `id` int(11) NOT NULL AUTO_INCREMENT, `tanggal` date DEFAULT NULL, `nomor` varchar(20) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; CREATE TABLE `nota_detail` ( `id` int(11) NOT NULL AUTO_INCREMENT, `idnota` int(11) DEFAULT NULL, `karyawanid` int(11) DEF...
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Mar 03, 2022 at 08:14 AM -- Server version: 10.4.18-MariaDB -- PHP Version: 8.0.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
<filename>EmployeeSql/query.sql<gh_stars>0 -- Delete these tables if they already exist DROP TABLE IF EXISTS dept_emp; DROP TABLE IF EXISTS dept_manager; DROP TABLE IF EXISTS salaries; DROP TABLE IF EXISTS departments; DROP TABLE IF EXISTS employees; DROP TABLE IF EXISTS titles; -- Create new tables CREATE TABLE depar...
CREATE TABLE Employees ( emp_no VARCHAR NOT NULL PRIMARY KEY, birth_date VARCHAR NOT NULL, fist_name VARCHAR NOT NULL, last_name VARCHAR NOT NULL, gender VARCHAR, hire_date VARCHAR NOT NULL ); CREATE TABLE Departments ( dept_no VARCHAR NOT NULL PRIMARY KEY, dept_name VARC...
-- -------------------------------------------------------- -- Title: Retrieves the urine output of adult patients -- 检索成年病人的尿量 -- Notes: this query does not specify a schema. To run it on your local -- MIMIC schema, run the following command: -- SET SEARCH_PATH TO mimiciii; -- Where "mimiciii" is the name of your sch...
<gh_stars>0 CREATE TABLE [dbo].[Users] ( [UserName] NVARCHAR(50) NOT NULL, [PasswordHash] NVARCHAR (MAX) NOT NULL, CONSTRAINT [PK_Users] PRIMARY KEY CLUSTERED ([UserName]) );
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Хост: localhost -- Время создания: Дек 19 2017 г., 00:46 -- Версия сервера: 5.7.20-0ubuntu0.16.04.1 -- Версия PHP: 7.0.22-0ubuntu0.16.04.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"...
<reponame>YAMIN350/FreeAds -- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Hôte : localhost:3306 -- Généré le : mar. 14 mai 2019 à 11:16 -- Version du serveur : 5.7.26-0ubuntu0.18.04.1 -- Version de PHP : 7.2.17-0ubuntu0.18.04.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0...
CREATE TABLE "ActionTYpe" ( "id" SERIAL PRIMARY KEY ); CREATE TABLE "case" ( "id" SERIAL PRIMARY KEY, "investigationassigmentdate" TIMESTAMP, "investigationassignmentnote" TEXT NOT NULL, "investigationplan" TEXT NOT NULL, "initialreport" TEXT NOT NULL, "priority" INTEGER NOT NULL, "findings" TEXT NOT N...
<reponame>octonion/volleyball-w begin; drop table if exists ncaa_pbp.box_scores; create table ncaa_pbp.box_scores ( game_id integer, section_id integer, player_id integer, player_name text, player_url text, position text, s integer, mp ...
<gh_stars>100-1000 -- postgres_do.sql /* Postgres DO statements (https://www.postgresql.org/docs/14/sql-do.html). */ -- From Issue #2018 (https://github.com/sqlfluff/sqlfluff/issues/2018) DO $$DECLARE r record; BEGIN FOR r IN SELECT table_schema, table_name FROM information_schema.tables WHERE table_t...