sql stringlengths 6 1.05M |
|---|
-- start_ignore
SET gp_create_table_random_default_distribution=off;
-- end_ignore
--
-- RESYNC ALTER TABLE OWNER
--
CREATE TABLE resync_alter_table_owner1 (
text_col text,
bigint_col bigint,
char_vary_col character varying(30),
numeric_col numeric
)DISTRIBUTED RANDOMLY;
insert into resync_alter_table_owner1 s... |
<reponame>ezegarra/microbrowser<gh_stars>0
CREATE DATABASE IF NOT EXISTS `ezegarraDB` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `ezegarraDB`;
-- MySQL dump 10.13 Distrib 5.6.13, for Win32 (x86)
--
-- Host: localhost Database: ezegarraDB
-- ------------------------------------------------------
-- Server versio... |
<filename>emulador/sql-files/upgrades/upgrade_20200625.sql<gh_stars>1-10
ALTER TABLE `login`
ADD COLUMN `web_auth_token` VARCHAR(17) NULL AFTER `old_group`,
ADD COLUMN `web_auth_token_enabled` tinyint(2) NOT NULL default '0' AFTER `web_auth_token`,
ADD UNIQUE KEY `web_auth_token_key` (`web_auth_token`)
;
|
INSERT INTO `cscart_addon_descriptions` VALUES ('access_restrictions','Restrizione accessi','Lets you limit storefront and administrator area access to certain IP-addresses with different options','it');
INSERT INTO `cscart_addon_descriptions` VALUES ('affiliate','Affiliazione','Toggles and lets configure the affiliate... |
CREATE TABLE [AsData_PL].[MarketoActivityTypes]
(
ActivityTypeId bigint
,ActivityTypeName nvarchar(255)
,ActivityTypeDescription nvarchar(255)
,AsDm_CreatedDate Datetime2
,AsDm_UpdatedDate datetime2
,CONSTRAINT [PK_MAT_ActivityId] PRIMARY KEY CLUSTERED([ActivityTypeId] ASC)
)
|
-- setup colour scheme for the WMS maps
drop table if exists mess.wms_color;
create table mess.wms_color (value int, color text);
insert into mess.wms_color select generate_series(-100,-76,1) as value, '255 0 0' as color;
insert into mess.wms_color select generate_series(-75,-51,1) as value, '192 0 0' as color;
in... |
SELECT author,
title
FROM book
WHERE amount BETWEEN 2 AND 14
ORDER BY author DESC, title;
|
<reponame>owenwattimena/siakadsmk7<filename>siakad-smk-7.sql
-- Adminer 4.7.8 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 `dbs`;
CREATE TABLE `dbs` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT... |
CREATE TABLE sys.procedures
(
name sysname NOT NULL,
object_id int NOT NULL,
principal_id int,
schema_id int NOT NULL,
parent_object_id int NOT NULL,
type char(2) NOT NULL,
type_desc nvarchar(60),
create_date datetime NOT NULL,
modify_date datetime NOT NULL,
is_ms_shipped bit NOT... |
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Base de datos: ... |
-- phpMyAdmin SQL Dump
-- version 4.9.7
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jan 31, 2022 at 11:03 AM
-- Server version: 5.7.37
-- PHP Version: 7.3.33
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... |
-- file:create_index.sql ln:642 expect:true
SELECT * FROM array_index_op_test WHERE i && '{32}' ORDER BY seqno
|
<gh_stars>10-100
-- file:sequence.sql ln:179 expect:true
CREATE SEQUENCE sequence_test2 START WITH 32
|
<reponame>ObserveRTC/schemas
create table IF NOT EXISTS SfuEventReport (
serviceId VARCHAR(255) not null,
timestamp BIGINT not null,
name VARCHAR(65535) not null,
attachments VARCHAR(65535),
callId CHAR(36),
marker VARCHAR(65535),
mediaSinkId VARCHAR(255),
mediaStreamId VARCHAR(255),
mediaUnitId VARCHAR(255),... |
-- $Id$
-- Description: adding field in SEC_FILTER
alter table SEC_FILTER add column CODE varchar(200); |
-- Tags: no-fasttest
DROP TABLE IF EXISTS t_flatten_tuple;
DROP TABLE IF EXISTS t_flatten_object;
SET flatten_nested = 0;
CREATE TABLE t_flatten_tuple(t Tuple(t1 Nested(a UInt32, s String), b UInt32, t2 Tuple(k String, v UInt32))) ENGINE = Memory;
INSERT INTO t_flatten_tuple VALUES (([(1, 'a'), (2, 'b')], 3, ('c', ... |
-- $Id$
-- Test queries which abuse the implementation of conversion between Fennel
-- and Iterator calling convention.
set schema 'sales';
!set outputformat csv
-- NOTE: many of the union.sql and cartesians.sql queries are good tests
-- of Fennel/Iterator conversion as well.
-- force usage of Java calculator... |
<filename>test/sql/ddl_errors.sql
CREATE TABLE PUBLIC."Hypertable_1" (
time BIGINT NOT NULL,
"Device_id" TEXT NOT NULL,
temp_c int NOT NULL DEFAULT -1
);
CREATE INDEX ON PUBLIC."Hypertable_1" (time, "Device_id");
\set ON_ERROR_STOP 0
SELECT * FROM create_hypertable('"public"."Hypertable_1_mispelled"', 'time', 'D... |
CREATE TABLE `col_collect` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
`userid` int(10) DEFAULT '0' COMMENT '用户id',
`name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '名称',
`url` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMME... |
<gh_stars>1-10
-- Name: LatestActivityTimepointsForActivity
-- Schema: posda_queries
-- Columns: ['activity_id', 'activity_created', 'activity_description', 'activity_timepoint_id', 'timepoint_created', 'comment', 'creating_user']
-- Args: ['activity_id']
-- Tags: ['activity_timepoint_support']
-- Description: Get Seri... |
/*
* Copyright 2020 LinkedIn Corp. All rights reserved.
*
* 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 applicab... |
<filename>gpdb/contrib/postgis/raster/test/regress/rt_addband.sql<gh_stars>1-10
-----------------------------------------------------------------------
-- $Id$
--
-- Copyright (c) 2010 <NAME> <<EMAIL>>
--
-- This is free software; you can redistribute and/or modify it under
-- the terms of the GNU General Public Licenc... |
<gh_stars>0
-- Creates covering index for querying categories from category options
-- Since the index is required just for a backport the covering part of the index is ordered descendant,
-- which enables an easy exchange in version 2.33.
DROP INDEX IF EXISTS in_categories_categoryoptions_coid_bp;
CREATE INDEX in_cate... |
<filename>resources/migrations/001-db.up.sql<gh_stars>0
CREATE TABLE matches (
MATCHNUMBER INT PRIMARY KEY NOT NULL,
RED1 INT,
RED2 INT,
RED3 INT,
BLUE1 INT,
BLUE2 INT,
BLUE3 INT,
RED_POINTS INT,
BLUE_POINTS INT,
EVENT VARCHAR(20)
);
--;;
CREATE TABLE teammatches (
ID INT PRIMARY KEY AUTO_INCREMENT NOT NULL,... |
<filename>server/db/sql/friends/remove.sql<gh_stars>0
DELETE FROM friends
WHERE friend_id=$1
|
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost
-- Tiempo de generación: 04-12-2021 a las 22:31:21
-- Versión del servidor: 10.4.20-MariaDB
-- Versión de PHP: 8.0.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_... |
<reponame>SalmonSeasoning/lchs-railers-esports-bot
USE railer-db;
CREATE TABLE `cosmetic` (
`user_id` VARCHAR(18) NOT NULL,
`metadata` TEXT NOT NULL
);
|
delete from ClienteEntity;
delete from EquipoEntity;
delete from PartidoEntity;
delete from PostEntity;
delete from CampeonatoEntity;
delete from BlogEntity;
delete from AgendaEntity;
delete from AmistosoEntity;
delete from CanchaEntity;
delete from EntrenamientoEntity;
delete from PropietarioEntity;
delete ... |
-- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Client : localhost:3306
-- Généré le : Mer 10 Juin 2020 à 07:07
-- Version du serveur : 5.7.30-0ubuntu0.18.04.1
-- Version de PHP : 7.2.24-0ubuntu0.18.04.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 S... |
SELECT name FROM people JOIN directors ON people.id = directors.person_id JOIN movies ON directors.movie_id = movies.id JOIN ratings ON movies.id = ratings.movie_id WHERE ratings.rating >= 9; |
CREATE DATABASE Hotel
USE Hotel
CREATE TABLE Employees(
Id INT PRIMARY KEY IDENTITY,
FirstName NVARCHAR(20) NOT NULL,
LastName NVARCHAR(20) NOT NULL,
Title NVARCHAR(30) NOT NULL,
Notes NTEXT
)
CREATE TABLE Customers(
AccountNumber INT PRIMARY KEY IDENTITY,
FirstName NVARCHAR(20) NOT NULL,
LastName NVARCHAR(... |
--INSERT INTO MiniGames (MiniGameCategoryID, MiniGamePath, MiniGameName, MinDifficulty, MaxDifficulty)
--VALUES
--(1, 'game code here', 'Bubble Pop', 1, 2),
--(1, 'game code here', 'Under the Sea', 1, 3),
--(1, 'game code here', '<NAME>', 2, 4),
--(1, 'game code here', 'Catch a Tiger', 3, 4),
--(2, 'game code here', 'N... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Czas generowania: 07 Sty 2021, 16:16
-- Wersja serwera: 10.4.17-MariaDB
-- Wersja PHP: 8.0.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH... |
/*
pharmnet_product_notes.sql
~~~~~~~~~~~~~~~~~~~~
Grabs active PharmNet products and associated product notes, given either
a product description or a search parameter in for product notes
*/
select md.item_id
, product_desc = mi.value
, med_type = evaluate2(if(md.med_type_flag = 0) "Product"
elseif(m... |
ALTER ROLE [db_owner] ADD MEMBER [DEV19\etlprocess];
|
/*
* This file is part of the "ModuleSystem" project.
*
* (c) <NAME> <<EMAIL>>
*
* Filling data for table "sys.config"
* Configuration
* Конфигурация
*/
SET CLIENT_ENCODING TO 'UTF8';
SET SESSION ROLE role_owner;
BEGIN;
-- TRUNCATE TABLE sys.config;
-- DELETE FROM sys.config;
DO $BODY$
DECLARE
id_app_v... |
-- file:plpgsql.sql ln:1734 expect:false
when NUMERIC_VALUE_OUT_OF_RANGE OR CARDINALITY_VIOLATION then
raise notice 'caught numeric_value_out_of_range or cardinality_violation'
|
create table LIBRARY_COUNTRY (
ID varchar(36) not null,
CREATE_TS time,
CREATED_BY varchar(50),
NAME varchar(100) not null,
primary key (ID)
)^
alter table LIBRARY_TOWN add column COUNTRY_ID varchar(36) ^
alter table LIBRARY_TOWN add constraint FK_LIBRARY_TOWN_COUNTRY_ID foreign key (COUNTRY_ID) references L... |
<filename>inst/sql/sql_server/analyses/602.sql
-- 602 Number of persons by procedure occurrence start month, by procedure_concept_id
--HINT DISTRIBUTE_ON_KEY(stratum_1)
select 602 as analysis_id,
CAST(po1.procedure_concept_id AS VARCHAR(255)) as stratum_1,
CAST(YEAR(procedure_date)*100 + month(procedure_date) AS ... |
CREATE DEFINER=`root`@`192.168.%` PROCEDURE `spider_pq_all`(IN `sHost` varchar(255),IN `Username` varchar(255),IN `sPassword` varchar(255),IN `iPort` int,IN `Databasename` varchar(255),IN `inSQL` text,IN `NewTable` varchar(255),IN `TempTableEngineType` varchar(255),IN `BeforeEndSQL` varchar(255),IN `MaxSQLCount` int,IN... |
select distinct concept_id, concept_name
from @results_schema.heracles_results
join @vocabulary_schema.concept on concept_id = cast(stratum_3 as INTEGER)
where analysis_id in (@analysis_id_list) and cohort_definition_id = @cohort_definition_id and (stratum_2 = CAST(@drug_concept_id AS VARCHAR(255)) or CAST(@drug_concep... |
<filename>tools/tagging/plain sql this not that.sql
-- this = 'misato'
-- that = 'not_odoriko'
SELECT id FROM `shared_tag_mess_def` WHERE `name` LIKE 'misato'
SELECT id FROM `shared_tag_mess_def` WHERE `name` LIKE 'not_odoriko'
select * from
(
select track_id from track_tag_mess_cloud as c
join shared_tag_mess_... |
-- This SQL code was generated by sklearn2sql (development version).
-- Copyright 2018
-- Model : CaretClassifier_svmPoly_pca
-- Dataset : iris_date_tgt
-- Database : teradata
-- This SQL code can contain one or more statements, to be executed in the order they appear in this file.
-- Model deployment code
WITH ... |
--
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET search_path = public, pg_catalog;
SET default_tablespace = '';
SET default_with_oids = fals... |
<gh_stars>1-10
select INET_NTOA((select 3232235530));
|
<reponame>opengauss-mirror/Yat<gh_stars>0
-- @testpoint:opengauss关键字size(非保留),作为表空间名
--关键字不带引号,创建成功
drop tablespace if exists size;
CREATE TABLESPACE size RELATIVE LOCATION 'hdfs_tablespace/hdfs_tablespace_1';
drop tablespace size;
--关键字带双引号,创建成功
drop tablespace if exists "size";
CREATE TABLESPACE "size" RELATIVE ... |
-- @testpoint:opengauss关键字result(非保留),作为数据库名
--关键字不带引号-成功
drop database if exists result;
create database result;
drop database result;
--关键字带双引号-成功
drop database if exists "result";
create database "result";
drop database "result";
--关键字带单引号-合理报错
drop database if exists 'result';
create database 'result';
--关键字带反... |
<filename>simsurat.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 26, 2020 at 08:54 AM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 5.6.40
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_z... |
CREATE TABLE [dbo].[RegularTrips] (
[MemberId] INT NOT NULL,
[RegularId] INT NOT NULL,
CONSTRAINT [PK_dbo.RegularTrips] PRIMARY KEY CLUSTERED ([MemberId] ASC, [RegularId] ASC),
CONSTRAINT [FK_dbo.RegularTrips_dbo.Members_MemberId] FOREIGN KEY ([MemberId]) REFERENCES [dbo].[Members] ([Id]) ON DELETE CA... |
insert into `cat`
(`age`, `breed`, `cutie`, `full_name`, `colouring`)
values
2, Japanese Bobtail, True, Miyazaki, Grey
3, Japanese Bobtail Longhair, True, Musashi, White
2, Kurilian Bobtail, True, Kobayashi, Black
5, Japanese Bobtail, True, Hanako, Cream
3, Japanese Bobtail Longhair, True, Aiko, Smok... |
********************* T2 *********************
SET search_path TO film_industry,public;
// READ COMMITTED //
1 BEGIN transaction isolation level READ COMMITTED;
2 select * from casting;
3 select * from casting;
5 commit;
// REPEATABLE READ //
1 BEGIN transaction isolation level REPEATABLE READ;
2 select ... |
-- Create logs table
CREATE TABLE logs (
uid INTEGER PRIMARY KEY AUTOINCREMENT
NOT NULL
UNIQUE,
uuid VARCHAR (36) NOT NULL
DEFAULT ('00000000-0000-0000-0000-000000000000'),
timestamp TIMESTAMP NOT NULL
... |
<filename>novq3475_if18b.sql
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 22, 2021 at 07:56 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.2.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone =... |
<gh_stars>1-10
INSERT INTO public."Stream"
(name, local_name, length_mi, public_length_mi, centroid_latitude, centroid_longitude, has_brown_trout,
has_brook_trout, has_rainbow_trout, is_brown_trout_stocked, is_brook_trout_stocked,
is_rainbow_trout_stocked, huc_subregion, status_message, state... |
<reponame>valkyrienc/BusinessPlatformApps
SELECT Count(*) AS ExistingObjectCount
FROM
INFORMATION_SCHEMA.TABLES
WHERE
table_schema = 'pbist_twitter' AND
table_name IN ('configuration', 'date', 'tweets_processed', 'tweets_normalized', 'hashtag_slicer', 'mention_slicer', 'entity_graph', 'authorhashtag_graph',... |
<reponame>Meltrust/sql-zoo<gh_stars>1-10
-- 'SELECT from WORLD Tutorial'
-- 1
SELECT
name,
continent,
population
FROM
world;
--2
SELECT
name
FROM
world
WHERE
population > 200000000;
--3
SELECT
name,
gdp / population
FROM
world
WHERE
population > 200000000;
--4
SELECT
name,
population / 1000... |
CREATE TABLE `order` (
`id` INT NOT NULL AUTO_INCREMENT,
`seller_id` INT NULL,
`customer_id` INT NULL,
PRIMARY KEY (`id`));
CREATE TABLE `seller` (
`id` INT NOT NULL AUTO_INCREMENT,
`first_name` VARCHAR(60) NULL,
`last_name` VARCHAR(65) NULL,
PRIMARY KEY (`id`));
CREATE TABLE `customer` (
`id` INT N... |
-- file:plpgsql.sql ln:1796 expect:false
begin
x := x || '5678'
|
-- file:select_parallel.sql ln:122 expect:true
explain (analyze, timing off, summary off, costs off)
select count(*) from tenk1, tenk2 where tenk1.hundred > 1
and tenk2.thousand=0
|
<gh_stars>100-1000
INSERT INTO text (text_id, text_type, english, german, swiss_german, spanish) values ('Press', 'hint_desc','Press','Drücke die Taste','Druck d''Taste','Presiona');
INSERT INTO text (text_id, text_type, english, german, swiss_german, spanish) values ('Journal', 'hint','Journal','Tagebuch','Tagebuech'... |
SELECT run_num AS R, Lumi_section_num AS L, file_id AS cfid FROM {{.Owner}}.file_lumis fl
WHERE fl.file_id IN (SELECT file_id FROM {{.Owner}}.files f
inner join {{.Owner}}.blocks b on f.block_id = b.block_id
{{if .ChildLfnList}}
WHERE b.block_name = :block_name
AND f.logical_file_name I... |
-- 15.12.2016 16:53
-- URL zum Konzept
UPDATE AD_Column SET IsDLMPartitionBoundary='Y',Updated=TO_TIMESTAMP('2016-12-15 16:53:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=550378
;
-- 15.12.2016 16:53
-- URL zum Konzept
UPDATE AD_Column SET IsDLMPartitionBoundary='Y',Updated=TO_TIMESTAMP('2016-12-15 1... |
ALTER TABLE `SchedulerTriggerVO` ADD COLUMN `cron` varchar(32) DEFAULT NULL COMMENT 'interval in cron format';
CREATE TABLE IF NOT EXISTS `VolumeBackupVO` (
`uuid` VARCHAR(32) NOT NULL,
`name` VARCHAR(255) NOT NULL,
`description` VARCHAR(2048) DEFAULT NULL,
`volumeUuid` VARCHAR(32) NOT NULL,
`size`... |
INSERT INTO department (name)
VALUES
('Sales'),
('Engineering'),
('Finance'),
('HR');
INSERT INTO role (title, salary, department_id)
VALUES
('Sales Manager', 62000, 1),
('Sales Agent', 54000, 1),
('Lawyer', 70000, 4),
('HR Rep', 52000, 4),
('Accountant', 68000, 3),
('Engineer',... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 18-Dez-2017 às 05:28
-- Versão do servidor: 10.1.13-MariaDB
-- PHP Version: 5.6.23
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... |
<filename>medical-records-service/src/main/resources/data.sql
INSERT INTO MEDICAL_RECORDS (ID, PATIENT_NAME, ADMISSION_NOTES) VALUES(1, 'Tony', 'Tonys admission');
INSERT INTO MEDICAL_RECORDS (ID, PATIENT_NAME, ADMISSION_NOTES) VALUES(2, 'Tony', 'Tonys second admission'); |
<reponame>nathansutton/omop
--HINT DISTRIBUTE_ON_KEY(person_id)
CREATE TABLE condition_era
(
condition_era_id BIGINT NOT NULL,
person_id BIGINT NOT NULL,
condition_concept_id INTEGER NOT NULL,
condition_era_start_datetime TIMESTAMP NOT NULL,
condition_era_end_dat... |
<filename>src/oc_erchef/schema/revert/organizations.sql
-- Revert orgs table
BEGIN;
DROP TABLE IF EXISTS orgs;
COMMIT;
|
-- @testpoint: opengauss关键字rows(非保留),作为函数名,部分测试点合理报错
--关键字不带引号-成功
drop function if exists rows;
create function rows(i integer)
returns integer
as $$
begin
return i+1;
end;
$$ language plpgsql;
/
drop function if exists rows;
--关键字带双引号-成功
drop function if exists "rows";
create function "rows"(i integer)
returns in... |
-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 02-07-2016 a las 20:02:01
-- Versión del servidor: 5.6.17
-- Versión de PHP: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA... |
<reponame>trigyn-products/jquiver
SET FOREIGN_KEY_CHECKS=0;
REPLACE INTO jq_resource_bundle (resource_key, language_id, text) VALUES ('jws.action', 1, 'Action');
REPLACE INTO jq_resource_bundle (resource_key, language_id, text) VALUES ('jws.action', 2, 'Action');
REPLACE INTO jq_resource_... |
<reponame>alexanderalban/ACA-Capstone
DROP TABLE IF EXISTS users, userHighScore, user2FA, userDailyStreak, userLevelsComplete, userCharacter, characterHelmets, characterJumpSuits;
CREATE TABLE users (
id INT NOT NULL AUTO_INCREMENT,
username VARCHAR(50) NOT NULL,
email VARCHAR(50) NOT NULL,
PRIMARY KEY... |
<filename>postgres/init.sql
CREATE DATABASE IF NOT EXISTS shhh;
|
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Aug 24, 2021 at 12:04 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=@... |
--USE [SoftUni]
--SELECT [FirstName], [LastName], CHARINDEX('ei', [LastName]) FROM [Employees]
--I VARIANT
--SELECT [FirstName], [LastName] FROM [Employees]
--WHERE CHARINDEX('ei', [LastName]) <> 0
--II VARIANT
SELECT [FirstName], [LastName] FROM [Employees]
WHERE [LastName] LIKE '%ei%'
|
<gh_stars>0
CREATE TABLE [dbo].[Table]
(
[Id] VARCHAR(50) NOT NULL PRIMARY KEY,
[CountryName] NVARCHAR(MAX) NULL
)
|
/* Table Name: tblDraftRun */
/* Description: This table stores the results of each individual draft run. User ID */
/* is optional as this field is for authenticated users and anonymous */
/* draft simulations are also allowed.... |
<gh_stars>1-10
CREATE TABLE IF NOT EXISTS user_signup_email_verification( request_key VARCHAR(32) NOT NULL, email_address VARCHAR(255) NOT NULL, request_time DATETIME NOT NULL, PRIMARY KEY(request_key), UNIQUE(email_address))
SELECT * FROM '.$this->db->platform->quoteIdentifier('user_signup_email_verification'))->execu... |
<gh_stars>1-10
--#1
/*
How many stops are in the database.
*/
SELECT COUNT(*)
FROM stops
--#2
/*
Find the id value for the stop 'Craiglockhart'
*/
SELECT id
FROM stops
WHERE name = 'Craiglockhart'
--#3
/*
Give the id and the name for the stops on the '4' 'LRT' service.
*/
SELECT id, name
FROM stops
JOIN route ON ... |
--
-- Copyright (c) Microsoft Corporation. All rights reserved.
-- Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
--
---------------------------------------------------------------------------------------------------------------------------------
-- Users.sql
-- ... |
<filename>municipal-services/property-services/src/main/resources/db/migration/main/V20201118182658__alter_drop_constraint_ownerinfoouuid_.sql
ALTER TABLE eg_pt_owner DROP CONSTRAINT IF EXISTS pk_eg_pt_owner; |
DROP TABLE logs;
DROP TABLE log_types;
|
CREATE TABLE IF NOT EXISTS worships (
fk_leader_id serial,
FOREIGN KEY( fk_leader_id ) REFERENCES leaders( id ) ON DELETE CASCADE,
fk_courtier_id serial,
FOREIGN KEY( fk_courtier_id ) REFERENCES residents( id ) ON DELETE CASCADE,
PRIMARY KEY( fk_leader_id, fk_courtier_id )
);
|
<filename>Chapter10/10_taking_the_stream_to_the_variable_for_ext_script.sql
declare @stream varbinary(max) =
(select ModelStream from Models.ModelVersions where Id = 3) |
<gh_stars>1-10
CREATE VIEW vwCitas_SeleccionarTodos
AS
SELECT * FROM Citas
WHERE
Activo = 1 |
CREATE DATABASE IF NOT EXISTS `bd_filando` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
USE `bd_filando`;
-- MariaDB dump 10.19 Distrib 10.4.21-MariaDB, for Win64 (AMD64)
--
-- Host: 127.0.0.1 Database: bd_filando
-- ------------------------------------------------------
-- Server version 10.4.21-MariaDB
/*... |
<filename>database/seeders/sepomex/tabasco.sql
insert into aptoclickv2.catalogo_sepomex (colonia, municipio, estado, cp) values ('Portal del Agua','Centro','Tabasco','86012');
insert into aptoclickv2.catalogo_sepomex (colonia, municipio, estado, cp) values ('Villahermosa Centro','Centro','Tabasco','86012');
insert into... |
select
to_char(cast(matchStart as timestamp), 'fmhh:"00" AM'),
sum(kills) as kills,
sum(assists) as assists,
sum(deaths) as deaths,
sum(score) as score,
cast(avg(score) as number(18,2)) as avgScore,
cast(case when sum(timePlayed) > 0 then sum(score) / (sum(timePlayed) / 60) else 0 end as num... |
<reponame>hbs-rcs/sql-novice-survey
-- Create database to be used for learners.
-- The data for the database are available as CSV files.
-- For more information, see https://www.sqlite.org/cli.html#csv
-- Generate tables.
create table Person (id text, personal text, family text);
create table Site (id text, lat real, ... |
/*
* Copyright (C) 2020 <NAME>
*
* 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 in w... |
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 08, 2021 at 06:09 AM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 5.6.40
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
BEGIN;
CREATE TABLE IF NOT EXISTS metadata
(
CONSTRAINT pk PRIMARY KEY (video_id, mime, quality),
video_id TEXT,
title TEXT,
file_id TEXT,
mime TEXT,
quality TEXT,
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
... |
<filename>src/pgcluster/tool/tpc-b_like.sql
\setrandom aid 1 `100000 * $tps`
\setrandom bid 1 `1 * $tps`
\setrandom tid 1 `10 * $tps`
\setrandom delta 1 1000
BEGIN
UPDATE accounts SET abalance = abalance + :delta WHERE aid = :aid
SELECT abalance FROM accounts WHERE aid = :aid
UPDATE tellers SET tbalance = tbalance + :d... |
set search_path=bulk_msg,ml_app;
alter TABLE zeus_bulk_message_statuses
alter column message_id type varchar;
alter TABLE zeus_bulk_message_status_history
alter column message_id type varchar;
|
<reponame>OpenMPDK/SMDK<gh_stars>10-100
<configure-default.sql>
-- Run SELECT queries against Views, rather than Tables - the quick version,
-- running against a few of the defined views, randomly selected
--{@fromtables = "V_value[int:0,36;6]"}
-- First, INSERT some data; then run both the "basic" and "advanced" SEL... |
\parallel on 2
insert into tbl_insert_mpp_col select * from mpp_s;
insert into tbl_insert_mpp_col select * from mpp_s;
\parallel off
|
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.1.6
-- Dumped by pg_dump version 9.1.6
-- Started on 2012-11-13 09:01:57 BRST
SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
--
-- ... |
DROP TABLE IF EXISTS `auditlog`;
DROP TABLE IF EXISTS `stock`;
DROP TABLE IF EXISTS `category`;
DROP TABLE IF EXISTS `stock_category`;
CREATE TABLE `auditlog` (
`AUDIT_LOG_ID` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`ACTION` VARCHAR(100) NOT NULL,
`DETAIL` text NOT NULL,
`CREATED_DATE` DATE NOT NULL,
`... |
SELECT c.`country_name`, p.`elevation` AS 'highest_peak_elevation',
r.`length` AS 'longest_river_length' FROM countries AS c
LEFT JOIN mountains_countries AS mc
ON mc.`country_code` = c.`country_code`
LEFT JOIN peaks AS p
ON mc.`mountain_id` = p.`mountain_id`
LEFT JOIN countries_rivers AS cr
ON cr.`country_code` = c.`c... |
CREATE TABLE [dbo].[tbl_ActivityGroup]
(
[ActivityGroupId] INT NOT NULL PRIMARY KEY,
[ActivityGroupName] VARCHAR(150) NOT NULL,
[ActivityGroupDesc] VARCHAR(250) NULL,
[ActivityGroupBadge] VARCHAR(150) NULL,
[ActivityCount] INT NOT NULL,
[UserRoleId] INT NOT NULL,
[UserRole] VAR... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.