sql stringlengths 6 1.05M |
|---|
<gh_stars>0
๏ปฟ-- [Report].[EFAFundingClaimReportSummary] table
IF OBJECT_ID('[Report].[EFAFundingClaimReportSummary]') IS NOT NULL
BEGIN
DROP TABLE [Report].[EFAFundingClaimReportSummary]
END
CREATE TABLE [Report].[EFAFundingClaimReportSummary] (
[PrvRetentFactHist] DECIMAL(10,5),
[ProgWeightHist] DECIMAL(10,5),... |
<filename>us-governors/data/us-governors.sql
INSERT INTO `us-governors` (`state_name`, `state_name_slug`, `state_code`, `state_code_slug`, `votesmart`, `title`, `party`, `name`, `name_slug`, `first_name`, `middle_name`, `last_name`, `name_suffix`, `goes_by`, `pronunciation`, `gender`, `ethnicity`, `religion`, `openly_l... |
SELECT "TableroSistemaPenal_6"."AUDIENCIA" AS "AUDIENCIA", SUM(CAST("TableroSistemaPenal_6"."Number of Records" AS BIGINT)) AS "sum:Number of Records:ok", CAST(EXTRACT(YEAR FROM "TableroSistemaPenal_6"."FECHA AUDIENCIA") AS BIGINT) AS "yr:FECHA AUDIENCIA:ok" FROM "TableroSistemaPenal_6" WHERE (("TableroSistemaPenal... |
<filename>src/sql/207.sql
ALTER TABLE `blockchains` ADD `processed_my_addresses_to_block` INT NULL DEFAULT NULL AFTER `is_rpc_mining`;
ALTER TABLE `blockchains` ADD `coinbase_maturity` INT NULL DEFAULT NULL AFTER `processed_my_addresses_to_block`; |
<reponame>Shuttl-Tech/antlr_psql<gh_stars>10-100
-- file:polygon.sql ln:39 expect:true
SELECT '' AS four, p.*
FROM POLYGON_TBL p
WHERE p.f1 &< '(3.0,1.0),(3.0,3.0),(1.0,0.0)'
|
{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }}
-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type
select
_airbyte_unnest_alias_hashid,
cast(ab_id as {{ dbt_utils.type_bigint() }}) as ab_id,
cast(owner as {{ type_json() }}) as owner... |
<gh_stars>1000+
create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB1" as (
-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON ... |
UPDATE pp_order_node n
SET name=wfn.name
FROM ad_wf_node wfn
WHERE wfn.ad_wf_node_id = n.ad_wf_node_id
;
|
update phenodcc_media.media_file, phenodcc_media.file_extension, phenodcc_raw.SERIESMEDIAPARAMETERVALUE
set phenodcc_raw.SERIESMEDIAPARAMETERVALUE.URI = concat('http://images.mousephenotype.org/src/', cid,'/', lid,'/', gid,'/', sid,'/', pid,'/', qid,'/', media_file.id,'.', extension)
where phenodcc_raw.SERIESMEDIAPARAM... |
<gh_stars>0
use schoolrulessystem;
### userinfo ###
INSERT INTO userinfo VALUES(2015117018, 'ๆ้็', 1, 'ไฟกๆฏ็ฎก็ไธไฟกๆฏ็ณป็ป๏ผ้่ไฟกๆฏ็ฎก็๏ผ', 2015, 'ไฟกๆฏ็ฎก็ไธไฟกๆฏ็ณป็ป', '่ฎก็ฎๆบไธไฟกๆฏๅทฅ็จๅญฆ้ข');
INSERT INTO userinfo VALUES(3903150332, '่ๅก', 1, 'ๅทฅ็จ่ฏ้ช็ญ1503', 2015, '่ฝฏไปถๅทฅ็จ', '่ฝฏไปถๅญฆ้ข');
INSERT INTO userinfo VALUES(3903150326, 'ๆๆถๆฑ', 1, 'ๅทฅ็จ่ฏ้ช็ญ1503', 2015, '่ฝฏไปถๅทฅ็จ', ... |
INSERT INTO BOOKS (NAME, AUTHOR, PRINT_YEAR, IS_READ)
VALUES ('Thinking In Java 4 Edition', '<NAME>', 2017, TRUE),
('Pro Spring', '<NAME>, <NAME>, <NAME>', 2014, FALSE);
|
-- ----------------------------------------------------------------------
-- ๆฅ่ฏข่กจๅ ็จ็ๅ
ๅญ
-- ----------------------------------------------------------------------
USE information_schema;
SELECT CONCAT(ROUND(SUM(DATA_LENGTH/1024/1024), 2), 'MB') DATA FROM TABLES;
SELECT TABLE_NAME, CONCAT(ROUND(DATA_LENGTH/1024/1024, 2), ... |
<reponame>twelvet-s/twelvet-php
๏ปฟ# Host: localhost (Version 5.6.44-log)
# Date: 2020-08-30 17:38:24
# Generator: MySQL-Front 6.1 (Build 1.26)
#
# Structure for table "tl_admin"
#
DROP TABLE IF EXISTS `tl_admin`;
CREATE TABLE `tl_admin` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(12) NOT... |
/*
* Copyright 2022.1-2022
* StarWhale.ai All right reserved. This software is the confidential and proprietary information of
* StarWhale.ai ("Confidential Information"). You shall not disclose such Confidential Information and shall use it only
* in accordance with the terms of the license agreement you entered i... |
create or replace function set_updated_at() returns trigger
language plpgsql
as
$$
begin
new.updated_at = now();
return NEW;
end;
$$;
alter function set_updated_at() owner to postgres;
alter table stripe.subscriptions
add updated_at timestamptz default timezone('utc'::text, now()) not null;
create trigge... |
-- Insert blank values into these just so they'll show up in the admin ui for easy changes if necessary.
INSERT INTO public.content VALUES ('lang/en/datasetPage/accessNotesPrefix', 'text/plain', '') ON CONFLICT DO NOTHING;
INSERT INTO public.content VALUES ('lang/en/datasetPage/accessNotesSuffix', 'text/plain', '') ON ... |
-- Test that diskquota is able to cancel a running CTAS query by the role quota.
SELECT diskquota.enable_hardlimit();
CREATE ROLE hardlimit_r;
SELECT diskquota.set_role_quota('hardlimit_r', '1MB');
GRANT USAGE ON SCHEMA diskquota TO hardlimit_r;
SET ROLE hardlimit_r;
-- heap table
CREATE TABLE t1 AS SELECT generate_se... |
<filename>sql/_27_banana_qa/issue_5765_timezone_support/_00_dev_cases/_02_operator/_30_weekday_with_local_tz/cases/example.sql<gh_stars>1-10
--cases from dev
SELECT WEEKDAY('2008-02-03 22:23:00');
SELECT WEEKDAY('2008-02-03 22:23:00.1234');
SELECT WEEKDAY('01:02:03');
-- test for valid date-time-ltz format
select w... |
<gh_stars>10-100
INSERT INTO "system"."ConfigurationKey"("name", "description") VALUES (E'SENDGRID_SENDER_NAME', E'The name emails are from when sent via SendGrid.');
|
<filename>openGaussBase/testcase/SQL/INNERFUNC/Datetime/Opengauss_Function_Innerfunc_Date_Part_Case0010.sql<gh_stars>0
-- @testpoint: date_partๅฝๆฐๅ
ฅๅ็ปtimestamp with time zone
drop table if exists test_date01;
create table test_date01 (clo1 timestamp with time zone );
insert into test_date01 values ('2013-12-11 pst');
sel... |
/*
* AskMate, again
*
* Database schema
* Version: 10.4.13-MariaDB
*/
CREATE DATABASE IF NOT EXISTS `ask_mate_again` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
USE `ask_mate_again`;
SET FOREIGN_KEY_CHECKS = FALSE;
DROP TABLE IF EXISTS `registered_user`;
CREATE TABLE `registered_user`
(
`id` ... |
<gh_stars>0
SELECT dex.backfill_usd_amount(now() - interval '3 days', now() - interval '20 minutes') ;
REFRESH MATERIALIZED VIEW CONCURRENTLY dex.view_token_prices ;
|
# -- create user table
# --- !Ups
CREATE TABLE MARKETING_PROMOTIONS
(
PROMOTION_ID INTEGER,
DESCRIPTION CLOB,
START_DATE VARCHAR(20),
END_DATE VARCHAR(20),
PRODUCT INTEGER,
AREA VARCHAR(50),
TYPE VARCHAR(50),
DISCOUNT DOUBLE,
CHANNEL VARCHAR(50)
);
# --- !Downs
DROP TABLE IF EXISTS MARKETING_PROMOTIONS; |
<gh_stars>0
-- MySQL dump 10.16 Distrib 10.1.31-MariaDB, for Win32 (AMD64)
--
-- Host: localhost Database: alumnos_Aspirantes
-- ------------------------------------------------------
-- Server version 10.1.31-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET... |
<reponame>josephchoe/database-message-store
-- Verify database-message-store:functions/hash_64 on pg
BEGIN;
SELECT has_function_privilege('message_store.hash_64(varchar)', 'execute');
ROLLBACK;
|
DROP DATABASE IF EXISTS employeeDB;
CREATE DATABASE employeeDB;
USE employeeDB;
CREATE TABLE department (
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(30) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE roles (
id INT NOT NULL AUTO_INCREMENT,
title VARCHAR(30) NOT NULL,
salary DECIMAL NOT ... |
CREATE DATABASE PRUEBA_IAS;
USE PRUEBA_IAS;
CREATE TABLE TECNICO(
CC_TECNICO INT NOT NULL PRIMARY KEY
-- NOMBRE VARCHAR(30)
);
CREATE TABLE TIPO_SERVICIO(
ID_TIPO_SERVICIO INT AUTO_INCREMENT PRIMARY KEY,
TIPO VARCHAR(15)
);
CREATE TABLE SERVICIO(
ID_SERVICIO INT AUTO_INCREMENT PRIMARY KEY,
ID_TIPO_SERVICIO INT NOT ... |
DROP TABLE tbl_manf;
GO
CREATE TABLE tbl_manf
(
manf_id int PRIMARY KEY,
manf_name nvarchar(60),
manf_yr_founded int,
manf_founder nvarchar(120),
manf_profile nvarchar(800),
manf_logo varbinary(max)
);
GO
DROP TABLE tbl_model;
GO
CREATE TABLE tbl_model
(
model_id int NOT NULL P... |
<reponame>yohansebastian/crudUsuarios
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generaciรณn: 14-10-2021 a las 06:39:18
-- Versiรณn del servidor: 10.4.19-MariaDB
-- Versiรณn de PHP: 7.3.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET tim... |
create table if not exists public.spbex_halts_instruments_[%#payload.serviceId%](
isin text primary key,
ticker text not null,
name text not null,
currency text not null
);
create table if not exists public.spbex_halts_[%#payload.serviceId%](
id int primary key,
isin text not null,
url text not null
);
... |
-- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Oct 23, 2019 at 12:38 PM
-- Server version: 10.4.8-MariaDB
-- PHP Version: 7.1.32
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
๏ปฟCREATE TABLE [etljob].[JobExecution] (
[JobExecutionID] INT IDENTITY (1, 1) NOT NULL,
[JobID] INT NOT NULL,
[ApplicationID] INT NULL,
[GroupID] INT NULL,
[ClientID] INT NOT NULL DEFAULT 0,
[LayerID... |
<reponame>Sleeya/DatabasesBasics-MSSQL-Server<filename>Exams/Airport16.10.2016/ExtractAllCustomersWhichWillFly.sql
SELECT DISTINCT c.CustomerID,
CONCAT(c.FirstName,' ',c.LastName) AS FullName,
DATEDIFF(YEAR,c.DateOfBirth,GETDATE()) AS Age
FROM Customers AS c
JOIN Tickets AS t
ON c.CustomerID = t.CustomerID
JOIN... |
๏ปฟDROP TABLE stations CASCADE;
DROP TABLE products CASCADE;
DROP TABLE measurements CASCADE;
CREATE TABLE "stations"(
"id" serial NOT NULL PRIMARY KEY,
"name" varchar(255) NOT NULL,
"latitude" numeric,
"longitude" numeric,
"height" numeric,
UNIQUE (id)
);
CREATE TABLE "products"(
"id" serial NOT NULL PRIMARY... |
<gh_stars>1-10
ALTER TABLE serie ADD COLUMN repository CHARACTER VARYING;
UPDATE serie SET repository = 'kara.moe';
ALTER TABLE serie ALTER COLUMN repository SET NOT NULL;
ALTER TABLE tag ADD COLUMN repository CHARACTER VARYING;
UPDATE tag SET repository = 'kara.moe';
ALTER TABLE tag ALTER COLUMN repository SET NOT NUL... |
CREATE TABLE [dbo].[MailboxMonitorConfiguration]
(
[ID] [int] NOT NULL,
[MailboxAddress] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[MailBoxPassword] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[MailServer] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[AccountType]... |
CREATE TABLE subdivision_FR (id VARCHAR(6) NOT NULL, name VARCHAR(255), level VARCHAR(64) NOT NULL, PRIMARY KEY(id));
INSERT INTO "subdivision_FR" ("id", "name", "level") VALUES (E'FR-01', E'Dรฉpartement Ain', E'metropolitan department');
INSERT INTO "subdivision_FR" ("id", "name", "level") VALUES (E'FR-02', E'Dรฉpartem... |
DROP TABLE IndexSample;
CREATE TABLE IndexSample
(
Id INTEGER NOT NULL,
Value TEXT NOT NULL,
TableRow TEXT NOT NULL,
TableColumn INTEGER NOT NULL,
PRIMARY KEY(Id)
);
CREATE UNIQUE INDEX TableIdx ON IndexSample(TableColumn, TableRow);
INSERT INTO IndexSample VALUES(0, 'One', '0', 0);
INSERT INTO IndexSampl... |
<reponame>Jorengarenar/homework<gh_stars>0
-- Top three prices in Products | not using `TOP 3`, but `UNION`
WITH temp AS (SELECT MAX(UnitPrice) AS TopPrices FROM Products)
SELECT TopPrices FROM (
SELECT * FROM temp
UNION
SELECT MAX(UnitPrice) FROM Products
WHERE UnitPrice != (SELECT * FROM temp)
... |
USE employee_db;
INSERT INTO department (dep_name) VALUES ('Software Engineer'), ('HR'), ('finance'), ('sales'), ('mail');
INSERT INTO role (title,salary, department_id) VALUES
('Front end developer',78600.00,1),
('HR Representative',50000.00,2),
('Accountant',38000.00,3),
('product director',60000.00,4),
('ma... |
-- Catalog: information_schema
-- DROP SCHEMA information_schema;
CREATE SCHEMA information_schema
AUTHORIZATION postgres;
GRANT ALL ON SCHEMA information_schema TO postgres;
GRANT USAGE ON SCHEMA information_schema TO public; |
<gh_stars>0
CREATE TABLE tblcompanies (
id INTEGER AUTO_INCREMENT NOT NULL PRIMARY KEY,
name VARCHAR(100) NOT NULL,
code VARCHAR(64) NOT NULL,
market VARCHAR(24)
);
CREATE TABLE tblvalues (
id INTEGER AUTO_INCREMENT NOT NULL PRIMARY KEY,
company_id INTEGER ... |
ALTER TABLE T_CM_ENC_PLAN_CURR ADD CONSTRAINT FK_CM_ENC_PLAN_CURR_EPI FOREIGN KEY (ENC_PLAN_ID) REFERENCES T_CM_ENC_PLAN (ENC_PLAN_ID);
ALTER TABLE T_CM_ENC_PLAN_CURR ADD CONSTRAINT FK_CM_ENC_PLAN_CURR_CC FOREIGN KEY (CURR_CODE) REFERENCES T_CM_CURR (CODE_N3); |
select do_permit_this_report from
(select rr.report_id
,rr.title
,restricted.are_reports_restricted
,JSON_CONTAINS(bcreports.allowed_reports,CONCAT('\"',cast(rr.report_id as char(10)),'\"'),'$') as is_report_allowed
,case ... |
create or replace package body test_annot_throws_exception
is
g_tests_results clob;
procedure recollect_tests_results is
pragma autonomous_transaction;
l_package_spec varchar2(32737);
l_package_body varchar2(32737);
l_exception_spec varchar2(32737);
l_test_results ut3.ut_varchar2_list;
be... |
<gh_stars>0
DROP TABLE IF EXISTS car;
DROP TABLE IF EXISTS driver;
CREATE TABLE driver (
driver_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(20) NOT NULL UNIQUE,
dateStartWork TIMESTAMP NOT NULL,
salary DECIMAL NOT NULL
);
CREATE TABLE car (
car_id INT NOT NULL AUTO_INCREMENT PRIMARY K... |
<filename>webapp/src/main/resources/db/migration/postgres/V6__adds-column-emailhandtekening-to-instellingen.sql<gh_stars>0
ALTER TABLE tti."Instellingen"
ADD COLUMN "emailHandtekening" character varying(2048);
|
<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version phpStudy 2014
-- http://www.phpmyadmin.net
--
-- ไธปๆบ: localhost
-- ็ๆๆฅๆ: 2017 ๅนด 12 ๆ 21 ๆฅ 22:54
-- ๆๅกๅจ็ๆฌ: 5.5.53
-- PHP ็ๆฌ: 5.4.45
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101... |
<gh_stars>1-10
/****** Object: Synonym [dbo].[S_DMS_V_Analysis_Job_Processor_Group_Association_Recent] ******/
CREATE SYNONYM [dbo].[S_DMS_V_Analysis_Job_Processor_Group_Association_Recent] FOR [DMS5].[dbo].[V_Analysis_Job_Processor_Group_Association_Recent]
GO
GRANT VIEW DEFINITION ON [dbo].[S_DMS_V_Analysis_Job_P... |
<reponame>bcgov/cas-ciip-portal<filename>schema/verify/tables/emission_category_gas.sql
-- Verify ggircs-portal:table_emission_category_gas on pg
begin;
select pg_catalog.has_table_privilege('ggircs_portal.emission_category_gas', 'select');
-- ciip_administrator Grants
select ggircs_portal_private.verify_grant('sele... |
-- Copyright 2018 <NAME>. All rights reserved. More info at http://tanelpoder.com
-- Licensed under the Apache License, Version 2.0. See LICENSE.txt for terms & conditions.
col 0xFLAG just right
select
s.sid
, s.serial#
, s.username
, t.addr taddr
, s.saddr ses_addr
, t.used_ublk
, t.used_urec
-- , ... |
<gh_stars>1-10
-- Name: InsertInitialPatientStatus
-- Schema: posda_files
-- Columns: None
-- Args: ['patient_id', 'status']
-- Tags: ['Insert', 'NotInteractive', 'PatientStatus']
-- Description: Insert Initial Patient Status
-- For use in scripts
-- Not really intended for interactive use
--
insert into patient_impo... |
DROP TABLE MASTERPIECE if exists;
DROP TABLE MUSIC_ALBUM if exists;
DROP TABLE MOVIE if exists;
CREATE TABLE MASTERPIECE (
MASTERPIECE_ID BIGINT IDENTITY NOT NULL PRIMARY KEY ,
NAME VARCHAR(128) NOT NULL ,
YEAR INT NOT NULL,
GENRE CHAR(10) NOT NULL
);
CREATE TABLE MUSIC_ALBUM (
ALBUM_ID BIGI... |
--# Copyright IBM Corp. All Rights Reserved.
--# SPDX-License-Identifier: Apache-2.0
/*
* A procedure to run the passed SQL statement and return it's result as a dynamic result set
*
*/
CREATE OR REPLACE PROCEDURE DB_DYNAMIC_SELECT
(
IN SELECT_STMT CLOB(16M OCTETS) -- 2M is the documented statement ... |
<gh_stars>100-1000
/*Data for the table jobs */
INSERT INTO jobs(job_id,job_title,min_salary,max_salary) VALUES (1,'Public Accountant',4200.00,9000.00);
INSERT INTO jobs(job_id,job_title,min_salary,max_salary) VALUES (2,'Accounting Manager',8200.00,16000.00);
INSERT INTO jobs(job_id,job_title,min_salary,max_salary) V... |
<reponame>JaneliaSciComp/DatabaseScripts
DROP PROCEDURE IF EXISTS getPickListCSV;
DELIMITER //
CREATE DEFINER = sageAdmin PROCEDURE getPickListCSV
(OUT o_string text,column_name CHAR(255), table_name CHAR(255))
DETERMINISTIC
BEGIN
DECLARE v_value text DEFAULT '';
DECLARE v_string text DEFAULT '';
DECLARE done int D... |
-- @testpoint: DROP RESTRICT:ๅ็ดขๅผ็ฑปๅ
--ๅปบๅๅบ่กจ
DROP TABLE if EXISTS test_index_table_156_01 CASCADE;
create table test_index_table_156_01(
c_int int
) WITH (ORIENTATION = row) partition by range(c_int)(
partition p1 values less than (100),
partition p2 values less than (1000),
partition p3 values less than (5000),
partiti... |
<filename>src/_tree_size.sql<gh_stars>0
DELIMITER $$
DROP FUNCTION IF EXISTS `_tree_size`$$
CREATE FUNCTION `_tree_size`(
_left INT,
_right INT
)
RETURNS INT(11)
DETERMINISTIC
BEGIN
RETURN _right - _left + 1;
END$$
DELIMITER ; |
-- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: 1192.168.3.11
-- Generation Time: Mar 28, 2019 at 06:28 PM
-- Server version: 10.1.31-MariaDB
-- PHP Version: 7.2.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET ... |
<reponame>nixiaozi/shopxo
# ้ๅธ
DROP TABLE IF EXISTS `{PREFIX}plugins_gold_coin`;
# ้ๅธ ่ทๅ
DROP TABLE IF EXISTS `{PREFIX}plugins_gold_coin_dig`;
# ้ๅธ่ฎฐๅฝ่กจ
DROP TABLE IF EXISTS `{PREFIX}plugins_gold_coin_log`;
# ้ๅธ ๅ็ฐ
DROP TABLE IF EXISTS `{PREFIX}plugins_gold_coin_money`; |
CREATE TABLE example (
id IDENTITY,
txt VARCHAR(100),
dt DATETIME
);
|
<filename>2015_Summer/CSCI-585/Assignments/Assignment1/assignment1_sql/createdb.sql
--
-- DROP DB
--
DROP DATABASE IF EXISTS golf_db;
--
-- CREATE DB
--
CREATE DATABASE golf_db;
USE golf_db;
--
-- Table structure for table `course`
--
DROP TABLE IF EXISTS `course`;
CREATE TABLE `course` (
`name` varchar(40) NOT ... |
INSERT INTO chaintips
(id, node, status, block, height, parent_chaintip)
VALUES
(0, 0, 'active', '0000000000000000000501b978d69da3d476ada6a41aba60a426badbadbadbad', 5, NULL),
(1, 1, 'active', '0000000000000000000501b978d69da3d476ada6a41aba60a42612806204013a', 5, NULL),
(2, 1, 'valid-headers', '000000000... |
<reponame>nonameden/modular
INSERT INTO users(name,email,password) VALUES ('Flutterando', '<EMAIL>', '<PASSWORD>') ; |
DELETE FROM `spell_group` WHERE `spell_id` IN (79472, 79471, 79470, 79637, 94160, 79469, 79635, 79632, 79481, 79631, 79480, 79477, 79474, 79468);
INSERT INTO spell_group (`id`,`spell_id`) VALUES
(1, 79472),
(2, 79472),
(1, 79471),
(2, 79471),
(1, 79470),
(2, 79470),
(1, 79637),
(2, 79637),
(1, 94160),
(2, 94160),
(1, 7... |
<reponame>bassaer/spring-app
DROP TABLE IF EXISTS users;
CREATE TABLE users (
id int NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(32) NOT NULL,
email VARCHAR(200) NOT NULL,
created_at datetime default current_timestamp
) ENGINE=InnoDB DEFAULT CHARACTER SET=utf8;
INSERT INTO users (name, email, cr... |
<reponame>jnh5y/ksqldb-recipes<gh_stars>0
SET 'auto.offset.reset' = 'earliest';
-- Create the stream of customer data
CREATE STREAM fd_cust_raw_stream (
ID BIGINT,
FIRST_NAME VARCHAR,
LAST_NAME VARCHAR,
EMAIL VARCHAR,
AVG_CREDIT_SPEND DOUBLE
) WITH (
KAFKA_TOPIC = 'FD_customers',
VALUE_FORMAT = 'JSON... |
DROP table IF EXISTS user_profile;
DROP table IF EXISTS client;
DROP table IF EXISTS service;
DROP table IF EXISTS service_endpoint;
DROP table IF EXISTS client_service;
DROP table IF EXISTS refresh_token;
DROP table IF EXISTS audit_log;
create table user_profile (
user_id varchar PRIMARY KEY,
user_type var... |
ALTER table block_metadata
ADD COLUMN block_size INTEGER NOT NULL DEFAULT 0;
ALTER TABLE block_metadata
ADD COLUMN deploy_error_count INTEGER NOT NULL DEFAULT 0;
|
CREATE TABLE PUBLIC.ACT_DMN_HI_DECISION_EXECUTION (ID_ VARCHAR(255) NOT NULL, DECISION_DEFINITION_ID_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), START_TIME_ TIMESTAMP, END_TIME_ TIMESTAMP, INSTANCE_ID_ VARCHAR(255), EXECUTION_ID_ VARCHAR(255), ACTIVITY_ID_ VARCHAR(255), FAILED_ BOOLEAN DEFAULT FALSE, TENANT_ID_ VARCHA... |
<gh_stars>1-10
-- *************** SqlDBM: PostgreSQL ****************;
-- ***************************************************;
-- ************************************** reference.location
\c oltp20_control
BEGIN TRANSACTION;
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
-- *************** SqlDBM: PostgreSQL *******... |
-- ----------------------------------------------------------------------
-- Test: setup.sql
-- ----------------------------------------------------------------------
create schema qp_targeted_dispatch;
set search_path to qp_targeted_dispatch;
-- ----------------------------------------------------------------------
... |
<gh_stars>1-10
-- long transactions
SELECT client_addr, usename, datname, clock_timestamp() - xact_start as xact_age, clock_timestamp() - query_start as query_age, query from pg_stat_activity
WHERE clock_timestamp() - query_start > INTERVAL '1min'
order by xact_start, query_start;
|
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create FUNCTION [Utility.NLP].[fnNormalize]
(
@InWord nvarchar(4000)
)
RETURNS nvarchar(4000)
AS
BEGIN
DECLARE @Temp nvarchar(4000)
DECLARE @Norm nvarchar(4000)
DECLARE @i int
DECLARE @c varchar(1)
DECLARE @lastc varchar(1)
SELECT @Temp = LOWER(ISNULL(RT... |
SELECT N, CASE WHEN P is NULL THEN 'Root'
ELSE CASE WHEN N IN (SELECT P FROM BST ) THEN 'Inner'
ELSE 'Leaf' END
END FROM BST ORDER BY N ASC;
|
<filename>the dawn chant/007_populate_trapdrop.sql
START TRANSACTION;
SET @store_name = 'fur';
SET @rollUnder = 0.5;
SET @message = 'scraps of fur';
INSERT INTO trapdrop (store_id, roll_under, message) VALUES
(
(SELECT st1.store_id FROM store_type st1 WHERE st1.store_name = @store_name),
(SELECT @rollUnder),
(SELEC... |
-- phpMyAdmin SQL Dump
-- version 4.2.7.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Aug 03, 2017 at 12:24 PM
-- Server version: 5.6.20
-- PHP Version: 5.5.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... |
-- DBO.[CAREMEASURECLASS] (BEGIN)
/*
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE (TABLE_NAME = 'CareMeasureClass') AND (TABLE_SCHEMA = 'dbo'))
DROP TABLE dbo.[CareMeasureClass]
GO
*/
CREATE TABLE dbo.[CareMeasureClass] (
CareMeasureClassId ... |
<filename>Database/Homeworks/08. Advanced SQL/Task - 04.sql
USE TelerikAcademy
SELECT AVG(Salary) AS AverageSalary
FROM Employees
WHERE DepartmentID = 1
|
<gh_stars>0
DROP TABLE IF EXISTS CIIU_3_rama;
CREATE TABLE IF NOT EXISTS CIIU_3_rama(
cod2dig VARCHAR(3) NOT NULL
,cod3dig VARCHAR(3) NOT NULL PRIMARY KEY
,CIIU VARCHAR(100) NOT NULL
);
INSERT INTO CIIU_3_rama(cod2dig,cod3dig,CIIU) VALUES ('1','11','Cultivos en general');
INSERT INTO CIIU_3_rama(cod2... |
-- -- The tool to check the availability or syntax of domains, IPv4 or URL.
-- --
-- ::
--
--
-- โโโโโโโ โโโ โโโโโโโโโโโโโโ โโโโโโโ โโโ โโโโโโโโโโโโโโโโโโโโโโ โโโ โโโโโโโโ
-- โโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโ
-- โโโโโโโโ โโโโโโโ โโโโโโ โโโ โโโโ... |
create table persons (
id INT,
name VARCHAR(50),
allergies VARCHAR(12),
class_id VARCHAR(4)
);
insert into persons (id, name, allergies, class_id) values (1, '<NAME>', null, 'DD18');
insert into persons (id, name, allergies, class_id) values (2, '<NAME>', null, 'WU18');
insert into persons (id, name, allergies, cla... |
<filename>db-pos1.sql
-- --------------------------------------------------------
-- Host: localhost
-- Server version: 5.7.19 - MySQL Community Server (GPL)
-- Server OS: Win64
-- HeidiSQL Version: 9.4.0.5125
-- --------------------------------------... |
๏ปฟCREATE TABLE dbo.tbl_SessionStatus
(
Id uniqueidentifier not null default newid() PRIMARY KEY CLUSTERED
,SessionId uniqueidentifier not null
,EventTypeId tinyint not null
,EventTimestamp datetime2(7) not null
,RecordAppend datetime2(7) not null default sysdatetime()
,CONSTRAINT fk_tbl_SessionStatus_SessionId
... |
CREATE TABLE "Emoji" (
`id` INTEGER NOT NULL UNIQUE,
`code` TEXT NOT NULL UNIQUE,
`code_point` TEXT NOT NULL UNIQUE,
`name` TEXT NOT NULL,
`short_name` TEXT,
`has_tone` INTEGER NOT NULL,
`tone` INTEGER,
`emoji_order` INTEGER NOT NULL UNIQUE,
`category_id` INTEGER NOT NULL,
PRIMARY KEY(id)
)
|
--
DO
$body$
BEGIN
IF NOT EXISTS (
SELECT 1 FROM pg_tables WHERE schemaname='pwaf_app_dba' and tablename='gui_blocks'
) THEN
CREATE TABLE pwaf_app_dba.gui_blocks
(
CONSTRAINT blocks_pkey PRIMARY KEY (id),
CONSTRAINT blocks_xslt_stilesheet_fkey FOREIGN KEY (template)
REFERENCES pwaf_app_dba.g... |
select
a
, b
from
test_table as t1
|
--
-- Copyright (c) Microsoft Corporation. All rights reserved.
-- Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
--
-- Since the card has a PAN token (currently a First Data PartnerCardId), see if a Visa ID has already been allocated for that PAN token.
-- We d... |
create table
test_normalization.`dedup_exchange_rate__dbt_tmp`
as (
-- Final base SQL model
select
id,
currency,
`date`,
`HKD@spรฉรงiรคl & characters`,
hkd_special___characters,
nzd,
usd,
_airbyte_emitted_at,
_airbyte_dedup_exchange_rate_hashid
from test_normalization.`d... |
<filename>db.sql
-- --------------------------------------------------------
-- ไธปๆบ: 127.0.0.1
-- ๆๅกๅจ็ๆฌ: 10.4.19-MariaDB - mariadb.org binary distribution
-- ๆๅกๅจๆไฝ็ณป็ป: Win64
-- HeidiSQL ็ๆฌ: 11.3.0.6295
-- ------------------------------... |
<filename>schema.sql
CREATE TABLE IF NOT EXISTS users (
user_id INTEGER PRIMARY KEY AUTOINCREMENT,
timestamp DATETIME NOT NULL,
username STRING UNIQUE NOT NULL,
password_hash STRING NOT NULL
);
CREATE TABLE IF NOT EXISTS letters (
letter_id INTEGER PRIMARY KEY AUTOINCRE... |
<filename>application/wechat/sql/install.sql
-- -----------------------------
-- ๅฏผๅบๆถ้ด `2017-04-15 15:42:35`
-- -----------------------------
-- -----------------------------
-- ่กจ็ปๆ `dp_we_material`
-- -----------------------------
DROP TABLE IF EXISTS `dp_we_material`;
CREATE TABLE `dp_we_material` (
`id` int(10) un... |
CREATE OR REPLACE VIEW OSP$COMMENT AS SELECT
COMMENT_TYPE_CODE COMMENT_CODE,
DESCRIPTION DESCRIPTION,
TEMPLATE_FLAG TEMPLATE_FLAG,
CHECKLIST_FLAG CHECKLIST_FLAG,
AWARD_COMMENT_SCREEN_FLAG AWARD_COMMENT_SCREEN_FLAG,
UPDATE_TIMESTAMP UPDATE_TIMESTAMP,
UPDATE_USER UPDATE_USER
FROM COMMENT_TYPE |
ALTER TABLE db_version CHANGE COLUMN required_2008_11_01_01_mangos_mangos_string required_2008_11_01_02_mangos_command bit;
DELETE FROM command WHERE name IN ('modify gender');
INSERT INTO command VALUES
('modify gender',2,'Syntax: .modify gender male/female\r\n\r\nChange gender of selected player.');
|
--
-- acs-kernel/sql/acs-metadata-drop.sql
--
-- DDL commands to purge the Community Core data model
--
-- @author <NAME> (<EMAIL>)
-- @creation-date 2000-05-18
-- @cvs-id $Id: acs-metadata-drop.sql,v 1.1 2001/03/20 22:51:55 donb Exp $
--
drop package acs_attribute;
drop package acs_object_type;
drop view acs_object_t... |
CREATE TABLE accounts (account_id serial primary key, name varchar(200) not null , phone int not null);
INSERT INTO accounts values (-1, 'empty', 0);
CREATE TABLE halls (hall_id int not null , row int not null, place int not null, account_id int, primary key (hall_id, row, place), foreign key (account_id) REFERENCES ... |
select count(1) from libro where id <> :id and titulo = :titulo |
-- start query 15 in stream 0 using template query15.tpl
SELECT ca_zip,
Sum(cs_sales_price)
FROM catalog_sales,
customer,
customer_address,
date_dim
WHERE cs_bill_customer_sk = c_customer_sk
AND c_current_addr_sk = ca_address_sk
AND ( Substr(ca_zip, 1, 5) IN... |
--
-- PostgreSQL database dump
--
-- Dumped from database version 14.2
-- Dumped by pg_dump version 14.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;
SELECT pg_catalog.set_config('search_path', '', fal... |
USE gpconnect1;
INSERT INTO allergyintolerance
(nhsNumber,endDate,endReason,note,reactionDescription, clinicalStatus,verificationStatus,category,patientRef,onSetDateTime,assertedDate,concept_code,concept_display,desc_code,manCoding,manDisplay,manDescCoding,manDescDisplay, recorder)
VALUES
(9658219004 ,'2016-07-01 1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.