sql stringlengths 6 1.05M |
|---|
<gh_stars>0
CREATE DATABASE IF NOT EXISTS recommendation_spark;
USE recommendation_spark;
DROP TABLE IF EXISTS Recommendation;
DROP TABLE IF EXISTS Rating;
DROP TABLE IF EXISTS Accommodation;
CREATE TABLE IF NOT EXISTS Accommodation
(
id varchar(255),
title varchar(255),
location varchar(255),
price int,
room... |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Apr 28, 2022 at 07:49 AM
-- Server version: 8.0.28
-- PHP Version: 7.4.26
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@... |
<filename>db/schema.sql
DROP DATABASE IF EXISTS sequelize_burgers_db;
### Schema
CREATE DATABASE sequelize_burgers_db;
USE sequelize_burgers_db;
|
<reponame>prajapati-akash/ci4
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 27, 2021 at 02:38 PM
-- 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";
/*!401... |
-- phpMyAdmin SQL Dump
-- version 4.0.9
-- http://www.phpmyadmin.net
--
-- Inang: 127.0.0.1
-- Waktu pembuatan: 15 Jul 2015 pada 17.49
-- Versi Server: 5.6.14
-- Versi PHP: 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 */;
/*!401... |
ALTER TABLE dittnavbeskjeder
ADD COLUMN updated TIMESTAMP;
ALTER TABLE dittnavbeskjeder
ADD COLUMN done BOOLEAN; |
<filename>ViewSQLAuditFiles.sql
--Old file
SELECT * --top 100 statement
FROM sys.fn_get_audit_file ('d:\PHI_Audit\PHI_Audit_9FADC5EC-33CD-4283-A706-CD17DB6CF457_0_130707917149880000.sqlaudit',default,default)
where server_principal_name = 'EC2\admincr'
GO
--d:\PHI_Audit\PHI_Audit_9FADC5EC-33CD-4283-A706-CD17... |
CREATE DATABASE events_prod;
CREATE DATABASE events_dev;
CREATE DATABASE events_test;
|
<reponame>uk-gov-mirror/SkillsFundingAgency.das-data-management
CREATE VIEW [ASData_PL].[DAS_SpendControl_V2]
AS
SELECT
COALESCE(Account.EmployerAccountId, -1) AS EmployerAccountId
,COALESCE(Account.DasAccountId, 'XXXXXX') AS DasAccou... |
<reponame>hertzwhenip/virtual-hammond
CREATE TABLE interpretations(
id INTEGER PRIMARY KEY AUTOINCREMENT,
song_id INTEGER,
registry TEXT,
effects TEXT,
wave_file TEXT UNIQUE,
votes INTEGER DEFAULT 0,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
updated_at DATETIME DEFAULT CURRENT_TIMES... |
ALTER TABLE "public"."subjects"
ADD COLUMN "position" INT4 NOT NULL DEFAULT 0;
|
-- phpMyAdmin SQL Dump
-- version 4.7.0-beta1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: 2017-06-25 22:28:14
-- 服务器版本: 5.7.18-log
-- PHP Version: 7.1.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!... |
<reponame>mandolyte/db-utils
insert into node (id)
values (?) |
-- placename patterns
select sum(cnt) as sum, inclass from (
select name, cnt, string_agg(word, '|' order by seq) as words, string_agg(inclass, '|' order by seq) as inclass
from (
select clean_placenames(l_placenam) as name, count(*) as cnt
from rawdata.roadseg where l_placenam not in ... |
SELECT atr.AccountId,
a.FirstName+' '+a.LastName AS FullName,
MAX(DATEDIFF(DAY,t.ArrivalDate,t.ReturnDate)) AS LongestTrip,
MIN(DATEDIFF(DAY,t.ArrivalDate,t.ReturnDate)) AS ShortestTrip
FROM Accounts a
JOIN AccountsTrips atr ON a.Id=atr.AccountId
JOIN Trips t ON t.Id=atr.TripId
WHERE t.CancelDate IS... |
-- MySQL Administrator dump 1.4
--
-- ------------------------------------------------------
-- Server version 5.1.35-community
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNE... |
SELECT count(*) AS num_events
FROM EVENTS
WHERE extract(hour from created_at) = extract(hour from CURRENT_time) and created_at>=current_date
|
<gh_stars>1-10
INSERT INTO `options` (`option_id`, `option_name`, `option_value`) VALUES
(1, 'hh_theme_options', 'a:127:{s:9:\"site_name\";s:33:\"[:en]Awebooking[:ar]Awebooking[:]\";s:16:\"site_description\";s:57:\"[:en]Awesome Booking System[:ar]Awesome Booking System[:]\";s:10:\"main_color\";s:7:\"#F1556C\";s:12:\"he... |
<reponame>jdkoren/sqlite-parser
-- boundary2.test
--
-- db eval {
-- SELECT r, a FROM t1 WHERE x='0000000000200000'
-- }
SELECT r, a FROM t1 WHERE x='0000000000200000' |
<gh_stars>10-100
/*
Author: <NAME>, (t: @EitanBlumin | b: <EMAIL>)
Date: February, 2018
Description:
The data returned by the script would be a list of execution plans,
their respective SQL statements, the Sub-Tree cost of the statements, and their usecounts.
Using this script, you will be able to identify execution ... |
<gh_stars>0
-- File generated by Mangos Online Translation Editor (MOTE) v2.10
SET NAMES 'utf8';
UPDATE `trans_words` SET `content_loc4`='Cat Figurine Trap' WHERE `word_id` = 117014; -- locales_gameobject - name : entry=12653
UPDATE `trans_words` SET `content_loc4`='Fire on ground' WHERE `word_id` = 114820; -- locales_... |
--
-- Creating the temporary logging table
-- If there is an Exception here, ignore it.
CREATE TABLE xx_temp (msg VARCHAR2 (4000));
--
-- Declaring the package
CREATE OR REPLACE PACKAGE xxu_rn_service
AS
-- Constants
-- Change this constant to the hostname you intend to allow for updates propagation.
... |
<reponame>vladkorsik/vocab_covid
--Add new relationship_id for NAACCR: 'Has end date'
DO $$
DECLARE
z int;
ex int;
pRelationship_name constant varchar(100):='Has end date';
pRelationship_id constant varchar(100):='Has end date';
pIs_hierarchical constant int:=0;
pDefines_ancestry constant i... |
CREATE DATABASE factory;
CREATE TABLE factory.user (
id INT PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(50) NOT NULL,
surname VARCHAR(50) NOT NULL
);
CREATE TABLE factory.product (
id INT PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(50) NOT NULL,
price INT NOT NULL
) |
-- the table to store GlobalSession data
drop table if exists `global_table`;
create table `global_table` (
`xid` varchar(128) not null,
`transaction_id` bigint,
`status` tinyint not null,
`application_id` varchar(32),
`transaction_service_group` varchar(32),
`transaction_name` varchar(128),
`timeout` in... |
CREATE DATABASE FOODDB;
USE FOODDB;
CREATE TABLE CUSTOMERINFO (
CUSTOMERID INT (10) AUTO_INCREMENT PRIMARY KEY,
FIRSTNAME CHAR (20) NOT NULL,
LASTNAME CHAR (20) NOT NULL,
ADDRESS VARCHAR (50) NOT NULL,
EMAIL VARCHAR (50) NOT NULL,
DOB DATE NOT NULL,
REGDATE DATE NOT NULL,
GENDER CHAR (1) NOT NULL
) ENGINE = ... |
@@employees_test.sql
@@award_bonus.sql
@@test_award_bonus.pkg
set serveroutput on size unlimited format truncated
exec ut.run(user||'.test_award_bonus');
drop package test_award_bonus;
drop procedure award_bonus;
drop table employees_test;
|
<reponame>andersk/pgroonga
SELECT jsonb_pretty(
pgroonga_result_to_jsonb_objects(
'{
"header": {
"return_code": 0,
"start_time": 0.0,
"elapsed_time": 0.0
},
"body": {
"n_hits": 10,
"columns": [
{"name": "_id", "type": "UInt32"},
{"name": "bool", "type": "Bool"},
{"name":... |
CREATE SCHEMA `db_mini_baccarat` DEFAULT CHARACTER SET utf8 ;
CREATE TABLE `db_mini_baccarat`.`tbl_bet_record` (
`bet_id` int(11) NOT NULL AUTO_INCREMENT,
`bet_uuid` varchar(64) NOT NULL,
`client_id` varchar(45) NOT NULL,
`front_end` varchar(45) NOT NULL,
`server_code` varchar(45) NOT NULL,
`table_code` v... |
<reponame>pdlussier/paullefebvre-STORM
CREATE TABLE Team (ID INTEGER PRIMARY KEY, Name TEXT, Coach TEXT);
CREATE TABLE Player (ID INTEGER PRIMARY KEY, TeamID INTEGER, Name TEXT, Age INTEGER, Positions TEXT, Email TEXT); |
CREATE TABLE `user`(
`username` varchar(100) NOT NULL,
`password` varchar(100) NOT NULL,
`email` varchar(100) NOT NULL,
PRIMARY KEY(`email`)
) |
<filename>notes/sql_tests.sql
select "id", "name", "extended", COALESCE(
array_agg(
distinct(
jsonb_build_object(
'id', children.child_id
)
)
)
FILTER (WHERE children.child_id IS NOT NULL),
'{}')
as chil... |
<reponame>snavarro017/Rea<filename>assets/upload/profesor/2/BDrea.sql<gh_stars>0
-- MySQL Script generated by MySQL Workbench
-- Thu Oct 25 17:32:07 2018
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOR... |
<filename>config/sql/004-scores.sql<gh_stars>0
create table public.scores
(
id serial not null
constraint scores_pk
primary key,
payment_amount money
);
alter table public.scores owner to postgres;
|
<filename>l2j_datapack/dist/sql/game/updates/20130216update.sql
UPDATE character_quests SET name='Q00034_InSearchOfCloth' WHERE name='34_InSearchOfClothes';
UPDATE character_quests SET name='Q00035_FindGlitteringJewelry' WHERE name='35_FindGlitteringJewelry';
UPDATE character_quests SET name='Q00036_MakeASewingKit' WHE... |
DELETE FROM screening;
DELETE FROM seat;
DELETE FROM auditorium;
DELETE FROM movie;
INSERT INTO movie(id, actors, description, director, duration, title) VALUES ('7cf56ebc-5a4d-4cbe-a372-057783e5c545', ' <NAME>, <NAME>, <NAME> ', 'Luke Skywalker joins forces with a Jedi Knight, a cocky pilot, a wookiee and two dr... |
use burgers_db;
insert into burgers(burger_name, devoured)
values('Bacon Burger', false), ('Vegie Burger', false), ('Triple Stack', false); |
/**
* Author: wesley
* Created: Sep 26, 2019
*/
-- insert data into database tb_categoria
INSERT INTO tb_categoria (id,nome) VALUES (1,'Informática');
INSERT INTO tb_categoria (id,nome) VALUES (2,'Eletrônicos');
INSERT INTO tb_categoria (id,nome) VALUES (3,'Papelaria');
INSERT INTO tb_categoria (id,nome) VALUES (4... |
INSERT INTO SYSTEXTIL.BASI_030
(NIVEL_ESTRUTURA, REFERENCIA, DESCR_REFERENCIA, UNIDADE_MEDIDA, PERC_2_QUALIDADE, COLECAO, CONTA_ESTOQUE, LINHA_PRODUTO, ARTIGO, ARTIGO_COTAS, ARTIGO_APROVEIT, PERCENT_DESCONTO, TIPO_PRODUTO, VARIACAO_CORES, TAMANHO_FILME, RAPORTAGEM, PERCENT_PERDA_1, PERCENT_PERDA_2, PERCENT_PERDA_3, APR... |
<gh_stars>1-10
-- script to agg curves stats
DROP TABLE IF EXISTS psra_bc.psra_bc5940_80_src_loss_b0, psra_bc.psra_bc5940_80_src_loss_r2, psra_bc.psra_bc5940_80_src_loss, psra_bc.psra_bc5940_80_src_loss_b0_temp, psra_bc.psra_bc5940_80_src_loss_r2_temp CASCADE;
-- create table
CREATE TABLE psra_bc.psra_bc5940_80_src_lo... |
<filename>src/Schema-SecAuditLog.sql
/****** Object: Table [dbo].[SecAuditLog] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[SecAuditLog](
[ID] [uniqueidentifier] NOT NULL,
[logtime] [datetime] NOT NULL,
[server] [nvarchar](50) NOT NULL,
[remote_address] [nvarchar](50) NULL,
[rem... |
<reponame>adrianpli/examenes
-- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 05, 2021 at 09:04 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!4010... |
begin;
create temporary table missing (
team_id integer,
player_name text
);
copy missing from '/tmp/team_rosters_missing.csv' csv;
insert into ncaa_pbp.team_rosters
(team_id,player_name)
(select team_id,player_name
from missing);
commit;
|
use employees;
-- Add columns to Book table for ASIN, UPC, EAN.
-- ASIN - Amazon Standard Identification Number - 10 Alphanumeric characters
-- UPC - Universal Product Code - 12 Numeric Digits
-- EAN - International / European Article Number - 13 Numeric Digits
-- Hint: Use Decimal for columns with numeric digits
AL... |
<reponame>markpolyak/sqlfluff<gh_stars>1-10
INSERT INTO books (title, author)
VALUES ('The Great Gatsby', '<NAME>');
INSERT books (title, author)
VALUES ('The Great Gatsby', '<NAME>');
|
<reponame>Shuttl-Tech/antlr_psql<gh_stars>10-100
-- file:alter_table.sql ln:1602 expect:true
create function alter1.same(alter1.ctype, alter1.ctype) returns boolean language sql
as 'select $1.f1 is not distinct from $2.f1 and $1.f2 is not distinct from $2.f2'
|
<reponame>smith750/kc
DELIMITER /
ALTER TABLE PERSON_FIN_INT_DISCLOSURE
ADD CONSTRAINT UQ_PERSON_FIN_INT_DISCLOSURE
UNIQUE (ENTITY_NUMBER, SEQUENCE_NUMBER)
/
DELIMITER ;
|
SELECT
"ARTICLES_EDITS".user_id,
"ARTICLES_EDITS".title,
"ARTICLES_EDITS".text
FROM
"conduit_db"."ARTICLES_EDITS"
WHERE "ARTICLES_EDITS".article_id = $1
AND "ARTICLES_EDITS".team_id = $2
AND "ARTICLES_EDITS".timestamp = $3; |
<reponame>ygnzayarphyo/docker-airflow
CREATE DATABASE db_user;
USE db_user;
DROP TABLE IF EXISTS `tbl_users`;
CREATE TABLE `tbl_users` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL,
`tsCreate` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY ... |
create table activity (
id varchar(36) not null,
date timestamp not null,
eater varchar(36) not null,
primary key (id),
unique (id)
);
create table activity_eater_relation (
id varchar(36) not null,
date timestamp not null,
eater_activity_typ... |
<reponame>xiangsiren/renren-securitys<gh_stars>1-10
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50553
Source Host : 127.0.0.1:3306
Source Database : renren_securitys
Target Server Type : MYSQL
Target Server Version : 50553
File Encoding : 65001
... |
<reponame>smnorris/bcstreamcrossings<filename>sql/report01_total.sql<gh_stars>1-10
-- total number of crossings by type
SELECT
modelled_crossing_type,
count(*) as n
FROM fish_passage.modelled_stream_crossings
GROUP BY modelled_crossing_type; |
<gh_stars>10-100
DROP TABLE IF EXISTS view_bridge_activities;
|
-- Tags: no-replicated-database
-- Tag no-replicated-database: Different query_id
DROP TABLE IF EXISTS tmp;
CREATE TABLE tmp ENGINE = TinyLog AS SELECT queryID();
SYSTEM FLUSH LOGS;
SELECT query FROM system.query_log WHERE query_id = (SELECT * FROM tmp) AND current_database = currentDatabase() LIMIT 1;
DROP TABLE tmp... |
<gh_stars>1-10
-- This SQL code was generated by sklearn2sql (development version).
-- Copyright 2018
-- Model : CaretClassifier_ctree2_pca
-- Dataset : FourClass_100
-- Database : mssql
-- This SQL code can contain one or more statements, to be executed in the order they appear in this file.
-- Model deployment ... |
-- This SQL code was generated by sklearn2sql (development version).
-- Copyright 2018
-- Model : CaretClassifier_earth
-- Dataset : iris_str_tgt
-- Database : mssql
-- This SQL code can contain one or more statements, to be executed in the order they appear in this file.
-- Model deployment code
WITH earth_inpu... |
<gh_stars>0
CREATE PROCEDURE [dbo].[sp_ItemInsert]
@Name nvarchar(50),
@Description nvarchar(250),
@Price money,
@Quantity int,
@ItemId int output
AS
BEGIN
SET NOCOUNT ON
INSERT INTO dbo.Item([Name],[Description],Price,Quantity)
VALUES (@Name,@Description,@Price,@Quantity);
SET @ItemId=SCOPE_IDENTI... |
<reponame>asinghvi17/PROJ<gh_stars>0
-- This file is hand generated.
--
-- NOTE: see also grid_alternatives_generated.sql for automatically generated
-- entries.
--
------------------------------------------------------
-- grid_packages
------------------------------------------------------
INSERT INTO grid_packages ... |
/*
SQLyog Enterprise - MySQL GUI v7.02
MySQL - 5.7.19 : Database - connectionary
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 S... |
-----------------------------------
--- exercise
-----------------------------------
CREATE SEQUENCE training_seq INCREMENT BY 1;
CREATE TABLE training
(
id int8 NOT NULL,
additional_info varchar(255),
date date NOT NULL,
name varchar(255),
gym_id ... |
<filename>codility/20211020_sql_event_delta.sql
-- Given a table events with the following structure:
-- create table events (
-- event_type integer not null,
-- value integer not null,
-- time timestamp not null,
-- unique(event_type, time)
-- );
-- write an SQL query that, for each event_... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Nov 22, 2020 at 11:21 AM
-- Server version: 5.7.24
-- 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_CLIENT=@... |
CREATE TABLE IF NOT EXISTS messages (
id bigint,
room text,
author text,
content text,
PRIMARY KEY (room, id)
) WITH CLUSTERING ORDER BY (id DESC); |
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 30, 2018 at 02:37 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 = "+00:00";
/*!40101 SET @OLD... |
CREATE TABLE IF NOT EXISTS `event_stats` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`player` int(11) NOT NULL,
`event` int(2) NOT NULL,
`num` int(11) NOT NULL,
`wins` int(11) NOT NULL,
`losses` int(11) NOT NULL,
`kills` int(11) NOT NULL,
`deaths` int(11) NOT NULL,
`scores` int(11) NOT NULL,
PRIMARY KEY... |
<filename>_sql/movie_ticket.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 30, 2020 at 05:59 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.2.33
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:... |
<reponame>AbhiBiju/employee-tracker
DROP DATABASE IF EXISTS employee_db;
CREATE DATABASE employee_db;
USE employee_db;
|
-- phpMyAdmin SQL Dump
-- version 4.6.6
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Nov 05, 2020 at 04:12 AM
-- Server version: 5.7.17-log
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIEN... |
<gh_stars>0
INSERT INTO pos_itemtemp VALUES("IATT190002507","193051","191002","192010","20000","1","20000","0","20000","1","1","1","IAT0809190900","NHO2018000007","PAID","","193051"),
("IATT190002507","193055","191002","192010","17000","1","17000","0","17000","1","1","1","IAT0809190900","NHO2018000007","PAID","","19305... |
DROP DATABASE IF EXISTS employee_db;
CREATE DATABASE employee_db;
USE employee_db;
CREATE TABLE IF NOT EXISTS all_departments (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
department_name VARCHAR(100) NOT NULL
);
CREATE TABLE IF NOT EXISTS all_roles (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
job_title VAR... |
<reponame>EddyChavez/PAAEBACK
use SWIITL;
/********************* INICIO MODIFICACIONES LUNES 8 DE MAYO 2019 *********************************
* CONTROL DE CAMBIOS EN AMBIENTES
* LOCAL: PENDIENTE (FECHA DE APLICACIÓN)
* PRUEBAS: PENDIENTE (FECHA DE APLICACIÓN)
* PRODUCCIÓN: PENDIENTE (FECHA DE APLICACIÓN)
... |
<reponame>9Rain/donus-code-challenge
CREATE PROCEDURE [dbo].[spClient_GetByCpf]
@Cpf varchar(14)
AS
BEGIN
SELECT CL.[Id], CL.[Name], CL.[Cpf],
AC.[Id], AC.[Number], AC.[Digit], AC.[Balance],
AG.[Id], AG.[Number], AG.[Digit]
FROM [dbo].[Client] CL
INNER JOIN [dbo].[Account] AC ON CL.[Id] = AC.[ClientId]
INNER... |
<reponame>Tuscann/JAVA---MySQL---SEPTEMBER-2017
---------1----------------
-- Missing in Judge
---------2----------------
select*from departments as d
order by d.department_id asc;
---------3----------------
select d.name from departments as d
order by d.department_id asc;
---------4----------------
select e.fir... |
<gh_stars>1-10
-- select * from zipcode limit 500;
-- select pc_type, count(*) from zipcode group by pc_type;
drop table if exists placenames cascade;
create table placenames (
gid serial not null primary key,
state varchar(2),
place varchar(35),
dmeta_place varchar(4)
);
select addgeometrycolumn('data','plac... |
<reponame>tschf/adb-sample-schemas<filename>customer_orders/order_items.sql
PROMPT INSERTING into ORDER_ITEMS
SET DEFINE OFF;
begin
Insert into ORDER_ITEMS (ORDER_ID,LINE_ITEM_ID,PRODUCT_ID,UNIT_PRICE,QUANTITY) values (1,1,33,37,4);
Insert into ORDER_ITEMS (ORDER_ID,LINE_ITEM_ID,PRODUCT_ID,UNIT_PRICE,QUANTITY) valu... |
-- AlterTable
ALTER TABLE "EventType" ADD COLUMN "periodCountCalendarDays" BOOLEAN,
ADD COLUMN "periodDays" INTEGER,
ADD COLUMN "periodEndDate" TIMESTAMP(3),
ADD COLUMN "periodStartDate" TIMESTAMP(3),
ADD COLUMN "periodType" TEXT DEFAULT E'unlimited';
|
-- Your SQL goes here
CREATE TABLE project_service.reminders (
id uuid DEFAULT public.uuid_generate_v4() NOT NULL PRIMARY KEY,
platform_id uuid NOT NULL,
user_id uuid NOT NULL,
project_id uuid NOT NULL,
external_id text,
created_at timestamp without time zone DEFAULT now() NOT NULL,
updated_... |
<filename>Chapter4/age-groupings.sql
SELECT SUM(CASE WHEN age BETWEEN 21 AND 29 THEN 1 ELSE 0 END) AS "21-29",
SUM(CASE WHEN age BETWEEN 30 AND 39 THEN 1 ELSE 0 END) AS "30-39",
SUM(CASE WHEN age BETWEEN 40 AND 49 THEN 1 ELSE 0 END) AS "40-49",
SUM(CASE WHEN age BETWEEN 50 AND 59 THEN 1 ELSE 0 ... |
<reponame>iximiuz/skytools
create or replace function pgq.unregister_consumer(
x_queue_name text,
x_consumer_name text)
returns integer as $$
-- ----------------------------------------------------------------------
-- Function: pgq.unregister_consumer(2)
--
-- Unsubscriber consumer from the queue. Also ... |
CREATE TABLE IF NOT EXISTS `#__assets` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary Key',
`parent_id` int(11) NOT NULL DEFAULT '0' COMMENT 'Nested set parent.',
`lft` int(11) NOT NULL DEFAULT '0' COMMENT 'Nested set lft.',
`rgt` int(11) NOT NULL DEFAULT '0' COMMENT 'Nested set rgt.',
`leve... |
-- packages/acs-kernel/sql/upgrade/upgrade-4.2-4.5.sql
--
-- @author <EMAIL>
-- @creation-date 2002-05-15
-- @cvs-id $Id: upgrade-4.2-4.5.sql,v 1.2 2002/08/17 17:42:45 vinodk Exp $
--
-- fixes bug #1515 http://openacs.org/sdm/one-bug.tcl?baf_id=1515
drop function apm_package_version__upgrade_p (varchar,varchar,varcha... |
-- Drop table
-- DROP TABLE pantry.guests
CREATE TABLE pantry.guests (
id serial NOT NULL, -- Unique ID
status varchar(10) NULL, -- Status of Pantry Guest [A=Active; I=Inactive; W=Waiting; X=Archive]
first_name varchar(35) NULL, -- First name of the Pantry Guest
last_name varchar(35) NULL, -- Last name of... |
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE FUNCTION [dbo].[fn_SHR_GBL_DateString](
@Date smalldatetime
)
RETURNS nvarchar(25) WITH EXECUTE AS CALLER
AS
BEGIN
DECLARE @returnStr nvarchar(25),
@dateFormatCode tinyint
SELECT @dateFormatCode = DateFormatCode FROM SHR_STP_Language WHERE LangID=@@LANGID
... |
-- +migrate Up
-- SQL in section 'Up' is executed when this migration is applied
ALTER TABLE vehicle_journeys DROP CONSTRAINT IF EXISTS vehicle_journeys_pkey;
ALTER TABLE vehicle_journeys ADD PRIMARY KEY (id,model_name);
-- +migrate Down
-- SQL section 'Down' is executed when this migration is rolled back
ALTER TABL... |
<reponame>alexavila150/luciddb
set schema 's';
select KSEQ,K2,K4,K5,K10,K25,K100,K1K,K10K,K40K,K100K,K250K,K500K
FROM BENCH100
ORDER BY 1
;
|
CREATE TABLE "ENCUMBRANCE"
( "ENCUMBRANCE_ID" NUMBER NOT NULL ENABLE,
"ENCUMBERING_AGENT_ID" NUMBER NOT NULL ENABLE,
"EXPIRATION_DATE" DATE,
"EXPIRATION_EVENT" VARCHAR2(60 CHAR),
"ENCUMBRANCE" VARCHAR2(60 CHAR) NOT NULL ENABLE,
"MADE_DATE" DATE,
"REMARKS" VARCHAR2(255 CHAR),
"ENCUMBRANCE_ACTION" VA... |
CREATE OR REPLACE TABLE dummy_v${parentIndex} (
id INT64 NOT NULL,
type_id INT64 NOT NULL,
params ARRAY<STRUCT<
key string,
text_value STRING>>
);
CREATE OR REPLACE TABLE dummy_v${parentIndex}_tmpl (
id INT64 NOT NULL,
type_id INT64 NOT NULL,
... |
create table if not exists sessions (
id uuid primary key default gen_random_uuid(),
user_id uuid not null references users (id),
refresh_token uuid unique not null,
revoked boolean not null default false,
created_at timestamp without time zone default (now() at time zone 'utc'),
updated_at time... |
-- Test stetments
TEST_STMT_1;
TEST_STMT_2;
-- Insert data
TEST_STMT_3; |
<filename>internal/clients/chat/migrations/1-initialize-schema-v0.1.7.down.sql
drop table chat_message;
drop index chat_message_idx_topic_time;
|
<reponame>evandojunior/urbem3.0<filename>scripts/functions/patrimonio_fn_inventario_processamento.sql
CREATE OR REPLACE FUNCTION patrimonio.fn_inventario_processamento(character varying, integer)
RETURNS integer
LANGUAGE plpgsql
AS $_$
DECLARE
stExercicio ALIAS FOR $1;
idInventario ALIAS FOR $2;
BEGIN
... |
<filename>10-Notes/t4MySql-trigger-script.sql
/*
Audit Triggers Script
generated on 2019 Mar 18 @ 14:11:15.940
for Schema 'T4MY_SAMPLE'
by Triggers for MySQL v0.1.0
(t4my.Triggers.TriggersScript)
*/
CREATE TABLE IF NOT EXISTS AUDIT_TRAIL (
ID INT NOT NULL AUTO_INCREMENT,
TABLENAME VARCHAR(24)... |
<filename>db/tables.sql
CREATE TABLE [users] (
[id] int PRIMARY KEY IDENTITY(1, 1),
[role_id] int,
[password] nvarchar,
[username] nvarchar(255),
[firstname] nvarchar(255),
[lastname] nvarchar(255),
[email] nvarchar(255),
[is_private] bit
)
GO
CREATE TABLE [roles] (
[id] int PRIMARY KEY IDENTITY(1, 1... |
declare @o varchar(200); set @o = 'SysPec_p_ListAlimentacaoByAnimal';
if object_id(@o, 'P') is not null begin
declare @d nvarchar(250); set @d = 'drop procedure ' + @o;
execute sp_executesql @d;
end;
go
create procedure SysPec_p_ListAlimentacaoByAnimal(
@AnimalId int
)
with encryption as
begin
select
Alimentaca... |
USE "ColonialJourney";
GO
CREATE PROCEDURE usp_ChangeJourneyPurpose(@JourneyId INT, @NewPurpose VARCHAR(11))
AS
DECLARE @FoundJourneyId INT = (SELECT Id FROM "Journeys" WHERE Id = @JourneyId);
IF(@FoundJourneyId IS NULL)
BEGIN
; THROW 51000, 'The journey does not exist!', 1;
END
DECLARE @CurrentPurpose VARC... |
/*
Warnings:
- The values [TRANSMISSION,INJECTION_SUBSTATION] on the enum `StationType` will be removed. If these variants are still used in the database, this will fail.
*/
-- AlterEnum
BEGIN;
CREATE TYPE "StationType_new" AS ENUM ('Transmission', 'Distribution');
ALTER TABLE "Station" ALTER COLUMN "stationType"... |
<reponame>PutriEndahP/aset
/*
SQLyog Ultimate v12.5.1 (64 bit)
MySQL - 10.1.37-MariaDB : Database - aset
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @... |
<reponame>arghasarkar/WhatsApp-End-To-End-Encryption-Backend
DROP TABLE IF EXISTS users;
CREATE TABLE users (
id SERIAL PRIMARY KEY,
name TEXT NOT NULL,
phone_number TEXT,
email TEXT,
public_key TEXT NOT NULL
);
INSERT INTO public.users (name, phone_number, email, public_key) VALUES ('a', '07554849303', '<EMAIL>... |
/*
Vjezba 2 Zadatak 2 PUBS
Prikazati sve tipove knjiga bez duplikata.
Listu sortirati po tipu.
*/
USE pubs
SELECT DISTINCT T.type
FROM titles AS T
ORDER BY T.type |
<filename>database/kepegawaian 0.4.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jul 18, 2021 at 03:48
-- Server version: 10.1.21-MariaDB
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.