sql stringlengths 6 1.05M |
|---|
<filename>SQL/createdatabasesql.sql
DROP TABLE IF EXISTS USER;
CREATE TABLE USER
(
Id int NOT NULL,
Username varchar(255) NOT NULL,
Name varchar(255),
Password varchar(255),
Email varchar(255),
CONSTRAINT USERPK PRIMARY KEY (Id)
);
DROP TABLE IF EXISTS ADMINISTRATOR;
CREATE TABLE ADMINISTRATOR
(
Id int NOT NULL,
Usern... |
--create main database
CREATE DATABASE DBTheSmartBatteryCharger
--go to main database
USE [DBTheSmartBatteryCharger]
GO
--create main table
CREATE TABLE tblLogFile
(
colIndex INT IDENTITY(1,1) PRIMARY KEY,
colDate DATE NOT NULL,
colTime TIME NOT NULL,
colBatteryPercent INT NOT NULL,
colChargerStatus CHAR(7) NO... |
-- phpMyAdmin SQL Dump
-- version 4.5.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Nov 09, 2019 at 09:16 PM
-- Server version: 5.7.11
-- PHP Version: 5.6.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
CREATE DATABASE IF NOT EXISTS `db_mvc`; |
SELECT
CASE WHEN cgo.CDCARREIRA = '1' --promotor, promotor substituto e procurador
THEN 'PJ'
WHEN cgo.NMCARGO LIKE '%ESTAGI_RIO%'
THEN 'ESTAG'
ELSE 'FUNC' END AS is_promotor
FROM RH.RH_VW_FUNCIONARIO func
JOIN RH_CARGOS cgo ON func.cdcargo = cgo.cdcargo
WHERE func.E_MAIL1 = LOWER(TRIM(:usern... |
<gh_stars>1-10
CREATE VIEW service_topic_dependencies AS
select
components.service,
views.topic
from
components
inner join
views on views.component=components.id
union
select
components.service,
view_sinks.topic
from
components
inner ... |
--Problem 22
USE [Geography]
SELECT PeakName
FROM Peaks
ORDER BY PeakName ASC |
<gh_stars>0
DROP TABLE IF EXISTS t;
CREATE TABLE t (
id INT PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(42),
birth DATE,
cash DECIMAL(18, 4),
last_visit DATETIME,
gender CHAR(1)
);
INSERT INTO
t
VALUES
(
1,
'233',
'2021-09-30',
12.34,
'2021-10-09 16... |
-- start query 22 in stream 0 using template query22.tpl
with results as
(select i_product_name
,i_brand
,i_class
,i_category
--,avg(inv_quantity_on_hand) qoh
,inv_quantity_on_hand qoh
from
inventory,
date_dim,
item,
warehouse
where inv_date_sk... |
CREATE ROLE fitbystam WITH LOGIN PASSWORD '<PASSWORD>';
CREATE DATABASE fooddb WITH OWNER = fitbystam TEMPLATE template0;
|
<reponame>koech-allan/Voting-System
DROP DATABASE IF EXISTS `VOTING`;
CREATE DATABASE `VOTING`;
USE `VOTING`;
SET NAMES utf8;
SET character_set_client=utf8mb4;
CREATE TABLE `VOTERS`(
`userId` varchar(15) NOT NULL,
`firstname` varchar(30) NOT NULL,
`lastname`varchar(30) NOT NULL,
`school` varchar(80) NOT NULL,
`gender`... |
<reponame>a1771550/WordCollocation_Admin
INSERT INTO word (Entry, EntryZht, EntryZhs, EntryJap, RowVersion, CanDel, posId) VALUES ('ability', '能力', '能力', '能力', '2016-10-03 23:26:07', 0, 1);
INSERT INTO word (Entry, EntryZht, EntryZhs, EntryJap, RowVersion, CanDel, posId) VALUES ('profile', '展示', '展示', 'プロファイルへ', '2016-... |
<reponame>iplweb/django-bpp
BEGIN;
DROP VIEW IF EXISTS bpp_wydawnictwo_ciagle_view CASCADE;
CREATE VIEW bpp_wydawnictwo_ciagle_view AS
SELECT
ARRAY [
(SELECT id
FROM django_content_type
WHERE
django_content_type.app_label = 'bpp' AND
django_content_type.model = 'wydawnictwo_ciagle'... |
<gh_stars>1-10
--+ holdcas on;
set names iso88591;
drop table if exists t;
create table t (i int, s char(20) collate iso88591_en_ci);
insert into t values (1,'Ca_ca__Ec_EaCa_ca__E');
insert into t values (2,'__cE_C _a_AC_Ch___cE');
insert into t values (3,'hcE_ca_A_C_EhcE_ca_A');
insert into t values (4,'Ec_aC_E_CEc_a... |
<filename>db_spk.sql
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Aug 04, 2021 at 02:37 AM
-- Server version: 5.7.32
-- PHP Version: 7.4.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARAC... |
<reponame>AerisG222/mikeandwan.us
DO
$$
BEGIN
IF NOT EXISTS (SELECT 1 FROM photo.raw_conversion_mode) THEN
INSERT INTO photo.raw_conversion_mode (id, name) VALUES (0, 'None');
INSERT INTO photo.raw_conversion_mode (id, name) VALUES (1, 'Brightening');
INSERT INTO photo.raw_conversion_mode ... |
<reponame>vbaaccess/InformMe2
/*
Database for project
*/
CREATE Table tabInformMe
(
Id INT
,DatValue VARCHAR(254)
,DatDescription VARCHAR(254)
,CreatDate DATETIME DEFAULT(GETDATE())
,CONSTRAINT [PK_tabInformMe] PRIMARY KEY CLUSTERED ([Id]) ON [PRIMARY]
) |
-- phpMyAdmin SQL Dump
-- version 3.5.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Aug 02, 2016 at 11:34 AM
-- Server version: 5.5.45-37.4-log
-- PHP Version: 5.6.24
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE... |
<reponame>gooper24/PortalCMS<filename>database/old/V1/mail_schedule.sql<gh_stars>0
CREATE TABLE IF NOT EXISTS mail_schedule (
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
recipient_email varchar(254),
subject varchar(255),
body TEXT,
status INT NOT NULL DEFAULT 1,
errormessage TEXT DEFAULT NULL,
DateSent t... |
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.6.2
-- Dumped by pg_dump version 9.6.2
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = ON;
SET check_function_bodies = FALSE;
SET client_min... |
\echo Use "CREATE EXTENSION omnidb_plugin" to load this file. \quit
CREATE SCHEMA omnidb;
CREATE FUNCTION omnidb.omnidb_enable_debugger(character varying)
RETURNS void AS '$libdir/omnidb_plugin'
LANGUAGE C IMMUTABLE STRICT;
CREATE TABLE omnidb.contexts
(
pid INTEGER NOT NULL PRIMARY KEY,
function ... |
<reponame>ProblemSolvingIO/parsons
-- Initialize the database.
-- Drop any existing data and create empty tables.
DROP TABLE IF EXISTS program;
CREATE TABLE program (
id INTEGER PRIMARY KEY AUTOINCREMENT,
created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
title TEXT NOT NULL,
code TEXT NOT NULL,
url TEXT... |
<filename>fatec-campeonato/CampeonatoPaulista2016/sql/LabBD_Avaliacao_3.sql
/*
* Laboratório de Banco de Dados
* Prof. M.Sc. <NAME>
* AVALIAÇÃO 1: "Campeonato Paulista 2016"
*/
-- Criação da Base de Dados "Campeonato"
IF (OBJECT_ID('Campeonato') IS NOT NULL)
DROP DATABASE Campeonato
GO
CREATE DATABASE Campeonat... |
CREATE CUSTOM INDEX IF NOT EXISTS idx_ts_logs_lucene ON ts_logs (lucene) USING 'com.stratio.cassandra.lucene.Index' WITH OPTIONS = {
'schema' : '{
fields : {
id : {type : "integer"},
cluster_id: {type : "integer"},
created: {type : "integer"},
hostname : {type... |
<filename>HotelManagementDB/dbo/Scripts/Script.PostDeployment.sql
/*
Post-Deployment Script Template
--------------------------------------------------------------------------------------
This file contains SQL statements that will be appended to the build script.
Use SQLCMD syntax to include a file in the ... |
ALTER TABLE `support` ADD `status` ENUM( 'open', 'closed' ) NOT NULL DEFAULT 'open' AFTER `id_support` ,
ADD INDEX ( `status` );
ALTER TABLE `support` CHANGE `date` `datetime` DATETIME NOT NULL;
CREATE TABLE `support_rep` (
`id_support_rep` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(50) DEFA... |
CREATE OR REPLACE VIEW "public"."offers" AS
SELECT T.artwork_id,
max(T.amount) AS amount
FROM transactions T
JOIN artworks A ON T.artwork_id = A.id
WHERE T.created_at > A.transferred_at
GROUP BY T.artwork_id;
|
select * from CARI
select * from CARI_TIP
--INNER JOIN
select c1.CARI_NO, c1.CARI_AD, ct.CARI_TIP_AD
from CARI as c1 inner join CARI_TIP as ct
on c1.CARI_TIP_ID = ct.CARI_TIP_ID
use Northwind
select od.OrderID siparis_no, p1.ProductName urun_adi
from Products as p1 inner join [Order Details] od
on p1.ProductID = o... |
/*Replace customer_all in row 42 with your CUR table name */
CREATE OR REPLACE VIEW kpi_s3_storage_all AS
-- Step 1: Enter S3 standard savings savings assumption. Default is set to 0.3 for 30% savings
WITH inputs AS (
SELECT * FROM (VALUES (0.3)) t(s3_standard_savings)),
-- Step: 2 Add mapping view
... |
<reponame>smith750/kc
DELIMITER /
INSERT INTO SEQ_NOTIFICATION_TYPE_ID VALUES(NULL)
/
INSERT INTO NOTIFICATION_TYPE (NOTIFICATION_TYPE_ID, MODULE_CODE, ACTION_CODE, DESCRIPTION, SUBJECT, MESSAGE, PROMPT_USER, SEND_NOTIFICATION, UPDATE_USER, UPDATE_TIMESTAMP, VER_NBR, OBJ_ID)
VALUES ((SELECT (MAX(ID)) FROM SEQ_NOTIFICAT... |
<reponame>equinor/fiberoptics-das-simulator<gh_stars>0
INSERT INTO fiber_optical_path(id, wellbore, switch_port, fiber_optical_path_info) values ('00528e45-06d0-4110-bba4-e904afe02657', 'Simulator slot 2' , NULL, 'Simulator slot 2');
INSERT INTO fiber_optical_path(id, wellbore, switch_port, fiber_optical_path_info) val... |
use ${db_name};
select count(*) from LINEITEM;
select count(*) from SUPPLIER;
select count(*) from PARTSUPP;
select count(*) from CUSTOMER;
select count(*) from NATION;
select count(*) from REGION;
select count(*) from PART;
select count(*) from ORDERS;
-- 商业智能计算测试TPC-H 是美国交易处理效能委员会(TPC,Transaction Processing Perfor... |
<gh_stars>1-10
update post set body = jsonb_set(body, '{postStatus}', body->'recordsStatus');
update post set body = jsonb_set(body, '{recordsStatus}', '""');
update post set body = jsonb_set(body, '{imagesStatus}', '""'); |
<reponame>ystros/credhub
ALTER TABLE access_entry
ADD COLUMN delete_permission BOOL DEFAULT FALSE NOT NULL;
ALTER TABLE access_entry
ADD COLUMN read_acl_permission BOOL DEFAULT FALSE NOT NULL;
ALTER TABLE access_entry
ADD COLUMN write_acl_permission BOOL DEFAULT FALSE NOT NULL;
ALTER TABLE access_entry
ALTER... |
CREATE TABLE after_streams2 (
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
channel VARCHAR,
added_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
user TEXT NOT NULL,
text TEXT NOT NULL
);
INSERT INTO after_streams2 (channel, added_at, user, text) SELECT channel, added_at, user, text FROM after_streams;
D... |
/*
Navicat MySQL Data Transfer
Source Server : 127.0.0.1_3306
Source Server Version : 50505
Source Host : 127.0.0.1:3306
Source Database : wyii_cms
Target Server Type : MYSQL
Target Server Version : 50505
File Encoding : 65001
Date: 2018-02-08 12:00:57
*/
SET FOREIG... |
<reponame>ricardoiles/pacos<filename>public/db_pacos.sql
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 21-11-2020 a las 20:12:41
-- Versión del servidor: 10.4.14-MariaDB
-- Versión de PHP: 7.2.33
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START T... |
CREATE TABLE [dbo].[People] (
[id] INT IDENTITY (1, 1) NOT NULL,
[LastName] VARCHAR (50) NOT NULL,
[FirstName] VARCHAR (50) NOT NULL,
[MI] VARCHAR (50) NULL,
[Salutation] VARCHAR (... |
<gh_stars>0
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 5.7.19 - MySQL Community Server (GPL)
-- Server OS: Win64
-- HeidiSQL Version: 9.4.0.5125
-- ------------------------------------------------... |
<reponame>rizkyfalih/weather-apps
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 22 Sep 2019 pada 06.28
-- Versi server: 10.4.6-MariaDB
-- Versi PHP: 7.2.22
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone =... |
create table if not exists banners
(
id serial primary key,
title varchar(256),
text varchar(256),
pictureUrl varchar(256) not null,
startDate timestamp,
endDate timestamp,
isActive bool default false,
createdAt timestamp default current_timestamp,
updatedAt timestamp default current... |
<filename>db_template/bckup/sertif_table_mt_country.sql<gh_stars>0
-- --------------------------------------------------------
--
-- Table structure for table `mt_country`
--
DROP TABLE IF EXISTS `mt_country`;
CREATE TABLE `mt_country` (
`id` int NOT NULL,
`code` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_... |
<gh_stars>0
DROP DATABASE newsportal;
DROP DATABASE newsportal_test;
|
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 27, 2022 at 11:04 AM
-- Server version: 10.4.22-MariaDB
-- PHP Version: 8.1.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
<filename>database/m-barber.sql
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 1172.16.58.3
-- Generation Time: May 21, 2020 at 04:25 PM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.3.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_z... |
<filename>reservation/src/main/webapp/resources/reservation.v1.5/ddl.sql
drop table if exists reservation_user_comment_image;
drop table if exists reservation_user_comment;
drop table if exists reservation_info_price;
drop table if exists reservation_info;
drop table if exists promotion;
drop table if exists product_p... |
CREATE PROCEDURE [dbo].[dnn_UpdateSchedule]
@ScheduleID int
,@TypeFullName varchar(200)
,@TimeLapse int
,@TimeLapseMeasurement varchar(2)
,@RetryTimeLapse int
,@RetryTimeLapseMeasurement varchar(2)
,@RetainHistoryNum int
,@AttachToEvent varchar(50)
,@CatchUpEnabled bit
,@Enabled bit
,@ObjectDependencies var... |
#give me all events that modified table 'testtable' and where the 'id' column before the change was set to '6'
SELECT * FROM metadata.changeset WHERE tablename = 'testtable' and oldvalues #> '{id}' = '6'; |
CREATE TABLE IF NOT EXISTS storage (
id varchar(256) PRIMARY KEY,
name varchar(500) NOT NULL,
created DATETIME NOT NULL,
provider varchar(256) NOT NULL,
data TEXT,
edata TEXT,
is_locked BOOLEAN NOT NULL CHECK (is_locked IN (0,1)),
is_indexed BOOLEAN NOT NULL CHECK (is_indexed IN (0,1))
)... |
-- collate6.test
--
-- execsql {
-- CREATE TRIGGER collate6trig BEFORE INSERT ON collate6tab BEGIN
-- INSERT INTO collate6log VALUES(new.a='a', new.b='b');
-- END;
-- }
CREATE TRIGGER collate6trig BEFORE INSERT ON collate6tab BEGIN
INSERT INTO collate6log VALUES(new.a='a', new.b='b');
END; |
<reponame>jdkoren/sqlite-parser<gh_stars>100-1000
-- vtabC.test
--
-- execsql {SELECT count(*) FROM sqlite_master}
SELECT count(*) FROM sqlite_master |
-- Query for: 10. Stored Procedure Information
select * from information_schema.procedures;
|
SET @s := '
echo SELECT 1, ''abc'' FROM DUAL
';
call run(@s);
|
ALTER TABLE METADATA ADD SIST_INDEKSERT_ES TIMESTAMP DEFAULT TO_TIMESTAMP('1970-01-01 00:00:00', 'YYYY-MM-DD HH24:MI:SS') NOT NULL; |
<reponame>fofoMedrano23/CapacitacionesVirtuales
START TRANSACTION;
SET @id := (SELECT `id` FROM `fields` WHERE `key` = "plugin_locale_titles");
UPDATE `multi_lang` SET `content` = 'Translate' WHERE `foreign_id` = @id AND `model` = "pjField" AND `field` = "title";
INSERT INTO `fields` VALUES (NULL, 'plugin_loca... |
alter table asdf add column qwer bigint not null;
|
CREATE DATABASE IF NOT EXISTS `emoji`
DEFAULT CHARACTER SET utf8mb4;
USE emoji;
DROP TABLE IF EXISTS `comment`;
CREATE TABLE `comment` (
`id` BIGINT(20) NOT NULL PRIMARY KEY,
`content` VARCHAR(256) NOT NULL
)
ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4; |
USE data_extracts;
DROP PROCEDURE IF EXISTS createMedicationOrdersFromCohortBP2;
DELIMITER //
CREATE PROCEDURE createMedicationOrdersFromCohortBP2 (
IN snomedIds VARCHAR (15000),
IN filterType INT,
IN filterDate DATE
)
BEGIN
DELETE FROM snomeds WHERE cat_id IN (1,2,3,4);
DELETE FROM store WHERE id IN (1,... |
INSERT INTO `t_sys_permission` VALUES ('566941845624590336', '管理', '展示', '/ProDatacountController/view','0', '557729737267613696', 'gen:proDatacount:view', 1, 'layui-icon layui-icon-face-smile', NULL,0)
,('566941845624590337', '集合', '集合', '/ProDatacountController/list','0', '566941845624590336', 'gen:proDatacount:list'... |
<reponame>PearsonEducation/Docussandra<gh_stars>10-100
drop keyspace if exists docussandra;
create keyspace docussandra
with replication = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };
use docussandra;
drop table if exists sys_meta;
create table sys_meta (
id text,
version text,
created_at timestamp,
u... |
-- $Id$
-- Test queries with VALUES
-- single-row
select * from (values ('hi',2,'bye'));
-- top-level
values ('hi',2,'bye');
-- multi-row
select * from (values ('hi',2,'bye'), ('foo',3,'bar')) order by 1;
-- top-level ordered
values ('hi',2,'bye'), ('foo',3,'bar') order by 1;
-- values with expressions
values (1+2... |
<filename>src/main/resources/pgdeltas/2001001_rename_usersettings_id_seq_sequence.sql
ALTER SEQUENCE usersettings_id_seq RENAME TO users_id_seq;
--//@UNDO
|
<reponame>bcgov/EDUC-PEN-REG-BATCH-API
CREATE TABLE PEN_REQUEST_BATCH
(
PEN_REQUEST_BATCH_ID RAW(16) NOT NULL,
SUBMISSION_NO VARCHAR2(8) NOT NULL,
PEN_REQUEST_BATCH_STATUS_CODE VARCHAR2(10) NOT NULL,
PEN_REQUEST_BATCH_STATUS_REASON VARCHAR2(255),
PEN_REQUEST_B... |
<reponame>UCSFMemoryAndAging/lava-uds<filename>lava-crms-nacc/database/crms-nacc/versions/V3.5/V3.5.2/lava-crms-nacc-data-3.5.1-to3.5.2.sql
-- *********************************************************************************
-- Bug Fix for NACC Pathology 10, item 12g, list metadata
-- *********************************... |
-- phpMyAdmin SQL Dump
-- version 4.3.12
-- http://www.phpmyadmin.net
--
-- Хост: localhost
-- Время создания: Ноя 05 2015 г., 19:22
-- Версия сервера: 5.6.23
-- Версия PHP: 5.6.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40... |
<filename>Sql/2017-2018/A/13.sql
--ZAD13
SELECT * from pracownicy WHERE placa_dod>500 ORDER BY etat, nazwisko;
----
|
SELECT p.name FROM people AS p WHERE p.id IN (SELECT d.person_id FROM directors d JOIN ratings r ON r.movie_id = d.movie_id WHERE r.rating >=9.0); |
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 19 Agu 2019 pada 06.46
-- Versi Server: 10.1.25-MariaDB
-- PHP Version: 7.1.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... |
<reponame>cviorel/automation
USE [master]
GO
SELECT *
FROM sys.server_principals INNER JOIN sys.server_permissions ON grantee_principal_id = [server_principals].principal_id
WHERE [server_principals].NAME = 'dbconnectrole' AND [server_permissions].permission_name = 'CONNECT SQL'
|
<gh_stars>0
select E.run_id, E.edge_num, P.process, KH.capacity
from kappa_hub as KH
join edge as E on E.edge_id=KH.edge_id
join process as P on P.process_id=KH.process_id
where
E.run_id > 1250 --E.run_id in (4825, 4833)
and KH.capacity > 0
order by E.run_id, E.edge_num; |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 12, 2019 at 02:32 PM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.3.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Jan 22, 2021 at 10:18 PM
-- Server version: 5.7.31
-- PHP Version: 7.3.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@... |
insert into city values
(4341610,"Simmesport","US",-91.800117,30.983521),
(4341920,"Sorrento","US",-90.859261,30.184361),
(4342089,"<NAME>","US",-90.699806,29.927429),
(4342429,"Springhill","US",-93.466843,33.00597),
(4342638,"Sterlington","US",-92.085968,32.696251),
(4342696,"Stonewall","US",-93.824074,32.28183),
(434... |
USE [Credit];
GO
EXEC sp_replicationdboption @dbname = N'Credit',
-- Can be "subscribe", "publish", "merge publish"
-- and "sync with backup"
@optname = N'publish', -- any type of publication
@value = N'true';
EXEC [Credit].sys.sp_addlogreader_agent @job_login = N'SQLSKILLSDEMOS\Administrator',
@job_pa... |
<filename>vendor/update/126.sql
ALTER TABLE `storage` ADD `storage_hc` BOOLEAN NOT NULL DEFAULT FALSE AFTER `storage_descr`;
ALTER TABLE `storage` DROP `storage_perc_warn`;
|
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 18, 2021 at 09:42 AM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT *... |
/*
Navicat MySQL Data Transfer
Source Server : MYSQL
Source Server Version : 50709
Source Host : localhost:3306
Source Database : laravel_base_app
Target Server Type : MYSQL
Target Server Version : 50709
File Encoding : 65001
Date: 2020-10-16 00:00:22
*/
SET FOREIGN_KEY_CHECKS=0;
... |
ALTER TABLE "public"."area" DROP COLUMN "value" CASCADE;
|
-- ------------------------------------------------------------------
-- -- This query is demonstrating 'AS' aliases and LEFT to put only a fix length of a string in a column
SELECT
GovernmentForm, LEFT(GovernmentForm,5) As Goverment_Form_Initials
From
world.Country;
-- ------------------------------------------... |
<gh_stars>1-10
select stampede.back();
|
CREATE SCHEMA cloudbilling;
CREATE TABLE cloudbilling.accounts (
id SERIAL PRIMARY KEY,
gcp_account_info text
);
CREATE TABLE cloudbilling.gcp_csv_files (
id SERIAL PRIMARY KEY,
name text,
bucket text,
time_created timestamp without time zone,
account_id integer REFERENCES cloudbilling.acc... |
/* ------------------------------------------------ *
* Name: <NAME> *
* CSU ID: 2595744 *
* Assignment: 1 *
* Description: Create a Database and Tables. *
* Date: 5-27-2015 *
* ... |
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Versión del servidor: 5.6.38-log - MySQL Community Server (GPL)
-- SO del servidor: Win64
-- HeidiSQL Versión: 10.3.0.5771
-- -------------------------------------------------------... |
<reponame>finnishtransportagency/ksr<gh_stars>1-10
update layer set contract_id_field = 'VAYLATYYPPI' where name = 'Maanvuokrasopimukset (kaikki)';
update layer set contract_id_field = 'RAK_NRO',contract_description_field = 'RAK_NIMI' where name = 'Rakennukset (kaikki)';
update layer set contract_id_field = 'COMMUNITY_... |
-- fts3corrupt2.test
--
-- execsql { CREATE VIRTUAL TABLE t2 USING FTS3(a, b); }
CREATE VIRTUAL TABLE t2 USING FTS3(a, b); |
--
-- PostgreSQL database dump
--
-- Dumped from database version 10.14
-- Dumped by pg_dump version 10.14
-- Started on 2021-08-08 17:49:14
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_cata... |
<gh_stars>10-100
-- for MySQL only -- requires dbEnhancedDetailsEnabled=true
-- status counts
select status, count(*) from objects group by status;
-- count of objects with matching MD5s
select count(*) as matching_md5_source_and_target from objects
where status in ('Transferred','Verified') and source_md5 = targ... |
<filename>models/twitter__ad_adapter.sql
with accounts as (
select *
from {{ var('twitter_account_history') }}
where is_latest_version = True
), campaigns as (
select *
from {{ var('twitter_campaign_history') }}
where is_latest_version = True
), line_items as (
select *
from {{ var(... |
<filename>AssetMonitoring/AssetMonitoring.Database/Script/PostDeploymentScript/PopulateCapabilityFilter.sql
BEGIN
IF NOT EXISTS (SELECT * FROM [dbo].[SensorCapabilityFilters]
WHERE Name = 'Vibration' and CapabilityId =
(SELECT Id FROM [dbo].[Capabilities]
WHERE Name = 'Acce... |
-- Do things in partial chunks of records based on another table
SELECT account_id
FROM ( select account_id, row_number() OVER (order by account_id) rn from rion_51396@esd )
WHERE rn between 1 and 9
ORDER BY 1;
-- same
SELECT account_id, input_source
FROM account_base
WHERE account_id IN (
... |
<gh_stars>1-10
insert into collection(id, name) values ('empty', 'empty collection');
insert into collection(id, name) values ('full', 'full collection');
insert into item(id, name, collection_id) values (nextval('hibernate_sequence'), 'first', 'full');
insert into item(id, name, collection_id) values (nextval('hibern... |
ALTER TABLE app
ADD COLUMN keywords TEXT NOT NULL;
CREATE INDEX app_keywords_idx
ON app (keywords(767));
|
/*
Navicat Premium Data Transfer
Source Server : aliyun
Source Server Type : MySQL
Source Server Version : 50725
Source Host : 192.168.3.11:3306
Source Schema : db_xhotel
Target Server Type : MySQL
Target Server Version : 50725
File Encoding : 65001
Date: 25/04/2019 ... |
-- Test check constraint def with number of characters more than 4000
create table ltable( a varchar, check(a = '<KEY>'));
go
select length(tsql_get_constraintdef(oid)) from pg_constraint where contype='c' and conrelid = (select oid from pg_class where relname='ltable');
go
-- The check constraint defnition only show... |
<reponame>Zhaojia2019/cubrid-testcases
--marginal values of timestamptz/datetimetz type
--1. marginal values: timestamptz argument
--select week(timestamptz'00:00:00 01/01');
select if( week(timestamptz'00:00:00 01/01') - week(timestamptz'00:00:00 01/01/2014') in (0,1),'ok','nok');
select week(timestamptz'03:14:07 1... |
<filename>templates/scripts/repslots.sql
CREATE TEMPORARY TABLE slots (
slot_name name
);
{% for slot in docker_postgres_replication_slots %}
INSERT INTO slots (slot_name) VALUES ('{{slot}}');
{% endfor %}
-- remove unused slots
SELECT CASE WHEN count(pg_drop_replication_slot(pg_replication_slots.slot_name)) <> ... |
<reponame>jomofrodo/covid.vue<gh_stars>0
SELECT
'JH_GLOBAL' as srccode,
count(tsid) as ct,
max (date) as date
FROM jh_timeseries
UNION
SELECT
'JH_US' as srccode,
count(tsid) as ctUS,
max (date) as date
FROM jh_us_timeseries
UNION
SELECT
'CTP_STATES_DAILY' as srcCode,
count(date) as ct,
max (date) as da... |
<gh_stars>0
INSERT INTO books
(title, author_fname, author_lname, released_year, stock_quantity, pages)
VALUES ('10% Happier', 'Dan', 'Harris', 2014, 29, 256),
('fake_book', 'Freida', 'Harris', 2001, 287, 428),
('<NAME> The Bardo', 'George', 'Saunders', 2017, 1000, 367); |
-- phpMyAdmin SQL Dump
-- version 4.1.7
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jul 07, 2015 at 10:21 PM
-- Server version: 5.6.16
-- PHP Version: 5.4.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... |
<filename>schema.sql
CREATE DATABASE Ecom;
USE Ecom
CREATE TABLE Persons (
PersonID int AUTO_INCREMENT NOT NULL,
LastName varchar(255),
FirstName varchar(255),
StreetNumber int NOT NULL,
Address varchar(255),
Email varchar(255),
PhoneNumber bigint NOT NULL,
Comment varchar(500),
PRI... |
<reponame>koki-oe/whois<filename>server/prisma/migrations/20201209205045_/migration.sql
-- CreateTable
CREATE TABLE `Task` (
`id` INT NOT NULL AUTO_INCREMENT,
`label` VARCHAR(191) NOT NULL,
`done` BOOLEAN NOT NULL DEFAULT false,
PRIMARY KEY (`id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.