text stringlengths 1 1.05M |
|---|
create table public.developers (
id bigint generated by default as identity primary key,
discord text NOT NULL,
discord_id text UNIQUE NOT NULL,
skills varchar(300) NOT NULL,
desired_skills varchar(300) NOT NULL,
timezone varchar(15) NOT NULL,
twitter varchar(15) NOT NULL,
github varchar(39) NOT NULL,
... |
SELECT birth FROM people
WHERE name = "Emma Stone";
|
-- Reader
CREATE ROLE reader
NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION;
COMMENT ON ROLE reader IS 'Read-only access to the database to do data analysis';
GRANT USAGE ON SCHEMA public TO reader;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO reader;
GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA public TO ... |
use db_name
go
if not object_id('procedure_default') is null
drop procedure dbo.procedure_default
go
create procedure dbo.procedure_default (
--//parametros
@begin int
--,@param0 int
--,@param1 varchar(xvalue)
--,@param2 bigint
--,@param3 bit
)
as
begin
declare @codret int; --//codigo re... |
-- Funkce ST_X() a ST_Y() ze sloupce protorového typu POINT (event.souradnice) získávají příslušnou souřadnici (Y - latitude; X - longitude)
-- Napište níže část SQL dotazu k seřazení záznamů podle souřadnice k získání jednoho _nejZÁPADNĚJŠÍHO_ záznamu
-- Povinně uvádějte způsob řazení podle ASC nebo DESC.
-- příklad: ... |
{% macro create_external_table(source_node) %}
{{ adapter.dispatch('create_external_table',
packages = dbt_external_tables._get_dbt_external_tables_namespaces())
(source_node) }}
{% endmacro %}
{% macro default__create_external_table(source_node) %}
{{ exceptions.raise_compiler_error("Externa... |
/*
Copyright 2017 Amazon.com
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 writing, soft... |
|Basic
0|Faceted
|
SELECT CustomerID
, MAX(Amount) AS [MaxAmount]
FROM PurchaseOrder
WHERE TransactionDate BETWEEN '2019-01-01' AND '2019-12-31'
GROUP BY CustomerID |
DROP TABLE IF EXISTS hmda_public.lar_2016;
CREATE TABLE hmda_public.lar_2016 (
activity_year VARCHAR,
respondent_id VARCHAR,
agency_code VARCHAR,
loan_type VARCHAR,
property_type VARCHAR,
loan_purpose VARCHAR,
occupancy VARCHAR,
loan_amount VARCHAR,
preapproval VARCHAR,
action_... |
CREATE TABLE armado (
parte_idparte INTEGER NOT NULL,
etapa_idetapa INTEGER NOT NULL
);
ALTER TABLE armado
ADD CONSTRAINT armado_etapa_fk FOREIGN KEY ( etapa_idetapa )
REFERENCES etapa ( idetapa);
ALTER TABLE armado
ADD CONSTRAINT armado_parte_fk FOREIGN KEY ( parte_idparte )
REFEREN... |
--TEST: null values included in the table
create table var_pop_null(
col1 int,
col2 short,
col3 bigint,
col4 numeric(10, 5),
col5 float,
col6 double,
col7 monetary
);
insert into var_pop_null values(10000, 100, 10000000, 12345.06789, 111.11, 11111.130, 1000);
insert into var_pop_null values(10000, 200, nul... |
CREATE TABLE room(
roomid VARCHAR(3) CONSTRAINT pk_roomid PRIMARY KEY,
roomnumber VARCHAR(3),
hasfirstaidkit BOOLEAN);
CREATE TABLE gp(
gpid VARCHAR(3) CONSTRAINT pk_gpid PRIMARY KEY,
firstname VARCHAR(24),
lastname VARCHAR(24),
employeesince DATE);
CREATE TABLE patient(
patientid VARC... |
CREATE table {provider_prefix}_freq_with_acc_wsum as select uid, tcount,
trank, ppercent, unique_location, longitude, latitude , {admin}_id,
sum(ppercent) over (partition by uid order by trank asc)
as acc_wsum from {provider_prefix}_frequent_locations
order by uid, trank |
\set ECHO none
set log_error_verbosity = 'terse';
set client_min_messages = 'warning';
\set ECHO all
drop role if exists londiste_test_part1;
drop role if exists londiste_test_part2;
create group londiste_test_part1;
create group londiste_test_part2;
create table events (
id int4 primary key,
txt text not n... |
{% macro is_bridge_incremental() %}
{#-- do not run introspective queries in parsing #}
{% if not execute %}
{{ return(False) }}
{% else %}
{% set relation = adapter.get_relation(this.database, this.schema, this.table) %}
{{ return(relation is not none
and ... |
--
-- Copyright 2005-2015 The Kuali Foundation
--
-- Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php
--
-- Unless required by ap... |
CREATE OR REPLACE FUNCTION "GET_ALCOHOLFROZEN_PART_CTMOD"
( collection_object_id IN VARCHAR2
) RETURN VARCHAR2
-- Given a collection_object.collection_object_id, returns the number --
-- of specimen_parts in Alcohol or Frozen for that collection_object.
-- including a list of the associated part count modifiers
... |
|Constituent unit
8|No display constant generated
|
-- Deploy most_recent_patchsets_view
-- requires: patchsets
BEGIN;
CREATE VIEW most_recent_patchsets AS
SELECT *
FROM patchsets
WHERE status != 'superseded';
COMMENT ON VIEW most_recent_patchsets IS
$$Shows all the most recent patchsets (i.e., those that have not been
superceded) for all changes in the system.$$;
C... |
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
-... |
CREATE TABLE cities (
name VARCHAR PRIMARY KEY,
country_code VARCHAR,
city_proper_pop REAL,
metroarea_pop REAL,
urbanarea_pop REAL
);
CREATE TABLE countries (
code VARCHAR PRIMARY KEY,
name VARCHAR,
contin... |
-- phpMyAdmin SQL Dump
-- version 4.8.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 28-Nov-2018 às 11:34
-- Versão do servidor: 10.1.33-MariaDB
-- PHP Version: 7.2.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
ALTER TABLE db_version CHANGE COLUMN required_7908_01_mangos_creature_template required_7908_02_mangos_creature_addon bit;
ALTER TABLE creature_addon
DROP COLUMN bytes0;
|
-- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 23, 2020 at 06:20 PM
-- Server version: 10.4.8-MariaDB
-- PHP Version: 7.3.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
CREATE DATABASE IF NOT EXISTS stickerBotDataBase;
USE stickerBotDataBase;
CREATE TABLE IF NOT EXISTS userState (
user_id BIGINT NOT NULL,
chat_id BIGINT NOT NULL,
state_id SMALLINT NOT NULL,
PRIMARY KEY (user_id, chat_id)
);
CREATE TABLE IF NOT EXISTS stickerPackOwner(
sticker_pack_id V... |
insert into employee (first_name, last_name) values ('Bab', 'Coogan');
insert into employee (first_name, last_name) values ('Drona', 'Grimston');
insert into employee (first_name, last_name) values ('Barnard', 'Slowgrove');
insert into employee (first_name, last_name) values ('Doralynne', 'Jobe');
insert into employee ... |
-- The result is unspecified but UBSan should not argue.
SELECT ignore(addHours(now64(3), inf)) FROM numbers(2);
|
-- --------------------------------------------------------
--
-- Table structure for table `products`
--
CREATE TABLE IF NOT EXISTS `products` (
`Product_id` varchar(255) NOT NULL,
`OrderId` int(11) NOT NULL,
`Manufacture_Date` date DEFAULT NULL,
`Raw_Material` varchar(255) DEFAULT NULL,
`Vendor_Id` int(... |
-- file:box.sql ln:115 expect:true
SELECT '' AS one, b1.*, b2.*
FROM BOX_TBL b1, BOX_TBL b2
WHERE b1.f1 @> b2.f1 and not b1.f1 ~= b2.f1
|
CREATE OR REPLACE VIEW aerial_lift AS (
SELECT geom, name, 'ski_lift' AS type FROM swissnames3d_lin
WHERE objektart='Skilift'
UNION ALL
SELECT geom, name, 'gondola_lift' AS type FROM swissnames3d_lin
WHERE objektart='Gondelbahn'
UNION ALL
SELECT geom, name, 'aerial_cableway' AS type FROM swi... |
CREATE TABLE USER_INFO
(
ID INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT,
FIRST_NAME VARCHAR(20),
LAST_NAME VARCHAR(20),
MAIL_ID VARCHAR(20),
PASSWORD1 VARCHAR(20),
CREATED_TIME TIMESTAMP
);
|
/*
* MySql DDL script for data integrity
*
* This DDL script was generated automatically with the pmMDA generator. Do
* not modify the content. The content of the file will be overrwritten if
* this script is regenerated.
*/
ALTER TABLE EMPLOYEE ADD CONSTRAINT EMPLOYEE_DEPARTMENT_IR
FOREIGN KEY (... |
/* char function */
SELECT char(65, 66.1, 67.2, 68.3, 97.4, 98.5, 99.6, 100.7, 101.0, 102.0, 103.0);
SELECT char(65 + 256, 66 + 1024, 66 + 1024 + 1);
SELECT char(65, 66 + number, 67 + number) from numbers(3);
|
DELIMITER /
INSERT INTO IACUC_PROCEDURE_CATEGORY ( PROCEDURE_CATEGORY_CODE, PROCEDURE_CATEGORY, ACTIVE_FLAG, UPDATE_TIMESTAMP, UPDATE_USER, OBJ_ID, VER_NBR )
VALUES ( 1, 'Drugs', 'Y', NOW(), 'admin', UUID(), 1 )
/
INSERT INTO IACUC_PROCEDURE_CATEGORY ( PROCEDURE_CATEGORY_CODE, PROCEDURE_CATEGORY, ACTIVE_FLAG, UPDATE_... |
DELIMITER /
INSERT INTO COI_NOTE_TYPE ( NOTE_TYPE_CODE, SORT_ID, DESCRIPTION, ACTIVE_FLAG, UPDATE_TIMESTAMP, UPDATE_USER, VER_NBR, OBJ_ID )
VALUES ( '1', 1, 'PI Entry', 'Y', NOW(), 'admin', 1, UUID() )
/
INSERT INTO COI_NOTE_TYPE ( NOTE_TYPE_CODE, SORT_ID, DESCRIPTION, ACTIVE_FLAG, UPDATE_TIMESTAMP, UPDATE_USER, VER_N... |
hive>
CREATE TABLE $InputTableName
(
ID String,
Content String
)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY '\t';
hive>
CREATE TABLE $OutTableName
(
ID String,
Content String,
Tokens String
)
hive>
add FILE nltk_scoring.py;
add FILE english.pickle; #Adding file to DistributedCache
INSERT OVERWRITE TABLE $OutTableNam... |
CREATE USER 'user_1'@'%' IDENTIFIED BY 'password1';
CREATE USER 'user_2'@'%' IDENTIFIED BY 'password2';
CREATE USER 'user_3'@'%' IDENTIFIED BY 'password3';
CREATE DATABASE dev_1 default CHARACTER SET UTF8;
CREATE DATABASE dev_2 default CHARACTER SET UTF8;
CREATE DATABASE dev_3 default CHARACTER SET UTF8;
CREATE DATABA... |
-- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 03-11-2018 a las 23:10:31
-- Versión del servidor: 10.1.34-MariaDB
-- Versión de PHP: 7.2.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... |
-- Tags: distributed
DROP TABLE IF EXISTS test_distributed;
DROP TABLE IF EXISTS test_local;
SET prefer_localhost_replica = 1;
-- https://github.com/ClickHouse/ClickHouse/issues/36279
CREATE TABLE test_local (text String, text2 String) ENGINE = MergeTree() ORDER BY text;
CREATE TABLE test_distributed (text String, t... |
USE [ANTERO]
IF EXISTS (
SELECT * FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA='dw' AND TABLE_NAME='d_organisaation_alayksikot' AND COLUMN_NAME='jarjestys_paayksikko_koodi')
BEGIN
ALTER TABLE dw.d_organisaation_alayksikot drop column jarjestys_paayksikko_koodi
END
IF EXISTS (
SELECT * FROM INFORMATION_SCH... |
CREATE DATABASE IF NOT EXISTS `notes` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `notes`;
-- MySQL dump 10.13 Distrib 5.6.13, for osx10.6 (i386)
--
-- Host: localhost Database: note_acmu
-- ------------------------------------------------------
-- Server version 5.5.35
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH... |
-- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date, ,>
-- Description: <Description, ,>
-- =============================================
CREATE FUNCTION [rep].[GetNameMonth]
(
@Month_Num int -- заданный номер месяца
)
RETURNS nvarchar(256)
AS
/*
15.04.2014 ГЕМ:
... |
-- [er]create table with SET data type and insert bit data
CREATE CLASS t1(
col1 SET
);
INSERT INTO t1 VALUES (B'0001');
drop t1; |
DELIMITER $$
CREATE PROCEDURE criaChaves (IN nomeBanco VARCHAR(70))
BEGIN
DECLARE done INT DEFAULT FALSE;
DECLARE primaria VARCHAR(60);
DECLARE nomeTabela VARCHAR(60);
DECLARE tbEncontrada VARCHAR(60);
DECLARE nomeColuna VARCHAR(60);
DECLARE tabelas CURSOR FOR SELECT table_name FROM information_schema.tables
WHERE tab... |
-- In this chapter, we will
-- learn techniques to aggregate data over time. We will briefly review aggregation functions and statistical aggregation functions. We will cover upsampling and downsampling of data. Finally, we will look at the grouping operators.
-- Summarize data over a time frame
-- There are several us... |
INSERT INTO PERSON(ID, USERNAME, FIRSTNAME, LASTNAME, PASSWORD, HIRINGDATE, VERSION, CREATED_AT, MODIFIED_AT) VALUES (1, 'sherlock.holmes', 'Sherlock', 'Holmes', '123ss12sh', '1983-08-18 00:01', 1, '1983-08-18 00:01', '1999-03-18 00:02' ); |
drop table if exists t1;
create table t1 (a bigint);
prepare s from 'select a from t1 where a between ? and ?';
execute s using 1, 2;
set names utf8;
drop table if exists t1;
create table t1 (a bigint);
prepare s from 'select a from t1 where a between ? and ?';
execute s using 1, 2;
drop table if exists t1;
create... |
COPY public.search_inperson (id, is_in_person, court_id, access_scheme) FROM stdin;
9 f 1479943 f
10 f 1480140 f
11 f 1480143 f
12 f 1480144 f
13 f 1480146 f
14 f 1480147 f
15 f 1480148 f
\.
|
CREATE TABLE `PhpLogger` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`priority` varchar(55) DEFAULT NULL,
`log` text,
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
194
186 |
-- $Id$
-- $Source$
-- Instead of using a temporary table as internal steps we can write the same
-- also as simple sub-query which is creating a temporary table internally.
USE world;
SELECT c1.continent, c1.name, c1.population
FROM Country AS c1, (
SELECT continent, MAX(population) AS maxpop
FROM Country
... |
-- SPDX-License-Identifier: Apache-2.0
-- Licensed to the Ed-Fi Alliance under one or more agreements.
-- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0.
-- See the LICENSE and NOTICES files in the project root for more information.
PRINT N'Creating primary key [AssessmentFamilyAsse... |
-----------------------------------------sharding-databases
CREATE SCHEMA IF NOT EXISTS demo_ds_0;
CREATE SCHEMA IF NOT EXISTS demo_ds_1;
CREATE TABLE IF NOT EXISTS demo_ds_0.user (
id BIGINT NOT NULL AUTO_INCREMENT,
company_id varchar(32) NOT NULL,
name varchar(50) NULL,
create_time datetime(0) NULL,
update_... |
INSERT INTO customers (
title,
name,
surname,
address,
zip_code,
town,
province,
country,
tax_code,
vat,
info,
created_at,
updated_at
)
VALUES (
"1st customer",
"customer name",
"customer ... |
EXEC [EST].[Proc_yjbb_Ins] @Code = N'603088',@CutoffDate = N'2017-09-30',@EPS = N'0.27',@EPSDeduct = N'0',@Revenue = N'2.27亿',@RevenueYoy = N'36.63',@RevenueQoq = N'3.12',@Profit = N'2164.14万',@ProfitYoy = N'2.87',@ProfiltQoq = N'194.63',@NAVPerUnit = N'6.0286',@ROE = N'4.54',@CashPerUnit = N'0.5992',@GrossProfitRate =... |
INSERT INTO department (name)
VALUES
("Sales"),
("Marketing"),
("Acconting");
INSERT INTO role (title, department_id, salary)
VALUES
("Sales Manager", 1, 100000),
("Marketing Manager", 2, 110000),
("Director of finance", 3, 90000);
INSERT INTO employees (first_name, last_name, role_id, manager_id)
VALUES
("John", "Aw... |
--------------------------------------------------------------------------------
-- VIEW EventLog ---------------------------------------------------------------
--------------------------------------------------------------------------------
CREATE OR REPLACE VIEW EventLog (Id, Type, TypeName, DateTime, UserName,
S... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 01, 2021 at 02:02 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
CREATE PROCEDURE SP283(OUT MYCOUNT INTEGER) SPECIFIC SP283_24563 LANGUAGE SQL NOT DETERMINISTIC READS SQL DATA NEW SAVEPOINT LEVEL BEGIN ATOMIC DECLARE MYVAR INT;SELECT COUNT(*)INTO MYCOUNT FROM TABLE300;SELECT COUNT(*)INTO MYCOUNT FROM TABLE199;SELECT COUNT(*)INTO MYCOUNT FROM TABLE89;SELECT COUNT(*)INTO MYCOUNT FROM ... |
-- 1)查询确诊者“安娜”的在发病前14天内的乘车记录;
select * from TakeTrainRecord
where PCardID in(
select taketrainrecord.PCardID
from taketrainrecord, diagnoserecord, passenger,train
where taketrainrecord.PCardID = diagnoserecord.PCardID
and taketrainrecord.PCardID = passenger.PCardID
and taketrainrecord.TID = train.TID
an... |
SELECT e.EmployeeID, e.FirstName, e.LastName, d.[Name]
FROM Employees AS e
JOIN Departments AS d ON e.DepartmentID = d.DepartmentID
WHERE d.[NAME] = 'Sales'
ORDER BY e.EmployeeID ASC
|
DROP PROCEDURE IF EXISTS score_for_matching_batch_2600_MML2;
GO
CREATE PROCEDURE score_for_matching_batch_2600_MML2(
@model_name varchar(100),
@projectid bigint,
@start int,
@end int,
@threshold float
)
AS
BEGIN
set nocount on;
declare @start_time datetime2 = SYSDATETIME(), @predict_duration float, @match_row_... |
delimiter /
TRUNCATE TABLE BUDGET_CATEGORY_MAPS
/
INSERT INTO BUDGET_CATEGORY_MAPS (MAPPING_NAME,TARGET_CATEGORY_CODE,DESCRIPTION,CATEGORY_TYPE,UPDATE_USER,UPDATE_TIMESTAMP,OBJ_ID,VER_NBR)
VALUES ('NIH_PRINTING','04','Subcontract','O ... |
CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; -- required for using UUIDs
CREATE EXTENSION IF NOT EXISTS "pgcrypto"; -- required for encrypting and evaluating passwords
|
CREATE SCHEMA IF NOT EXISTS `nullable_5`;
CREATE TABLE IF NOT EXISTS `t_order` (`order_id` INT NOT NULL, `user_id` INT NULL, `status` VARCHAR(45) NULL, PRIMARY KEY (`order_id`));
|
/*! SET default_storage_engine=INNODB */;
-- Subscription events
drop table if exists analytics_subscription_transitions;
create table analytics_subscription_transitions (
record_id serial unique
, subscription_event_record_id bigint /*! unsigned */ default null
, bundle_id varchar(36) default null
, bundle_external... |
Steps -
1.
create table users (
id number(10),
uname VARCHAR2(120 BYTE),
username VARCHAR2(120 BYTE),
upassword VARCHAR2(120 BYTE),
email VARCHAR2(120 BYTE),
phone VARCHAR2(120 BYTE),
access_level VARCHAR2(120... |
WITH source AS (
SELECT *
FROM {{ ref('team_yaml_source') }}
), filtered as (
SELECT *
FROM source
WHERE rank = 1
)
SELECT *
FROM filtered |
EXPLAIN WITH RECURSIVE
excluded_commits AS (
SELECT c.commit_sha, c.parents
FROM git_commits c
WHERE c.git_repository_id = 259999622 AND c.commit_sha = 'a3ac79f3116ff28250fc6415d66257aea8bd4b69'
UNION
SELECT c.commit_sha, c.parents
FROM git_commits c
INNER JOIN excluded_commits ON (c.... |
-- @testpoint:openGauss关键字Grouping(非保留),作为列名带反引号(合理报错)
drop table if exists explain_test;
create table explain_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 char(50) d... |
SELECT
ar.replica_server_name,
adc.database_name,
ag.name AS ag_name,
drs.is_local,
drs.is_primary_replica,
drs.synchronization_state_desc,
drs.is_commit_participant,
drs.synchronization_health_desc,
drs.recovery_lsn,
drs.truncation_lsn
FROM sys.dm_hadr_database_replica_states AS drs
INNER JOIN sys.a... |
Version Since Name Description
1.2.0 1.1.0 Container A container of other elements. If "Container" is specified the element must have sub-elements specified.
1.2.0 1.1.0 Count A whole number.
1.2.0 1.1.0 DateTime A value is given in the ISO 8601 recommended primary standard notation: YYYY-MM-DD. where YYYY is the year... |
/* Copyright (c) 2014, Unify Solutions Pty Ltd
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the fol... |
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
CREATE DATABASE IF NOT E... |
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 23, 2017 at 09:33 AM
-- 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... |
{{
config(
materialized = 'table',
unique_key = 'player_key'
)
}}
with rosters as (
select * from {{ ref('stg_rosters') }}
)
select
{{ dbt_utils.surrogate_key(['p.season_nbr', 'p.season_type_code', 'p.team_code', 'p.player_id'] )}} as player_key,
p.*,
{{ dbt_housekeeping() }}
fro... |
-- drop the id column from timeseries_measurement
ALTER TABLE timeseries_measurement DROP COLUMN id;
-- timeseries_measurements - add primary key which should also index
ALTER TABLE timeseries_measurement ADD PRIMARY KEY (timeseries_id, time);
--add new view for instrument_groups
-- v_instrument_group
CREATE OR REPL... |
-- Name: RoundSummary1AvoidingCrash
-- Schema: posda_backlog
-- Columns: ['round_id', 'round_start', 'duration', 'round_end', 'sum']
-- Args: []
-- Tags: ['NotInteractive', 'Backlog', 'Backlog Monitor', 'backlog_analysis_reporting_tools']
-- Description: Summary of rounds
select
distinct round_id,
round_start,
... |
select to_char(request_dt, 'yyyy-mm-dd') as "dt", count(access_log.user_agent_id) as "blexbot_cnt"
from access_log where user_agent_id in (
select user_agent_id from user_agent_d
where user_agent in (
'Mozilla/5.0 (compatible; BLEXBot/1.0; +http://webmeup-crawler.com/)',
'Mozilla/5.0 (compatible; BLEXBot/1.0... |
INSERT INTO user (name, email, password, created_by, creation_dt) VALUES ('Administrator', 'admin@apolo.br', '21232f297a57a5a743894a0e4a801fc3', 1, NOW());
INSERT INTO user_group (name, created_by, creation_dt) VALUES ('Administrators', 1, NOW());
INSERT INTO group_permission (group_id, permission_name) VALUES ((SELEC... |
-- trans.test
--
-- execsql {
-- DROP INDEX i1;
-- SELECT * FROM t1 WHERE c<1;
-- }
DROP INDEX i1;
SELECT * FROM t1 WHERE c<1; |
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[SPC_M003_ACT2]') AND type IN (N'P', N'PC'))
/****** Object: StoredProcedure [dbo].[SPC_M001_ACT2] Script Date: 2017/11/23 15:16:49 ******/
DROP PROCEDURE [dbo].[SPC_M003_ACT2]
GO
/****** Object: StoredProcedure [dbo].[SPC_M001_ACT2] ... |
CREATE TABLE "public"."option_poll_votes"("id" serial NOT NULL, "option_poll_id" integer NOT NULL, "user_id" integer NOT NULL, "option" text NOT NULL, "created_at" timestamptz NOT NULL DEFAULT now(), "updated_at" timestamptz NOT NULL DEFAULT now(), PRIMARY KEY ("id") , FOREIGN KEY ("option_poll_id") REFERENCES "public"... |
-- SQL in this file will be loaded into the database after the webinstaller
-- has been run/mimicked. This means that it will only be run/loaded if
-- skip_webinstaller="1" in config.cfg
-- Make sure language and opaclanguages are both set to 'en'
UPDATE systempreferences SET value = 'en' WHERE variable = 'language';
... |
BEGIN;
SET ROLE TO postgres;
CREATE OR REPLACE FUNCTION ticket_state_next(param_project_id bigint, param_ticket_type enum_ticket_type, param_ticket_state enum_ticket_state)
RETURNS TABLE(ticket_state enum_ticket_state, service_executable boolean) AS
$$
DECLARE
BEGIN
RETURN QUERY
SELECT
pts.ticket_state, pts.s... |
INSERT INTO user (id, username, password, algorithm, role)
VALUES ('1', 'suleyman', '$2a$12$fmJyjMzVvrGFbt4.wWhqvuq5iE.Z.xXRL3y1YRidxk89NpsOXHUN.', 'BCRYPT', 'user' );
INSERT INTO authority (id, name, user) VALUES ('1', 'READ', '1');
INSERT INTO authority (id, name, user) VALUES ('2', 'WRITE', '1');
INSERT INTO produ... |
-- Database: bixi
-- DROP DATABASE bixi;
CREATE DATABASE bixi
WITH
OWNER = postgres
ENCODING = 'UTF8'
LC_COLLATE = 'C'
LC_CTYPE = 'C'
TABLESPACE = pg_default
CONNECTION LIMIT = -1;
COMMENT ON DATABASE bixi
IS 'BiXi Database';
-- SCHEMA: bschema
-- DROP SCHEMA bschema ;
CREATE SC... |
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE identity (
id INTEGER NOT NULL,
name VARCHAR(250) NOT NULL,
contact VARCHAR(250) NOT NULL,
maddr VARCHAR(64) NOT NULL,
daddr VARCHAR(64) NOT NULL,
dkey VARCHAR(64) NOT NULL,
will_mediate BOOLEAN NOT NULL,
mediation_fee FLOAT NOT NULL,
PRIMARY KEY... |
-- MySQL dump 10.13 Distrib 5.7.32, for osx10.16 (x86_64)
--
-- Host: 10.1.3.28 Database: kylin_semantic_test_1.2.4
-- ------------------------------------------------------
-- Server version 5.7.26
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTE... |
DROP TABLE IF EXISTS `[db_prefix]handlers`, `[db_prefix]actions`, `[db_prefix]networks`, `[db_prefix]users`, `[db_prefix]settings`;
DELETE FROM `sys_permalinks` WHERE `check` IN ('sk_social_posting_permalinks');
DELETE FROM `sys_options` WHERE `Name` = 'sk_social_posting_permalinks';
SET @iHandlerId:= (SELECT `id` FR... |
ALTER TABLE `cms_sites` CHANGE `name` `title` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '站点标题';
ALTER TABLE `cms_sites` ADD `name` VARCHAR(40) NOT NULL COMMENT '英文名称' AFTER `id`;
ALTER TABLE `cms_sites` ADD `domain` VARCHAR(100) COLLATE utf8_unicode_ci NOT NULL COMMENT '域名' AFTER `compan... |
-- phpMyAdmin SQL Dump
-- version 4.8.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 29 Okt 2018 pada 08.32
-- Versi server: 10.1.31-MariaDB
-- Versi PHP: 7.2.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... |
USE `ccio`;
ALTER TABLE Videos CHANGE end end TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP; |
select carga, count(*) from cursos
group by carga; /* agrupa os dados de acordo com os parametros */
select carga, count(*) from cursos where totaulas = 30
group by carga;
select ano, count(*) from cursos
where totaulas > 30
group by ano
having ano > 2013 /* só selecionará os cursos onde cumprem os parametros */
orde... |
-- lock2.test
--
-- execsql {
-- SELECT * FROM sqlite_master;
-- }
SELECT * FROM sqlite_master; |
INSERT INTO k_lu_countries (id_country,tr_country_en,tr_country_es,tr_country_fr,tr_country_de,tr_country_it,tr_country_pt,tr_country_cn,tr_country_u1,tr_country_u2,tr_country_u3,tr_country_u4) VALUES ('ad ','Andorra','Andorra','Andorre','Andorra','Andorra','#pt#','#cn#',NULL,NULL,NULL,NULL);
INSERT INTO k_lu_countri... |
CREATE TABLE [dbo].[Fee] (
[Id] INT IDENTITY (1, 1) NOT NULL,
[FeeRecordId] INT NULL,
[FeeRecordType] VARCHAR (255) NULL,
[MoneyId] INT NULL,
[FeeTypeId] INT NULL,
[Description] VARCHAR (255) NULL,
... |
/*
1479. Sales by Day of the Week
Table: Orders
+---------------+---------+
| Column Name | Type |
+---------------+---------+
| order_id | int |
| customer_id | int |
| order_date | date |
| item_id | varchar |
| quantity | int |
+---------------+---------+
(ordered_id, item_... |
select title, akas
from gcp.gcp_compute_target_ssl_proxy
where name = '{{ resourceName }}'; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.