sql stringlengths 6 1.05M |
|---|
<reponame>cheryalabalram/spring-boot-flyway
create table girlfriend (
girl_id int identity primary key,
short_name varchar(20) not null,
contact_name varchar (50) not null,
contact_number varchar (20) not null,
constraint gfr_bfr_fk
foreign key (girl_id)
references boyfriend (boy_id)
);
insert i... |
<reponame>nrademacher/inv<filename>prisma/migrations/20220122034544_create_basic_entities/migration.sql
/*
Warnings:
- You are about to drop the `posts` table. If the table is not empty, all the data it contains will be lost.
- Added the required column `city` to the `users` table without a default value. This i... |
CREATE TABLE [dbo].[FileAsset] (
[Id] INT IDENTITY (1, 1) NOT NULL,
[Type] VARCHAR (255) NULL,
[Name] VARCHAR (255) NULL,
[Directory] VARCHAR (255) NULL,
[DataFileName] VARCHAR (255) NULL,
[DataContentType] VARCHAR (255) NULL,
[DataFileS... |
drop schema public cascade;
create schema public;
CREATE TABLE Gist
(gistid VARCHAR(32) NOT NULL PRIMARY KEY,
username VARCHAR(32) NOT NULL,
description VarCHAR(256) NOT NULL);
CREATE TABLE Tag
(tag VARCHAR(256) NOT NULL UNIQUE,
tagid SERIAL NOT NULL PRIMARY KEY,
freq INT NOT NULL DEFAULT 0);
CREATE TABLE Tag_Gist
... |
<reponame>hahaluckyme/e621ng
ALTER TABLE public.favorites ALTER COLUMN id TYPE bigint; |
<filename>programming_for_data_science/lesson01.sql
--15. LIMIT %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
/*
1. Try it yourself below by writing a query that limits the response to only the first 15 rows and includes the occurred_at, account_id, and channel fields in the web_events table.
*/
SELECT occurred_at, account_id, chan... |
CREATE TABLE IF NOT EXISTS temp_inntekt_V1_person_mapping_
(
inntektId TEXT NOT NULL,
aktørId VARCHAR(20) NOT NULL,
fnr VARCHAR(11) NULL,
vedtakId VARCHAR(26) NOT NULL,
beregningsdato DATE NOT... |
/* This project uses Mysql database for storing and retreving information */
/* I have used a table for storing the details of the user in the mysql database */
| User | CREATE TABLE `User` (
`name` varchar(30) DEFAULT NULL,
`DateofBirth` date DEFAULT NULL,
`Gender` varchar(10) DEFAULT NULL,
`Mail` varchar(30... |
<filename>08.Indicies_And_Data_Aggregation_Excersise/18_3rdHighestSalary.sql
SELECT DepartmentID, ThirdHighestSalary
FROM
(SELECT e.DepartmentID,
MAX(e.Salary) AS ThirdHighestSalary,
DENSE_RANK() OVER(PARTITION BY e.DepartmentID ORDER BY e.Salary DESC) AS [Rank]
FROM Employees e
GROUP BY DepartmentI... |
<filename>decryptSQLServerArticleSchemaOptions.sql
-- –******TRANSACTIONAL REPLICATION******
DECLARE @SchemaOption binary(8)
DECLARE @intermediate binary(8)
DECLARE @OptionsInText varchar(4000)
SET @OptionsInText = ' **SCHEMA OPTIONS HERE ARE** '
SET @OptionsInText = @OptionsInText + char(13) + '... |
-- MySQL dump 10.13 Distrib 5.7.9, for linux-glibc2.5 (x86_64)
--
-- Host: localhost Database: Base_Framework
-- ------------------------------------------------------
-- Server version 5.5.47-0ubuntu0.14.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS... |
--Script to create analytical table by parsing genre field into 3 fields
--Add principal names for each title
--Add keywords and parse them into individual fields
--create extension fuzzystrmatch;
drop table if exists analytical_table;
create temp table analytical_table as
select distinct
id,
t.tconst,
t.titlet... |
WITH RECURSIVE pcr_product_parents (
pcr_product_id,
start_pcr,
<% IF gel_lanes %>
gel_lane_id,
pos_pcr,
<% END %>
round,
loop_calc,
enzyme_id,
pcr_template_id,
volume,
template_pcr_product_id,
rt_product_id,
extraction_id,
bisulfite_converted_dna_id,
sample_id
) ... |
<reponame>a-dagnicourt/pin-my-ride-back
-- CreateTable
CREATE TABLE `pin` (
`id` INT NOT NULL AUTO_INCREMENT,
`label` VARCHAR(191) NOT NULL,
`summary` VARCHAR(191) NOT NULL,
`media` VARCHAR(191) NOT NULL,
`media_type` VARCHAR(191) NOT NULL,
`date` DATETIME(3) NOT NULL,
`lat` VARCHAR(191) NOT... |
<gh_stars>1-10
insert into users
(first_name, last_name, email, status)
values
('${defaultUser}', '${defaultUser}', '<EMAIL>', 'ACTIVE'); |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- 主机: localhost
-- 生成日期: 2020-02-13 22:48:09
-- 服务器版本: 5.7.26
-- PHP 版本: 7.3.4
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_C... |
<reponame>danieldiamond/gitlab-analytics
-- depends_on: {{ ref('zuora_excluded_accounts') }}
WITH source AS (
SELECT *
FROM {{ ref('zuora_subscription_source') }}
)
SELECT *
FROM source
WHERE is_deleted = FALSE
AND exclude_from_analysis IN ('False', '')
AND account_id NOT IN ({{ zuora_excluded_accounts(... |
<filename>woann_chat.sql
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- 主机: localhost
-- 生成日期: 2019-01-10 12:06:03
-- 服务器版本: 5.5.60-log
-- PHP 版本: 7.2.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_S... |
<reponame>cuza/Erupe
BEGIN;
ALTER TABLE characters
ADD COLUMN savedata bytea;
END; |
<gh_stars>0
alter table proposal modify initial_contract_admin varchar2(40);
|
drop procedure if exists `table_base`;
create procedure `table_base`()
begin
declare done int default 0;
declare a varchar(20);
declare rs cursor for select `TABLE_NAME` from information_schema.`TABLES` where `TABLE_SCHEMA`='test';
declare continue handler for sqlstate '02000' set done=1;
open rs;
repeat ... |
<filename>src/main/ksql/200_PoC queries - solution.sql
#############################################################################################
#
# This script contains all queries needed for the second PoC for ENTSO-E .
#
############################################################################################... |
SELECT id = grantee_principal_id,
name = permission_name,
state = state
FROM sys.server_permissions; |
<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 information.
PRINT N'Creating primary key [ReportCa... |
-- Convert schema '/home/jjohnston/sites/Xqursion/share/migrations/_source/deploy/27/001-auto.yml' to '/home/jjohnston/sites/Xqursion/share/migrations/_source/deploy/28/001-auto.yml':;
;
BEGIN;
;
ALTER TABLE users ADD COLUMN last_login_at datetime;
;
COMMIT;
|
<filename>sql/concept_cause_of_death.sql
INSERT INTO `concept` VALUES (5002,0,NULL,NULL,NULL,2,5,0,1,'2004-08-12 00:00:00',NULL,1,'2005-02-22 00:00:00',NULL,NULL,NULL,'be34186e-87dc-11df-8b29-b8ac6f808134'), (5622,0,NULL,NULL,NULL,4,11,0,1,'2004-08-12 00:00:00',NULL,NULL,NULL,NULL,NULL,NULL,'be37b406-87dc-11df-8b29-b8a... |
-- @testpoint:opengauss关键字template(非保留),作为外部数据源名
--关键字不带引号-成功
drop data source if exists template;
create data source template;
drop data source template;
--关键字带双引号-成功
drop data source if exists "template";
create data source "template";
drop data source "template";
--关键字带单引号-合理报错
drop data source if exists 'templa... |
-- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 30-11-2020 a las 04:56:00
-- Versión del servidor: 10.4.14-MariaDB
-- Versión de PHP: 7.2.34
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
<gh_stars>0
USE "ColonialJourney";
/*
Count all colonists that are on technical journey.
*/
SELECT
COUNT(tc.Id) AS [Count]
FROM
"Journeys" AS j
LEFT JOIN
"TravelCards" AS tc
ON
tc.JourneyId = j.Id
WHERE
j.Purpose = 'Technical'; |
-- ***************************************************************************
-- File: 4_8.sql
--
-- Developed By TUSC
--
-- Disclaimer: Neither Osborne/McGraw-Hill, TUSC, nor the author warrant
-- that this source code is error-free. If any errors are
-- found in this source code, please repor... |
<gh_stars>0
-- Drop database
DROP DATABASE IF EXISTS your_database_name;
-- Create database
CREATE DATABASE your_database_name;
-- Use database
USE your_database_name;
-- Create tables |
int test3() {
int x = 1.0;
float y = 1.1;
return y;
}
|
/*
Navicat Premium Data Transfer
Source Server : local
Source Server Type : MySQL
Source Server Version : 50724
Source Host : localhost:3306
Source Schema : aduan
Target Server Type : MySQL
Target Server Version : 50724
File Encoding : 65001
Date: 10/07/2021 10:22:03... |
-- phpMyAdmin SQL Dump
-- version 4.9.4
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost:3306
-- Tiempo de generación: 03-10-2020 a las 11:30:40
-- Versión del servidor: 5.7.31
-- Versión de PHP: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*... |
<reponame>test2a/ClinicCases
-- phpMyAdmin SQL Dump
-- version 3.4.5deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jul 19, 2012 at 11:40 AM
-- Server version: 5.1.63
-- PHP Version: 5.3.6-13ubuntu3.8
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+05:30";
--
-- Database: `default`... |
-- View: routing.ways_with_info
-- DROP VIEW routing.ways_with_info;
CREATE OR REPLACE VIEW routing.ways_with_info AS
SELECT ways.gid,
ways.source,
ways.target,
st_length(ways.the_geom::geography, true) AS length,
ways.the_geom,
way_info.osm_id,
way_info.public,
way_info.bicycle,
way... |
<gh_stars>10-100
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- Create empty tables Loan_Prod and Borrower_Prod to be filled with the new data with PowerShell during Production.
DROP TABLE if exists [dbo].[Loan_Prod]
CREATE TABLE [dbo].[Loan_Prod](
[loanId] [int] NOT NULL,
[memberId] [int] NOT NULL,
[date... |
USE ODS
GO
DROP VIEW IF EXISTS StudentPerformance
DROP TABLE IF EXISTS uci.StudentPerformance
DROP SCHEMA IF EXISTS uci
GO
CREATE SCHEMA uci
GO
DROP TABLE IF EXISTS uci.StudentPerformance
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE uci.StudentPerformance(
[ETLKey] [uniqueidentifier] NO... |
CREATE TABLE IF NOT EXISTS {{envExecution}}.mapping_ko (id_source text COLLATE pg_catalog."C", id integer, date_integration text COLLATE pg_catalog."C", id_norme text COLLATE pg_catalog."C", periodicite text COLLATE pg_catalog."C", validite text COLLATE pg_catalog."C") WITH (autovacuum_enabled = false, toast.autovacuu... |
<filename>Banco de dados/Stored Procedure/PLSQL - Oracle/Aula 02/Exemplos/02 - Exemplo drop e alter table.sql
-- Cria duas tabelas repetidas para poder usar a instrução de retirar
-- do entidades do banco de dados
CREATE TABLE Depto2
(
NrDepto SMALLINT NOT NULL,
NmDepto CHAR(20) NOT NULL,
DsLocal VARCH... |
<gh_stars>10-100
-- CreateTable
CREATE TABLE "Todo" (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"body" TEXT NOT NULL,
"status" TEXT NOT NULL DEFAULT 'off'
);
|
SELECT * FROM "t" WHERE NOT ( (1, 2) IN ((1, 2), (3, 4), (5, 6) )) |
-- Prihlasit se jako root, prazdne heslo
CREATE USER 'student'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'student'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'student'@'localhost' IDENTIFIED BY 'password';
-- Prihlasit se jako student, heslo password
# DROP DA... |
DROP TABLE IF EXISTS `group`;
CREATE TABLE `group` (
sys_id BIGINT(19) NOT NULL AUTO_INCREMENT,
sys_version BIGINT(19) NOT NULL DEFAULT 1,
sys_last_modified TIMESTAMP NOT NULL DEFAULT NOW(),
uuid VARCHAR(40) NOT NULL,
name VARCHAR(200) NO... |
<filename>Application/Cms/Sql/uninstall.sql
DROP TABLE IF EXISTS `oc_cms_article`;
DROP TABLE IF EXISTS `oc_cms_attribute`;
DROP TABLE IF EXISTS `oc_cms_index`;
DROP TABLE IF EXISTS `oc_cms_category`;
DROP TABLE IF EXISTS `oc_cms_type`;
DROP TABLE IF EXISTS `oc_cms_comment`;
DROP TABLE IF EXISTS `oc_cms_report`;
DROP T... |
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: bwoodall
-- Create date: 2012-06-07
-- Description: Upsert an entry to Entry table
-- =============================================
USE DictionaryStore;
IF OBJECT_ID('dbo.SetEntry') IS NULL
EXEC('CR... |
<reponame>mohammadrizki/BurningOKR
-- hibernate sequence
CREATE SEQUENCE hibernate_sequence
INCREMENT BY 1
MINVALUE 1
MAXVALUE 9223372036854775807
START WITH 54
CACHE 1;
-- activity
CREATE TABLE activity
(
id bigint NOT NULL,
action integer,
date datetime2,
object charac... |
<reponame>FlashSheridan/daml
-- Copyright (c) 2019 The DAML Authors. All rights reserved.
-- SPDX-License-Identifier: Apache-2.0
---------------------------------------------------------------------------------------------------
-- V10.0: Extract event data
--
-- This schema version adds the tables contract_signatorie... |
--# Write your MySQL query statement below
select a.student_name as member_A,
b.student_name as member_B,
c.student_name as member_C
from SchoolA a cross join SchoolB b cross join SchoolC c where a.student_name != b.student_name and
a.student_id != b.student_id and
b.student_name != c.student_name and
b.student_id != c... |
<reponame>antlr/groom
-- searches all databases for GRANT'ed permissions
-- ignores SQL accounts and domain users
INSERT INTO dbs
SELECT name
FROM sys.databases
ORDER BY name
-- can be changed to do windows users easily
SELECT 'USE ' + database_name + char(10) +
'GO' + CHAR(10) +
permission + ' ' +
act... |
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3306
-- Время создания: Окт 17 2021 г., 18:24
-- Версия сервера: 5.7.16-log
-- Версия PHP: 7.1.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE... |
-- @testpoint: opengauss关键字procedural(非保留),作为游标名,部分测试点合理报错
--前置条件
drop table if exists procedural_test cascade;
create table procedural_test(cid int,fid int);
--关键字不带引号-成功
start transaction;
cursor procedural for select * from procedural_test order by 1;
close procedural;
end;
--关键字带双引号-成功
start transaction;
cursor ... |
-- @testpoint:opengauss关键字exec(非保留),作为数据库名
--关键字不带引号-成功
drop database if exists exec;
create database exec;
drop database exec;
--关键字带双引号-成功
drop database if exists "exec";
create database "exec";
drop database "exec";
--关键字带单引号-合理报错
drop database if exists 'exec';
create database 'exec';
--关键字带反引号-合理报错
drop datab... |
<filename>db/schema.sql<gh_stars>0
DROP TABLE IF EXISTS employees;
DROP TABLE IF EXISTS roles;
DROP TABLE IF EXISTS departments;
CREATE TABLE departments (
id INTEGER AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(30) NOT NULL UNIQUE
);
CREATE TABLE roles (
id INTEGER AUTO_INCREMENT PRIMARY KEY,
title VARCH... |
CREATE TABLE [dbo].[smsserver_out](
[id] [bigint] IDENTITY(1,1) NOT NULL,
[type] [char](1) NOT NULL DEFAULT ('O'),
[recipient] [nvarchar](32) NOT NULL,
[text] [nvarchar](1000) NOT NULL,
[wap_url] [nvarchar](100) NULL,
[wap_expiry_date] [datetime] NULL,
[wap_signal] [char](1) NULL,
[create_date] [datetim... |
<reponame>bloveless/esp32-iot-desk<filename>docker/postgres/initdb.d/schema.sql<gh_stars>0
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
--
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_mess... |
SELECT COUNT(*)
FROM site AS s,
so_user AS u1,
tag AS t1,
tag_question AS tq1,
question AS q1,
badge AS b1,
account AS acc
WHERE s.site_id = u1.site_id
AND s.site_id = b1.site_id
AND s.site_id = t1.site_id
AND s.site_id = tq1.site_id
AND s.site_id = q1.site_id
AND t1.id = tq1.tag... |
<reponame>caiqueportela/Cade-o-moto
CREATE TABLE `fare_rules` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`fare_id` VARCHAR(50) NOT NULL ,
`route_id` VARCHAR(8) NOT NULL ,
`origin_id` VARCHAR(7) ,
`destination_id` VARCHAR(7) ,
`contains_id` VARCHAR(7) ,
PRIMARY KEY (id));
INSERT INTO `fare_rules` ( `fare_id`,`route_id`,... |
SELECT CountryName, CountryCode,
CASE
WHEN CurrencyCode = 'EUR' THEN 'Euro' ELSE 'Not Euro'
END AS Currency
FROM Countries
ORDER BY CountryName
|
-- phpMyAdmin SQL Dump
-- version 3.4.5
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Waktu pembuatan: 03. Nopember 2016 jam 12:27
-- Versi Server: 5.5.16
-- Versi PHP: 5.3.8
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!4... |
SELECT m.ModelId, m.Name ,
CAST(AVG(DATEDIFF(DAY, j.IssueDate, j. FinishDate)) AS varchar(50)) + ' ' + 'days' AS [Average Service Time]
FROM Models AS m
JOIN Jobs AS j ON m.ModelId = j.ModelId
WHERE j.FinishDate IS NOT NULL
GROUP BY m.ModelId, m.Name
ORDER BY AVG(DATEDIFF(DAY, j.IssueDate, j. FinishDate)) |
CREATE PROCEDURE [dbo].[SP_ListItemData_Save]
@id int,
@ListName nvarchar(max),
@Urutan nvarchar(max),
@Text nvarchar(max),
@Value nvarchar(max)
AS
declare @Title nvarchar(max)
declare @Message nvarchar(max)
declare @MStatus nvarchar(max)
declare @IdS bigint
set @IdS = 0
if(@id = 0)
begin
if not exists(select*... |
SELECT t.FirstName + ' ' + t.LastName AS [Teacher Full Name],
sbj.Name ,s.FirstName + ' ' + s.LastName AS [Student Full Name],
AVG(ss.Grade),
DENSE_RANK() OVER (PARTITION BY s.Id ORDER BY AVG(ss.Grade) DESC) AS gradeRANK
FROM Students AS s
INNER JOIN StudentsSubjects AS ss
ON ss.StudentId = s.Id
INNER... |
<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 4.1.12
-- http://www.phpmyadmin.net
--
-- Host: localhost:8889
-- Generation Time: Oct 02, 2014 at 04:45 PM
-- Server version: 5.5.34
-- PHP Version: 5.3.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR... |
<gh_stars>1-10
CREATE TABLE [dbo].[EventProviderEventType]
(
[EventProviderEventTypeId] BINARY(16) NOT NULL PRIMARY KEY NONCLUSTERED,
[FullName] VARCHAR(512) NOT NULL
)
GO
CREATE UNIQUE CLUSTERED INDEX [IX_EventProviderEventType] ON [dbo].[EventProviderEventType] ([FullName])
|
DROP TABLE IF EXISTS important_numbers;
CREATE TABLE important_numbers(
name TEXT,
number TEXT,
onCampus INTEGER,
allDay INTEGER,
description TEXT
);
|
CREATE TABLE IF NOT EXISTS todoConfig
(
todoID varchar(30) NOT NULL,
key varchar(20) NOT NULL,
value varchar(30) NOT NULL
); |
DROP DATABASE IF EXISTS `laundry`;
CREATE DATABASE `laundry`;
USE `laundry`;
CREATE TABLE `booker` (
id INT PRIMARY KEY AUTO_INCREMENT,
identifier VARCHAR(100) NOT NULL, -- i.e. apartment no
name VARCHAR(100),
email VARCHAR(100),
phone VARCHAR(20),
pin VARC... |
<filename>pset7/fiftyville/log.sql
-- Keep a log of any SQL queries you execute as you solve the mystery.
SELECT description, id FROM crime_scene_reports
WHERE day = 28 AND month = 7 AND street = 'Chamberlin Street';
SELECT activity, license_plate, id, hour, minute FROM courthouse_security_logs
WHERE year = 2020 AND m... |
<filename>Practice/SQL/Advanced Join/SQL_Project_Planning.sql<gh_stars>1-10
SELECT Start_Date, MIN(End_Date)
FROM
(SELECT Start_Date FROM Projects WHERE Start_Date NOT IN
(
SELECT End_Date FROM Projects)
) a,
(SELECT End_Date FROM Projects WHERE End_Date NOT IN
(
... |
<reponame>morality-admin/morality.network
CREATE TABLE [dbo].[Transactions](
[Id] [bigint] IDENTITY(1,1) PRIMARY KEY NOT NULL,
[AddressFrom] NVARCHAR(42) NOT NULL,
[AddressTo] NVARCHAR(42) NOT NULL,
[Fee] FLOAT NOT NULL,
[Amount] FLOAT NOT NULL,
[CurrencyId] BIGINT NOT NULL,
[TransactionHash] NVARCHAR(200) NOT ... |
<gh_stars>100-1000
SET @sName = 'bx_payment';
-- SETTINGS
SET @iCategoryId = (SELECT `id` FROM `sys_options_categories` WHERE `name`=@sName LIMIT 1);
DELETE FROM `sys_options` WHERE `name` IN ('bx_payment_credits_only', 'bx_payment_single_seller');
INSERT INTO `sys_options` (`name`, `value`, `category_id`, `c... |
-- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 19, 2020 at 12:29 PM
-- Server version: 10.1.32-MariaDB
-- PHP Version: 7.2.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... |
<gh_stars>0
CREATE USER autosolver WITH createdb password '<PASSWORD>'
;
CREATE database autosolver WITH owner autosolver
;
\connect "dbname=autosolver user=autosolver password=<PASSWORD>"
;
CREATE SCHEMA IF NOT EXISTS autosolver AUTHORIZATION autosolver
;
|
<reponame>kostin88/impala-tpcds-kit<filename>queries/q35.sql
-- start query 35 in stream 0 using template query35.tpl
with table1 as (
select ws_bill_customer_sk sk
from
web_sales,date_dim
where
ws_sold_date_sk between 2451180 and 2451453 and
d_year = 1999 and
d_qoy < 4
UNION ALL
select cs_ship_customer_sk sk
fro... |
--
-- PostgreSQL Schema Migration
--
-- See FlywayDB.org documentation to see how these changes are applied
--
-- !!! DO NOT MODIFY THIS SCRIPT !!!
--
--
-- element_id_names contains the list of all of the unique id columns for the ids in a graph.
--
UPDATE graph SET element_id_names = null;
ALTER TABLE graph RENAME ... |
DROP TABLE IF EXISTS cart_event;
CREATE TABLE cart_event
(
id BIGINT(20) PRIMARY KEY NOT NULL AUTO_INCREMENT,
created_at BIGINT(20),
last_modified BIGINT(20),
cart_event_type INT(11),
product_id VARCHAR(255),
quantity INT(11),
user_id BIGINT(20)
);
CREATE INDEX IDX_... |
<reponame>gxa/atlas
INSERT INTO scxa_marker_genes(experiment_accession, gene_id, k, cluster_id, marker_probability) VALUES ('E-GEOD-99058', 'ENSMUSG00000027737', 6, 4, 1);
INSERT INTO scxa_marker_genes(experiment_accession, gene_id, k, cluster_id, marker_probability) VALUES ('E-GEOD-99058', 'ENSMUSG00000030741', 11, 5,... |
<gh_stars>1-10
SET serveroutput ON
set pagesize 0
set trimspool on
SPOOL create_fresh_schema.log
prompt "----------Dropping tables---Please wait ------------------"
prompt "-------Dropping supplier_master---------------------------"
@wipe_supplier_master.sql
prompt "-------Dropping supplier_master don... |
-- increase the field length https://app.camunda.com/jira/browse/CAM-8177 --
DROP INDEX ACT_UNIQ_AUTH_USER;
DROP INDEX ACT_UNIQ_AUTH_GROUP;
ALTER TABLE ACT_RU_AUTHORIZATION
MODIFY RESOURCE_ID_ nvarchar2(255);
create unique index ACT_UNIQ_AUTH_USER on ACT_RU_AUTHORIZATION
(case when USER_ID_ is null then null el... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 27, 2021 at 02:32 PM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 7.4.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
create sequence hibernate_sequence;
create table if not exists association_value_entry
(
id bigint not null
constraint association_value_entry_pkey
primary key,
association_key varchar(255) not null,
association_value varchar(255),
saga_id varchar(255) not null,
saga_type varchar(255)
);
create index if n... |
<reponame>nilslice/crates.io<gh_stars>1000+
ALTER TABLE api_tokens ADD COLUMN revoked BOOLEAN NOT NULL DEFAULT 'f';
|
<gh_stars>1000+
-- Copyright (c) YugaByte, Inc.
-- Moved to V93 migration |
CREATE TABLE test1 (a int8, b text);
INSERT INTO test1 VALUES (72057594037927937, 'text');
CREATE INDEX test1_a_idx ON test1 USING btree (a);
\x
SELECT * FROM bt_metap('test1_a_idx');
SELECT * FROM bt_page_stats('test1_a_idx', -1);
SELECT * FROM bt_page_stats('test1_a_idx', 0);
SELECT * FROM bt_page_stats('test1_a_i... |
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_sold_date_sk` > 30 and `ws_ship_date_sk` - `ws_sold_date_sk` <= 60 then 1 else 0 end) as `31-60 days`, sum(case when `ws_shi... |
<filename>yii2_mini.sql
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3306
-- Время создания: Июн 03 2019 г., 16:50
-- Версия сервера: 8.0.15
-- Версия PHP: 7.3.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*... |
-- MySQL dump 10.13 Distrib 5.7.17, for macos10.12 (x86_64)
--
-- Host: localhost Database: krivacab
-- ------------------------------------------------------
-- Server version 5.7.21
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS *... |
{{ config(
materialized = 'incremental',
unique_key = "block_number",
cluster_by = ['ingested_at::DATE']
) }}
WITH base_tables AS (
SELECT
record_id,
offset_id,
block_id,
block_timestamp,
network,
chain_id,
tx_count,
header,
inges... |
DELIMITER //
DROP PROCEDURE IF EXISTS getLinksByUser //
CREATE PROCEDURE getLinksByUser(IN userID int)
BEGIN
SELECT * FROM links WHERE users_id=userID;
END //
DELIMITER ;
|
-- phpMyAdmin SQL Dump
-- version 4.9.7
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Sep 07, 2021 at 09:38 AM
-- Server version: 10.3.25-MariaDB
-- PHP Version: 7.3.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SE... |
-------------------------------------------------------------------------------
--
-- Script: latch_where_now.sql
-- Purpose: shows a snapshot of latch sleeps by code locations
-- For: 8.0 and higher
--
-- Copyright: (c) Ixora Pty Ltd
-- Author: <NAME>
--
------------------------------------------------------... |
--
-- TOC entry 203 (class 1259 OID 16386)
-- Name: House; Type: TABLE; Schema: auth; Owner: auth
--
CREATE TABLE "users" (
"id" uuid NOT NULL,
"name" text NOT NULL,
"adress" text NOT NULL,
"city" text NOT NULL,
"country" text NOT NULL,
"co" text,
"email" text NOT NULL,
"pa... |
SELECT
users.full_name,
merchant_types.type,
countries.name,
merchants.merchant_name
FROM users
JOIN merchants ON (users.id = merchants.admin_id)
JOIN countries ON (merchants.country_id = countries.id)
JOIN merchant_types ON (merchants.merchant_type_id = merchant_types.id)
ORDER BY merchant_name
|
/*[[Diag the RAC System (Doc ID 135714.1)]]*/
SET FEED OFF
col "AVG TIME" for usmhd2
grid {
{[[q'[ /*grid={topic="LOCAL ENQUEUES"}*/
SELECT * FROM TABLE(GV$(CURSOR(
SELECT userenv('instance') inst_id,
l.sid,
l.addr,
l.type,
... |
<filename>SQL/Version/v1.6.1.sql<gh_stars>100-1000
/*!
* DisplayMonkey source file
* http://displaymonkey.org
*
* Copyright (c) 2018 Fuel9 LLC and contributors
*
* Released under the MIT license:
* http://opensource.org/licenses/MIT
*/
use DisplayMonkey -- TODO: change if DisplayMonkey database name is different
GO
-... |
<reponame>sreered/sepsis3-mimic
-- ------------------------------------------------------------------
-- Title: Quick Sequential Organ Failure Assessment (qSOFA)
-- Originally written by: <NAME>
-- Contact: aewj [at] mit [dot] edu
-- ------------------------------------------------------------------
-- This query extr... |
<reponame>Shuttl-Tech/antlr_psql
-- file:horology.sql ln:9 expect:true
SELECT timestamp with time zone '20011227 040506+08'
|
-- file:lock.sql ln:21 expect:true
LOCK lock_tbl1 IN SHARE ROW EXCLUSIVE MODE
|
-- Copyright (c) Microsoft Corporation.
-- Licensed under the MIT License.
CREATE VIEW [Presentation].[Title]
AS
SELECT
[TitleKey]
,[IatiIdentifier]
,[TitleNarrative]
,[InsertedDate]
FROM [Persisted].[Title]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.