sql stringlengths 6 1.05M |
|---|
-- This can be a long patch, you can check in mysql (mysql -p yourDatabaseName) what is going on
-- with this command: show processlist;
-- Truncating predb_hash table.
TRUNCATE TABLE predb_hashes;
-- Dropping primary key from predb_hash table.
ALTER TABLE predb_hashes DROP PRIMARY KEY;
-- Dropping the hashes column ... |
-- 2019-12-13T11:43:49.193Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsSelectionColumn='Y', SelectionColumnSeqNo=50,Updated=TO_TIMESTAMP('2019-12-13 12:43:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=551732
;
-- 2019-12-13T11:43:49.201Z
-- I forgot to set ... |
-- Revert users
DROP TABLE flipr.users;
|
CREATE TABLE `Postagens` (
`id_postagem` INT NOT NULL AUTO_INCREMENT,
`Titulo` varchar(80) NOT NULL,
`data_postagem` TIMESTAMP NOT NULL,
`texto` varchar(1000) NOT NULL,
`fk_usuario` BINARY NOT NULL,
`fk_tema` BINARY NOT NULL,
PRIMARY KEY (`id_postagem`)
);
CREATE TABLE `Temas` (
`id_tema` INT NOT NULL AUTO_INC... |
drop table if exists event_arrange_tasks;
create table event_arrange_tasks
(
ea_task_id serial primary key,
proj_id int,
creator_id int,
title varchar,
description text,
mode char, -- A: automatic, R: race, M: manual
create_time timestamptz default now(),
modified_date ... |
ALTER TABLE PIPELINE.PIPELINE_RUN ALTER PIPELINE_ID DROP NOT NULL,
ALTER VERSION DROP NOT NULL; |
{% macro create_elementary_tests_schema() %}
{% if execute and flags.WHICH == 'test' %}
{% set database_name, schema_name = elementary.get_package_database_and_schema('elementary') %}
{% set schema_name = schema_name ~ '__tests' %}
{%- if not adapter.check_schema_exists(database_name, schema... |
CREATE FOREIGN TABLE cont_subselect_stream (x int, y int, data json, a2 text, b2 text, c2 text, s text, key text) SERVER pipelinedb;
-- Disallowed subselects
CREATE VIEW cont_subselect_v0 AS SELECT x FROM (SELECT COUNT(*) FROM cont_subselect_stream) _;
CREATE VIEW cont_subselect_v0 AS SELECT x FROM
(SELECT COUNT(*) ... |
-- Copyright 2018 <NAME>. All rights reserved. More info at http://tanelpoder.com
-- Licensed under the Apache License, Version 2.0. See LICENSE.txt for terms & conditions.
select
decode(bitand(ksuseflg,19),17,'BACKGROUND',1,'USER',2,'RECURSIVE','?') status1
, s.*
from
x$ksuse s
where
&1
/
|
<reponame>blinkops/blink-aws-query<gh_stars>10-100
select cluster_identifier, title, tags, akas
from aws.aws_redshift_cluster
where cluster_identifier = '{{ output.resource_name.value }}';
|
--
-- 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 ... |
<gh_stars>0
-- @testpoint:opengauss关键字storage(非保留),作为外部数据源名
--关键字不带引号-成功
drop data source if exists storage;
create data source storage;
drop data source storage;
--关键字带双引号-成功
drop data source if exists "storage";
create data source "storage";
drop data source "storage";
--关键字带单引号-合理报错
drop data source if exists 's... |
-- @testpoint:opengauss关键字returns(非保留),作为数据库名
--关键字不带引号-成功
drop database if exists returns;
create database returns;
--清理环境
drop database returns;
--关键字带双引号-成功
drop database if exists "returns";
create database "returns";
--清理环境
drop database "returns";
--关键字带单引号-合理报错
drop database if exists 'returns';
create data... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 1172.16.31.10
-- Generation Time: Apr 24, 2017 at 05:23 AM
-- Server version: 5.7.14
-- PHP Version: 5.6.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACT... |
<gh_stars>0
INSERT INTO burgers (burger_name) VALUES ('Double Cheese Burger');
INSERT INTO burgers (burger_name) VALUES ('Royal Burger');
INSERT INTO burgers (burger_name) VALUES ('Fish and Cheese Burger');
INSERT INTO burgers (burger_name) VALUES ('Crispy Chicken Cheese Burger');
INSERT INTO burgers (burger_name) VALU... |
CREATE TABLE comments (
cid INT(11) not null AUTO_INCREMENT PRIMARY KEY,
uid varchar(128) not null,
date datetime not null,
message TEXT not null
); |
-- MySQL dump 10.15 Distrib 10.0.16-MariaDB, for Linux (x86_64)
--
-- Host: localhost Database: imtools_webui
-- ------------------------------------------------------
-- Server version 10.0.16-MariaDB-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@C... |
<reponame>yani-valeva/Databases-Basics-MySQL
DELIMITER $$
CREATE PROCEDURE `usp_get_employees_salary_above_35000`()
BEGIN
SELECT e.`first_name`, e.`last_name`
FROM `employees` AS e
WHERE e.`salary` > 35000
ORDER BY e.`first_name`, e.`last_name`;
END $$
DELIMITER ;
CALL `usp_get_employees_salary_above_35000`; |
<filename>d20-dz15.sql
show databases;
-- DROP DATABASE d20test_dz15;
-- CREATE database d20test_dz15;
use d20test_dz15;
-- create table categories (
-- id INT PRIMARY KEY AUTO_INCREMENT NOT NULL,
-- name VARCHAR(255),
-- slug VARCHAR(255),
-- created_at DATETIME,
-- updated_at DATETIME
-- );
-- INSERT INTO categor... |
<filename>DB/project.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 08, 2018 at 03:02 PM
-- Server version: 10.1.25-MariaDB
-- PHP Version: 7.1.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_... |
ALTER TABLE public.hearing_day_panel ADD is_presiding boolean;
|
-- Deploy schemas/app_jobs/procedures/complete_job to pg
-- requires: schemas/app_jobs/schema
-- requires: schemas/app_jobs/tables/jobs/table
-- requires: schemas/app_jobs/tables/job_queues/table
BEGIN;
CREATE FUNCTION app_jobs.complete_job(worker_id varchar, job_id int) RETURNS app_jobs.jobs AS $$
DECLARE
v_row a... |
CREATE TYPE COMMUNITY_TYPE AS ENUM (
'ORGANIZATION', 'CLUB'
);
CREATE TABLE communities
(
id SERIAL PRIMARY KEY,
owner_user_id INTEGER NOT NULL REFERENCES users (id) ON DELETE RESTRICT,
name TEXT NOT NULL,
nickname TEXT NOT NULL UNIQUE,
... |
<filename>table.sql<gh_stars>0
CREATE DATABASE IF NOT EXISTS dman;
use dman;
CREATE TABLE IF NOT EXISTS dbaccount (
dbkey varchar(200) NOT NULL DEFAULT '' COMMENT 'dbkey, xxx.dbname',
hostname VARCHAR(200) NOT NULL DEFAULT '' COMMENT 'hostname',
dbname VARCHAR(100) NOT NULL DEFAULT '' COMMENT 'db... |
/*CREATE TABLES*/
CREATE DATABASE Project;
USE Project;
CREATE TABLE CUSTOMER (
CustomerID INT NOT NULL AUTO_INCREMENT,
CustomerLastName VARCHAR(45),
CustomerFirstName VARCHAR(45),
CustomerDOB DATE,
DrivingLicenseNumber VARCHAR(45) NOT NULL,
CustomerPhoneNumber VARCHAR(11),
PRIMARY KEY (Cus... |
CREATE TABLE authentication_log (
username TEXT NOT NULL,
ip INET NOT NULL,
lastToken TIMESTAMP NOT NULL,
PRIMARY KEY (username, ip)
);
|
--##############################################################################
--
-- SAMPLE SCRIPTS TO ACCOMPANY "SQL SERVER 2017 ADMINISTRATION INSIDE OUT"
--
-- © 2018 <NAME>
--
--##############################################################################
--
-- CHAPTER 13: MANAGING AND MONITORING SQL SERVER
-- T... |
-- file:rules.sql ln:754 expect:false
)
|
CREATE OR REPLACE VIEW VIEW_BPDFE_1 AS
SELECT RATE_CLASS_CODE, RATE_TYPE_CODE FROM VALID_CALC_TYPES WHERE RATE_CLASS_TYPE IN ('E', 'V');
CREATE OR REPLACE VIEW VIEW_BPDFE_2 AS
SELECT PROPOSAL_NUMBER,
VERSION_NUMBER,
BUDGET_PERIOD,
LINE_ITEM_NUMBER,
START_DATE... |
update reserva
set identificacionUsuario = :identificacionUsuario,
nombreUsuario = :nombreUsuario,
fechaReserva = :fechaReserva,
fechaCreacion = :fechaCreacion,
valorAPagar = :valorAPagar,
idTipoHabitacion = :idTipoHabitacion,
idTipoUsuario = :idTipoUsuario
where id = :id |
<reponame>waywtdcc/flink-cdc-connectors
-- 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,... |
--liquibase formatted sql
--changeset tpetr:1 dbms:mysql
CREATE TABLE `taskHistory` (
`taskId` varchar(200) NOT NULL DEFAULT '',
`requestId` varchar(100) NOT NULL,
`status` varchar(50) NOT NULL,
`pendingType` varchar(50) NOT NULL,
`createdAt` timestamp NOT NULL DEFAULT '1971-01-01 00:00:01',
`lastTaskStatu... |
<gh_stars>0
-- 内蒙古
insert into dict.city (code, name) values
(010000, '呼和浩特市'),
(012400, '察右后旗'),
(014200, '固阳县'),
(017000, '东胜市'),
(010100, '土左旗'),
(012500, '苏右旗'),
(017100, '准格尔旗'),
(010200, '托克托县'),
(012600, '二连市'),
(014400, '乌前旗'),
(017200, '伊旗'),
(011500, '和林格尔县'),
(013100, '苏左旗'),
(015... |
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
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 N... |
COPY (
SELECT
json_build_object(
'id', pre.id,
'description', pre.description,
'sequence', COALESCE(rna.seq_short, rna.seq_long)
)
FROM rnc_rna_precomputed pre
JOIN rna ON rna.upi = pre.upi
WHERE
pre.is_active = true
AND pre.taxid is not null
AND pre.databases ilike :'db'
ORDER BY ... |
<reponame>bcgov/cas-ciip-portal<gh_stars>1-10
-- Revert ggircs-portal:types/facility_application from pg
begin;
drop type ggircs_portal.facility_application;
commit;
|
CREATE PROCEDURE [dbo].[netsqlazman_ItemInsert]
(
@Name nvarchar(255),
@Description nvarchar(1024),
@ItemType tinyint,
@BizRuleId int,
@ApplicationId int
)
AS
IF EXISTS(SELECT ApplicationId FROM dbo.[netsqlazman_Applications]() WHERE ApplicationId = @ApplicationId) AND dbo.[netsqlazman_CheckApplicationPermissions... |
--Insert Users:
INSERT INTO users (username, email, password)
VALUES ('Adriana1234', '<EMAIL>', '<PASSWORD>');
INSERT INTO users (username, email, password)
VALUES ('Tchabes1234', '<EMAIL>', '<PASSWORD>');
INSERT INTO users (username, email, password)
VALUES ('Duarte1234', '<EMAIL>', '<PASSWORD>');
INSERT INTO user... |
CREATE OR REPLACE PACKAGE HR.PACK
AS
PROCEDURE PROC1;
END; |
DROP FUNCTION IF EXISTS cdb_dataservices_server._get_redis_conf_v2(text);
DROP FUNCTION IF EXISTS cdb_dataservices_server._connect_to_redis(text);
DROP FUNCTION IF EXISTS cdb_dataservices_server._get_geocoder_config(text, text);
DROP FUNCTION IF EXISTS cdb_dataservices_server.cdb_geocode_street_point(TEXT, TEXT, TEXT, ... |
update eg_drawingofficer set version =0;
update eg_appconfig set version=0;
update eg_appconfig_values set version=0;
update eg_messagetemplate set version =0;
update eg_wf_states set version =0;
update eg_role set version=0; |
<reponame>devatsrs/neon.web
CREATE TABLE `tblLastPrefixNo` (
`CompanyID` int(11) DEFAULT NULL,
`LastPrefixNo` int(11) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci |
USE employee_trackerDB;
INSERT INTO department (name)
VALUE ("Sales");
INSERT INTO department (name)
VALUE ("Engineering");
INSERT INTO department (name)
VALUE ("Finance");
INSERT INTO department (name)
VALUE ("Legal");
INSERT INTO role (title, salary, department_id)
VALUE ("Lead Engineer", 91000, 2);
INSERT INTO rol... |
/*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 50726
Source Host : 127.0.0.1:3306
Source Schema : aypao_service
Target Server Type : MySQL
Target Server Version : 50726
File Encoding : 65001
Date: 10/03/2... |
<gh_stars>0
CREATE SCHEMA [demo];
|
UPDATE Notes SET (
updated,
note
) = (
now(),
$2::TEXT
)
WHERE
note_id=$1::INTEGER
RETURNING *;
|
<gh_stars>1-10
------ DANA
INSERT INTO birthday(birth_day, birth_month, birth_year, nasa_name, nasa_url, fact_year, fact_text)
VALUES (
'14',
'06',
'1998',
'Giant Cluster Bends, Breaks Images',
'https://apod.nasa.gov/apod/image/cl0024_hst_big.gif',
'1952',
'June 14th is the day in 1952 that ... |
<filename>dbt-snowflake/demo-artifacts/macros/materializations-incremental/incremental_custom.sql<gh_stars>1-10
{% macro dbt_snowflake_validate_get_incremental_strategy(config) %}
{#-- Find and validate the incremental strategy #}
{%- set strategy = config.get("incremental_strategy", default="merge") -%}
{% set... |
SELECT "TrainsUK1_3"."v_Headcode Description" AS "v_Headcode Description" FROM "TrainsUK1_3" WHERE (('' = '') AND (NOT ("TrainsUK1_3"."Timetable" IN ('', 'Timetable'))) AND ("TrainsUK1_3"."Operator" = 'EB') AND ("TrainsUK1_3"."Timetable" = 'M18')) GROUP BY "TrainsUK1_3"."v_Headcode Description";
|
<gh_stars>100-1000
-- view.test
--
-- execsql {
-- CREATE TABLE t3("9" integer, [4] text);
-- INSERT INTO t3 VALUES(1,2);
-- CREATE VIEW v_t3_a AS SELECT a.[9] FROM t3 AS a;
-- CREATE VIEW v_t3_b AS SELECT "4" FROM t3;
-- SELECT * FROM v_t3_a;
-- }
CREATE TABLE t3("9" integer, [4] text);
INSERT INT... |
-- file:join.sql ln:1414 expect:true
select p.*, linked from parent p
left join (select c.*, true as linked from child c) as ss
on (p.k = ss.k)
|
-- file:rules.sql ln:432 expect:true
create function rtest_viewfunc1(int4) returns int4 as
'select count(*)::int4 from rtest_view2 where a = $1'
language sql
|
<reponame>myarist/Codecademy<gh_stars>10-100
SELECT *
FROM movies
WHERE name LIKE 'Se_en'; |
ALTER TABLE IACUC_PROC_PERSON_RESPONSIBLE
ADD CONSTRAINT UQ_IACUC_PROTO_PERSON_RESPONSI
UNIQUE (PROTOCOL_NUMBER, SEQUENCE_NUMBER, IACUC_PROTOCOL_STUDY_GROUPS_ID, PERSON_ID)
/
|
<gh_stars>1-10
SELECT
hosts.api_id as api_id,
hosts.id as id,
hosts.name as name,
hosts.hostname as hostname
FROM hosts, apis
WHERE hosts.id = ?
AND hosts.api_id = ?
AND hosts.api_id = apis.id
AND apis.account_id = ?;
|
<reponame>strk/nz-buildings
-- Revert nz-buildings:buildings_bulk_load/functions/matched from pg
BEGIN;
DROP FUNCTION buildings_bulk_load.building_outlines_matched_select_by_dataset(integer);
DROP FUNCTION buildings_bulk_load.matched_delete_existing_outlines(integer);
DROP FUNCTION buildings_bulk_load.matched_find_... |
select * from masterdata_join;
select * from testtable;
drop table testtable;
select count(*) from fullmaster;
drop table if exists tempmastera;
drop table if exists tempmasterb;
drop table if exists temptable;
-- column type lookup
-- SELECT column_name, data_type, udt_name::regtype
-- FROM information_schema.col... |
<filename>#Banco de Dados/00 - CREATE DATABASE - ControleDespesas.sql
USE [master]
IF NOT EXISTS(SELECT * FROM sys.databases WHERE name = 'ControleDespesas')
BEGIN
CREATE DATABASE ControleDespesas
END |
<filename>operator/operator-concat.sql
select
first_name,
last_name,
first_name || ' ' || last_name as full_name
from employees; |
<filename>target/classes/data.sql
INSERT INTO LANGUAGES (LANGUAGE) VALUES ('English');
INSERT INTO LANGUAGES (LANGUAGE) VALUES ('Spanish');
INSERT INTO WORDS (WORD) VALUES ('Hello');
INSERT INTO WORDS (WORD) VALUES ('People');
INSERT INTO TARGETS (TARGET, WORD_ID, LANGUAGE_ID) VALUES ('Gente', (SELECT WORD_ID FROM WORD... |
select c.id, c.name
from customers c
where not exists (select 1 from locations where id_customers = c.id)
order by c.id; |
<reponame>hsmak/BootableAPIs
DROP TABLE IF EXISTS customer;
CREATE TABLE customer
(
id SERIAL PRIMARY KEY,
first_name VARCHAR(255),
last_name VARCHAR(255)
); |
CREATE FUNCTION udf_GetCost(@jobsId INT)
RETURNS DECIMAL(8, 2)
AS
BEGIN
DECLARE @totalCost DECIMAL(8, 2) = (SELECT ISNULL(sum(p.Price * part.Quantity), 0)
FROM Jobs AS j
JOIN Orders o
ON... |
<reponame>PacktPublishing/PostGIS-Cookbook-Second-Edition<gh_stars>10-100
-- RECIPE 10 ********************************************
-- How to do it ****************************************
-- Step 2 **********************************************
SELECT ST_Extent(the_geom) FROM chp01.countries WHERE name = 'Italy'; |
<gh_stars>1-10
select distinct unnest(tags)
from source
join "user" using(user_id)
where "user".token = $*
|
<gh_stars>1-10
CREATE TABLE `company` (
`id` int PRIMARY KEY AUTO_INCREMENT,
`name` varchar(255),
`address` varchar(100),
`phone_number` int(15),
`email` varchar(50),
`date_incorporation` date,
`deleted_at` varchar(20),
);
CREATE TABLE `work_room` (
`id` int PRIMARY KEY AUTO_INCREMENT,
`name` varchar... |
<gh_stars>10-100
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: localhost Database: blab
-- ------------------------------------------------------
-- Server version 5.7.17-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_S... |
alter table transaction add "comment" varchar(50);
|
-- file:numeric_big.sql ln:405 expect:true
INSERT INTO num_exp_sub VALUES (9,2,'994877526002806872754342203612721.39038050457374613143278241259478942521582284121765030681448507149813723390800786083916642678676237719134679789066681148658045087323654637787610377226547625566084597844703238942080799221554614696684732913955... |
prompt --application/pages/page_00902
begin
-- Manifest
-- PAGE: 00902
-- Manifest End
wwv_flow_api.component_begin (
p_version_yyyy_mm_dd=>'2020.10.01'
,p_release=>'20.2.0.00.20'
,p_default_workspace_id=>9526531750928358
,p_default_application_id=>700
,p_default_id_offset=>28323188538908472
,p_default_owner=>... |
<reponame>DiSantoz/workteam
INSERT INTO department (name)
VALUES
('Sales'),
('Engineering'),
('Legal'),
('Finance'),
('Management')
;
INSERT INTO role (title, salary, department_id)
VALUES
("Salesperson", 35000.00, 1),
("Software Engineer", 60000.00, 2),
("Lawyer", 80000.00, 3),
("A... |
<filename>conf/evolutions/default/1.sql
# --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table linked_account (
id bigint not null,
user_id bigint,
provider_user_id varchar(25... |
<reponame>wingersoftprojects/ISMS
EXEC sp_updateextendedproperty
@NAME = N'MS_Description', @VALUE = 'Company Details such as Name, Location, Contact Addresses, Logo, Website, Email, etc',
@LEVEL0TYPE = N'Schema', @LEVEL0NAME = 'dbo',
@LEVEL1TYPE = N'Table', @LEVEL1NAME = 'company';
EXEC sp_updateextendedp... |
use TestDB;
create table Particles (
particleId bigint not null,
x float not null,
y float not null,
z float not null,
vx float not null,
vy float not null,
vz float not null,
phkey int,
fileRowId bigint not null
) ENGINE=MyISAM;
|
<reponame>AletheiaWareLLC/conveyearthgo<gh_stars>1-10
CREATE TABLE tbl_stripe_account (
id INT AUTO_INCREMENT PRIMARY KEY,
user INT NOT NULL,
identity VARCHAR(255) NOT NULL,
created_unix INT UNSIGNED NOT NULL,
FOREIGN KEY (user) REFERENCES tbl_users(id)
); |
-- 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.
CREATE TABLE lms.ProcessedFiles (
FullPath VAR... |
<reponame>UAMS-DBMI/PosdaTools
-- Name: FilesVisibilityByActivityTimepoint
-- Schema: posda_files
-- Columns: ['file_id', 'visibility']
-- Args: ['activity_timepoint_id']
-- Tags: ['duplicates', 'dup_sops', 'hide_dup_sops', 'sops_different_series']
-- Description: List of files with visibility in timepoint
--
select... |
<reponame>xia-huang-411303/EasyRec
drop TABLE if EXISTS multi_value_test_{TIME_STAMP};
drop TABLE if EXISTS external_multi_value_test_{TIME_STAMP};
drop TABLE if EXISTS multi_value_train_{TIME_STAMP};
drop TABLE if EXISTS external_multi_value_train_{TIME_STAMP};
|
--+ holdcas on;
SELECT COUNT(*) FROM base_c2 a, virtual_c0 b, base_c1 c
WHERE (a.attr1_int_unique_idx = b.attr1_int_unique_idx)
AND (b.attr1_int_unique_idx = c.attr1_int_unique_idx)
AND (a.attr1_int_unique_idx < 10);
|
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Dec 08, 2019 at 10:22 AM
-- Server version: 5.7.26
-- PHP Version: 7.3.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... |
<gh_stars>0
SET GLOBAL log_bin_trust_function_creators = 1;
DELIMITER **
CREATE FUNCTION ilosc_pracownikow_zarabiajacych(n int)
RETURNS INT
BEGIN
SELECT COUNT(zarobki) FROM pracownicy
WHERE zarobki = n INTO n;
RETURN n;
END** |
<reponame>Descalzo404/CS50-Problem-Sets
SELECT name FROM people JOIN stars on stars.person_id = people.id JOIN movies on movies.id = stars.movie_id WHERE movies.year = 2004 GROUP BY people.name ORDER BY people.birth; |
<reponame>CSC-IT-Center-for-Science/antero<gh_stars>1-10
USE [ANTERO]
GO
/****** Object: Table [dw].[f_koski_perusopetus_ainevalinnat] Script Date: 20.12.2021 9:33:26 ******/
DROP TABLE IF EXISTS [dw].[f_koski_perusopetus_ainevalinnat]
GO
/****** Object: Table [dw].[f_koski_perusopetus_ainevalinnat] Script Da... |
/* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. */
/******************************************************************************
*
* You may not use the identified files except in compliance with The MIT
* License (the "License.")
*
* You may obtain a copy of the License at
* ... |
<reponame>SQLUndercover/UndercoverToolbox
--Undercover Catalogue
--<NAME>
--Version 0.4.0 - 25 November 2019
--Module: Linked Server
--Script: Update
BEGIN
--temp table used to prevent duplicate entries from the denormalised stage table
IF OBJECT_ID('tempdb.dbo.#LinkedServers') IS NOT NULL
DROP TABLE #LinkedServers
... |
<reponame>centrefornetzero/dbt-data-warehouse
{% macro convert_efficiency_to_integer(column_name) -%}
case {{ column_name }}
when 'very good' then 5
when 'good' then 4
when 'average' then 3
when 'poor' then 2
when 'very poor' then 1
end
{%- endmacro %}
|
<filename>pages/pages-tool/src/resources/db/migrations/oracle.sql
CREATE TABLE pages_page (
context char(36) PRIMARY KEY,
title varchar2(200) NOT NULL,
content CLOB NOT NULL
); |
-- name: select-public-badge
SELECT ub.id, bc.name FROM user_badge ub
INNER JOIN badge b ON ub.badge_id = b.id
INNER JOIN badge_badge_content bbc ON b.id = bbc.badge_id
INNER JOIN badge_content bc ON (bbc.badge_content_id = bc.id AND bc.language_code = b.default_language_code)
WHERE ub.id = :user_badge_id AND ub.delete... |
-- This file and its contents are licensed under the Timescale License.
-- Please see the included NOTICE for copyright information and
-- LICENSE-TIMESCALE for a copy of the license.
-- deparse each table%, drop it and recreate it using deparse result
DO
$$DECLARE
tables CURSOR FOR
SELECT tablename, sche... |
<reponame>wudi/sourcegraph
BEGIN;
ALTER TABLE campaign_jobs ALTER COLUMN description DROP NOT NULL;
COMMIT;
|
<filename>mysql/database.sql
-- MySQL dump 10.13 Distrib 8.0.20, for Win64 (x86_64)
--
-- Host: localhost Database: vr_test_database
-- ------------------------------------------------------
-- Server version 8.0.20
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_R... |
CREATE TABLE [dbo].[Relationship]
(
[Id] BIGINT NOT NULL PRIMARY KEY IDENTITY,
[ProviderId] BIGINT NOT NULL,
[ProviderName] NVARCHAR(100) NULL,
[EmployerAccountId] BIGINT NOT NULL,
[LegalEntityId] NVARCHAR(50) NOT NULL,
[LegalEntityName] NVARCHAR(100) NOT NULL,
[LegalEntityAddress] NVARCHAR(256) NOT NULL,
[Leg... |
/*
SQLyog Community Edition- MySQL GUI v6.56
MySQL - 5.5.20 : Database - form
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @... |
-- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 05, 2021 at 03:04 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.3.23
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
# количество книг каждого автора
SELECT NAME, COUNT(BOOK_ID)
FROM author a
LEFT JOIN author_book ab on a.ID = ab.AUTHOR_ID
GROUP BY a.NAME;
# суммарный остаток книг каждого автора во всех магазинах
SELECT NAME, CITY, SUM(QUANTITY)
FROM book_store bs
INNER JOIN author_book ab on bs.BOOK_ID = ab.BOOK_ID
... |
create or replace PROCEDURE procAddPath(p_id_point_from PATH_PLACES.id_point_from%type,
p_id_point_to PATH_PLACES.id_point_to%type,
p_kinetic_coefficient PATH_PLACES.kinetic_coefficient%type,
p_wind_... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 21 Sep 2019 pada 02.55
-- Versi server: 10.4.6-MariaDB
-- Versi PHP: 7.3.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 S... |
-- phpMyAdmin SQL Dump
-- version 4.4.15.9
-- https://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Mar 06, 2019 at 09:14 PM
-- Server version: 5.6.37
-- PHP Version: 7.1.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT *... |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Dec 20, 2019 at 08:08 AM
-- Server version: 10.3.15-MariaDB
-- PHP Version: 7.1.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @... |
-- Muchas veces, queremos combinar dos tablas, pero una de ellas es el resultado de otro cálculo.
-- pueden querer saber a cuántas revistas se suscribe cada cliente. Podemos calcular esto fácilmente usando nuestra order stabla:
-- Queremos poder unir los resultados de esta consulta con nuestra customerstabla, que no... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.