sql
stringlengths
6
1.05M
SELECT e.FirstName + ' ' + e.LastName AS [Name], ISNULL(convert(VARCHAR, closesum.Sum), 0) + '/' + ISNULL(convert(VARCHAR, opensum.Sum), 0) FROM Employees AS e JOIN (SELECT EmployeeId, count(*) AS [Sum] FROM Reports WHERE YEAR(OpenDate) = '2016' GROUP BY EmployeeId) A...
<reponame>desnoe/network-labs DROP SCHEMA public CASCADE; CREATE SCHEMA public; GRANT ALL ON SCHEMA public TO netbox; GRANT ALL ON SCHEMA public TO public;
CREATE TABLE Majors ( MajorID int PRIMARY KEY IDENTITY, Name varchar(50) ) CREATE TABLE Students ( StudentID int PRIMARY KEY IDENTITY, StudentNumber int, StudentName varchar(50), MajorID int FOREIGN KEY REFERENCES Majors(MajorID) ) CREATE TABLE Payments ( PaymentID int PRIMARY KEY IDENTITY, PaymentDate date...
<reponame>mintathr/CodeIgniter3-latih -- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server version: 10.1.26-MariaDB - mariadb.org binary distribution -- Server OS: Win32 -- HeidiSQL Version: 10.2.0.5599 -- ---------...
<gh_stars>0 USE hpi GO TRUNCATE TABLE hpi.RoleNew GO BULK INSERT hpi.RoleNew FROM 'C:\code\modern-data-warehouse-dataops\e2e_samples\parking_sensors_synapse\application_layer\healthcare_infoProtection\data\RoleNew.csv' WITH ( FIRSTROW = 2, FIELDTERMINATOR = ',', --CSV field delimiter ROWTERMINATOR = '\n'...
SELECT {{ columnNames }} FROM library_playlists JOIN playlists ON library_playlists.playlist_id = playlists.playlist_id WHERE in_library = true AND library_playlists.user_id = '{{ userID }}' ORDER BY {{ orderByTableName }}.{{ orderByField }} {{ orderByDirection }} LIMIT {{ paginationPageSize }} OFFSET {{ page...
/* You are given two tables: Students and Grades. Students contains three columns ID, Name and Marks. Grades contains the following data: Ketty gives Eve a task to generate a report containing three columns: Name, Grade and Mark. Ketty doesn't want the NAMES of those students who received a grade lower than 8. Th...
Create PROCEDURE [dbo].[uspVacancyGetClosingCount] ( @ManagingAreaId int, @daysFromClosingDateFor0ApplicationVacancies int ) AS ...
/* Aggregates streets or rivers by name and proximity. */ drop function if exists agg_linear_objects; create or replace function agg_linear_objects(p_type text) returns table(osm_id bigint, name text, way geometry) as $$ declare c record; cc record; changed boolean; begin create temporary table agg_tmp_objects ...
-- -------------------------------------------------------- -- Servidor: 127.0.0.1 -- Versão do servidor: 5.6.21 - MySQL Community Server (GPL) -- OS do Servidor: Win32 -- HeidiSQL Versão: 9.1.0.4867 -- -------------------------------------------------------...
USE Contacts; GO DROP PROCEDURE IF EXISTS dbo.InsertContact; GO CREATE PROCEDURE dbo.InsertContact ( @FirstName VARCHAR(40), @LastName VARCHAR(40), @DateOfBirth DATE = NULL, @AllowContactByPhone BIT, @ContactId INT OUTPUT ) AS BEGIN; SET NOCOUNT ON; IF NOT EXISTS (SELECT 1 FROM dbo.Contacts WH...
CREATE TABLE "terms_and_conditions" ( onerow_id BIT DEFAULT 1 PRIMARY KEY, terms_and_conditions_text VARCHAR DEFAULT NULL ) INSERT INTO "terms_and_conditions" ("terms_and_conditions_text") VALUES (NULL)
<filename>db/sql/2731__create_proc_dw_p_lataa_api_opiskelijat_ja_tutkinnot.sql USE [ANTERO] GO /****** Object: StoredProcedure [dw].[p_lataa_api_opiskelijat_ja_tutkinnot] Script Date: 17.12.2019 17:07:43 ******/ DROP PROCEDURE IF EXISTS [dw].[p_lataa_api_opiskelijat_ja_tutkinnot] GO /****** Object: StoredProcedu...
<reponame>GeorgiyDemo/FA SET SQL_SAFE_UPDATES = 0; DELETE FROM staffs_houses; DELETE FROM products_count; DELETE FROM products; DELETE FROM orders; DELETE FROM houses; DELETE FROM bookings; DELETE FROM staffs; DELETE FROM clients;
<gh_stars>0 ------------------------------------------------------------ -- Timesheet ------------------------------------------------------------ -- Get the hours spent by everybody on a particular project select email, sum(im.hours) as hours from im_hours im, users u where im.user_id = u.user_id and im.user...
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50711 Source Host : localhost:3306 Source Database : mst Target Server Type : MYSQL Target Server Version : 50711 File Encoding : 65001 Date: 2019-03-21 10:17:05 */ SET FOREIGN_KEY_CHECKS=0; -- -----...
SET planner.width.max_per_node=100; SET planner.slice_target=1; SET planner.enable_multiphase_agg=false; SELECT max(DECIMAL_18_18), max(DECIMAL_2_2), max(DECIMAL_15_15) FROM dfs.drillTestDir.`decimal/fragments/T_DECIMAL_BIG_ZERO_PREC`; RESET planner.width.max_per_node; RESET planner.slice_target; RESET planner.en...
<reponame>Fredehagelund92/exasol-dawa-udfs CREATE OR REPLACE PYTHON3 SET SCRIPT ETL_UDFS.dawa_postnummer (TXIDFRA DECIMAL(18,0), TXIDTIL DECIMAL(18,0)) emits ( txid decimal(18,0), tidspunkt TIMESTAMP, operation varchar(255), nr varchar(255), navn varchar(255), stormodtager boolean ) AS utils = exa.import_script("ETL...
use out_clinic_sys; create table diagnose( id int primary key auto_increment, patient_id int not null comment '病人id', diagnose_id varchar(10) comment '诊断id,获取icd_10中的诊断编码', diagnose_name varchar(100) comment '诊断名称,既可以从icd_10中获取,也可以手输' );
<filename>src/main/resources/db/migration/V1__Init_DB.sql alter table if exists message drop constraint if exists message_user_fk; alter table if exists user_role drop constraint if exists user_role_fk; drop table if exists message cascade; drop table if exists user_role cascade; drop table if exists us...
<reponame>baloise/cut DROP VIEW application; DROP VIEW codetyp; DROP VIEW codevalue; CREATE VIEW codetype (id, name, creator, created) AS SELECT lauf_nr, RTRIM(name), RTRIM(erfasser), erfassungszeit FROM tbti_codetyp; CREATE VIEW codevalue (id, codetype_id, name, creator, created) AS SELECT wert,...
<gh_stars>1-10 //=========================================================== // create security objects //=========================================================== USE ROLE SECURITYADMIN; CREATE ROLE IF NOT EXISTS SNOWWATCH_ROLE COMMENT='role used by the snowwatch framework to run queries'; CREATE ROLE IF N...
-- VmIcon vm_icons CREATE OR REPLACE FUNCTION GetVmIconByVmIconId (v_id UUID) RETURNS SETOF vm_icons STABLE AS $PROCEDURE$ BEGIN RETURN QUERY SELECT * FROM vm_icons WHERE id = v_id; END;$PROCEDURE$ LANGUAGE plpgsql; CREATE OR REPLACE FUNCTION GetAllFromVmIcons () RETURNS SETOF vm_icons STABLE AS $PR...
-- -- Tests for ISNUMERIC function -- DROP TABLE IF EXISTS test_isnumeric GO CREATE TABLE test_isnumeric ( bigint_type bigint, int_type int, smallint_type smallint, tinyint_type tinyint, bit_type bit, decimal_type decimal(5,2), numeric_type numeric(10,5), float_type float, real_typ...
<reponame>wkoszek/sivers<gh_stars>0 CREATE TABLE concepts ( id integer primary key, created_at date not null default CURRENT_DATE, title varchar(127) not null unique CONSTRAINT title_not_empty CHECK (length(title) > 0), concept text not null unique CONSTRAINT concept_not_empty CHECK (length(concept) > 0) ); CREATE...
UPDATE button SET recipe='(4) (6) b(6) b(20) &(Y)' WHERE name='George'; UPDATE button SET recipe='(8) (8) b(10) b(12) &(Y)' WHERE name='Violette'; UPDATE button SET recipe='(4) b(4) (10) b(12) &(Y)' WHERE name='Elsie'; UPDATE button SET recipe='(6) b(8) (12) b(20) &(Y)' WHERE name='Kasper'; UPDATE button SET recipe='b(...
-- Процедура добавления билета -- EXAMPLE -- EXEC BuyTicket @id_hall = 5, @date_time_session = "2018-12-31 14:25:00", @number_place = 20 GO DROP PROC if exists BuyTicket GO CREATE PROC BuyTicket @id_hall int, @date_time_session smalldatetime, @number_place int AS DECLARE @id_session INT = ( SELECT Sessions_lis...
<gh_stars>0 --TipoChave CREATE TABLE [dbo].[TipoChave]( [Tipo] [varchar](11) NOT NULL, [Descricao] [varchar](30) NULL, [Inativo] [bit] NULL, PRIMARY KEY CLUSTERED ( [Tipo] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY], CO...
-- Deploy pgrest1:v1views to pg BEGIN; create or replace view "1".film as select title, film.year, director, rating, language, comp.name as competition from film.film left join film.nominations as n on film.id = n.film left join film.competition as comp on n.competition = comp.id; create or replace view "1".fe...
.mode columns .headers on .nullvalue NULL DROP VIEW IF EXISTS HorariosPorCinema; CREATE VIEW HorariosPorCinema AS SELECT nomeC, Horario_t, COUNT(Horario_t) as quant FROM (SELECT CASE WHEN time(horaInicio) >= '07:00:00' AND time(horaInicio) <= '11:00:00' THEN 'Inicio da Manhã' WHEN time(horaInicio)...
<gh_stars>0 CREATE TABLE users ( user_id serial PRIMARY KEY, first_name varchar(256), last_name varchar(256), hashed_password varchar(256) NOT NULL ); CREATE TABLE uploads ( upload_id serial PRIMARY KEY, user_id INT NOT NULL, file_name varchar(256), FOREIGN KEY (user_id) REFERENCES users (user_id) );
CREATE TABLE `doctors` ( `id` int unsigned PRIMARY KEY AUTO_INCREMENT ); CREATE TABLE `pets` ( `id` int unsigned PRIMARY KEY AUTO_INCREMENT, `client_id` int unsigned, `doctor_id` int unsigned, `illness` varchar(255), `name` varchar(255), `breed` varchar(255), `age` int(3), `weight` int(3), `photo` ...
<gh_stars>1-10 ALTER TABLE users AUTO_INCREMENT = 100; ALTER TABLE categories AUTO_INCREMENT = 1; ALTER TABLE transactions AUTO_INCREMENT = 1000;
SELECT * FROM aluno WHERE matricula < 2; SELECT * FROM aluno WHERE matricula < 3; SELECT * FROM aluno WHERE matricula < 4;
-- file:create_misc.sql ln:179 expect:true INSERT INTO f_star (class, a) VALUES ('f', 27)
<reponame>askmohanty/metasfresh -- 2021-08-04T18:29:46.059Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_Process_Para_Trl WHERE AD_Process_Para_ID=542079 ; -- 2021-08-04T18:29:46.070Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_Process_Para WHER...
<reponame>smith750/kc<filename>coeus-db/coeus-db-sql/src/main/resources/org/kuali/coeus/coeus-sql/RELEASE-SCRIPTS/KC-RELEASE-3_1_SP4-SCRIPT/MYSQL/TABLES/KC_TBL_KC_QRTZ_SIMPLE_TRIGGERS.sql CREATE TABLE KC_QRTZ_SIMPLE_TRIGGERS ( TRIGGER_NAME VARCHAR(200) NOT NULL, TRIGGER_GROUP VARCHAR(200) NOT NULL, REPEAT...
<filename>src/jobs/materialize_build_baron/sql_jobs/build_baron__auto_revert__reverts__raw.sql -- This file generated by generate.py. -- <yaml> -- DependsOn: {} -- </yaml> SELECT CAST(vs."_id" AS VARCHAR) AS "_id", vs."branch" AS "branch", vs."repo" AS "repo", ...
select * from `/drill/testdata/text_storage/drill3178.csv`;
insert into ssb.customer select * from ssb."customer"; insert into ssb.dates select * from ssb."date"; insert into ssb.part select * from ssb."part"; insert into ssb.supplier select * from ssb."supplier"; insert into ssb.lineorder select * from ssb."lineorder";
create table rates ( id varchar(10), price numeric(15,2), last_price numeric(15,2), volume numeric(15,2), recorded_at timestamp without time zone default (now() at time zone 'utc') ); create table markets ( market varchar(32), id varchar(10), price numeric(15,2), volume_btc numeric(...
--********************************************************************/ -- */ -- IBM InfoSphere Replication Server */ -- Version 10.5 FPs for Linux, UNIX AND Windows */ -- ...
// *************************************************************************************************** // * Author: <NAME> // * File: bdetweiler-create-tables.cql // * Class: ISQA 8080 // * Assignment: Homework 3 // * Date: 06JUNE16 // ***************************************************************...
<reponame>okbob/pltoolbox<filename>uninstall_pltoolbox.sql<gh_stars>1-10 DROP FUNCTION pst.sprintf(fmt text, VARIADIC args "any"); DROP FUNCTION pst.sprintf(fmt text); DROP FUNCTION pst.format(fmt text, VARIADIC args "any"); DROP FUNCTION pst.format(fmt text); DROP FUNCTION pst.concat(VARIADIC args "any"); DROP FUNCTIO...
USE [test] GO CREATE PROCEDURE UnblockAccount (@accountNumber INT) AS IF (SELECT COUNT(*) FROM Conto WHERE numero = @accountNumber) = 0 RETURN -1 IF (SELECT bloccato FROM Conto WHERE numero = @accountNumber) = 0 RETURN -2 UPDATE Conto SET bloccato = 0, tentativi = 0 -- Unblock and reset attempts WHERE numer...
<reponame>andersonrojas1998/Instituto-Moderno -- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1:3306 -- Tiempo de generación: 20-04-2021 a las 02:10:41 -- Versión del servidor: 5.7.26 -- Versión de PHP: 7.2.18 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; ST...
--github.com/imsunnyjha select name from city where countrycode='JPN';
<gh_stars>0 # --- !Ups INSERT INTO version VALUES ('7.5.0', now(), 'Labels added in previous sessions now show up on Explore page and are editable.'); # --- !Downs DELETE FROM version WHERE version_id = '7.5.0';
USE gallagher; -- Dropping Table Group_Evaluations DROP TABLE group_evaluations; -- Dropping Table Member_Evaluations DROP TABLE member_evaluations; -- Dropping Table Evaluation_Stages DROP TABLE evaluation_stages; -- Dropping Table Group_Members DROP TABLE group_members; -- Dropping Table Groups DROP TABLE...
-- https://support.google.com/a/answer/6032762 select min(sc) as 'school_id', min(id) as 'staff_id', tf as 'first_name', tln as 'last_name', min(em) as 'user_name' from tch where sc in (1,2,3,4) and id <> 0 and em <> '' and del = 0 and tg = '' group by id, tf, tln order by min(sc), tln, tf
CREATE TABLE posts( id int AUTO_INCREMENT, title varchar(30), content varchar(255), writer varchar(5), date Date, PRIMARY KEY(id) );
INSERT INTO `dboportunidades` (`idoportunidad`, `nombredespacho`, `apellidopaterno`, `apellidomaterno`, `nombre`, `telefonomovil`, `telefonotrabajo`, `email`, `refusuarios`, `refreferentes`, `refestadooportunidad`, `fechacrea`, `refmotivorechazos`, `observaciones`, `refestadogeneraloportunidad`) SELECT '', p.r...
<reponame>eb/phptourney /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `bans` ( `id` int(11) NOT NULL AUTO_INCREMENT, `id_season` int(11) NOT NULL DEFAULT 0, `ip` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', PRIMARY KEY (`...
<filename>modules/boonex/convos/updates/9.0.8_9.0.9/install/sql/enable.sql -- MENUS UPDATE `sys_menu_items` SET `icon`='pencil-alt' WHERE `set_name`='bx_convos_view' AND `name`='edit-convo';
select [a b] from d;
<filename>data/pl/sqlite/subdivisions_SK.sqlite.sql CREATE TABLE subdivision_SK (id VARCHAR(6) NOT NULL, name VARCHAR(255), level VARCHAR(64) NOT NULL, PRIMARY KEY(id)); INSERT INTO "subdivision_SK" ("id", "name", "level") VALUES ('SK-BC', 'Kraj bańskobystrzycki', 'region'); INSERT INTO "subdivision_SK" ("id", "name",...
/** Design: The `smtp` table keeps a record of each hostname which is the mail server. It also contains the individual accounts and passwords, an the mapping to the google drive identifier. The `emails` table contains a key to the smtp table for the email address matched, and then contains ids to the message on the ...
CREATE USER custom_id WITH SUPERUSER; CREATE DATABASE custom_id; GRANT ALL PRIVILEGES ON DATABASE custom_id TO custom_id;
<filename>samples/banks.sql SELECT name, sum(total) as sum_total FROM ( SELECT osm.name, count(*) as total FROM planet_osm_point osm WHERE osm.amenity='bank' GROUP BY osm.name union SELECT osm.name, count(*) as total FROM planet_osm_polygon osm WHERE osm.amenity='bank' GROUP BY osm.name ) all_records GROUP BY...
/* Warnings: - A unique constraint covering the columns `[contact_id,tag_id]` on the table `subscriptions` will be added. If there are existing duplicate values, this will fail. */ -- CreateIndex CREATE UNIQUE INDEX "subscriptions.contact_id_tag_id_unique" ON "subscriptions"("contact_id", "tag_id");
CREATE USER 'prestashop'@'%'; CREATE DATABASE IF NOT EXISTS prestashop; GRANT ALL ON prestashop.* TO 'prestashop'@'%' IDENTIFIED BY 'prestashoppw'; CREATE USER 'opencart'@'%'; CREATE DATABASE IF NOT EXISTS opencart; GRANT ALL ON opencart.* TO 'opencart'@'%' IDENTIFIED BY 'opencartpw'; CREATE USER 'drupal_commerce'@'%...
<filename>scripts/tables.sql<gh_stars>10-100 constituents: select c.* into temporary tt from data.constituents c where c.constituentid in ( select distinct oc.constituentid from data.objects_constituents oc where oc.roletype in ('artist','donor') and oc.objectid in ( select distinct o.objectid fro...
<filename>coeus-db/coeus-db-sql/src/main/resources/org/kuali/coeus/coeus-sql/RELEASE-SCRIPTS/KC-RELEASE-4_0-SCRIPT/oracle/tables/KC_TBL_PERSON_EXT_T.sql ALTER TABLE PERSON_EXT_T ADD SALARY_ANNIVERSARY_DATE DATE /
/* remove twitter from preferences (PRFL-94) */ alter table PROFILE_PREFERENCES_T drop TWITTER_ENABLED; alter table PROFILE_PREFERENCES_T drop TWITTER_USERNAME; alter table PROFILE_PREFERENCES_T drop TWITTER_PASSWORD; /* add external integration table (PRFL-94) */ create table PROFILE_EXTERNAL_INTEGRATION_T ( USER_U...
<reponame>z362215712/TinkPHP5Test /* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50553 Source Host : localhost:3306 Source Database : db_sharefood Target Server Type : MYSQL Target Server Version : 50553 File Encoding : 65001 Date: 2018...
<filename>oracle_script/db_conversion/m_year_mods.sql insert into m_year (model_run_id,site_datatype_id,start_date_time,end_date_time,value) select model_run_id,site_datatype_id, date_year, add_months(date_year,12), value from &1.m_year;
<filename>src/main/resources/db/migration/V4__refactoring.sql CREATE TYPE sht.PAYMENT_STATUS AS ENUM ('NEW', 'CAPTURED'); ALTER TABLE sht.payment ALTER COLUMN status DROP DEFAULT; ALTER TABLE sht.payment ALTER COLUMN status TYPE sht.PAYMENT_STATUS USING status :: sht.PAYMENT_STATUS; ALTER TABLE sht.payment ALT...
-- 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 OR REPLACE VIEW analytics.StudentLocalEduc...
<reponame>objectcomputing/check-ins<filename>server/src/main/resources/db/common/V45__create_feedback_table.sql<gh_stars>1-10 DROP TABLE IF EXISTS feedback; CREATE TABLE feedback ( id varchar PRIMARY KEY, content varchar, sentTo varchar REFERENCES member_profile(id), sentBy varchar REFERENCES member_pr...
<gh_stars>1-10 CREATE TABLE "MEDIA_KEYWORDS" ( "MEDIA_ID" NUMBER NOT NULL ENABLE, "KEYWORDS" VARCHAR2(4000 CHAR), "LASTDATE" DATE, "MEDIA_KEYWORDS_ID" NUMBER NOT NULL ENABLE, CONSTRAINT "MEDIA_KEYWORDS_PK" PRIMARY KEY ("MEDIA_KEYWORDS_ID") USING INDEX ENABLE )
<gh_stars>0 -- @testpoint: 组合使用where条件,group by分组,order by 排序,比较运算符,inner join ... using 连接,模糊查询like,范围查询in进行查询索引推荐 --test1:组合使用where条件,group by分组,order by 排序,比较运算符,inner join ... using ,模糊查询like,范围查询in进行查询索引推荐 --step1:建表1;expect:建表1成功 drop table if exists t_table_ai_indexadv_0014 cascade; create table t_table_ai_in...
<reponame>donhuhung/zilliqa /* Navicat MySQL Data Transfer Source Server : Localhost Source Server Version : 50505 Source Host : localhost:3306 Source Database : zilliqa-2019 Target Server Type : MYSQL Target Server Version : 50505 File Encoding : 65001 Date: 2019-10-10 12:28:33 */...
-- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 06, 2019 at 03:40 AM -- Server version: 10.1.22-MariaDB -- PHP Version: 7.1.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
DROP TABLE IF EXISTS Gloomhaven DROP TABLE IF EXISTS RoboRally
-- SPDX-FileCopyrightText: 2021 City of Turku -- -- SPDX-License-Identifier: LGPL-2.1-or-later INSERT INTO service_need_option (id, name_fi, name_sv, name_en, valid_placement_type, default_option, fee_coefficient, voucher_value_coefficient, occupancy_coefficient, daycare_hours_per_week, part_day, part_week, fee_de...
<filename>stack_overflow.tags_popular.sql<gh_stars>0 #standardSQL -- Query Popular Stack Overflow Tags SELECT tag, COUNT(tag) AS count FROM ( SELECT SPLIT(tags, '|') AS tag FROM `bigquery-public-data.stackoverflow.posts_questions` WHERE DATE(creation_date) > '2018-01-01' ), UNNEST(tag) AS tag GROUP BY tag ORD...
CREATE TABLE "source_images" ( "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, "image" BLOB NOT NULL ); CREATE TABLE "postcards" ( "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, "name" INTEGER NOT NULL, "text_alignment" CHAR(2) NOT NULL, "source_image_id" INTEGER NOT NULL REFERENCES source_images(id), "image...
-- phpMyAdmin SQL Dump -- version 4.6.6deb4 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Feb 04, 2018 at 02:13 AM -- Server version: 5.7.20-0ubuntu0.17.04.1 -- PHP Version: 7.0.22-0ubuntu0.17.04.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHA...
DECLARE COUNT_INDEXES INTEGER; BEGIN SELECT COUNT ( * ) INTO COUNT_INDEXES FROM USER_INDEXES WHERE INDEX_NAME = 'users_email_index'; IF COUNT_INDEXES > 0 THEN EXECUTE IMMEDIATE 'DROP INDEX users_email_index'; END IF; END;
<reponame>iqb-berlin/testcenter SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; # SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLL...
<gh_stars>1-10 /* # Author: <NAME> # Date: June 2018 ################################# # Reason: This builds the final MCR_WORKSHEETS table and inserts the "unpivoted" data from MCR_WORKSHEETS_AUTO. # For: UAB MSHI Capstone Project # Title: A Sustainable Business Intelligence Approach # to t...
<gh_stars>1-10 select name from students where marks > 75 order by right(name,3), id asc
CREATE LUA SCALAR SCRIPT map_words(w varchar(10000)) EMITS (words varchar(100)) AS function run(ctx) local word = ctx.w if (word ~= null) then for i in unicode.utf8.gmatch(word,'([%w%p]+)') do ctx.emit(i) end end end /
<filename>Swordfish.Web/Swordfish.Database/dbo/Tables/AspNetUserClaims.sql  CREATE TABLE dbo.AspNetUserClaims ( Id INT IDENTITY (1, 1) NOT NULL, UserId NVARCHAR (128) NOT NULL, ClaimType NVARCHAR (MAX) , ClaimValue NVARCHAR (MAX) , CONSTRAINT PK_AspNetUserClaims PRIMARY KEY CLUSTERED (Id ASC), ...
/* Replace with your SQL commands */ alter table crm_v2.document_roles drop constraint company_or_invoice_account; alter table crm_v2.document_roles alter column company_id set not null;
<reponame>GeoKnow/FAGI-gis --Database creation script for the importer PostGIS schema --Drop all tables if they exist DROP TABLE IF EXISTS dataset_a_info; DROP TABLE IF EXISTS dataset_a_metadata; DROP TABLE IF EXISTS dataset_a_geometries; DROP TABLE IF EXISTS dataset_b_info; DROP TABLE IF EXISTS dataset_b_metadata; DR...
-- CreateTable CREATE TABLE `Url` ( `id` VARCHAR(191) NOT NULL, `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), `updatedAt` DATETIME(3) NOT NULL, `url` VARCHAR(191) NOT NULL, `userId` VARCHAR(191) NOT NULL, PRIMARY KEY (`id`) ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicod...
<filename>webticket.sql -- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1:3306 -- Généré le : ven. 31 déc. 2021 à 14:55 -- Version du serveur : 8.0.21 -- Version de PHP : 7.3.21 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 ...
<reponame>connormcd/misc-scripts REM REM Standard disclaimer - anything in here can be used at your own risk. REM REM It is very likely you'll need to edit the script for correct usernames/passwords etc. REM REM No warranty or liability etc etc etc. See the license file in the git repo root REM REM *** USE AT YOUR OW...
<filename>internal/database/migration/runner/testdata/well-formed/10001/down.sql<gh_stars>1-10 DROP TABLE IF EXISTS test_trees;
<filename>lab_l_t.sql<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1:3306 -- Время создания: Янв 17 2020 г., 11:13 -- Версия сервера: 8.0.15 -- Версия PHP: 7.3.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:...
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 06, 2021 at 03:51 AM -- Server version: 10.4.8-MariaDB -- PHP Version: 7.3.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
<filename>Database/Schema/Profile.Module.GenericRDF.Data.Table.sql<gh_stars>10-100 SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [Profile.Module].[GenericRDF.Data]( [Name] [varchar](55) NOT NULL, [NodeID] [bigint] NOT NULL, [Data] [varchar](max) NULL, [SearchableData] [varchar](max) NULL, PRIMARY KE...
autocommit off; create class x (xint int, xstr string); create class y (yint int, ystr string); create vclass union_xy (vunion_int int, vunion_str string) as (select xint, xstr from x where xint > 1 union select yint, ystr from y where yint < 40); create vclass diff_xy (vdiff_int int, vdiff_st...
<gh_stars>1-10 select exp(cast(1 as SHORT)) from db_root; select exp(cast(1 as INTEGER)) from db_root; select exp(cast(1 as BIGINT)) from db_root; select exp(cast(1 as FLOAT)) from db_root; select exp(cast(1 as DOUBLE)) from db_root; select exp(cast(1 as NUMERIC(15,5))) from db_root; select exp(cast(1 as MONETARY)) fro...
<gh_stars>10-100 drop schema "presence" cascade;
ALTER TABLE `event_sublocation` alter column `event` rename to `event_id`; ALTER TABLE `event_sublocation` alter column `sublocation` rename to `sublocation_id`;
insert into Vehicle values(10001,'BMW', 'V0001'); insert into Vehicle values(10002,'FORD', 'V00002');
<reponame>ringmail/ringmail-backend INSERT INTO sys_version SET id=6;
DROP TABLE IF EXISTS `sys_role_menu`; CREATE TABLE `sys_role_menu` ( `role_id` int(11) NOT NULL COMMENT '角色编号', `menu_id` int(11) NOT NULL COMMENT '菜单编号', PRIMARY KEY (`role_id`,`menu_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='角色-菜单';