sql stringlengths 6 1.05M |
|---|
-- Database: asany
-- Change Parameter: sequenceName=seq_id
CREATE SEQUENCE seq_id;
|
SET optimize_on_insert = 0;
DROP TABLE IF EXISTS data_01285;
SET max_threads=1;
CREATE TABLE data_01285 (
key Int,
value SimpleAggregateFunction(max, Nullable(Int)),
INDEX value_idx assumeNotNull(value) TYPE minmax GRANULARITY 1
)
ENGINE=AggregatingMergeTree()
ORDER BY key;
SELECT 'INSERT';
INSERT IN... |
--
-- add article link
--
ALTER TABLE `articlerequest` ADD `article_idfs` INT(11) NOT NULL DEFAULT '0' AFTER `Articlerequest_ID`;
INSERT INTO `core_form_field` (`Field_ID`, `type`, `label`, `fieldkey`, `tab`, `form`, `class`, `url_view`, `url_list`, `show_widget_left`, `allow_clear`, `readonly`, `tbl_cached_name`, `tbl... |
CREATE TYPE edit_status AS ENUM ('STAGING', 'PRODUCTION');
CREATE TYPE approval_status AS ENUM ('PENDING', 'ACCEPTED', 'DENIED');
CREATE TYPE application_platform AS ENUM ('ANDROID', 'IOS');
CREATE TYPE application_status AS ENUM ('DEVELOPMENT', 'REVIEW', 'PRODUCTION');
CREATE TABLE module_config (
"id" SERIAL NOT... |
-- @testpoint: opengauss关键字deallocate(非保留),作为索引名,部分测试点合理报错
--前置条件,创建一个表
drop table if exists deallocate_test;
create table deallocate_test(id int,name varchar(10));
--关键字不带引号-成功
drop index if exists deallocate;
create index deallocate on deallocate_test(id);
drop index deallocate;
--关键字带双引号-成功
drop index if exists "... |
<filename>db/schema.sql
DROP DATABASE IF EXISTS trackerDB;
CREATE DATABASE trackerDB;
USE trackerDB;
CREATE TABLE department (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(30)
);
CREATE TABLE role (
id INT AUTO_INCREMENT PRIMARY KEY,
title VARCHAR(30),
salary DECIMAL,
department_id INT,
constraint FK_department FO... |
<filename>websolves_ecomstore.sql
-- phpMyAdmin SQL Dump
-- version 4.9.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Feb 20, 2021 at 11:07 AM
-- Server version: 10.3.27-MariaDB
-- PHP Version: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET ti... |
<reponame>johnhalbert/appointments-app
CREATE DATABASE IF NOT EXISTS `appointments` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `appointments`;
-- MySQL dump 10.13 Distrib 5.6.19, for osx10.7 (i386)
--
-- Host: localhost Database: appointments
-- ------------------------------------------------------
-- Server ver... |
select
job_file."JobId",
job_file."FileName",
job_file."IsParent" as "IsParentFile",
job_file."ProtocolUsed",
job_file."SuccessFlag",
job_file."FileType",
job_file."LumiRanges",
job_file."StrippedFiles",
job_block."BlockId",
job_block."StrippedBlocks",
data_block."BlockName",
input_collection."InputColle... |
-- MySQL Script generated by MySQL Workbench
-- Mon Nov 1 19:59:01 2021
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ON... |
CREATE OR REPLACE FUNCTION count_priv_of_table (tbl_name text)
RETURNS integer
AS $$
query = 'SELECT COUNT(table_name) count_priv FROM information_schema.table_privileges WHERE table_name like \'%s\' ' % tbl_name;
plan = plpy.prepare(query)
result_count_priv = plpy.execute(plan)
return result_count_priv[0]['... |
-- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Tempo de geração: 07/07/2015 às 22:26
-- Versão do servidor: 5.6.21
-- Versão do PHP: 5.6.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... |
/*
-- Query: SELECT * FROM narwhal.user
LIMIT 0, 1000
-- Date: 2018-08-01 21:50
*/
<<<<<<< HEAD:Database Script/user table sample data.sql
INSERT INTO `user` (`userID`,`name`,`password`,`adminNumber`,`gender`,`dob`,`address`,`email`,`mobile`,`role`) VALUES (1,'Jon','$2y$10$b/e8CC5mS7k6KUm5WQST7OE1CKITHseMmhC7orDpnp8oQ... |
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 05, 2019 at 12:12 PM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.3.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
create table departments(
dept_id int(10) auto_increment,
name varchar(30) unique,
dept_code varchar(20),
constraint department_pk
primary key(dept_id));
create table hashtags(
tag_id int(10) auto_increment,
tag varchar(30) unique,
constraint hashtags_pk
primary key(tag_id));
create table people(
people_id varch... |
<reponame>Raquel-Fernandes/P21
-- Adminer 4.7.7 MySQL dump
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
DROP TABLE IF EXISTS 'func_employee';
CREATE TABLE 'func_employee' (
'ds_tax_document_cpf' varchar(11) NOT NULL,
'ds_full_name' varchar(255... |
<filename>conf/evolutions/default/41.sql
# --- !Ups
INSERT INTO version VALUES ('6.3.0', now(), 'Adds a computer vision ground truth tool for admins.');
# --- !Downs
DELETE FROM version WHERE version_id = '6.3.0';
|
<gh_stars>10-100
-- file:subselect.sql ln:9 expect:true
SELECT 1 AS zero WHERE 1 IN (SELECT 2)
|
-- file:numeric.sql ln:456 expect:true
INSERT INTO num_exp_log10 VALUES (6,'4.97267288886207207671')
|
<gh_stars>1000+
-- Function: public.update_ad_element_trl_from_ad_tab_trl(numeric, numeric)
-- DROP FUNCTION IF EXISTS public.update_ad_element_trl_from_ad_tab_trl(numeric, numeric);
CREATE OR REPLACE FUNCTION public.update_ad_element_trl_from_ad_tab_trl(ad_element_id numeric, ad_tab_id numeric)
RETURNS void AS
$BO... |
INSERT INTO tournaments (name) VALUES ('test tournament');
INSERT INTO participants (name) VALUES ('tom');
INSERT INTO participants (name) VALUES ('paul');
INSERT INTO participants (name) VALUES ('frank');
INSERT INTO participants (name) VALUES ('judith');
INSERT INTO participants (name) VALUES ('sarah');
INSERT INTO p... |
select cohort_id, is_outcome
into #cohorts
FROM (
@cohortInserts
) C
;
with cteCohortCombos (target_id, outcome_id) as
(
select t.cohort_id as target_id, o.cohort_id as outcome_id
FROM #cohorts t
CROSS JOIN #cohorts o
where t.is_outcome = 0 and o.is_outcome = 1
),
cteCohortData(target_id, outcome_id, subjec... |
select arn, destination_id
from aws_guardduty_publishing_destination
where akas::text = '["{{ output.resource_aka.value }}"]'; |
use veritabani;
go
create procedure sp_belirli_subedeki_belirli_salonun_koltuklarini_listeleme
@sube_id int,
@salon_sube_id int
as
begin
select sube_adi,salon_adi,koltuk_adi from tbl_subeler join tbl_salonlar on salon_sube_id=sube_id inner join tbl_koltuk on koltuk_salon_id=salon_id where @sube_id=sube_id and... |
<reponame>MCZbase/DDL
CREATE OR REPLACE TRIGGER "TRG_KEY_SHIPMENT"
BEFORE INSERT OR UPDATE ON shipment
FOR EACH ROW
BEGIN
if :new.shipment_id is null then
select sq_shipment_id.nextval into :new.shipment_id from dual;
end if;
end;
ALTER TRIGGER "TRG_KEY_SHIPMENT" ENABLE |
<filename>app-backend/db/src/main/resources/migrations/V1__Baseline_schema_migration.sql
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.6.8
-- Dumped by pg_dump version 11.2
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';... |
--
-- Add platform domains column to organisation table
--
ALTER TABLE organisation ADD COLUMN domains character varying(255);
--
-- Set a default domain.
--
UPDATE organisation SET domains = 'COMMON;PUBLIC_LIGHTING;TARIFF_SWITCHING;';
--
-- Create NOT NULL constraint for this added column.
--
ALTER TABLE organisa... |
ALTER TABLE crates_categories ADD CONSTRAINT fk_crates_categories_category_id FOREIGN KEY (category_id) REFERENCES categories (id) ON DELETE CASCADE; |
<reponame>AirPageInc/pg-utils
-- Verify schemas/app_jobs/tables/jobs/alterations/enable_row_level_security on pg
BEGIN;
SELECT verify_security ('app_jobs.jobs');
ROLLBACK;
|
--
-- Current Schema CREATE statements go here
--
-- \Stationer\Barrel\models\ConfigLog
DROP TABLE IF EXISTS `ConfigLog`;
CREATE TABLE IF NOT EXISTS `ConfigLog` (
`configlog_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`created_uts` int(10) unsigned NOT NULL DEFAULT 0,
`updated_dts` timestamp NOT NULL D... |
\unset ECHO
\i test/setup.sql
SELECT plan(84);
--SELECT * FROM no_plan();
-- This will be rolled back. :-)
SET client_min_messages = warning;
CREATE TABLE public.users(
nick text NOT NULL PRIMARY KEY,
pass text NOT NULL
);
CREATE FUNCTION public.hash_pass() RETURNS TRIGGER AS '
BEGIN
NEW.pass := MD5( NE... |
<reponame>jeffreypolk/FF
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
CREATE TABLE [FF].[NFLTeam](
[Location] [varchar](50) NULL,
[Name] [varchar](50) NULL,
[Code] [varchar](50) NULL,
[Bye] [int] NULL,
[Rank] [int] NULL,
[Inception] [int] NULL
) ON [PRIMARY]
GRANT DELETE ON [FF].[NFLTeam] TO [DataUser] AS [dbo]
GR... |
<gh_stars>0
CREATE DATABASE IF NOT EXISTS `minimarketDB` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci */;
USE `minimarketDB`;
-- MariaDB dump 10.17 Distrib 10.4.13-MariaDB, for Linux (x86_64)
--
-- Host: 127.0.0.1 Database: minimarketDB
-- ------------------------------------------------------... |
<reponame>JoseLourenc0/SIProject<gh_stars>0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
CREATE TABLE `tb_state` (
`id` int(11) NOT NULL,
`state` tinyint(1) NOT NULL,
`dh` datetime NOT NULL,
`timeesp` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_uni... |
<filename>v5_ui_router/src/dbscripts/queries.sql
/* get regions */
SELECT * FROM coffees.geo_region LIMIT 1000;
/*get area */
SELECT * FROM coffees.area;
/*get countries */
Select * from coffees.country;
/*get profiles */
Select * from coffees.power_profile;
/*get raw roast data */
Select * from coffees.roast;
/*g... |
<gh_stars>0
\c postgres
-- drop database sigmafacyt;
\i SigmaUc.sql |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 11 Nov 2020 pada 13.19
-- Versi server: 10.4.13-MariaDB
-- Versi PHP: 7.4.8
SET SQL_MODE
= "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone
= "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH... |
drop table if exists Items;
drop table if exists Orders;
drop table if exists Customer;
drop table if exists Locations;
create table Customer
(
Username nvarchar(80) primary key,
Name nvarchar(80)
);
create table Locations
(
LocationId int identity primary key,
LocationName nvarchar(80),
LocationAddress nvarc... |
DROP DATABASE IF EXISTS ninjawarrior_db;
CREATE DATABASE ninjawarrior_db;
USE ninjawarrior_db;
CREATE TABLE ninjaTables
(
id int NOT NULL AUTO_INCREMENT,
username varchar (255) NOT NULL,
score INTEGER,
PRIMARY KEY(id),
createdAt DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
update... |
INSERT INTO states (initials, name, id, country_id)
VALUES ('AC', 'ACRE', 12,1058);
INSERT INTO states (initials, name, id, country_id)
VALUES ('AL', 'ALAGOAS', 27,1058);
INSERT INTO states (initials, name, id, country_id)
VALUES ('AM', 'AMAZONAS', 13,1058);
INSERT INTO states (in... |
SELECT * FROM Cars
SELECT * FROM Drivers
SELECT * FROM Cars
JOIN Drivers ON Drivers.Id = Cars.DriverId
SELECT c.Id,c.Name, d.Name FROM Cars AS c
JOIN Drivers AS d ON d.Id = c.DriverId
--PROBLEM
SELECT * FROM Mountains
SELECT * FROM Peaks
SELECT m.MountainRange,
p.PeakName,
p.Elevation FROM Mountains AS m
JOIN Pea... |
<reponame>Xeinaemm/Xeinaemm.Standard<gh_stars>1-10
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_JOB_DETAILS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1)
BEGIN
CREATE TABLE [dbo].[QRTZ_JOB_DETAILS] (
[SCHED_NAME] [NVARCHAR] (120) NOT NULL ,
[JOB_NAME] [NVARCHAR] (150) NOT NU... |
<reponame>RuriWijaya97/pemira-polimedia-2019
-- phpMyAdmin SQL Dump
-- version 4.9.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Oct 10, 2020 at 09:22 PM
-- Server version: 10.3.24-MariaDB-cll-lve
-- PHP Version: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START ... |
/****************************************************************************************
--Is there a way to increase performance for this query ?
--And what if your Dataset is bigger than 10GB ?
--Tips:
https://docs.microsoft.com/en-us/azure/synapse-analytics/sql-data-warehouse/performance-tuning-result-set-caching... |
CREATE TABLE [dbo].[Country]
(
[CountryId] BIGINT NOT NULL CONSTRAINT PK_Country PRIMARY KEY IDENTITY,
[Name] NVARCHAR(50) NOT NULL,
[ISOCode] NVARCHAR(4) NOT NULL
)
GO
CREATE UNIQUE INDEX [UI_Country_Name] ON [dbo].[Country] ([Name])
GO
CREATE UNIQUE INDEX [UI_Country_ISOCode] ON [dbo].[Country] ([ISOCode])
|
<filename>db/migrate/000383_driver_info_changes.sql
CREATE TABLE `driver_info_change_set` (
`id_driver_info_change_set` int(11) unsigned NOT NULL AUTO_INCREMENT,
`id_driver_info` int(11) unsigned DEFAULT NULL,
`timestamp` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`id_admin` int(11) unsigned DEFAULT NULL,
PRIM... |
<reponame>Shuttl-Tech/antlr_psql<filename>src/test/resources/sql/insert/240e82af.sql
-- file:macaddr.sql ln:19 expect:true
INSERT INTO macaddr_data VALUES (12, '08:00:2a:01:02:03')
|
<filename>src/test/resources/sql/select/4cdec901.sql<gh_stars>10-100
-- file:line.sql ln:42 expect:true
SELECT point '(-1,1)' <-> line '[(-3,0),(-4,0)]'
|
<filename>src/hg/lib/defaultDb.sql<gh_stars>100-1000
# defaultDb.sql was originally generated by the autoSql program, which also
# generated defaultDb.c and defaultDb.h. This creates the database representation of
# an object which can be loaded and saved from RAM in a fairly
# automatic way.
#Description of annota... |
select distinct(en_2010_2020.id),
ds.times_cited
from oecd.en_2010_2020 en_2010_2020
inner join analysis_friendly.cset_gold_all_dimensions_publications ds on ds.id = en_2010_2020.id
where en_2010_2020.dataset = 'ds'
|
<gh_stars>10-100
-- SmartAI Xariona
-- By mikadmin for Arkania
-- Xariona
SET @ENTRY := 50061;
SET @SOURCETYPE := 0;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=@SOURCETYPE;
UPDATE creature_template SET AIName="SmartAI" WHERE entry=@ENTRY LIMIT 1;
INSERT INTO `smart_scripts` (`entryorguid... |
<filename>misc/drop-schema.sql
--
-- Drop all tables in th schema.
--
-- author: <NAME>
--
DROP TABLE ord_item;
DROP TABLE ord;
DROP TABLE bankaccount;
DROP TABLE ccard;
DROP TABLE account;
DROP TABLE product;
|
-- MySQL dump 10.13 Distrib 8.0.13, for Win64 (x86_64)
--
-- Host: localhost Database: sharebook
-- ------------------------------------------------------
-- Server version 8.0.13
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/... |
-- +migrate Up
ALTER TABLE users ADD COLUMN password_digest TEXT NOT NULL DEFAULT('password');
|
<gh_stars>1-10
# --- !Ups
ALTER TABLE password_info RENAME COLUMN user_id TO hasher;
|
IF OBJECT_ID('auth.get_apps') IS NOT NULL
DROP FUNCTION auth.get_apps;
GO
CREATE FUNCTION auth.get_apps(@user_id integer, @office_id integer)
RETURNS @result TABLE
(
app_id integer,
app_name national character varying(500),
i18n_key national character varying(500),
n... |
INSERT INTO movie VALUES (1,788918400000,'Toy Story (1995)','1995-01-01 00:00:00',NULL,'http://us.imdb.com/M/title-exact?Toy%20Story%20(1995)');
INSERT INTO movie VALUES (2,788918400000,'GoldenEye (1995)','1995-01-01 00:00:00',NULL,'http://us.imdb.com/M/title-exact?GoldenEye%20(1995)');
INSERT INTO movie VALUES (3,78... |
<gh_stars>1-10
-- Upgrade MetaStore schema from 2.1.0 to 2.1.1000
-- RUN '038-HIVE-10562.derby.sql';
-- Step 1: Add the column for format
ALTER TABLE "APP"."NOTIFICATION_LOG" ADD "MESSAGE_FORMAT" varchar(16);
-- Step 2 : Change the type of the MESSAGE field from long varchar to clob
ALTER TABLE "APP"."NOTIFICATION_LO... |
<filename>Pipelines/scripts/update_bi_tables.sql
DROP TABLE IF EXISTS river_name;
CREATE TEMP TABLE river_name AS
SELECT bi_temp.campaign_river.river_name
FROM bi_temp.campaign_river
WHERE
id_ref_campaign_fk IN (SELECT campaign_id FROM bi_temp.pipeline_to_compute);
DELETE FROM
bi.campaign
WHERE id IN (SELECT c... |
--
-- Reset Tag
--
DELETE FROM `Tag`;
INSERT INTO `Tag` (`name`) VALUES
("Nintendo"),
("Half Life 3"),
("Alyx"),
("Mario"),
("Mushrooms"),
("Resdient Evil 2"),
("Zelda"),
("The last of us"),
("The last of us part 2"),
("GOTY")
;
|
-- phpMyAdmin SQL Dump
-- version 4.9.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: May 31, 2020 at 06:02 AM
-- Server version: 10.3.16-MariaDB
-- PHP Version: 7.3.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SE... |
--------------------------tipos de dados-------------------------
-- Booleanos
-- Por padrão é inicializado como nulo, pode receber tanto 1 ou 0 BIT
-- Caracteres
--- Tamanho fixo - char // permite inserir até uma quantidade fixa de caracters e sempre ocupa todo espaço reservado 10/50
-- Tamanhos variáveis - varchar ... |
INSERT INTO `user` (`user_id`, `pass_word`, `roles`, `scopes`)VALUES ('appuser', 'appusersecret', 'USER', 'resource.read resource.write');
INSERT INTO `client` (`client_id`, `client_secret`, `redirect_url`, `scopes`, `authorized_grant_types`)VALUES ('webappclient', 'webappclientsecret', 'http://localhost:9180/callback... |
PARAMETERS FiscalYearArgs Text ( 255 ), RcCodeArgs Text ( 255 ), FundCodeArgs Text ( 255 );
SELECT PayrollObligations.BFY, PayrollObligations.AhCode AS [AH Code], PayrollObligations.FundCode AS [Fund Code], PayrollObligations.AccountCode AS AccountCode, PayrollObligations.RcCode AS RcCode, Divisions.Title AS DivisionNa... |
ALTER TABLE photos DROP added_at datetime; |
<filename>labs/UNIT_06_LAB/Blogger/Blogger.Database/Tables/BlogPostPhotos.sql
CREATE TABLE [dbo].[BlogPostPhotos]
(
[BlogPostId] INT NOT NULL,
[PhotoId] INT NOT NULL,
PRIMARY KEY ([BlogPostId],[PhotoId]),
FOREIGN KEY ([PhotoId]) REFERENCES [Photos] ([PhotoId])
)
|
-- Aggregated Wait States.
-- Identifies bottlenecks within Azure SQL Database
-- Expected wait states are omitted from view
-- Data collection nature: Cumulative. Though the proportions are usable without delta tracking.
WITH [TempWaitStates] AS (
SELECT
ROW_NUMBER() OVER (ORDER BY [wait_time_ms] DESC) AS [Ro... |
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jan 14, 2019 at 08:00 AM
-- Server version: 5.7.23
-- PHP Version: 7.2.10
--
-- Database: `belajar_laravel`
--
-- --------------------------------------------------------
--
-- Table structure for ta... |
-- phpMyAdmin SQL Dump
-- version 4.0.10.7
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jul 10, 2016 at 11:14 PM
-- Server version: 5.5.45-cll-lve
-- PHP Version: 5.4.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_... |
BEGIN;
CREATE SCHEMA IF NOT EXISTS balancer_v2;
DROP MATERIALIZED VIEW IF EXISTS balancer_v2.view_liquidity;
CREATE MATERIALIZED VIEW balancer_v2.view_liquidity AS (
WITH pool_labels AS (
SELECT
address AS pool_id,
name AS pool_symbol
FROM
(
SEL... |
-- Connect to the 'SoftUni' database to run this snippet
USE [SoftUni]
GO
-- Create a view 'V_EmployeesHiredAfter2000'
CREATE VIEW [V_EmployeesHiredAfter2000] AS
-- Select the first and last names from 'Employees'
-- where the hire year is after 2000
SELECT [FirstName]
, [LastName]
FROM [Employees]
WHERE DATEPART... |
-- Adds default values to movieinfo columns.
UPDATE movieinfo SET tmdbid = 0 WHERE tmdbid IS NULL;
ALTER TABLE movieinfo MODIFY tmdbid INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE movieinfo MODIFY title VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE movieinfo MODIFY tagline VARCHAR(1024) NOT NULL DEFAUL... |
<reponame>dram/metasfresh
-- 2019-05-02T13:30:53.891
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE C_UOM SET IsActive='N', Description='Please don''t use this UOM (anymore). Instead, please use the "Hour" UOM with ID=101',Updated=TO_TIMESTAMP('2019-05-02 13:30:53','YYYY-MM-DD HH24:MI:SS'),Upd... |
<filename>coeus-db/coeus-db-sql/src/main/resources/org/kuali/coeus/coeus-sql/current_mysql/5.0.1/tables/KC_TBL_BUD_FORMULATED_COST_DETAIL.sql
DELIMITER /
CREATE TABLE BUD_FORMULATED_COST_DETAIL (
BUD_FORMULATED_COST_DETAIL_ID DECIMAL(12,0) NOT NULL,
BUDGET_DETAILS_ID DECIMAL(12,0) NOT NULL,
FORMULATED_NU... |
{{config(enabled = target.type == 'snowflake')}}
{% if var("crm_warehouse_company_sources") %}
{% if 'harvest_projects' in var("crm_warehouse_company_sources") %}
WITH source AS (
{{ filter_stitch_relation(relation=var('stg_harvest_projects_stitch_companies_table'),unique_column='id') }}
),
renamed as (
SELECT
... |
<filename>DevOps/mariadb/sql/tables/country.sql
DROP TABLE IF EXISTS moviestoredb.country;
CREATE TABLE moviestoredb.country (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL,
`updated` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`iso3166_id` bigi... |
CREATE PROCEDURE [bca].[sp_run_multiyear_processor] @analysis_id INT
WITH EXECUTE AS CALLER
AS
SET NOCOUNT ON;
DECLARE
@year_start integer
,@year_present integer
,@year_intermediate_1 integer
,@year_intermediate_2 float
,@year_intermediate_3 float
,@year_intermediate_4 float
,@year_intermedi... |
<gh_stars>0
-- @testpoint: opengauss关键字scale非保留),作为索引名,部分测试点合理报错
--前置条件,创建一个表
drop table if exists explain_test;
create table explain_test(id int,name varchar(10));
--关键字不带引号-成功
drop index if exists scale;
create index scale on explain_test(id);
drop index scale;
--关键字带双引号-成功
drop index if exists "scale";
create ind... |
--
-- Name: errors; Type: TABLE; Schema: public; Owner: millerkonsult_supreme
--
CREATE TABLE errors (
id integer NOT NULL,
body jsonb,
column_number integer,
date_created timestamp with time zone DEFAULT now() NOT NULL,
description text,
details jsonb,
filename text,
ip text,
line... |
<reponame>vishal-bluesys/laraveljosh
-- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 30, 2017 at 11:45 AM
-- Server version: 5.7.14
-- PHP Version: 7.0.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER... |
CREATE TABLE [dbo].[EmailPlaceholder]
(
[Id] INT IDENTITY(1,1) NOT NULL,
[EmailHistoryId] INT NOT NULL,
[Key] VARCHAR(50) NOT NULL,
[Value] NVARCHAR(MAX) NOT NULL,
[CreatedOn] DATETIME2 NOT NULL DEFAULT getutcdate(),
[CreatedBy] NVARCHAR(50) NULL,
[ModifiedOn] DATETIME2 NULL,
[ModifiedBy] NVARCHAR(50) N... |
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Mar 13, 2019 at 04:09 PM
-- Server version: 5.7.23
-- PHP Version: 7.2.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `ks1reading`
--
-- -------------------------... |
USE master
GO
CREATE DATABASE BookLibrary ON PRIMARY
( NAME = N'BookLibrary_Data', FILENAME = N'D:\Courses\Data\BookLibrary_Data.mdf' , SIZE = 167872KB , MAXSIZE = UNLIMITED, FILEGROWTH = 16384KB )
LOG ON
( NAME = N'BookLibrary_Log', FILENAME = N'D:\Courses\Data\BookLibrary_Log.ldf' , SIZE = 2048KB , MAXSIZE = 2... |
insert into public.currencies (id, code, name) values (1, ' USD', ' US Dollar');
insert into public.currencies (id, code, name) values (2, ' EUR', ' Euro');
insert into public.currencies (id, code, name) values (3, ' UAH', ' Hryvnia');
insert into public.currencies (id, code, name) values (4, ' GBP', ' Pound Sterling')... |
<filename>erase-on-point-data.sql<gh_stars>1-10
GO
SET NOCOUNT ON
--------ПОДГОТОВИТЕЛЬНЫЕ ДЕЙСТВИЯ---------------------------------------------------------------------------------------------------------------
declare @bdname nvarchar(max) = N'Test_Base', -- Имя базы данных в MSSQL, в которой будем производить обр... |
<reponame>rhomicom-systems-tech-gh/Rhomicom-DB-Scripts<filename>ORACLE_SQL/SHARED_TABLES/26_WKF/DATA/26T004D_wkf.wkf_apprvr_groups.sql
/* Formatted on 12-20-2018 1:38:29 PM (QP5 v5.126.903.23003) */
/*
"C:\Program Files (x86)\pgAdmin 4\v3\runtime\pg_dump" --host localhost --port 5432 --username postgres --verbose --tab... |
INSERT INTO stock_price VALUES ('sfgat',0,7,3.05,3.05,3.05,3.05,3.05,3.05,3.05,3.12,3,1753,5346.65),('sfgat',1,1,3.05,3.05,3.05,3.0,3.05,3.05,2.95,3.05,7,27647,85411.45),('sfgat',2,2,3.02,3.05,3.15,3.0,3.05,3.0,3.0,3.13,3,295,890.3),('sfgat',3,3,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.15,3,1000,3000.0),('sfgat',4,4,3.0,3.0,3.0,3... |
<filename>evo-X-Scriptdev2/sql/Updates/0.0.3/r1074_scriptdev2.sql
UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 7810+) ';
|
USE ojonah;
ALTER DATABASE ojonah CHARACTER SET utf8 COLLATE utf8_unicode_ci;
DROP TABLE IF EXISTS registration;
DROP TABLE IF EXISTS course;
DROP TABLE IF EXISTS student;
CREATE TABLE student(
studentId BINARY(16) NOT NULL,
studentFirstName VARCHAR (30) NOT NULL,
studentLastName VARCHAR (30) NOT NULL,
INDEX (stud... |
/*
Pod Events represents state changes for each JobID + InstanceID.
Terminology
Run: Represents an execution cycle for a pod from non-terminal states to RUNNING/terminal state
which has same run_id. Here non-terminal state must start with INITIALIZED (Peloton state) & TASK_STAGING (Mesos state).
Examples for a `run` a... |
<reponame>xzilla/pg_jobmon<gh_stars>100-1000
-- Make column names in job_status_text table more consistent with the check_job_status() function return column names.
-- Fix check_job_status() returning extra spaces and ; in the alert_text when a job has failed
-- Fix check_job_status() to use alert_text value for code 3... |
<filename>ykksm-db.sql
create table yubikeys (
-- identities:
serialnr int not null,
publicname varchar(16) unique not null,
-- timestamps:
created varchar(24) not null,
-- the data:
internalname varchar(12) not null,
aeskey varchar(32) not null,
lockcode varchar(12) not null,
-- key creator, typ... |
<reponame>pereztr5/cyboard
DROP SCHEMA IF EXISTS cyboard CASCADE;
|
-- Problem 1
CREATE TABLE flights (
year INT,
month INT,
dayOfMonth INT,
dayOfWeek INT,
actualDepartureTime INT,
scheduledDepartureTime INT,
arrivalArrivalTime INT,
scheduledArrivalTime INT,
uniqueCarrierCode TEXT,
flightNumber INT,
tailNumber TEXT,
actualElapsedTime IN... |
-- MySQL dump 10.19 Distrib 10.3.31-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: db_gstore
-- ------------------------------------------------------
-- Server version 10.3.31-MariaDB-0+deb10u1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SE... |
<reponame>LeoIta/SpringRestApi
DROP TABLE IF EXISTS PRODUCT;
CREATE TABLE PRODUCT (
ID INT AUTO_INCREMENT PRIMARY KEY,
NAME VARCHAR(250) NOT NULL,
PRICE DOUBLE NOT NULL
); |
<filename>docs/ManualTesting/CheckDatabase.sql
select * from Mobiles.Customers;
select * from Mobiles.Mobiles;
select * from Mobiles.Orders;
select * from SimCards.Orders;
select * from ExternalSimCardsProvider.Orders;
select * from MobileTelecomsNetwork.Orders;
select * from ExternalMobileTelecomsNetwork.Orders; |
create table criteria
(
id serial not null
constraint criteria_pkey
primary key,
price double precision,
quantity_in_stock integer,
delivery_time integer,
number_of_clients integer,
provider_lifetime integer
);
alter table criteria
owner to cis;
create table provid... |
CREATE TABLE `dosen` (
`id_ptk` varchar(255) NOT NULL,
`id_blob` varchar(255) DEFAULT NULL,
`id_ikatan_kerja` varchar(1) DEFAULT NULL,
`nm_ptk` varchar(60) DEFAULT NULL,
`nidn` varchar(10) DEFAULT NULL,
`secreet_key` varchar(255) DEFAULT NULL,
`nip` varchar(18) DEFAULT NULL,
`jk` varchar(1) DEFAULT NULL... |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 19, 2019 at 09:01 AM
-- Server version: 10.1.28-MariaDB
-- PHP Version: 7.1.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.