text
stringlengths
1
1.05M
-- +migrate Up -- CoreRoller schema alter database coreroller set timezone = 'utc'; create extension if not exists "uuid-ossp"; create table team ( id uuid primary key default uuid_generate_v4(), name varchar(25) not null check (name <> '') unique, created_ts timestamptz default current_timestamp not null ); cr...
-- ============================================= -- Author: Ken Taylor -- Create date: September 19, 2013 -- Description: Populate the [dbo].[OwnerInfo] table for all linked servers from the campus data warehouse. -- Usage: /* USE [DBA] GO DECLARE @return_value int EXEC [dbo].[usp_LoadDbaOwnerInfo] @IsDe...
--test time_format function with TIME(L)TZ columns, with ko_KR language --+ holdcas on; set system parameters 'intl_date_lang=ko_KR'; set names euckr; drop table if exists tz_test; create table tz_test(id int, ts time); set time zone 'America/Bahia'; insert into tz_test values(1, '22:30:45'); set time zone 'Africa/...
CREATE TABLE public."MyTestTable" ( c1 integer ); GRANT SELECT ON TABLE public."MyTestTable" TO test; GRANT SELECT (c1), UPDATE (c1) ON TABLE public."MyTestTable" TO test; CREATE VIEW public."MyTestView" AS SELECT 1; GRANT SELECT ON TABLE public."MyTestView" TO test;
/* Navicat Premium Data Transfer Source Server : MySQL Source Server Type : MySQL Source Server Version : 100125 Source Host : localhost:3306 Source Schema : prisma_pos Target Server Type : MySQL Target Server Version : 100125 File Encoding : 65001 Date: 07/09/2018 1...
-- AlterTable ALTER TABLE "questions" ADD COLUMN "space_id" INTEGER; -- AddForeignKey ALTER TABLE "questions" ADD CONSTRAINT "questions_space_id_fkey" FOREIGN KEY ("space_id") REFERENCES "spaces"("id") ON DELETE SET NULL ON UPDATE CASCADE;
DROP TABLE IF EXISTS citylocation; CREATE TABLE IF NOT EXISTS citylocation( id SERIAL PRIMARY KEY NOT NULL, c_name VARCHAR(256) NOT NULL UNIQUE, display_name VARCHAR(256) NOT NULL UNIQUE, lat VARCHAR(256) NOT NULL, lon VARCHAR(256) NOT NULL );
INSERT INTO burgers (burger_name) VALUES ('Deluxe Burger'); INSERT INTO burgers (burger_name) VALUES ('Bacon Cheeseburger'); INSERT INTO burgers (burger_name, devoured) VALUES ('Plain Burger', true); INSERT INTO burgers (burger_name, devoured) VALUES ('Veggie Burger', true); INSERT INTO burgers (burger_name, devoured) ...
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jun 29, 2018 at 02:35 PM -- Server version: 10.1.13-MariaDB -- PHP Version: 7.0.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
-- Licensed to the Apache Software Foundation (ASF) under one -- or more contributor license agreements. See the NOTICE file -- distributed with this work for additional information -- regarding copyright ownership. The ASF licenses this file -- to you under the Apache License, Version 2.0 (the -- "License"); you may...
USE [ANTERO] GO /****** Object: StoredProcedure [dw].[p_lataa_f_arvo_avop] Script Date: 5.1.2022 10:04:26 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dw].[p_lataa_f_arvo_avop] AS TRUNCATE TABLE dw.f_arvo_avop ;WITH CTE AS ( select distinct a.kyselykertaid ,a.vastaajaid ...
-- @testpoint: reltime负的时间间隔字符串与整数、浮点数相除 drop table if exists test_date01; create table test_date01 (col1 reltime); insert into test_date01 values ('-13 months -10 hours'); select col1 / double precision '1.5' from test_date01; select col1/2 from test_date01; drop table if exists test_date01;
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3310 -- Generation Time: May 04, 2021 at 12:39 PM -- Server version: 10.4.17-MariaDB -- PHP Version: 7.3.27 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET...
DROP MATERIALIZED VIEW IF EXISTS osm_island_point_planet; CREATE MATERIALIZED VIEW osm_island_point_planet AS ( SELECT osm_id * 10 AS osm_id, oip.geometry, name, 'island' AS class, 7 AS "rank" FROM osm_island_point oip, icgc_data.catalunya c WHERE ST_Disjoint(c.geometry, ol.geometry) ); ...
create table Weather46 ( country_id int null, weather_state varchar(255) null, day date null ); INSERT INTO leetcode_easy.Weather46 (country_id, weather_state, day) VALUES (2, '15', '2019-11-01'); INSERT INTO leetcode_easy.Weather46 (country_id, weather_state, day) VALUES (2, ...
CREATE TABLE webhooks ( `id` BIGINT NOT NULL AUTO_INCREMENT, `uuid` VARCHAR(255) NOT NULL UNIQUE, /* Timestamps */ `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP, `updated_at` TIMESTAMP NOT NULL DEFAULT NOW() ON UPDATE NOW(), PRIMARY KEY (id) ); CREATE TABLE webhook_script ( `id` BIGINT...
set search_path to data, rawdata, public; select sum(cnt) as sum, sum(cnt)::float/2250481.0 as pct, inclass from ( select name, cnt, string_agg(word, '|' order by seq) as words, string_agg(inclass, '|' order by seq) as inclass from ( select clean_placenames(l_placenam) as name, count(*) as cnt from r...
CREATE DATABASE IF NOT EXISTS todolist; USE todolist; DROP TABLE IF EXISTS `tasklist`; CREATE TABLE IF NOT EXISTS `tasklist` ( `timestamp` timestamp NOT NULL DEFAULT current_timestamp(), `tasks` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL, `checked` char(1) COLLATE utf8mb4_unicode_ci NOT NULL, PRIMARY KEY ...
UPDATE `sys_modules` SET `version` = '1.0.8' WHERE `uri` = 'desktop' AND `version` = '1.0.7';
-- [er]create a class and using column naming as '/' create class DML_0001 ( int/col1 integer, int_col2 integer ) ; drop class DML_0001;
# --- !Ups create table security_role ( id bigint not null, role_name varchar(255), constraint pk_security_role primary key (id)) ; create table users_security_role ( users_id bigint not null, security_role_id bigint not null, con...
SET search_path = pg_catalog; -- DEPCY: This VIEW depends on the COLUMN: public.t2.c3 DROP VIEW public.v8; -- DEPCY: This VIEW depends on the COLUMN: public.t2.c3 DROP VIEW public.v7; -- DEPCY: This VIEW depends on the COLUMN: public.t2.c3 DROP VIEW public.v6; -- DEPCY: This VIEW depends on the COLUMN: public.t2...
with prev as ( select distinct user_id from gha_pull_requests where merged = true and merged_at < '{{from}}' and (lower(dup_actor_login) {{exclude_bots}}) ), contributors as ( select distinct pr.user_id, first_value(pr.merged_at) over prs_by_merged_at as merged_at, first_value(pr.dup_rep...
ALETR TABLE contours DROP COLUMN id, application_id, password, name, description, services;
-- -- Licensed to the Apache Software Foundation (ASF) under one -- or more contributor license agreements. See the NOTICE file -- distributed with this work for additional information -- regarding copyright ownership. The ASF licenses this file -- to you under the Apache License, Version 2.0 (the -- "License"); you ...
# MySQL-Front 5.0 (Build 1.52) /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE */; /*!40101 SET SQL_MODE='NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES */; /*!40103 SET SQL_NOTES='ON' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS */; /*!40014 SET UNIQUE_CHECKS=0 */; /*!40014 SET...
-- This SQL code was generated by sklearn2sql (development version). -- Copyright 2018 -- Model : CaretClassifier_rpart_pca -- Dataset : BreastCancer -- Database : oracle -- This SQL code can contain one or more statements, to be executed in the order they appear in this file. -- Model deployment code WITH "ADS_...
with end_metric as ( select account_id, metric_time, metric_value as end_value from metric m inner join metric_name n on n.metric_name_id=m.metric_name_id and n.metric_name = '%metric2measure' and metric_time between '%from_yyyy-mm-dd' and '%to_yyyy-mm-dd' ), start_metric as ( select account_id, metric_time, metri...
/* Navicat Premium Data Transfer Source Server : local-mysql Source Server Type : MySQL Source Server Version : 100413 Source Host : localhost:3306 Source Schema : cobamajang Target Server Type : MySQL Target Server Version : 100413 File Encoding : 65001 Date: 27/12/...
CREATE PROCEDURE [TestBasic].[test If table dbo.Vessel has the correct columns] AS /* <documentation> <author>ABM040</author> <summary>test if dbo.Vessel has the correct columns</summary> <returns>nothing</returns> </documentation> Changes: Date Who Notes ---------- --- --------...
CREATE EXTERNAL TABLE [fhir].[SubstanceSourceMaterial] ( [resourceType] NVARCHAR(4000), [id] VARCHAR(64), [meta.id] NVARCHAR(100), [meta.extension] NVARCHAR(MAX), [meta.versionId] VARCHAR(64), [meta.lastUpdated] VARCHAR(64), [meta.source] VARCHAR(256), [meta.profile] VARCHAR(MAX), [m...
-- -- Test the LOCK statement -- -- Setup CREATE SCHEMA lock_schema1; SET search_path = lock_schema1; CREATE TABLE lock_tbl1 ( a bigint ); CREATE TABLE lock_tbl1a ( a bigint ); CREATE VIEW lock_view1 AS SELECT * FROM lock_tbl1; CREATE VIEW lock_view2 (a, b) AS SELECT * FROM lock_tbl1, ...
/****** Object: Synonym [dbo].[S_Experiment_List] ******/ CREATE SYNONYM [dbo].[S_Experiment_List] FOR [DMS5].[dbo].[T_Experiments] GO GRANT VIEW DEFINITION ON [dbo].[S_Experiment_List] TO [DDL_Viewer] AS [dbo] GO
USE FingerprintsDb GO -- drop foreign key constraint on fingerprints table IF EXISTS(SELECT * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS WHERE CONSTRAINT_NAME ='FK_Fingerprints_Tracks') BEGIN ALTER TABLE Fingerprints drop constraint FK_Fingerprints_Tracks END -- drop primary key constraint on fingerprin...
CREATE USER mystash WITH PASSWORD 'password' CREATEDB; CREATE DATABASE mystash OWNER mystash;
-- -- Tests for things that can have MySQLaaS compatibility issues -- -- Notes: -- Encryption requires this: -- INSTALL PLUGIN keyring_file SONAME 'keyring_file.so'; -- -- Accounts with restricted privileges -- DROP USER IF EXISTS testusr1@localhost; DROP USER IF EXISTS testusr2@localhost; DROP USER IF EXISTS test...
CREATE TABLE agency_client_declaration ( agency_representing_client Nullable(Int64), client_based_in_france Nullable(Int64), client_city Nullable(String), client_country_code Nullable(String), client_email_address Nullable(String), client_name Nullable(String), client_postal_code Nullable(String), clien...
create table TestTable ( "id" varchar(20), "groupName" varchar(255), "superGroupName" varchar(255), "value" varchar(255) ); insert into TestTable values ('1', 'group1', 'superGroup1', 'ABC'); insert into TestTable values ('2', 'group1', 'superGroup1', 'DEF'); insert into TestTable values ('3', 'group2', 'super...
DROP TABLE IF EXISTS csv_gold_issuances; CREATE TABLE csv_gold_issuances ( project_id text, gsid text, vintage integer, issuance_year integer, credit_status text, quantity bigint, project_name text, project_developer text, project_type text, product_type text, issuance_date ...
delete from user_role; delete from usr; delete from hibernate_sequence;
|No se provee información 0|No hay restriciones 1|Se aplican restricciones
-- @testpoint:opengauss关键字Buckets(保留),作为序列名 --关键字不带引号-合理报错 drop sequence if exists Buckets; create sequence Buckets start 100 cache 50; --关键字带双引号-成功 drop sequence if exists "Buckets"; create sequence "Buckets" start 100 cache 50; --清理环境 drop sequence "Buckets"; --关键字带单引号-合理报错 drop sequence if exists 'Buckets'; cr...
-- Copyright 2021 Google LLC -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in ...
-- CreateTable CREATE TABLE `User` ( `id` VARCHAR(191) NOT NULL, `email` VARCHAR(191) NOT NULL, `password` VARCHAR(191) NOT NULL, UNIQUE INDEX `User_email_key`(`email`), PRIMARY KEY (`id`) ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
/* 20-7-2017 */ ALTER TABLE `manage_static_pages` ADD `static_templates` VARCHAR(200) NOT NULL AFTER `meta_description`; /* 19-7-2017 */ ALTER TABLE `manage_static_pages` DROP `cat_id`, DROP `article_id`; /* 18-7-2017 */ ALTER TABLE `article_comment` CHANGE `created_dt` `create_dt` INT(11) NOT NULL; ALTER TABLE `...
SELECT id FROM {$wpdb->prefix}rg_form; SELECT name FROM $wpdb->pmpro_membership_levels WHERE id = %d LIMIT 1 SELECT object_id FROM {$wpdb->prefix}nf_objectmeta WHERE meta_key = 'affwp_allow_referrals'; SELECT * FROM {$wpdb->prefix}aff_affiliates ORDER BY affiliate_id LIMIT $offset, 100; SELECT meta_value FROM $wpdb->us...
#standardSQL -- Copyright 2017 The Nomulus Authors. All Rights Reserved. -- -- 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...
/* Copyright (C) 2015 IASA - Institute of Accelerating Systems and Applications (http://www.iasa.gr) 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...
-- Always start fresh drop table if exists buildings_final; -- Create a temporary table for buildings. We want to group all buildings with the -- same bldg_id and union their geometries since some buildings contain over 90 -- polygons. For more details, check out https://github.com/rosecitygis/osm-building-import/is...
{{ config( enabled=True ) }} {% set relation = api.Relation.create(schema='dbt', identifier='sat_order_details') %} select to_char(order_date, 'IYYY-IW') as week_of_year, status as status, count(*) as number_of_orders, max(effective_from), rank() over ( partition by to_char(order_da...
{{ config( indexes = [{'columns':['_airbyte_emitted_at'],'type':'hash'}], unique_key = '_airbyte_ab_id', schema = "_airbyte_test_normalization", tags = [ "nested-intermediate" ] ) }} -- SQL model to build a hash column based on the values of this record -- depends_on: {{ ref('unnest_alias_children_owner...
-- Copyright 2018 Tanel Poder. All rights reserved. More info at http://tanelpoder.com -- Licensed under the Apache License, Version 2.0. See LICENSE.txt for terms & conditions. prompt eXplain the execution plan for sqlid &1 child &2.... -- with ADAPTIVE included: -- select * from table(dbms_xplan.display_cursor('&1'...
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50725 Source Host : localhost:3306 Source Database : novel_plus Target Server Type : MYSQL Target Server Version : 50725 File Encoding : 65001 Date: 2020-05-18 13:59:04 */ SET FOREIGN_KEY_CHECKS=0; -...
-- boundary3.test -- -- db eval { -- SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r -- WHERE t2.a=1 -- ORDER BY t1.rowid DESC -- } SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r WHERE t2.a=1 ORDER BY t1.rowid DESC
SELECT COUNT(*) FROM site AS s, so_user AS u1, tag AS t1, tag_question AS tq1, question AS q1, badge AS b1, account AS acc WHERE s.site_id = u1.site_id AND s.site_id = b1.site_id AND s.site_id = t1.site_id AND s.site_id = tq1.site_id AND s.site_id = q1.site_id AND t1.id = tq1.tag...
ALTER TABLE setting_change ADD COLUMN proposer TEXT; ALTER TABLE setting_change ADD COLUMN rejector TEXT; CREATE OR REPLACE FUNCTION new_setting_change(_cat setting_change.cat%TYPE, _data setting_change.data%TYPE, _proposer setting_change.proposer%TYPE) RETURNS int AS $$ DECLARE _id setting_change.id%TYPE; B...
CREATE TABLE [car] ( [id] VARCHAR(255) NOT NULL, [make] VARCHAR(255) NOT NULL, [model] VARCHAR(255) NOT NULL, PRIMARY KEY ([id] ASC) ) ;
-- start query 1 in stream 0 using template query91.tpl and seed 1930872976 select cc_call_center_id Call_Center, cc_name Call_Center_Name, cc_manager Manager, sum(cr_net_loss) Returns_Loss from call_center, catalog_returns, date_dim, customer, c...
-- Query the two cities in STATION with the shortest and longest CITY names, -- as well as their respective lengths (i.e.: number of characters in the name). -- If there is more than one smallest or largest city, choose the one that comes first when ordered alphabetically. ( SELECT city AS shortest_le...
INSERT INTO public."Customer"( "CustomerID", "FirstName", "LastName", "Birthdate", "Gender", "CustomerLogin", "CustomerPassword") VALUES (1, 'PersonName', 'PersonLastName', '1990-01-01', 'Male', 'pperson', '****'); INSERT INTO public."HealthcareCenter"( "ID", "Name", "Address", "Latitude", "Longitude", "PostalCode"...
if OBJECT_ID('tempdb..#TableSize') is not null drop table #TableSize; create table #TableSize ( [name] varchar(255), [rows] bigint, reserved varchar(255), [data] varchar(255), index_size varchar(255), unused varchar(255)); if OBJECT_ID('tempdb..#ConvertedSizes') is not null drop table #Conver...
CREATE DATABASE IF NOT EXISTS `clinicdb` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `clinicdb`; -- MySQL dump 10.13 Distrib 5.5.16, for Win32 (x86) -- -- Host: 127.0.0.1 Database: clinicdb -- ------------------------------------------------------ -- Server version 5.5.32 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=...
create database things_dm; use things_dm; CREATE TABLE if not exists `product_info` ( `productID` varchar(20) NOT NULL COMMENT '产品id', `productName` varchar(100) NOT NULL COMMENT '产品名称', `productType` int(10) unsigned DEFAULT '0' COMMENT '产品状态:0:开发中,1:审核中,2:已发布', `authMode` int(10) unsig...
-- -- 数据库: `rp_ud_etl` -- CREATE DATABASE IF NOT EXISTS rp_ud_etl default charset utf8 COLLATE utf8_general_ci; USE rp_ud_etl; -- -- 表结构 `tbl_task_instance_info` -- CREATE TABLE IF NOT EXISTS `tbl_task_instance_info`( `id` int NOT NULL AUTO_INCREMENT, `stream_id` int ...
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Mar 02, 2022 at 04:08 PM -- Server version: 10.4.22-MariaDB -- PHP Version: 7.4.27 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
ALTER TABLE authors ALTER COLUMN first_name TO first_name_renameColumn_test
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 01, 2020 at 04:17 AM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.3.17 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
SET client_min_messages = warning; -- We need to eventually test this on a real subscriber SET search_path TO ''; CREATE SCHEMA bla; -- We test the subcommand feature with the other repset_table tests SELECT pgl_ddl_deploy.undeploy(id) FROM pgl_ddl_deploy.set_configs; WITH new_sets (set_name) AS ( VALUES ('test_d...
ALTER TABLE [dbo].[zlecenia] WITH CHECK ADD CONSTRAINT [FK_zlecenia_klienci] FOREIGN KEY([Klient]) REFERENCES [dbo].[klienci] ([ID_klienta])
/* Navicat Premium Data Transfer Source Server : mac_SQLServer2017 Source Server Type : SQL Server Source Server Version : 14003223 Source Host : 192.168.0.199:1433 Source Catalog : jeecgboot Source Schema : dbo Target Server Type : SQL Server Target Server Version : 14...
INSERT INTO groups (name) VALUES ('Admin'), ('User'); INSERT INTO employees (first_name, last_name, manager_id, referrer_id, group_id) VALUES ('John', 'Doe', NULL, NULL, 1), ('John', 'Black', 1, NULL, 1), -- Has no subordinates ('John', 'Smith', 1, NULL, 1), ('John', 'Brown', 3, NULL, 2), ('John', 'S...
-- DROP TABLE orders DROP TABLE orders; -- CREATE TABLE orders CREATE TABLE orders ( o_order_id int, o_date text, o_time text, o_number text, o_code text, o_payment_type text, o_paid text, o_code_value text, o_nr_packages text, o_nr_payments text, o_canceled boolean, c_n...
-- alter3.test -- -- execsql { -- CREATE TABLE t1(a, b); -- INSERT INTO t1 VALUES(1, 100); -- INSERT INTO t1 VALUES(2, 300); -- SELECT * FROM t1; -- } CREATE TABLE t1(a, b); INSERT INTO t1 VALUES(1, 100); INSERT INTO t1 VALUES(2, 300); SELECT * FROM t1;
-- is_user_authentication_valid function checks if every provider used in loginProviderSets and modifyProviderSets has an AuthFactor CREATE OR REPLACE FUNCTION _auth.is_user_authentication_valid(i_user_authentication_id TEXT) RETURNS BOOLEAN AS $$ DECLARE v_is_admin BOOLEAN; v_auth_factor_providers TEXT; v_...
-- 2018-03-26T16:06:11.911 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DROP INDEX IF EXISTS ad_print_clients_hostkey ; -- 2018-03-26T16:06:11.914 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator CREATE UNIQUE INDEX AD_Print_Clients_HostKey ON AD_Print_Clients (HostKey) WHERE IsAc...
/* * Your installation or use of this SugarCRM file is subject to the applicable * terms available at * http://support.sugarcrm.com/Resources/Master_Subscription_Agreements/. * If you do not agree to all of the applicable terms or do not have the * authority to bind the entity as an authorized representative, then...
SELECT * FROM sometable WHERE x = 5 GO
/* SQLyog Ultimate v11.11 (64 bit) MySQL - 5.5.5-10.1.24-MariaDB : Database - db_cti ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FORE...
CREATE TABLE country (id VARCHAR(2) NOT NULL, name VARCHAR(64) NOT NULL, PRIMARY KEY("id")); INSERT INTO "country" ("id", "name") VALUES ('AD', 'Andorra'); INSERT INTO "country" ("id", "name") VALUES ('AE', 'Emiratos Árabes Unidos'); INSERT INTO "country" ("id", "name") VALUES ('AF', 'Afganistán'); INSERT INTO "countr...
/* Copyright 2021 The Matrix.org Foundation C.I.C * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable l...
use recycloud; INSERT INTO categoria(background_color, color, icon, nombre, short_desc) VALUES ('rgba(43,155,14,0.35)', '#0d380d', 'fa-recycle', 'Plásticos', 'Los plásticos abarcan una gran familia de materiales que se pueden clasificar en varios tipos y reciclar de distintas manera.'), ('rgba(239,112,0,0.35)', '#EF70...
{{ config( materialized='incremental', unique_key='TransTypeId', schema= 'DIM' ) }} SELECT DISTINCT CAC AS TransTypeId, BusCgyTy AS BusinessCategoryType, Dsc AS TransactionTypeDesc, {{surrogate_key('CAC', 'BusCgyTy')}} AS TRANSTYPEIDSK FROM "PC_FIVETRAN_DB"."SUBSCRIBE_DBO"."CAC"
SELECT acc.location, count(*) FROM site as s, so_user as u1, question as q1, answer as a1, tag as t1, tag_question as tq1, badge as b, account as acc WHERE s.site_id = q1.site_id AND s.site_id = u1.site_id AND s.site_id = a1.site_id AND s.site_id = t1.site_id AND s.site_id = tq1.site_id AND s.site_id = b.site_id AND q1...
-- regression test for the uuid datatype -- creating test tables CREATE TABLE guid1 ( guid_field UUID, text_field TEXT DEFAULT (now()) ); CREATE TABLE guid2 ( guid_field UUID, text_field TEXT DEFAULT (now()) ); -- inserting invalid data tests -- too long INSERT INTO guid1 (guid_field) VALUES ('1...
CREATE CAST (money AS bigint) WITHOUT FUNCTION AS IMPLICIT;
USE [ANTERO] GO /****** Object: View [dw].[v_haku_ja_valinta_yoarvosanat] Script Date: 26.11.2020 11:35:26 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER VIEW [dw].[v_haku_ja_valinta_yoarvosanat] AS SELECT DISTINCT [Koulutuksen alkamisvuosi] = f.koulutuksen_alkamisvuosi ,[Koulutuksen al...
DROP TABLE [simple-note-service].[NoteProject];
-- @testpoint:指定REPLACE,参数个数变化,不会替换原有函数,而是会建立新的函数 --预置条件,创建函数 drop function if exists func_add_sql0(integer, integer); CREATE FUNCTION func_add_sql0(integer, integer) RETURNS integer AS 'select $1 + $2;' LANGUAGE SQL IMMUTABLE RETURNS NULL ON NULL INPUT; / --指定REPLACE,参数个数为1,原有函数不会替换,会创建新的同名函数func_a...
BEGIN; CREATE TABLE star_wars_family_tree ( pk serial PRIMARY KEY, name text NOT NULL, gender bool DEFAULT true, -- true = male parent_of int[] ); INSERT INTO star_wars_family_tree( name, parent_of, gender ) VALUES ( 'Kilo Ren', NULL, true ) , ( 'Luke Skywalker', NULL, true ) , ( '...
CREATE TABLE `amigochef`.`event_like` ( `event_like_id` INT NOT NULL AUTO_INCREMENT , `event_id` INT NOT NULL , `user_id` INT NOT NULL , PRIMARY KEY (`event_like_id`), INDEX (`event_id`), INDEX (`user_id`)) ENGINE = InnoDB; ALTER TABLE `event_like` ADD FOREIGN KEY (`event_id`) REFERENCES `events`(`event_id`) ON DELETE...
-- MySQL dump 10.19 Distrib 10.3.31-MariaDB, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: codetest -- ------------------------------------------------------ -- Server version 10.3.31-MariaDB-0+deb10u1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET...
SELECT tab0.v1 AS v1 , tab1.v0 AS v0 , tab6.v7 AS v7 , tab4.v5 AS v5 , tab3.v4 AS v4 , tab5.v6 AS v6 , tab2.v3 AS v3 , tab8.v9 AS v9 , tab7.v8 AS v8 FROM (SELECT obj AS v0 FROM gr__offers$$2$$ WHERE sub = 'wsdbm:Retailer397' ) tab1 JOIN (SELECT sub AS v0 , obj AS v9 FROM sorg__priceValidUntil$$9$$ ...
/* Copyright 2019 Google LLC 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 applicable law or agreed to in writing, software dis...
-- :name db-list-all-bookings :? :* -- :doc List all bookings SELECT b.id, TO_CHAR(b.booked_date, 'YYYY-MM-DD') as booked_date, b.users_id as user_id, u.username as name, u.yachtname as yacht_name FROM booking b JOIN users u ON u.id = b.users_id ORDER BY booked_date; -- :name db-list-all-bookings-for-admin :? :* -- :...
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 11, 2018 at 01:19 PM -- Server version: 10.1.30-MariaDB -- PHP Version: 7.2.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
-- Copyright (c) Microsoft Corporation. -- Licensed under the MIT License. CREATE VIEW [Presentation].[Budget] AS SELECT [BudgetKey] ,[IatiIdentifier] ,[BudgetType] ,[BudgetPeriodStartIsoDate] ,[BudgetPeriodEndIsoDate] ,[BudgetValueCurrency] ,[BudgetValueDate] ,[BudgetValue] ,[InsertedDat...
-- @testpoint: openGauss保留关键字 overlaps 作为列名带双引号,使用时带单引号或反引号,大小写匹配(合理报错) drop table if exists test_tbl; create table test_tbl( c_id int, c_int int, c_integer integer, c_bool int, c_boolean int, c_bigint integer, c_real real, c_double real, c_decimal decimal(38), c_number number(38), c_numeric numeric(38), c_char ch...
create table ACT_RU_VARIABLE ( ID_ nvarchar(64) not null, REV_ int, TYPE_ nvarchar(255) not null, NAME_ nvarchar(255) not null, EXECUTION_ID_ nvarchar(64), PROC_INST_ID_ nvarchar(64), TASK_ID_ nvarchar(64), SCOPE_ID_ nvarchar(255), SUB_SCOPE_ID_ nvarchar(255), SCOPE_TYPE_ nvarcha...
SET DEFINE OFF; ALTER TABLE AFW_21_PLUGN_ARBRE_NOEUD ADD ( CONSTRAINT AFW_21_PLUGN_ARBRE_NOEUD_CK4 CHECK (INDIC_FERMR_NOEUD in ('O','N')) ENABLE VALIDATE) /
#standardSQL # 11_02: Check for 'Installable Manifest' missing noted in Lighthouse run SELECT COUNTIF(manifest) AS freq, COUNT(0) AS total, ROUND(COUNTIF(manifest) * 100 / COUNT(0), 2) AS pct FROM ( SELECT JSON_EXTRACT_SCALAR(report, '$.audits.installable-manifest.score') = '1' AS manifest FROM ...