text stringlengths 1 1.05M |
|---|
--
-- PGP compression support
--
select pgp_sym_decrypt(dearmor('
-----BEGIN PGP MESSAGE-----
ww0ECQMCsci6AdHnELlh0kQB4jFcVwHMJg0Bulop7m3Mi36s15TAhBo0AnzIrRFrdLVCkKohsS6+
DMcmR53SXfLoDJOv/M8uKj3QSq7oWNIp95pxfA==
=tbSn
-----END PGP MESSAGE-----
'), 'key', 'expect-compress-algo=1');
select pgp_sym_decrypt(
pgp_sym_en... |
BEGIN;
DROP TABLE IF EXISTS out_of_band_migrations_errors;
DROP TABLE IF EXISTS out_of_band_migrations;
COMMIT;
|
-- @testpoint:正常建行存表(分区表)及数据插入
drop table if exists object_identifier_011;
CREATE TABLE object_identifier_011(
c1 OID,
c2 CID,
c3 XID,
c4 TID,
c5 REGCONFIG,
c6 REGDICTIONARY,
c7 REGOPER,
c8 REGOPERATOR,
c9 REGPROC,
c10 REGPROCEDURE,
c11 REGCLASS,
c12 REGTYPE
c13 int
)
WITH (orientation=row, compression=no)... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 11, 2020 at 01:39 PM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.4.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
-- Database: derby
-- Change Parameter: constraintName=const_name
-- Change Parameter: tableName=person
ALTER TABLE person DROP CONSTRAINT const_name;
|
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Waktu pembuatan: 30 Jul 2019 pada 15.30
-- Versi server: 10.1.38-MariaDB
-- Versi PHP: 7.3.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... |
CREATE OR REPLACE STREAM "DESTINATION_SQL_STREAM_BY_STORE" (
"type" VARCHAR(20), "region" VARCHAR(10),
"state" VARCHAR(2), "store-id" INTEGER,
kpi_1_sum INTEGER, kpi_2_sum INTEGER,
kpi_3_sum INTEGER, kpi_4_sum INTEGER,
kpi_5_sum INTEGER,
n_rec INTEGER,
ingest_time TIMESTAMP,
event_ti... |
-- using default substitutions
select
sum(l_extendedprice* (1 - l_discount)) as revenue
from
lineitem,
part
where
(
p_partkey = l_partkey
and p_brand = 'Brand#12'
and p_container in ('SM CASE', 'SM BOX', 'SM PACK', 'SM PKG')
and l_quantity >= 1 and l_quantity <= 1 + 10
and p_size between 1 ... |
CREATE TABLE APPLICATION (
APPLICATION_ID BIGINT NOT NULL AUTO_INCREMENT,
APPLICATION_UUID VARCHAR(64) NOT NULL,
NAME VARCHAR(100) NOT NULL,
ACTIVE BIT NOT NULL DEFAULT 1,
CREATE_DATE DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
MODIFIED_DATE DATETIME ... |
/*
AUTHOR: Aaron Abrahamson, Yu Fen Lin, Akash Rama
Date: Nov 12, 2019
NOTE: This query joins who and age table to pums_2017 and gets total amount of people based
on wheater or not they are an opportunity you
*/
SELECT
SUM(pums_2017.pwgtp) AS estimated_people,
RO... |
-- +goose Up
ALTER TABLE miners
ADD quality_adj_power BIGINT NOT NULL;
-- +goose Down
ALTER TABLE miners
DROP COLUMN quality_adj_power;
|
INSERT INTO user (email, password, nickname) values(?, ?, ?) |
-- using 1365545250 as a seed to the RNG
select
n_name,
sum(l_extendedprice * (1 - l_discount)) as revenue
from
customer,
orders,
lineitem,
supplier,
nation,
region
where
c_custkey = o_custkey
and l_orderkey = o_orderkey
and l_suppkey = s_suppkey
and c_nationkey = s_nationkey
and s_nationkey = n_nationke... |
.echo on
select regexp('\w+','abc');
|
DROP DATABASE IF EXISTS employeeDB;
CREATE DATABASE employeeDB;
USE employeeDB;
CREATE TABLE employees (
id int NOT NULL AUTO_INCREMENT,
employee_name varchar(30) NOT NULL,
role_id int,
manager_id int,
PRIMARY KEY (id)
);
CREATE TABLE departments (
id int NOT NULL AUTO_INCREMENT,
deptNam... |
ALTER TABLE CUSTOMER_MASTER
MODIFY COLUMN PHONE_NO(10); |
Create table tblStudents
(
Id int primary key identity,
Name nvarchar(50),
Gender nvarchar(10),
City nvarchar(20)
)
Go
Insert into tblStudents values ('Mark', 'Male', 'London')
Insert into tblStudents values ('John', 'Male', 'Chennai')
Insert into tblStudents values ('Sara', 'Female', 'Sydney')
Insert ... |
-- file:drop_if_exists.sql ln:137 expect:true
DROP TEXT SEARCH TEMPLATE IF EXISTS test_tstemplate_exists
|
CREATE TABLE [history].[tbl_Url] (
[Id] UNIQUEIDENTIFIER NOT NULL,
[AudienceId] UNIQUEIDENTIFIER NOT NULL,
[UrlHost] NVARCHAR (1024) NULL,
[UrlPath] NVARCHAR (1024) NULL,
[IsEnabled] BIT NOT NULL,
[IsDeletable] BIT ... |
Select
cat_weight,
days,
pct_change,
injection_amount,
gs_brand,
coalesce(InjectionLog_usergs.price,InjectionLog_gsbrand.price) as price,
case
when wt_units ="kg" then starting_wt*2.2
else starting_wt
end as start_wt
from
(Select
old.cat_weight as starting_wt,
round((InjectionLog_injectionlog... |
SET DEFINE OFF;
Insert into DZ_SWAGGER3_GROUP
(GROUP_ID, DOC_ID, PATH_ID, PATH_ORDER, VERSIONID)
Values
('SAMPLE', 'SAMPLE', 'Sample.Navigation30', 1000000, 'SAMPLE');
Insert into DZ_SWAGGER3_GROUP
(GROUP_ID, DOC_ID, PATH_ID, PATH_ORDER, VERSIONID)
Values
('SAMPLE', 'SAMPLE', 'Sample.Streamcat', 1000010, ... |
CREATE OR REPLACE FUNCTION request(path VARCHAR) RETURNS TEXT AS $$
DECLARE
header TEXT;
response response_type;
path_query TEXT[];
path_parts TEXT[];
parts_count INTEGER;
year_text TEXT;
month_text TEXT;
BEGIN
response.status = 400;
--split into path and query
path_query := r... |
-- fts3cov.test
--
-- execsql {
-- CREATE VIRTUAL TABLE t3 USING fts3(x);
-- INSERT INTO t3(t3) VALUES('nodesize=24');
-- INSERT INTO t3(t3) VALUES('maxpending=100');
-- }
CREATE VIRTUAL TABLE t3 USING fts3(x);
INSERT INTO t3(t3) VALUES('nodesize=24');
INSERT INTO t3(t3) VALUES('maxpending=100'); |
-- Adminer 4.8.1 MySQL 8.0.27 dump
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
SET NAMES utf8mb4;
DROP TABLE IF EXISTS `benutzer`;
CREATE TABLE `benutzer` (
`ID` int NOT NULL AUTO_INCREMENT,
`Benutzername` varchar(255) NOT NULL,
`Pa... |
CREATE PROCEDURE [dbo].[usp_InsertAccountEvents]
@aggregateId [uniqueidentifier],
@eventsToInsert EventStoreType READONLY,
@expectedVersion BIGINT
AS
BEGIN TRAN
DECLARE @currentLatestVersion BIGINT
SELECT @currentLatestVersion = ISNULL(MAX([Version]),0) FROM [dbo].[EventStore-Account] WHERE [AggregateId]... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 17, 2021 at 09:27 AM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.3.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 29 Nov 2018 pada 14.57
-- Versi server: 10.1.36-MariaDB
-- Versi PHP: 7.2.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHAR... |
--
-- postgreSql
-- INSERT
--
\set ECHO none
\ir sql/configs/postgresql_parameters.conf
\set ECHO all
\i sql/14.0/insert.sql
|
crispyspoon-admin/P@55w0rd-1
Server=tcp:crispyspoonserver.database.windows.net,1433;Initial Catalog=crispyspoonDB;Persist Security Info=False;User ID={your_username};Password={your_password};MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;
Scaffold-DbContext -Connection "S... |
/*
# Create the incidentaddress_with_census_tracts_and_lat_lons View#
Generates a view of the "incidentaddresses" table with year 2000 and 2010 census tracts and
a latitude and longitude field.
*/
CREATE OR REPLACE VIEW incidentaddress_with_census_tracts_and_lat_lons AS
SELECT a.*, b.tractce00 AS census_2000_tract_... |
alter table egcncl_preamble_bidder add column code character varying(30);
|
alter session set `store.hive.optimize_scan_with_native_readers` = true;
-- start query 62 in stream 0 using template query62.tpl
SELECT Substr(w_warehouse_name, 1, 20),
sm_type,
web_name,
Sum(CASE
WHEN ( ws_ship_date_sk - ws_sold_date_sk <= 30 ) THEN 1
ELSE 0
END) AS `30 days`,
Sum(CASE
WHEN ( ws_ship_date_sk - ws_sol... |
--
-- CzechIdM 7.6 Flyway script
-- BCV solutions s.r.o.
--
-- attachments
CREATE TABLE idm_attachment
(
id bytea NOT NULL,
created timestamp without time zone NOT NULL,
creator character varying(255) NOT NULL,
creator_id bytea,
modified timestamp without time zone,
modifier character varying(255),
modi... |
WHENEVER SQLERROR EXIT -1
SET ECHO ON
-- Session settings.
ALTER SESSION SET NLS_LENGTH_SEMANTICS='CHAR';
-- Define helper procedure to drop tables.
BEGIN
EXECUTE IMMEDIATE 'DROP PROCEDURE drop_table';
EXCEPTION
WHEN OTHERS THEN
-- If procedure doesn't exist, it can't be dropped,
-- so an ex... |
-- #############################################################################
-- LEFT JOIN
--
-- Examples of Left Join queries.
--
-- #############################################################################
-- -----------------------------------------------------------------------------
-- LEFT OUTER JOIN
--
-... |
CREATE PROCEDURE SP_VehiculosDeClientes_Delete
@Matricula VARCHAR (9)
AS
BEGIN
SELECT * FROM VehiculosDeClientes WHERE Matricula = @Matricula
UPDATE VehiculosDeClientes SET Activo = 0 WHERE Matricula = Matricula
END |
---------- C R E A T E U S E R -----------
DROP USER readonly;
CREATE USER readonly;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO readonly;
---------- M E T A T A B L E S -----------
DROP TABLE dbtree CASCADE;
CREATE TABLE dbtree (
id integer PRIMARY KEY, -- same as UNIQUE NOT NULL
parent ... |
CREATE INDEX IF NOT EXISTS testindex2 ON testtable USING btree (field2);
ALTER TABLE testtable CLUSTER ON testindex2;
|
--Signup-60
-- add the UUID columns
ALTER TABLE signup_meetings ADD vevent_uuid VARCHAR2(255) NULL;
ALTER TABLE signup_ts ADD vevent_uuid VARCHAR2(255) NULL; |
DROP TABLE IF EXISTS users;
CREATE TABLE users
(
id SERIAL PRIMARY key,
name TEXT NOT NULL NOT NULL
);
|
-- ================================================================
-- APL_AREA, CREATE_SOCIAL_MODEL_AND_TRAIN, using a native format for the model
--
-- Assumption 1: The users & privileges have been created & granted (see apl_admin.sql).
-- Assumption 2: The APL table types have been created (see apl_create_table... |
-- CreateTable
CREATE TABLE "Tank" (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"x" INTEGER NOT NULL,
"y" INTEGER NOT NULL,
"userId" INTEGER NOT NULL,
CONSTRAINT "Tank_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
);
|
SELECT COUNT(*)
FROM company_name AS cn,
company_type AS ct,
info_type AS it1,
info_type AS it2,
movie_companies AS mc,
movie_info AS mi,
movie_info_idx AS mi_idx,
title AS t
WHERE cn.country_code = '[us]'
AND ct.kind = 'production companies'
AND it1.info = 'genres'
AND it2.inf... |
DELETE FROM acesso.rlc_menus_perfis
WHERE cod_perfil_fk not in (1);
DELETE FROM acesso.rlc_perfis_funcionalidades_acoes
WHERE cod_perfil_fk not in (1);
DELETE FROM acesso.rlc_usuarios_perfis
WHERE cod_perfil_fk not in (1)
DELETE FROM acesso.tab_perfis
WHERE cod_perfil not in (1)
DELETE FR... |
*1. Выбор значений, заданных атрибутов из более, чем двух таблиц, с сортировкой – от 1 балла*/
/*Вывод номер диеты, id курицы*/
select "id», diet."number_diet" from public."chicken",public."diet" where "chicken». «number diet" = "diet"."number_diet" group by "di-et"."number_diet","chivken"."id ";
/*2. Использование у... |
-- Copyright 2021 Cargill Incorporated
--
-- 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 agre... |
{{ config(
unique_key = env_var('AIRBYTE_DEFAULT_UNIQUE_KEY', '_airbyte_ab_id'),
schema = "_airbyte_test_normalization",
tags = [ "top-level-intermediate" ]
) }}
-- SQL model to build a hash column based on the values of this record
select
{{ dbt_utils.surrogate_key([
'id',
'conflict_str... |
UPDATE AD_Column SET readonlyLogic=replace(readonlyLogic, '@OrderType@', '@OrderType/''?''@'), UpdatedBy=99, Updated='2019-12-19 09:03:38.556194+01' WHERE readonlyLogic ilike '%@OrderType@%';
UPDATE AD_Field SET displaylogic=replace(displaylogic, '@OrderType@', '@OrderType/''?''@'), UpdatedBy=99, Updated='2019-12-19 ... |
/* Test SQL */
/*
multi
line
comment
*/
-- SELECT SQL
SELECT
12
FROM
DUAL;
|
DROP TABLE PARTICIPANT_ANSWER; |
SET SCHEMA 'data';
create function update_product(p_product_id UUID, p_product_name TEXT, p_product_description varchar(255), p_product_sizes size[], p_product_price float8)
returns void
language plpgsql
as
$$
declare
begin
UPDATE data.products
SET product_name = p_product_name,
product_description = p_product_des... |
INSERT INTO colours ( name )
VALUES
( 'GreenYellow' ),
( 'Yellow' ),
( 'Goldenrod' ),
( 'Dandelion' ),
( 'Apricot' ),
( 'Peach' ),
( 'Melon' ),
( 'YellowOrange' ),
( 'Orange' ),
( 'BurntOrange' ),
( 'Bittersweet' ),
... |
CREATE VIEW [rd].[MailTasks]
AS SELECT [Id], [Name], [Text], [Recipients], [EnviromentId],ApplicationId , [Sender]
FROM [dbo].MailTasks
WHERE Deleted = 0
|
2 12
0 0 0 0 11 1
0 0 0 0 7 1
0 0 0 1 1 1
0 0 0 1 6 1
0 0 0 11 0 6
0 0 0 9 0 6
0 0 1 0 0 11
0 0 1 0 11 11
0 0 6 1 6 1
0 1 0 0 2 2
0 1 0 0 5 2
0 1 1 2 1 2
0 1 1 2 2 2
0 1 1 2 7 7
0 1 11 2 1 2
0 1 2 2 7 1
0 1 7 2 1 2
0 11 0 0 0 5
0 11 3 0 0 11
0 11 5 0 0 11
0 2 0 0 2 2
0 2 0 0 3 2
0 2 0 0 5 2
0 5 0 0 0 3
1 0 11 1 9 1
1 0... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Nov 24, 2019 at 09:44 AM
-- Server version: 5.7.26-0ubuntu0.18.04.1
-- PHP Version: 7.2.19-0ubuntu0.18.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+0... |
UPDATE "selfservice_verification_flows" SET "nid" = "_nid_tmp"; |
-- For reference, some common unit conversions:
-- 10^9/L == K/uL == 10^3/uL
WITH blood_diff AS
(
SELECT
MAX(subject_id) AS subject_id
, MAX(hadm_id) AS hadm_id
, MAX(charttime) AS charttime
, le.specimen_id
-- create one set of columns for percentages, and one set of columns for counts
-- we harmonize al... |
/*
SQL Schema
Table: Salary
+-------------+----------+
| Column Name | Type |
+-------------+----------+
| id | int |
| name | varchar |
| sex | ENUM |
| salary | int |
+-------------+----------+
id is the primary key for this table.
The sex column is ENUM value of type... |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 13, 2022 at 05:54 PM
-- Server version: 10.4.21-MariaDB
-- PHP Version: 8.0.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
CREATE TABLE IF NOT EXISTS transactions (
tx_time CHAR(19) NOT NULL,
tx_type CHAR(1) NOT NULL,
tx_hash CHAR(128) NOT NULL,
tx_data TEXT NOT NULL,
tx_prev CHAR(128) NOT NULL,
tx_epoc TEXT NOT NULL,
tx_subg CHAR(128) NOT NULL,
tx_prnt CHAR(128),
tx_mile BOOLEAN NOT NULL,
tx_lead B... |
/*
Navicat Premium Data Transfer
Source Server : localhost_3306
Source Server Type : MySQL
Source Server Version : 50721
Source Host : localhost:3306
Source Schema : blog
Target Server Type : MySQL
Target Server Version : 50721
File Encoding : 65001
Date: 05/05/2018 ... |
CREATE TABLE IF NOT EXISTS productos(
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
nombre VARCHAR(255) NOT NULL,
descripcion VARCHAR(1024) NOT NULL,
precio DECIMAL(9,2)
);
CREATE TABLE IF NOT EXISTS carrito_usuarios(
id_sesion VARCHAR(255) NOT NULL,
id_producto BIGINT UNSIGNED NOT NUL... |
CREATE TABLE [Staging].[LARS_FrameworkMetaData] (
[FworkCode] INT NOT NULL,
[ProgType] INT NOT NULL,
[PwayCode] INT NOT NULL,
[Roles] NVARCHAR (MAX) NULL,
[Keywords] NVARCHAR (MAX) NULL,
[EffectiveFrom] DATE NULL,
[Effect... |
-- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tiempo de generación: 04-02-2018 a las 22:11:04
-- Versión del servidor: 5.7.17-0ubuntu0.16.04.1
-- Versión de PHP: 7.0.22-0ubuntu0.16.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
... |
UPDATE KNOWLEDGE_FILES
SET
KNOWLEDGE_ID = ?
, COMMENT_NO = ?
, FILE_NAME = ?
, FILE_SIZE = ?
, FILE_BINARY = ?
, PARSE_STATUS = ?
, INSERT_USER = ?
, INSERT_DATETIME = ?
, UPDATE_USER = ?
, UPDATE_DATETIME = ?
, DELETE_FLAG = ?
WHERE
FILE_NO = ?
;
|
DROP VIEW IF EXISTS rpqView;
CREATE VIEW rpqView
AS
SELECT
n1.nodeId AS startNode, n2.nodeId AS endNode, edgeTypeId AS label
FROM edge
INNER JOIN node n1 ON n1.nodeId = edge.startNodeId
INNER JOIN node n2 ON n2.nodeId = edge.endNodeId;
|
/*Table structure for table `users` */
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
`id` int(5) NOT NULL AUTO_INCREMENT,
`user` varchar(50) UNIQUE NOT NULL,
`password` char(128) NOT NULL,
cognome varchar(50) NOT NULL,
nome varchar(50) NOT NULL,
data_nascita date NOT NULL,
via varchar(50) NOT NUL... |
ALTER TABLE trait DROP COLUMN bar_index;
ALTER TABLE trait ADD COLUMN skilled BOOLEAN NOT NULL DEFAULT false; |
create database master_monitoring;
set timezone TO 'Europe/Kiev';
|
ALTER TABLE benchmark_runs ADD COLUMN executions_mean_duration DOUBLE PRECISION NOT NULL DEFAULT -1;
ALTER TABLE benchmark_runs ADD COLUMN executions_stddev_duration DOUBLE PRECISION NOT NULL DEFAULT -1;
UPDATE benchmark_runs b
SET executions_mean_duration = bro.mean_duration, executions_stddev_duration = bro.stddev_d... |
-- MySQL dump 10.13 Distrib 8.0.19, for Win64 (x86_64)
--
-- Host: localhost Database: tyson_lackey
-- ------------------------------------------------------
-- Server version 8.0.19
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */... |
INSERT INTO pos_itemtemp VALUES("IATT190003610","193071","191001","192012","18000","1","18000","7920","10080","1","1","1","IAT0311191026","NHO2018000007","PAID","","193071"),
("IATT190003611","193022","191001","192003","30000","1","30000","0","30000","1","1","1","IAT0311191026","NHO2018000007","PAID","","193022"),
("IA... |
CREATE SEQUENCE SEQ_IACUC_PROTO_CORR_ID INCREMENT BY 1 START WITH 1 NOCACHE
/
|
-- MySQL Script generated by MySQL Workbench
-- mer. 05 janv. 2022 16:11:49
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS = @@UNIQUE_CHECKS,
UNIQUE_CHECKS = 0;
SET @OLD_FOREIGN_KEY_CHECKS = @@FOREIGN_KEY_CHECKS,
FOREIGN_KEY_CHECKS = 0;
SET @OLD_SQL_MODE = @@SQ... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: May 02, 2016 at 11:36 AM
-- Server version: 10.1.10-MariaDB
-- PHP Version: 7.0.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... |
#ALTER TABLE `tickets`
ADD COLUMN `inclusive_fee` TINYINT(3) NOT NULL DEFAULT 0 AFTER `avail_hours`;
|
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','272','131','2.05','2.05','... |
DELETE FROM `reference_loot_template` WHERE `entry` IN (47120, 47121);
INSERT INTO `reference_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `lootmode`, `groupid`, `mincountOrRef`, `maxcount`) VALUES
(47120, 60245, 0, 1, 1, 1, 1),
(47120, 60247, 0, 1, 1, 1, 1),
(47120, 60248, 0, 1, 1, 1, 1),
(47120, 60250, 0,... |
/****** Object: Table [dbo].[T_Job_Steps_History] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[T_Job_Steps_History](
[Job] [int] NOT NULL,
[Step_Number] [int] NOT NULL,
[Priority] [int] NULL,
[Step_Tool] [varchar](64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Shared... |
/*
Warnings:
- You are about to drop the `Likes` table. If the table is not empty, all the data it contains will be lost.
- Made the column `authorId` on table `Sound` required. This step will fail if there are existing NULL values in that column.
*/
-- DropForeignKey
ALTER TABLE "Likes" DROP CONSTRAINT "Likes_... |
-------------------------------------------------------------------------------
-- Date trigger functions
-------------------------------------------------------------------------------
CREATE FUNCTION {# geotrek.common #}.ft_date_insert() RETURNS trigger SECURITY DEFINER AS $$
BEGIN
NEW.date_insert := statement_t... |
------------------------------
-- Archivo de base de datos --
------------------------------
DROP TABLE IF EXISTS usuarios CASCADE;
CREATE TABLE usuarios
(
id BIGSERIAL PRIMARY KEY
, login VARCHAR(50) NOT NULL UNIQUE
CONSTRAINT ck_login_sin_espacios
... |
-- ----------------
-- 增加客户端区分 pm_order_fpzz
-- ----------------
ALTER TABLE `pm_order_fpzz`
ADD COLUMN `client_type` tinyint(2) DEFAULT 1 AFTER `request_number`; |
CREATE DATABASE marketing;
USE marketing;
--CATALOGOS
--
--
CREATE TABLE clientes(
id_cliente integer(10) PRIMARY KEY,
nombre_cliente varchar(30),
apellido_cliente varchar(30),
nombre_negocio varchar(30),
fecha_alta timestamp,
fecha_baja timestamp
);
CREATE TABLE tipos_usuario(
id_tipo integer(2) PRIMA... |
/*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 80025
Source Host : localhost:3306
Source Schema : drive
Target Server Type : MySQL
Target Server Version : 80025
File Encoding : 65001
Date: 01/06/2021 17:1... |
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[SPC_G004_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_G004_ACT2]
GO
/****** Object: StoredProcedure [dbo].[SPC_M001_ACT2] ... |
SELECT sd.id AS id,
sd.tanggal,
sd.kode,
sd.jumlah AS jumlah_in,
coalesce(i.jumlah,0) AS jumlah_konversi,
coalesce(p.jumlah, 0) AS jumlah_penjualan,
sd.jumlah - coalesce(i.jumlah,0)- coalesce(p.jumlah,0) AS sisa
FROM transaction_stok_det sd
LEFT OUTER JOIN
( SELECT ki.stok_id,... |
-- Remove duplicates from property_definition table (if any)
DELETE FROM property_definition
WHERE id in (
SELECT t1.id
FROM property_definition t1
JOIN property_definition t2 ON (t2.name = t1.name AND t2.item_id = t1.item_id AND t2.id > t1.id)
);
CREATE UNIQUE INDEX idx_items_property_def_name_item_id ON p... |
--To disable this model, set the using_estimate variable within your dbt_project.yml file to False.
{{ config(enabled=var('using_estimate', True)) }}
with base as (
select *
from {{ ref('stg_quickbooks__estimate_line_tmp') }}
),
fields as (
select
/*
The below macro is used to generate... |
-- insert data whith create hash partition table on a varchar field with size 4 and update data and query data from every partition and then drop table
create table hash_test(id int ,
test_char char(50),
test_varchar varchar(2000),
test_bit bit(16),
test_varbit bit varying(20),
test_nchar nc... |
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE general_params ( "name" text, "value" text );
INSERT INTO "general_params" VALUES('list_report_data_table','V_Run_Planning_Report');
INSERT INTO "general_params" VALUES('list_report_data_sort_dir','ASC');
INSERT INTO "general_params" VALUES('list_report_dat... |
USE RTK;
SET @script = '2020-09-27-20-03_RebalanceWeapons.sql';
DELIMITER $$
DROP PROCEDURE IF EXISTS sp $$
CREATE PROCEDURE sp(
IN scriptName VARCHAR(255)
)
BEGIN
IF NOT EXISTS (SELECT * FROM MigrationHistory WHERE Script = scriptName) THEN
UPDATE Items SET ItmPthId = '0', ItmIdentifier = 'axe', ItmDescriptio... |
{% macro dateadd(datepart, interval, from_date_or_timestamp) %}
{{ return(adapter.dispatch('dateadd', 'cc_dbt_utils')(datepart, interval, from_date_or_timestamp)) }}
{% endmacro %}
{% macro default__dateadd(datepart, interval, from_date_or_timestamp) %}
dateadd(
{{ datepart }},
{{ interval }},
... |
-- Queries_PH-EmployeeDB.sq
SELECT e.emp_no, e.first_name, e.last_name, t.title, t.from_date, t.to_date
INTO retirement_titles
FROM employees AS e
INNER JOIN titles AS t
ON (e.emp_no = t.emp_no)
-- filter on birth_date
WHERE (e.birth_date BETWEEN ('1951-01-01') AND ('1955-12-31'))
ORDER BY e.emp_no;
-- Using starter... |
create table TaskVariableImpl (
id bigint not null auto_increment,
modificationDate datetime,
name varchar(255),
processId varchar(255),
processInstanceId bigint,
taskId bigint,
type integer,
value varchar(4000),
primary key (id)
) ENGINE=InnoDB;
create table QueryDefinitionStore (
... |
INSERT INTO public.territorios_dashboard (
id,
descricao,
categoria,
the_geom
)
SELECT
(featureid + 800000000) AS id,
name AS descricao,
categoria,
geom as the_geom
FROM public.tis_tmp ;
|
CREATE EXTENSION IF NOT EXISTS anon CASCADE;
-- INIT
SELECT anon.start_dynamic_masking();
CREATE TABLE t1 (i int);
\! vacuumlo -v contrib_regression
-- CLEAN
DROP EXTENSION anon CASCADE;
DROP SCHEMA mask CASCADE;
DROP TABLE t1;
|
-- MySQL dump 10.13 Distrib 8.0.19, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: vmart
-- ------------------------------------------------------
-- Server version 8.0.19
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40... |
load_zone allow_overgeneration overgeneration_penalty_per_mw allow_unserved_energy unserved_energy_penalty_per_mwh max_unserved_load_penalty_per_mw export_penalty_cost_per_mwh
Zone1 1 99999999.0 1 99999999.0 0.0 0.0
Zone2 1 99999999.0 1 99999999.0 0.0 0.0
|
---- DROP TABLE IF EXISTS enduser_guide_doc CASCADE;
SELECT 'create the "enduser_guide_doc" table'
;
CREATE TABLE enduser_guide_doc (
guid UUID NOT NULL DEFAULT gen_random_uuid()
, id bigint UNIQUE NOT NULL DEFAULT cast (to_char(current_timestamp, 'YYMMDDHH12MISS') as bigint)
,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.