sql stringlengths 6 1.05M |
|---|
REM Historic views
DROP MATERIALIZED VIEW VW_DEMOLISHED_HISTORIC_ITEMS;
DROP MATERIALIZED VIEW VW_LANDMARK_PROPERTY;
DROP MATERIALIZED VIEW VW_MIHP_PROPERTY;
DROP MATERIALIZED VIEW VW_NRHP_PROPERTY;
DROP VIEW VW_DEMOLISHED_HISTORIC_ITEMS;
DROP VIEW VW_LANDMARK_PROPERTY;
DROP VIEW VW_MIHP_PROPERTY;
DROP VIEW VW_NRHP_PRO... |
<reponame>hpi-swa-lab/SQPyte<filename>tpch/sqlite-queries-in/8.sql
select
o_year,
sum(case
when nation = 'UNITED STATES' then volume
else 0
end) / sum(volume) as mkt_share
from
(
select
strftime('%Y', o.orderdate) as o_year,
l.extendedprice * (1 - l.discount) as volume,
n2.name as nation
... |
CREATE TABLE Shipping_Address (ID BIGINT AUTO_INCREMENT NOT NULL, CUSTADDRESS VARCHAR(255), CUSTCITY VARCHAR(255), CUSTSTATE VARCHAR(255), LASTMODIFIED DATETIME, CUSTOMER_ID BIGINT, PRIMARY KEY (ID))
CREATE TABLE Customers (ID BIGINT AUTO_INCREMENT NOT NULL, FIRSTNAME VARCHAR(255), LASTMODIFIED DATETIME, LASTNAME VARCH... |
<reponame>jdkoren/sqlite-parser<filename>src/test/resources/enc2.test_48.sql<gh_stars>100-1000
-- enc2.test
--
-- execsql {
-- PRAGMA encoding = 'UTF-16';
-- SELECT * FROM sqlite_master;
-- }
PRAGMA encoding = 'UTF-16';
SELECT * FROM sqlite_master; |
<filename>SQL Updates/guildLogsUpdate.sql
-- DO NOT RUN THIS FILE IF YOU ARE INSTALLING THE BOT FOR THE FIRST TIME
-- DO NOT RUN THIS FILE IF YOU ARE INSTALLING THE BOT FOR THE FIRST TIME
-- DO NOT RUN THIS FILE IF YOU ARE INSTALLING THE BOT FOR THE FIRST TIME
-- DO NOT RUN THIS FILE IF YOU ARE INSTALLING THE BOT FOR T... |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 27, 2021 at 07:59 PM
-- Server version: 10.4.22-MariaDB
-- PHP Version: 8.0.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
CREATE TABLE sx_log (
id int NOT NULL AUTO_INCREMENT,
data_of_msg DATETIME DEFAULT NOW(),
username VARCHAR(5000),
msg VARCHAR(5000),
typology VARCHAR(500),
last_id INT DEFAULT 0,
max_id INT,
PRIMARY KEY(id)
);
INSERT INTO sx_log (username, msg, typology, last_id, max_id) VALU... |
---------------------------------------------------------------------------------------------------
---- DML AUTEURS
---------------------------------------------------------------------------------------------------
INSERT INTO auteur (no_auteur, nom_auteur, prenom_auteur, sexe_auteur, natio_auteur)
VALUES ('100'||ne... |
<reponame>cmli93/Chain-Dejima
CREATE OR REPLACE VIEW public.d23_researanddoc AS
SELECT __dummy__.COL0 AS MEDICATIONNAME,__dummy__.COL1 AS MECHANISMOFACTION
FROM (SELECT DISTINCT d23_researanddoc_a2_0.COL0 AS COL0, d23_researanddoc_a2_0.COL1 AS COL1
FROM (SELECT DISTINCT d2_researcher_a4_0.MEDICATIONNAME AS COL0, d2_... |
/*
Warnings:
- You are about to drop the column `program` on the `Student` table. All the data in the column will be lost.
*/
-- AlterTable
ALTER TABLE "Course" ADD COLUMN "major" TEXT,
ADD COLUMN "level" TEXT;
-- AlterTable
ALTER TABLE "Enrollment" ADD COLUMN "status" TEXT NOT NULL DEFAULT E'in revi... |
-- Test: plperl 20
CREATE OR REPLACE FUNCTION perl_record() RETURNS record AS $$
return undef;
$$ LANGUAGE plperl;
SELECT perl_record();
|
-- MySQL dump 10.13 Distrib 5.7.25, for Linux (x86_64)
--
-- Host: localhost Database: lean1
-- ------------------------------------------------------
-- Server version 5.7.25-0ubuntu0.18.04.2
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_... |
-- @testpoint:opengauss关键字Buckets(保留),作为模式名
--关键字不带引号-合理报错
drop schema if exists Buckets;
create schema Buckets;
--关键字带双引号-成功
drop schema if exists "Buckets";
create schema "Buckets";
--清理环境
drop schema "Buckets";
--关键字带单引号-合理报错
drop schema if exists 'Buckets';
create schema 'Buckets';
--关键字带反引号-合理报错
drop schema ... |
<filename>db.sql
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Versión del servidor: 5.6.17 - MySQL Community Server (GPL)
-- SO del servidor: Win64
-- HeidiSQL Versión: 9.3.0.5098
-- -------------------------------------------... |
<filename>SQL/Uri 2619 - Super Luxo.sql
-- Resposta URI:
-- 1ª Forma:
select pd.name, pv.name, pd.price -- Seleciona as colunas
from products as pd -- Pega a 1ª Tabela
inner join providers as pv -- Junta a com a 2ª Tabel... |
-- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: 08 Des 2017 pada 09.48
-- Versi Server: 5.7.20-0ubuntu0.16.04.1
-- PHP Version: 7.0.22-0ubuntu0.16.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... |
<reponame>longtime55/5on6.pl
-- MySQL dump 10.13 Distrib 5.6.35, for osx10.9 (x86_64)
--
-- Host: localhost Database: laraclassified
-- ------------------------------------------------------
-- Server version 5.6.35
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_R... |
<reponame>zagitafaradila/AlumniUnila
/*
SQLyog Enterprise - MySQL GUI v8.1
MySQL - 5.5.5-10.1.8-MariaDB : Database - tracer_ee
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KE... |
<reponame>oro91dev/Databases-codesignal<filename>8 contestLeaderboard.sql
/*Please add ; after each select statement*/
CREATE PROCEDURE contestLeaderboard()
BEGIN
SELECT name from leaderboard order by score desc LIMIT 5 OFFSET 3;
END |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Jan 29, 2021 at 09:05 PM
-- Server version: 5.7.31
-- PHP Version: 7.4.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@... |
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 26-Mar-2021 às 17:40
-- Versão do servidor: 10.4.18-MariaDB
-- versão do PHP: 8.0.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CL... |
<reponame>adittelahtiba/konveksi_jpaindo
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 30, 2019 at 10:43 PM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.3.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET ... |
<filename>lead/aux/stellar_addresses.sql
-- geocode stellars
DROP TABLE IF EXISTS aux.stellar_addresses;
CREATE TABLE aux.stellar_addresses AS (
SELECT addr_id, address_id, addr_apt as apt
FROM stellar.addr join aux.addresses on upper(assemaddr) = address
);
alter table aux.stellar_addresses add primary key (addr_... |
USE [ANTERO]
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[api].[lukio_opiskelijat_vuosi_tutkinto]') AND type in (N'U'))
BEGIN
CREATE TABLE [api].[lukio_opiskelijat_vuosi_tutkinto](
[defaultorder] [bigint] NOT NULL,
[tilastovuosi] [int] NULL,
[tutkinto] [nvarchar](200) NULL,
[koulutu... |
-- Table: public."OfferConstraint"
-- DROP TABLE public."OfferConstraint";
CREATE TABLE public."OfferConstraint"
(
id bigserial,
offerconstrainttype_id bigint NOT NULL,
offer_id bigint NOT NULL,
CONSTRAINT "OfferConstraint_pkey" PRIMARY KEY (id),
CONSTRAINT offerconstraint_offerconstrainttype_id_o... |
<filename>sql/cookingfuel.sql
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.5.14
-- Dumped by pg_dump version 9.5.14
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET ch... |
<filename>Databases/task2.sql
-- MySQL dump 10.13 Distrib 8.0.26, for Win64 (x86_64)
--
-- Host: localhost Database: assignment
-- ------------------------------------------------------
-- Server version 8.0.26
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULT... |
create database spark;
use spark;
create table user(
id int not null auto_increment primary key,
name varchar(100) not null,
email varchar(100) not null,
current_credit int not null
)
INSERT INTO user(name,email,current_credit)
VALUES
('Rishav','<EMAIL>',5000),
('Amit','<EMAIL>',5000),
('deep... |
-- file:domain.sql ln:568 expect:true
create domain di as int
|
/* Z_MED_BUILTUP */
truncate table vectiles.z_med_builtup restart identity;
drop index if exists vectiles.sidx__z_med_builtup;
drop index if exists vectiles.ghidx__z_med_builtup;
drop table if exists vectiles_input.tmp_z_med_builtup;
create table vectiles_input.tmp_z_med_builtup as
select
*
from
vectiles.z_m... |
<reponame>smith750/kc
INSERT INTO KRIM_TYP_T (KIM_TYP_ID, OBJ_ID, VER_NBR, NM, SRVC_NM, ACTV_IND, NMSPC_CD)
VALUES( KRIM_TYP_ID_BS_S.NEXTVAL, SYS_GUID(), 1, 'Derived Role: Investigators', 'proposalRoleTypeService', 'Y', 'KC-PD')
/
-- create new roles
INSERT INTO KRIM_ROLE_T (ROLE_ID, OBJ_ID, VER_NBR, ROLE_NM, NMSPC_... |
<gh_stars>0
select book.title from book
where book.id in (
select checkout_item.book_id
from checkout_item
)
union
select movie.title from movie
where movie.id in (
select checkout_item.movie_id
from checkout_item
); |
# --- Sample dataset
# --- !Ups
insert into usuario (nome, email, senha, papel, status, data_cadastro, data_alteracao, ultimo_acesso)
values ('Administrador', '<EMAIL>', '$2a$10$nbLHwCCpkqWbkUZEDX3G5e3CRDJuqTPgVRRfaNduKRiBdN8jVu7ai', 'ADMINISTRADOR', TRUE, 'now', 'now', 'now');
insert into usuario (nome, em... |
<reponame>lgarciaaco/machina-api
-- Version: 1.1
-- Description: Create table users
CREATE TABLE users
(
user_id UUID,
name TEXT,
description TEXT,
roles TEXT [],
password_hash TEXT,
date_created TIMESTAMP,
date_updated TIMESTAMP,
PRIMARY KEY (user_id)
);
-- ... |
<filename>service/src/main/schema/scripts/common/002_BASIC_DATA/070_ALERTS_DATA.sql
-- Location based Alert example
INSERT INTO MSG_TEMPLATES(ID_TEMPLATE,STR_NAME,STR_SUBJECT,STR_SENDER,STR_TEMPLATE_TYPE,STR_CONTENT,STR_CONTENT_TYPE,STR_CHARSET,STR_ALT_CONTENT_TYPE,STR_ALT_CHARSET,BOL_IS_CONFIDENTIAL,DAT_CREATION,ID_C... |
<reponame>bhagvank/AI-Coder
CREATE TABLE Clinic( ClinicID INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY,ClinicNAME VARCHAR(30) NOT NULL,ClinicADDRESS VARCHAR(30) NOT NULL,ClinicCITY VARCHAR(30) NOT NULL,ClinicSTATE VARCHAR(30) NOT NULL,ClinicCOUNTRY VARCHAR(30) NOT NULL,ClinicZIPCODE VARCHAR(30) NOT NULL)
|
<gh_stars>0
select sum(population)
from city
where district ='California'; |
DELIMITER //
CREATE PROCEDURE add_bookmark
(
IN c_username varchar(50),
IN c_p_id bigint(20) unsigned,
IN c_category varchar(50)
)
BEGIN
INSERT INTO bookmark
(
read_status,
time_added,
username,
p_id,
category
)
VALUES
(
b'0',
... |
<filename>tests/sql/src/main/java/cacheperf/comparisons/gemfirexd/useCase1/datagen/import.sql
set schema SEC_OWNER;
delete from DATAHINTS;
delete from SECT_CHANNEL_DATA;
delete from SECT_CHANNEL_RAW_DATA;
call syscs_util.import_table_ex('SEC_OWNER', 'DATAHINTS', '/soubhikc1/poc/useCase1/dataGenerator/DATAHINTS.dat',... |
CREATE DATABASE `admin-solution` DEFAULT CHARACTER SET = `utf8mb4`;
USE `admin-solution`;
SET session sql_mode = 'STRICT_TRANS_TABLES';
-- 用户表
DROP TABLE IF EXISTS `User`;
CREATE TABLE `User`
(
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`username` varchar(64) NOT NULL COMMENT '用户名',
... |
<gh_stars>10-100
USE TestDB
INSERT INTO Inventory VALUES (3, 'strawberry', 159); INSERT INTO Inventory VALUES (4, 'blueberry', 161);
go
SELECT * FROM Inventory;
go
quit
|
CREATE TABLE `office_chat_test`.`users` ( `id` int(11) not null AUTO_INCREMENT ,`user_id` VARCHAR(255) NOT NULL COMMENT 'varchar because of security reasons' , `business_id` INT(11) NOT NULL , `full_name` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL , `email` VARCHAR(80) CHARACTER SET utf8 COLLATE ... |
<filename>aws-test/tests/aws_elasticsearch_domain/test-list-query.sql
select account_id, akas, domain_name, partition, region
from aws.aws_elasticsearch_domain
where akas::text = '["{{ output.resource_aka.value }}"]'; |
SELECT sc.id
FROM conditioncategory scc
INNER JOIN condition sc on sc.conditioncategoryid = scc.id
INNER JOIN datasetcondition sdsc on sdsc.conditionid = sc.id
WHERE scc.title = 'Experiment' and sc.title = 'AB'
SELECT dsc.id
FROM condition c
INNER JOIN conditioncategory cc on c.conditioncategoryid = cc.id an... |
/*
delete_defunct_emails.sql is a MySQL script intended to
delete authors' e-mail addresses for previously deleted
authors.
Version: $Revision$
Date: $Date$
(C) COPYRIGHT 2014 Ahasuerus
ALL RIGHTS RESERVED
The copyright notice above does not evidence any actual or
intended ... |
<gh_stars>0
-- View: v00_timelog
-- DROP VIEW `ts_mcbc_tr`.`v00_timelog`;
CREATE OR REPLACE VIEW `ts_mcbc_tr`.`v00_timelog` AS
SELECT b00.timelog_id, b00.logdate, b00.hours,
b02.activity_id, b02.description AS activity,
a14.subtask_id, a14.name AS subtask, a14.description AS subtask_desc, a14.exten... |
CREATE TABLE jokes (
id VARCHAR(50),
type VARCHAR(50),
setup VARCHAR(250),
punchline VARCHAR(250)
) |
<gh_stars>0
-- CreateTable
CREATE TABLE `User` (
`username` VARCHAR(191) NOT NULL,
`password` VARCHAR(191) NOT NULL,
`displayName` VARCHAR(191) NOT NULL,
`image` VARCHAR(191) NOT NULL,
`bio` VARCHAR(191) NOT NULL,
`birthDate` VARCHAR(191) NOT NULL,
`createdAt` DATETIME(3) NOT NULL DEFAULT CU... |
/*
SQLyog v10.2
MySQL - 5.7.21-0ubuntu0.16.04.1 : Database - cloud
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@... |
ALTER TABLE packages DROP CONSTRAINT packages_system_fkey, ADD CONSTRAINT packages_system_fkey FOREIGN KEY(system) REFERENCES systems(id) ON DELETE CASCADE;
ALTER TABLE package_versions DROP CONSTRAINT package_versions_package_fkey, ADD CONSTRAINT package_versions_package_fkey FOREIGN KEY(package) REFERENCES packages(i... |
CREATE VIEW [catalog].[execution_parameter_values]
AS
SELECT [execution_parameter_id],
[execution_id],
[object_type],
[parameter_data_type],
[parameter_name],
[parameter_value],
[sensitive],
[required],
[value_set],
... |
<reponame>ligana/Ensemble-om-SpringBoot
drop table if exists RC_DOCUMENT_MAPPING;
/*==============================================================*/
/* Table: RC_DOCUMENT_MAPPING */
/*==============================================================*/
create table RC_DOCUMENT_MAPP... |
-- rambler up
CREATE SCHEMA pgjwt;
COMMENT ON SCHEMA pgjwt
IS 'Library functions related to creating, signing and verifying JWT tokens';
CREATE OR REPLACE FUNCTION pgjwt.url_encode(data bytea) RETURNS text LANGUAGE sql AS $$
SELECT translate(encode(data, 'base64'), E'+/=\n', '-_');
$$;
CREATE OR REPLACE FUNCTI... |
<gh_stars>10-100
/*[[
Check related information for 'latch: row cache objects'/'row cache xxx' events. Usage: @@NAME [<sid>] [<inst_id>]
Refer to Doc ID 34609.1
--[[
&V2: default={&instance}
--]]
]]*/
SELECT * FROM TABLE(GV$(CURSOR(
SELECT h.sid H_SID,
ses.sid || ',' || ses.serial... |
CREATE TABLE e (a int);
CREATE TABLE f (a int, b int); |
/* Formatted on 12-20-2018 1:38:29 PM (QP5 v5.126.903.23003) */
/*
"C:\Program Files (x86)\pgAdmin 4\v3\runtime\pg_dump" --host localhost --port 5432 --username postgres --verbose --table=RPT.RPT_PRCSS_RNNRS --data-only --column-inserts psdc_live > RPT.RPT_PRCSS_RNNRS.sql
*/
set define off;
TRUNCATE TABLE RPT.RPT_PRCSS... |
<filename>MS SQL Sept2019/3. Built-In Functions/Geography-DB-Queries.sql
USE Geography
--12. Countries Holding ‘A’ 3 or More Times
SELECT CountryName, IsoCode
FROM Countries
WHERE CountryName LIKE '%a%a%a%'
ORDER BY IsoCode
--13. Mix of Peak and River Names
SELECT
PeakName
,RiverName
,LOWER(PeakNa... |
<gh_stars>10-100
CREATE OR REPLACE FUNCTION getcustomer_with_id_1()
RETURNS SETOF customer
LANGUAGE 'plpgsql'
AS $BODY$
BEGIN
RETURN QUERY (select * from customer WHERE customer_id = 1);
END
$BODY$; |
-- For PC remote from PI Redhawk logo double png
-- The average of the ping current values, this will be the second value displayed
SELECT avg(wattage) FROM PowerMeasurement
WHERE strftime('%H %M %S %f', date) BETWEEN strftime('%H %M %S %f', '2022-03-15 19:11:33.824159') AND strftime('%H %M %S %f', '2022-03-15 19:11... |
-- file:create_view.sql ln:528 expect:true
select * from int8_tbl i where i.* in (values(i.*::int8_tbl))
|
DROP DATABASE IF EXISTS eisquality;
CREATE DATABASE eisquality;
USE eisquality;
DROP TABLE IF EXISTS erroneousassets ;
CREATE TABLE erroneousassets
(
id int unsigned NOT NULL auto_increment,
hardware varchar(25) NOT NULL,
logger_code varchar(100) NOT NULL,
logger_channel varchar(10),
utility_type varchar(25)... |
<filename>isdenrollment_revenue.sql
SELECT isd_enrollment.ISDName, isd_enrollment.ISDCode, isdrevenue.ISDCode, isd_enrollment.LocationName, isd_enrollment.LocationQualifier, isd_enrollment.CountyCode, isd_enrollment.CountyName, isd_enrollment.TOTAL_ENROLLMENT, isd_enrollment.TOTAL_ENROLLMENT_CHANGE, isd_enrollment.Begi... |
use mysql;
drop database if exists admin_db;
create database admin_db;
delete from user where user='admin';
delete from db where user='admin';
FLUSH PRIVILEGES;
create user 'admin'@'localhost' identified by 'password';
create user 'admin'@'%' identified by 'password';
set password for manager = password('password');
gr... |
<reponame>fossabot/automate-1
-- Verify fix_spurious_withdrawn_patchsets
BEGIN;
-- XXX Add verifications here.
ROLLBACK;
|
<reponame>zhouluya/wule
-- 修改图片表seller_id设置可以为空
ALTER TABLE `lkt_product_img` CHANGE `seller_id` `seller_id` CHAR(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '用户id';
-- 修改商品表product_number字段设置可以为空
ALTER TABLE `lkt_product_list` CHANGE `product_number` `product_number` VARCHAR(100) CHARACTER... |
/**
收集的一些 SQL 语句
*/
EXPLAIN SELECT products.category, products.assigned_user_id, COUNT( products.id ) AS opp_count
FROM products
RIGHT JOIN orders ON orders.productid = products.id
WHERE 1
GROUP BY products.category, products.assigned_user_id
CREATE TABLE `test` (
`tid` INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KE... |
<reponame>YaakovKris/SportsFamily
USE FamilySports
-- Populate Regions
INSERT INTO Regions VALUES ('Central and Eastern Europe'), ('Northern Europe'), ('Southern Europe'), ('Western Europe')
-- Populate Countries
INSERT INTO Countries VALUES ('Estonia'), ('Latvia'), ('Lithuania'), ('Poland'), ('Czech Republic')... |
SELECT * FROM customers LEFT JOIN orders ON customers.cid = orders.cid INNER JOIN items ON orders.oid = items.oid LEFT JOIN addresses ON customers.cid = addresses.cid |
-- phpMyAdmin SQL Dump
-- version 4.0.10.18
-- https://www.phpmyadmin.net
--
-- Host: localhost:3306
-- Generation Time: Oct 05, 2017 at 01:50 PM
-- Server version: 5.6.36-cll-lve
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACT... |
--ToTheRescue
--Common queries
use ToTheRescue
/**********************************************************************
* Purpose: This query checks to see if the user entered a correct username
* and a correct password
***********************************************************************/
--These variables repres... |
<filename>SQL_Queries/Black_White_race_ca_Population.sql<gh_stars>0
SELECT p.county_name,
SUM(p.population) AS White,
black_pop.Black FROM
(SELECT county_name, SUM(population) AS Black
FROM pop_proj
WHERE date_year = 2014 and race = 'Black, Non-Hispanic'
GROUP BY county_name
ORDER BY county_name) AS b... |
CREATE TABLE article (
id int NOT NULL AUTO_INCREMENT,
tittle VARCHAR(1024) DEFAULT NULL COMMENT '标题',
content VARCHAR(1024) DEFAULT NULL COMMENT '内容',
author VARCHAR (1024) DEFAULT NULL COMMENT '作者',
category VARCHAR (1024) DEFAULT NULL COMMENT '类别',
summary VARCHAR(1024) DEFAULT NULL COMMENT ... |
<reponame>rustammm/ELib<filename>temp.sql<gh_stars>0
-- Структура таблицы `books`
--
CREATE TABLE IF NOT EXISTS `books` (
`id` int(50) NOT NULL AUTO_INCREMENT,
`library` varchar(200) NOT NULL,
`serial1` int(50) NOT NULL,
`serial2` int(50) NOT NULL,
`name` varchar(300) NOT NULL,
`student` int(50) NOT NULL,... |
USE architech;
INSERT INTO building (id, name, phone, city, zipcode, address, mail) VALUES (1 ,'ESGCI', '4093283728', 'Paris', '75011', '25 Rue Saint-Ambroise', '<EMAIL>');
INSERT INTO manager (id, last_name, first_name, phone, gender, mail) VALUES (1 , 'Lemaire', 'Aude', '0693281727', 'female','<EMAIL>');
UPDATE buil... |
<reponame>Saba-d-coder/5th-Sem
declare
vssn emp.ssn%type;
begin
vssn:=&ssn;
delete from emp
where ssn=vssn;
if sql%found then
dbms_output.put_line('record deleted '||sql%rowcount);
else
dbms_output.put_line('record not deleted');
end if;
vssn:=&ssn;
update emp
set name='Jonas'
where ssn=vssn;
if sql... |
SELECT 1
FROM sys.tables
WHERE object_id = OBJECT_ID('{TABLE_WITH_SCHEMA}', 'u') AND temporal_type = 2 |
create database sensor_metadata;
use sensor_metadata;
create table sensor_type(sensor_type_id int, sensor_type varchar(30));
create table location(location_id int, customer varchar(100), department varchar(100), building_name varchar(100), room varchar(100), floor varchar(100), location_on_floor varchar(100), latitu... |
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE general_params ( "name" text, "value" text );
INSERT INTO "general_params" VALUES('base_table','T_Separation_Group');
INSERT INTO "general_params" VALUES('list_report_data_table','V_Separation_Group_List_Report');
INSERT INTO "general_params" VALUES('detail... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 28, 2020 at 09:27 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
-- Change settings so that output printed to
-- SQL*Plus (via dbms_output.put_line) can
-- be spooled into a file without headers
-- or other distracting features.
--
-- developed to be used along with dot.sql
--
set feedback off
set echo off
set trimspool on
set termout off
set lines 500
set pages 0
spool &1
|
<gh_stars>1-10
CREATE SEQUENCE "SQ_ATTRIBUTE_ID" MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 3889629 NOCACHE NOORDER NOCYCLE |
<gh_stars>1-10
BEGIN;
CREATE TABLE IF NOT EXISTS actions_runs
(
repository_id text NOT NULL,
run_id text NOT NULL,
event_type text NOT NULL,
start_time timestamptz NOT NULL,
end_time timestamptz NOT NULL,
branch_id text NOT NULL,
so... |
/* Copyright 2017 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to i... |
autocommit off;
create table bbigg(a int, b varchar(40));
create table mmedd(a int, b varchar(40));
grant all on bbigg to public;
grant all on mmedd to public;
insert into bbigg values (0,'zero');
insert into bbigg values (1,'one');
insert into bbigg values (2,'two');
insert into bbigg values (3,'three');
insert into b... |
-- @testpoint:opengauss关键字position(非保留),作为表空间名
--关键字不带引号,创建成功
drop tablespace if exists position;
CREATE TABLESPACE position RELATIVE LOCATION 'hdfs_tablespace/hdfs_tablespace_1';
drop tablespace position;
--关键字带双引号,创建成功
drop tablespace if exists "position";
CREATE TABLESPACE "position" RELATIVE LOCATION 'hdfs_tab... |
<filename>migrations/2021-08-01-150318_create_lobbys/up.sql
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
CREATE TABLE lobbys (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
"name" VARCHAR NOT NULL,
"description" TEXT NOT NULL,
"nsfw" BOOLEAN NOT NULL DEFAULT false,
"enabled" BOOLEAN NOT NULL DEFAU... |
<filename>backoffice/file/IPV2705191148.sql<gh_stars>0
INSERT INTO pos_itemtemp VALUES("IPVT190000013","193030","191001","192004","27000","1","27000","0","27000","1","1","1","IPV2705191148","NHO2018000008","PAID","","193030"),
("IPVT190000013","193029","191001","192004","27000","1","27000","0","27000","1","1","1","IPV2... |
<reponame>JeffyMesquita/Curso-de-SQL-Completo-para-Iniciantes
-- Aula 7 --
-- ORDER BY
|
<gh_stars>0
-- Exercise 3 Task 3 Step 2 script
-- Replace the underline with the distribution type
CREATE TABLE dbo.Users(
userId int null,
City nvarchar(100) null,
Region nvarchar(100) null,
Country nvarchar(100) null
) WITH (
CLUSTERED COLUMNSTORE INDEX,
DISTRIBUTION = _____________
);
GO
--Exercise 3 Task 3 Step 5
C... |
-- Adminer 4.3.1 MySQL dump
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
SET NAMES utf8mb4;
DROP TABLE IF EXISTS `admins`;
CREATE TABLE `admins` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NU... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 14, 2021 at 08:55 AM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 8.0.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACT... |
<reponame>KKetter/Lab08-back-end<filename>schema.sql
CREATE TABLE location (
id SERIAL,
latitude DECIMAL,
longitude DECIMAL,
formatted_query VARCHAR(255),
search_query VARCHAR(255)
);
CREATE TABLE weather (
id SERIAL,
latitude DECIMAL,
longitude DECIMAL,
forecast TEXT,
time DATE... |
SELECT CASE
WHEN A + B > C
AND A + C > B
AND B + C > A THEN CASE
WHEN A = B
AND B = C THEN 'Equilateral'
WHEN A = B
OR B = C
OR A = C THEN 'Isosceles'
WHEN A != B
OR B != C
... |
-- extrait du taxref pour les espèces de Flore (avec patrimonialité et protection)
SELECT
patrimoniale,
protegee,
taxref.*
FROM
taxonomie.taxref
JOIN taxonomie.vm_plantae_pp USING (cd_nom);
|
<reponame>JMortonTan/IT202450
SELECT * FROM Accounts WHERE account_type LIKE :search ORDER BY balance DESC;
|
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.9.5deb2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jul 15, 2021 at 01:34 PM
-- Server version: 8.0.25-0ubuntu0.20.04.1
-- PHP Version: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = ... |
-- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date,,>
-- Description: <Description,,>
-- =============================================
CREATE PROCEDURE [WebShare_Del]
-- Add the parameters for the stored procedure here
@Id int
AS
BEGIN
-- SET NOCOUNT ON added t... |
-- this file tracks custom GitLab data, such as foreign keys referencing partitioned tables
-- more details can be found in the issue: https://gitlab.com/gitlab-org/gitlab/-/issues/201872
|
11121314151617\
18191A21222324\
25262728292A31\
32333435363738\
393A4142434445\
464748494A5152\
53545556575859\
5A616263646566\
6768696A717273\
7475767778797A\
81828384858687\
88898A91929394\
95969798999AA1\
A2A3A4A5A6A7A8\
A9AA
|
<reponame>jdkoren/sqlite-parser<gh_stars>100-1000
-- e_vacuum.test
--
-- db eval {SELECT pageno FROM stat WHERE name = 't1' ORDER BY pageno}
SELECT pageno FROM stat WHERE name = 't1' ORDER BY pageno |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.