sql
stringlengths
6
1.05M
DROP INDEX CONCURRENTLY IF EXISTS "post_history_post_id_idx"; DROP INDEX CONCURRENTLY IF EXISTS "post_history_categories_idx"; DROP INDEX CONCURRENTLY IF EXISTS "post_history_state_idx"; DROP TABLE IF EXISTS "post_history";
CREATE OR REPLACE PROCEDURE GetProductsView ( cur_OUT OUT PKGENTLIB_ARCHITECTURE.CURENTLIB_ARCHITECTURE) AS BEGIN OPEN cur_OUT FOR SELECT ProductId as Id,ProductName as Name, CategoryId as Category,UnitPrice, LastUpdate FROM Products where ProductId in (1,2,3,4,5) ORDER BY ProductID; END; /
ALTER PROCEDURE [dbo].[rb_GetPortalSettings] ( @PortalAlias nvarchar(50), @PageID int, @PortalLanguage nvarchar(12), @PortalID int OUTPUT, @PortalName nvarchar(128) OUTPUT, @PortalPath nvarchar(128) OUTPUT, @AlwaysShowEditButton bit OUTPUT, @PageName nvarchar ...
<reponame>Zhaojia2019/cubrid-testcases --pass date type/format argument --TEST: pass only one argument select trunc(date'1999-12-20'); select trunc('12/20/1999'); --TEST: pass date type argument, select directly select trunc(date'1999-12-20', 'yyyy'); select trunc(date'1999-12-20', 'yy'); select trunc(date'12/20/19...
-- @testpoint:opengauss关键字nulls非保留),作为序列名 --关键字不带引号-成功 drop sequence if exists nulls; create sequence nulls start 100 cache 50; drop sequence nulls; --关键字带双引号-成功 drop sequence if exists "nulls"; create sequence "nulls" start 100 cache 50; drop sequence "nulls"; --关键字带单引号-合理报错 drop sequence if exists 'nulls'; creat...
SELECT * FROM customers INNER JOIN parent ON customers.cid = parent.id WHERE FULL_TEXT_SEARCH(customers.name, 'john') AND parent.name = 'X'
<filename>src/stronghand_3e_api/db/sp/orders.sql -- :name orders :! :n INSERT INTO ORDERS ( ID, ISSUE_ID, OTHERS, IMAGES, LOCATIONS, TOTAL, APPOINTMENT_AT, CREATED_BY ) VALUES ( :ID, :ISSUE_ID, :OTHERS, :IMAGES, :LOCATIONS, :TOTAL, :APPOINTMENT_AT, :CREATE...
CREATE PROCEDURE [dbo].[Explorer_GetReferencedTableColumnValues.sql] @tableName NVARCHAR(128), @columnName NVARCHAR(128), @id INT AS BEGIN SET NOCOUNT ON SET FMTONLY OFF SELECT [table].[name] AS [SourceTableName] , colFK.[name] AS [SourceTableColumn] , [reftable].[name] AS...
 CREATE VIEW [dbo].[ViewRMs_OnAir] AS SELECT dbo.RmsOnAir.ID, dbo.RmsOnAir.EndingDate, dbo.RmsOnAir.StartingDate, dbo.RmsOnAir.RMID, Broadcaster.dbo.RMs.Name, Broadcaster.dbo.TypeOfRM.Name AS Type, Broadcaster.dbo.RMs.TypeID, Broadcaster.dbo.RMs.Finish - Broadcaster.dbo.RMs.Start AS Length FRO...
<reponame>mbogner/graph-ql-sample CREATE TABLE posts ( id uuid not null default uuid_generate_v4() constraint pk_posts primary key, name varchar(255) not null constraint uc_posts__name unique, user_id uuid not null constraint fk_posts__user references users (i...
-- +goose Up -- +goose StatementBegin CREATE TABLE "user" ( id uuid primary key, email text not null unique, password text not null, first_name text not null, last_name text not null, phone text not null default '', created_at timestamp not null default now(), update...
-- creates a table called first_table CREATE TABLE IF NOT EXISTS first_table (id INT, name VARCHAR(256));
<filename>sql_queries/insert_group.sql INSERT INTO public.groups ( "name") VALUES ( 'Group Test 1')
<reponame>vrbait1107/FOLLOW_UNFOLLOW_SYSTEM -- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 20, 2020 at 08:47 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; S...
ALTER TABLE `idiom_words` ADD COLUMN `name_reverce` varchar(24) NOT NULL DEFAULT '' AFTER `idiom_pinyin`; -- 这需要创建联合索引,以便查询 以x开头,但是不包含一些成语的查询 ALTER TABLE `idiom_words` ADD INDEX `idiom_words_name_and_reverce` (`idiom_name` , `name_reverce` );
CREATE TABLE IF NOT EXISTS match_log_message( id SERIAL PRIMARY KEY, match_id INTEGER NOT NULL REFERENCES match, match_log_message_type INTEGER NOT NULL, message VARCHAR(256) NOT NULL, created_at TIMESTAMP WITHOUT TIME ZONE NOT NULL, updated_at TIMESTAMP WITHOUT TIME ZONE NOT NULL );
<gh_stars>1-10 drop table if exists FX_MB_PAYMENT_TRAN_HIST; /*==============================================================*/ /* Table: FX_MB_PAYMENT_TRAN_HIST */ /*==============================================================*/ create table FX_MB_PAYMENT_TRAN_HIST ( SEQ...
<filename>setup/deforestation.sql drop table if exists deforestation; create table deforestation( id int primary key, image_date date, geom geometry); insert into deforestation( id, image_date, area, geom) select id, to_date(image_date, 'YYYY-MM-DD'), cast(area_km as decimal), st_ma...
<gh_stars>1-10 CREATE TABLE [dbo].[Orders] ( [OrderID] INT IDENTITY (1, 1) NOT NULL, [SalesRepID] INT NULL, [CustomerID] NCHAR (5) NOT NULL, [OrderDate] DATETIME NULL, [RequiredDate] DATETIME NULL, [PaymentDueDate] DATETIME NULL...
-- -------------------------------------------------------- -- -- Table structure for table `accounts` -- DROP TABLE IF EXISTS `accounts`; CREATE TABLE `accounts` ( `account` char(65) NOT NULL, `frontier` char(64) DEFAULT NULL, `open_block` char(64) DEFAULT NULL, `representative_block` char(64) DEFAULT NULL,...
<gh_stars>10-100 -- ============================================= -- Author: <NAME> -- Create date: 20Oct20 -- Description: See a log of package run times. -- Directions for use: -- ============================================= USE [ODS] GO DROP VIEW IF EXISTS [dbo].[SSISPackageRunTime] GO SET ANSI_NULLS ON GO SE...
<filename>src/main/resources/db/migration/nomis/ddl/V1_100__OFFENDER_LANGUAGES.sql -- Offender Language and numeracy skills CREATE TABLE OFFENDER_LANGUAGES ( OFFENDER_BOOK_ID NUMBER(10) NOT NULL, -- FK to Offender Bookings. LANGUAGE_TYPE VARCHAR2(12) ...
{% macro cents_to_dollars(column_name, precision=2) %} ({{ column_name }} / 100)::numeric(16, {{ precision }}) {% endmacro %}
<filename>coupon.sql /* Navicat Premium Data Transfer Source Server : localhost_3306 Source Server Type : MySQL Source Server Version : 50727 Source Host : localhost:3306 Source Schema : open_coupon Target Server Type : MySQL Target Server Version : 50727 File Encoding ...
<gh_stars>1000+ -- 2017-08-14T17:28:44.411 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Process_Para (AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,DefaultValue,EntityType,FieldLength,IsActive,IsAutocomplete,IsCent...
-- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 17, 2017 at 02:35 PM -- Server version: 10.1.21-MariaDB -- PHP Version: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE...
<reponame>ligson/ejbca -- If you are using an older version of Derby, such as 10.2, you need to drop and re-create this table. See doc/howto/create-tables-ejbca5-derby.sql for drop/create statements. -- This column is added by the JPA provider if there are sufficient privileges -- ALTER TABLE AdminEntityData ADD tokenT...
<reponame>lolog/spring-cloud insert into user (id, username, name, age, balance) values(1, 'lolog1', 'lolog1', 10, 10.1); insert into user (id, username, name, age, balance) values(2, 'lolog2', 'lolog2', 20, 20.2); insert into user (id, username, name, age, balance) values(3, 'lolog3', 'lolog3', 30, 30.3); insert into ...
<reponame>Donkey0619/Metis<gh_stars>1-10 SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for `train_task` -- ---------------------------- DROP TABLE IF EXISTS `train_task`; CREATE TABLE `train_task` ( `id` int(11) NOT NULL AUTO_INCREMENT, `task_id` char(255) DEFAULT NULL, `sample_num`...
Filename: h5stat_newgrat.h5 File information # of unique groups: 35001 # of unique datasets: 1 # of unique named datatypes: 0 # of unique links: 0 # of unique other: 0 Max. # of links to object: 1 Max. # of objects in group: 35001 File space information for file metadata (in bytes): Superblock: 48 Superblock e...
select foo, bar from baz natural join quz
<reponame>antoinecarme/caret2sql<filename>demo/CaretClassifier_glmnet_pca/BinaryClass_10/teradata/demo3_caret_CaretClassifier_glmnet_pca_teradata.sql -- This SQL code was generated by sklearn2sql (development version). -- Copyright 2018 -- Model : CaretClassifier_glmnet_pca -- Dataset : BinaryClass_10 -- Database : te...
SELECT if (bit_count('255') = bit_count(255), 'ok', 'nok') from db_root; $varchar, $255 select bit_count(?) from db_root; $varchar, $-255 select if (bit_count(?) = bit_count(-2.55e2), 'ok','nok') from db_root; create table t (s varchar(255)); insert into t values('255'); insert into t values('-0'); insert into t...
--[beginscript] update CKCore.tSystem Set ActorEMailUnique = 0; --[endscript]
insert into Comentario (contenido, idPost, idUsuario) values ('tincidunt eget tempus vel pede morbi porttitor lorem id ligula', 4, 1); insert into Comentario (contenido, idPost, idUsuario) values ('nulla justo aliquam quis turpis eget elit sodales scelerisque', 4, 9); insert into Comentario (contenido, idPost, idUsuari...
<filename>parameters/src/main/resources/studio/crud/feature/parameters/db/migration/V20210728153600__AddParameterTable.sql<gh_stars>0 create table parameter ( id bigint not null auto_increment, creation_time datetime, last_update_time datetime, description varchar(255), m...
<gh_stars>0 CREATE TABLE user_roles ( id smallint NOT NULL, id_name varchar(15) NOT NULL, title varchar(50) NOT NULL, CONSTRAINT pk_user_roles PRIMARY KEY (id) );
<gh_stars>0 -- depends_on: {{ ref('stores_proc') }}, {{ ref('shopify_refunds_proc')}}, {{ ref('shopify_discounts_proc')}} {% set stores = get_column_values(table=ref('stores_proc'), column='store_name', max_records=50, filter_column='platform', filter_value='Shopify') %} {% if stores != [] %} with orders as ( {% ...
INSERT INTO product VALUES(1, 'Ordinateur portable' , 350, 120); INSERT INTO product VALUES(2, 'Aspirateur Robot' , 500, 200); INSERT INTO product VALUES(3, 'Table de Ping Pong' , 750, 400);
select a.nomeAluno from aluno a left join matricula m on a.idAluno = m.idAluno where ISNULL (m.idAluno)
<gh_stars>1-10 IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[qIDistributionGroupRole]') AND type in (N'U')) DROP TABLE [dbo].[qIDistributionGroupRole] ; IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[qIContact]') AND type in (N'U')) DROP TABLE [dbo].[qIContact] ;...
CREATE TABLE IF NOT EXISTS `{{ index .Options "Namespace" }}refresh_tokens` ( `instance_id` varchar(255) DEFAULT NULL, `id` bigint(20) NOT NULL AUTO_INCREMENT, `token` varchar(255) DEFAULT NULL, `user_id` varchar(255) DEFAULT NULL, `revoked` tinyint(1) DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL,...
<filename>persistence-modules/spring-hibernate-5/src/test/resources/import.sql insert into item (item_id, item_name, item_desc, item_price) values(1,'item One', 'test 1', 35.12); insert into item (item_id, item_name, item_desc, item_price) values(2,'Pogo stick', 'Pogo stick', 466.12); insert into item (item_id, item_...
<reponame>markddrake/XFILES /* ================================================ * * Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to ...
INSERT INTO AWARD_SYNC_CHANGE (AWARD_SYNC_CHANGE_ID,AWARD_ID,CLASS_NAME,ATTRIBUTE_NAME,OBJECT_DESC,DATA_DESC,SYNC_TYPE,SYNC_DESCEND,SYNC_FABRICATED_DESCEND,SYNC_COST_SHARE_DESCEND,XML_CHANGES,UPDATE_TIMESTAMP,UPDATE_USER,VER_NBR,OBJ_ID) VALUES (SEQ_AWARD_SYNC_CHANGE_ID.NEXTVAL,(SELECT AWARD_ID FROM AWARD WHERE AWA...
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Versione server: 8.0.27 - MySQL Community Server - GPL -- S.O. server: Win64 -- HeidiSQL Versione: 11.3.0.6295 -- -------------------------------------------------------- /...
<reponame>CodeRancher/offcenter_trading USE ota; DROP VIEW IF EXISTS CandleDetail; CREATE VIEW CandleDetail AS SELECT CandleId, i.Name AS Instrument, tf.Name AS Timeframe, AskOpen, AskClose, AskHigh, AskLow, BidOpen, BidClose, BidHigh, BidLow, Start FROM ota.Candle c INNER JOIN ota.Instrument i ON c.In...
<gh_stars>0 library ChlamydiaScreening_Common version '2' using QDM version '5.3' //include otherLibrary version 'x.x' called otherLibrary //codesystem codeSystemName : 'OID' version 'x.x' //valueset valuesetName : 'OID' version 'x.x' codesystems{codeSystem1 , codeSystem2, etc} //code codeName : 'OID' from codeSystem...
SELECT i_item_id ,i_item_desc ,i_category ,i_class ,i_current_price ,SUM(ws_ext_sales_price) AS itemrevenue ,SUM(ws_ext_sales_price)*100/SUM(SUM(ws_ext_sales_price)) over (PARTITION BY i_class) AS revenueratio FROM web_sales ,item ,date_dim WHERE ws_ite...
DROP TABLE IF EXISTS PUBLIC.BOOKS; CREATE TABLE PUBLIC.BOOKS ( ID INTEGER NOT NULL AUTO_INCREMENT, NAME VARCHAR(255) NOT NULL, AUTHOR VARCHAR(255) NOT NULL, PRINT_YEAR INTEGER(4) NOT NULL, IS_READ BOOLEAN NOT NULL DEFAULT FALSE, CONSTRAINT BOOKS_PRIMARY_KEY PRIMARY KEY (ID)...
<filename>Populated_script.sql USE rcc353_1; SET FOREIGN_KEY_CHECKS = 0; DROP TABLE IF EXISTS AccountType; CREATE TABLE IF NOT EXISTS AccountType( id INT(6) UNSIGNED AUTO_INCREMENT, type VARCHAR(20), PRIMARY KEY(id) )ENGINE= INNODB; INSERT INTO AccountType(type) VALUES('ADMIN'); INSERT INTO AccountType(type) V...
<filename>resources/sql/postgres/change_user_pw_by_username.sql -- Input: New hashed user password, username UPDATE users SET user_pass = $1::VARCHAR WHERE user_name = $2::VARCHAR;
-- adding spending limits to accounts alter table broadcast alter column msg_template1 type text; alter table broadcast alter column msg_template2 type text; alter table broadcast alter column msg_template3 type text;
<filename>queries/08_intervenciones_por_trimestre.sql<gh_stars>0 -- Intervenciones por trimestre SELECT date_part('year', w.fini) AS "ANO", CASE WHEN date_part('quarter', w.fini)=1 THEN '1 Trimestre' WHEN date_part('quarter', w.fini)=2 THEN '2 Trimestre' WHEN date_part('quarter', w.fini)=3 THEN '3 Trimest...
/****************************************************************** New tables ******************************************************************/ CREATE SCHEMA IF NOT EXISTS admin_records; COMMIT; DROP TABLE IF EXISTS admin_records.record; CREATE TABLE admin_records.record ( id BIGINT NOT NULL IDENTI...
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Jan 24, 2021 at 10:52 AM -- Server version: 5.7.23 -- PHP Version: 7.2.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
<filename>database/orders.sql<gh_stars>0 /* Navicat Premium Data Transfer Source Server : Localhost Mysql Source Server Type : MySQL Source Server Version : 100137 Source Host : 127.0.0.1:3306 Source Schema : inventory Target Server Type : MySQL Target Server Version : 100137 ...
INSERT INTO department (name) VALUES ("Accounting"), ("Customer Support"), ("Data"), ("Design"), ("Engineering"), ("Human Resources"), ("IT"), ("Marketing"), ("People"), ("Product"), ("Research and Development"), ("Sales"); INSERT INTO role (...
<filename>Snakes and Ladder/Procedure 25. Terminating A Game.sql USE SnakesAndLadder; drop procedure if exists TerminatingAGame; DELIMITER // CREATE PROCEDURE TerminatingAGame(pGameID int, pUsername varchar(50)) BEGIN declare statusGame varchar (50); declare playerScore int; START TRANSACTION; SELECT StatusOfGame ...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 20, 2022 at 03:04 AM -- Server version: 10.4.22-MariaDB -- PHP Version: 8.0.13 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARAC...
<reponame>fpolica91/nest_prisma_grapqhl -- CreateTable CREATE TABLE "Recipe" ( "id" TEXT NOT NULL, "title" TEXT NOT NULL, "description" TEXT, "creationDate" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "ingredients" TEXT[], CONSTRAINT "Recipe_pkey" PRIMARY KEY ("id") );
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Sep 16, 2020 at 08:18 PM -- Server version: 10.1.36-MariaDB -- PHP Version: 5.6.38 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
drop table if exists pet_owners; drop table if exists owners; drop table if exists pets; drop table if exists pet_types; create table pet_types ( id serial primary key, type varchar(50) not null unique ); create table pets ( id serial primary key, name varchar(50) not null, pet_type_id integer not null, a...
create database estudo_av_2; use estudo_av_2; create table inicio( nome varchar(20), sobrenome varchar(40) ); insert into inicio values ('Alessandro', 'Maciel'), ('Marcio', 'Araújo'), ('Frederico', 'Westphallen'); select * from inicio; start transaction; update inicio set nome = 'Alessandrinho' where nome = 'Alessa...
ALTER TABLE IF EXISTS jto_cards DROP COLUMN user_id; DROP TABLE IF EXISTS jto_users;
/* Navicat MySQL Data Transfer Source Server : j2ee_student Source Server Type : MySQL Source Server Version : 50562 Source Host : 192.168.127.12:3306 Source Schema : j2ee_student Target Server Type : MySQL Target Server Version : 50562 File Encoding : 65001 Date: 20...
-- application CREATE TYPE public.application_outcome AS ENUM ( 'PENDING', 'APPROVED', 'REJECTED', 'EXPIRED', 'WITHDRAWN' ); CREATE TABLE public.application ( id serial PRIMARY KEY, template_id integer REFERENCES public.template (id) ON DELETE CASCADE NOT NULL, user_id integer REFERENCE...
<reponame>webiness/webiness_inventory<filename>schema_sqlite.sql CREATE TABLE IF NOT EXISTS company ( id INTEGER PRIMARY KEY AUTOINCREMENT, company_name VARCHAR(128) NOT NULL, logo VARCHAR(256), id_number VARCHAR(13), tax_number VARCHAR(13), iban VARCHAR(34), address1 VARCHAR(80), addres...
INSERT INTO REHABILITATION_PROVIDERS (PROVIDER_CODE,DESCRIPTION,PROVIDER_TYPE,ACTIVE_FLAG) VALUES ('C01','CPA01 Northumbria','CPA','Y');
-- depends_on: {{ ref('stores_proc') }} {% set stores = get_column_values(table=ref('stores_proc'), column='store_name', max_records=50, filter_column='platform', filter_value='Shopify') %} {% if stores != [] %} with customers as ( {% for store in stores %} SELECT '{{store}}' store_name, 'Shopify' as lookup_pl...
<reponame>Shuttl-Tech/antlr_psql -- file:plpgsql.sql ln:4626 expect:true CREATE FUNCTION transition_table_level2_ri_child_insupd_func() RETURNS TRIGGER LANGUAGE plpgsql AS $$ BEGIN PERFORM FROM i LEFT JOIN transition_table_level1 p ON p.level1_no IS NOT NULL AND p.level1_no = i.parent_no W...
-- file:plpgsql.sql ln:2291 expect:true insert into conttesttbl(v) values(20)
<gh_stars>100-1000 # contigAcc.sql was originally generated by the autoSql program, which also # generated contigAcc.c and contigAcc.h. This creates the database representation of # an object which can be loaded and saved from RAM in a fairly # automatic way. #Map a contig to its accession. CREATE TABLE contigAcc (...
# cnpIafrate.sql was originally generated by the autoSql program, which also # generated cnpIafrate.c and cnpIafrate.h. This creates the database representation of # an object which can be loaded and saved from RAM in a fairly # automatic way. #CNP data from Iafrate lab CREATE TABLE cnpIafrate ( bin smallint no...
<filename>sql/schema/schema.sql CREATE EXTENSION IF NOT EXISTS pg_trgm; CREATE EXTENSION IF NOT EXISTS pgcrypto; DROP TABLE IF EXISTS bdb_beers; DROP TABLE IF EXISTS bdb_users; DROP TABLE IF EXISTS bdb_countries; DROP TABLE IF EXISTS bdb_types; DROP TABLE IF EXISTS bdb_breweries; CREATE TABLE bdb_users ( user_id BI...
<gh_stars>0 begin for with assets as (select l.f_ak_id, sum(f_al_amount) as f_amount from o_asset_line_active l where (l.f_as_expiry >= current_date) and (l.f_cu_id = :in_cu_id) group by l.f_ak_id) select assets.f_ak_id, coalesce(ak.f_ak_short, ' ' || ak.f_ak_descr) as ...
--- relations table DROP TYPE IF EXISTS reltype CASCADE; CREATE TYPE reltype AS ENUM ('river', 'canal', 'stream', 'boundary'); DROP TABLE IF EXISTS relations CASCADE; CREATE TABLE relations (osm_id BIGINT PRIMARY KEY, name VARCHAR NOT NULL, t reltype, sandre VARCHAR DEFAULT NULL); SELECT AddGeometryColumn('relations'...
<filename>lab4/lab3.sql<gh_stars>1-10 --5.1 select job_id, count(last_name) from EMPLOYEES group by job_id order by count(last_name) desc; --5.2 select manager_id, max(salary) from Employees where manager_id like '%' group by manager_id; --5.3 select job_id as "<NAME>", avg(salary) as "Srednia pensja" from Employees gr...
create table if not exists ts_user ( id int UNSIGNED primary key auto_increment not null, `user` varchar(20) not null, pwd varchar(50) not null, create_time datetime DEFAULT null, `status` SMALLINT(2) default '1' not null, vip SMALLINT(2) default '3' not null ) insert into ts_user select 1,'社会你雷哥',MD5('960426'),...
SELECT inv1.w_warehouse_sk ,inv1.i_item_sk ,inv1.d_moy ,inv1.mean ,inv2.w_warehouse_sk ,inv2.i_item_sk ,inv2.d_moy ,inv2.mean FROM ( SELECT w_warehouse_name ,w_warehouse_sk ,i_item_sk ,d_moy ,stdev ,mean FROM ( SELECT w_warehouse_name ,w_warehouse_sk ,i_item_sk ,d_moy ...
# --- !Ups CREATE TABLE `group_follow_statuses` (`group_id` BIGINT NOT NULL, `user_id` BIGINT NOT NULL); ALTER TABLE `group_follow_statuses` ADD PRIMARY KEY (`group_id`, `user_id`); ALTER TABLE `group_follow_statuses` ADD CONSTRAINT `group_follow_status_group_fk` FOREIGN KEY(`group_id`) REFERENCES `groups`(`id`) ON U...
<reponame>sm-ci/service-manager BEGIN; ALTER TABLE platforms ADD COLUMN active boolean NOT NULL DEFAULT '0'; ALTER TABLE platforms ADD COLUMN last_active TIMESTAMP NOT NULL DEFAULT '0001-01-01 00:00:00+00'; COMMIT;
<reponame>andreylipattsev/almanac.httparchive.org #standardSQL # Counts of websites using a certain privacy-related feature, # based on searching Document and Script bodies # (all those loaded on a page, regardless of the origin) WITH privacy_custom_metrics_data AS ( SELECT _TABLE_SUFFIX AS client, JSON_VAL...
<reponame>anmolnar/cloudbreak -- // DPAAS-301 save username to userprofile table -- Migration SQL that makes the change goes here. ALTER TABLE userprofile ADD COLUMN username text; -- //@UNDO -- SQL to undo the change goes here. ALTER TABLE userprofile DROP COLUMN username;
<filename>src/test/tinc/tincrepo/dml/functional/sql/joins_heap_update_17.sql -- @author prabhd -- @created 2012-12-05 12:00:00 -- @modified 2012-12-05 12:00:00 -- @tags dml -- @db_name dmldb -- @gpopt 1.532 -- @execute_all_plans True -- @description update_test17: Negative test - Update with sub-query returning mor...
<gh_stars>0 update tb_ordem_servico set no_fiscal_tecnico = '<NAME>', no_fiscal_requisitante = '<NAME>', no_gestor_contrato = '<NAME>', no_preposto = '<NAME>', dt_recepcao = '2016-10-14 08:00:00', dt_emissao = '2016-10-14 08:00:00', dt_prazo = '2016-10-31 18:00:00' where nu_ordem_servico...
/* Copyright (c) 2019 Qualcomm Technologies, Inc. All Rights Reserved. Confidential and Proprietary - Qualcomm Technologies, Inc. */ BEGIN TRANSACTION; INSERT OR REPLACE INTO qcril_properties_table (property, value) VALUES ('qcrildb_version', 5); DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '40...
--6. Write a SQL query to find the salary of each employee. USE TelerikAcademy SELECT FirstName+' '+LastName AS Name, Salary FROM Employees
INSERT INTO users (name, email, week_start, validated) VALUES ('user', 'createEntry_UserHasNoPermission', 1, false);
<gh_stars>0 CREATE PROCEDURE [dspUtil].[Audit_Warning] @ProcId AS INT, @Message AS TSTRING, @Param0 AS TSTRING = '<notset>', @Param1 AS TSTRING = '<notset>', @Param2 AS TSTRING = '<notset>' AS BEGIN -- Format Message EXEC dspUtil.LogWarn @ProcId = @ProcId, @Message = @Message, @Param0 = @Param0, @Param1 = @Para...
-- Flask To-Do Database Schema -- -- This file will drop and recreate all tables necessary for -- the application and can be run with the `flask init-db` -- command in your terminal. -- Drop existing tables DROP TABLE IF EXISTS schedule; -- Add query to drop users table here -- Add query to create users table here -...
<filename>src/main/resources/sql/data-h2.sql insert into tb_member(id, email, username, password, created_date) values (1, '<EMAIL>', '개발자1', '{bcrypt}$2a$10$vaolUpzOifC0RHrvDsGcv.ngExKo9AbczjivfiizFAjT9r208dBN.', current_timestamp); insert into tb_member(id, email, username, password, created_date) values (2, '<EMAIL>...
<filename>dbutil/SqlScripts/threecitysearch.sql CREATE DEFINER=`admin`@`%` PROCEDURE `threeCityFlight`(city1 VARCHAR(3), city2 VARCHAR(3), city3 VARCHAR(3), city4 VARCHAR(3), city5 VARCHAR(3), date1 VARCHAR(10), date2 VARCHAR(10), date3 VARCHAR(10), date4 VARCHAR(10)) BEGIN select * FROM ( (select (f1.price + ...
<filename>fx_yhq.sql -- FUNCTION: public.fx_yhq(date, character varying) -- DROP FUNCTION public.fx_yhq(date, character varying); CREATE OR REPLACE FUNCTION public.fx_yhq( dt_arg date, param character varying) RETURNS character varying LANGUAGE 'plpgsql' COST 100 VOLATILE PARALLEL UNSAFE AS $BODY$ d...
<filename>SQL/3. Aggregation/5. Japan Population.sql SELECT SUM(POPULATION) FROM CITY WHERE COUNTRYCODE = 'JPN'; /* Query the sum of the populations for all Japanese cities in CITY. The COUNTRYCODE for Japan is JPN. */
<filename>hasura/migrations/default/1619087026251_eval_period_current/up.sql<gh_stars>0 CREATE OR REPLACE VIEW eval_period_current AS SELECT id FROM eval_period WHERE "start" <= current_date and current_date <= "end";
<filename>Customer (1).sql<gh_stars>0 -- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Apr 19, 2021 at 03:49 PM -- Server version: 10.4.16-MariaDB -- PHP Version: 7.4.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; ...
<reponame>cliffordcarnmo/generic-db-template CREATE TABLE IF NOT EXISTS contracts( id CHAR(36) CHARACTER SET utf8 COLLATE utf8_swedish_ci NOT NULL, name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_swedish_ci NOT NULL, price INT(10) UNSIGNED NOT NULL, expires DATETIME NULL DEFAULT NULL, PRIMARY KEY(id) ) ENGINE = ...
-- phpMyAdmin SQL Dump -- version 4.2.11 -- http://www.phpmyadmin.net -- -- Servidor: localhost -- Tiempo de generación: 22-04-2015 a las 23:56:58 -- Versión del servidor: 5.6.21 -- Versión de PHP: 5.6.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARAC...
CREATE TABLE klanten.dbo.TblInvoiceline ( Id int NOT NULL IDENTITY(1,1), OrderId int DEFAULT (NULL), InvoiceId int DEFAULT (NULL), VatRateId int DEFAULT (NULL), Currency VARCHAR(3), Amount float DEFAULT ((0)), SequenceNumber int DEFAULT ((0)), Description VARCHAR(8000) ) CREATE INDEX TblInvoiceline$Amou...