sql stringlengths 6 1.05M |
|---|
<reponame>jomofrodo/covid.vue<gh_stars>0
/*
* w0 is current week
* w1 is 1 week ago
* w2 is 2 weeks ago
* w3 is 3 weeks ago
*/
DROP VIEW IF EXISTS cv_national_weekly_delta;
CREATE VIEW cv_national_weekly_delta AS
SELECT w3.countrycode, w3.statecode, w3.county,
w4.confirmed as conf_base, w4.death as death_base, w... |
CREATE SYNONYM [SqlNet].[HolidayAdd] FOR [SqlNet].[ConfigurationHolidayAdd];
|
CREATE DATABASE IF NOT EXISTS `biblidev` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `biblidev`;
-- MySQL dump 10.13 Distrib 8.0.26, for Win64 (x86_64)
--
-- Host: localhost Database: biblidev
-- -------------------------------------------------... |
-- Create Table spotifycharts
CREATE TABLE spotifycharts (
position_n VARCHAR NOT NULL,
track_name VARCHAR,
artist VARCHAR,
streams VARCHAR NOT NULL,
url VARCHAR,
region_code VARCHAR NOT NULL,
region_text VARCHAR NOT NULL,
week_range VARCHAR NOT NULL,
Week_Ending DATE NOT NULL,
song_year V... |
--Designation
INSERT INTO egeis_deptdesig(id,designation,department,outsourcedposts,sanctionedposts,version,createddate,lastmodifieddate,createdby,lastmodifiedby)
values(nextval('seq_egeis_deptdesig'),(SELECT id FROM eg_designation where name='Sanitary inspector'),(SELECT id FROM eg_department WHERE name='Health'),0,2,... |
<filename>scratch/Queries/PerformanceQueries.sql
/*SELECT * FROM ModelTimelineIssues */
/*SELECT COUNT(*) FROM ModelTimelineIssues*/
SELECT * FROM ModelTestResults
/* Search for timeline issues by definition name not id */
exec sp_executesql N'SELECT [m1].[BuildNumber], [t].[Message], [t].[JobName], [t].[IssueType], ... |
#サークル概要をIDを抜いて出力
USE KINDRED;
SELECT * EXCEPT (ID)
FROM CIRCLE
WHERE ID = #ここに検索したいIDを入力
AND CIRCLE_NAME like "" #ダブルクォーテーションの中にサークル名
|
CREATE TABLE setting_defaults (
key citext PRIMARY KEY CHECK(key ~* '^[a-z0-9\._]+$' AND length(key) < 255),
value jsonb,
description text,
created_at timestamptz NOT NULL DEFAULT timezone('utc', now())::timestamptz,
updated_at timestamptz NOT NULL DEFAULT timezone('utc', now())::timestamptz
);
COMMENT ON TA... |
CREATE INDEX IF NOT EXISTS idx_processinstanceid_eg_wf_assignee_v2 ON eg_wf_assignee_v2 (processinstanceid);
|
<reponame>jrderek/Data-science-master-resources
USE employees;
-- 1. Find all the employees with the same hire date as employee 101010 using a sub-query.
SELECT * FROM employees
WHERE hire_date IN (
SELECT hire_date
FROM employees
WHERE emp_no = 101010);
-- 2. Find all the titles held by all employees with ... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Gazdă: 127.0.0.1
-- Timp de generare: feb. 05, 2021 la 07:10 AM
-- Versiune server: 10.4.17-MariaDB
-- Versiune PHP: 8.0.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_... |
/*
SQLyog Ultimate v12.4.1 (64 bit)
MySQL - 5.7.20-log : Database - javaee
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREI... |
--
-- Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
--
-- Window Functions Testing
-- https://github.com/postgres/postgres/blob/REL_12_BETA1/src/test/regress/sql/window.sql
CREATE TABLE empsalary (
depname string,
empno integer,
salary int,
enroll_date date
) USING parquet;
INS... |
-- MySQL dump 10.16 Distrib 10.1.26-MariaDB, for Win32 (AMD64)
--
-- Host: localhost Database: cruzroja
-- ------------------------------------------------------
-- Server version 10.1.26-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHAR... |
<gh_stars>1-10
EXEC sp_rename '.MeteringPoints.PhysicalStatusOfMeteringPoint', 'ConnectionState_PhysicalState', 'COLUMN';
GO
ALTER TABLE [dbo].[MeteringPoints]
ADD
ConnectionState_EffectiveDate DATETIME2(7) NULL;
GO
|
<filename>Impala/Interactive_Query/aggregation.sql
insert into table result select GOODS_ID, sum(GOODS_NUMBER) from bigdatabench_dw_item group by GOODS_ID;
|
CREATE TABLE Schema2.[LookupTable1](
[Lookup1Key] [int] NOT NULL,
[Lookup1Value] [nvarchar](50) NOT NULL,
CONSTRAINT [PK_LookupTable1] PRIMARY KEY CLUSTERED
(
[Lookup1Key] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON... |
-- MySQL Script generated by MySQL Workbench
-- Sat Nov 18 13:47:24 2017
-- 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_MODE='TR... |
-- phpMyAdmin SQL Dump
-- version 4.5.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: May 07, 2018 at 06:22 AM
-- Server version: 5.7.11
-- PHP Version: 5.6.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... |
-- =============================================
-- Author: <NAME>
-- Create date: 10/5/2008
-- Description:
-- =============================================
CREATE PROCEDURE [dbo].[GetWebsitesForUser]
@userId int = 0,
@start int = 0,
@length int = 12,
@search nvarchar(50),
@orderby int = 0
AS
BEGIN
SET NOCO... |
-- phpMyAdmin SQL Dump
-- version 3.5.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jul 18, 2017 at 09:45 AM
-- Server version: 5.5.24-log
-- PHP Version: 5.4.3
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... |
<reponame>rhorber/inventory-api<gh_stars>0
--
-- Table structure for table `categories`
--
DROP TABLE IF EXISTS `categories`;
CREATE TABLE `categories` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL,
`position` int(11) NOT NULL,
`timestamp` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE... |
<gh_stars>0
INSERT INTO department (name)
VALUES ("operations"), ("finance"), ("Human Resources"), ("legal");
INSERT INTO `role` (title, salary, department_id)
VALUES
("CEO", 6000000.00, null),
("COO", 600000.00, 1),
("Senior Engineer", 150000.00, 1),
("CFO", 600000.00, 2),
("Senior Accountant", 100000.00, 2),
("H... |
<filename>benchmark/IGlocations1/queries-vectorwise-disabled/8.sql
--SELECT (CASE WHEN (("IGlocations1_1"."city" = 'Unalaska') AND ("IGlocations1_1"."latitude" < 40)) THEN 'Hawaii' ELSE "IGlocations1_1"."state" END) AS "Calculation_7240730155956975", (CASE WHEN (locate('festival',LOWER("IGlocations1_1"."caption"))>0)... |
prompt --application/shared_components/user_interface/templates/region/inline_drawer
begin
-- Manifest
-- REGION TEMPLATE: INLINE_DRAWER
-- Manifest End
wwv_flow_api.component_begin (
p_version_yyyy_mm_dd=>'2021.10.15'
,p_release=>'21.2.6'
,p_default_workspace_id=>18303204396897713
,p_default_application_id=>4... |
CREATE TABLE USERS(
usr TEXT PRIMARY KEY,
psw TEXT,
eml TEXT
);
CREATE TABLE COMMENTS(
comment TEXT,
aid TEXT,
author TEXT
); |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 01, 2020 at 06:13 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.2.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
<filename>src/main/resources/database/changes/release-10.52.0/add_completed_by_phone_category.sql
INSERT INTO casesvc.category (categorypk, shortdescription, longdescription, eventtype, role, generatedactiontype, "group", oldcasesampleunittypes, newcasesampleunittype, recalccollectioninstrument) VALUES ('COMPLETED_BY_P... |
SELECT
title
--, updated_at
--, created_at
--, completed_at
--, started_at
--, site_id
,AVG(EXTRACT(EPOCH FROM (completed_at-created_at))) as "TotalTime_Avg"
,AVG(EXTRACT(EPOCH FROM (completed_at-started_at))) as "RunTime_Avg"
,MIN(EXTRACT(EPOCH FROM (completed_at-created_at))) as "TotalTime_Min"
,MIN(EXTRACT(EPOCH... |
<filename>jualbeli.sql
-- phpMyAdmin SQL Dump
-- version 4.4.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Feb 09, 2019 at 07:28 AM
-- Server version: 5.6.26
-- PHP Version: 5.6.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C... |
<reponame>ASSETEX/Aych.explore<filename>Migrations/003 - SavedQueries.table.sql
if OBJECT_ID('SavedQueries') is null
begin
CREATE TABLE [dbo].[SavedQueries]
(
Id int identity primary key,
QueryId int not null,
UserId int not null,
SiteId int not null,
Title nvarchar(100) not null,
[Descriptio... |
<filename>notes-n-resources/Data-Structures-N-Algo/_DS-n-Algos/Interview-Problems/HackerRank/SQL/Aggregation/Top-Earners.sql
/*
Enter your query here.
*/
select (salary * months) as e, count(*)
from employee
group by 1
order by e desc
limit 1; |
/*========================================================================================================================
Description: This script measures the IO latency for reads and writes for every database file in the instance
The script captures a snapshot of sys.dm_io_virtual_file_stats, sleeps for 1 minut... |
alter table site add reload_count int not null default 0;
|
<filename>World/ALive/RC2/world/2011-10-20-03.world_spell_target_position.sql<gh_stars>0
UPDATE `spell_target_position` SET `target_position_z` = '1042.9' WHERE `id` = '70860'; |
USE [master]
GO
CREATE DATABASE LoaderDB
GO
USE LoaderDB
GO
CREATE TABLE [dbo].[LoaderConfig](
[loaderContainerName] [nchar](100) NOT NULL,
[loadername] [nchar](100) NOT NULL,
[key] [nchar](100) NOT NULL,
[value] [nchar](250) NULL,
CONSTRAINT [PK_LoaderConfig] PRIMARY KEY CLUSTERED
(
[loaderContainerName]... |
<reponame>Ed-Fi-Alliance-OSS/Ed-Fi-MigrationUtility<gh_stars>0
-- 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 i... |
drop table if exists row cascade;
drop sequence if exists row_seq;
create sequence row_seq start 1000 increment 1000;
create table row (id int8 not null, date1 timestamp, date2 timestamp, date3 timestamp, date4 timestamp, long1 int8, long2 int8, long3 int8, long4 int8, long5 int8, str1 varchar(255), str2 varchar(255), ... |
CREATE INDEX IF NOT EXISTS
schedule_id_idx ON score(schedule_id);
|
<gh_stars>1-10
-- Deploy ggircs-portal:search_functions/search_certification_requests to pg
-- requires: tables/certification_url
begin;
drop function ggircs_portal.search_certification_requests;
commit;
|
create table R (A int);
create table S (A int);
create table T (A int);
-- q1 (queries_null.js)
select R.A from R where R.A not in (select S.A from S);
-- Expected: []
-- Got: []
-- ok
-- q2 (queries_null_1.js)
select R.A from R where not exists (select * from S where S.A = R.A);
-- Expected: [{"A":1},{"A":null}]
-- ... |
-- Step 1: Add the column for format
ALTER TABLE "APP"."NOTIFICATION_LOG" ADD "MESSAGE_FORMAT" varchar(16);
-- Step 2 : Change the type of the MESSAGE field from long varchar to clob
ALTER TABLE "APP"."NOTIFICATION_LOG" ADD COLUMN "MESSAGE_CLOB" CLOB;
UPDATE "APP"."NOTIFICATION_LOG" SET MESSAGE_CLOB=CAST(MESSAGE AS CL... |
<filename>migrations/26-planetarium-source.sql
UPDATE demos_submission SET source_code_url = 'http://github.com/littleworkshop/planetarium' WHERE slug = 'planetarium'; |
<gh_stars>10-100
CREATE INDEX "event_endTime" ON "Event" ("endTime");
|
<reponame>bajarangisoft/shopifyalerts
-- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 21, 2021 at 01:42 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";
... |
<filename>BD/SPs/parqueadero/spCrearParqueadero.sql
DROP PROCEDURE IF EXISTS spCrearParqueadero
GO
CREATE PROCEDURE spCrearParqueadero
@nombre VARCHAR(MAX)
, @ubicacion VARCHAR(MAX)
AS
BEGIN
INSERT INTO Parqueadero
(Nombre, Ubicacion)
VALUES
(@nombre, @ubicacion)
END |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 14, 2020 at 08:18 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 08, 2020 at 05:25 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
<gh_stars>0
SELECT mc.CountryCode, COUNT(m.MountainRange) AS MountainRanges
FROM MountainsCountries AS mc
JOIN Mountains AS m ON (mc.MountainId = m.Id AND mc.CountryCode IN ('BG', 'RU', 'US'))
GROUP BY mc.CountryCode
|
-- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Хост: localhost
-- Время создания: Янв 19 2019 г., 14:37
-- Версия сервера: 10.2.21-MariaDB
-- Версия PHP: 7.2.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 21-06-2020 a las 20:37:25
-- Versión del servidor: 10.4.13-MariaDB
-- Versión de PHP: 7.2.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
/*
Navicat Premium Data Transfer
Source Server : Localhost
Source Server Type : MySQL
Source Server Version : 100134
Source Host : localhost:3306
Source Schema : spk_penilaian
Target Server Type : MySQL
Target Server Version : 100134
File Encoding : 65001
Date: 18/09... |
-- name: GetParticipant :one
SELECT * FROM participant WHERE email = $1;
-- name: CreateParticipant :exec
INSERT INTO participant(email, track, name) VALUES ($1, $2, $3); |
-- file:triggers.sql ln:819 expect:true
CREATE FUNCTION city_insert() RETURNS trigger LANGUAGE plpgsql AS $$
declare
ctry_id int
|
<reponame>Shuttl-Tech/antlr_psql
-- file:numeric.sql ln:838 expect:true
select 4789999999999999999999999999999999999999999999999999999999999999999999999999999999999999 * 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
|
USE master;
GO
RESTORE DATABASE TutorialDB
FROM DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\Backup\TutorialDB.bak'
WITH
MOVE 'TutorialDB' TO 'C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\DATA\TutorialDB.mdf',
MOVE 'TutorialDB_log' TO 'C:\Program Files\Microsoft SQL Server\... |
<filename>migrations/7_add_datastore_down.sql
ALTER TABLE media DROP COLUMN datastore_id;
ALTER TABLE thumbnails DROP COLUMN datastore_id;
DROP INDEX datastores_index;
DROP TABLE datastores;
|
<reponame>USGCRP/gcis
DELETE from organization_type where identifier = 'international';
|
-- phpMyAdmin SQL Dump
-- version 4.0.4.1
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 19-11-2013 a las 17:02:26
-- Versión del servidor: 5.5.32
-- Versión de PHP: 5.4.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR... |
<filename>dbt-greenery/models/example/staging/stg_products.sql<gh_stars>0
{{
config(
materialized='table'
)
}}
with products_source as (
select * from {{ source('tutorial', 'products') }}
)
, products_mod as (
select
product_id
, name
, price
, quantity
from products_source
)
select * fr... |
<reponame>laowengs/vue-admin<gh_stars>0
create database vueadmindb default character set utf8mb4 collate utf8mb4_unicode_ci;
CREATE USER 'vueadmin'@'%' IDENTIFIED BY '<PASSWORD>';
grant all privileges on vueadmindb.* to 'vueadmin'@'%';
CREATE TABLE `vue_user` (
`user_id` BIGINT NOT NULL A... |
{% macro materialize__load_csv_rows(model, agate_table) -%}
{% set cols_sql %}
{% for column in agate_table.column_names %}
column{{loop.index}} as {{column}}
{%- if not loop.last%},{%- endif %}
{% endfor %}
{% endset %}
{% set bindings = [] %}
{% for chunk in agate_table.rows | batch(1000)... |
explain plan for select * from ( select count(distinct c_float), max(c_float), min(c_float) from alltypes_with_nulls_v group by c_date order by c_date ) t limit 0;
|
<gh_stars>10-100
CREATE PROCEDURE [tSQLt].[CaptureOutput]
@command NVARCHAR (MAX) NULL
AS EXTERNAL NAME [tSQLtCLR].[tSQLtCLR.StoredProcedures].[CaptureOutput]
|
autocommit off;
create class u(i string unique not null);
insert into u values('one');
insert into u values('two');
select * from u;
update u set i='one' where i='two';
select * from u;
rollback;
|
<gh_stars>1000+
-- +migrate Up
CREATE VIEW view_node_run_job AS
SELECT
jobs->>'id' as "id",
jobs->>'workflow_node_run_id' as "workflow_node_run_id",
jobs->>'status' as "status",
cast(jobs->>'start' as timestamp with time zone) as "started",
cast(jobs->>'queued' as timestamp w... |
<filename>demo_dump.sql
-- phpMyAdmin SQL Dump
-- version 4.4.12
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Oct 27, 2015 at 11:44 AM
-- Server version: 5.6.25
-- PHP Version: 5.6.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@... |
USE `lahman2016`;
SELECT
S.yearID, S.teamID AS WS_winner,
CONCAT(M.nameFirst, ' ', M.nameLast) AS Name, S.salary,
CONCAT(M2.nameFirst, ' ', M2.nameLast) AS BOS_Player_Name, S2.salary
FROM
WSWinnerTeam W, MaxSalaries S, MaxSalaries S2, Master M, Master M2
WHERE
W.yearID = S.yearID AND S.yearID = S2.... |
<filename>docs/cmdb.sql
-- MySQL dump 10.13 Distrib 5.7.18, for macos10.12 (x86_64)
--
-- Host: localhost Database: cmdb_test
-- ------------------------------------------------------
-- Server version 5.7.18
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=... |
CREATE OR REPLACE FUNCTION infer_nodes(
)
RETURNS void
LANGUAGE 'plpgsql'
AS $BODY$
DECLARE
v_rec record;
v_rec2 record;
v_nodetol numeric;
v_nodeid integer;
v_outarcs integer[];
v_inarcs integer[];
v_allarcs integer[];
v_card integer;
v_connstatus character varying(6);
BEGIN
select numericval
into... |
CREATE TABLE dbo.City
(CityID int IDENTITY PRIMARY KEY NOT NULL,
CityName varchar(50) NOT NULL)
CREATE TABLE dbo.Difficulty
(DifficultyID varchar(25) PRIMARY KEY NOT NULL)
CREATE TABLE dbo.Providence
(ProvidenceID int IDENTITY PRIMARY KEY NOT NULL,
ProvidenceName varchar(50) NOT NULL)
CREATE TABLE dbo.... |
<gh_stars>0
.mode columns
.headers on
.nullvalue NULL
SELECT id, firstName, lastName, count(*) as numAwards
FROM Person, (
SELECT year, personID, awardID
FROM TVAward
UNION ALL
SELECT year, personID, awardID
FROM MovieAward
)
O... |
drop table budget.DistributionsDetails;
drop table budget.Budget;
drop table budget.Distributions;
drop table budget.Earnings;
drop table budget.Expenditure;
|
<filename>sql/get/episodes_for_feed_id.sql
SELECT
e.id,
e.title,
e.description,
e.published,
e.explicit,
e.duration,
e.show_notes,
e.url as web_link,
e.media_url,
e.keywords,
e.media_length,
e.mime_type,
e.guid
FROM episode e
WHERE e.feed_id = $1 AND e.id > $2
ORDER B... |
-- MySQL Script generated by MySQL Workbench
-- Sun Jun 14 23:43:21 2020
-- 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_MODE='ON... |
drop schema if exists test_id cascade;
create schema test_id;
set search_path = test_id;
create table id_generados(
nomvar text,
valores jsonb,
id bigint
);
insert into id_generados values ('ejemplo','null'::jsonb, 1000);
-- select setseed(0.1233);
create or replace function generar_id(p_nomv... |
<reponame>ucdavis/Purchasing<gh_stars>1-10
/*
Description:
Provides a list of workgroups, and the possible orgs that it can roll up to. To be used i guess for associating admin workgroups to their descendant workgroups.
*/
CREATE VIEW [dbo].[vAdminWorkgroups]
AS
select row_number() over (order by workgroups... |
INSERT INTO users (name, email) VALUES (:name, :email) RETURNING *
|
<reponame>kotuk/stalker-portal-4.9.x
--
ALTER TABLE `apps` ADD COLUMN `icons` TEXT;
INSERT INTO `apps` (`url`, `added`, `alias`, `name`) VALUES
('https://github.com/StalkerApps/vk.music', NOW(), 'vk.music', 'vk.music'),
('https://github.com/StalkerApps/exua', NOW(), 'ex.ua', 'ex.ua');
--//@UNDO
ALTER TABLE `app... |
/*******************************************************************************/
/*@file cohort_baseline_SCr.sql
/*
/*in: #AKI_Initial, #AKI_Scr_eGFR, #All_Scr_eGFR
/*
/*out: #AKI_Scr_base
/*
/*action: write
/********************************************************************************/
--get first record wi... |
/*
Navicat Premium Data Transfer
Source Server : localhost_3306
Source Server Type : MySQL
Source Server Version : 80011
Source Host : localhost:3306
Source Schema : vuecms
Target Server Type : MySQL
Target Server Version : 80011
File Encoding : 65001
Date: 06/11/201... |
<filename>Samples/SQLCE/SportImage/Sport.sql
CREATE TABLE Language
(
Id NVARCHAR(10) NOT NULL,
Name NVARCHAR(50) NOT NULL,
Flag IMAGE NOT NULL,
PRIMARY KEY(Id)
);
CREATE TABLE Sport
(
Id INTEGER NOT NULL,
Language NVARCHAR(10) NOT NULL,
Name NVARCHAR(50) NOT NULL,
Picture IMAGE NOT NULL,
FieldPlayers... |
<filename>src/test/resources/cast.test_45.sql
-- cast.test
--
-- execsql {SELECT CAST('123abc' AS numeric)}
SELECT CAST('123abc' AS numeric) |
<filename>src/test/resources/sql/alter_rule/400b7c30.sql<gh_stars>10-100
-- file:rules.sql ln:1039 expect:true
ALTER RULE "_RETURN" ON rule_v1 RENAME TO abc
|
-- file:create_index.sql ln:509 expect:true
EXPLAIN (COSTS OFF)
SELECT count(*) FROM kd_point_tbl WHERE p << '(5000, 4000)'
|
DROP DATABASE IF EXISTS `fia_db`;
CREATE DATABASE IF NOT EXISTS `fia_db` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `fia_db`;
DROP TABLE IF EXISTS `firm`;
CREATE TABLE IF NOT EXISTS `firm` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`buid` varchar(50) DEFAULT NULL,
`name` text,
`email` text,
`phone` text,
`... |
<filename>source/Test_Recording/sql/InsertTransition.sql
INSERT INTO Transitions(From_Situation, To_Situation, Transition_Count, Transition_Probability) VALUES
(@FromSituation, @ToSituation, 1, 1.0); |
<gh_stars>1-10
ALTER TABLE `t_role_data` ADD COLUMN `invisibleData` longtext NULL AFTER `heroBagData`; |
<gh_stars>10-100
--clear data
TRUNCATE TABLE core.action CASCADE;
ALTER SEQUENCE core.action_id_seq RESTART WITH 35;
ALTER SEQUENCE core.action_metadata_id_seq RESTART WITH 35;
INSERT INTO core.action (id, json) VALUES
(1, '{"_id": "05934ae338431f28bf6793b241642462", "data": {"visitCode": "OPV 0", "completionDate":... |
create function smart_exposure.active_position_at_ts(user_address text, ts bigint)
returns TABLE(etoken_address text, balance numeric)
language plpgsql
as
$$
begin
return query with transfers as ( select token_address as address, -value as amount
from public.erc20_transf... |
/*
* This file is released under the terms of the Artistic License. Please see
* the file LICENSE, included in this package, for details.
*
* Copyright (C) 2007 <NAME>
*/
CREATE OR REPLACE FUNCTION BrokerVolumeFrame1 (
IN broker_list VARCHAR[],
IN sector_name VARCHAR,
OUT broker_name VARCHAR(100)[],
OUT ... |
<filename>data/schema.sql
-- MySQL Workbench Forward Engineering
-- -----------------------------------------------------
-- Schema mydb
-- -----------------------------------------------------
-- -----------------------------------------------------
-- Schema mydb
-- -------------------------------------------------... |
<reponame>lkq001/laravel54
/*
Navicat Premium Data Transfer
Source Server : laravel54
Source Server Type : MySQL
Source Server Version : 50719
Source Host : mysql
Source Database : laravel
Target Server Type : MySQL
Target Server Version : 50719
File Encoding : utf-8
D... |
<filename>DBMS/Assignment2/insert_data/4booking.sql
INSERT INTO booking_006 VALUES ('R1','H1', 'G1', '01-JAN-2016','08-JAN-2016');
INSERT INTO booking_006 VALUES ('R2', 'H1', 'G2', '12-JAN-2016', '18-JAN-2016');
INSERT INTO booking_006 VALUES ('R1','H2', 'G3', '01-FEB-2016', '08-FEB-2016');
INSERT INTO booking_006 VALU... |
<reponame>droubo/meta-level-analysis-of-anomaly-detectors
SELECT * FROM
DIFF
(SELECT * FROM sample WHERE usage > 1000.0) outliers,
(SELECT * FROM sample WHERE usage < 1000.0) inliers
ON
location, version INTO OUTFILE '1.csv';
|
<filename>06IndicesAndDataAggregation/01RecordsCount.sql<gh_stars>0
SELECT COUNT(Id) AS [Count]
FROM WizzardDeposits |
-- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jun 22, 2018 at 11:40 AM
-- Server version: 10.1.18-MariaDB
-- PHP Version: 7.0.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_... |
<gh_stars>0
DROP TABLE public.user CASCADE;
-- user
CREATE TABLE "user" (
"id" BIGSERIAL NOT NULL PRIMARY KEY,
"username" VARCHAR(20) NOT NULL UNIQUE,
"email" VARCHAR(120) NOT NULL UNIQUE,
"password" VARCHAR(255) NOT NULL,
"img_url" INTEGER
);
CREATE TABLE "player" (
"id" BIGSERIAL NOT NULL PRIMARY KEY,
... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 09-09-2016 a las 20:18:45
-- Versión del servidor: 10.1.13-MariaDB
-- Versión de PHP: 5.6.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT... |
<filename>jydcc_bus_mama.sql
-- phpMyAdmin SQL Dump
-- version 4.9.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jan 04, 2021 at 11:31 AM
-- Server version: 10.2.34-MariaDB
-- PHP Version: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.