sql stringlengths 6 1.05M |
|---|
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 10.6.3-MariaDB - mariadb.org binary distribution
-- Server OS: Win64
-- HeidiSQL Version: 11.3.0.6295
-- ------------------------------------------------... |
<filename>invoices.sql
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 25, 2021 at 07:37 AM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 7.4.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET ... |
<reponame>roaddee/dulkemot
INSERT INTO tweb_apbd(`berkas_id`,`lembaga_id`, `lembaga_kode`, `wilayah_kode`,`tahun`, `rekening_kode`, `uraian`, `nominal`,`nominal_sebelum`, `nominal_sesudah`, `nominal_perubahan`, `nominal_persen`, `keterangan`, `created_by`, `updated_by`) VALUES
('245','164','1.03.01','3402','2014','1.0... |
--
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET search_path = sdata, pg_catalog;
ALTER TABLE sdata.user_data ALTER COLUMN data_id DROP DEFAULT;
DROP TABLE sdata.u... |
-- Deploy postgraphile_organizations:update_organization_policy to pg
-- requires: postgraphile_user_system:users
-- requires: organizations
-- requires: organization_memberships
BEGIN;
create policy update_owner on app_public.organizations for update using (exists(
select 1
from app_public.organization_membershi... |
<reponame>peterdenev/ut-transfer
CREATE TABLE [transfer].[transfer](
transferId BIGINT IDENTITY(1000, 1) NOT NULL,
transferTypeId BIGINT NOT NULL,
acquirerCode VARCHAR(50),
transferIdAcquirer VARCHAR(50),
transferIdLedger VARCHAR(50),
transferIdIssuer VARCHAR(50),
transferIdMerchant VARCHAR(... |
<reponame>QiangCai/StreamCQL
create input stream S
(num int)
SOURCE KafkaInput
PROPERTIES ("operator.kafka.groupid" = "gidkpi_1_1","operator.kafka.topic"="agg_1_1","operator.kafka.zookeepers"="192.168.0.2:2181");
create output stream rs
(id int)
SINK ConsoleOutput;
--多级相除
insert into stream rs sel... |
<gh_stars>1-10
--
-- Copyright 2020 Netflix, Inc.
--
-- 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 ... |
<reponame>anukritijha/enmasse
CREATE TABLE IF NOT EXISTS device_states (
tenant_id varchar(256) NOT NULL,
device_id varchar(256) NOT NULL,
last_known_gateway varchar(256),
adapter_instance_id varchar(256),
PRIMARY KEY (tenant_id, device_id)
);
-- create index for tenant only lookups
CREATE INDEX idx_device_sta... |
-- start query 1 in stream 0 using template query27.tpl
select
i_item_id,
s_state,
-- grouping(s_state) g_state,
avg(ss_quantity) agg1,
avg(ss_list_price) agg2,
avg(ss_coupon_amt) agg3,
avg(ss_sales_price) agg4
from
store_sales
join store on (store_sales.ss_store_sk = store.s_store_sk)
join customer... |
-- Name: GetExistenceClassModalityUniquenessOfReferencedFile
-- Schema: posda_files
-- Columns: ['file_id', 'collection', 'site', 'patient_id', 'sop_class', 'modality', 'sop_class_uid', 'series_instance_uid']
-- Args: ['sop_instance_uid']
-- Tags: ['LinkageChecks', 'used_in_dose_linkage_check', 'used_in_plan_linkage_ch... |
<gh_stars>1-10
SELECT PC.postId,
PC.userId,
PC.parent,
PC.created,
PC.updated,
PC.content,
PCC.depth
FROM PostComments PC
JOIN PostCommentClosures PCC ON (PC.postCommentId = PCC.child)
WHERE PCC.child = ?
ORDER BY PCC.depth DESC
LIMIT 1 |
with prep as (
select
session_id,
count(distinct screen_views_in_session) as dist_svis_values,
count(*) - count(distinct screen_view_in_session_index) as all_minus_dist_svisi,
count(*) - count(distinct screen_view_id) as all_minus_dist_svids
from {{ ref('snowplow_mobile_screen_views') }}
gro... |
<reponame>adrianmahjour/db2-samples<filename>db_library/views/db_event_monitor_ddl.sql<gh_stars>10-100
--# Copyright IBM Corp. All Rights Reserved.
--# SPDX-License-Identifier: Apache-2.0
/*
* Generates DDL for all event monitors on the database
*
* db2look does not do this https://www.ibm.com/support/pages/how-ca... |
/*
* Copyright 2022 Google LLC
*
* 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 i... |
ALTER TABLE `personas` MODIFY `submit` datetime NULL;
|
<filename>SQL/1661. Average Time of Process per Machine.sql
WITH a AS(
SELECT
*
FROM
activity
WHERE
activity_type = 'start'
),
b as(
SELECT
*
FROM
activity
WHERE
activity_type = 'end'
)
SELECT
a.machine_id,
ROUND(AVG(b.timestamp - a.timestamp), 3) as processing_time
FROM
a,
b... |
--@getEstimateState
SELECT
*
FROM
SH_MADERA.dbo.TB_ETAT_DEVIS
--@getClientsInformations
SELECT
*
FROM
SH_MADERA.dbo.TB_INFORMATIONS_CLIENTS
--@getAllInformationsClient
--SELECT
-- *
--FROM
-- SH_MADERA.dbo.TB_INFORMATIONS_CLIENTS
--WHERE
-- ID_CLIENT |
USE computer_manager;
INSERT INTO studentinfo VALUES('31100001','张三','电子信息工程','tel:1777777777');
INSERT INTO studentinfo VALUES('31100001','李四',NULL,'tel:1777777777');
INSERT INTO studentpass VALUES('zhangsan','<PASSWORD>','<PASSWORD>');
INSERT INTO studentpass VALUES('<PASSWORD>','<PASSWORD>','<PASSWORD>');
INSERT ... |
<gh_stars>0
INSERT INTO address (id,country, state, city, street, number, unity, postal_code)
VALUES( '1','España', 'Galicia','A Coruña','Avda. Monelos', '19-23', '4A','15009');
INSERT INTO address (id,country, state, city, street, number, unity, postal_code)
VALUES( '2','España', 'Galicia','Santiago de Compostel... |
<filename>evo/install/sql/new_override.sql<gh_stars>0
# MODX Database Script for Override Installations
REPLACE INTO `{PREFIX}site_templates`
(id, templatename, description, editor_type, category, icon, template_type, content, locked) VALUES ('1','Minimal Template','Default minimal empty template','0','0','','0','<!... |
<reponame>navikt/fas<filename>src/main/resources/db/migration/envconfDB/V5_00_01__Add_access_control_to_entities.sql<gh_stars>0
-- Embedding access control to entities because of hibnernate envvers fuckup with relations
-- Ressurs
alter table resource_table ADD (
access_envclass VARCHAR(255),
access_groups VARCHA... |
<reponame>bluedreamer/FoodData
CREATE DATABASE `usda` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci */; |
-- Cria um usuário novo usuário local com a definição de um código de acesso para esse usuário
create user 'empresa_admin_local'@'localhost' indentified by '1234';
-- No código abaixo são dadas as permissões mas não remotamente
grant all privileges on EquipeBD.* to 'empresa_admin_local'@'localhost';
|
<gh_stars>0
--20. Write a SQL query to find all employees along with their manager.
SELECT e.FirstName +' '+ e.LastName AS Employee, m.FirstName +' '+ m.LastName AS Manager
FROM dbo.Employees e, dbo.Employees m
WHERE e.ManagerID = m.EmployeeID |
<reponame>damianb/hb2
--
-- vw_post - gets a post and the image data for it
--
SELECT p.*
, bi.filename AS bi_filename
, bi.md5 AS bi_md5
, bi.sha1 AS bi_sha1
, bi.width AS bi_width
, bi.height AS bi_height
, bi.size AS bi_size
, si.filename AS si_filename
, si.md5 AS si_md5
, si.sha1 AS si_sha1
, si.width AS... |
INSERT INTO `s_product_streams` (`id`, `name`, `conditions`, `type`, `sorting`, `description`, `sorting_id`)
VALUES (1, 'TestStream', '{\"Shopware\\\\Bundle\\\\SearchBundle\\\\Condition\\\\ProductAttributeCondition|attr3\":{\"field\":\"attr3\",\"operator\":\"<\",\"value\":\"3\"},\"Shopware\\\\Bundle\\\\SearchBundle\\\\... |
<filename>A Practical Starter Guide to SQL Notebooks/Demo Reset Scripts/PR - Return_The_Catch_All_Search - Before the fix.sql<gh_stars>1-10
USE Superheroes
GO
CREATE OR ALTER PROCEDURE dbo.Return_The_Catch_All_Search
@LastName varchar(50) = NULL,
@FirstName varchar(50) = NULL,
@AlterEgo varchar(50) = NULL,
@Includ... |
drop table if exists mps;
create table mps (
id numeric,
first_name text,
last_name text,
party text,
constituency text,
uri text
)
|
create view "postgres"._airbyte_test_normalization."conflict_stream_name___conflict_stream_name_ab3__dbt_tmp" as (
-- SQL model to build a hash column based on the values of this record
select
*,
md5(cast(
coalesce(cast(_airbyte_conflict_stream_name_2_hashid as
varchar
), '') || '-' || coa... |
-- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: frameuser
-- ------------------------------------------------------
-- Server version 5.7.17-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS *... |
create table INCIDENT_CASE_RESPONSES
(
INCIDENT_CASE_ID NUMBER(10) not null,
QUESTION_SEQ NUMBER(6) not null,
RESPONSE_SEQ NUMBER(6) not null,
RESPONSE_DATE DATE,
... |
<gh_stars>1-10
CREATE TYPE "ORACLE_TOOLS"."T_TYPE_BODY_OBJECT" authid current_user under oracle_tools.t_named_object
( constructor function t_type_body_object
( self in out nocopy oracle_tools.t_type_body_object
, p_object_schema in varchar2
, p_object_name in varchar2
)
return self as result
, overriding mem... |
<filename>hasura/migrations/default/1623473963894_create_table_public_featured/up.sql<gh_stars>10-100
CREATE TABLE "public"."featured"("id" UUID NOT NULL DEFAULT gen_random_uuid(), "light" boolean NOT NULL DEFAULT false, "start_date" timestamptz NOT NULL DEFAULT now(), "end_date" timestamptz NOT NULL DEFAULT now() + in... |
CREATE TABLE omimField (
omimId varchar(40) NOT NULL, # OMIM ID
fieldType char(2) NOT NULL, # Field type
startPos int(12) NOT NULL, # starting offset position
length int(12) NOT NULL, # length of the text of this field
KEY omimId (omimId(10)),
KEY totalID (omimId(10), fieldType)
) TYPE=MyISAM... |
<filename>1369-get-the-second-most-recent-activity.sql
# Write your MySQL query statement below
SELECT *
FROM UserActivity
GROUP BY username
HAVING COUNT(*) = 1
UNION ALL
SELECT u1.*
FROM UserActivity u1
LEFT JOIN UserActivity u2
ON u1.username = u2.username AND u1.endDate < u2.endDate
GROUP BY u1.username, ... |
-- Deploy ggircs-portal:view_ciip_facility to pg
-- requires: table_form_result
begin;
create view ggircs_portal.ciip_facility as (
with x as (
select
form_result.application_id as id,
json_array_elements((form_result -> 'facility_information')::json) as facility_data
from ggircs_por... |
SELECT name FROM (SELECT name FROM data2013 UNION ALL SELECT data_name FROM data2015) ORDER BY name ASC;
|
CREATE OR REPLACE VIEW genomic_exons_flat_v AS
SELECT ac,COUNT(ord) as n_exons,
array_to_string(array_agg(start_i order by ord),',') as starts_i,
array_to_string(array_agg(end_i order by ord),',') as ends_i,
array_to_string(array_agg(end_i-start_i order by ord),',') as lengths
FROM genomic_exon
GRO... |
<filename>apgdiff.tests/src/main/resources/cz/startnet/utils/pgdiff/depcies/add_view_with_dep_usr_v4_new.sql
CREATE VIEW public.v4 AS
SELECT
sum(t1.c1) OVER w AS sum,
avg(t1.c2) OVER w AS avg
FROM public.t1
WINDOW w AS (PARTITION BY t1.c3 ORDER BY t1.c1 DESC);
|
--+ holdcas on;
set system parameters 'unicode_input_normalization=yes';
set system parameters 'unicode_output_normalization=yes';
set names utf8;
drop table if exists t;
create table t (i int, s char(20) collate utf8_en_ci);
insert into t values (1,'Axx');
insert into t values (2,'aExx');
insert into t values (3,'x... |
<filename>sql/_07_misc/_01_statistics/cases/1038.sql
--test update statistics on partition of hash partition class
create class test_hash (
line_id varchar(10) not null,
station_id integer,
station_name varchar(30)
)
partition by hash (station_id)
partitions 4;
insert into test_hash values ('Line ... |
--+ holdcas on;
show collation abc;
show collation show;
show collation 1;
show collation wher charset='iso88591';
show collation order by 1;
show collation where charset='iso88591' order by 1 desc;
show collation where charset='iso88591' order by charset desc;
show collation 'aa';
set @a='show';
show collation @a;
pre... |
<reponame>Steepik/phonebook
-- phpMyAdmin SQL Dump
-- version 4.4.15.7
-- http://www.phpmyadmin.net
--
-- Хост: 127.0.0.1:3306
-- Время создания: Дек 02 2016 г., 22:59
-- Версия сервера: 5.5.50
-- Версия PHP: 7.0.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
USE [master]
GO
SELECT [server_principals].NAME
FROM sys.server_principals
WHERE NAME = 'publicrole' |
<filename>SQLScripts/create_table_feed_category.sql
USE [jarwin]
GO
/****** Object: Table [dbo].[feed_category] Script Date: 3/10/2014 7:44:35 a.m. ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[feed_category](
[feed_id] [int] NOT NULL,
[feed_item_id] [int] NOT NULL,
... |
<reponame>rawat9/HackerRank
SELECT t1.N,
CASE WHEN t1.P IS NULL THEN 'Root'
WHEN t1.N = t2.P THEN 'Inner'
ELSE 'Leaf' END
AS type
FROM BST t1
LEFT JOIN (SELECT DISTINCT(P) FROM BST) t2
ON t1.N = t2.P
ORDER BY 1; |
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', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row... |
<reponame>Shuttl-Tech/antlr_psql<gh_stars>10-100
-- file:alter_generic.sql ln:131 expect:true
CREATE FOREIGN DATA WRAPPER alt_fdw2
|
<reponame>aravi5/drill-test-framework
select
c_timestamp,
COUNT(*)
from alltypes_with_nulls
group by
c_timestamp
order by
c_timestamp
asc nulls last;
|
/*
Navicat MySQL Data Transfer
Source Server : local
Source Server Version : 50640
Source Host : localhost:3306
Source Database : admin
Target Server Type : MYSQL
Target Server Version : 50640
File Encoding : 65001
Date: 2018-08-13 11:22:44
*/
SET FOREIGN_KEY_CHECKS=0;
-- -------... |
<reponame>echo-akash/DB-for-NGO
CREATE TABLE Person(
Person_Id varchar2(255),
F_Name varchar2(255) NOT NULL,
L_Name varchar2(255) NOT NULL,
DOB date NOT NULL,
Road varchar2(255) NOT NULL,
House varchar2(255) NOT NULL,
City varchar2(255) NOT NULL,
Country varchar2(255) NOT NULL,
NID varchar2(255) NOT NULL,
Div... |
<filename>hr_demo/issues/HRS-3/drop_termdate_add_phone_idx.sql
--Source: HR_DEV2@TEAMWORKRM:1521/ORCL (latest repository revisions)
--Target: HR_RM@TEAMWORKRM:1521/ORCL
--Script generated by \ on 24/08/2017 19:42
--Note: Please review this script prior to execution
HOST mkdir "C:\automation\hr\Spool"
SPOOL C:\automa... |
<reponame>naved92/airlines
CREATE TABLE SEAT_CLASSES
(
SEAT_CLASS_ID INT PRIMARY KEY,
SEAT_CLASS_NAME VARCHAR(255)
);
CREATE SEQUENCE SEQ_CLS_ID; |
<reponame>cmichon/h2lander<filename>init.sql<gh_stars>0
DROP ALL OBJECTS;
CREATE TABLE TAXNUM (
TSN CHAR(6) PRIMARY KEY NOT NULL
, NAME VARCHAR(255) NOT NULL
, "TYPE" VARCHAR(255) NOT NULL
, PARENT CHAR(6)
);
INSERT INTO TAXNUM SELECT * FROM CSVREAD('taxnum.csv');
CREATE INDEX TAXNUM_ON_PARENT ON TAXNUM... |
CREATE TABLE IF NOT EXISTS `product` (
`product_id` int(11) NOT NULL,
`category_id` int(11) NOT NULL,
`product_name` varchar(250) NOT NULL,
`product_price` varchar(30) NOT NULL,
`product_image` varchar(250) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=latin1;
--
-- Dumping data for table `produ... |
-- For example, a YEARLY rule that repeats on first and third month have 2 start values.
CREATE OR REPLACE FUNCTION _rrule.all_starts(
"rrule" _rrule.RRULE,
"dtstart" TIMESTAMP
) RETURNS SETOF TIMESTAMP AS $$
DECLARE
year int := EXTRACT(YEAR FROM "dtstart")::integer;
year_end timestamp := make_timestamp(year, ... |
/*
Navicat Premium Data Transfer
Source Server : ztgz.amsure.cn
Source Server Type : MySQL
Source Server Version : 50732
Source Host : ztgz.amsure.cn:33060
Source Schema : campus_organization
Target Server Type : MySQL
Target Server Version : 50732
File Encoding : 6500... |
/*
Navicat Premium Data Transfer
Source Server : localhost_3306
Source Server Type : MySQL
Source Server Version : 100406
Source Host : localhost:3306
Source Schema : testlar
Target Server Type : MySQL
Target Server Version : 100406
File Encoding : 65001
Date: 17/10/... |
<gh_stars>1-10
-- Your SQL goes here
CREATE TABLE IF NOT EXISTS categories (
id CHAR(36) NOT NULL PRIMARY KEY,
name VARCHAR(60) NOT NULL,
parent_id CHAR(36),
is_leaf BOOLEAN NOT NULL,
FOREIGN KEY (parent_id) REFERENCES categories(id)
);
|
<filename>src/test/resources/select2.test_20.sql
-- select2.test
--
-- execsql {
-- CREATE TABLE aa(a);
-- CREATE TABLE bb(b);
-- INSERT INTO aa VALUES(1);
-- INSERT INTO aa VALUES(3);
-- INSERT INTO bb VALUES(2);
-- INSERT INTO bb VALUES(4);
-- SELECT * FROM aa, bb WHERE max(a,b)>2;
-- }
C... |
-- file:create_type.sql ln:125 expect:true
DROP FUNCTION base_fn_out(opaque)
|
DROP TABLE blsoccupationhandbook;
|
<reponame>davidadel95/Anahid-Gardens
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: May 13, 2018 at 05:02 PM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OL... |
COPY stns.STNS_II90 (PKEY, STATION_NUM, NAME, STATE, COUNTRY, LATITUDE, LONGITUDE, ELEVATION, PRI) FROM stdin with delimiter as ',';
1,69002, HUNTER_LIGGET/TUSI&,CA,US,36,-121.23,310,0
2,69007, FORT_ORD/FRITZSCHE&,CA,US,36.68,-121.77,41,0
3,69008, CAMP_ROBERTS,CA,US,35.75,-120.7,220,0
4,69012, EGLIN_AFB_RNG_C52A&,FL,US... |
DROP TABLE IF EXISTS tg_user;
CREATE TABLE tg_user (
chat_id VARCHAR(100),
active BOOLEAN
);
|
// For 3 servers infrastructure with 1 datacenter :
// with replication = {'class': 'NetworkTopologyStrategy', 'datacenter1': '2'}
// For single server :
// with replication = {'class': 'SimpleStrategy', 'replication_factor' : 1}
drop keyspace if exists bigdatarocks;
create keyspace if not exists bigdatarocks
w... |
-- Data una mansione trovare tutti i dispositivi di sicurezza ad essa associati
SELECT * FROM task_groupn, groupn, device_groupn
WHERE groupn.title = task_groupn.groupn_title
AND device_groupn.groupn_title = groupn.title
AND task_groupn.task_name = 'ELETT_05';
|
<gh_stars>1-10
insert into desarrollador(nombre) values('<NAME>, <NAME>');
insert into negocio(nombre_negocio) values ('comercial daniel');
/*obligatorio*/
insert into estado_orden_salida_detalle_almacen_productos(nombre_estado, descripcion)values('no atendido','no revisado en almacen');
insert into estado_orden_sa... |
/*
Library: Cervical Cancer Screening and Management Dashboard
Author: CMS Alliance to Modernize Healthcare, operated by THE MITRE Corporation.
(C) 2021 The MITRE Corporation. All Rights Reserved.
Approved for Public Release: 21-1556.
Distribution Unlimited.
Unless otherwise noted, this work is available ... |
<filename>gcp-test/tests/gcp_compute_instance/test-list-query.sql
select name, description
from gcp.gcp_compute_instance
where title = '{{ resourceName }}'; |
<filename>sql/drop/mssql_engine_7.11.0.sql<gh_stars>0
--
-- Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
-- under one or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information regarding copyright
-- ownership. Camunda licenses this f... |
<reponame>eqfy/Foo-Inc-Employee-Directory<filename>Database/getallOfficeLocation.sql<gh_stars>0
SELECT lo."Label"
From "LocationOffice" lo, "LocationCompany" lc
Where lo."CompanyCode" = lc."CompanyCode" AND lc."Label" = :p0 |
<filename>openGaussBase/testcase/KEYWORDS/catalog_name/Opengauss_Function_Keyword_Catalog_name_Case0019.sql
-- @testpoint:opengauss关键字catalog_name(非保留),作为外部数据源名
--关键字不带引号-成功
drop data source if exists catalog_name;
create data source catalog_name;
--清理环境
drop data source catalog_name;
--关键字带双引号-成功
drop data source i... |
-- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Aug 14, 2017 at 11:50 AM
-- Server version: 5.6.21
-- PHP Version: 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 */;
... |
CREATE TABLE t_orders (
order_id varchar(32) PRIMARY KEY,
perform_uid varchar(30),
perform_order bigint,
data_order blob,
data_perform blob
);
CREATE UNIQUE INDEX idx_t_orders_performing ON t_orders (perform_uid, perform_order);
CREATE UNIQUE INDEX idx_t_orders_listing ON t_orders (perform_uid, order_id... |
CREATE TABLE MIS_WAREHOUSE.STATE_FILES_DAILY_DATA (
ID NUMBER GENERATED BY DEFAULT ON NULL AS IDENTITY,
TIME_STAMP DATE NOT NULL,
ENTITY_TAG VARCHAR2(100) NOT NULL,
METRIC_NAME VARCHAR2(100) NOT NULL,
DATA_VALUE NUMBER(25,4),
UNIQUE(ENTITY_TAG,METRIC_NAME,TIME_STAMP)
);
|
insert into msg (name, namespace) values ('statusxxx', 'hydrabot_status');
insert into msg_component (msg_id, remote_id) values (1, 917857968601571338);
insert into msg_component (msg_id, remote_id) values (1, 917857969377529917);
insert into msg_component (msg_id, remote_id) values (1, 919001487894532116);
insert into... |
<reponame>Rodrigo-Santoos/Mysql<filename>Database/Create, select table.sql
create database Hospital_Cruz_de_Jesus
SELECT * FROM academy.aluno |
<reponame>Adil-Ahnaf/A-Dynamic-Portfolio-Laravel-8
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 1172.16.17.32
-- Generation Time: Aug 10, 2021 at 03:38 PM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 7.3.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_... |
SELECT * FROM TITANIC FETCH FIRST 5 ROWS ONLY; |
SELECT TOP(30)
CountryName,
Population
FROM Countries
WHERE ContinentCode = 'EU'
ORDER BY Population DESC, CountryName |
<filename>Database/infraiq.sql
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 12, 2018 at 03:00 PM
-- Server version: 10.1.25-MariaDB
-- PHP Version: 7.1.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone ... |
USE fakultet;
SELECT mbrStud,
CONCAT(imeStud,' ',prezStud) AS `Ime i prezime`
FROM stud; |
-- This file is best used with the VS Code extension SQLTools (https://vscode-sqltools.mteixeira.dev/)
-- @block select products
select
*
from
product;
-- @block delete all
delete from
stock_movement;
delete from
product;
-- @block insert some product
insert into
product(name, wanted_amount)
values
('... |
Use DrillingInfo
if not exists (select *
from INFORMATION_SCHEMA.TABLES
where TABLE_SCHEMA = N'dbo' and TABLE_NAME = N'Transactions')
begin
create table Transactions(
Mi4TransactionID int primary key identity,
AcreageReportedBy varchar(max) null,
AcresGross float null,
AcresGrossUndeveloped float nu... |
/****** Object: Stored Procedure dbo.b4nGetBasketDeliveryCharges Script Date: 23/06/2005 13:31:23 ******/
CREATE procedure dbo.b4nGetBasketDeliveryCharges
@nCustomerId int,
@nStoreId int,
@nCountryId int,
@nSubCountryId int,
@nDeliveryType int,
@nProductCount int
as
set nocount on
begin
decla... |
USE Ticket_reservation
GO
INSERT INTO [Airport]
VALUES ('SZX','深圳','宝安'),
('HGH','杭州','萧山'),
('CSX','长沙','黄花'),
('PVG','上海','浦东'),
('CAN','广州','白云'),
('CKG','重庆','江北'),
('WUH','武汉','天河'),
('SYX','三亚','凤凰'),
('SIA','西安','咸阳'),
('NKG','南京','禄口'),
('TNA','济南','遥墙'),
('KMG','哈尔滨','太平'),
('CTU','成都','双流')
GO
INSERT INTO [... |
<filename>examples/win_rate.sql
-- Calculate all time win rate in singles.
-- Replace 'DJSwerve' with your tag unless your tag is DJSwerve.
with my_games as (
select me.*
from players me, players op
where op.id != me.id
and me.game_id = op.game_id
and me.team is null
and me.tag = 'DJSwerve')
s... |
<reponame>UWIT-IAM/uw-redcap-client
-- Verify seattleflu/schema:roles/presence-absence-processor on pg
begin;
select 1/pg_catalog.has_database_privilege('presence-absence-processor', :'DBNAME', 'connect')::int;
select 1/pg_catalog.has_schema_privilege('presence-absence-processor', 'receiving', 'usage')::int;
select 1... |
SELECT
resourceId,
configuration.launchConfigurationName
WHERE
resourceType = 'AWS::AutoScaling::AutoScalingGroup'
|
<filename>2020/dec13.sql<gh_stars>10-100
DROP TABLE IF EXISTS dec13;
CREATE TABLE dec13 (
line_number integer NOT NULL GENERATED ALWAYS AS IDENTITY,
line text NOT NULL
);
\COPY dec13 (line) FROM PROGRAM 'curl -b session.cookie https://adventofcode.com/2020/day/13/input';
VACUUM ANALYZE dec13;
\timing on
/* F... |
-- file:plpgsql.sql ln:2361 expect:false
raise notice ' for _r in select * from conttesttbl order by v limit 1 loop
raise notice '%', _r.v
|
/* DML : Data Manipulation langage */
USE db_oeuvre;
INSERT INTO artistics_currents
VALUE
(1, 'Impressionisme'),
(2, 'Cubisme'),
(3, 'Art abstrait'),
(4, 'Futurisme'),
(5, 'Surréalisme');
INSERT INTO artists
VALUE
(1, '<NAME>'),
(2, '<NAME>'),
|
<reponame>DEFRA/prsd-iws
CREATE TABLE [Notification].[Movement]
(
[Id] UNIQUEIDENTIFIER NOT NULL,
[ShipmentNumber] INT NOT NULL,
[NotificationId] UNIQUEIDENTIFIER NOT NULL,
[Date] DATE NULL,
[Quantity] DECIMAL(18, 4) NULL,
[Units] INT NULL,
[NumberOfPackages] INT NULL,
CONSTRAINT [PK_... |
select * from (select * from dfs.drillTestDir.`DRILL_6118_parquet_partitioned_by_folders`) where c1>2; |
<filename>resources/iq-defcon-schema.sql
DROP DATABASE `iq-defcon`;
CREATE SCHEMA `iq-defcon` DEFAULT CHARACTER SET utf8 ;
USE `iq-defcon` ;
CREATE TABLE `iq-defcon`.`user` (
`id` INT ZEROFILL NOT NULL AUTO_INCREMENT,
`username` VARCHAR(45) NOT NULL,
`password` VARCHAR(45) NOT NULL,
PRIMARY KEY (`id`))
ENGINE ... |
SELECT COUNT(*) FROM no_nulls3 WHERE binary_10 > X''
99
|
<reponame>aehrc/release-validation-framework
/*
The current MRCM Domain Refset snapshot file is an accurate derivative of the current full file
*/
/* view of current snapshot, derived from current full */
drop table if exists temp_mrcmdomainrefset_v;
create table if not exists temp_mrcmdomainrefset_v like curr... |
CREATE PROCEDURE SP170(OUT MYCOUNT INTEGER) SPECIFIC SP170_94886 LANGUAGE SQL NOT DETERMINISTIC READS SQL DATA NEW SAVEPOINT LEVEL BEGIN ATOMIC DECLARE MYVAR INT;SELECT COUNT(*)INTO MYCOUNT FROM TABLE347;SELECT COUNT(*)INTO MYCOUNT FROM TABLE214;SELECT COUNT(*)INTO MYCOUNT FROM TABLE309;SELECT COUNT(*)INTO MYCOUNT FROM... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.