text stringlengths 1 1.05M |
|---|
exec sp_executesql @stmt=N'begin try
declare @dbid int;
set @dbid = db_id();
declare @cnt int;
declare @record_count int;
declare @sql_handle varbinary(64);
declare @sql_handle_string varchar(130);
declare @grand_total_worker_time float ;
declare @grand_total_IO float ;
declare @sql_handle_convert_table tabl... |
-- La moyenne de tous les paiements
select avg(amount) from payment;
-- La moyenne de tous les paiements arrondie à 2 chiffres après la virgule
select round(avg(amount), 2) from payment;
-- Le paiement le plus petit
select min(amount) from payment;
-- Le paiement le plus grand
select max(amount) from payment;
-- La... |
-- 2.13 unions
-- we can combine rows
use sql_store;
select order_id,
order_date,
'Active' as Status
from orders
where order_date >= '2019-01-01'
union
select order_id,
order_date,
'Archive' as Status
from orders
where order_date < '2019-01-01';
Select first_name as names
from customers
union
select nam... |
/***** Table Orders *****/
IF OBJECT_ID('sales.Orders', 'U') is not NULL
DROP TABLE sales.Orders
;
GO
/***** Table Orders Creation *****/
CREATE TABLE sales.Orders
(
OrID SMALLINT IDENTITY(1,1) NOT NULL PRIMARY KEY,
OrDate DATE NOT NULL,
OrDeleted BIT NOT NULL,
) |
{{ config(
indexes = [{'columns':['_airbyte_emitted_at'],'type':'btree'}],
unique_key = '_airbyte_ab_id',
schema = "_airbyte_test_normalization",
tags = [ "top-level-intermediate" ]
) }}
-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type
-- depends_on: {{ ref('... |
--test insert(varchar) for many list partition(have no NULL value) with correct values within range
create table list_test(id int not null ,
test_char char(50),
test_varchar varchar(2000),
test_bit bit(16),
test_varbit bit varying(20),
test_nchar nchar(50),
test_nvarchar nchar varying(2000),
... |
-- Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
-- Copyright [2016-2019] 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... |
ALTER TABLE distributors RENAME TO suppliers;
|
set system parameters 'create_table_reuseoid=no';
autocommit off;
set system parameters 'dont_reuse_heap_file = yes';
-- create and populate tables
create table t (i int, j int);
create table u (i int, j int);
create table v (i int, j int);
insert into t values (1, 1), (2, 2), (3, 3);
insert into u values (1, 1), (2,... |
-- more characters for storing IP addresses (to accommodate IPv6)
ALTER TABLE jforum_posts MODIFY poster_ip VARCHAR2(50);
ALTER TABLE jforum_privmsgs MODIFY privmsgs_ip VARCHAR2(50);
ALTER TABLE jforum_banlist MODIFY banlist_ip VARCHAR2(50);
ALTER TABLE jforum_sessions MODIFY session_ip VARCHAR2(50);
ALTER TABLE jfor... |
select COUNT(*) from CITY where POPULATION > 100000; |
{% macro test_column_type(model, column_name, type) %}
{% set cols = adapter.get_columns_in_relation(model) %}
{% set col_types = {} %}
{% for col in cols %}
{% set _ = col_types.update({col.name: col.data_type}) %}
{% endfor %}
{% set val = 0 if col_types.get(column_name) == type else 1... |
ALTER TABLE HIVE_LOCKS ADD COLUMN HL_AGENT_INFO varchar(128);
|
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 26, 2021 at 03:09 PM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 8.0.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
SELECT
e.EmployeeID, e.FirstName, e.LastName, d.[Name]
FROM Employees e
LEFT OUTER JOIN Departments d
ON (e.DepartmentID = d.DepartmentID)
WHERE d.[Name] = 'Sales'
ORDER BY e.EmployeeID; |
CREATE TABLE IF NOT EXISTS locations (
search_query VARCHAR(125) PRIMARY KEY,
formatted_query VARCHAR(256),
latitude FLOAT ,
longitude FLOAT
);
CREATE TABLE IF NOT EXISTS weathers (
search_query VARCHAR(60),
forecast VARCHAR(265),
time VARCHAR(256)
);
CREATE TABLE IF NOT EXISTS parks (
search_query VARCHAR(60),
name VA... |
DROP TABLE pushes
|
--
-- Created by SQL::Translator::Producer::MySQL
-- Created on Sun Oct 2 21:17:41 2016
--
;
SET foreign_key_checks=0;
--
-- Table: `dbix_class_deploymenthandler_versions`
--
CREATE TABLE `dbix_class_deploymenthandler_versions` (
`id` integer NOT NULL auto_increment,
`version` varchar(50) NOT NULL,
`ddl` text ... |
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 22, 2021 at 11:21 AM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 8.0.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
INSERT INTO "LibraryItem_MetaDataItem" ("LibraryItem_Id", "MetaDataItem_Id")
SELECT @itemId, @metaDataItemId
WHERE NOT EXISTS(
SELECT *
FROM "LibraryItem_MetaDataItem"
WHERE "LibraryItem_Id" = @itemId AND "MetaDataItem_Id" = @metaDataItemId
); |
/*
* varray_dml2.sql
* Chapter 6, Oracle10g PL/SQL Programming
* by Ron Hardman, Michael McLaughlin and Scott Urman
*
* This script demonstrates how to update varrays.
*/
SET ECHO ON
SET SERVEROUTPUT ON SIZE 1000000
-- Clean up environment.
BEGIN
FOR i IN (SELECT null
FROM addresses
... |
-- TABLES
DROP TABLE IF EXISTS `bx_persons_data`,`bx_persons_pictures`, `bx_persons_pictures_resized`, `bx_persons_views_track`, `bx_persons_favorites_track`, `bx_persons_reports`, `bx_persons_reports_track`, `bx_persons_meta_keywords`;
-- PROFILES
DELETE FROM sys_profiles WHERE `type` = 'bx_persons';
-- STORAGES ... |
--
-- HOROLOGY
--
SET DateStyle = 'Postgres, MDY';
--
-- Test various input formats
--
SELECT timestamp with time zone '20011227 040506+08';
SELECT timestamp with time zone '20011227 040506-08';
SELECT timestamp with time zone '20011227 040506.789+08';
SELECT timestamp with time zone '20011227 040506.789-08';
SELECT t... |
-- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Dec 02, 2020 at 10:45 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.2.34
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 26, 2022 at 12:30 PM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.3.20
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
SET DEFINE OFF;
ALTER TABLE AFW_13_PAGE_IR_COLN ADD (
CONSTRAINT AFW_13_PAGE_IR_COLN_FK2
FOREIGN KEY (REF_MESG_AIDE)
REFERENCES AFW_01_MESG (SEQNC)
ENABLE VALIDATE)
/
|
/* 1.
The first example shows the goal scored by a player with the last name 'Bender'.
The * says to list all the columns in the table - a shorter way of saying matchid, teamid, player, gtime
Modify it to show the matchid and player name for all goals scored by Germany.
To identify German players, check for: teamid =... |
delete Organisation.Note
where text = 'haunted'
|
-- SELECT cid, cname, mname
-- FROM customers NATURAL FULL JOIN rentals
-- NATURAL FULL JOIN movies
-- ORDER BY mname;
-- UPDATE customers
-- SET cname = cname || '+HERO'
-- -- SET cname = CONCAT(cname,'+HERO')
-- WHERE cid IN (1);
-- SELECT cid, cname, mname
-- FROM customers NATURAL F... |
CREATE TABLE namespaces(
partition_id INT NOT NULL,
id BINARY(16) NOT NULL,
name VARCHAR(255) UNIQUE NOT NULL,
notification_version BIGINT NOT NULL,
--
data MEDIUMBLOB NOT NULL,
data_encoding VARCHAR(16) NOT NULL,
is_global TINYINT(1) NOT NULL,
PRIMARY KEY(partition_id, id)
);
CREATE TABLE namespace_... |
-- 社区首页展示资产配置(已执行)
-- @ TODO 备注信息: 线上环境必须编辑 重新选择关联交易所
INSERT INTO `h_param` VALUES (9, 'HOME_SYMBOl_ONE', 'UDX', null, 'APP[UD白标]首页展示资产币种 one ', '2019-7-19 11:17:35', 'Tian', '2019-7-19 11:24:09', 'Tian');
INSERT INTO `h_param` VALUES (10, 'HOME_SYMBOl_TWO', 'UD', null, 'APP[UD白标]首页展示资产币种 two', '2019-7-19 11:18:51', ... |
DROP TABLE IF EXISTS `skq_character_skills`;
CREATE TABLE `skq_character_skills` (
`characterID` int(16) NOT NULL,
`typeID` int(16) NOT NULL,
`level` tinyint(1) NOT NULL,
`skillPoints` int(16) NOT NULL,
`training` tinyint(1) NOT NULL DEFAULT '0',
`queue` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`cha... |
-- MySQL Script generated by MySQL Workbench
-- Fri Jan 15 13:37:01 2021
-- 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=@@SQL_MODE, SQL_M... |
# 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... |
// -*- c -*-
//
// %CopyrightBegin%
//
// Copyright Ericsson AB 2017-2020. 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/LI... |
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row... |
-- update module version
UPDATE `sys_modules` SET `version` = '1.1.4' WHERE `uri` = 'wmap' AND `version` = '1.1.3';
|
DROP TABLE hdb_catalog.hdb_remote_relationship;
DELETE FROM hdb_catalog.hdb_relationship
where table_schema = 'hdb_catalog' and table_name = 'hdb_remote_relationship';
DELETE FROM hdb_catalog.hdb_table
where table_schema = 'hdb_catalog' and table_name = 'hdb_remote_relationship';
|
---- Copyright 2018-2020 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 ... |
-- This file should undo anything in `up.sql`
drop table access_tokens
|
CREATE DATABASE IF NOT EXISTS code_micro_videos;
CREATE DATABASE IF NOT EXISTS code_micro_videos_test;
|
--
-- Contents of 0.13.4/01_0.13.4_spanish_english_changes_and_updates.sql
--
-- Seccion Encuesta Inicial
UPDATE `preferences_text` SET `id` = '1267', `languages_id` = '2', `title` = 'Indios americanos y nativos de Alaska', `description` = 'american_indian_or_alaska_native', `instructions` = '', `placeholder` = '', `de... |
SELECT
taxon_concepts.id,
legacy_id,
data->'kingdom_name' AS kingdom_name,
data->'phylum_name' AS phylum_name,
data->'class_name' AS class_name,
data->'order_name' AS order_name,
data->'family_name' AS family_name,
data->'genus_name' AS genus_name,
data->'species_name' AS species_name,
full_name,
... |
-- Specific Oracle PL/SQL code
-- Indexes (performances). Use "UPPER" or "LOWER" for items that must be unique no matter the case
CREATE UNIQUE INDEX PARAMS_PARAM_NAME_IDX ON PARAMETERS (UPPER(PARAM_NAME) ASC);
CREATE UNIQUE INDEX PARAMS_ACTIVE_PARAM_IDX ON PARAMETERS (UPPER(PARAM_NAME) ASC, IS_ACTIVE);
-- Modifi... |
DROP DATABASE IF EXISTS employee_trackerDB;
CREATE database employee_trackerDB;
USE employee_trackerDB;
CREATE TABLE department (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(30)
);
CREATE TABLE role (
id INT AUTO_INCREMENT PRIMARY KEY,
title VARCHAR(30),
salary DECIMAL,
department_id INT,
INDEX dep_i... |
use negocios2011
go
alter TRIGGER tr_cliente_pais ON dbo.clientes
INSTEAD OF update
AS BEGIN
-- Nooooo !!! es instead if UPDATE (idpais) no va
if (SELECT count(*) FROM inserted i, ventas.paises p
WHERE i.idpais=p.idpais)=0
BEGIN
INSERT INTO ventas.paises
SELECT idpais,'desconocido'
... |
insert into user
(userId, userEmailAddress, userPassword)
values (UNHEX ('db58fdd75a2743e39a0d45397cd0dbc7'), 'bobjorge@gmail.com', 'bob');
insert into cart
(cartId, cartAmount, cartUserId)
values (UNHEX ('e94879a28dfd47fc93b444972dff4bce'), 45854, (UNHEX ('db58fdd75a2743e39a0d45397cd0dbc7')));
insert into item
(ite... |
--------------------------------------------------------------------------
-- .eval command test
--------------------------------------------------------------------------
.help eval
.eval
.alias print
.@eval interpreter.println ($(0))
.end alias
.print 123
|
create sequence RESOURCE_ID_SEQ;
create sequence INSTANCE_ID_SEQ;
create sequence ATTACHMENT_ID_SEQ;
create sequence REVISION_SEQ;
create sequence WORKITEM_SEQ;
create table NODE_INFO (
"HOSTNAME" nvarchar2(255),
"PID" integer not null,
"PORT" integer not null,
"TIME" timestamp default CURRENT_TIMESTAMP... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Dec 03, 2018 at 07:39 AM
-- Server version: 10.1.16-MariaDB
-- PHP Version: 7.0.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... |
ALTER TABLE `composer`
CHANGE `description` `description` text COLLATE 'utf8mb4_general_ci' NULL AFTER `name`;
|
CREATE TABLE IF NOT EXISTS `bm_brackets` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`template` varchar(255) NOT NULL,
`type` varchar(63) NOT NULL,
`numberOfPlayers` int(11) NOT NULL,
`thirdplacematch` tinyint(1) NOT NULL,
`listNameParameters` text NOT NULL,
`bracketPo... |
SELECT actor.actor_id,first_name,last_name, COUNT(film_actor.film_id) AS Total_filmes
FROM sakila.actor
INNER JOIN sakila.film_actor on film_actor.actor_id = actor.actor_id
GROUP BY actor.actor_id
ORDER BY Total_filmes ASC; |
/*
Warnings:
- You are about to drop the column `age` on the `User` table. All the data in the column will be lost.
- You are about to drop the column `ageRange` on the `User` table. All the data in the column will be lost.
- You are about to drop the column `city` on the `User` table. All the data in the colu... |
CREATE TABLE people (
id SERIAL PRIMARY KEY,
first_name VARCHAR NOT NULL,
last_name VARCHAR NOT NULL
); |
INSERT INTO patient(first_name, last_name, blood_type, birth_date) VALUES
('Nicola','Tesla','?','1856-07-10'),
('John','von Neumann','?','1903-12-28'),
('Alan','Turing','?','1912-06-23'),
('Albert','Einstein','O-','1879-03-14'),
('Marie','Curie','?','1867-11-07'),
('Stephen','Hawking','?','1942-01-08... |
CREATE TABLE IF NOT EXISTS github_pull_requests (
repository_id TEXT NOT NULL,
pr_number INT NOT NULL,
is_open BOOLEAN NOT NULL,
created_at TIMESTAMP NOT NULL,
closed_at TIMESTAMP NOT NULL,
PRIMARY KEY(repository_id, pr_number)
);
|
CREATE TABLE "EDO"."EDO_AREA_OF_EXCELLENCE"
(
"AREA_OF_EXCELLENCE_TYPE_ID" NUMBER(8,0),
"OPTION_KEY" VARCHAR2(3 CHAR),
"OPTION_VALUE" VARCHAR2(50 BYTE),
"CREATE_DATE" DATE,
"CREATED_BY" VARCHAR2(50 BYTE),
"LAST_UPDATE_DATE" DATE,
"UPDATED_BY" VARCHAR2(50 BYTE),
CONSTRAIN... |
-- file:join.sql ln:1562 expect:true
select *, (select r from (select q1 as q2) x, (select q2 as r) y) from int8_tbl
|
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 23 Feb 2018 pada 09.28
-- Versi Server: 10.1.8-MariaDB
-- PHP Version: 5.6.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ... |
-- @testpoint:openGauss关键字drop(非保留),作为列名带反引号(合理报错)
drop table if exists drop_test;
create table drop_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) default nul... |
CREATE DATABASE IF NOT EXISTS `bookreads_db` /*!40100 DEFAULT CHARACTER SET utf8 */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `bookreads_db`;
-- MySQL dump 10.13 Distrib 8.0.27, for macos11 (x86_64)
--
-- Host: localhost Database: bookreads_db
-- ------------------------------------------------------
-- Server versi... |
delete from eg_roleaction where actionid in (select id from eg_action where name in ('Search and Edit Result-CFinancialYear','Search and View Result-CFinancialYear','Search and Edit-CFinancialYear','Search and View-CFinancialYear','Result-CFinancialYear','Edit-CFinancialYear','View-CFinancialYear','Update-CFinancialYea... |
INSERT INTO user(id, username, email, pw) VALUES (1, 'user001','user001@email.com','$2a$10$IHdRfnhNgQesPFD5hrUcMOvyx5RrRcklkpXfs9YX4j1qXvouEeVIa');
INSERT INTO user(id, username, email, pw) VALUES (2, 'user002','user002@email.com','$2a$10$NlU0bdBUiegZWZvl6CGpj.wV5YfbDGZ8lYznxWp2NNE4F9cYJJFOe');
INSERT INTO user(id, use... |
--Background Tasks
--Last tested on Tableau Server 10.3
SELECT "_background_tasks"."backgrounder_id" AS "backgrounder_id",
"_background_tasks"."id" AS "id",
"_background_tasks"."created_at" AS "created_at",
"_background_tasks"."completed_at" AS "completed_at",
"_background_tasks"."finish_code" AS "finish_code",... |
CREATE TABLE IF NOT EXISTS simple_records.message_status_by_request
(
requestId UUID,
messageId UUID,
lastUpdatedDateTime timestamp,
status text,
deliveryResponse text,
PRIMARY KEY ((requestId), messageId, lastUpdatedDateTime),
) WITH CLUSTERING ORDER BY (mess... |
-- // CLOUD-49844 Ability to store Cloud Platform topology in Cloudbreak
-- Migration SQL that makes the change goes here.
CREATE SEQUENCE topology_id_seq START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
CREATE TABLE topology (
id bigint NOT NULL,
account character va... |
use 'wiki_prices';
create or replace table eod (
ticker varchar(5) not null,
d date not null,
open decimal(13,4) not null,
high decimal(13,4) not null,
close decimal(13,4) not null,
volume decimal(13,4) not null,
dividend decimal(13,6) not null,
split_ratio decimal(5,2) not null,
con... |
-- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 15, 2022 at 06:47 AM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
CREATE DATABASE "MemberManagement"
WITH
OWNER = root
ENCODING = 'UTF8'
LC_COLLATE = 'en_US.utf8'
LC_CTYPE = 'en_US.utf8'
TABLESPACE = pg_default
CONNECTION LIMIT = -1;
\c "MemberManagement"
CREATE TABLE public.members
(
id bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY ( INCREMENT ... |
# ************************************************************
# SQL dump for Kayden
# ************************************************************
CREATE TABLE `kayden_blog_posts` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(1000) NOT NULL,
`body` varchar(5000) NOT NULL,
`tags` varchar(1000) NOT NU... |
select a.tablespace_name, sum(b.bytes)/1048576 freemb, sum(a.bytes)/1048576 totmb
from dba_data_files a,
(select tablespace_name, file_id, sum(bytes) bytes
from dba_free_space group by tablespace_name, file_id) b where a.file_id = b.file_id(+)
group by a.tablespace_name
order by (totmb - freemb) / totmb
/
|
-- MySQL dump 10.13 Distrib 5.7.27, for Linux (x86_64)
--
-- Host: localhost Database: owf
-- ------------------------------------------------------
-- Server version 5.7.27
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!4010... |
begin;
drop table if exists ncaa_pbp.team_schedules;
create table ncaa_pbp.team_schedules (
year integer,
year_id integer,
team_id integer,
team_name text,
game_date date,
game_string text,
opponent_id integer,
opponent_name text,
opponent_url ... |
ALTER TABLE API_PEN_REQUEST_BATCH.PEN_REQUEST_BATCH
ADD DUPLICATE_COUNT NUMBER;
ALTER TABLE API_PEN_REQUEST_BATCH.PEN_REQUEST_BATCH_HISTORY
ADD DUPLICATE_COUNT NUMBER;
|
-- generate fake sales event from PL/SQL
DECLARE
l_event JSON := JSON();
l_now TIMESTAMP := SYSTIMESTAMP AT TIME ZONE 'utc';
BEGIN
l_event.put('id', 0);
l_event.put('trans_dt', TO_CHAR(l_now, 'YYYY-MM-DD"T"HH24:MI:SS"Z"'));
l_event.put('product', 'Product A');
l_event.put('region', 'West');
l_event... |
--DROP DATABASE WasherDB
--GO
CREATE DATABASE WasherDB
GO
USE [WasherDB]
GO
/****** Object: Table [dbo].[USERS] Script Date: 28-03-2019 8.29.42 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[USERS] (
[USERID] VARCHAR (20) NOT NULL PRIMARY KEY,
[USERNAME] VARCHAR ... |
create index attone on attendance(stanum desc)
create index dutyone on duty(dtnum desc)
create index staffone on staff(stanum desc)
create index dephone on department(depnum desc)
create index wageone on wage(stanum desc)
create index userone on users(users_name desc)
SELECT * FROM sys.sysindexes |
# Searching specific terms in the "description of contract requirement" field
# Ususally yield the closest to what you can know about potential government customers
# Add more conditions to `where` to narrow results by geography and dates
select
agencyid,
dollarsobligated,
descriptionofcontractrequirement
from
... |
{% macro get_subscription_columns() %}
{% set columns = [
{"name": "_fivetran_synced", "datatype": dbt_utils.type_timestamp()},
{"name": "application_fee_percent", "datatype": dbt_utils.type_float()},
{"name": "billing", "datatype": dbt_utils.type_string()},
{"name": "billing_cycle_anchor", "datatype":... |
INSERT INTO `estados`(nome,pais) VALUES ('Goiás',1);
/*Inserção de Cidade*/
INSERT INTO `cidades`(nome,estado) VALUES ('Itapuranga',1);
/*Inserção de 20 usuários*/
INSERT INTO `usuarios` (nome, email, senha, data_nascimento, sexo, data_cadastro, status, cidade) VALUES
/* 5 usuários relacionados*/
('Danie... |
drop function chk.fnGroupedLeagueFriends |
create table shared.appointment_invitation
(
id bigint not null
constraint appointment_invitation_pkey
primary key,
appointment_id bigint ... |
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`user_id` varchar(36) NOT NULL,
`firstname` varchar(255) NOT NULL,
`lastname` varchar(255) NOT NULL,
`username` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`created` datetime NOT NULL,
`active` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHA... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Dec 30, 2019 at 02:33 AM
-- Server version: 5.7.25
-- PHP Version: 7.3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `useetv`
--
-- -----------------------------... |
CREATE DATABASE IF NOT EXISTS `seedProject`
DEFAULT CHARACTER SET utf8
DEFAULT COLLATE utf8_general_ci;
CREATE TABLE IF NOT EXISTS `seedProject`.`settings` (
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
`name` VARCHAR(80) NOT NULL,
`type` ENUM('BOOLEAN', 'NUMBER', 'FLOAT', 'STRING', 'OBJECT') NOT NULL,
`v... |
SELECT * FROM CLIENTES;
INSERT INTO CLIENTES
VALUES ('1471156710', 'Erica Carvalho', 'Rua Iriqutia', 'Jardins', 'Sao Paulo', 'SP', '80012212',
TO_DATE('1990-09-01','yyyy-mm-dd'), 27, 'F', 170000, 24500, 0);
SELECT * FROM TABELA_DE_CLIENTES
SELECT CPF, NOME, ENDERECO_1 AS ENDERECO, BAIRRO, CIDADE, ESTADO, CEP, DATA_... |
CONNECT TO DB_NAME;
COMMIT WORK;
------------------------------------
-- DDL Statements for BUFFERPOOLS --
------------------------------------
CREATE BUFFERPOOL "TRIBUFPOOL" SIZE AUTOMATIC PAGESIZE 32768;
CREATE BUFFERPOOL "TRIBUFPOOLINDEX" SIZE AUTOMATIC PAGESIZE 32768;
CREATE BUFFERPOOL "TRITEMPBP" SIZE AUTOMATIC ... |
-- Name: HideSeriesNotLikeWithModality
-- Schema: posda_files
-- Columns: None
-- Args: ['modality', 'collection', 'site', 'description_not_matching']
-- Tags: ['Update', 'posda_files']
-- Description: Hide series not matching pattern by modality
--
update ctp_file set visibility = 'hidden'
where file_id in (
selec... |
WITH allLoops (loop) AS (
VALUES (1), (2), (3), (4)
)
SELECT allLoops.loop AS loop,
honeywell5800_models.id AS model,
honeywell5800_sensors.description AS description,
coalesce(honeywell5800_site_loops.kind, honeywell5800_model_loops.kind) AS kind,
coalesce(siteLabel, factoryLabel) AS label,
coalesce(siteNormally... |
chain chain_author uniprot seq_aln_begin seq_aln_begin_ins seq_aln_end seq_aln_end_ins db_aln_begin db_aln_end auth_aln_begin auth_aln_end
A A P84233 1 ? 135 ? 2 136 1 135
C C Q6AZJ8 1 ? 129 ? 2 130 1 129
B B P62799 1 ? 102 ? 2 103 1 102
E E P84233 1 ? 135 ? 2 136 1 135
D D P02281 1 ? 122 ? 5 126 1 122
G G Q6AZJ8 1 ? 1... |
select
id,
username,
first_name,
last_name,
slackName
from profil_kioskuser
where is_active
and aktivBis > current_timestamp
and instruierterKaeufer
and rechte in ('Admin','Buyer','Accountant')
and visible
order by lower(username) |
-- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 03, 2019 at 06:49 AM
-- Server version: 10.1.31-MariaDB
-- PHP Version: 7.2.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
IF NOT EXISTS (SELECT 1 FROM [SkillTypes] WITH (NOLOCK))
BEGIN
INSERT [SkillTypes] ([Id], [Name]) VALUES (1, N'Certifications')
INSERT [SkillTypes] ([Id], [Name]) VALUES (2, N'Competencies')
INSERT [SkillTypes] ([Id], [Name]) VALUES (4, N'HealthItems')
END
|
DROP TABLE IF EXISTS `[db_prefix]_favorites`;
DROP TABLE IF EXISTS `[db_prefix]_cmts`;
DROP TABLE IF EXISTS `[db_prefix]_cmts_albums`;
DROP TABLE IF EXISTS `[db_prefix]_rating`;
DROP TABLE IF EXISTS `[db_prefix]_voting_track`;
DROP TABLE IF EXISTS `[db_prefix]_views_track`;
DELETE FROM `sys_albums_objects`, `sys_album... |
DROP TABLE IF EXISTS billionaires;
CREATE TABLE billionaires (
id INT AUTO_INCREMENT PRIMARY KEY,
first_name VARCHAR(250) NOT NULL,
last_name VARCHAR(250) NOT NULL,
career VARCHAR(250) DEFAULT NULL
); |
-- noinspection SqlNoDataSourceInspectionForFile
@ ../../../../object/names/namex/view/request_vw.sql
|
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 12, 2020 at 12:47 PM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.4.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
/*
* Copyright 2015-2020 WebPKI.org (http://webpki.org).
*
* 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... |
##############################BRANCH 06########################################
#COMPANY - COMPANY - PERSON - COMPANY - COMPANY
1 SELECT
2 C01.company_name,
3 C02.company_name,
4 P01.name_person,
5 C03.company_name,
6 C04.company_name
7 FROM companies_partners AS CP01
8 INNER JOIN compan... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.