sql stringlengths 6 1.05M |
|---|
<reponame>MiroslavKisov/Software-University
USE ReportService
SELECT Description,
OpenDate
FROM Reports
WHERE EmployeeId IS NULL
ORDER BY OpenDate, [Description] ASC |
-- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 24 Jun 2020 pada 11.40
-- Versi server: 10.4.8-MariaDB
-- Versi PHP: 7.2.24
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... |
SELECT t_id AS t_id, -1::int8 AS t_basket, 'dm01vch24lv95dliegenschaften_grundstueck'::varchar(60) AS t_type, NULL::varchar(200) AS t_ili_tid,
nbident, nummer, egris_egrid, gueltigkeit, vollstaendigkeit, art, gesamteflaechenmass, entstehung AS entstehung
FROM agi_dm01avso24.liegenschaften_grundstueck;
|
CREATE TABLE [dbo].[TaxonomyFamily] (
[TaxonomyFamilyID] INT NOT NULL,
[TaxonomyOrderID] INT NULL,
[Family] NVARCHAR (MAX) NULL
);
|
DROP TABLE IF EXISTS AreaPermissionAssignments;
CREATE TABLE IF NOT EXISTS `AreaPermissionAssignments` (
`cID` int(10) unsigned NOT NULL DEFAULT '0',
`arHandle` varchar(255) NOT NULL,
`pkID` int(10) unsigned NOT NULL DEFAULT '0',
`paID` int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`cID`,`arHandle`,`pk... |
CREATE DATABASE motive ENCODING ' UTF8' TEMPLATE template0; |
<filename>db sql/perpus.sql
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: sql304.epizy.com
-- Generation Time: Dec 19, 2021 at 12:57 PM
-- Server version: 5.7.35-38
-- PHP Version: 7.2.22
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone... |
<filename>courses/CSB1/week-7/problem-set-7/movies/10.sql
SELECT name FROM people WHERE id IN (SELECT person_id FROM directors WHERE movie_id IN (SELECT id FROM movies WHERE id IN (SELECT movie_id FROM ratings WHERE rating >= 9))); |
CREATE TEMP TABLE composite_pk(
code char(5),
title varchar(40),
interval_range interval HOUR TO MINUTE,
CONSTRAINT code_title PRIMARY KEY (code, title)
);
|
-- Verify seattleflu/schema:functions/array_distinct on pg
begin;
create temporary table tests (
input int[],
expected int[]
);
copy tests from stdin with (delimiter ' ');
{4,2,1,1,1,7,8,1,10,9,2,3} {4,2,1,7,8,10,9,3}
{} {}
{4} {4}
{4,4,4,4,4} {4}
{5,2,null,2,8,null} {5,2,null,8}
\N \N
\.
do $$
decla... |
<reponame>V3rita2/project-wayfarer
INSERT INTO main_app_city(name, image, description)
VALUES
('San Francisco', 'https://www.sftravel.com/sites/sftravel.prod.acquia-sites.com/files/SanFrancisco_0.jpg', 'Something Something Something Something Something');
INSERT INTO main_app_city(name, image, description)
... |
<filename>backend/de.metas.contracts/src/main/sql/postgresql/system/50-de.metas.contracts/5494350_gh3999-app_allow_refund_contract_reactivation.sql
--
-- unrelated typo fix
--
-- 2018-05-23T17:01:28.642
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_SysConfig SET Description='Specifies that... |
<reponame>platonai/pulsar
-- noinspection SqlResolveForFile
-- noinspection SqlNoDataSourceInspectionForFile
-- asin 跟卖列表
select
dom_base_uri(dom) as url,
dom_first_text(dom_owner_body(dom), 'div#olpProductDetails h1') as name,
dom_first_text(dom_owner_body(dom), 'div#olpProductDetails i.a-icon-star') as ... |
<gh_stars>0
SET search_path = pg_catalog;
CREATE TABLE public.t1 (
c1 integer,
c2 integer,
c3 integer
);
CREATE OR REPLACE FUNCTION public.f_inline_short() RETURNS void
LANGUAGE sql
RETURN (SELECT t.c1 FROM public.t1 t LIMIT 1);
CREATE TABLE public.t2 (
c1 integer,
c2 integer,
c3 integer
);
CREATE OR ... |
CREATE TABLE `transmetais`.`unidade` (
`id` INT NOT NULL,
`codigo` VARCHAR(4) NOT NULL,
`descricao` VARCHAR(100) NOT NULL,
PRIMARY KEY (`id`));
ALTER TABLE `transmetais`.`unidade`
CHANGE COLUMN `id` `id` INT(11) NOT NULL AUTO_INCREMENT ;
CREATE TABLE `funcionario` (
`id` int(11) NOT NULL AUTO_INCREMENT... |
<reponame>kccb-karp/IQCareMigration
UPDATE [dbo].[AppAdmin] SET
AppVer='Ver 2.0 Kenya HMIS',
DBVer='Ver 2.0.0 Kenya HMIS',
RelDate='2018-11-27 00:00:00.000',
VersionName='Ver 2.0.0 - BETA Kenya HMIS'
WHERE Id>0
SELECT * FROM AppAdmin |
<gh_stars>0
INSERT INTO member ('name', 'email') VALUES ('huynhctd', '<EMAIL>');
INSERT INTO member ('name', 'email') VALUES ('hungpk', '<EMAIL>'); |
<filename>modules/core/db/update/hsql/21/04/210427-1-createBackupFile.sql
create table BACKMON_BACKUP_FILE (
ID bigint generated by default as identity(start with 1) not null,
UUID varchar(36),
--
primary key (ID)
); |
-- @Author: <NAME>
-- @Date: 09/25/2017
-- Q1. Create a package
-- Make sure correct System date format
BEGIN
EXECUTE IMMEDIATE 'ALTER SESSION SET NLS_DATE_FORMAT = "DD-MON-YY"';
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('');
END;
/
-- Package Specification
CREATE OR REPLACE PACKAGE Acme_Accounts AS
... |
-------------------------------------------------------------------------------
-- oss metadata
-------------------------------------------------------------------------------
CREATE TABLE OSS_METADATA(
ID BIGINT NOT NULL,
CODE VARCHAR(50),
NAME VARCHAR(200),
VALUE VARCHAR(200),
STATUS ... |
<filename>modules/flowable-task-service/src/main/resources/org/flowable/task/service/db/drop/flowable.cockroachdb.drop.task.sql
drop table if exists act_ru_task cascade;
-- force-commit
|
-- phpMyAdmin SQL Dump
-- version 3.3.9
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jul 04, 2012 at 10:18 PM
-- Server version: 5.5.8
-- PHP Version: 5.3.5
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SE... |
<filename>services/db/migrations/023_frozen.up.sql
alter table `avm_outputs` add COLUMN `frozen` smallint unsigned default 0;
|
SELECT p.ProductName
FROM Products p
,Suppliers s
WHERE p.SupplierID = s.SupplierID
AND s.Country = 'Norway'
ORDER BY p.ProductName; |
1)
SELECT l.titulo_original" Titulo", l.titulo_espanol "Titulo en Español",l.tema,l.sinopsis ,cl.nombre "Genero" ,l.nro_pags "Paginas",
( e.nombre||', '|| lu.nombre||' ,'|| l.ano) AS "Editorial , Pais y año de publicacion",
lc.titulo_original" complementario"
FROM ofj_libro l ,ofj_editorial e,ofj_lugar lu,ofj_clase c... |
<reponame>nikkiboyd/hair-salon<filename>nikki_boyd_test.sql
-- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Jul 20, 2018 at 10:50 PM
-- Server version: 5.6.38
-- PHP Version: 7.2.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
... |
<filename>plugins/product_inquiry_module/uninstall/query.sql
SET foreign_key_checks = 0;
DROP TABLE IF EXISTS `p_inquiries`;
DROP TABLE IF EXISTS `p_inquiry_to_types`;
DROP TABLE IF EXISTS `p_inquiry_types`;
DROP TABLE IF EXISTS `p_inquiry_type_details`;
SET foreign_key_checks = 1;
|
<reponame>RedDiamond69/Database-lab-works
USE AdventureWorks2012;
GO
-- First subtask
SELECT [Empl].[BusinessEntityID], [Empl].[OrganizationLevel], [Empl].[JobTitle], [JC].[JobCandidateID], [JC].[Resume]
FROM [HumanResources].[Employee] AS [Empl]
INNER JOIN [HumanResources].[JobCandidate] AS [JC]
ON [Empl].[... |
<reponame>abedul1980/RefData<gh_stars>0
CREATE TABLE eventpeopletype (
id INT4 NOT NULL PRIMARY KEY,
type VARCHAR(20) NOT NULL,
description VARCHAR(100) NOT NULL,
validfrom TIMESTAMP WITH TIME ZONE,
validto TIMESTAMP WITH TIME ZONE
);
-- Table comment
COMMENT ON TABLE eventpeopletype IS '{"label": "Types of ... |
<gh_stars>0
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
/*!40000 A... |
<filename>schema.sql<gh_stars>0
DROP DATABASE IF EXISTS employees_db;
-- Create the database day_planner_db and specified it for use.
CREATE DATABASE employees_db;
USE employees_db;
CREATE TABLE department (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(30)
);
CREATE TABLE role (
id INT AUTO_INCREMENT PRIMA... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th4 20, 2021 lúc 01:26 PM
-- Phiên bản máy phục vụ: 10.4.17-MariaDB
-- Phiên bản PHP: 8.0.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SE... |
<reponame>danpochini/IBD-006
use Imovel
go
-- criando chaves primarias
alter table Vendedor
add primary key (cd_Vendedor)
go
alter table Comprador
add primary key (cd_Comprador)
go
alter table Imovel
add primary key (cd_Imovel)
go
alter table Estado
add primary key (sg_Estado)
go
alter table Faixa_Imovel
add... |
CREATE TABLE `empresa` (
`id` bigint NOT NULL AUTO_INCREMENT,
`cnpj` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`data_criacao` datetime NOT NULL,
`data_atualizacao` datetime NOT NULL,
`razao_social` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
PRIMARY ... |
<filename>src/main/resources/db/migration/V8__Add_Albums_Songs_Table.sql
ALTER TABLE songs
DROP COLUMN album_id;
CREATE TABLE albums_songs (
id SERIAL PRIMARY KEY,
album_id INT NOT NULL REFERENCES albums(id),
song_id INT NOT NULL REFERENCES songs(id)
); |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Nov 25, 2018 at 04:57 AM
-- Server version: 10.1.19-MariaDB
-- PHP Version: 5.6.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.4.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Oct 16, 2015 at 07:36 PM
-- Server version: 5.6.26
-- PHP Version: 5.6.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... |
DROP TABLE users;
CREATE TABLE users (
id INTEGER NOT NULL,
firstname TEXT NOT NULL,
lastname TEXT NOT NULL,
email TEXT NOT NULL,
password TEXT NOT NULL,
CONSTRAINT unique_users UNIQUE (email)
PRIMARY KEY(id)
);
|
<reponame>tiaotiao00/HSR00qianbao<filename>dependence/db-5.3.28.NC/test/sql_codegen/data/sample_envs_txn.sql
CREATE DATABASE numismatics1; /*+ MODE = TRANSACTIONAL */
CREATE TABLE coin1 (cid INT(8) PRIMARY KEY,
unit VARCHAR2(20),
value NUMERIC(8,2),
... |
<reponame>mmd0308/HZQ-Admin
CREATE DATABASE IF NOT EXISTS `hzq_admin` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `hzq_admin`;
-- MySQL dump 10.13 Distrib 5.7.17, for macos10.12 (x86_64)
--
-- Host: 127.0.0.1 Database: hzq_admin
-- ------------------------------------------------------
-- Server version 5.7.21
/*... |
<filename>Demo/D05/ch5-4_c_unique.sql
CREATE TABLE Suppliers
(
id INT PRIMARY KEY,
CompanyName CHAR(20) UNIQUE
)
GO
insert into Suppliers values (101,'ABC Company');
insert into Suppliers values (102,'ABC Company');
select * from Suppliers
|
-- Deploy schemas/public/domains/multiple_select to pg
-- requires: schemas/public/schema
BEGIN;
CREATE DOMAIN multiple_select AS jsonb CHECK (value ?& ARRAY['value']);
COMMENT ON DOMAIN multiple_select IS E'@name launchqlInternalTypeMultipleSelect';
COMMIT;
|
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Jun 02, 2018 at 07:57 AM
-- Server version: 5.7.19
-- PHP Version: 5.6.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... |
<reponame>smith750/kc
DELIMITER /
INSERT INTO KRCR_NMSPC_T (NMSPC_CD,OBJ_ID,VER_NBR, NM, ACTV_IND, APPL_ID )
VALUES ('KC-PROTOCOL-DOC',UUID(),1, 'IRB Protocol Doc Level Nmspc' , 'Y', 'KC')
/
INSERT INTO KRIM_ROLE_ID_S VALUES(NULL)
/
INSERT INTO KRIM_ROLE_T (ROLE_ID, OBJ_ID, VER_NBR, ROLE_NM, NMSPC_CD, DESC_TXT, K... |
<reponame>DEFRA/prsd-iws
CREATE TABLE [Lookup].[BankHoliday]
(
Id UNIQUEIDENTIFIER CONSTRAINT PK_BankHoliday PRIMARY KEY CONSTRAINT DF_BankHoliday_Date DEFAULT NEWSEQUENTIALID(),
Date DATETIME2(0) NOT NULL,
CompetentAuthority INT NOT NULL,
CreatedDate DATETIME2(0) CONSTRAINT DF_BankHoliday_CreatedDate DEFAULT GETD... |
DROP TABLE IF EXISTS jsondata;
CREATE TABLE jsondata(
user_id SERIAL PRIMARY KEY,
data json NOT NULL
);
|
PRINT N'Environment-specific script: Staging.sql';
--------------------------------------------------------------
-- Customer Test
--------------------------------------------------------------
-- Activity required for any insert, update and delete
Declare @ActivityID_Staging As Int
Insert INTO [Activity].[Activity] ... |
-- Extract data from
-- MT_Human_Glycated_Plasma_P587
-- and
-- MT_Human_Glycated_RBC_P588
-- If necessary, clear all entries in T_Protein_SeqsWithMods
-- TRUNCATE TABLE T_Protein_SeqsWithMods
-- Populate T_Protein_SeqsWithMods
-- Change Hexose to # (tyipcally K#)
-- Change Plus1Oxy to * (typically M... |
<reponame>PNNL-Comp-Mass-Spec/DBSchema_DMS<gh_stars>1-10
/****** Object: Table [T_Instrument_Group] ******/
/****** RowCount: 51 ******/
/****** Columns: IN_Group, Usage, Comment, Active, Default_Dataset_Type, Allocation_Tag, Sample_Prep_Visible, Requested_Run_Visible, Target_Instrument_Group ******/
INSERT INTO [T... |
<reponame>denisgmarques/camunda-bpm-platform<filename>engine/src/main/resources/org/camunda/bpm/engine/db/create/activiti.oracle.create.identity.sql
create table ACT_ID_GROUP (
ID_ NVARCHAR2(64),
REV_ INTEGER,
NAME_ NVARCHAR2(255),
TYPE_ NVARCHAR2(255),
primary key (ID_)
);
create table ACT_ID_MEMB... |
<filename>sql/debug.sql
/* ======================================================================== */
/* PeopleRelay: debug.sql Version: 0.4.3.6 */
/* */
/* Copyright 2017-2018 <NAME> & <NAME> ... |
<reponame>lamondlu/Library<gh_stars>100-1000
USE [LibraryLogDB]
GO
/****** Object: Table [dbo].[Logs] Script Date: 11/20/2017 8:43:44 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[CommandLogs](
[Id] [uniqueidentifier] NOT NULL,
[LogType] [int] NOT NULL,
[CommandName] [nvarchar](... |
<gh_stars>0
autocommit off;
insert into joe.product_c select product_code+10, descr, price from joe.product_c;
insert into joe.product_c select product_code+20, descr, price from joe.product_c;
insert into joe.product_c select product_code+40, descr, price from joe.product_c;
insert into joe.product_c select product_co... |
begin;
do $$
begin
perform upgrade_to_version(12);
alter table v2.catalogue_file add uploaded_date timestamptz not null default '2022-01-01';
end $$ language plpgsql;
commit; |
create table team (
id bigint auto_increment,
divisionId bigint not NULL,
coachId bigint not NULL,
gender char not NULL,
name varchar(60) not NULL,
PRIMARY KEY (id),
unique key ux_divisionCoach(divisionId, coachId, gender)
) ENGINE=InnoDB DEFAULT CHARSE... |
CREATE OR REPLACE PACKAGE BODY PKG_ACOD_TOOLS AS
-- Copyright (c) 2021 Pierre-Sanguinetti
-- v65+
table_does_not_exist EXCEPTION;
PRAGMA EXCEPTION_INIT(table_does_not_exist, -942);
dimension_does_not_exist EXCEPTION;
PRAGMA EXCEPTION_INIT(dimension_does_not_exist, -30333);
mview_does_not_exist EXCEPTION;
PR... |
-- phpMyAdmin SQL Dump
-- version 4.0.9
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 12, 2015 at 12:13 PM
-- Server version: 5.6.14
-- PHP Version: 5.5.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/... |
SELECT [TaskID]
,CONVERT
(
VARCHAR(MAX),
CAST('' AS XML).value('xs:base64Binary(sql:column("ClientNotificationMessage"))', 'VARBINARY(MAX)')
) 'ClientNotificationMessage'
,[ScriptGuid]
,[ScriptName]
,[ScriptVersion]
,[Feature]
,[ClientOperationId]
,[... |
<gh_stars>0
DROP FUNCTION adjust_balance(bigint, int, int, text);
DROP TABLE players_tables_transactions;
DROP TABLE games;
DROP TYPE game_t;
DROP TABLE players_tables;
DROP TABLE players;
DROP TABLE tables;
|
-- create database holberton and table user
CREATE TABLE IF NOT EXISTS `users` (
`id` INT NOT NULL AUTO_INCREMENT,
`email` VARCHAR(255) NOT NULL UNIQUE,
`name` VARCHAR(255),
PRIMARY KEY (`id`)
);
|
<reponame>TommasoAzz/Stalker-Backend
CREATE TABLE `OrganizationAccess` (
`id` bigint NOT NULL,
`entranceTimestamp` datetime NOT NULL COMMENT 'Date and time of the moment in which the user entered the place.',
`exitTimestamp` datetime DEFAULT NULL COMMENT 'Date and time of the moment in which the user left the pl... |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 26, 2020 at 03:49 AM
-- Server version: 10.1.28-MariaDB
-- PHP Version: 7.0.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
<filename>Development/Core/TfsMigrationDBConsolidation/Tfs_Integration/Schema Objects/Stored Procedures/sp_ProviderInsert.sql<gh_stars>1-10
--IF EXISTS (SELECT * FROM sysobjects WHERE name = 'ProviderInsert' AND user_name(uid) = 'dbo')
--DROP PROCEDURE dbo.ProviderInsert
--GO
CREATE PROCEDURE dbo.ProviderInsert
(
@R... |
<reponame>CSCfi/antero
USE [Antero]
GO
IF NOT EXISTS (select * from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='dw' and TABLE_NAME='f_amos_rajapinta_rahoitus_kriteerit')
BEGIN
CREATE TABLE [dw].[f_amos_rajapinta_rahoitus_kriteerit](
[ytunnus] [nvarchar](12) NULL,
[ta_ensikertainen_suoritepaatos_2017] [bigint] ... |
<filename>src/test/resources/limit.test_18.sql<gh_stars>100-1000
-- limit.test
--
-- execsql {
-- CREATE VIEW v1 AS SELECT * FROM t1 LIMIT 2;
-- SELECT count(*) FROM (SELECT * FROM v1);
-- }
CREATE VIEW v1 AS SELECT * FROM t1 LIMIT 2;
SELECT count(*) FROM (SELECT * FROM v1); |
<reponame>drtrang/typehandlers-encrypt-demo<filename>src/main/resources/import.sql<gh_stars>0
drop table if exists base_code;
create table base_code (
id int primary key auto_increment,
code_type varchar(64) not null,
code_value varchar(64) not null,
remark varchar(64) null,
create_t... |
<filename>notes/WDV3v1.sql
-- phpMyAdmin SQL Dump
-- version 4.4.10
-- http://www.phpmyadmin.net
--
-- Host: localhost:3306
-- Generation Time: Nov 11, 2015 at 01:55 PM
-- Server version: 5.5.42
-- PHP Version: 5.6.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_C... |
<reponame>UiPath/ProcessMining-pm-utils
{% macro test_equal_rowcount(model, compare_model) %}
{{ config(fail_calc = 'coalesce(diff_count, 0)') }}
select
abs(count_a - count_b) as diff_count
from (select count(*) as count_a from {{ model }}) as model_a
cross join (select count(*) as count_b from "{{ model.schema }... |
<reponame>flammenderdrache/tiersortierer
ALTER TABLE animals
ADD created_by BIGINT;
ALTER TABLE animals
ADD FOREIGN KEY (created_by) REFERENCES users (user_id);
|
select
Merchant_Account
, date_format(Creation_Date, '%Y-%m-%d') day
, Payment_Method
, system
, count(*) count
, sum(three_ds_triggered) three_ds_triggered
, sum(three_ds_authenticated) three_ds_authenticated
, sum(three_ds_triggered) / count(*) * 100 three_ds_triggered_rate
, ifnull(sum(three_ds_authenticated) / su... |
use trader;
CREATE TABLE portfolio(portfolioId INT NOT NULL AUTO_INCREMENT, clientId VARCHAR(64) NOT NULL, total DECIMAL(12,2), loyalty VARCHAR(8), balance DECIMAL(12,2) DEFAULT 50000, commissions DECIMAL(12,2), freeTrades INTEGER, PRIMARY KEY(portfolioId));
ALTER TABLE portfolio AUTO_INCREMENT=1000;
CREATE TABLE stock... |
-- phpMyAdmin SQL Dump
-- version 4.8.0
-- https://www.phpmyadmin.net/
--
-- Host: 1172.16.17.32
-- Generation Time: May 14, 2018 at 02:04 AM
-- Server version: 10.1.31-MariaDB
-- PHP Version: 5.6.35
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET... |
ALTER TABLE `customer`
ADD `is_verified` TINYINT
(1) NOT NULL DEFAULT '0' AFTER `state`;
|
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 23-04-2020 a las 22:05:32
-- Versión del servidor: 10.1.35-MariaDB
-- Versión de PHP: 7.2.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... |
-- phpMyAdmin SQL Dump
-- version 4.9.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Mar 31, 2020 at 05:18 PM
-- Server version: 5.7.26
-- PHP Version: 7.3.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `lindy`
--
-- ------------------------------... |
<filename>bluefills_savings.sql
CREATE TABLE `bluefills`.`SHOP_ADMIN` (
`id` INT NOT NULL AUTO_INCREMENT ,
`username` VARCHAR(255) NOT NULL ,
`password` VARCHAR(500) NOT NULL ,
`status` TINYINT NOT NULL DEFAULT '1' ,
`roles` ENUM('10','20') NULL DEFAULT '20' COMMENT '10=>super Admin, 20 => Branch Admin' ,
... |
-- phpMyAdmin SQL Dump
-- version 3.5.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Oct 23, 2015 at 10:06 AM
-- Server version: 5.5.24-log
-- PHP Version: 5.4.3
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... |
<gh_stars>0
select R.TRN_REF_NO,
R.ac_branch,
case
when r.module in ('RT') THEN
acpks_stmt.fn_get_rtl_narrative_desc(r.TRN_REF_NO,
r.MODULE,
'TXN',
... |
-- 3 SELECT from Nobel
-- 1.
SELECT yr, subject, winner
FROM nobel
WHERE yr = 1950
-- 2.
SELECT winner
FROM nobel
WHERE yr = 1962
AND subject = 'Literature'
-- 3.
SELECT yr, subject
FROM nobel
WHERE winner = '<NAME>'
-- 4.
SELECT winner
FROM nobel
WHERE yr >= 2000 AND subject = 'Peace'
-- 5.
SELECT yr, subject, ... |
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: test
-- ------------------------------------------------------
-- Server version 5.5.5-10.4.18-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RES... |
<gh_stars>0
CREATE VIEW [dbo].[OrderView]
AS SELECT
ord.Id
,ord.ParkingSpotId
,ord.TenantId
,usr.UserName AS 'Tenant'
,ord.LeaseStartDate
,ord.LeaseEndDate
,ord.IsCancelled
,spotView.ParkingSiteId
,spotView.Parking
,spotView.IsActive
,spotView.ParkingTypeId
,spotView.ParkingType
,spotView.OwnerId
,sp... |
-- --------------------------------------------------
-- Entity Designer DDL Script for SQL Server 2005, 2008, 2012 and Azure
-- --------------------------------------------------
-- Date Created: 02/01/2015 04:05:22
-- Generated from EDMX file: E:\Code Vault\Github\Simorgh\Simorgh\Simorgh\Models\Simorgh.edmx
-- -----... |
--
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET search_path = public, pg_catalog;
SET default_tablespace = '';
SET default_with_oids = fals... |
<gh_stars>1-10
ALTER TABLE state.egp_inbox ADD COLUMN IF NOT EXISTS pendingAction varchar(255); |
<filename>scripts/database/test-data.sql
INSERT INTO public.meter_readings (record_date, gas, electricity_normal, electricity_low) VALUES
('2017-01-01', 1.5, 2.6, 3.7),
('2017-02-01', 1.5, 2.7, 3.7)
|
-- Your SQL goes here
CREATE TABLE products_categories (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
product_id UUID references products(id) ON DELETE CASCADE NOT NULL,
category_id UUID references categories(id) ON DELETE CASCADE NOT NULL
); |
<filename>example/queries1.sql
listMessages(sender, limit, offset) {
SELECT *
FROM message
WHERE sender = $sender
ORDER BY sentAt
LIMIT $limit OFFSET $offset;
} |
SET ANSI_NULLS ON;
SET QUOTED_IDENTIFIER ON;
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SET NOCOUNT ON;
PRINT 'Foo'; |
<reponame>dram/metasfresh
-- 2018-02-27T17:55:40.762
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
DELETE FROM AD_Field_Trl WHERE AD_Field_ID=547214
;
-- 2018-02-27T17:55:40.771
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
DELETE FROM AD_Field WHERE AD_Field_ID=547214
;
-- 20... |
INSERT INTO KRIM_PERM_T (PERM_ID,OBJ_ID,VER_NBR,PERM_TMPL_ID,NMSPC_CD,NM,DESC_TXT,ACTV_IND) VALUES ('1226',SYS_GUID(),1,'1','KC-M','Create Valid Rate','Create a Valid Rates entry','Y');
INSERT INTO KRIM_PERM_ATTR_DATA_T (ATTR_DATA_ID,OBJ_ID,VER_NBR,PERM_ID,KIM_TYP_ID,KIM_ATTR_DEFN_ID,ATTR_VAL) VALUES ('1299',SYS_GUID()... |
<reponame>smith750/kc
ALTER TABLE EPS_PROP_PERSON ADD DIVISION VARCHAR2(100 BYTE)
/
|
-- https://docs.microsoft.com/en-us/sql/relational-databases/security/row-level-security
-- https://github.com/Azure-Samples/azure-sql-db-secure-data-access-api
DROP SECURITY POLICY IF EXISTS rls.AssetDataFilter;
DROP FUNCTION IF EXISTS rls.fn_SecurityPredicate;
DROP FUNCTION IF EXISTS rls.fn_UserAssets;
DROP SC... |
<filename>internal/pkg/orm/migration/20210805112621-policies.sql
-- +migrate Up
CREATE TABLE "policies" (
"id" bigserial,
"ptype" varchar(500) NOT NULL,
"v0" varchar(500) NOT NULL,
"v1" varchar(500) NOT NULL,
"v2" varchar(500) NOT NULL,
"v3" varchar(500) DEFAULT NULL,
"v4" varchar(500) DEFAULT NULL,
"v5... |
-- phpMyAdmin SQL Dump
-- version 3.3.9
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Feb 27, 2012 at 01:41 PM
-- Server version: 5.5.8
-- PHP Version: 5.3.5
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SE... |
LOAD DATA INFILE '/store_files_mysql/clean_store_transactions.csv' INTO TABLE clean_store_transaction FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' IGNORE 1 ROWS; |
<filename>database/src/main/public/global_id.sql
/*
* Copyright 2021 ABSA Group Limited
*
* 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
... |
ALTER TABLE publication
ADD COLUMN width_mm double precision CHECK (width_mm > 0.0),
ADD COLUMN width_in double precision CHECK (width_in > 0.0),
ADD COLUMN height_mm double precision CHECK (height_mm > 0.0),
ADD COLUMN height_in double precision CHECK (height_in > 0.0),
ADD COLUMN depth_mm double p... |
<filename>src/test/resources/com/foundationdb/sql/parser/delete-returning-2.sql
delete from t1 returning * |
<filename>config/workload/tpcds/queries/q79.sql
-- run query 1 in stream 0 using template query79.tpl and seed 2031708268
<<<<<<< HEAD
select
c_last_name,c_first_name,substr(s_city,1,30),ss_ticket_number,amt,profit
from
(select ss_ticket_number
,ss_customer_sk
,store.s_city
,sum(ss... |
Create table If Not Exists Employee (id int, name varchar(255), salary int, departmentId int)
Create table If Not Exists Department (id int, name varchar(255))
Truncate table Employee
insert into Employee (id, name, salary, departmentId) values ('1', 'Joe', '85000', '1')
insert into Employee (id, name, salary, departme... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.