sql stringlengths 6 1.05M |
|---|
-- Remove ON DELETE CASCADE from FK_SalesOrderDetail_SalesOrderHeader_SalesOrderID;
-- logical records cannot be used with ON DELETE CASCADE.
IF EXISTS (SELECT * FROM sys.objects
WHERE name = 'FK_SalesOrderDetail_SalesOrderHeader_SalesOrderID')
BEGIN
ALTER TABLE [Sales].[SalesOrderDetail]
DROP CONSTRAINT [FK_Sales... |
<filename>sql/structure.sql<gh_stars>0
--
-- Definition of table `storefront`.`category`
--
CREATE TABLE `category` (
`categoryId` int(10) unsigned NOT NULL auto_increment,
`name` varchar(200) NOT NULL,
`parentId` int(10) unsigned NOT NULL,
`ident` varchar(200) NOT NULL,
PRIMARY KEY (`categoryId`),
UNIQU... |
INSERT INTO [Lookup].[BankHoliday]
(Date, CompetentAuthority)
VALUES
-- England
('20170102', 1),
('20170414', 1),
('20170417', 1),
('20170501', 1),
('20170529', 1),
('20170828', 1),
('20171225', 1),
('20171226', 1),
('20180101', 1),
('20180330', 1),
('20180402', 1),
('20180507', 1),
('20180528', 1),
('20180827', 1),
(... |
-- Start transaction and plan tests
begin;
select plan(2);
-- Declare some variables
\set user1ID '00000000-0000-0000-0000-000000000001'
\set org1ID '00000000-0000-0000-0000-000000000001'
-- Seed user and organization
insert into "user" (user_id, alias, email) values (:'user1ID', 'user1', '<EMAIL>');
insert into orga... |
<gh_stars>0
CREATE TABLE crash_incident
(
crash_record_number bigint PRIMARY KEY,
county_code integer,
county_name varchar,
municipality_code integer,
municipality_name varchar,
crash_year integer,
crash_month integer,
day_of_week integer,
time_of_day integer,
hour_of_day integer,
illumination var... |
select top 100 s_store_name
,sum(ss_net_profit)
from store_sales
,date_dim
,store,
(select ca_zip
from (
SELECT substr(ca_zip,1,5) ca_zip
FROM customer_address
WHERE substr(ca_zip,1,5) IN (
'89436','30868','65085','22977','83927','77557',
... |
<reponame>vikrant1717/UTP-PlsqL<filename>source/core/coverage/ut_coverage_helper_block.pkb
create or replace package body ut_coverage_helper_block is
/*
utPLSQL - Version 3
Copyright 2016 - 2017 utPLSQL Project
Licensed under the Apache License, Version 2.0 (the "License"):
you may not use this file except i... |
<reponame>Agirish/drill-maprdb-tests
SELECT
SUPP_NATION,
CUST_NATION,
L_YEAR,
SUM(VOLUME) AS REVENUE
FROM
(
SELECT
N1.N_NAME AS SUPP_NATION,
N2.N_NAME AS CUST_NATION,
EXTRACT(YEAR FROM L.L_SHIPDATE) AS L_YEAR,
L.L_EXTENDEDPRICE * (1 - L.L_DISCOUNT) AS VOLUME
FROM
supplier... |
<gh_stars>0
-- +migrate Up
ALTER TABLE schedule_data
ADD COLUMN id BIGSERIAL UNIQUE NOT NULL;
-- +migrate Down
ALTER TABLE schedule_data
DROP COLUMN id;
|
<reponame>aravi5/drill-test-framework
select cast('12345.6789' as decimal(9,4)) / cast('-0.0000000000000000000000000000000000001' as decimal(38,38)) from dfs.drillTestDir.`/numerical_decimal/data` limit 1;
|
/*
Navicat MySQL Data Transfer
Source Server : 腾讯云
Source Server Version : 50552
Source Host : 192.168.127.12:3306
Source Database : personaladmin
Target Server Type : MYSQL
Target Server Version : 50552
File Encoding : 65001
Date: 2017-05-10 21:40:10
*/
SET FOREIGN_KEY_CHECKS=0;
... |
SELECT a.*, surveyls_title, surveyls_description, surveyls_welcometext, surveyls_url FROM SURVEYS as a INNER JOIN SURVEYS_LANGUAGESETTINGS ON (surveyls_survey_id = a.sid and surveyls_language = a.language) ORDER BY active DESC, surveyls_title ASC |
CREATE DATABASE sbtest;
CREATE USER sbtest@localhost;
GRANT ALL PRIVILEGES ON *.* TO sbtest@localhost WITH GRANT OPTION;
|
INSERT INTO `sp_dashboard_block_system` (`id`, `name`, `desc`, `domain`, `scope`, `scope_id`, `view_config`, `data_config`, `version`) VALUES ('working_en', 'working_ statistics', '', '', 'org', 'terminus', '[{\"w\":12,\"h\":9,\"x\":0,\"y\":0,\"i\":\"view-98ae03fd\",\"view\":{\"title\":\"actual workload (MD)\",\"descri... |
ALTER TABLE score add `term_id` int unsigned NOT NULL after `session_id`;
ALTER TABLE observation add `term_id` int unsigned NOT NULL after `session_id`;
ALTER TABLE observation add CONSTRAINT `observation_term_id_fk` FOREIGN KEY (`term_id`) REFERENCES `cv_term` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION;
ALTER T... |
<filename>dspace/etc/oracle/update-sequences.sql<gh_stars>0
--
-- update-sequences.sql
--
-- Version: $Revision$
--
-- Date: $Date$
--
-- Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are perm... |
<filename>software/cabio-database/scripts/sql_loader/no_longer_used/indexes/gene_alias_object_tv.drop.sql
/*L
Copyright SAIC
Distributed under the OSI-approved BSD 3-Clause License.
See http://ncip.github.com/cabio/LICENSE.txt for details.
L*/
drop index GENE_AL_TV_BIG_ID_LWR;
drop index GENE_AL_TV_B... |
<reponame>UMassMedIT/ProfilesRNS
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [Framework.].[RestPath](
[ApplicationName] [varchar](255) NOT NULL,
[Resolver] [varchar](255) NULL,
CONSTRAINT [PK__RestPath__239E4DCF] PRIMARY KEY CLUSTERED
(
[ApplicationName] ASC
)WITH (PAD_INDE... |
-- idx_file_path is redundant and an overhead as the unique constraint creates an identical index
DROP INDEX IF EXISTS idx_file_path;
-- new size column on the file table
ALTER TABLE file ADD COLUMN size INTEGER NOT NULL DEFAULT 0;
ALTER TABLE file ADD COLUMN is_dir BOOLEAN NOT NULL DEFAULT 0;
-- invalid dates cause ... |
<gh_stars>0
DELETE FROM case_data;
INSERT INTO case_data (id, case_type_id, jurisdiction, state, security_classification, data, data_classification, reference, created_date, last_modified, last_state_modified_date)
VALUES (1, 'MultipleSearchCriteriaAndSearchParties', 'PROBATE', 'CaseCreated', 'PUBLIC',
'{
... |
<filename>database.sql
/*drop tables*/
DROP TABLE IF EXISTS users;
DROP TABLE IF EXISTS images_keywords;
DROP TABLE IF EXISTS images;
DROP TABLE IF EXISTS keywords;
/*create table users*/
CREATE TABLE users (
id INT NOT NULL AUTO_INCREMENT,
email VARCHAR(80) NOT NULL,
firstname VARCHAR(80) NOT NULL,
... |
<filename>02CRUD/16CreateViewEmployeesWithSalaries.sql<gh_stars>0
CREATE VIEW V_EmployeesSalaries
AS
SELECT [FirstName], [LastName], [Salary]
FROM Employees |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1:3306
-- Généré le : lun. 04 nov. 2019 à 09:00
-- Version du serveur : 5.7.26
-- Version de PHP : 7.2.18
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... |
CREATE DATABASE;
create table cines.cines(
id_cine int(11) AUTO_INCREMENT not null primary key,
nombre varchar(60)
);
create table cines.peliculas(
id_pelicula int(11) AUTO_INCREMENT not null primary key,
nombre varchar(60),
director varchar (60),
clasficacion varchar (60),
protagonistas varchar (60)
);
c... |
\copy asteroid_raw from '/Users/erictheis/spaceapps-rockmine/data/neo_asteroids.csv' csv;
|
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 23, 2019 at 03:03 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";
/*!40101 SET @OL... |
<reponame>andrebonetti/Gerensys_LojaVirtual
-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 08-Jun-2017 às 19:17
-- Versão do servidor: 5.6.17
-- PHP Version: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... |
CREATE TABLE address (
id_address SERIAL PRIMARY KEY,
street TEXT,
number INTEGER,
country TEXT
);
CREATE TABLE person (
id_person SERIAL PRIMARY KEY,
first_name TEXT,
last_name TEXT,
age INTEGER,
active BOOLEAN,
fk_address INTEGER REFERENCES a... |
select min(n.name), min(t.title)
from info_type as it1,
info_type as it2,
movie_info_idx as mii,
title as t,
cast_info as ci,
name as n,
person_info as pi
WHERE it1.info ILIKE 'rating'
AND it1.id = mii.info_type_id
AND t.id = mii.movie_id
AND t.id = ci.movie_id
AND ci.person_id = n.id
AND n.id = pi.person_id
AND pi.inf... |
<reponame>eib/jam-sessions
DO
$$
BEGIN
IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS
WHERE CONSTRAINT_NAME = 'fk_user_equipment__equipment_id') THEN
ALTER TABLE user_equipment
ADD CONSTRAINT fk_user_equipment__equipment_id
FOREIGN KEY (equipment_id)
REFERE... |
CREATE
OR replace PROCEDURE copy_table(
tablecount INT
) LANGUAGE plpgsql AS $$ DECLARE v_max_table INT;
v_counter_table INT;
v_tnamee VARCHAR(255);
BEGIN v_max_table := tablecount;
v_counter_table := 1;
while v_counter_table < v_max_table loop EXECUTE format(
'create table test_%s as (select *... |
-- phpMyAdmin SQL Dump
-- version 4.9.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Waktu pembuatan: 14 Agu 2020 pada 12.58
-- Versi server: 10.3.23-MariaDB
-- Versi PHP: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_... |
<reponame>theonesp/vol_leak_index<filename>eicu_vli/analysis/sql/vent.sql
-- ------------------------------------------------------------------
-- Title: Ventilation Patients
-- Notes: vol_leak_index/analysis/sql/vent.sql
-- eICU Collaborative Research Database v2.0.
-- --------------------------------... |
drop schema if exists public cascade;
create schema if not exists public;
grant all on schema public to postgres;
grant all on schema public to public;
-- table definitions for the TPC-H Benchmark
create table nation (
n_nationkey integer primary key not null,
n_name char(25) not null,
n_r... |
--Design at least 10 SQL queries for suitable database application using SQL DML statements: all types of Join, Sub-Query and View
-- Author: <NAME>.
-- continuing from Assignment 3 i.e database and table created and values added in the table
-- Existing Database
mysql> show databases;
+--------------------+
| Databa... |
-- file:plpgsql.sql ln:3740 expect:true
select * from rttest()
|
<filename>src/test/resources/sql/create_aggregate/59e9c9ba.sql
-- file:create_aggregate.sql ln:109 expect:true
CREATE AGGREGATE sumdouble (float8)
(
stype = float8,
sfunc = float8pl,
mstype = float8,
msfunc = float8pl,
minvfunc = float8mi
)
|
-- 1) List the following details of each employee: employee number, last name,
-- first name, gender, and salary.
SELECT e.emp_no, e.last_name, e.first_name, e.gender, s.salary
FROM employees e
JOIN salaries s
ON (e.emp_no = s.emp_no);
-- 2) List the employees who were hired in 1986
ALTER TABLE employees
ALTER COLUMN... |
<reponame>smith750/kc
-- These must be run together to avoid errors --
ALTER TABLE QUESTIONNAIRE
ADD (DOCUMENT_NUMBER_TEMP VARCHAR2(40));
UPDATE QUESTIONNAIRE
SET DOCUMENT_NUMBER_TEMP = DOCUMENT_NUMBER;
ALTER TABLE QUESTIONNAIRE
DROP COLUMN DOCUMENT_NUMBER;
ALTER TABLE QUESTIONNAIRE
ADD (DOCUMENT_NUMBER VAR... |
is_be =
true;
Bar =
if is_be { F32Be } else { F32Le };
struct Test {
bar: Bar,
}
|
<filename>fazri_taher.sql
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 28 Jan 2022 pada 05.36
-- Versi server: 10.4.21-MariaDB
-- Versi PHP: 8.0.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
<filename>src/main/resources/php/sqlparser/tests/expected/creator/issue63b.sql
SELECT col as somealias FROM table ORDER BY somealias ASC LIMIT 1 |
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- *********************************** Drop foreign keys *********************************
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- --------------------------------------... |
<reponame>seralf/mondial_sqlite
/* Citylocalname */
DROP TABLE IF EXISTS Citylocalname
;
CREATE TABLE IF NOT EXISTS Citylocalname(
City VARCHAR2(50),
Country VARCHAR2(4),
Province VARCHAR2(50),
localname VARCHAR2(120),
CONSTRAINT CitylocalnameKey PRIMARY KEY (Country, Province, City)
)
;
INSERT INTO Citylocaln... |
<filename>sql/letswifi.mysql.sql
CREATE TABLE `realm` (
`realm` varchar(127) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
PRIMARY KEY (`realm`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE `realm_signer` (
`realm` varchar(127) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ''... |
CREATE PROCEDURE [dbo].[RegisterRole]
@RoleName varchar(130)
AS
if exists (select null from [Role] where RoleName = @RoleName)
return;
insert into [Role]
(
Id,
RoleName
)
values
(
newid(),
@RoleName
) |
<gh_stars>0
-- This is a query file that has been blacklisted.
-- It includes a query that should crash Spark.
-- If the test case is run, the whole suite would fail.
some random not working query that should crash Spark.
|
<reponame>ardlema/spark
-- Test data.
CREATE OR REPLACE TEMPORARY VIEW testData AS SELECT * FROM VALUES
(null, 1L, "a"), (1, 1L, "a"), (1, 2L, "a"), (2, 2147483650L, "a"), (1, null, "b"), (2, 3L, "b"),
(3, 2147483650L, "b"), (null, null, null), (3, 1L, null)
AS testData(val, val_long, cate);
-- RowsBetween
SELECT val,... |
<filename>vwCourses.sql
CREATE OR ALTER VIEW vwCourses AS
SELECT
[Course].[Id],
[Course].[Tag],
[Course].[Title],
[Course].[Url],
[Course].[Summary],
[Course].[CreateDate],
[Category].[Title] AS [Category],
[Author].[Name] AS [Author]
FROM
... |
<reponame>MSUSSolutionAccelerators/Workplace-Intelligence-Solution-Accelerator<gh_stars>0
CREATE TABLE [dbo].[WPAEmployee] (
[WPAEmployeeId] NVARCHAR (255) NULL,
[WPAEmployeeName] NVARCHAR (255) NULL,
[EmployeeHireDate] DATETIME NULL,
[Organization] NVARCHAR (255) NULL,
[L... |
<reponame>sarahjfreitas/tis2<gh_stars>0
create table users
(
userId INTEGER PRIMARY KEY,
username TEXT NOT NULL,
email TEXT NOT NULL,
name TEXT NOT NULL,
password TEXT NOT NULL,
active INTEGER,
createdIn INT NOT NULL,
updatedIn INT NULL,
disabledIn INT NUL... |
<filename>.c9/metadata/workspace/persons.sql
{"filter":false,"title":"persons.sql","tooltip":"/persons.sql","undoManager":{"mark":30,"position":30,"stack":[[{"start":{"row":0,"column":0},"end":{"row":0,"column":1},"action":"insert","lines":["C"],"id":1}],[{"start":{"row":0,"column":1},"end":{"row":0,"column":2},"action... |
CREATE TABLE IF NOT EXISTS `zion_mail_quota` (
`mandt` int(11) NOT NULL DEFAULT 0,
`user` varchar(120) NOT NULL,
`server` varchar(45) NOT NULL,
`date` date NOT NULL,
`hour` int(11) NOT NULL,
`total` int(11) NOT NULL DEFAULT 0,
`updated_at` datetime DEFAULT NULL,
PRIMARY KEY (`mandt`,`user`,`server`,`dat... |
CREATE DATABASE burgers_db;
USE burgers_db;
CREATE TABLE burgers
(
id INT NOT NULL AUTO_INCREMENT,
burger_name VARCHAR(40) NOT NULL,
devoured BOOLEAN NOT NULL DEFAULT 0,
PRIMARY KEY (id)
); |
-- MySQL dump 10.15 Distrib 10.0.19-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: portal_users
-- ------------------------------------------------------
-- Server version 10.0.19-MariaDB-1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RES... |
<filename>db/dbwisata2.sql
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jun 21, 2020 at 07:18 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.2.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "... |
<reponame>namithadeshpande/LeetCode-SQL
/* The Employee table holds all employees. Every employee has an Id, a salary, and there is also a column for the department Id.
+----+-------+--------+--------------+
| Id | Name | Salary | DepartmentId |
+----+-------+--------+--------------+
| 1 | Joe | 70000 | 1 ... |
<filename>conf/evolutions/default/25.sql
# --- !Ups
CREATE TABLE email
(
id serial,
message TEXT,
sent boolean not null,
deleted boolean not null,
constraint pk_email primary key (id)
);
# --- !Downs
DROP TABLE email;
|
<reponame>getwasim/egov-smartcity-suites-test
-----------------Role action mappings to search LOA form----------------
insert into eg_action (ID,NAME,URL,QUERYPARAMS,PARENTMODULE,ORDERNUMBER,DISPLAYNAME,ENABLED,CONTEXTROOT,VERSION,CREATEDBY,CREATEDDATE,LASTMODIFIEDBY,LASTMODIFIEDDATE,APPLICATION) values (NEXTVAL('SEQ_E... |
<reponame>keikari/commentron<filename>migration/011_accepted_default.sql
-- +migrate Up
-- +migrate StatementBegin
ALTER TABLE blocked_list_invite CHANGE COLUMN accepted accepted TINYINT(1) NULL DEFAULT NULL;
-- +migrate StatementEnd |
DROP SCHEMA sequences
|
-- For use with PostgreSQL
CREATE TABLE public.users (
id serial NOT NULL,
email text NOT NULL,
password_hash text NOT NULL,
created_at timestamptz NOT NULL DEFAULT now(),
CONSTRAINT users_email_key UNIQUE (email),
CONSTRAINT users_pkey PRIMARY KEY (id)
);
CREATE UNIQUE INDEX email_unique ON public.users USING ... |
<reponame>angeelgarr/gestor_archivos_php
CREATE TABLE IF NOT EXISTS usuarios
(
id BIGINT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
correo VARCHAR(255) NOT NULL UNIQUE,
palabra_secreta VARCHAR(255) NOT NULL,
administrador SMALLINT NOT NULL
);
CREATE TABLE IF NOT ... |
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE = '' */;
/*!40014 SET @OLD_UNIQUE_CHECKS = @@UNIQUE_CHECKS, UNIQUE_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 */;
/*Table structure for table `auth` */
CREATE... |
create table user
(
id int,
name varchar(150) null,
last_name varchar(150) null,
email varchar(200) null,
password varchar(150) null,
created_by varchar(150) null,
created_date datetime null,
last_modified_by varchar(150) null,
last_modified_date datetime null
);
create unique index... |
<filename>annis-service/src/main/distribution/sql/left_token_right_token.sql
ALTER TABLE _node ADD left_token integer, ADD right_token integer;
UPDATE _node AS parent SET
left_token = (
CASE
WHEN parent.token_index IS NULL THEN (
SELECT min(token_index) FROM _node AS child
WHERE
parent.left = chil... |
create or replace package body ut_suite_manager is
/*
utPLSQL - Version 3
Copyright 2016 - 2021 utPLSQL Project
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.o... |
<reponame>jinlongsj/jinlong-system
-- 表15 :角色状态字典表 (dic_jinlong_system_role_state)
DROP TABLE IF exists dic_jinlong_system_role_state;
CREATE TABLE dic_jinlong_system_role_state
(
value INT(11) AUTO_INCREMENT COMMENT '角色状态ID',
name VARCHAR(20) NOT NULL COMMENT '角色状态名称',
PRIMARY KEY (value) -- 设置主键:角色状态... |
<gh_stars>0
--CREATE SCHEMA SPESS AUTHORIZATION DBA
/
SET DATABASE UNIQUE NAME SPRINGESSENTIALS
/
--SET DATABASE DEFAULT INITIAL SCHEMA PUBLIC
--/
-- User Table
CREATE TABLE TBL_USER (
ID INTEGER IDENTITY,
NAME VARCHAR(200) NOT NULL,
USER_NAME VARCHAR(25) NOT NULL,
PASSWORD VARCHAR(20) NOT NULL,
DOB DATE,
PRO... |
<filename>docs/axon-framework.sql
CREATE TABLE `association_value_entry` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`association_key` varchar(255) NOT NULL,
`association_value` varchar(255) DEFAULT NULL,
`saga_id` varchar(255) NOT NULL,
`saga_type` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `IDXk4... |
-- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 19, 2019 at 08:26 AM
-- Server version: 10.1.34-MariaDB
-- PHP Version: 7.2.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
<filename>src/database/mySQL/application/create_tables.sql<gh_stars>1-10
USE application;
DROP TABLE IF EXISTS user_role;
DROP TABLE IF EXISTS role_type;
DROP TABLE IF EXISTS job_category;
DROP TABLE IF EXISTS user_role_project;
DROP TABLE IF EXISTS user_access_profile;
DROP TABLE IF EXISTS role_type_access_profile;
D... |
select p.name as "Pod Name",
pm.container_name as "Container Name",
pvc.name as "PVC Name",
pv.name as "PV Name",
target_portal as "Target Portal",
iqn as "IQN",
lun as "LUN",
fs_type as "FS Type"
from pod p, pod_mount pm, pvc, pv, iscsi i
where p.uid = pm.pod_uid and pm.pvc_uid = pvc.uid and pvc.pv_uid=pv.uid
... |
-- set up
.headers on
.mode column
-- load database
.read bd.sql
.print "Base de datos cargada"
/*Un archivo llamado consultas.sql en donde estén los queries (select) relacionados a su proyecto. Para las consultas deben de tener:
Para cada tabla, una consulta general, en donde se retornen todos los campos (por eje... |
<gh_stars>1-10
ALTER TABLE sessions DROP CONSTRAINT IF EXISTS sessions_user_name_key;
ALTER TABLE sessions DROP CONSTRAINT IF EXISTS sessions_user_id_key; |
<reponame>goldmansachs/obevo-kata
CREATE FUNCTION func457() RETURNS integer
LANGUAGE plpgsql
AS $$ DECLARE val INTEGER; BEGIN val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE358);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE145);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE42... |
<filename>backend/scheme.sql
drop table if exists images;
create table if not exists images(
id integer primary key autoincrement,
path varchar(255) not null
);
create table if not exists count (
id integer primary key autoincrement,
count integer not null,
time integer not null
);
|
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='TRADITIONAL';
ALTER TABLE `behaviour_composer_schema2`.`micro_behaviour`
DROP INDEX `url`
, ADD INDEX `url` (`url`(255) ASC) ;
ALTER TABLE `behavio... |
/*L
Copyright SAIC
Distributed under the OSI-approved BSD 3-Clause License.
See http://ncip.github.com/cabio/LICENSE.txt for details.
L*/
create index RESEARCH_INST_ID on RESEARCH_INSTITUTION_SOURCE(ID) tablespace CABIO_FUT;
create index RESEARCH_INST_NAME on RESEARCH_INSTITUTION_SOURCE(NAME) tablesp... |
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 12, 2021 at 09:24 PM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 8.0.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
<filename>DATABASEUSED.sql
-- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 24, 2019 at 02:08 AM
-- Server version: 10.1.31-MariaDB
-- PHP Version: 7.2.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+... |
<reponame>paulalcabasa/cavs
SELECT id meal_allowance_id,
CONCAT('MA',LPAD(id,5,'0')) meal_allowance_no,
barcode_no,
earned_by_no_of_days,
alloted_amount,
remaining_amount,
CONCAT(
DATE_FORMAT(valid_from,'%m/%d/%Y'),' - ',
DATE_FORMAT(valid_until,'%m/%d/%Y')
) validity_... |
<reponame>thewileylab/synPUF
CREATE TABLE domain (
domain_id VARCHAR(20) NOT NULL,
domain_name VARCHAR(255) NOT NULL,
domain_concept_id INTEGER NOT NULL
)
; |
<filename>L9_1/rest-app/init_db.sql
CREATE TABLE IF NOT EXISTS users(
id serial,
name character varying NOT NULL,
favourite_number int NOT NULL,
CONSTRAINT "pk_id" PRIMARY KEY(id)
)
|
SELECT
TO_DATE(report_date::varchar(255), 'YYYYMM') AS report_date
, pregnant_female_count
, TO_TIMESTAMP(processed_at, 'YYYY-MM-DD HH24:MI:SS') AS processed_at
FROM {{ref('pregnancy_base')}}
WHERE county_name LIKE '%Total%'
|
<reponame>OlegKhaykin/OK<gh_stars>0
CREATE OR REPLACE VIEW test_psa.vw_psa_tst_new_bpu_bplv AS
SELECT
-- 29-Jul-2021, OK: moved to TEST_PSA, renamed 2 columns.
-- 24-Aug-2020, OK: created
ps.PlanSponsorNM plan_sponsor_name,
bpu.bpu_skey, bpu.bpu_cd,
bplv.BenefitInfoCD||'-'||bplv.ProvisionCD||'-'||bplv.LineVa... |
-- RedefineTables
PRAGMA foreign_keys=OFF;
CREATE TABLE "new_Image" (
"image" TEXT NOT NULL,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"uuid" TEXT NOT NULL,
"imageid" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"userid" INTEGER NOT NULL,
FOREIGN KEY ("userid") REFERENCES "User" ("... |
<gh_stars>10-100
TRUNCATE campaign CASCADE;
INSERT INTO campaign VALUES
(1, 'Edit Quality -- 2014 10k sample', 'enwiki',
'damaging_and_goodfaith', 'DiffToPrevious', '', NOW(), 1, 10, True),
(2, 'Edit Type -- 2015 january sample', 'enwiki',
'edit_type', 'DiffToPrevious', '', NOW(), 1, 10, True),
(3, 'Qualida... |
<reponame>jugbd/mNet
CREATE TABLE IF NOT EXISTS `outdoor_register` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`created_date` datetime NOT NULL,
`last_modified_date` datetime NOT NULL,
`follow_up_advice` longtext,
`outcome` longtext,
`comments` varchar(100) DEFAULT NULL,
`contact_person` varchar(100) DEFAU... |
CREATE TABLE [dbo].[CounterFriendlyName] (
[ID] SMALLINT IDENTITY (1, 1) NOT NULL,
[CounterFriendlyName] NVARCHAR (100) NOT NULL,
PRIMARY KEY CLUSTERED ([ID] ASC),
UNIQUE NONCLUSTERED ([CounterFriendlyName] ASC)
);
|
<filename>resources/sql/user/user.sql
-- :name get-user-by-id
-- :command :select
-- :result :one
-- :doc Busca usuário pelo seu id
select *,
St_x(ultima_localizacao) as latitude,
St_y(ultima_localizacao) as longitude from users
where id = :id;
-- :name get-user-by-email
-- :command :select
-- :result :one
--... |
<reponame>aliostad/deep-learning-lang-detection
--------------------------------------------------------
-- File created - Wednesday-May-28-2014
--------------------------------------------------------
--------------------------------------------------------
-- DDL for Table HI_MGMT_FEES_LIVE
---------------------... |
<reponame>uk-gov-mirror/SkillsFundingAgency.das-apply-service
CREATE SEQUENCE [dbo].[RoatpAppReferenceSequence]
AS INT
START WITH 100001
INCREMENT BY 1
MINVALUE 100000
MAXVALUE 2147483647
CYCLE
CACHE |
<reponame>ryanmaclean/treasure-boxes<filename>machine-learning-box/ml_tips/queries/normalize_whole.sql
-- client: molehill/0.0.1
select
rowid
, survived
, zscore(
age
, ${td.last_results.age_mean}
, ${td.last_results.age_std}
) as age
, zscore(
fare
, ${td.last_results.fare_mean}
, ${t... |
<filename>roles/db/files/dump.sql<gh_stars>0
CREATE TABLE IF NOT EXISTS demo (
message varchar(255) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
INSERT INTO demo (message) VALUES('Hello World!');
|
-- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 30-Nov-2018 às 01:35
-- Versão do servidor: 10.1.32-MariaDB
-- PHP Version: 7.2.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... |
# ---
# --- !Ups
CREATE TABLE uploaded_directory (
uploaded_directory_id bigint not null,
store_user_id bigint NOT NULL,
file_name character varying(2048) not null,
category_name character varying(16) not null,
created_time timestamp not null default current_timestamp,
constraint pk_uploaded_directory pri... |
CREATE VIEW dbo.TotalChargeback
AS
SELECT top 100 percent
dbo.ChargeBack.Id
, IIF(dbo.ChargeBack.Approved = 1, ISNULL(dbo.ChargeBack.Amount, 0), 0) AS ApprovedAmount
, ISNULL(dbo.vwChargeBacksTakenTotal.AmountTaken, 0) AS AmountTaken
, IIF(dbo.ChargeBack.Approved = 1, ISNULL(dbo.ChargeBack.Amount, 0), 0) - I... |
select count(*) from j2 where c_timestamp not in ( select c_timestamp from j1) ;
|
<reponame>scott-confluent/kafka-tutorials
SELECT * FROM potential_slowloris_attacks EMIT CHANGES LIMIT 1;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.