sql stringlengths 6 1.05M |
|---|
<gh_stars>0
/*
Navicat MySQL Data Transfer
Source Server : kpptech_bos
Source Server Version : 50638
Source Host : operation.kpptechnology.co.id:3306
Source Database : kpptech_gina
Target Server Type : MYSQL
Target Server Version : 50638
File Encoding : 65001
Date: 2018-02-14 14:44... |
-- Create syntax for TABLE 'core_account'
CREATE TABLE `core_account`(
`id` INT(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '账户ID',
`username` varchar(32) NOT NULL COMMENT '用户名',
`phone` varchar(11) COMMENT '电话',
`password` varchar(32) NOT NULL COMMENT '密码',
`salt` varchar(5) NOT NULL COMMENT '盐',
`gender` ti... |
<filename>lcb.sql
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jan 04, 2020 at 10:25 AM
-- Server version: 10.4.6-MariaDB
-- PHP Version: 7.3.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... |
<reponame>ghifarel/dealer
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 17 Jan 2021 pada 12.34
-- Versi server: 10.4.11-MariaDB
-- Versi PHP: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";... |
select e.Name as Employee from Employee e, Employee m where e.ManagerId == m.Id and e.Salary > m.Salary; |
USE [DBAdmin]
GO
if exists( select *
from sys.objects
where [object_id] = object_id( N'dbo.usp_backup_datatable' ) and
[type] in ( N'P', N'PC' ) )
begin
drop proc dbo.usp_backup_datatable ;
print 'Dropped procedure dbo.usp_backup_datatable SUCCESSFULLY!' ;
end ;
go
create proc dbo.usp_backup_datatable... |
<reponame>leomauro/handsonscala<gh_stars>10-100
pg> \d
+----------+-----------------+--------+----------+
| Schema | Name | Type | Owner |
|----------+-----------------+--------+----------|
| public | city | table | postgres |
| public | country | table | postgres |
| public ... |
-- Remove the Competition 1 and all the competition templates. They now exist in the test data dump file
delete from form_input_validator where form_input_id in (select fi.id from form_input fi join question q on q.id = fi.question_id where q.competition_id in (1,2,3,4,5,6,7,8));
delete from guidance_row where id in ... |
IF EXISTS (SELECT * FROM sys.databases WHERE name = 'nhs_virtual_visit_test')
BEGIN
DROP DATABASE nhs_virtual_visit_test;
END;
CREATE DATABASE nhs_virtual_visit_test;
GO |
<filename>tests/queries/168-double-is-not-99-2.sql
select count(*) from nulls2 where double_6 is not 99.0
98
|
<reponame>mirkolai/show-geolocated-events<gh_stars>0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;... |
<reponame>RomanBelkov/YaccConstructor
SET SCAN OFF
SET TIMING ON
PROMPT install tables
@JRXML_RESOURCE_FILES.sql
@JRXML_RESOURCE_ENTRIES.sql
@JRXML_NLS_PARAMETERS.sql
PROMPT install packages
@AS_PDF3_MOD.pls
@PK_JRXML2PDF_LOG.pls
@PK_JRXML2PDF_UTIL.pls
@PK_JRXML2PDF_REPGEN.pls
PROMPT install NLS-seed... |
-- MySQL dump 10.13 Distrib 5.7.12, for osx10.9 (x86_64)
--
-- Host: localhost Database: MeetHubDatabase
-- ------------------------------------------------------
-- Server version 5.7.15
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESUL... |
-- DROP PROCEDURE GPSQLWEB.procUpdateCuentas
CREATE PROCEDURE GPSQLWEB.procUpdateCuentas
(
IN P_CTCCLI DECIMAL(7 , 0),
IN P_CTCCTA VARCHAR(20),
IN P_CTCEMP VARCHAR(2),
IN P_CTCDEL VARCHAR(2),
IN P_CTCTIP VARCHAR(1),
IN P_CTCAGE DECIMAL(7 , 0),
IN P_CTCSAL NUMERIC(14 , 2),
IN P_CTCDIV DECIMAL(3 , 0),
IN P_CTCAUX VA... |
<gh_stars>1000+
/* Copyright 2017 OpenMarket Ltd
*
* 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 la... |
SELECT STR_TO_DATE('abc','abc');
SELECT STR_TO_DATE('','vvvvvv');
SELECT STR_TO_DATE('000%%','000%%');
SELECT STR_TO_DATE('abc 4','cde %s');
SELECT STR_TO_DATE('abc 11:33:44 am 19 23:59:59','cde %r %d %T'); |
-- This query defines the cohort used for the ALINE study.
-- This query is a simpler version of aline_cohort.sql, and does not generate a view.
-- Many of the variables from the aline study are trimmed to simplify the query.
-- See aline_cohort.sql for the actual cohort table generation.
-- Tables required:
-- ven... |
-- CreateTable
CREATE TABLE "Author" (
"id" SERIAL NOT NULL,
"name" TEXT NOT NULL,
PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "_AuthorToBook" (
"A" INTEGER NOT NULL,
"B" INTEGER NOT NULL
);
-- CreateIndex
CREATE UNIQUE INDEX "_AuthorToBook_AB_unique" ON "_AuthorToBook"("A", "B");
-- Creat... |
<gh_stars>0
-- -*-Sql-*- mode (to keep my emacs happy)
--
-- API Package Body for Term_Synonym.
--
-- Scaffold auto-generated by gen-api.pl. gen-api.pl is
-- Copyright 2002-2003 Genomics Institute of the Novartis Research Foundation
-- Copyright 2002-2008 <NAME>
--
-- This file is part of BioSQL.
--
-- BioSQL is fre... |
<reponame>rocknatt/safe-drone-delivery.com
INSERT INTO `mail` (`id`, `mail_classement_id`, `old_mail_classement_id`, `created_at`, `date_sent`, `sender_email`, `dest_email`, `email_owner`, `object`, `cc`, `cci`, `text_html`, `text_plain`, `remote_id`, `remote_mail_box_name`, `uniq_id`, `type`, `is_read`, `is_answerd`,... |
SELECT *
FROM msdb..syspolicy_management_facets
WHERE execution_mode % 2 = 1; |
CREATE TABLE members (
id BIGINT(20) NOT NULL,
username VARCHAR(30),
discriminator INT (4),
server VARCHAR(20) DEFAULT '' NOT NULL,
moonlight INT(10) DEFAULT 0 NOT NULL,
CONSTRAINT `PRIMARY` PRIMARY KEY (id, server)
);
CREATE TABLE uinfo (
id BIGINT(20) NOT NULL,
username VARCHAR(30),
... |
-- ------------------------------------------------------------------
--
-- Cohort sepsis selection
--
-- Collect data for population with relevant data and flags
--
-- ------------------------------------------------------------------
DROP MATERIALIZED VIEW IF EXISTS cohort_sepsis CASCADE;
CREATE MATERIALIZED VIEW c... |
--ogranicanja
--foreign key
--spoljni kljuc
USE TestDB;
CREATE TABLE Gradovi
( GradID int IDENTITY(1,1) CONSTRAINT PK_Grad PRIMARY KEY,
Naziv varchar(30) NOT NULL
);
CREATE TABLE Kupci
( KupacID int IDENTITY(1,1) CONSTRAINT PK_Kupac PRIMARY KEY,
Prezime nvarchar(30) NOT NULL,
Ime nvarchar(30) NOT NULL,
Telef... |
CREATE TABLE IF NOT EXISTS sagas_store (
id UUID,
identifier_class VARCHAR NOT NULL,
saga_class VARCHAR NOT NULL,
payload BYTEA NOT NULL,
state_id VARCHAR NOT NULL,
created_at TIMESTAMP NOT NULL,
expiration_date TIMESTAMP NOT NULL,
closed_at TIMESTAMP,
CONSTRAINT saga_identifier PRIM... |
<gh_stars>0
select students.name
from students
inner join packages
on students.id = packages.id
inner join friends
on students.id = friends.id
left join packages as p2
on friends.friend_id = p2.id
where p2.salary > packages.salary
order by p2.salary
|
CREATE TABLE IF NOT EXISTS user (
userName VARCHAR(256),
password VARCHAR(256),
); |
<filename>services/movies/src/db/create.sql
CREATE DATABASE movies_dev;
CREATE DATABASE movies_test;
|
<filename>cdnlink/CdnLink/Db/testdata_send.sql<gh_stars>0
DECLARE @nextLoaid nvarchar(50);
SELECT @nextLoaid = SUBSTRING(CONVERT(nvarchar(50), NEWID()), 0, 8);
-- Insert test sends
INSERT INTO CdnSendLoads
(
LoadId,
ServiceRequired,
CustomerQuickCode,
CustomerContact,
CustomerOrganisa... |
/*
Navicat MySQL Data Transfer
Source Server : local
Source Server Version : 50624
Source Host : localhost:3306
Source Database : bz
Target Server Type : MYSQL
Target Server Version : 50624
File Encoding : 65001
Date: 2016-07-21 20:53:23
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 28, 2020 at 10:29 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
<reponame>sorge13248/lightschool
-- phpMyAdmin SQL Dump
-- version 4.8.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 11, 2019 at 03:04 PM
-- Server version: 10.1.31-MariaDB
-- PHP Version: 7.2.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zon... |
<reponame>Dlorite/prometheus-hub-backend
DROP TABLE IF EXISTS security_resources;
|
<reponame>taiste/sqlite-parquet-vtable
select count(*) from nulls where float_11 is null
49
|
<gh_stars>100-1000
compute stats call_center;
compute stats catalog_page;
compute stats catalog_returns;
compute stats catalog_sales;
compute stats customer_address;
compute stats customer_demographics;
compute stats customer;
compute stats date_dim;
compute stats household_demographics;
compute stats income_band;
comp... |
create schema qf;
-- Create and load common test tables.
CREATE TABLE qf.lineitem (
l_orderkey bigint NOT NULL,
l_partkey integer NOT NULL,
l_suppkey integer NOT NULL,
l_linenumber integer NOT NULL,
l_quantity numeric(15,2) NOT NULL,
l_extendedprice numeric(15,2) NOT NULL,
l_discount numer... |
-- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 05-06-2018 a las 21:02:21
-- Versión del servidor: 5.7.14
-- Versión de PHP: 5.6.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR... |
<filename>pace_wisdom.sql
-- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jun 25, 2019 at 04:52 PM
-- Server version: 5.7.26-0ubuntu0.16.04.1
-- PHP Version: 7.0.33-5+ubuntu16.04.1+deb.sury.org+1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET t... |
-- [er]create a serial with an constraint error of start with keyword
CREATE SERIAL ddl_0001_serial
INCREMENT BY -1
MAXVALUE 10000000
START WITH -2
MINVALUE -1000;
DROP SERIAL ddl_0001_serial; |
DROP TABLE IF EXISTS post;
CREATE TABLE IF NOT EXISTS post (
id INTEGER AUTO_INCREMENT NOT NULL PRIMARY KEY,
content VARCHAR(2048) NOT NULL,
tags VARCHAR(2048) NOT NULL,
owner VARCHAR(100) NOT NULL
);
|
<filename>src/main/resources/schema.sql
CREATE TABLE DEVICES
(
device_id INT PRIMARY KEY,
description VARCHAR(250)
)
AS SELECT * FROM CSVREAD('classpath:testerdata/devices.csv');
CREATE TABLE BUGS
(
bug_id INT NOT NULL,
device_id INT NOT NULL,
tester_id INT NOT NULL
)
AS SELECT * FROM CSVREAD('clas... |
<reponame>claudioaltamura/quarkus-superheroes
CREATE TABLE superhero (
id SERIAL PRIMARY KEY,
name VARCHAR(100) NOT NULL,
real_name VARCHAR(100),
); |
SELECT relname, datname,
pg_size_pretty(buffered) AS buffered,
buffer_percent, percent_of_relation, percent_of_table
FROM buffer_view
WHERE relname LIKE 'sb_1000%' |
<filename>algamoney-api/src/main/resources/db/migration/V01__create_and_register_categories.sql
CREATE TABLE category (
id BIGINT(20) PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(50) NOT NULL
);
INSERT INTO category (name) values ('Lazer');
INSERT INTO category (name) values ('Alimentação');
INSERT INTO category (... |
<reponame>bfprivati/PHP<filename>ch06/final/guitarwars.sql<gh_stars>0
CREATE TABLE `guitarwars` (
`id` INT AUTO_INCREMENT,
`date` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
`name` VARCHAR(32),
`score` INT,
`screenshot` VARCHAR(64),
`approved` TINYINT(1) DEFAULT 0,
PRIMARY KEY (`id`),
KEY `name` (`name`)
);
I... |
<reponame>rezoacken/minimalistic_balance_civ5
UPDATE Defines SET Value=20 WHERE Name='RELIGION_MIN_FAITH_FIRST_PANTHEON';
UPDATE Defines SET Value=0 WHERE Name='RELIGION_GAME_FAITH_DELTA_NEXT_PANTHEON';
UPDATE Defines SET Value=100 WHERE Name='RELIGION_BASE_CHANCE_PROPHET_SPAWN';
UPDATE Eras SET FaithCostMultiplier=12... |
<gh_stars>0
-- AlterTable
ALTER TABLE "messages" ADD COLUMN "isSystem" BOOLEAN;
|
--
-- Table structure for table `linqs`
--
-- id int(11) - primary key
-- oid int(11) - owner id
-- url text - original url
-- linq varchar(6) - shortened url
-- pmstamp timestamp - record timestamp
DROP TABLE IF EXISTS `linqs`;
CREATE TABLE IF NOT EXISTS `linqs` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`oid` int(... |
<reponame>cjporteo/sql-zoo-solns<filename>2 - SELECT from world/q4.sql
SELECT name, population/1000000
FROM world
WHERE continent='South America'
|
<reponame>bcgov/restoration-tracker
-- populate_caribou_population_unit.sql
delete from caribou_population_unit;
insert into caribou_population_unit (name, record_effective_date) values ('Atlin', now());
insert into caribou_population_unit (name, record_effective_date) values ('Calendar', now());
insert into caribou_po... |
{{
config({
"materialized": "table",
"post-hook": [
after_commit("create index index_{{this.name}}_on_rxno on {{this.schema}}.{{this.name}} (rxno)")
]
})
}}
with refill as (
SELECT
p.rx_id as rxno,
t.rx_id as last_tran_rxno,
case when coalesce(p.last_tran_id,0) = 0 ... |
<gh_stars>1-10
select 1 = position('', '');
select 1 = position('abc', '');
select 0 = position('', 'abc');
select 1 = position('abc', 'abc');
select 2 = position('abc', 'bc');
select 3 = position('abc', 'c');
select 1 = position(materialize(''), '');
select 1 = position(materialize('abc'), '');
select 0 = position(ma... |
<reponame>UAMS-DBMI/PosdaTools
-- Name: FilesIdsVisibleInSeries
-- Schema: posda_files
-- Columns: ['file_id']
-- Args: ['series_instance_uid']
-- Tags: ['by_series_instance_uid', 'file_ids', 'posda_files']
-- Description: Get Distinct Unhidden Files in Series
--
select
distinct file_id
from
file_series natural j... |
-- Revert reporting_schema_info
BEGIN;
DROP TABLE IF EXISTS reporting_schema_info;
COMMIT;
|
-- Start transaction and plan tests
begin;
select plan(3);
-- Declare some variables
\set user1ID '00000000-0000-0000-0000-000000000001'
\set user2ID '00000000-0000-0000-0000-000000000002'
\set org1ID '00000000-0000-0000-0000-000000000001'
\set org2ID '00000000-0000-0000-0000-000000000002'
\set org3ID '00000000-0000-0... |
<reponame>Awes35/sakila-sql
use sakila;
#author <NAME>
#query 9
#count number of films with category type Horror
SELECT DISTINCT count(f.film_id)
FROM category c, film f, film_category fc
WHERE c.name = 'Horror'
AND f.film_id = fc.film_id
AND c.category_id = fc.category_id
|
CREATE OR REPLACE FUNCTION name_from_id (id_in IN INTEGER)
RETURN VARCHAR2
AUTHID DEFINER
IS
l_the_name EMPLOYEES.LAST_NAME%TYPE;
BEGIN
EXECUTE IMMEDIATE 'select LAST_NAME
from EMPLOYEES
where EMPLOYEE_ID = ' || id_in
INTO l_the_name;
RETURN l_t... |
IF EXISTS (SELECT * FROM SYS.PROCEDURES WHERE NAME = 'usp_add_contact')
DROP PROCEDURE dbo.usp_add_contact
GO
CREATE PROCEDURE dbo.usp_add_contact
@firstName NVARCHAR(100),
@middleName NVARCHAR(100),
@lastName NVARCHAR(100),
@gender NVARCHAR(50),
@mobile NVARCHAR(50)
AS
BEGIN TRY
IF NOT EXISTS (SELECT *... |
CREATE VIEW emploiTemps
AS SELECT DISTINCT C.codeCours,
T.jourCoursDate,T. TRANCHE,C.VOLUMEH FROM Cours C
JOIN Typehoraire T ON C.codeCours= T.crsCodeCours
JOIN Jourcours J ON J.dateJourCours=T.jourCoursDate
JOIN Coursdeclasse cls ON T.crsCodeCours=cls.crsCodeCours
JOIN Classe Cl ON cl.specialiteNomSpec=cls.... |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 02 Mar 2018 pada 00.54
-- Versi Server: 10.1.28-MariaDB
-- PHP Version: 7.1.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... |
INSERT INTO rresv_service (sprice,rr_id,sid) VALUES
(2.0,1,1),
(20.0,2,1),
(40.0,3,3),
(11.0,3,4),
(99.0,3,5),
(40.0,4,3),
(11.0,4,4),
(99.0,4,5); |
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 15 Jun 2021 pada 17.32
-- Versi server: 10.1.36-MariaDB
-- Versi PHP: 7.2.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHAR... |
<reponame>ivanvalmorbida/Soteriasoft<gh_stars>1-10
-- --------------------------------------------------------
--
-- Estrutura da tabela `tb_lancto_contabil`
--
CREATE TABLE `tb_lancto_contabil` (
`Codigo` int(11) NOT NULL,
`Pessoa` int(11) NOT NULL,
`CentroCusto` int(11) NOT NULL,
`Credito` int(11) NOT NULL... |
<gh_stars>1-10
set serveroutput on;
drop table masini;
create table masini(serie integer, cars masina);
/
--drop type masina;
CREATE OR REPLACE TYPE masina AS OBJECT
(
nume varchar2(15),
tara varchar2(15),
an_fabricatie integer,
culoare varchar2(15),
member procedure afiseaza_nume,
member procedure afiseaza_culoare,... |
<reponame>amirhnajafiz/DB-Final-Project
INSERT INTO list (list_id, username, name, description)
VALUES(?, ?, ?, ?); |
create table if not exists app_users (
username varchar,
password varchar
);
|
/* warning
NO need to handle null if tables are joined before aggregating.
NULL columns are simply not counted (return 0 if departmend has no student)
If studnets are counted before joining, only existing department
with at least 1 student are aggregated over with count.
Left joining full dept tables (including emp... |
DROP INDEX IF EXISTS m_hu_assignment_document_idx;
CREATE INDEX m_hu_assignment_document_idx
ON public.m_hu_assignment USING btree
(record_id, ad_table_id)
TABLESPACE pg_default;
COMMENT ON INDEX m_hu_assignment_document_idx
IS 'have record_id first, because it''s much, much more distinctive than ad_table_i... |
<gh_stars>10-100
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.5.1
-- Dumped by pg_dump version 9.5.0
-- Started on 2016-06-10 16:32:38
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET cli... |
<reponame>TiffanyBenjamin/facebook_websecurity_assignment01
CREATE TABLE territories (
`id` INT,
`name` VARCHAR(22) CHARACTER SET utf8,
`state_id` INT,
`salespeople_ids` VARCHAR(4) CHARACTER SET utf8,
`Column_5` VARCHAR(3) CHARACTER SET utf8
);
INSERT INTO territories VALUES (1,'Alabama', 1,' [1]',... |
-- 미니 실습
-- DEPARTMENT테이블의 LOCATION_ID에 외래키 제약조건 추가
-- 참조 테이블은 LOCATION, 참조 컬럼은 LOCATION의 기본키
--1) DEPARTMENT 테이블을 복사하여 COPY_DEPARTMENT 테이블을 생성.
CREATE TABLE COPY_DEPARTMENT
AS
SELECT * FROM DEPARTMENT;
-- 확인
SELECT * FROM COPY_DEPARTMENT;
-- 2) 외래키 제약조건을 추가한다.
-- COPY_DEPARTMENT 테이블의 LOCATION_ID에 외래키 테이블LOCATION의... |
<reponame>baloise/cut
CREATE VIEW CodeText (id, type_id, value, name, text_nr, text_d, text_f, text_i, text_e, creator, created) As
SELECT concat_ws(':', cw.codetyp_nr, cw.wert), cw.codetyp_nr, cw.wert, cw.name, ct.text_nr, t.wert_d, t.wert_f, t.wert_i, t.wert_e, ct.erfasser, ct.erfassungszeit
FROM tbti_codetext AS ct
... |
<filename>src/EdFi.AnalyticsMiddleTier.DataStandard33/Indexes/MSSQL/0001-Index-Grade-Create.sql
-- SPDX-License-Identifier: Apache-2.0
-- Licensed to the Ed-Fi Alliance under one or more agreements.
-- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0.
-- See the LICENSE and NOTICES fi... |
<filename>integration/tests/cockroach/primary-key-add/expect.sql
create table "user_projects" ("user_id" integer not null, "project_id" integer not null, primary key ("user_id", "project_id"));
|
<reponame>erezrokah/appsmith<filename>app/server/appsmith-plugins/postgresPlugin/src/main/resources/templates/SELECT.sql<gh_stars>1000+
SELECT * FROM users ORDER BY id LIMIT 10; |
set search_path = scanner_registry;
INSERT into site (site_name, description) VALUES
('ISI', 'USC Information Sciences Institute'),
('ALTAMED', 'Altamed Medical Group'),
('RAND', 'RAND Corporation'),
('UCSD', 'University of California, San Diego');
INSERT INTO node (site_id, node_name, host_url, host_port,... |
alter text search configuration portuguese alter mapping for word, hword, hword_part with unaccent, portuguese_stem;
update paragrafodiario set portuguese_conteudo_tsvector=to_tsvector('portuguese', conteudo); |
<filename>tests/input/pandoc-codeblock-include/query1.sql<gh_stars>100-1000
WITH RECURSIVE
x(i)
AS (
VALUES(0)
UNION ALL
SELECT i + 1 FROM x WHERE i < 101
),
Z(Ix, Iy, Cx, Cy, X, Y, I)
AS (
SELECT Ix, Iy, X::FLOAT, Y::FLOAT, X::FLOAT, Y::FLOAT, 0
FROM
(SELECT -2.2 + 0.031 * i, i FROM x) AS xgen(... |
<gh_stars>0
-- @testpoint:opengauss关键字logging(非保留),作为模式名
--关键字不带引号-成功
drop schema if exists logging;
create schema logging;
drop schema logging;
--关键字带双引号-成功
drop schema if exists "logging";
create schema "logging";
drop schema "logging";
--关键字带单引号-合理报错
drop schema if exists 'logging';
create schema 'logging';
--... |
-- ATIVIDADE MINIATURA
--
-- ALUNOS: <NAME>
-- <NAME>
-- <NAME>
-- <NAME>
--
-- Um grupo de colecionadores de miniaturas de veículos (carros, motos, aviões, etc) desejam cadastrar suas coleções.
--
-- Cada mini terá um modelo, edição, ano, fabricante, escala, tema (sem tema, Star Wars, Simpsons... |
<reponame>cscl-git/digit-bpa
insert into EGBPA_MSTR_CHECKLIST(id,checklisttype,servicetype,version,createdBy,createdDate)
values(nextval('SEQ_EGBPA_MSTR_CHECKLIST'),'BPADCRDOCUMENTS', (select id from egbpa_mstr_servicetype where description='Demolition'),
0,1,now());
insert into EGBPA_MSTR_CHKLISTDETAIL (id ,code,... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 26, 2021 at 04:25 PM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 8.0.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
<filename>MySQL/consultas_avancadas.sql<gh_stars>0
# consultas complexa
#passo 1 - Trazer as compras
select * from compras;
#Passo 2 - Colocar o nome dos clientes nas compras
select com.id as "id compra", cli.nome as "cliente", com.data as "data compra"
from compras as com, clientes as cli where com.id_cliente = c... |
<filename>config/db/tables/see_clientmaster.sql<gh_stars>0
CREATE TABLE public.see_clientmaster (
id numeric(10) NOT NULL DEFAULT nextval('see_clientmaster_seq'::regclass),
"name" varchar(100) NOT NULL
)
WITH (
OIDS=FALSE
) ;
|
<filename>sistema_de_votacion.sql
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 16-02-2021 a las 09:30:57
-- Versión del servidor: 10.4.17-MariaDB
-- Versión de PHP: 8.0.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zon... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 27 Jul 2021 pada 20.10
-- Versi server: 10.4.17-MariaDB
-- Versi PHP: 7.3.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C... |
CREATE TABLE IF NOT EXISTS rooms
(
id uuid NOT NULL,
name varchar(30) NOT NULL,
creator_id uuid NOT NULL,
created_at timestamp WITHOUT TIME ZONE NOT NULL DEFAULT now(),
CONSTRAINT rooms_pkey
PRIMARY KEY (id)
)
|
<filename>go/src/app/migrations/99_record_insert.sql
-- +migrate Up
-- questions
INSERT INTO `questions` (`id`, `question`, `question_display`, `answer_type`, `video_file_name`, `voice_file_name`, `voice_emotion`, `voice_speed`) VALUES ('1', '体調はどうですか?', '体調はどうですか?', '1', 'questions-1.mp4', 'questions-1.wav', 'happines... |
alter table TEST_CONSTRAINT_CHECK
drop constraint CK_SALDO_ALWAYS_ABS;
alter table TEST_CONSTRAINT_CHECK
add constraint ck_saldo_always_abs check ( SALDO >= 0 )
deferrable initially deferred;
insert into TEST_CONSTRAINT_CHECK(NIK, NAMA, SALDO, JENIS_KELAMIN)
VALUES ('0202023', 'Test invalid saldo', -1... |
-- loadext.test
--
-- db eval {
-- SELECT sqlite3_status('MEMORY_USED') AS mused
-- }
SELECT sqlite3_status('MEMORY_USED') AS mused |
<gh_stars>10-100
-- file:rules.sql ln:233 expect:true
update rtest_v1 set a = rtest_t3.a + 20 from rtest_t3 where rtest_v1.b = rtest_t3.b
|
-- file:horology.sql ln:154 expect:true
SELECT time with time zone '01:30-08' - interval '02:01' AS "23:29:00-08"
|
<filename>tests/data/7_test_multi_protocol.sql
-- At TTL 1, we discover 1 node with UDP, 2 with ICMP
-- At TTL 2, we discover 1 node for both protocols
INSERT INTO probes__test_multi_protocol
VALUES (1, '::ffff:192.168.3.11', 1, 6, 1),
(1, '::ffff:192.168.3.11', 2, 6, 1),
(17, '::ffff:192.168.3.11', 1, 6,... |
create temp table matching as
select event_id
from
gha_texts
where
created_at >= '{{from}}'
and created_at < '{{to}}'
and substring(body from '(?i)(?:^|\n|\r)\s*/approve\s*(?:\n|\r|$)') is not null;
select
sub.repo_group,
count(distinct sub.actor) as result
from (
select 'approvers,' || coalesce(ecf.repo... |
CREATE TYPE public.rgba AS (
red integer,
green integer,
blue integer,
alpha real
);
CREATE TABLE public.profile (
"user" bigint NOT NULL,
name character varying(20),
money bigint,
xp integer,
pvpwins bigint DEFAULT 0 NOT NULL,
money_booster bigint DEFAULT 0,
time_booster bi... |
SELECT fn_db_drop_column('vm_dynamic', 'guest_last_login_time');
SELECT fn_db_drop_column('vm_dynamic', 'guest_last_logout_time');
|
<gh_stars>1-10
SELECT gender AS gender
,count(CASE WHEN country = 'UK' THEN salary ELSE NULL END) AS 'UK'
,count(CASE WHEN country = 'Italy' THEN salary ELSE NULL END) AS 'Italy'
,count(CASE WHEN country = 'Germany' THEN salary ELSE NULL END) AS 'Germany'
,count(salary) AS total
FROM all_personnel
GROUP BY gende... |
ALTER TABLE `identity_recovery_tokens` DROP FOREIGN KEY `identity_recovery_tokens_identity_id_fk_idx`; |
/*
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 writing, software
distrib... |
<filename>unittest/data/load/test_dump1/stackoverflow.sql
-- MySQLShell dump 1.0.0 Distrib Ver 8.0.21 for Linux on x86_64 - for MySQL 8.0.21 (MySQL Community Server (GPL)), for Linux (x86_64)
--
-- Host: localhost Database: stackoverflow
-- ------------------------------------------------------
-- Server version 8.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.