text stringlengths 1 1.05M |
|---|
--
-- 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 ma... |
UPDATE `sys_modules` SET `version` = '1.0.6' WHERE `uri` = 'messenger' AND `version` = '1.0.5';
|
/*
Post-Deployment Script Template
--------------------------------------------------------------------------------------
This file contains SQL statements that will be appended to the build script.
Use SQLCMD syntax to include a file in the post-deployment script.
Example: :r .\myfile.sql
... |
CREATE OR REPLACE FUNCTION transform_to_2056(geom geometry)
RETURNS geometry AS $$
SELECT ST_Transform(ST_SetSRID($1, 4326), 2056);
$$
LANGUAGE sql; |
CREATE UNLOGGED TABLE IF NOT EXISTS raw.investments (
id integer primary key,
committeeid integer,
fileddocid integer,
description character varying,
purchasedate date,
purchaseshares integer,
purchaseprice double precision,
currentvalue double precision,
liquidvalue double precision... |
alter table "public"."Transitions" drop constraint "Transitions_conferenceId_fkey";
|
CREATE TABLE IF NOT EXISTS guilds (
id BIGINT PRIMARY KEY,
prefix TEXT
); |
CREATE DATABASE they_got;
USE they_got;
CREATE TABLE overview (
id: INT,
name: VARCHAR (255),
tagline: VARCHAR (255),
type: VARCHAR (255),
vicinity: VARCHAR (255),
priceLevel: VARCHAR (2),
zagatFood: INT (2),
zagatDecor: INT (2),
zagatService: INT (2),
longDescription: VARCHAR (255),
PRIMARY KEY... |
-- 2021-08-31T08:55:55.140Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,545056,0,TO_TIMESTAMP('2021-08-31 11:55:54','YYYY-MM-DD HH24:MI:SS'),100,'de... |
--
-- add imagerotator.url
--
\connect - jcms
INSERT INTO updatelog (name,value) VALUES ('db_version','20100804');
ALTER TABLE imagerotator ADD COLUMN url varchar;
|
CREATE OR REPLACE VIEW public.es_top_cities
AS WITH top_cities AS (
SELECT
CASE
WHEN es_real_estate.city ~~ '%kerület%'::text THEN 'Budapest'::text
ELSE es_real_estate.city
END AS city_normalized
FROM es_real_estate
GR... |
CREATE OR REPLACE FUNCTION dex.insert_1inch(start_ts timestamptz, end_ts timestamptz=now(), start_block numeric=0, end_block numeric=9e18) RETURNS integer
LANGUAGE plpgsql AS $function$
DECLARE r integer;
BEGIN
WITH rows AS (
INSERT INTO dex.trades (
block_time,
token_a_symbol,
token_b_symbo... |
-- JCD: Propigate title rather than name to acs_objects title field.
select define_function_args('content_item__new','name,parent_id,item_id,locale,creation_date;now,creation_user,context_id,creation_ip,item_subtype;content_item,content_type;content_revision,title,description,mime_type;text/plain,nls_language,text,data... |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jan 06, 2022 at 01:49 PM
-- Server version: 10.4.22-MariaDB
-- PHP Version: 8.0.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
-- PHP-Auth (https://github.com/delight-im/PHP-Auth)
-- Copyright (c) delight.im (https://www.delight.im/)
-- Licensed under the MIT License (https://opensource.org/licenses/MIT)
PRAGMA foreign_keys = OFF;
CREATE TABLE "users" (
"id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL CHECK ("id" >= 0),
"email" VARCHAR(249)... |
CREATE TABLE IF NOT EXISTS `system_roles` (
`id` SMALLINT NOT NULL AUTO_INCREMENT,
`type` ENUM ('normal', 'admin') NOT NULL DEFAULT 'normal',
`title` VARCHAR(32) NOT NULL,
`ordering` SMALLINT NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY (`title`),
UNIQUE KEY (`type`, `ordering`)
) ENGINE = InnoDB
DEFA... |
CREATE TABLE public.see_shiftsettings (
id numeric NOT NULL DEFAULT nextval('see_vrshiftsettings_seq'::regclass),
shiftid numeric NOT NULL,
shiftstarttime varchar(50) NULL,
shiftendtime varchar(50) NULL,
weekday numeric NULL,
isactive varchar(50) NULL,
shiftbreaktime numeric(10) NULL,
lastmodifiedby varchar(50)... |
-- Deploy nasa-apt:threads to pg
BEGIN;
CREATE TYPE apt.thread_status AS ENUM (
'OPEN',
'CLOSED'
);
CREATE TABLE apt.threads (
id serial PRIMARY KEY,
atbd_id integer NOT NULL,
major integer NOT NULL,
"status" apt.thread_status DEFAULT 'OPEN',
"section" varchar(1024) NOT NULL,
created_by varchar(1024),
... |
#chrom chromStart chromEnd counts AA AC AG AT CA CC CG CT GA GC GG GT TA TC TG TT value
chr22 13004900 13005100 38 4 0 2 1 0 5 1 4 1 0 8 2 2 4 2 2
chr22 13004950 13005150 88 10 1 3 2 0 14 2 10 2 2 19 3 2 6 2 10
chr22 13005000 13005200 138 14 2 6 3 0 27 3 13 6 3 25 4 3 9 2 18
chr22 13005050 13005250 138 14 2 6 3 0 27 3 ... |
-- phpMyAdmin SQL Dump
-- version 4.9.7
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Aug 05, 2021 at 10:07 AM
-- Server version: 10.2.39-MariaDB-cll-lve
-- PHP Version: 7.3.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!... |
-- @testpoint:openGauss关键字prepare(非保留,作为列名带双引号,prepare大小写混合,建表成功
drop table if exists prepare_test;
create table prepare_test(
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 ... |
{% test expect_multicolumn_sum_to_equal(model,
column_list,
sum_total,
group_by=None,
row_condition=None
... |
/*
* Library: IMMZ.IND.46
* Immunization coverage for Tetanus containing vaccine boosters (Computed Denominator)
* Compares the administered booster dose of tetanus containing vaccines (doses 4, 5, 6) with the number of immunization recommendations for boosters of tetanus containing vaccines expressed as a percenta... |
{{ config({
"materialized": "incremental",
"unique_key": "note_id",
"schema": "sensitive"
})
}}
WITH source AS (
SELECT *
FROM {{ source('gitlab_dotcom', 'system_note_metadata') }}
{% if is_incremental() %}
WHERE updated_at >= (SELECT MAX(updated_at) FROM {{this}})
{% endif %}
... |
CREATE TABLE #Codesets (
codeset_id int NOT NULL,
concept_id bigint NOT NULL
)
;
INSERT INTO #Codesets (codeset_id, concept_id)
SELECT 1 as codeset_id, c.concept_id FROM (select distinct I.concept_id FROM
(
select concept_id from @vocabulary_database_schema.CONCEPT where concept_id in (43013884,40239216,4016603... |
CREATE TABLE channel_properties(
server_id int unsigned,
id int unsigned,
ident varchar(255) NOT NULL,
value varchar(8192)
) CHARACTER SET 'utf8mb4' ;
CREATE INDEX index_channel_properties_id ON channel_properties (id);
CREATE INDEX index_channel_properties_serverid ON channel_properties (server_id);
CR... |
-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 2016-02-12 10:12:57
-- 服务器版本: 5.6.17
-- PHP Version: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET ... |
-- Downloaded dummy data from googlr
DROP TABLE IF EXISTS employee;
CREATE TABLE employee (
id SERIAL PRIMARY KEY,
EmpId integer NULL,
EmpName varchar(255) default NULL,
EmpBOD varchar(255),
EmpJoiningDate varchar(255),
PrevExperience integer NULL,
Salary integer NULL,
Address varchar(255) d... |
--
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;
--
-- Name: cliente; Type: SCHEMA; Schema: -; Owner: -
--
CREATE SCHEMA cliente;
-... |
insert into city values
(6427649,"Saint-Projet-de-Salers","FR",2.53333,45.083328),
(2977311,"Saint-Projet-de-Salers","FR",2.52819,45.084961),
(3005603,"Lavialle","FR",3.41532,45.416),
(6617345,"Bassillon-Vauzé","FR",-0.0748,43.456501),
(3034664,"Bassillon-Vauzé","FR",-0.06667,43.450001),
(6434355,"Grèzes","FR",3.5,44.9... |
SELECT b1.name,
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... |
SELECT COUNT(*) FROM ros.online_sales_fact;
SELECT COUNT(*) FROM ros.call_center_dimension;
SELECT COUNT(*) FROM ros.online_page_dimension;
SELECT COUNT(*) FROM ros.store_orders_fact;
SELECT COUNT(*) FROM ros.store_sales_fact;
SELECT COUNT(*) FROM ros.store_dimension;
SELECT COUNT(*) FROM ros.inventory_fact;
SELECT COU... |
SELECT
expr.Study as Study,
expr.HGNC_gene_symbol as Gene,
CORR(log2(expr.normalized_count+1), cn.mean_segment_mean) as correlation
FROM
[_EXPRESSION_TABLE_] AS expr
JOIN (
SELECT
Study,
SampleBarcode,
Num_Probes,
AVG(Segment_Mean) AS mean_segment_mean,
FROM
[_COPY_NUMBER_TABLE_]
WHER... |
-- This SQL code was generated by sklearn2sql (development version).
-- Copyright 2018
-- Model : KerasClassifier_Dense
-- Dataset : FourClass_100
-- Database : mysql
-- This SQL code can contain one or more statements, to be executed in the order they appear in this file.
-- Model deployment code
WITH keras_inp... |
DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
DROP TABLE IF EXISTS QRTZ_LOCKS;
DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
DROP TABLE IF EXISTS QRTZ_B... |
CREATE TABLE [dbo].[ADNO_Flat_NonAdminWithProrates] (
[loc] CHAR (2) NULL,
[dept] CHAR (3) NULL,
[proj] CHAR (4) NULL,
[project] VARCHAR (24) NULL,
[PI] VARCHAR (30) NULL,
[accession] CHAR (7) NULL,
[SFN] VARCHAR (20) NULL,... |
SELECT
2904 AS layer_code, 'poi_miscpoi' AS layer_class, 'fountain' AS layer_name, feature_type AS gdal_type, osm_id, osm_way_id, osm_timestamp, all_tags, geometry
FROM `openstreetmap-public-data-prod.osm_planet.features`
WHERE EXISTS(SELECT 1 FROM UNNEST(all_tags) as tags WHERE tags.key = 'amenity' AND tags.value='f... |
SELECT AVG(opct) FROM obvious_seeds |
--
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
--
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -
--
CREATE EXTENSION IF NOT EXISTS plpg... |
-- MySQL dump 10.14 Distrib 5.5.30-MariaDB, for osx10.8 (i386)
--
-- Host: localhost Database: geo
-- ------------------------------------------------------
-- Server version 5.5.30-MariaDB-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET... |
/*
Warnings:
- Added the required column `userId` to the `questions` table without a default value. This is not possible if the table is not empty.
*/
-- AlterTable
ALTER TABLE "questions" ADD COLUMN "userId" INTEGER NOT NULL;
-- AddForeignKey
ALTER TABLE "questions" ADD FOREIGN KEY ("userId") REFERENCES "us... |
CREATE TABLE [dbo].[ConceptType] (
[conceptTypeId] INT NOT NULL,
[name] VARCHAR (255) NOT NULL,
[applicableToMask] INT NOT NULL,
CONSTRAINT [PK_ConceptType] PRIMARY KEY CLUSTERED ([conceptTypeId] ASC) WITH (FILLFACTOR = 95)
);
|
--
-- Windshaft test database
--
-- To use run ../prepare_db.sh
-- NOTE: requires a postgis template called template_postgis
--
SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warnin... |
INSERT INTO tweb_apbd(`rangkuman`,`berkas_id`,`lembaga_id`, `lembaga_kode`,`pemda_kode`, `wilayah_kode`,`tahun`, `rekening_kode`,`rekening`, `uraian`, `nominal`,`nominal_sebelum`, `nominal_sesudah`, `nominal_perubahan`, `nominal_persen`, `keterangan`, `created_by`, `updated_by`) VALUES
('0','40','14','1.06.01.','1.06'... |
TRUNCATE TABLE {$NAMESPACE}_maniphest.maniphest_task_ffield;
ALTER TABLE {$NAMESPACE}_maniphest.maniphest_task_ffield
ADD UNIQUE KEY `key_documentfield` (documentID, fieldKey);
|
-- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 26, 2019 at 09:08 AM
-- Server version: 10.1.32-MariaDB
-- PHP Version: 7.2.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... |
CREATE TABLE catalogue.PricingUnits_History
(
Id smallint NOT NULL,
[Name] nvarchar(20) NULL,
TierName nvarchar(30) NULL,
[Description] nvarchar(100) NOT NULL,
[Definition] nvarchar(1000) NULL,
LastUpdated datetime2(7) NOT NULL,
LastUpdatedBy int NULL,
SysStartTime datetime2(0) NOT NULL... |
-- For M Full PNG Remote to PI
-- The average of the ping current values, this will be the second value displayed
SELECT avg(wattage) FROM PowerMeasurement
WHERE strftime('%H %M %S %f', date) BETWEEN strftime('%H %M %S %f', '2022-03-01 17:28:35.635983') AND strftime('%H %M %S %f', '2022-03-01 17:28:48.078603')
OR s... |
version https://git-lfs.github.com/spec/v1
oid sha256:22ddd07dc838bd593991870c9b3d50252805981e228b53a4e0471e7ce2af5d07
size 27593
|
PRAGMA foreign_keys = ON;
create table users(
id integer primary key,
created_at date
);
create table user_names(
user_id integer,
changed_at date not null,
name string not null,
primary key(user_id, changed_at),
foreign key(user_id) references users(id)
);
create table user_screen_nam... |
--CREATE database dependencycheck;
USE dependencycheck;
GO
if exists (SELECT 1 FROM sysobjects WHERE name='software' AND xtype='U')
drop table software;
if exists (SELECT 1 FROM sysobjects WHERE name='cpeEntry' AND xtype='U')
drop table cpeEntry;
if exists (SELECT 1 FROM sysobjects WHERE name='reference' AND xtype='... |
#IfMissingColumn documents name
ALTER TABLE `documents` ADD `name` varchar(255) DEFAULT NULL;
UPDATE `documents` SET `name`=IF(ISNULL(`couch_docid`), SUBSTRING_INDEX(`url`,"/",-1), `url`) WHERE IFNULL(`name`,"")="";
#EndIf
|
#standardSQL
# 20.07 - % of sites affected by CDN prioritization issues (H2 and served by CDN)
SELECT
client,
IF(pages.cdn = "", "Not using CDN", pages.cdn) AS CDN,
IF(prioritization_status IS NOT NULL, prioritization_status, "Unknown") AS prioritizes_correctly,
COUNT(0) AS num_pages,
ROUND(COUNT(0) * 100 / S... |
-- Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
-- Copyright [2016-2020] EMBL-European Bioinformatics Institute
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may ob... |
USE TitanicDB
GO
IF OBJECT_ID (N'dbo.AveragePrice', N'FN') IS NOT NULL
DROP FUNCTION dbo.AveragePrice
GO
CREATE FUNCTION dbo.AveragePrice()
RETURNS smallmoney
WITH SCHEMABINDING
AS
BEGIN
RETURN (SELECT AVG(Fare) FROM dbo.T)
END
GO
SELECT dbo.AveragePrice()
|
--liquibase formatted sql
--changeset kaiso:init-user_role-table author-name:Kais OMRI
--preconditions onFail:HALT onError:HALT
create table lgm_user_role (
createdBy varchar(255),
createdDate timestamp,
lastModifiedBy varchar(255),
lastModifiedDate timestamp,
user_id BIGINT,
role_id BIGINT,
... |
--------------------------------------------------------------------------------
-- REPLICATION -----------------------------------------------------------------
--------------------------------------------------------------------------------
CREATE OR REPLACE VIEW api.replication_log
AS
SELECT * FROM replication.lo... |
CREATE TABLE [dbo].[dnn_ScheduleHistory] (
[ScheduleHistoryID] INT IDENTITY (1, 1) NOT NULL,
[ScheduleID] INT NOT NULL,
[StartDate] DATETIME NOT NULL,
[EndDate] DATETIME NULL,
[Succeeded] BIT NULL,
[LogNotes] ... |
CREATE TABLE list (id VARCHAR(10) NOT NULL, value VARCHAR(64) NOT NULL, PRIMARY KEY(id));
INSERT INTO "list" ("id", "value") VALUES ('AF', 'Afghanistan');
INSERT INTO "list" ("id", "value") VALUES ('ZA', 'Afrika Kusini');
INSERT INTO "list" ("id", "value") VALUES ('IS', 'Aislandi');
INSERT INTO "list" ("id", "value") ... |
BEGIN;
-- Plan the tests
--SELECT plan( 15 );
SELECT plan(6);
--SELECT has_table( 'code_lookup' );
--SELECT has_column( 'code_lookup', 'table_cd' );
--SELECT has_column( 'code_lookup', 'column_cd' );
--SELECT has_column( 'code_lookup', 'name_char' );
--SELECT has_column( 'code_lookup', 'lookup_blob' );
--SELECT col_i... |
use Observations;
Insert Offering
(Code, Name, Description, UserId)
Select distinct
NewOfferingCode,
NewOfferingName,
NewOfferingDescription,
(Select UserId from aspnet_Users where UserName='TimPN')
from
vNewDepthOfferings
where
not Exists(Select * from Offering where Code = NewOfferingCode)
|
# Тема “Сложные запросы”
# 1. Составьте список пользователей users, которые осуществили хотя бы один заказ orders в интернет магазине.
# 2. Выведите список товаров products и разделов catalogs, который соответствует товару.
# 3. (по желанию) Пусть имеется таблица рейсов flights (id, from, to) и
# таблица городов cities... |
--==============================================================================
-- GPI - Gunther Pippèrr
-- Desc: On which objects this pl/sql code depends
--==============================================================================
set verify off
set linesize 130 pagesize 300
set trimspool on
define OWNER ... |
ADMINISTRABLE_ROLE_AUTHORIZATIONS
APPLICABLE_ROLES
CHARACTER_SETS
CHECK_CONSTRAINTS
CLIENT_STATISTICS
COLLATIONS
COLLATION_CHARACTER_SET_APPLICABILITY
COLUMNS
COLUMNS_EXTENSIONS
COLUMN_PRIVILEGES
COLUMN_STATISTICS
COMPRESSION_DICTIONARY
COMPRESSION_DICTIONARY_TABLES
ENABLED_ROLES
ENGINES
EVENTS
FILES
GLOBAL_TEMPORARY_T... |
-- Revert scoutges:grants/tables/groups from pg
SET client_min_messages TO 'warning';
BEGIN;
REVOKE ALL PRIVILEGES ON TABLE api.groups FROM PUBLIC;
COMMIT;
-- vim: expandtab shiftwidth=2
|
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Oct 18, 2020 at 08:42 AM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
-- -------------------------------- The script used when storeMode is 'db' --------------------------------
DROP DATABASE IF EXISTS seata;
CREATE DATABASE seata;
USE seata;
-- the table to store GlobalSession data
CREATE TABLE IF NOT EXISTS `global_table`
(
`xid` VARCHAR(128) NOT NULL,
`... |
-- file:interval.sql ln:196 expect:true
SELECT interval '1 2:03:04' hour to second
|
-- TABLES
CREATE TABLE IF NOT EXISTS `bx_events_meta_mentions` (
`object_id` int(10) unsigned NOT NULL,
`profile_id` int(10) unsigned NOT NULL,
KEY `object_id` (`object_id`),
KEY `profile_id` (`profile_id`)
);
-- TABLE: bx_events_admins
ALTER TABLE `bx_events_admins` CONVERT TO CHARACTER SET utf8mb4 COLLATE u... |
CREATE TABLE [dbo].[User] (
[UserId] INT IDENTITY (1, 1) NOT NULL,
[FirstName] NVARCHAR (50) NULL,
[LastName] NVARCHAR (50) NULL,
[EMail] NVARCHAR (50) NULL,
[Address] NVARCHAR (50) NULL,
[PhoneNo] NVARCHAR (50) NULL,
[Company] NVARCHAR (50) NULL,
[... |
CREATE
ALGORITHM = UNDEFINED
DEFINER = `root`@`localhost`
SQL SECURITY DEFINER
VIEW `mls`.`v_stg_only_mls_ids` AS
SELECT
`stg`.`MLS_ID` AS `MLS_ID`
FROM
(`mls`.`property_stg` `stg`
LEFT JOIN `mls`.`property_fact` `fact` ON ((`stg`.`MLS_ID` = `fact`.`MLS_ID`)))
WHERE
... |
DELIMITER /
INSERT INTO KRIM_ROLE_ID_BS_S VALUES(NULL)
/
INSERT INTO KRIM_ROLE_T(ACTV_IND,DESC_TXT,KIM_TYP_ID,LAST_UPDT_DT,NMSPC_CD,OBJ_ID,ROLE_ID,ROLE_NM,VER_NBR) VALUES('Y','Modify Sponsor Template',(SELECT KIM_TYP_ID FROM KRIM_TYP_T WHERE NM = 'UnitHierarchy'),NOW(),'KC-AWARD',UUID(),(SELECT (MAX(ID)) FROM KRIM_ROLE... |
-- SQL version 5.0.1
-- Server version: 10.4.11-MariaDB
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
SET @@GLOBAL.event_scheduler = ON;
--
-- Database: `library`
--
CREATE DATABASE IF NOT EXISTS `library` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_c... |
SET CLIENT_ENCODING TO UTF8;
SET STANDARD_CONFORMING_STRINGS TO ON;
BEGIN;
CREATE TABLE "public"."landzone" (gid serial,
"fid_" int4,
"area" float8,
"perimeter" float8,
"landzone_" numeric(10,0),
"landzone_i" numeric(10,0),
"zone" varchar(6),
"count" numeric(10,0));
ALTER TABLE "public"."landzone" ADD PRIMARY KEY (gid)... |
INSERT INTO Towns(Id, [Name])
VALUES (1, 'Sofia'),
(2, 'Plovdiv'),
(3, 'Varna')
INSERT INTO Minions(Id, [Name], Age, TownId)
VALUES (1, 'Kevin', 22, 1),
(2, 'Bob', 15, 3),
(3, 'Steward', NULL, 2)
|
------------------------------------------------------------------------------------------------------
--READ DATA FROM XML VAR
------------------------------------------------------------------------------------------------------
DECLARE @XML as XML
SET @XML =
'
<GROUPS>
<GROUP PRODUTO="RiscoCredito" MODALIDADE="I... |
CREATE TABLE `quotas` (
`site_id` int(10) unsigned NOT NULL,
`partition_id` int(10) unsigned NOT NULL,
`storage` int(10) NOT NULL,
PRIMARY KEY (`site_id`,`partition_id`),
KEY `partitions` (`partition_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 CHECKSUM=1;
|
DROP SCHEMA IF EXISTS mixed_30_inds_s_cp_ad__trg CASCADE;
CREATE SCHEMA mixed_30_inds_s_cp_ad__trg;
DROP TABLE IF EXISTS mixed_30_inds_s_cp_ad__trg.test_le_1_nl0_ce0_target_relation CASCADE ;
CREATE TABLE mixed_30_inds_s_cp_ad__trg.test_le_1_nl0_ce0_target_relation (
test_le_1_nl0_ce0_t_attribute1 text NOT NULL,
test_... |
CREATE TABLE [dbo].[UCGameTeamStat] (
[Id] INT IDENTITY (1, 1) NOT NULL,
[TeamId] INT NOT NULL,
[GameId] INT NOT NULL,
[Q1] INT NOT NULL,
[Q2] INT NOT NULL,
[Q3] INT NOT NULL,
[Q4] IN... |
-- Database: informix
-- Change Parameter: procedureName=new_customer
DROP PROCEDURE new_customer;
|
-- --------------------------------------------------------
-- Servidor: localhost
-- Versão do servidor: 5.7.24 - MySQL Community Server (GPL)
-- OS do Servidor: Win64
-- HeidiSQL Versão: 10.2.0.5599
-- --------------------------------------------------------
/... |
-------------------------------------------------------------------------------
--
-- Script: session_times.sql
-- Purpose: to report the time used and waiting for a session
--
-- Copyright: (c) Ixora Pty Ltd
-- Author: Steve Adams
--
-- Synopsis: @set_sid
-- @session_times
--
------------------------------... |
CREATE TABLE IF NOT EXISTS `wp_vote` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`keyword` varchar(50) NOT NULL COMMENT '关键词',
`title` varchar(100) NOT NULL COMMENT '投票标题',
`description` text NULL COMMENT '投票描述',
`picurl` int(10) unsigned NULL COMMENT '封面图片',
`type` char(10) NOT NULL DEFAUL... |
-- MySQL dump 10.13 Distrib 8.0.21, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: oficioive7122020
-- ------------------------------------------------------
-- Server version 8.0.21
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULT... |
-- create super user role
CREATE ROLE helpmate_su WITH LOGIN PASSWORD 'helpmate';
-- create app user role
CREATE ROLE mate WITH LOGIN PASSWORD 'mate' NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION;
CREATE DATABASE helpmate_database;
GRANT ALL PRIVILEGES ON DATABASE helpmate_database TO helpmate_su;
GRANT A... |
CREATE PROCEDURE ascii_chart()
BEGIN
DECLARE i INT DEFAULT 1;
CREATE TEMPORARY TABLE ascii_chart
(ascii_code int, ascii_char CHAR(1));
WHILE (i<=128) DO
INSERT INTO ascii_chart VALUES(i,CHAR(i));
SET i=i+1;
END WHILE;
END
|
INSERT INTO `person` (`id`,`address`,`first_name`,`gender`,`last_name`) VALUES (1,'rua 10','Edson','Male','H');
INSERT INTO `person` (`id`,`address`,`first_name`,`gender`,`last_name`) VALUES (3,' rua ggggg','Antonio','Male','H');
INSERT INTO `person` (`id`,`address`,`first_name`,`gender`,`last_name`) VALUES (4,' Rau 22... |
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1
-- Généré le : ven. 12 juil. 2019 à 17:32
-- Version du serveur : 10.1.37-MariaDB
-- Version de PHP : 7.2.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!401... |
update ACT_GE_PROPERTY set VALUE_ = '5.20.0.1' where NAME_ = 'schema.version';
|
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 08-04-2019 a las 03:38:10
-- Versión del servidor: 10.1.38-MariaDB
-- Versión de PHP: 7.2.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";... |
ALTER TABLE sources ADD COLUMN station_name varchar(255) NOT NULL DEFAULT '';
ALTER TABLE sources ALTER COLUMN station_name DROP DEFAULT;
-- Force full re-parse
DELETE FROM parsed_files;
|
CREATE TABLE P1 (
ID INTEGER DEFAULT '0' NOT NULL,
DESC VARCHAR(300),
NUM INTEGER NOT NULL,
NUM2 INTEGER NOT NULL,
RATIO FLOAT NOT NULL,
PRIMARY KEY (ID)
);
PARTITION TABLE P1 ON COLUMN ID;
CREATE INDEX P1_IDX_UNARY_MINUS ON P1 (-NUM, NUM2 ASC);
CREATE TABLE R1IX (
ID INTEGER DEFAULT '0' NOT NULL,
DE... |
-- ------------------------------------------------------------------
-- Title: Select patientunitstayid from intakeoutput
-- Notes: cap_leak_index/analysis/sql/IO_exclusion.sql
-- cap_leak_index, 20190511 NYU Datathon
-- eICU Collaborative Research Database v2.0.
-- ------------------------------------... |
--create table with TIMESTAMP(L)TZ columns, using create … like syntax
drop table if exists tz_super1;
drop table if exists tz_super2;
create table tz_super1(
c1 timestamp with time zone default current_timestamp,
c2 timestamp with time zone not null
);
create table tz_super2(
c3 timestamp with local time zone u... |
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: Neil O'Keeffe
-- Create date: 02/01/2019
-- Description: Creates a new entry on the ProductLanguage table if it doesn't already exist.
-- If it already exists then it updates the PlgValue with the supplied pa... |
create table FLW_RU_BATCH (
ID_ varchar(64) not null,
REV_ integer,
TYPE_ varchar(64) not null,
SEARCH_KEY_ varchar(255),
SEARCH_KEY2_ varchar(255),
CREATE_TIME_ datetime not null,
COMPLETE_TIME_ datetime,
STATUS_ varchar(255),
BATCH_DOC_ID_ varchar(64),
TENANT_ID_ varchar(255) d... |
-- 菜单SQL
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
VALUES ('1', '品牌', 'product/brand', NULL, '1', 'config', '6');
-- 按钮父菜单ID
set @parentId = @@identity;
-- 菜单对应按钮SQL
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
SELECT... |
CREATE TABLE IF NOT EXISTS subscriptions (
ID integer PRIMARY KEY AUTOINCREMENT,
UserID integer,
ChannelID varchar,
ChannelName varchar,
ChannelInfo text,
UNIQUE (UserID, ChannelID)
FOREIGN KEY (UserID) REFERENCES users (ID)
ON DELETE CASCADE ON UPDATE NO ACTION
);
CREATE INDEX IF NOT ... |
CREATE TABLE ucscScop (
ucscId varchar(255) NOT NULL,
start int(11) NOT NULL,
end int(11) NOT NULL,
domainName varchar(255) NOT NULL,
KEY ucscId (ucscId(16)),
KEY domainName (domainName(16))
) ENGINE=MyISAM;
|
-- Synapse SQL UDF Example
-- Drop the UDF if it already exists
DROP FUNCTION IF EXISTS dbo.isValidEmail
GO
-- Create an UDF to check valid emails. It returns 'Not Available' for all invalid emails
CREATE FUNCTION dbo.isValidEmail(@EMAIL VARCHAR(100))
RETURNS VARCHAR(100) AS
BEGIN
DECLARE @returnValue AS VARCHA... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.