sql stringlengths 6 1.05M |
|---|
-- ----------------------------
-- Table structure for polite_hosts
-- ----------------------------
DROP TABLE IF EXISTS "polite_hosts";
CREATE TABLE "polite_hosts" (
"hostname" varchar(255) NOT NULL COLLATE "default",
"added" timestamp(6) NOT NULL
)
WITH (OIDS=FALSE);
-- ----------------------------
-- Table stru... |
<reponame>bhtranguet/DisplayMonkey
/*!
* DisplayMonkey source file
* http://displaymonkey.org
*
* Copyright (c) 2016 Fuel9 LLC and contributors
*
* Released under the MIT license:
* http://opensource.org/licenses/MIT
*/
use DisplayMonkey -- TODO: change if DisplayMonkey database name is different
GO
-- changes for v1... |
<filename>src/main/resources/import.sql
INSERT INTO User (email,name) VALUES ('<EMAIL>', 'Feride');
INSERT INTO User (email,name) VALUES ('<EMAIL>', 'admin');
insert into Bookmark (uri, description, user_id) values ('//http://bookmark.com/1/', 'a first description', 1);
insert into Bookmark (uri, description, user_id... |
<filename>Extended_Events/ImplicitConversionOnly.sql
/*
Original link: https://www.scarydba.com/2018/10/15/using-extended-events-to-capture-implicit-conversions/
Author: <NAME>
*/
-- If the Event Session exists DROP it
IF EXISTS (SELECT 1
FROM sys.server_event_sessions
WHERE name = N'ImplicitConversionOnly')
... |
-- name: get_hostnames
SELECT hostname FROM server
|
<filename>src/test/resources/sql/drop_index/cd138b11.sql
-- file:create_index.sql ln:801 expect:true
DROP INDEX CONCURRENTLY "concur_index5"
|
<reponame>TRex22/DBFProject
SELECT LGCUSTOMER.Cust_Code, LGCUSTOMER.Cust_Fname, LGCUSTOMER.Cust_Lname, CONCAT(LGCUSTOMER.Cust_Street, ' ', LGCUSTOMER.Cust_City, ' ', LGCUSTOMER.Cust_Province, ' ', LGCUSTOMER.Cust_ZIP) AS 'Full_Address', LGINVOICE.Inv_Date, MAX(LGINVOICE.Inv_Total) AS 'Largest Invoice'
FROM LGCUSTOMER J... |
--
-- Create a schema to hide the conversation tree table from public view.
--
CREATE SCHEMA IF NOT EXISTS tq_tree;
GRANT ALL ON schema tq_tree TO tq_conv;
GRANT USAGE ON schema tq_tree TO tq_conv_ro;
GRANT USAGE ON schema tq_tree TO tq_proxy_ro;
COMMENT ON SCHEMA tq_tree IS 'Tables to store the conversation tree.';
... |
<filename>code/Structured_APIs-Chapter_10_Spark_SQL.sql
CREATE TABLE flights (
DEST_COUNTRY_NAME STRING, ORIGIN_COUNTRY_NAME STRING, count LONG)
USING JSON OPTIONS (path '/data/flight-data/json/2015-summary.json')
-- COMMAND ----------
CREATE TABLE flights_csv (
DEST_COUNTRY_NAME STRING,
ORIGIN_COUNTRY_NAME ST... |
CREATE TABLE `voucherservice`.`voucher` (
`voucher_id` INT NOT NULL AUTO_INCREMENT,
`order_id` VARCHAR(1024) NOT NULL,
`travelDate` DATE NOT NULL,
`travelTime` VARCHAR(1024) NOT NULL,
`contactName` VARCHAR(1024) NOT NULL,
`trainNumber` VARCHAR(1024) NOT NULL,
`seatClass` INT NOT NULL,
`seatNumber` VARCH... |
<reponame>gusdyd98/py_datapreprocessingwar<gh_stars>0
SELECT *
FROM work.reserve_tb
-- 인덱스를 적용하기 위해 checkin_date로도 조건을 지정
WHERE checkin_date BETWEEN '2016-10-10' AND '2016-10-13'
AND checkout_date BETWEEN '2016-10-13' AND '2016-10-14'
|
<filename>doc/tc_gxbeiyi.sql
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- 主机: localhost
-- 生成日期: 2020-05-16 10:40:05
-- 服务器版本: 10.4.11-MariaDB
-- PHP 版本: 7.4.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@... |
<filename>sql/_07_misc/_02_prameter_bind/cases/bind_parameter_in_select_clause.sql
--bind parameter in select clause
create class xoo ( a int);
insert into xoo values(1);
$int, $100, $int , $1
select ? from xoo where ? = a;
$varchar, $100, $int , $1
select ? from xoo where ? = a;
$char, $100, $int , $1
select ? from ... |
<reponame>Nathaniavanessawijaya/PemrogramanInternet2
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 23 Apr 2021 pada 19.16
-- Versi server: 10.4.17-MariaDB
-- Versi PHP: 7.4.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "... |
-- DROP DATABASE IF EXISTS employeesdb;
-- CREATE DATABASE employeesdb;
-- USE employeesdb;
-- CREATE TABLE department (
-- department_id MEDIUMINT NOT NULL AUTO_INCREMENT UNIQUE,
-- department_name VARCHAR(30) NOT NULL,
-- primary key (department_id)
-- );
-- CREATE TABLE job (
-- role_id MEDIUMINT NOT NULL AU... |
<filename>db/spanner.sql
CREATE TABLE `users` (
user_id STRING(36) NOT NULL,
name STRING(MAX) NOT NULL,
status INT64 NOT NULL,
created_at TIMESTAMP NOT NULL,
updated_at TIMESTAMP NOT NULL,
) PRIMARY KEY(user_id);
CREATE INDEX idx_users_name ON use... |
<gh_stars>0
/*
Name: <NAME>
ZID: Z1771209
Class: CSCI 466
Section: 2
Project: Assignment 5
Due: Monday October 9th 2017
*/
/*
CSCI 466/566 Assignment 5 Fall 2017
SQL using a single table
100 points
For this assignment you will be using the classic models database on our unix system.
Test your queries, then put... |
<gh_stars>0
ALTER TABLE Provider
ALTER COLUMN Rating DECIMAL (18,2) |
<gh_stars>0
IF EXISTS ( SELECT *
FROM sys.objects
WHERE object_id = OBJECT_ID(N'pa.proc_genera_montos_pago_vacacion')
AND type IN ( N'P', N'PC' ) )
/****** Object: StoredProcedure [pa].[proc_genera_montos_pago_vacacion] Script Date: 16-01-2017 3:26:36 PM ******/
DRO... |
<gh_stars>1-10
use CovidDB;
CREATE TABLE Users (id int NOT NULL AUTO_INCREMENT,
first_name varchar(255) NOT NULL,
last_name varchar(255) NOT NULL,
email varchar(255) NOT NULL,
password varchar(255)NOT NULL,
PRIMARY KEY(id));
insert into users (id, first_name, last_na... |
<reponame>HansenChristoffer/Ljudio
-- MariaDB dump 10.18 Distrib 10.5.8-MariaDB, for Linux (x86_64)
--
-- Host: 127.0.0.1 Database: nodemusic
-- ------------------------------------------------------
-- Server version 10.5.8-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OL... |
<filename>HackerRank/SQL/Aggregation/Weather Observation Station 16/Solution.sql<gh_stars>1-10
/*
Query the smallest Northern Latitude (LAT_N) from STATION that is greater than 38.7780. Round your answer to 4 decimal places.
*/
SELECT ROUND(MIN(LAT_N), 4) FROM STATION WHERE LAT_N > 38.7780; |
<reponame>hur1can3/cofoundry
create procedure Cofoundry.FailedAuthticationAttempt_Add
(
@UserAreaCode char(3),
@Username nvarchar(150),
@IPAddress varchar(45),
@DateTimeNow datetime2
)
as
begin
set nocount on;
insert into Cofoundry.FailedAuthenticationAttempt (UserAreaCode, Username, IPAddress, Attempt... |
<filename>Documentation/DBScripts/13_t_report_type1.sql
insert into calestore.T_REPORT_TYPE1 (KPI_NUMBER,KPI_DESC,USER_TYPE,VALUE_FOR_KPI,CREATED_DATE)values(101,'Number of total orders placed','Admin','4350',now());
insert into calestore.T_REPORT_TYPE1 (KPI_NUMBER,KPI_DESC,USER_TYPE,VALUE_FOR_KPI,CREATED_DATE)values(1... |
<filename>semite_svt.sql<gh_stars>0
-- MySQL dump 10.13 Distrib 5.7.15, for Linux (x86_64)
--
-- Host: localhost Database: semite_svt
-- ------------------------------------------------------
-- Server version 5.7.15-0ubuntu0.16.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @O... |
<gh_stars>1-10
-- Deploy mappamundi:files to pg
-- for these three columns we never let the caller control the contents
CREATE OR REPLACE FUNCTION mappa.func_override_file_columns()
RETURNS TRIGGER AS $$
BEGIN
IF NEW.uuid IS NOT NULL THEN
RAISE EXCEPTION 'You must not send uuid field';
ELSE
NEW.uuid = mapp... |
-- Verify ggircs:materialized_view_facility on pg
begin;
select * from swrs_transform.facility where false;
rollback;
|
<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Mar 15, 2021 at 11:10 AM
-- Server version: 10.3.15-MariaDB
-- PHP Version: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... |
<filename>kata-files/lesson2/postgresql/expected/MYLARGESCHEMA/function/func101.sql
CREATE FUNCTION func101() RETURNS integer
LANGUAGE plpgsql
AS $$ DECLARE val INTEGER; BEGIN val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE295);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE228);val:=(SELE... |
-- start_ignore
SET gp_create_table_random_default_distribution=off;
-- end_ignore
--
-- CT ALTER Schema name
--
--
-- HEAP TABLE - SET TO NEW SCHEMA
--
CREATE TABLE old_schema.ct_heap_alter_table_schema1(
text_col text,
bigint_col bigint,
char_vary_col character varying(30),
numeric_col numeric,
int_col int4,
... |
INSERT INTO waffle_switch_mkt (name, active, note, created, modified)
VALUES ('in-app-products', 0,
'Enable in-app product management in the devhub.', NOW(), NOW());
|
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 28 Agu 2019 pada 08.33
-- Versi Server: 10.1.29-MariaDB
-- PHP Version: 7.2.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... |
<reponame>fossabot/Tsundoku
CREATE UNIQUE INDEX webhook_show_id_base_key ON public.webhook USING btree (show_id, base);
alter table "public"."webhook" add constraint "webhook_show_id_base_key" UNIQUE using index "webhook_show_id_base_key";
|
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Nov 24, 2019 at 09:44 AM
-- Server version: 5.7.26-0ubuntu0.18.04.1
-- PHP Version: 7.2.19-0ubuntu0.18.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+0... |
insert into cursos values
('1', 'HTML4', 'Curso de HTML5', '40', '37', '2014'),
('2', 'Algorimtimos', 'lógica de programação', '20', '15', '2014'),
('3', 'photoshop', 'dicas de photoshop CC', '10', '8', '2014'),
('4', 'PGP', 'curso PHP para iniciantes', '40', '20', '2010'),
('5', 'jarva', 'introdução à linguagem java',... |
INSERT INTO econ.unemp_msad
SELECT
dt,
prop_msad_cd,
unemp_rate
FROM ((
SELECT
dt,
prop_msad_cd,
unemp_rate
FROM
econ.unemp_msad0)
UNION ALL (
SELECT
a.dt,
a.... |
SELECT ID FROM $wpdb->posts WHERE post_type = 'attachment' AND post_mime_type = '" . $upload['type'] . "' AND post_parent = '0' AND post_title = '$title' ORDER BY ID DESC LIMIT 1
|
<gh_stars>1-10
SELECT ROWID, CODIGO, NOMEROTINA, CODMODULO, CODSUBMODULO, ACAO, EXIBIRMENU
FROM PCROTINA
WHERE PCROTINA.CODIGO >= 8000
ORDER BY CODIGO |
alter table eg_location rename isactive to active;
alter table eg_location drop column locationid, drop column islocation, drop column createddate, drop column lastmodifieddate;
alter table eg_location add column "version" numeric default 0; |
<gh_stars>1-10
CREATE OR REPLACE FUNCTION log_last_name_changes() RETURNS trigger AS
$BODY$
BEGIN
IF NEW.last_name <> OLD.last_name THEN
INSERT INTO employee_audits(employee_id, last_name, changed_on)
VALUES(OLD.id, OLD.last_name, NOW());
END IF;
RETURN NEW;
END;
$BODY$
LANGUAGE plpgsql VOLATILE |
DROP TABLE IF EXISTS `jam_photo`;
CREATE TABLE `jam_photo` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`jam_id` INT(11) NOT NULL,
`photo` LONGBLOB DEFAULT NULL,
PRIMARY KEY (`id`),
CONSTRAINT `jp_jfk_1` FOREIGN KEY (`jam_id`) REFERENCES `jam` (`id`)
)
ENGINE = InnoDB
DEFAULT CHARSET = utf8;
|
<filename>Labs/CppLab/CppKeywords.ddl
/* CppKeywords.ddl */
text[] Keywords=
{
"alignas",
"continue",
"friend",
"register",
"true",
"alignof",
"decltype",
"goto",
"reinterpret_cast",
"try",
"asm",
"default",
"if",
"return",
"typedef",
"auto",
"delete",
"inline",
"short",
"typei... |
<reponame>BaiShaoqi/geospatial
select ST_Asewkt(the_geom) from loadedshp;
|
--
-- Licensed Materials - Property of IBM
-- 5737-I23
-- Copyright IBM Corp. 2018 - 2022. All Rights Reserved.
-- U.S. Government Users Restricted Rights:
-- Use, duplication or disclosure restricted by GSA ADP Schedule
-- Contract with IBM Corp.
--
export to api_integrations_objectsstore.del of ixf lobs to ./ modifi... |
-- MySQL dump 10.13 Distrib 5.7.24, for Linux (x86_64)
--
-- Host: localhost Database: j1805_oa
-- ------------------------------------------------------
-- Server version 5.7.24-0ubuntu0.18.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_S... |
<reponame>jakub-lipski-rft/container-registry<gh_stars>0
INSERT INTO "repository_blobs"("id", "top_level_namespace_id", "repository_id", "blob_digest", "created_at")
VALUES (1, 1, 3, decode('01c9b1b535fdd91a9855fb7f82348177e5f019329a58c53c47272962dd60f71fc9', 'hex'), E'2020-05-27 13:05:35.338639+00'),
(2, 1, 3, ... |
-- 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='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SU... |
CREATE TABLE IF NOT EXISTS `stats_flight` (
`stats_flight_id` int(11) NOT NULL,
`stats_type` varchar(255) NOT NULL,
`cnt` int(11) NOT NULL,
`flight_date` varchar(255) NOT NULL,
`stats_airline` varchar(255) DEFAULT '',
`filter_name` varchar(255) DEFAULT ''
) ENGINE=InnoDB AUTO_INCREMENT=147 DEFAULT CHARSET=u... |
<filename>sql/2020/20_Caching/content_age_older_than_ttl_by_party.sql
#standardSQL
# Difference between Cache TTL and the content age for third party request
CREATE TEMPORARY FUNCTION toTimestamp(date_string STRING)
RETURNS INT64 LANGUAGE js AS '''
try {
var timestamp = Math.round(new Date(date_string).getTi... |
<reponame>goldmansachs/obevo-kata<gh_stars>10-100
CREATE VIEW view99 AS
SELECT 1 AS c1
FROM table232
UNION
SELECT 1 AS c1
FROM table6
UNION
SELECT 1 AS c1
FROM table152
UNION
SELECT 1 AS c1
FROM view80
UNION
SELECT 1 AS c1
FROM view11
UNION
SELECT 1 AS c1
FROM view83;
GO |
<reponame>UltimateSoftware/DOI
GO
IF TYPE_ID('[DOI].[FilteredRowCountsTT]') IS NOT NULL
DROP TYPE [DOI].[FilteredRowCountsTT];
GO
CREATE TYPE [DOI].[FilteredRowCountsTT] AS TABLE
(
[DatabaseName] [sys].[sysname] NOT NULL,
[SchemaName] [sys].[sysname] NOT NULL,
[TableName] [sys].[sysname] NOT NULL,
[IndexName] [sys]... |
with service_account_key as (
select
distinct service_account_name
from
gcp_service_account_key
where
key_type = 'USER_MANAGED'
)
select
-- Required Columns
'https://iam.googleapis.com/v1/projects/' || project || '/serviceAccounts/' || name as resource,
case
when name like '%iam.gserviceacco... |
-- Test access privileges
--
-- Clean up in case a prior regression run failed
-- Suppress NOTICE messages when users/groups don't exist
SET client_min_messages TO 'panic';
DROP ROLE IF EXISTS regressioncleanupuser;
DROP ROLE IF EXISTS regressionuser1;
DROP ROLE IF EXISTS regressionuser2;
DROP ROLE IF EXISTS regression... |
<gh_stars>10-100
----------------------------
-- Copyright (C) 2021 CARTO
----------------------------
CREATE OR REPLACE FUNCTION @@RS_PREFIX@@s2.RESOLUTION
(id INT8)
RETURNS INT4
IMMUTABLE
AS $$
from @@RS_PREFIX@@s2Lib import get_resolution
if id is None:
raise Exception('NULL argument passed to UDF'... |
select
ssbsect_term_code as "term",
ssbsect_crn as "crn"
from
ssbsect,
student.current_term
where
current_term.term_college = decode(:college, 'foothill', 'FH', 'deanza', 'DA')
and ssbsect_term_code = current_term.term_code
and ssbsect_subj_code = 'ANTH'
and rownum <= 4
order by
ssbs... |
DROP TABLE IF EXISTS `test_050`; |
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th5 31, 2021 lúc 04:15 AM
-- Phiên bản máy phục vụ: 10.4.18-MariaDB
-- Phiên bản PHP: 7.4.18
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHAR... |
<gh_stars>0
WITH t1 AS (
SELECT
date_trunc('${period}',
"publishedAt") AS date,
'${period}' AS period,
count(id) AS total
FROM
"${model}"
GROUP BY
1
ORDER BY
1
),
t2 AS (
SELECT
date,
period,
total,
lag(total,
1) OVER ... |
<reponame>bayugyug/sample-rates
create database rates;
create user rates;
grant all privileges on rates.* to rates@localhost identified by 'rat3s';
grant all privileges on rates.* to rates@127.0.0.1 identified by 'rat3s';
flush privileges;
CREATE TABLE IF NOT EXISTS `rates` (
`id` int(11) NOT NULL AUTO_... |
INSERT INTO projects
(projectName, projectType, url, github, img, video, description, keywords, ranking, created_at,
updated_at)
VALUES
('Duh!Travel Planner!' , 'webdev', 'https://truslide12.github.io/Project1/' , 'https://github.com/Truslide12/Project1', 'DuhTravelplanner.png', 'DuhTravelplanner.png' , 'Travel planne... |
SET FOREIGN_KEY_CHECKS = 0;
DELETE FROM `userprefs` WHERE userprefs_id = 27852;
SET FOREIGN_KEY_CHECKS = 1; |
SELECT site_ip, site_hostname, ip_exclude FROM ' . SITELIST_TABLE;
SELECT forum_id FROM ' . FORUMS_TABLE;
SELECT forum_id, enable_indexing FROM ' . FORUMS_TABLE;
CREATE TABLE ' . USERCONV_TABLE . ' ( user_id mediumint(8) NOT NULL, username_clean blob NOT NULL )
SELECT relname FROM pg_stat_user_tables'... |
CREATE TABLE transaction
(
id BIGSERIAL PRIMARY KEY,
description VARCHAR(255) NOT NULL,
category_id BIGINT REFERENCES category (id),
account_id BIGINT REFERENCES account (id),
price NUMERIC(19, 2) NOT NULL,
date DATE NOT NULL
);
|
create table users (
user_id text PRIMARY KEY,
name text,
email text,
password <PASSWORD>,
UNIQUE(user_id)
);
create table incidents (
incident_id text PRIMARY KEY,
reportee_id varchar(100) default null,
rescuer_id text default null,
verifiers text default null,
type varchar(50) default null,
... |
<gh_stars>10-100
UPDATE redcap_config SET value='REDCAP_VERSION_MAGIC_STRING' WHERE field_name='redcap_version';
UPDATE redcap_config SET value='BASE_URL' WHERE field_name='redcap_base_url';
UPDATE redcap_config SET value='table' WHERE field_name='auth_meth_global';
UPDATE redcap_config SET value='sha512' WHERE field_... |
-- lists all records with a score >= 10
SELECT score, name FROM second_table WHERE score >= 10 ORDER BY score DESC;
|
<filename>backend/de.metas.adempiere.adempiere/migration/src/main/sql/postgresql/system/10-de.metas.adempiere/5532500_gh3-sys_add_ean_gtin_upc_fields.sql
-- 2019-09-30T11:04:42.840Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET AD_Element_ID=603, ColumnName='UPC', Description='P... |
<filename>db/create_logic.sql<gh_stars>0
CREATE OR REPLACE FUNCTION TRANSACTION_AFTER () RETURNS TRIGGER AS
$BODY$
DECLARE
v_start_transaction_id INTEGER := NULL;
v_start_station TEXT := NULL;
v_start_longitude DOUBLE PRECISION := NULL;
v_start_latitude DOUBLE PRECISION := NULL;
v_start_ref_transaction... |
INSERT INTO EMP VALUES (10, 'smith');
INSERT INTO EMP VALUES (20, 'jones');
INSERT INTO EMP VALUES (30, 'scott');
|
-- MySQL dump 10.13 Distrib 8.0.24, for Linux (x86_64)
--
-- Host: localhost Database: qyg_qinagpai
-- ------------------------------------------------------
-- Server version 8.0.24
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */... |
<reponame>jestevez/portfolio-trusts-funds
-- DROP PROCEDURE GPSQLWEB.procUpdateGpprpopc
CREATE PROCEDURE GPSQLWEB.procUpdateGpprpopc
(
IN P_ROWID BIGINT,
IN P_OPCARE varchar(4),
IN P_OPCOPC varchar(1),
IN P_OPCEDA INTEGER,
IN P_OPCCLI varchar(12),
IN P_OPCEDD INTEGER,
IN P_OPCEDH INTEGER,
IN P_OPCFIJ d... |
<reponame>ysuMgl/guns-modified
INSERT INTO `guns`.`sys_menu` (`id`, `code`, `pcode`, `pcodes`, `name`, `icon`, `url`, `num`, `levels`, `ismenu`, `tips`, `status`, `isopen`) VALUES ('1294166384023969793', 'equiptypes', '0', '[0],', '设备类型管理', '', '/equiptypes', '99', '1', '1', NULL, '1', '0');
INSERT INTO `guns`.`sys_men... |
<reponame>mvrabel/nifi-dwh-etl-template
CREATE OR REPLACE FUNCTION core.tf_t_mailing_list_t()
RETURNS INTEGER AS $$
/*
=================================================================================================================================
DESCRIPTION: Insert data from core mailing_list_i ... |
<gh_stars>100-1000
UPDATE stretchy_report SET core_report=1, use_report=0 WHERE report_name in ('ClientTrendsByDay','ClientTrendsByWeek','ClientTrendsByMonth','LoanTrendsByDay','LoanTrendsByWeek','LoanTrendsByMonth','Demand_Vs_Collection','Disbursal_Vs_Awaitingdisbursal'); |
#
# Copyright 2017 Amazon.com
#
# 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 writ... |
-- these do things
SELECT count(*) FROM events WHERE events ==> 'beer';
SELECT count(*) FROM events WHERE events ==| ARRAY['beer', 'wine', 'cheese'];
SELECT count(*) FROM events WHERE events ==& ARRAY['foo', 'bar'];
SELECT count(*) FROM events WHERE events ==! ARRAY['beer', 'wine', 'cheese'];
-- these raise errors
sel... |
<filename>development/dbchangelog/2018-01-13_14-45_containers-si-idx.sql
-- MySQL Workbench Synchronization
-- Generated: 2018-01-13 14:44
-- Model: New Model
-- Version: 1.0
-- Project: PPJK
-- Author: Fredy
ALTER TABLE `jobContainer`
ADD CONSTRAINT `fk_jobContainer_shipr`
FOREIGN KEY (`shipper_id`)
REFERENCES `... |
INSERT INTO patients (id, full_name, ssn) VALUES ('780b28cb531c4e4fb1513529b09b8a34', 'patient1', '123456789012');
INSERT INTO physicians (id, full_name, license_no) VALUES ('0e1ddb5ff64941e382b36018f1ee8663', 'physician1', '01');
INSERT INTO laboratories (id, full_name) VALUES ('0e1ddb5ff64941e382b36018f1ee8664', 'l... |
-- A: step 1: read in dataset by creating a table with all variables
CREATE TABLE datfl(policyID,statecode,county,eq_site_limit,hu_site_limit,
fl_site_limit,fr_site_limit,tiv_2011,tiv_2012,eq_site_deductible,
hu_site_deductible,fl_site_deductible,fr_site_deductible,
point_lati... |
<filename>db/changes/1534777987_district_publish/deploy.sql
# dest.prereq: db/changes/1528823624_lc_enums
ALTER TABLE user_question_set DROP FOREIGN KEY IF EXISTS user_question_set_ibfk_2;
ALTER TABLE user_question_set DROP FOREIGN KEY IF EXISTS user_question_set_ibfk_1;
ALTER TABLE user_question_set DROP PRIMARY KEY;... |
<reponame>douggonsouza/account
DROP TABLE IF EXISTS `addresses`;
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
`user_id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(120) CHARACTER SET utf8 NOT NULL,
`profile_id` int(11) NOT NULL,
`email` varchar(160) CHARACTER SET utf8 NOT NULL,
`birth` date DEFA... |
create keyspace if not exists pluralsight with replication = {'class':'SimpleStrategy', 'replication_factor':1};
use pluralsight;
CREATE TABLE IF NOT EXISTS courses (
id varchar,
name varchar static,
author varchar static,
audience int static,
duration int static,
cc boolean static,
released timestamp st... |
<filename>Accounts.RyanErskine.Dev.DbUp/Scripts/11222019/016 - ApiProperties.sql
USE [IdentityServer]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ApiProperties](
[Id] [int] IDENTITY(1,1) NOT NULL,
[Key] [nvarchar](250) NOT NULL,
[Value] [nvarchar](2000) NOT NULL,
[ApiResourceId] [int... |
<reponame>puri-tan/heroku-storage<filename>queries/discord/prayer/petitions/create.sql<gh_stars>0
insert into discord.prayer_petitions (prayer_id, petition_date, user_id, message)
values (${prayerId}, ${petitionDate}, ${userId}, ${message})
|
<reponame>CommerceRack/backend
create table BLAST_MACROS (
MID integer default 0 not null,
PRT tinyint default 0 not null,
MACROID varchar(15) default '' not null,
TITLE varchar(50) default '' not null,
BODY text default '' not null,
CREATED_TS datetime default now(),
LUSER varchar(10) default '' not... |
<gh_stars>1-10
select datname as name
, pg_size_pretty(raw_size) as size
, datname = current_database() as is_current_database
from (select datname
, pg_database_size(datname) as raw_size
from pg_database
where datistemplate = false
and has_database_privilege (datn... |
CREATE TABLE [dbo].[User] (
[UserId] INT NOT NULL,
[Name] VARCHAR (100) NOT NULL,
[PasswordHash] VARCHAR (100) NOT NULL,
PRIMARY KEY CLUSTERED ([UserId] ASC)
);
|
<reponame>AlaeddineMessadi/advancedmusic_api<filename>app/tests/_data/dump.sql
-- MySQL dump 10.13 Distrib 5.7.21, for Linux (x86_64)
--
-- Host: localhost Database: skeleton
-- ------------------------------------------------------
-- Server version 5.6.22-71.0
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_S... |
<reponame>alex8224/gTornado
/*
SQLyog Ultimate v9.01
MySQL - 5.6.27-0ubuntu0.14.04.1
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
create table `address_book` (
`id` int (11),
`phone` varchar (54),
`home` varchar (300),
`office` varchar (300)
);
insert into... |
BEGIN
insert into [dbo].[tblUser] (Id, FirstName,LastName,Email,Password)
Values
(NEWID(), 'Alex', '<PASSWORD>', '<PASSWORD>', '<PASSWORD>');
END |
<gh_stars>10-100
CREATE TABLE [Scheduler].[Error] (
[Id] BIGINT IDENTITY (1, 1) NOT NULL,
[Error] NVARCHAR (MAX) NOT NULL,
[ScheduledCommand_AggregateId] UNIQUEIDENTIFIER NOT NULL,
[ScheduledCommand_SequenceNumber] BIGINT N... |
<reponame>danidr7/chevron
--changeset racerxdl:create_gpgkeyuid_table
DROP TABLE chevron_gpg_key_uid;
|
/* subject_master */
create table if not exists subject_master
(
subject_id bigint primary key not null,
subject_name double precision,
created_on TIMESTAMP without time zone ,
updated_on TIMESTAMP without time zone
-- ,foreign key (school_id) references school_master(school_id)
);
/* SAT exception ta... |
set term ^;
create or alter procedure new_procedure
as
begin
end^
set term ;^
comment on procedure new_procedure is 'test'; |
<reponame>Wikgung/wikgung.git.io
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 05 Feb 2022 pada 06.52
-- Versi server: 10.4.22-MariaDB
-- Versi PHP: 8.0.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 ... |
-- capi3.test
--
-- execsql {CREATE TABLE tablename(x)}
CREATE TABLE tablename(x) |
/**
Hotelverwaltung View 01
Generiert eine View, welche alle Reiseunternehmen mit Adresse und deren Ansprechperson anzeigt.
Authors: <NAME>, <NAME>, <NAME>, <NAME>
**/
-- View Löschen und wiederherstellen, Schema-Name 'hotel' gemäss Anforderungen
DROP VIEW IF EXISTS hotel.ReiseunternehmenAnsprechperson;
-- View erstel... |
CREATE TABLE IF NOT EXISTS logs (uid STRING, sid INTEGER, name STRING, salary INTEGER)
ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t'
STORED AS TEXTFILE;
LOAD DATA INPATH '${hivevar:INPUT_PATH}' OVERWRITE INTO TABLE logs;
|
-- 角色权限调整
-- access_authority
REPLACE INTO `aj_report`.`access_authority`(`parent_target`, `target`, `target_name`, `action`, `action_name`, `sort`, `enable_flag`, `delete_flag`, `create_by`, `create_time`, `update_by`, `update_time`, `version`) VALUES ('access', 'authorityManage', '权限管理', 'detail', '权限明细', 101, 1, 0, ... |
INSERT INTO currency_exchange
(id, currency_from, currency_to, coversion_multiple, environment)
VALUES (10001, 'USD','INR',65,'');
INSERT INTO currency_exchange
(id, currency_from, currency_to, coversion_multiple, environment)
VALUES (10002, 'EUR','INR',70,'');
INSERT INTO currency_exchange
(id, currency_from, curren... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.