sql stringlengths 6 1.05M |
|---|
select
e.name as Employee
from Employee e, Employee m
where e.ManagerId = m.Id and e.Salary > m.Salary
;
select
e.name as Employee
from Employee e
join Employee m on e.ManagerId = m.Id and e.Salary > m.Salary
|
-- This query is to find out each site migration status within given bulk upload.
-- The only parameter is the bulk migration name, with wild card towards start and end of the name String
-- To execute, just replace BULK_MIGRATION_NAME with the real bulk migration name, or its partial string
select site_id, bulk_migra... |
-- -----------------------------------------------------
-- Schema vmail
-- -----------------------------------------------------
CREATE SCHEMA IF NOT EXISTS vmail CHARACTER SET 'utf8';
USE vmail;
-- -----------------------------------------------------
-- Create user
-- -----------------------------------------------... |
drop table if exists ttl_00933_1;
create table ttl_00933_1 (d DateTime, a Int ttl d + interval 1 second, b Int ttl d + interval 1 second) engine = MergeTree order by tuple() partition by toMinute(d);
insert into ttl_00933_1 values (now(), 1, 2);
insert into ttl_00933_1 values (now(), 3, 4);
select sleep(1.1) format Nu... |
-- MySQL dump 10.13 Distrib 8.0.26, for Win64 (x86_64)
--
-- Host: localhost Database: gras
-- ------------------------------------------------------
-- Server version 8.0.26
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!401... |
<filename>database/users_and_smsprovider_tables.sql<gh_stars>10-100
USE [twofactorauth]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[smsProviders](
[providerId] [int] IDENTITY(1,1) NOT NULL,
[provider] [varchar](255) NOT NULL,
[email] [varchar](255) NOT NULL,
[i... |
-- Begin the transaction
BEGIN;
DROP TRIGGER insert_raw_visit ON raw_visits;
DROP FUNCTION normalize_raw_visit();
CREATE FUNCTION normalize_raw_visit() RETURNS TRIGGER AS
$normalize_raw_visit$
DECLARE
upserted_peer_id int;
upserted_session_id int;
new_multi_addresses_ids ... |
DO
$$
BEGIN
IF register_patch('VisitScheduledEventIdConstraint.sql', '<NAME>', 'Referecing scheduled_event_id from visits table', '2021-10-13') THEN
-- removing composite PKEY
ALTER TABLE scheduled_events
DROP CONSTRAINT scheduled_events_pkey;
-- addding PKEY to scheduled_event_id
ALTER TABLE ... |
CREATE ROLE coach
WITH PASSWORD = '<PASSWORD>!'
AND LOGIN = true; |
<filename>sql/_01_object/_02_class/_003_auto_increment/cases/1011.sql
--[er]create a class with conditions like 'int auto_increment(2147483648,1) ',Start value of an auto increment constraint should be less then max value
create class xoo ( id int auto_increment(2147483648,1) , title varchar(100));
insert into xoo(ti... |
<reponame>joelcostasimoes/healthydiet<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.0.10.18
-- https://www.phpmyadmin.net
--
-- Máquina: localhost:3306
-- Data de Criação: 28-Fev-2017 às 00:21
-- Versão do servidor: 10.0.29-MariaDB
-- versão do PHP: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:... |
prompt --application/set_environment
set define off verify off feedback off
whenever sqlerror exit sql.sqlcode rollback
--------------------------------------------------------------------------------
--
-- ORACLE Application Express (APEX) export file
--
-- You should run the script connected to SQL*Plus as the Oracle... |
<filename>learnlearn2.sql
-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Sep 18, 2015 at 01:04 AM
-- Server version: 5.6.17
-- PHP Version: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=... |
INSERT INTO `tadmintype` VALUES('1','信息发布员','1','t_AccList a_AccNew a_AccList a_MyList a_MyEdit a_MyDel sys_MdPwd sys_Feedback sys_MyUpload plus_留言簿模块 '),
('5','频道管理员','1','t_AccList t_AccNew t_AccEdit t_AccDel a_AccNew a_AccList a_AccEdit a_AccDel a_AccCheck a_MyList a_MyEdit a_MyDel a_MyCheck co_AddNote co_EditNote c... |
<filename>hw05-library-service-part1/src/main/resources/db/migration/data/R__0003_Add_reference_from_book_to_author.sql
update books set author_id=2 where id=1;
update books set author_id=1 where id=2;
update books set author_id=1 where id=3
|
<reponame>androutantomy/dd_optik<filename>database/db_dd_optik.sql
-- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 1172.16.17.32
-- Generation Time: Dec 28, 2020 at 06:04 AM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.2.34
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSA... |
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`name` varchar(255) DEFAULT NULL,
`company_id` INTEGER NOT NULL
);
DROP TABLE IF EXISTS `companies`;
CREATE TABLE `companies` (
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`name` varchar(255) DEFAULT NU... |
-- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 08, 2019 at 04:03 AM
-- Server version: 10.4.8-MariaDB
-- PHP Version: 7.3.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
rem lab31.sql
SELECT ig_max, max(a1), min(a1)
FROM derivative, year_price
WHERE derivative.deriv_no = year_price.deriv_no
GROUP BY ig_max;
|
<gh_stars>0
-- 25
USE Diablo
GO
SELECT [Name]
FROM [dbo].[Characters]
ORDER BY [Name] ASC
|
<gh_stars>0
CREATE
(BusinessValue:Root {name: 'Business Value'}),
(Feedback:Target {name:'Feedback'}),
(ContinuousImprovement:Target {name:'Continuous Improvement'}),
(CycleTime:Target {name:'Cycle Time'}),
(Availability:Target {name:'Availability'}),
(Feedback)-[:belongs_to]->(BusinessValue),
(Continuou... |
<reponame>ParkJeongSu/factoryModelerProduction
--DROP TABLE 테이블명 CASCADE CONSTRAINT;
-- Create FM_MENU
CREATE TABLE FM_MENU
(
MENUID NUMBER NOT NULL,
MENUNAME VARCHAR2 (40),
ISROOT VARCHAR2 (1),
POSITION NUMBER,
MENUTYPE VARCHAR2 (40),
PAR... |
DROP FUNCTION IF EXISTS permission_check_hive;
CREATE FUNCTION permission_check_hive
( IN user_id INT
, IN hive_id INT
, OUT permission_check BOOLEAN
)
AS
$body$
BEGIN
SELECT EXISTS
(
SELECT fp.user_id, h.id
FROM farm_permissions AS fp
JOIN hives AS h ON fp.farm_id = h.farm_id
WHERE fp.user_id = pe... |
create table practiceFieldCoordinator (
id bigint auto_increment,
leagueId bigint not NULL,
email varchar(128) not NULL,
name varchar(60) not NULL,
password varchar(10) default '',
PRIMARY KEY (id),
unique index ux_leagueEmail(leagueId, email)
) ENGINE=Inn... |
CREATE SYNONYM [procfwk].[LastExecutionSummary]
FOR [procfwkReporting].[LastExecutionSummary]; |
<reponame>Raju875/bitm_ecommerce
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Oct 21, 2017 at 04:52 PM
-- Server version: 10.1.13-MariaDB
-- PHP Version: 7.0.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACT... |
<gh_stars>0
INSERT INTO city (id, name, country) VALUES (1, 'Maceio', 'Brazil');
INSERT INTO city (id, name, country) VALUES (2, 'London', 'United Kingdom');
INSERT INTO city (id, name, country) VALUES (3, 'Blumenau', 'Brazil'); |
<reponame>vedlct/procument
-- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: May 13, 2019 at 10:19 AM
-- Server version: 10.1.31-MariaDB
-- PHP Version: 7.2.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+... |
<gh_stars>1-10
drop table user if exists ;
create table user (id bigint generated by default as identity ,username varchar(40),name varchar(20),age int (3),balance decimal(10,2),primary key (id)); |
create table "DataTable" (
"Id" INT not null,
"Text" Text null,
primary key ("Id")
);
insert into "DataTable" ("Id", "Text") VALUES (1, 'some text');
|
<reponame>finnishtransportagency/ksr<gh_stars>1-10
update layer_group set name = 'Vesiväylien turvalaitteet' where name = 'VESI';
update layer_group set name = 'Väylien rakennukset ja sopimukset' where name = 'RATA';
|
-- AlterTable
ALTER TABLE "Task" ALTER COLUMN "assignedId" DROP NOT NULL;
|
<filename>db/sql/2388__alter_procedure_vipunentk_lisatiedot_lataa_muuttuneet_tiedot_Vipunen_automaattipaivitys_fakta.sql<gh_stars>1-10
USE [VipunenTK_lisatiedot]
GO
/****** Object: StoredProcedure [dbo].[lataa_muuttuneet_tiedot_Vipunen_automaattipaivitys_fakta] Script Date: 12.9.2019 10:33:34 ******/
SET ANSI_NULL... |
CREATE DATABASE [TableRelations]
CREATE TABLE [Passports](
[PassportID] INT IDENTITY(101,1) PRIMARY KEY NOT NULL,
[PassportNumber] VARCHAR(10)
)
INSERT INTO [Passports]([PassportNumber])
VALUES ('N34FG21B'),('K65LO4R7'),('ZE657QP2')
CREATE TABLE [Persons](
[PersonID] INT IDENTITY(1,1) PRIMARY KEY NOT NULL,
[Firs... |
-- file:timestamptz.sql ln:63 expect:true
INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01.4 1997 PST')
|
-- file:macaddr8.sql ln:63 expect:true
CREATE INDEX macaddr8_data_hash ON macaddr8_data USING hash (b)
|
-- 2017-05-19T19:18:18.340
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_UI_Section (AD_Client_ID,AD_Org_ID,AD_Tab_ID,AD_UI_Section_ID,Created,CreatedBy,IsActive,Name,SeqNo,Updated,UpdatedBy) VALUES (0,0,588,540199,TO_TIMESTAMP('2017-05-19 19:18:18','YYYY-MM-DD HH24:MI:SS'),100,'Y','m... |
CREATE TABLE `category` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `note` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`category_id` int unsigned DEFAULT NULL,
`date` datetime DEFAULT NULL,
... |
<gh_stars>0
-- WARNING: this file MUST be saved in UTF-8
create table names (
id int,
firstName varchar(20),
lastName varchar(20)
);
insert into names (id, firstName, lastName) values(1, 'first', 'last');
|
<reponame>nnhubbard/openmaptiles
CREATE OR REPLACE FUNCTION layer_power(bbox geometry, zoom_level int)
RETURNS TABLE(geometry geometry, class text) AS $$
SELECT geometry, class FROM (
SELECT geometry, class
FROM osm_power_linestring
WHERE zoom_level >= 12
UNION ALL
SELECT geometry, clas... |
INSERT INTO gui (gui_id, gui_name, gui_description, gui_public) VALUES ('admin_application_metadata','admin_application_metadata','Simple administration gui for dataset-metadata',1);
INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e... |
/*==============================================================*/
/* Table: PRODUCT */
/*==============================================================*/
create table PRODUCT (ID NUMERIC(12) IDENTITY not null, TYPE_ID NUMERIC(12) not null, NAME VARCHAR(256) not null, PRICE... |
-- join, group by columns from one table
-- merge join enabled
alter session set `planner.enable_mergejoin` = true;
alter session set `planner.enable_hashjoin` = false;
select t1.a1,
t1.b1,
count(distinct t1.c1) as distinct_c1,
sum(t1.a1) as sum_a1,
count(t1.c1) as count_a1,
count(*) as count_star
f... |
select
trip_duration,
passenger_count,
sum(pickup_latitude) over w as vendor_sum_pl,
max(pickup_latitude) over w as vendor_max_pl,
min(pickup_latitude) over w as vendor_min_pl,
avg(pickup_latitude) over w as vendor_avg_pl,
sum(pickup_latitude) over w2 as pc_sum_pl,
max(pickup_latitude) ... |
{{
config(
materialized='table'
)
}}
SELECT product_guid
, product_name
, price
, quantity
FROM {{ ref('stg_products')}}
WHERE quantity > 0 |
INSERT INTO types
VALUES (DEFAULT, 'Normal', '#aaaa99'),
(DEFAULT, 'Fire', '#ff4422'),
(DEFAULT, 'Water', '#3399ff'),
(DEFAULT, 'Electric', '#ffcc33'),
(DEFAULT, 'Grass', '#77cc55'),
(DEFAULT, 'Ice', '#66ccff'),
(DEFAULT, 'Fighting', '#bb5544'),
(DEFAULT, 'Poison', '#aa5... |
-- migrate:up
-- Nota bene that this is intended to be _temporary_.
create or replace function sg_private.insert_card_version_status()
returns trigger as $$
begin
new.status = 'accepted'::sg_public.entity_status;
return new;
end;
$$ language plpgsql strict security definer;
comment on function sg_private.insert_ca... |
<reponame>piotrmsc/compass<filename>components/schema-migrator/migrations/director/201910111320_add_description_to_int_sys.down.sql
ALTER TABLE integration_systems DROP COLUMN description;
|
DROP TABLE INDEXERAPIACCESS_SHORT;
CREATE TABLE INDEXERAPIACCESS_SHORT
(
ID INTEGER PRIMARY KEY NOT NULL,
INDEXER_ID INTEGER,
TIME TIMESTAMP,
SUCCESSFUL BOOLEAN,
API_ACCESS_TYPE VARCHAR2(255),
CONSTRAINT FKFLRMBYQ8CLDV48KDUNDZHD FOREIGN KEY (INDEXER_ID) REFERENCES INDEXER ... |
<filename>insport_server/final.sql
-- You can use this file to load seed data into the database using SQL statements
--insert into users (id, bu, document) values (1, '1', '1');
--insert into users (id, bu, document) values (2, '2', '2');
insert into questionary values (1, 'Ônibus');
insert into questionary values (... |
<reponame>opengauss-mirror/Yat
-- @testpoint:opengauss关键字exclude(非保留),作为用户组名
--关键字不带引号-成功
drop group if exists exclude;
create group exclude with password '<PASSWORD>';
drop group exclude;
--关键字带双引号-成功
drop group if exists "exclude";
create group "exclude" with password '<PASSWORD>';
drop group "exclude";
--关键字带单引... |
DROP TABLE IF EXISTS test_parquet_types_point;
CREATE TABLE test_parquet_types_point (c0 point) with (appendonly=true, orientation=parquet, compresstype=none, rowgroupsize=8388608, pagesize=1048576, compresslevel=0);
INSERT INTO test_parquet_types_point values (POINT(1,2)),
(POINT(100,200)),
(POINT(1000,2000)),
(null); |
<gh_stars>100-1000
-- Type I/O Functions defined in the 4.0 Catalog
--
-- See upgrade_functions40.sql for non shell types
--
-- Derived via the following SQL run within a 4.0 catalog
/*
SELECT
'CREATE FUNCTION upg_catalog.' || quote_ident(proname)
|| '('
|| coalesce(
array_to_string( array(
... |
<reponame>harbyanwardi/ShoesCare
-- phpMyAdmin SQL Dump
-- version 4.0.9
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jan 09, 2018 at 05:18 PM
-- Server version: 5.6.14
-- PHP Version: 5.5.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CL... |
CREATE OR REPLACE PROCEDURE calcola_sconto(in_coupon CHAR, in_data_scadenza DATE, in_sconto NUMBER, in_prodEAN CHAR) IS
sconto_riferimento NUMBER;
sconto_non_valido EXCEPTION;
BEGIN
IF in_sconto > 60 THEN
RAISE sconto_non_valido;
END IF;
-- Seleziono lo sconto piu' consono
... |
-- MySQL dump 10.13 Distrib 6.0.10-alpha, for Win32 (ia32)
--
-- Host: localhost Database: test
-- ------------------------------------------------------
-- Server version 6.0.10-alpha-community
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARA... |
USE Company
GO
SELECT Departments.Name AS [Department Name],
Count(*) AS [Employees Count]
FROM Departments
INNER JOIN Employees
ON Departments.Id = Employees.DepartmentId
GROUP BY Departments.Name
ORDER BY [Employees Count] DESC |
insert into zone(id, name)
values(UUID_TO_BIN('f587ca32-4aee-40d7-9108-aa17015acbce'), 'Rural');
insert into zone(id, name)
values(UUID_TO_BIN('ae39fa77-5f77-4b00-84f4-d8e4b43db3cb'), 'Semiurbano');
insert into zone(id, name)
... |
<reponame>pskelecton/straw
-- 新增CLIENT
INSERT INTO CLIENT(USERID,PHONE) VALUES (:USERID,:PHONE); |
begin;
drop table if exists boxrec.fights;
create table boxrec.fights (
boxer_division text,
boxer_id integer,
boxer_name text,
fight_date date,
date_url text,
card_url text,
opponent_id integer,
opponent_cat text,
opponent_name text,
opponent_url ... |
<reponame>dmitris/ashirt-server
-- +migrate Up
CREATE TABLE `finding_categories` (
`id` INT NOT NULL AUTO_INCREMENT,
`category` VARCHAR(255) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
P... |
-- file:oidjoins.sql ln:4 expect:true
SELECT ctid, aggfnoid
FROM pg_catalog.pg_aggregate fk
WHERE aggfnoid != 0 AND
NOT EXISTS(SELECT 1 FROM pg_catalog.pg_proc pk WHERE pk.oid = fk.aggfnoid)
|
USE testdb
SELECT
ID, NAME, AGE, JOB
FROM
TB_USER |
SET NAMES 'utf8';
DROP TABLE IF EXISTS `user_options`;
CREATE TABLE `user_options` (
`user_id` int(10) unsigned NOT NULL,
`option_id` int(10) unsigned NOT NULL,
`option_visible` tinyint(1) NOT NULL DEFAULT '1',
`option_value` longtext,
PRIMARY KEY (`user_id`,`option_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb... |
<filename>src/test/resources/examples/groupby/CreateGroupByDB.sql
drop table Person if exists;
create table Person (
person_id int not null,
first_name varchar(20) not null,
last_name varchar(20) not null,
gender varchar(20) not null,
human_flag char(1) not null,
age int not null,
primary key(pe... |
--Delete Tables
Drop table SKUVendor;
Drop table VendorMaster;
Drop table SKUDiscount;
Drop table SKUInventory;
Drop table SKUMaster;
Drop table ProductSpecification;
Drop table SpecificationValuesMaster;
Drop table SpecificationMaster;
Drop table BrandMaster;
Drop table CompanyMaster;
Drop table ProductMaster;
Drop t... |
<reponame>eubr-bigsea/Bus-stops-visualization
select [campoID], [campo del año de inicio], [campo lat], [campo lng]
from prefeitura.alvara
WHERE (extract(year from data_inicio_atividade) between 1984 and 2014 AND bairro similar to '(BATEL|CENTRO|TATUQUARA)')
AND atividade_principal_agregada
similar to '(LANCHONETE|B... |
<reponame>gavin2lee/incubator-gl
DROP TABLE ASS_NURSE_ITEM_DEPT;
DROP TABLE ASS_NURSE_RECORD_DEPT;
DROP TABLE BED;
DROP TABLE CRITICALVALUE_INFO;
DROP TABLE DICT_BODY_SIGN;
DROP TABLE DICT_DIAG;
DROP TABLE DICT_DRUG;
DROP TABLE DICT_FREQ;
DROP TABLE DICT_LAB_SAMPLE;
DROP TABLE DICT_MEASURE_NOTE;
DROP TABLE DICT_MEASURE... |
drop index ACT_IDX_CASE_EXEC_BUSKEY;
alter table ACT_RU_CASE_EXECUTION
drop foreign key ACT_FK_CASE_EXE_CASE_INST;
alter table ACT_RU_CASE_EXECUTION
drop foreign key ACT_FK_CASE_EXE_PARENT;
alter table ACT_RU_CASE_EXECUTION
drop foreign key ACT_FK_CASE_EXE_CASE_DEF;
alter table ACT_RU_VARIABLE
drop ... |
SET SCHEMA DM_PAL;
DROP TABLE PAL_DISTRIBUTION_FIT_DATA_TBL;
CREATE COLUMN TABLE PAL_DISTRIBUTION_FIT_DATA_TBL ("DATA" DOUBLE);
INSERT INTO PAL_DISTRIBUTION_FIT_DATA_TBL VALUES (71);
INSERT INTO PAL_DISTRIBUTION_FIT_DATA_TBL VALUES (83);
INSERT INTO PAL_DISTRIBUTION_FIT_DATA_TBL VALUES (92);
INSERT INTO PAL_DIS... |
<reponame>Xierip/jOOQ
INSERT INTO author VALUES (next value for s_author_id, 'George', 'Orwell', '1903-06-25', 1903, null);
INSERT INTO author VALUES (next value for s_author_id, 'Paulo', 'Coelho', '1947-08-24', 1947, null);
INSERT INTO book VALUES (1, 1, null, null, '1984', 1948, 1, 'To know and not to know, to be co... |
<filename>openGaussBase/testcase/KEYWORDS/Decode/Opengauss_Function_Keyword_Decode_Case0029.sql
-- @testpoint:opengauss关键字decode(非保留),作为表空间名
--关键字不带引号,创建成功
drop tablespace if exists decode;
CREATE TABLESPACE decode RELATIVE LOCATION 'hdfs_tablespace/hdfs_tablespace_1';
drop tablespace decode;
--关键字带双引号,创建成功
drop t... |
<reponame>agus7fauzi/login-system-codeigniter3<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.2
-- Waktu pembuatan: 09 Nov 2020 pada 16.22
-- Versi server: 5.7.30-33-log
-- Versi PHP: 7.3.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSAC... |
<reponame>itsumar/rest_api
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 19, 2020 at 04:05 AM
-- Server version: 10.1.40-MariaDB
-- PHP Version: 7.1.29
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "... |
CALL insertChampion('412', 'Thresh', 'the Chain Warden', 'Thresh.png', 'Support', 'Fighter');
CALL insertChampion('266', 'Aatrox', 'the Darkin Blade', 'Aatrox.png', 'Fighter', 'Tank');
CALL insertChampion('23', 'Tryndamere', 'the Barbarian King', 'Tryndamere.png', 'Fighter', 'Assassin');
CALL insertChampion('79', 'Grag... |
CREATE TABLE IF NOT EXISTS Users (
username TEXT UNIQUE PRIMARY KEY NOT NULL,
salt BYTEA NOT NULL,
hash BYTEA NOT NULL
);
|
<reponame>daomtthuan/ejb-enterprise-application<gh_stars>0
use book_management_system;
insert into user(username, password)
values ('admin', '<PASSWORD>'),
('user', '<PASSWORD>'); |
-- phpMyAdmin SQL Dump
-- version 4.3.11
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 11-11-2016 a las 00:21:32
-- Versión del servidor: 5.6.24
-- Versión de PHP: 5.6.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARAC... |
<filename>Statistics.sql
USE [AdventureWorks2019];
--https://www.mssqltips.com/sqlservertip/4269/how-to-identify-useful-sql-server-table-statistics/?msclkid=3dd6a8aaa6f811ec84f0467709ec2caf
--https://blog.sqlauthority.com/2020/02/04/sql-server-drop-all-auto-created-statistics/?msclkid=cc17caf6a6f211ec8a6cb4343cea7324
... |
<filename>logback/logback-access/src/main/resources/ch/qos/logback/access/db/script/msSQLServer.sql<gh_stars>0
-- Logback: the reliable, generic, fast and flexible logging framework.
-- Copyright (C) 1999-2010, QOS.ch. All rights reserved.
--
-- See http://logback.qos.ch/license.html for the applicable licensing
-- co... |
<gh_stars>0
/*
Referências para a listagem das disciplinas e pré-requisitos:
- Rede Curricular: http://wiki.sj.ifsc.edu.br/wiki/index.php/Rede_Curricular_da_Engenharia_de_Telecomunica%C3%A7%C3%B5es
- Páginas das disciplinas: http://wiki.sj.ifsc.edu.br/wiki/index.php/Engenharia_de_Telecomunica%C3%A7%C3%B5es_(p%... |
<filename>src/assets/sql/create/InsertCategoriesDefault2.sql
INSERT INTO Categories (boardId, color, title)
SELECT :boardId, 16249219, "default" UNION
select :boardId, 16711680, "priority" |
SET NAMES UTF8;
DROP DATABASE IF EXISTS xfn;
CREATE DATABASE xfn CHARSET=UTF8;
USE xfn;
CREATE TABLE xfn_admin(
aid INT PRIMARY KEY AUTO_INCREMENT,
aname VARCHAR(32) UNIQUE ,
apwd VARCHAR(64)
);
|
CREATE TRIGGER [dbo].[update_wifi_provider_on_fact_replies] ON [dbo].[fact_replies] AFTER INSERT
AS
UPDATE dbo.fact_replies SET rp_wifi_provider = (
SELECT
CASE
WHEN rp_text LIKE '%Telecentro%' THEN 2
WHEN rp_text LIKE '%Fibertel%' THEN 1
WHEN rp_text LIKE '%gigared%' THEN 10
WH... |
WITH RECURSIVE nums(a) AS (
VALUES (0)
UNION ALL
SELECT a+1 AS a FROM nums
WHERE a < 1000
)
SELECT sum(a) FROM nums WHERE a % 3 = 0 OR a % 5 = 0;
|
CREATE TABLE employee (id INT,
name VARCHAR(10),
salary DECIMAL(9,2));
INSERT INTO employee VALUES (1, 'aaaa', 35000),
(2, 'bbbb', 35000);
/*comment1*/
CREATE TABLE former_employee (id ... |
<reponame>melikalbasi/root-route
DROP DATABASE IF EXISTS root_route_react;
CREATE DATABASE root_route_react; |
<reponame>JLLeitschuh/taskurotta<filename>services-ora/src/main/resources/sql/clear.sql
DELETE FROM TSK_PROCESS;
DELETE FROM TSK_BROKEN_PROCESSES;
DELETE FROM TSK_INTERRUPTED_TASKS;
DELETE FROM TSK_SCHEDULED; |
create or replace table `dataline-integration-testing`.test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names`
partition by timestamp_trunc(_airbyte_emitted_at, day)
cluster by _airbyte_unique_key, _airbyte_emitted_at
OPTIONS()
as (
-- Final base SQL model
-- depends_on: `data... |
-- FUNCTION: get_sequence_from_gfid(id bigint)
-- DROP FUNCTION get_sequence_from_gfid(id bigint);
CREATE OR REPLACE FUNCTION get_sequence_from_gfid(
id bigint)
RETURNS smallint
LANGUAGE 'sql'
COST 100
IMMUTABLE
AS $BODY$
SELECT ((id & (1<<11)-1))::smallint; -- unsigned sequence will be re... |
<gh_stars>1-10
ALTER TABLE IF EXISTS tags RENAME COLUMN current_page TO current_page_t;
ALTER TABLE IF EXISTS tags ADD COLUMN current_page_r bigint DEFAULT 0;
ALTER TABLE IF EXISTS tags ADD COLUMN current_page_s bigint DEFAULT 0;
|
SELECT
*
FROM
sys.dm_db_wait_stats
ORDER BY wait_time_ms DESC
OPTION (RECOMPILE)
SELECT
*
FROM
sys.dm_os_wait_stats
ORDER BY wait_time_ms DESC
OPTION (RECOMPILE)
|
-- original: badutf.test
-- credit: http://www.sqlite.org/src/tree?ci=trunk&name=test
PRAGMA encoding=UTF8
;PRAGMA encoding=UTF16be; |
CREATE TABLE list (id VARCHAR(2) NOT NULL, value VARCHAR(64) NOT NULL, PRIMARY KEY(id));
INSERT INTO "list" ("id", "value") VALUES ('af', 'Afrikaans');
INSERT INTO "list" ("id", "value") VALUES ('af_NA', 'Afrikaans (Namibië)');
INSERT INTO "list" ("id", "value") VALUES ('af_ZA', 'Afrikaans (Suid-Afrika)');
INSERT INTO... |
select nome from funcionario where nome like '_NA%' or nome like '_ON%';
|
<filename>01_prep/02_pscis/sql/05_pscis_points_duplicates.sql
-- Report on duplicated crossings for review and fixing
-- 1. Based on points <10m apart
-- 2. Based on events <5m (instream) apart
DROP TABLE IF EXISTS bcfishpass.pscis_points_duplicates;
CREATE TABLE bcfishpass.pscis_points_duplicates
(stream_cros... |
<reponame>serj99/online-shopping-system
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Sep 03, 2020 at 01:17 PM
-- Server version: 10.5.5-MariaDB
-- PHP Version: 7.4.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Хост: localhost
-- Время создания: Ноя 20 2020 г., 22:36
-- Версия сервера: 8.0.21
-- Версия PHP: 7.4.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_... |
<reponame>endeavourhealth/HL7Receiver
create or replace function helper.get_table_sizes
(
)
returns table
(
table_name varchar,
table_size varchar,
indexes_size varchar,
total_size varchar
)
as $$
begin
return query
select
cast(t2.table_name as varchar),
cast(pg_size_pretty(t2.table_size) as varchar) as tab... |
<gh_stars>1-10
INSERT INTO validator_sequences (
height,
time,
stash_account,
active_balance
)
VALUES @values
ON CONFLICT (height, stash_account) DO UPDATE
SET
active_balance = excluded.active_balance
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.