sql
stringlengths
6
1.05M
<reponame>chirkin/pgwt -- -- pgwt.http_error() -- -------------------------------------------------------------------------------- CREATE OR REPLACE FUNCTION pgwt.http_error( a_status int, a_msg text, a_raw_error boolean DEFAULT false ) RETURNS boolean LANGUAGE plpgsql AS $$ -- -- Generate http error -- BEGIN ...
<filename>src/test/resources/cast.test_2.sql<gh_stars>100-1000 -- cast.test -- -- execsql {SELECT typeof(x'616263')} SELECT typeof(x'616263')
<reponame>flexsocialbox/una -- MENUS DELETE FROM `sys_menu_items` WHERE `set_name`='bx_photos_view_actions' AND `name` IN ('reaction', 'social-sharing-googleplus'); INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `subm...
<reponame>weltam/airbyte create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION" as ( -- Final base SQL model select _AIRBYTE_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_HASHID, DOUBLE_ARRAY_...
<gh_stars>0 with source as( select * from "azadwh"."Aza_ods_Version1"."dim_client" ) select * from source
(ColName text , pattern character default 'x', prefix integer default 0, Suffix integer default 0) RETURNS text AS $$ DECLARE strlength integer; BEGIN strlength:=length(ColName); IF prefix>0 then return substring(ColName FROM 1 FOR prefix ) ||regexp_replace(substring(ColName FROM prefix+1 ...
<filename>database/scripts/mysql/archive/upgradeMysql5_0_marketplaceTo5_0_aml.sql -- ********************************************************************* -- Update Database Script -- ********************************************************************* -- Change Log: changelog_master.groovy -- Ran at: 10/10/12 1:30 PM...
IF NOT EXISTS (SELECT * FROM sys.schemas WHERE name = N'tracked_deletes_samplestudenttranscript') EXEC sys.sp_executesql N'CREATE SCHEMA [tracked_deletes_samplestudenttranscript]' GO
SELECT tab3.v0 AS v0 , tab2.v3 AS v3 , tab1.v2 AS v2 FROM (SELECT sub AS v0 FROM sorg__nationality$$4$$ WHERE obj = 'wsdbm:Country1' ) tab3 JOIN (SELECT sub AS v0 FROM foaf__age$$1$$ WHERE obj = 'wsdbm:AgeGroup6' ) tab0 ON(tab3.v0=tab0.v0) JOIN (SELECT obj AS v0 , sub AS v3 FROM mo__art...
<gh_stars>100-1000 with data as ( select * from {{ ref('data_dateadd') }} ) select case when datepart = 'hour' then cast({{ dbt_utils.dateadd('hour', 'interval_length', 'from_time') }} as {{dbt_utils.type_timestamp()}}) when datepart = 'day' then cast({{ dbt_utils.dateadd('day', 'interval_le...
<reponame>erkkah/letarette -- Copyright 2020 <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 applicab...
<gh_stars>1000+ SET cast_keep_nullable = 0; -- https://github.com/ClickHouse/ClickHouse/issues/5818#issuecomment-619628445 SELECT CAST(CAST(NULL AS Nullable(String)) AS Nullable(Enum8('Hello' = 1))); SELECT CAST(CAST(NULL AS Nullable(FixedString(1))) AS Nullable(Enum8('Hello' = 1))); -- empty string still not accepta...
<filename>omdb.sql \i 00-drop-tables.sql \i 10-country_codes.sql \i 11-iso639.sql \i 12-kind.sql \i 13-schema.sql \i 20-import.sql \i 30-duplicates.sql VACUUM; \i 31-primary-keys.sql \i 40-clean-orphans.sql VACUUM; \i 41-foreign-keys.sql ANALYZE; \i 50-views.sql \i 52-category-en.sql \i 55-purge_dirty.sql \i 60-log.sql...
<filename>db/bisnet.sql -- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 25, 2021 at 07:42 AM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.3.21 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+08:00"; /*!40101 SET...
use pizza; INSERT INTO user VALUES (1,'D','D','D','1','D',1);
-- +micrate Up -- SQL in section 'Up' is executed when this migration is applied create TABLE monitors( id INTEGER NOT NULL PRIMARY KEY, name VARCHAR(255) NOT NULL, type VARCHAR(255) NOT NULL, update_interval FLOAT, domain VARCHAR(255), game VARCHAR(255), key VARCHAR(255), save_reports INT, max_repor...
<filename>sample_data/Sensor_reading.sql create table Sensor_reading ( timestamp VARCHAR(50), station_id VARCHAR(50), sensor_reading INT, App_version VARCHAR(4) ); insert into Sensor_reading (timestamp, station_id, sensor_reading, App_version) values ('9:48:35.000', '72:ec:02:38:54:54', 76, '0.2b'); insert into Sen...
CREATE TABLE `myblogdb`.`articles` ( `id` INT NOT NULL AUTO_INCREMENT, `title` VARCHAR(45) NULL, `description` TEXT NULL, `status` INT NULL, `created_at` DATETIME NULL, `updated_at` TIMESTAMP NULL, PRIMARY KEY (`id`));
.load dist/spellfix CREATE VIRTUAL TABLE tri USING fts5(a, tokenize="trigram"); INSERT INTO tri VALUES('abcdefghij KLMNOPQRST uvwxyz'); -- The following queries all match the single row in the table SELECT * FROM tri('cdefg'); [{"a":"abcdefghij KLMNOPQRST uvwxyz"}] SELECT * FROM tri('cdefg AND pqr'); [{"a":"abcdefgh...
<reponame>rwcoding/rwup -- -------------------------------------------------------- -- 主机: localhost -- 服务器版本: 10.4.7-MariaDB - mariadb.org binary distribution -- 服务器操作系统: Win64 -- HeidiSQL 版本: 11.3.0.6295 -- ------------------------...
<reponame>averyduffin/TextingJournalAPI CREATE TABLE textingjournal.`questionfrequency` ( `id` int(11) NOT NULL AUTO_INCREMENT, `type` varchar(240), PRIMARY KEY (`id`) ) CREATE TABLE textingjournal.`users` ( `id` int(11) NOT NULL AUTO_INCREMENT, `fullname` varchar(240), `emailaddress` varchar(240), `username` va...
<reponame>Pamelapxaylink/postgresql-course CREATE DATABASE wishlists;
<reponame>AlD/bareos<gh_stars>1-10 BEGIN; -- Necessary for Bareos core CREATE TABLE Quota ( ClientId INTEGER NOT NULL, GraceTime BIGINT DEFAULT 0, QuotaLimit BIGINT DEFAULT 0, PRIMARY KEY (ClientId) ); CREATE TABLE NDMPLevelMap ( ClientId INTEGER ...
USE [VipunenTK] GO /****** Object: View [dbo].[v_f_tab_indikaattorit_kk_aloitusika] Script Date: 29.12.2021 18:57:49 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER VIEW [dbo].[v_f_tab_indikaattorit_kk_aloitusika] AS Select f.tilastointivuosi as [Tilastovuosi] ,d2.aidinkieli_versio1 as Äidin...
DO $body$ BEGIN IF NOT EXISTS (SELECT * FROM pg_catalog.pg_user WHERE usename = 'deploy') THEN CREATE ROLE deploy LOGIN PASSWORD '<PASSWORD>'; ALTER ROLE deploy WITH SUPERUSER; END IF; END $body$; DROP DATABASE IF EXISTS deploy; CREATE DATABASE deploy;
CREATE TABLE `auth_log` ( `user_id` int(11) UNSIGNED NOT NULL DEFAULT 0, `application_version` text COLLATE utf8mb4_unicode_ci NOT NULL, `client_version` text COLLATE utf8mb4_unicode_ci NOT NULL, `ip` text COLLATE utf8mb4_unicode_ci NOT NULL, `device_info` text COLLATE utf8mb4_unicode_ci NOT NULL, `date` ti...
docker run --name kasperin-mysql -p 3306:3306 -e MYSQL_ALLOW_EMPTY_PASSWORD=yes -d mysql # connect to mysql and run as root user #Create Databases CREATE DATABASE kasperin_dev; CREATE DATABASE kasperin_prod; #Create database service accounts CREATE USER 'dev_user'@'localhost' IDENTIFIED BY 'kasperin' CREATE USER 'kas...
<filename>example/sql/b.sql CREATE TABLE b1 ( id int NOT NULL, val int NOT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB; CREATE TABLE b2 ( id int NOT NULL, val char(3) DEFAULT NULL COMMENT 'Can be null', FOREIGN KEY (id) REFERENCES a (id) ) ENGINE=InnoDB; CREATE TABLE b3 ( id int NOT NULL, val int NOT...
-- This query extracts: -- i) a patient's first code status -- ii) whether the patient ever had another code status DROP MATERIALIZED VIEW IF EXISTS ALINE_CODESTATUS; CREATE MATERIALIZED VIEW ALINE_CODESTATUS AS with t1 as ( select icustay_id, charttime -- coalesce the values , case when value = 'Ful...
/* +----------------+ |NETWORK POLICIES| +----------------+ This file contains the sql commands for creating the correct policies for network table. */ /* ADMIN POLICIES -------------- */ --Admin policy. Allow admins to access network freely CREATE POLICY admin_all_policy ON network FOR ALL TO admins USING (tru...
DROP TABLE IF EXISTS BRANDS; CREATE TABLE BRANDS(ID BIGINT PRIMARY KEY, NAME VARCHAR(50)); DROP TABLE IF EXISTS SUPPLIERS; CREATE TABLE SUPPLIERS(ID BIGINT PRIMARY KEY, NAME VARCHAR(50)); DROP TABLE IF EXISTS PRODUCT_TYPE; CREATE TABLE PRODUCT_TYPE(ID BIGINT PRIMARY KEY, NAME VARCHAR(50)); DROP TABLE IF EXISTS PROD...
<reponame>godcheese/oryx /* Navicat Premium Data Transfer Source Server : localhost Source Server Type : MySQL Source Server Version : 50724 Source Host : localhost:3306 Source Schema : oryx Target Server Type : MySQL Target Server Version : 50724 File Encoding : 65001...
CREATE TABLE helpmessage ( message_id BIGINT PRIMARY KEY, guild_id BIGINT NOT NULL, channel_id BIGINT NOT NULL, create_date TIMESTAMP NOT NULL )
-- SQL > Basic Select > Weather Observation Station 6 -- Query a list of CITY names beginning with vowels (a, e, i, o, u). -- -- https://www.hackerrank.com/challenges/weather-observation-station-6/problem -- challenge id: 9341 -- SET NULL "NULL"; SET FEEDBACK OFF; SET ECHO OFF; SET HEADING OFF; SET WRAP OFF; SET LINES...
INSERT INTO rxpb.rxpb_role (id, role_name, version, create_date, create_user, update_user) VALUES (1, 'admin', '2020-01-25 18:50:26', '2020-01-25 13:44:40', '0', '0'); INSERT INTO rxpb.rxpb_role (id, role_name, version, create_date, create_user, update_user) VALUES (2, 'judge', '2020-01-25 18:50:26', '2020-01-25 13:44:...
-- begin GESTIONACTIVIDADES_RESPONSABLE create unique index IDX_GESTIONACTIVIDADES_RESPONSABLE_UNIQ_DOC_ID on GESTIONACTIVIDADES_RESPONSABLE (DOC_ID) ^ -- end GESTIONACTIVIDADES_RESPONSABLE -- begin GESTIONACTIVIDADES_ALUMNO alter table GESTIONACTIVIDADES_ALUMNO add constraint FK_GESTIONACTIVIDADES_ALUMNO_RESPONSABLE_I...
<gh_stars>0 update template set template_file = '<#include "clinicalnotefunctions"> <#-- Template start --> ${MODULE_TITLE_START} Depression: ${MODULE_TITLE_END} ${MODULE_START} <#if (var1550.children)?? && (var1560.children)?? && (var1570.children)?? && (var1580.children)?? && (var1590.children)?? && ((var1550.c...
<filename>Database/schema.sql create table materia( id integer unsigned not null auto_increment, sigla varchar(10) unique, des varchar(128), primary key(id) ); create table estudiante( id integer unsigned not null auto_increment, nombre varchar(256), ci varchar(16), ru varchar(16), primary key(id) ); ...
create table metadata ( id bigint not null, entity_id bigint not null, name varchar(255) not null, string_value varchar(255), integer_value bigint, real_value double, boolean_value boolean, co...
-- replace babylon civ abilities (too extreme) with +1 science per pop in cities with unique watermill DELETE FROM TraitModifiers WHERE TraitType='TRAIT_CIVILIZATION_BABYLON'; INSERT INTO Modifiers (ModifierId, ModifierType) VALUES ('PALGUM_SCIENCE_PER_POPULATION_BBG', 'MODIFIER_SINGLE_CITY_ADJUST_CITY_YIELD_PER_PO...
IF OBJECT_ID('finance.get_income_tax_rate') IS NOT NULL DROP FUNCTION finance.get_income_tax_rate; GO CREATE FUNCTION finance.get_income_tax_rate(@office_id integer) RETURNS numeric(30, 6) AS BEGIN RETURN ( SELECT income_tax_rate FROM finance.tax_setups WHERE finance.tax_setups.office_id = @o...
/* Navicat Premium Data Transfer Source Server : MariaDB Source Server Type : MySQL Source Server Version : 100505 Source Host : localhost:3306 Source Schema : start Target Server Type : MySQL Target Server Version : 100505 File Encoding : 65001 Date: 05/08/2021 10:2...
-- 22295 replicates from 22294 UPDATE mysql_database_instance SET slave_io_running=0, last_io_error='error connecting to master' where di_port in (select port from ham_database_instance where upstream_port=22294); UPDATE ham_database_instance SET last_seen_timestamp=last_checked_timestamp - interval 1 minute where port...
<reponame>SKalt/pg_sql_parser_tests<gh_stars>0 void BeginForeignModify(ModifyTableState *mtstate, ResultRelInfo *rinfo, List *fdw_private, int subplan_index, int eflags);
<gh_stars>1-10 CREATE TABLE `category` ( `id` int(10) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT COMMENT 'Уникальный идентификатор', `parent_id` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Родительская категория', `name` varchar(255) NOT NULL COMMENT 'Наименование категории', `content` varchar(255) DE...
<filename>tests/_data/dump.sql -- MySQL dump 10.15 Distrib 10.0.25-MariaDB, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: listmeh -- ------------------------------------------------------ -- Server version 10.0.25-MariaDB-1~trusty /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*...
-- @testpoint: 需要创建触发器的表名称不存在(检查报错的合理性检查),合理报错 --创建触发器函数 CREATE OR REPLACE FUNCTION tri_insert_func01() RETURNS TRIGGER AS $$ DECLARE BEGIN INSERT INTO test_trigger_des_tbl0 VALUES(NEW.id1, NEW.id2, NEW.id3); TRUNCATE TABLE test_trigger_des_tbl0; RETURN NEW; END $$ LANGUAGE PLPGSQL; / --创建触发器 CREATE TRIGGER insert...
DROP TABLE IF EXISTS `lng_tools`; CREATE TABLE `lng_tools` ( `id` bigint(10) NOT NULL AUTO_INCREMENT, `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `shortname` varchar(50) COLLATE utf8_unicode_ci NOT NULL, `status` tinyint DEFAULT 1 NOT NULL COMMENT '1=Active, 0=Inactive', `updated_by` varchar(255) CO...
CREATE TABLE [dbo].[Client] ( [Id] BIGINT NOT NULL PRIMARY KEY IDENTITY, [CreatedAt] DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, [UpdatedAt] DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, [Name] NVARCHAR(100) NOT NULL, [Cpf] VARCHAR(14) NOT NULL, [IsActive] BIT NOT NULL DEFAULT 1, CONSTRAINT UQ_Client_Cpf UN...
<filename>maven-common-utils/notification/src/main/resources/db/mysql/V0.5.0__NotificationScript.sql DROP TABLE IF EXISTS jq_generic_user_notification; CREATE TABLE jq_generic_user_notification ( notification_id varchar(50) NOT NULL, target_platform varchar(30) NULL, message_valid_from datetime NOT NULL, messag...
CREATE TABLE IF NOT EXISTS allow_scopes ( id int UNSIGNED NOT NULL AUTO_INCREMENT, user_id varchar(32) NOT NULL, client_id varchar(32) NOT NULL, scope varchar(128) NOT NULL, PRIMARY KEY (id), FOREIGN KEY (user_id) REFERENCES users(uid) ON DELETE CASCADE ON UPDATE CASCADE, FOREIGN KEY (client_id) REFERENCE...
<filename>1.sql INSERT INTO `users` (`id`, `username`, `firstname`, `lastname`, `email`, `password`, `created_at`, `updated_at`, `role`, `birth`, `userfile`) VALUES (25...
<reponame>philipsephton-qa/Philip_Sephton_Assessment_2<filename>Backend/Pokemon/target/classes/data.sql INSERT INTO `pokemon`(`poke_dex`,`name`,`type1`,`type2`,`attack`,`defence`,`speed`,`weakness1`,`weakness2`,`evolves`) VALUES(1, 'bulbasaur', 'grass', 'poison', 3, 3, 3, 'fire', 'ground', true);
<filename>BDDLaravel.sql -- phpMyAdmin SQL Dump -- version 4.6.6deb4 -- https://www.phpmyadmin.net/ -- -- Client : localhost:3306 -- Généré le : Ven 08 Décembre 2017 à 16:33 -- Version du serveur : 10.2.9-MariaDB-10.2.9+maria~zesty -- Version de PHP : 7.0.22-0ubuntu0.17.04.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";...
/* * Falls eine Mutation noch nicht vorhanden ist, wird dieses INSERTed. Falls * die Mutation bereits in der Tabelle vorhanden ist (Datasetname + Grundstücksart) * wird nur das Delta UPDATEd. * Das Delta ist die Differenz in Tagen zwischen der Vollzugsmeldung (Eintrag ins Grundbuch) * und dem Eintrag des Datums in...
-- auto Generated on 2019-11-24 20:00:22 -- DROP TABLE IF EXISTS `virtual_coin_transaction_record`; CREATE TABLE virtual_coin_transaction_record ( `id` INTEGER(20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'id', `operator_id` INTEGER(20) NOT NULL COMMENT '用户ID', `e...
<filename>Basi-di-dati/25 novembre 2008/es1.6.sql<gh_stars>1-10 set search_path to "25 novembre 2008"; CREATE OR REPLACE VIEW maxincassiperprod as ( SELECT vendite.codiceprod, max(vendite.incasso) AS maxincasso FROM vendite GROUP BY vendite.codiceprod); select v.datavend, MaxIncasso from vendite v join maxI...
DROP TABLE "contactcenter"."affiliate_payout_settings";
<reponame>rudolf8/oxar<gh_stars>10-100 -- From: https://docs.oracle.com/cd/E59726_01/install.50/e39144/listener.htm#HTMIG29162 -- With some modifications to handle multiple APEX version numbers declare acl_path varchar2(4000); l_apex_username all_users.username%type; begin if upper(user) != 'SYS' then raise...
DROP TABLE IF EXISTS server_tags CASCADE; DROP TABLE IF EXISTS socials CASCADE; DROP TABLE IF EXISTS requests CASCADE; DROP TABLE IF EXISTS friends CASCADE; DROP TABLE IF EXISTS views CASCADE; DROP TABLE IF EXISTS messages CASCADE; DROP TABLE IF EXISTS participants CASCADE; DROP TABLE IF EXISTS dms CASCADE; DROP TABLE ...
-- Created by Vertabelo (http://vertabelo.com) -- Last modification date: 2022-02-06 22:25:05.161 -- tables -- Table: endereco CREATE TABLE endereco ( id int NOT NULL AUTO_INCREMENT, rua varchar(50) NOT NULL, numero int NOT NULL, cep int NOT NULL, complemento varchar(100) NOT NULL, usuarios_id ...
<gh_stars>1-10 CREATE TABLE product_catalog_image_settings ( ) ENGINE = Log
CREATE EXTERNAL TABLE [fhir].[SubstanceProtein] ( [resourceType] NVARCHAR(4000), [id] VARCHAR(64), [meta.id] NVARCHAR(4000), [meta.extension] NVARCHAR(MAX), [meta.versionId] VARCHAR(64), [meta.lastUpdated] VARCHAR(30), [meta.source] VARCHAR(256), [meta.profile] VARCHAR(MAX), [meta.se...
-- phpMyAdmin SQL Dump -- version 4.9.4 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Apr 09, 2021 at 10:41 AM -- Server version: 5.6.49-cll-lve -- PHP Version: 7.3.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET ...
<filename>src/sed/libs/seiscomp3/datamodel/strongmotion/share/postgres.sql DROP TABLE FilterParameter; DROP TABLE SimpleFilter; DROP TABLE SimpleFilterChainMember; DROP TABLE PeakMotion; DROP TABLE Record; DROP TABLE EventRecordReference; DROP TABLE Rupture; DROP TABLE StrongOriginDescription; INSERT INTO Object(_oid)...
<gh_stars>0 CREATE OR REPLACE VIEW DVM_PTA_ERRORS_V AS SELECT DVM_PTA_ERRORS.PTA_ERROR_ID, DVM_PTA_ERRORS.CREATE_DATE, TO_CHAR(DVM_PTA_ERRORS.CREATE_DATE, 'MM/DD/YYYY HH24:MI') FORMATTED_CREATE_DATE, DVM_PTA_ERRORS.LAST_EVAL_DATE, TO_CHAR(DVM_PTA_ERRORS.LAST_EVAL_DATE, 'MM/DD/YYYY HH24:MI') FORMATTED_LAST_EVA...
<reponame>nome-gruppo/lice-mybatis-3.5.0 -- -- Copyright 2009-2020 the original author or authors. -- -- 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.apach...
<filename>Study/Table/t_user.sql /* Navicat Premium Data Transfer Source Server : MySQL Source Server Type : MySQL Source Server Version : 80022 Source Host : localhost:3306 Source Schema : book Target Server Type : MySQL Target Server Version : 80022 File Encoding : 6...
PRAGMA journal_mode = PERSIST; DROP TABLE IF EXISTS "LocationApp"; CREATE TABLE LocationApp( package VARCHAR(64) PRIMARY KEY, icon VARCHAR(256), app_id INTEGER, installed_date INTEGER, recently_used INTEGER, enable BOOL ); INSERT INTO "LocationApp" (package, app_id, installed_date, recently_used, enable) V...
/* SQLyog Ultimate v11.33 (64 bit) MySQL - 10.3.16-MariaDB : Database - pruebatecnica ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOR...
<gh_stars>0 select c3 from (select * from dfs.drillTestDir.`parquet_storage/DRILL_6118/DRILL_6118_complex.parquet`) t where t.c1.values_list[3]=15;
-- -- PostgreSQL database dump -- -- Dumped from database version 10.10 (Ubuntu 10.10-0ubuntu0.18.04.1) -- Dumped by pg_dump version 10.10 (Ubuntu 10.10-0ubuntu0.18.04.1) SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming...
-- system_patches INSERT INTO `system_patches` (`issue`, `created`) VALUES ('POCOR-3995', NOW()); -- education_grades_subjects RENAME TABLE `education_grades_subjects` TO `z_3995_education_grades_subjects`; DROP TABLE IF EXISTS `education_grades_subjects`; CREATE TABLE IF NOT EXISTS `education_grades_subjects` ( ...
-- Tags: long drop table if exists data_01513; create table data_01513 (key String) engine=MergeTree() order by key; -- 10e3 groups, 1e3 keys each insert into data_01513 select number%10e3 from numbers(2e6); -- reduce number of parts to 1 optimize table data_01513 final; -- this is enough to trigger non-reusable Chun...
/****** Object: UserDefinedFunction [dbo].[MakePackageFolderName] ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE FUNCTION dbo.MakePackageFolderName /**************************************************** ** ** Desc: Generates a package folder name given an ID and package name ** ** Return v...
set enable_incremental to off; set max_parallel_workers_per_gather to 0; set work_mem to 1000000; set enable_nestloop to on; set enable_mergejoin to on; select p_brand, p_type, p_size, count(distinct ps_suppkey) as supplier_cnt -- count(ps_suppkey) as supplier_cnt from partsupp, part where p_p...
<reponame>MikeBishop/almanac.httparchive.org #standardSQL # Percent of pages using Performance observer SELECT client, num_urls AS pages_with_performance_observer, total_urls AS total_pages, pct_urls AS pct_pages_with_performance_observer FROM `httparchive.blink_features.usage` WHERE yyyymmdd = '20200801...
-- -- Copyright 2020 The Android Open Source Project -- -- 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 -- -- https://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applica...
<filename>upgrades/dbpatches/2.0/mysql/patch.sql ALTER TABLE acknowledges MODIFY acknowledgeid bigint unsigned NOT NULL, MODIFY userid bigint unsigned NOT NULL, MODIFY eventid bigint unsigned NOT NULL; DELETE FROM acknowledges WHERE NOT userid IN (SELECT userid FROM users); DELETE FROM acknowledges WHERE NOT ev...
<reponame>phamducdat/My_Project CREATE TABLE status_type ( status_type_id VARCHAR(60) NOT NULL, parent_type_id VARCHAR(60), description TEXT, last_updated_stamp TIMESTAMP , created_stamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP, CONSTRAINT pk_status_type PRIMARY KEY (status_type_id), CONS...
-- This SQL code was generated by sklearn2sql (development version). -- Copyright 2018 -- Model : CaretRegressor_svmPoly -- Dataset : RandomReg_100 -- Database : db2 -- This SQL code can contain one or more statements, to be executed in the order they appear in this file. -- Model deployment code WITH kernel_inp...
<filename>sql/_13_issues/_14_1h/cases/bug_bts_12625.sql<gh_stars>1-10 --+ holdcas on; drop table if exists sgby; create class sgby (m int, n int); insert into sgby values (0, 0); insert into sgby values (1, 1); insert into sgby values (2, 2); insert into sgby values (3, 3); insert into sgby select m+4, n+4 from sgby;...
<reponame>JAPHETHNYARANGA/nyaranga-Forest-Service<gh_stars>0 CREATE DATABASE wildlife_tracker; \c wildlife_tracker; CREATE TABLE animals(id SERIAL PRIMARY KEY,name varchar, endangered boolean, age varchar); CREATE TABLE sightings(id SERIAL PRIMARY KEY, rangername varchar , location varchar, spotted timestamp, animalid ...
SELECT DISTINCT host FROM tenants_hosts
ALTER TABLE records DROP COLUMN change_date; ALTER TABLE domains ALTER notified_serial TYPE bigint USING CASE WHEN notified_serial >= 0 THEN notified_serial::bigint END;
<gh_stars>0 ALTER TABLE `event_sublocation` DROP PRIMARY KEY; ALTER TABLE `event_sublocation` DROP COLUMN `id`; ALTER TABLE `event_sublocation` DROP COLUMN `start_date`; ALTER TABLE `event_sublocation` DROP COLUMN `end_date`; ALTER TABLE `event_sublocation` ALTER COLUMN `event` long NOT NULL; ALTER ...
INSERT INTO History (WeatherStationId, Temperature, Dew, Precipitation, `Date`) VALUES ((SELECT Id FROM WeatherStations WHERE Title = 'Екатерино-Никольское'), 7.525, -8.85, 0, '2019-04-12'), ((SELECT Id FROM WeatherStations WHERE Title = 'Облучье'), 5.55, -7.3375, 0, '2019-04-12'), ((SELECT Id FROM WeatherStations WHER...
<gh_stars>0 -- schema.sql drop database if exists awesome; create database awesome; use awesome; grant select, insert, update, delete on awesome.* to 'www-data'@'localhost' identified by 'www-data'; create table users( `id` varchar(50) not null, `email` varchar(50) not null, `passwd` varchar(50) not null, `admin` ...
<filename>3740 CPS/final_project/query.sql -- SET OPERATOR QUERY -- 1. Show all characters inclduing archons in Genshin Impact SELECT character_name FROM final_project.character UNION SELECT archon_name FROM final_project.archon; -- 2. Show all characters having Cryo Vision and are from Inadzuma -- MySQL does not su...
CREATE OR REPLACE TABLE customer ( id BIGINT PRIMARY KEY AUTO_INCREMENT, name VARCHAR(255) NOT NULL, email VARCHAR(255), created_date DATETIME NOT NULL DEFAULT NOW() ); CREATE OR REPLACE TABLE profile ( customer_id BIGINT NOT NULL, street_number VARCHAR(255) NOT NULL, street_name VARCHAR(25...
<filename>database/db_turnamen.sql -- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 02, 2022 at 09:44 AM -- Server version: 10.4.13-MariaDB -- PHP Version: 7.3.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /...
SELECT count(*) as count, ai_queries.query, avg(exec_time) as exec_time FROM ai_queries LEFT JOIN ai_intents ON (ai_intents.id = ai_queries.ai_intent_id) GROUP BY ai_queries.query, ai_queries.ai_intent_id ORDER BY count DESC LIMIT 10
Insert into EG_ACTION (ID,NAME,URL,QUERYPARAMS,PARENTMODULE,ORDERNUMBER,DISPLAYNAME,ENABLED,CONTEXTROOT,VERSION,CREATEDBY,CREATEDDATE,LASTMODIFIEDBY,LASTMODIFIEDDATE,APPLICATION) values (NEXTVAL('SEQ_EG_ACTION'),'WorksAbstractEstimateEdit','/estimate/abstractEstimate-edit.action',null,(select id from EG_MODULE where na...
<gh_stars>1-10 CREATE TABLE `bruteforce_check` ( `id` int(11) NOT NULL AUTO_INCREMENT, `time` int(11) NOT NULL, `ip` varchar(255) NOT NULL, PRIMARY KEY (`id`), KEY `time` (`time`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; CREATE TABLE `codes` ( `id` int(11) NOT NULL AUTO_INCREMENT, `code` varchar(128) NOT NULL, ...
-- ################################################################################ -- -- New Zealand Geographic Board gazetteer application, -- Crown copyright (c) 2020, Land Information New Zealand on behalf of -- the New Zealand Government. -- -- This file is released under the MIT licence. See the LICENCE file ...
<filename>answers/leetcode/Swap Salary/Swap Salary.sql # Write your MySQL query statement below UPDATE salary SET sex = CASE sex WHEN 'm' THEN 'f' ELSE 'm' END;
--- This file has been generated by scripts/build_db.py. DO NOT EDIT ! INSERT INTO "projected_crs" VALUES('EPSG','2000','Anguilla 1957 / British West Indies Grid',NULL,NULL,'EPSG','4400','EPSG','4600','EPSG','19942','EPSG','3214',NULL,0); INSERT INTO "projected_crs" VALUES('EPSG','2001','Antigua 1943 / British West In...
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 24, 2019 at 07:23 AM -- Server version: 10.1.36-MariaDB -- 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 @OL...
<reponame>obi-two/GameServer<gh_stars>10-100 -- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server version: 5.1.63-community - MySQL Community Server (GPL) -- Server OS: Win64 -- HeidiSQL version: 7.0.0.4053 -- Date/...
GET DIAGNOSTICS CONDITION 1 @test = CLASS_ORIGIN;