sql stringlengths 6 1.05M |
|---|
<filename>sql/tables/cache_adoption.sql<gh_stars>10-100
SET NAMES 'utf8';
DROP TABLE IF EXISTS `cache_adoption`;
CREATE TABLE `cache_adoption` (
`cache_id` int(10) unsigned NOT NULL,
`user_id` int(10) unsigned NOT NULL,
`date_created` datetime NOT NULL COMMENT 'via Trigger',
UNIQUE KEY `id` (`cache_id`,`user_id... |
<filename>coeus-db/coeus-db-sql/src/main/resources/org/kuali/coeus/coeus-sql/current_mysql/5.1.0/tables/KC_TBL_COI_DISCLOSURE.sql
DELIMITER /
ALTER TABLE COI_DISCLOSURE MODIFY CERTIFIED_BY VARCHAR(200)
/
DELIMITER ;
|
<reponame>godely/reduphp<gh_stars>10-100
CREATE OR REPLACE PROCEDURE SP_COUNT_CONSUMER_ACCESS_TOKEN
(
P_CONSUMER_KEY IN VARCHAR2,
P_COUNT OUT NUMBER,
P_RESULT OUT NUMBER
)
AS
-- PROCEDURE TO Count the consumer access tokens for the given consumer.
BEGIN
P_RESULT := 0;
... |
DROP TABLE IF EXISTS test.cast_enums;
CREATE TABLE test.cast_enums
(
type Enum8('session' = 1, 'pageview' = 2, 'click' = 3),
date Date,
id UInt64
) ENGINE = MergeTree(date, (type, date, id), 8192);
INSERT INTO test.cast_enums SELECT 'session' AS type, toDate('2017-01-01') AS date, number AS id FROM system.... |
-- sql/07-roles.sql SQL Migration
SET client_min_messages TO warning;
BEGIN;
CREATE OR REPLACE FUNCTION json_key(
string TEXT
) RETURNS TEXT LANGUAGE plperl IMMUTABLE AS $$
=begin markdown
% SELECT json_key('foo');
json_key
──────────
"foo"
Like `json_string()`, this function encodes a text ... |
<gh_stars>0
# $Id: foo.sql,v 1.1 2005/07/20 17:56:57 johnt Exp $
USE test;
SELECT VERSION();
DROP TABLE IF EXISTS t1;
CREATE TEMPORARY TABLE t1 (
filename varchar(10),
size_in_bytes int unsigned,
mydate date
);
# insert 5 rows into the database
INSERT INTO t1 VALUES
('apple', 100, 20010101),
... |
<reponame>gjamuar/DatabaseProject<filename>Problem 2 and Bonus Problem.sql
--Problem 2
-----------
Select t.TeamName,sum(p.NumGoals) as Goals
from teams t left outer join players p
on p.TeamID=t.TeamID
group by p.TeamID
having Goals >= 30
order by Goals desc;
TeamName Goals
--------------
Pirates 38
Sai... |
-- https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Select
-- COMMENT '查询语句语法'
[WITH CommonTableExpression (, CommonTableExpression)*] (Note: Only available starting with Hive 0.13.0)
SELECT [ALL | DISTINCT]
select_expression,select_expression,...
FROM
table_reference
[WHERE where_condition]
... |
<gh_stars>0
REM INSERTING into SYS.FILE$
SET DEFINE OFF;
Insert into SYS.FILE$ (FILE#,STATUS$,BLOCKS,TS#,RELFILE#,MAXEXTEND,INC,CRSCNWRP,CRSCNBAS,OWNERINSTANCE,SPARE1,SPARE2,SPARE3,SPARE4) values ('1','2','64000','0','1','4194302','1280','0','10',null,'4194306','0',null,null);
Insert into SYS.FILE$ (FILE#,STATUS$,BLOCK... |
<filename>challs/obligatory_sqli/init.sql
CREATE TABLE users (
id INTEGER PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
username VARCHAR ( 64 ) NOT NULL,
password VARCHAR ( 64 ) NOT NULL
);
INSERT INTO users (username, password)
VALUES (
'somejankylongusernamethatnobodywillguess',
'<PASSWORD>?'
);
CREATE USER we... |
--Schema Objects
CREATE OR REPLACE VIEW ITEMDETAILS(id, name, weight, expiry_date, price, category_name) AS
SELECT p.id, p.name, p.weight, p.expiry_date, p.price, c.name
FROM HR.PRODUCT p
JOIN HR.CATEGORY c
ON(p.category_id = c.id)
WHERE c.name = 'Frozen'
WITH CHECK OPTION CONSTRAINT product_view;
CREATE... |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 22-Jan-2018 às 21:20
-- Versão do servidor: 10.1.26-MariaDB
-- PHP Version: 7.1.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
------------------------------------------------
-- release_ddl_up
------------------------------------------------
CREATE OR REPLACE FUNCTION pde.release_ddl_up(
release pde.release
)
RETURNS text AS
$BODY$
DECLARE
_ddl_up text;
_minor pde.minor;
_patch pde.patch;
_artifact pde.artifact;
_artifact_type p... |
<gh_stars>1-10
-- Your SQL goes here
-- Create function to update mean
CREATE FUNCTION update_mean_on_del() RETURNS TRIGGER AS
$BODY$
BEGIN
IF (SELECT
CASE score_number WHEN 1 THEN true
WHEN 0 THEN true
ELSE false
END
FROM... |
# 1 - CRIANDO TABELA APLICAÇÃO
CREATE TABLE aplicacao(
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
idCidadao INT NOT NULL,
idVacina INT NOT NULL,
dose_aplicada INT(1) NOT NULL,
data_aplicacao VARCHAR(10) NOT NULL,
previsao DATE,
FOREIGN KEY (idCidadao) REFERENCES cidadao(id),
FOREIGN KEY... |
create or replace function update_inventory_view_from_summary_insert_fn() returns trigger as $$
declare
skuCode sku_code;
stock_item jsonb;
stock_location jsonb;
begin
skuCode := (select si.sku from stock_items si where si.id = new.stock_item_id);
stock_item := (
select json_build_object(
... |
USE [perpetuumsa]
GO
------------------------------------------
--Content Team updates circa Feb-March
--Hershfield and Syndicate bot adds, updates, and adjustments
--Create new Callisto npc definitions
--Rework presences and flocks
--Loot tweaks
-----------------------------------------
PRINT N'Define New Callisto ... |
--5. List first name, last name, and sex for employees whose first name is "Hercules" and last names begin with "B."
SELECT first_name,last_name,sex
FROM employees
WHERE (first_name = 'Hercules' AND last_name LIKE '%B%');
-- 6. List all employees in the Sales department,
--including their employee number, last name... |
<filename>administrator/components/com_rsform/sql/mysql/config.data.sql<gh_stars>0
INSERT IGNORE INTO `#__rsform_config` (`SettingName`, `SettingValue`) VALUES
('global.register.code', ''),
('global.debug.mode', '0'),
('global.iis', '0'),
('global.editor', '1'),
('global.codemirror', '0'),
('auto_responsive', '1'),
('g... |
-- +migrate Up
-- Initial migration
DROP TABLE IF EXISTS ARTICLES;
DROP TABLE IF EXISTS userinfos;
DROP TABLE IF EXISTS users;
CREATE TABLE users(
id INTEGER PRIMARY KEY AUTO_INCREMENT ,
name VARCHAR(255) UNIQUE NOT NULL,
email VARCHAR(255) UNIQUE NOT NULL,
created DATETIME NOT NULL DEFAULT NOW(),
... |
<reponame>alexavila150/luciddb<filename>luciddb/test/sql/VI/insert/altersys.sql
alter system set optimizerViMergeThreshold = 0
;
alter system set optimizerViThreshold = 0
;
|
<reponame>speatzle/woodpecker
-- name: create-table-logs
CREATE TABLE IF NOT EXISTS logs (
log_id INTEGER PRIMARY KEY AUTO_INCREMENT
,log_job_id INTEGER
,log_data MEDIUMBLOB
,UNIQUE(log_job_id)
);
|
<reponame>bopopescu/peloton<filename>pkg/storage/cassandra/migrations/0032_add_host_labels.down.cql
ALTER TABLE host_info DROP labels;
|
<filename>doc/yii2_auth_item.sql
/*
Navicat MySQL Data Transfer
Source Server : 192.168.127.12
Source Server Version : 50720
Source Host : 192.168.127.12:3306
Source Database : message_www
Target Server Type : MYSQL
Target Server Version : 50720
File Encoding : 65001
Date: 2018-02-... |
-- MySQL dump 10.16 Distrib 10.1.22-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: laravel_quotes
-- ------------------------------------------------------
-- Server version 10.1.22-MariaDB-1~xenial
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTE... |
INSERT INTO team (name) values ('THE BEST TEAM');
INSERT INTO teammate (name, team_id) VALUES ('Gosia', 1);
INSERT INTO teammate (name, team_id) VALUES ('Rafal', 1);
INSERT INTO teammate (name, team_id) VALUES ('Krzysztof', 1);
|
select SQL_NO_CACHE tweet_id, user_id, text, created_at, source from `[el]#moca_prefix#tweets` where user_id = %s; |
<reponame>directsp/SchoolSample
CREATE FUNCTION [dspUtil].[Context_RecordCount] (@Context TCONTEXT)
RETURNS INT
AS
BEGIN
RETURN JSON_VALUE(@Context, '$.InvokeOptions.RecordCount');
END |
DROP DATABASE IF EXISTS attractionsdb;
CREATE DATABASE attractionsdb;
\c attractionsdb;
CREATE TABLE IF NOT EXISTS "restaurant" (
id SERIAL PRIMARY KEY,
name VARCHAR,
ratingsAvg VARCHAR,
ratingsTotal VARCHAR,
imageUrl VARCHAR,
distanceFrom VARCHAR,
foodType VARCHAR,
price INTEGER
);
CREATE TABLE IF ... |
<reponame>pcarmichael22/BookApp
DROP TABLE IF EXISTS books;
CREATE TABLE books (
id SERIAL PRIMARY KEY,
title VARCHAR(255),
author VARCHAR(255),
description VARCHAR,
thumbnail VARCHAR(255),
isbn VARCHAR(255),
bookshelf VARCHAR(255)
);
INSERT INTO books (
author,
title,
description,
thumbnail,
isbn,
... |
select
name
,schedule_id
,schedule_uid
,enabled
,freq_type
,freq_interval
,freq_subday_type
,freq_subday_interval
,freq_recurrence_factor
from msdb.dbo.sysschedules
|
ALTER TABLE organization MODIFY COLUMN name varchar(100); |
<filename>db_archive/sql_archive/908__alter_table_dw_d_organisaatioluokitus.sql
USE [ANTERO]
GO
IF NOT EXISTS (
SELECT * FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA='dw' AND TABLE_NAME='d_organisaatioluokitus' AND COLUMN_NAME='jarjestys_kunta_koodi')
BEGIN
ALTER TABLE dw.d_organisaatioluokitus ADD jarjestys_... |
<filename>src/test/resources/fts3ac.test_25.sql<gh_stars>100-1000
-- fts3ac.test
--
-- execsql {
-- SELECT snippet(email) FROM email
-- WHERE email MATCH 'questar enron OR com'
-- }
SELECT snippet(email) FROM email
WHERE email MATCH 'questar enron OR com' |
<filename>images/hasura/hasura-data/migrations/default/1616195337538_init/up.sql
CREATE TABLE block (
internal_id bigint NOT NULL,
height bigint NOT NULL,
version bigint NOT NULL,
"timestamp" bigint NOT NULL,
hash bytea NOT NULL,
previous_block_hash bytea NOT NULL,
merkle_root bytea NOT NULL,
bits bigin... |
<filename>input/cql/ANCDT18.cql<gh_stars>1-10
library ANCDT18
using FHIR version '4.0.1'
include FHIRHelpers version '4.0.1'
include ANCConfig called Config
include ANCConcepts called Cx
include ANCDataElements called PatientData
include ANCContactDataElements called ContactData
context Patient
/*
"HIV test result... |
/*
Navicat MySQL Data Transfer
Source Server : mydb
Source Server Version : 50720
Source Host : localhost:3306
Source Database : mydb
Target Server Type : MYSQL
Target Server Version : 50720
File Encoding : 65001
Date: 2018-06-25 04:44:50
*/
SET FOREIGN_KEY_CHECKS=0;
-- ---------... |
-- 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 files in the project root for more information.
IF NOT EXISTS
(
SELECT 1
FROM [edfi].[... |
-- All statements from this file should be executed without changes and without errors.
USE homework;
-- Select all articles of INV-02
SELECT line_id, article_name, article_price
FROM invoice
WHERE invoice_id = 'INV-02';
-- Select all articles of INV-01, articles should be sorted by name
SELECT line_id, article_name,... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.9.5deb2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Dec 22, 2020 at 11:32 PM
-- Server version: 8.0.22
-- PHP Version: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40... |
SELECT w_warehouse_name
,w_warehouse_sq_ft
,w_city
,w_county
,w_state
,w_country
,ship_carriers
,year
,SUM(jan_sales) AS jan_sales
,SUM(feb_sales) AS feb_sales
,SUM(mar_sales) AS mar_sales
,SUM(apr_sales) AS apr_sales
,SUM(may_sales) AS may_sales
,SUM(jun_sales) AS jun_sales
,SUM(jul_sales) ... |
<filename>platform/lib/all-deps/etc/test.sql
# A comment line
op1
sql line 1;;
sql line last;;
op2
sql line 1
sql line last
op3
sql ${id} line
|
<reponame>viswaratha12/dbwarden
/****** Object: StoredProcedure [dbo].[PostLogEntry] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create Procedure PostLogEntry
/****************************************************
**
** Desc: Put new entry into the main log table or the
** health log tabl... |
ALTER TABLE public.body
DROP COLUMN hitbox,
DROP COLUMN hitbox_translate_x,
DROP COLUMN hitbox_translate_z;
|
CREATE PROCEDURE [sp_upd_Master] (
@MasterID int,
@Name nvarchar(50),
@SortOrder int
)
AS
UPDATE [dbo].[Master] SET
[Name] = @Name,
[SortOrder] = @SortOrder
WHERE
([MasterID] = @MasterID) |
<filename>src/main/resources/db/migration/oracle/V2.5.0.20180608182403__schema-add-analysis-gen-progress.sql
ALTER TABLE ${ohdsiSchema}.cohort_analysis_gen_info ADD(progress INT DEFAULT 0); |
-- Copyright 2018 <NAME>. All rights reserved. More info at http://tanelpoder.com
-- Licensed under the Apache License, Version 2.0. See LICENSE.txt for terms & conditions.
select
addr
, indx
, '0x'||trim(to_char(indx, 'XXXX')) hexidx
, kcbwhdes
from
x$kcbwh
where
lower(kcbwhdes) like lower('%&... |
<reponame>Caprowni/concourse
CREATE TABLE check_build_events () INHERITS (build_events);
CREATE UNIQUE INDEX check_build_events_build_id_event_id ON check_build_events (build_id, event_id);
|
<reponame>lintzc/GPDB
-- @author prabhd
-- @created 2012-12-05 12:00:00
-- @modified 2012-12-05 12:00:00
-- @tags dml HAWQ
-- @db_name dmldb
\echo --start_ignore
set gp_enable_column_oriented_table=on;
\echo --end_ignore
DROP TABLE IF EXISTS dml_ao_r;
DROP TABLE IF EXISTS dml_ao_s;
DROP TABLE IF EXISTS dml_ao_p;
... |
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
drop table if exists preset_character_card_profile CASCADE;
CREATE TABLE preset_character_card_profile (
profile jsonb
);
insert into preset_character_card_profile (profile) values
(
'{"hp": 2700, "card_name":"普通刺客", "image_name": "normal_rogue", "class": "rogue", "ran... |
-- phpMyAdmin SQL Dump
-- version 4.4.14
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Feb 18, 2016 at 11:17 AM
-- 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_SET_CLIENT */;... |
<reponame>UMassMedIT/ProfilesRNS
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create FUNCTION [Utility.NLP].[fnPorterStep5]
(
@InWord nvarchar(4000)
)
RETURNS nvarchar(4000)
AS
BEGIN
--STEP 5a
--
-- (m>1) E -> probate -> probat
-- rate ... |
-- @testpoint:测试excluded作为保留关键字是否存入pg_get_keywords()系统表
select word from pg_get_keywords() where word ='excluded'; |
/*******************************************************************************
PoC Web-Application-Framwork
http://poc-online.net/
Copyright (c) 2013, PoC - <NAME>
Released under the MIT license
http://poc-online.net/license
-- pocPackage: pocCore
******************************************************************... |
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 24, 2017 at 04:11 AM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... |
select /*gather_info_script*/ * from (
select '<a href="FullSqlTextAndPlans.html#'||a.sql_id||'">'||a.sql_id||'</a>' as SQL_ID,
c.username,
a.buffer_gets,
round((a.buffer_gets/total_reads.sumed)*100,2) "% Total Gets",
a.executions,
round(a.buffer_gets/nvl(nullif(a.executions,0),1)) as Gets_p... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 02-03-2018 a las 04:17:33
-- Versión del servidor: 10.1.13-MariaDB
-- Versión de PHP: 5.6.20
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTE... |
<reponame>rochaandre/scripts-oracle-named
CREATE OR REPLACE TRIGGER "SYS"."LOGONAUDITING" AFTER
LOGON ON DATABASE DECLARE
v_osuserid VARCHAR2(30);
CURSOR c1 IS
SELECT osuser
FROM v$session
WHERE USERNAME = 'USR_CONS_MIS'
;
BEGIN
OPEN c1;
FETCH c1 INTO v_osuserid ;
IF c1%FOUND TH... |
<gh_stars>0
CREATE TABLE IF NOT EXISTS `academia`
(
`anio_aca` mediumint NOT NULL,
`per_aca` mediumint DEFAULT NULL,
`cod_car` mediumint NOT NULL,
`car_des` varchar(36) NOT NULL,
`cur_mat` mediumint NOT NULL,
`cur_apr` mediumint NOT NULL,
`cur_des` mediumint NOT NULL,
`re... |
<gh_stars>0
use inquilino_perfecto;
select * from user;
-- 1. Registrar un usuario.
INSERT INTO user
(first_name, birthday, email, password, creation_date, last_update, role)
VALUES
('Berto', '1989-08-26','<EMAIL>', '<PASSWORD>', now(), now(), 'admin');
-- Mientras no complete el resto de campos del ... |
update eg_module set enabled=false where name='Council Management Transaction' ; |
<reponame>josephbuchma/seedr
create database if not exists seedr_test;
use seedr_test;
drop table if exists users;
create table users (
id int(10) unsigned not null auto_increment,
email varchar(250) not null,
name varchar(250) not null,
active boolean default false,
checkin dat... |
-- file:horology.sql ln:71 expect:true
SELECT date '2001-12-13' - interval '2 years' AS "Subtract Two Years"
|
CREATE TABLE photos (
id INTEGER PRIMARY KEY AUTOINCREMENT,
privacy INTEGER DEFAULT 0,
sha1 TEXT NOT NULL,
fileType TEXT(4) NOT NULL,
dateTaken INTEGER DEFAULT NULL,
ts INTEGER NOT NULL DEFAULT CURRENT_TIMESTAMP
);
CREATE UNIQUE INDEX 'photos_sha1_UNIQUE' ON 'photos' ('sha1' ASC);
CREATE TABLE photosets (
id INTEGER ... |
CREATE TABLESPACE aqdemo
DATAFILE '/u01/app/oracle/oradata/odb/aqdemo1.dbf' SIZE 10M
AUTOEXTEND ON NEXT 5M MAXSIZE 100M;
|
COPY public.apps (app_id, app_name) FROM stdin;
1 UserAdmin
2 PosdaCuration
3 PhiFixer
4 ReviewPhi
5 SubmissionSender
6 CountGetter
7 FileDist
8 DicomProxy
9 DicomProxyAnalysis
10 DbIf
11 Kaleidoscope
12 NewItcTools
13 ActivityBasedCuration
\.
SELECT pg_catalog.setval('public.apps_app_id_seq', 12, true);
COPY public.... |
<reponame>svrakitin/x
ALTER TABLE "_selfservice_login_requests_tmp" RENAME TO "selfservice_login_requests" |
SELECT
circ_trans.id,
circ_trans.transaction_gmt AS circ_timestamp,
circ_trans.application_name AS circ_app,
circ_trans.source_code AS circ_source,
circ_trans.op_code AS circ_operation,
circ_trans.item_location_code AS item_location,
circ_trans.patron_home_library_code AS patron_branch,
bib_view.title A... |
<reponame>AWeber-Imbi/imbi-schema
SET SEARCH_PATH TO v1;
CREATE TABLE IF NOT EXISTS oauth2_integrations (
name TEXT NOT NULL PRIMARY KEY,
api_endpoint TEXT NOT NULL,
callback_url TEXT,
authorization_endpoint TEXT NOT NULL,
token_endpoint TEXT ... |
TRUNCATE TABLE data_lake.ghcnd_stations_jp;
INSERT INTO data_lake.ghcnd_stations_jp
SELECT
Id
, latitude
, longitude
, elevation
, state
, name
, gsn_flag
, hcn_crn_flag
, wmoid
FROM `bigquery-public-data.ghcn_d.ghcnd_stations`
WHERE
wmoid between 47200 AND 4... |
<filename>sarana.sql
-- phpMyAdmin SQL Dump
-- version 4.2.7.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Dec 10, 2019 at 06:49 AM
-- Server version: 5.5.39
-- PHP Version: 5.4.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH... |
<reponame>sslash/jamdates<filename>db/.migrations/sqls/20160918082313-users-up.sql<gh_stars>0
create table IF NOT EXISTS users (
id serial primary key,
name varchar(50),
email varchar(64) unique not null,
adress varchar(50),
bio varchar(500),
image varchar(100),
description varchar(200),
... |
<filename>carservicerepo.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Nov 19, 2015 at 04:59 PM
-- Server version: 5.6.17
-- PHP Version: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACT... |
<filename>src/main/resources/db/migration/V1_10__schema.sql
CREATE TABLE R_OFFENCE
(
OFFENCE_ID NUMBER NOT NULL
CONSTRAINT XPKR_OFFENCE
PRIMARY KEY,
CODE CHAR(5) NOT NULL,
DESCRIPTION VARCHAR2(300) NOT NULL,
ABBREVIATION VARCHAR2(50),
MAIN_CATEGORY_CODE CHAR(3) NOT NULL,
SELECTABLE CHAR NOT NULL
CONSTRAINT... |
CREATE USER developer WITH PASSWORD '<PASSWORD>';
ALTER USER developer WITH SUPERUSER;
CREATE DATABASE auth;
GRANT ALL PRIVILEGES ON DATABASE auth TO developer;
|
# --- !Ups
ALTER TABLE chapter ALTER COLUMN num TYPE VARCHAR(8);
# --- !Downs
ALTER TABLE chapter ALTER COLUMN num TYPE int;
|
-- ---------------------------------------
-- TABLE `gaming`
-- ----------------------------------------
-- Get Games to populate dropdown use Select
SELECT game_id, game_name FROM gaming;
-- INSERT Add a pokemon
INSERT INTO gaming (game_name) VALUES ("?");
-- UPDATE
UPDATE gaming SET game_name=game_id_selected;
-- DEL... |
CREATE PROC usp_SwitchRoom(@TripId INT, @TargetRoomId INT)
AS
BEGIN
DECLARE @targetHotelId INT = (SELECT HotelId FROM Rooms WHERE Id = @TargetRoomId)
DECLARE @currentRoomId INT = (SELECT RoomId FROM Trips WHERE Id = @TripId)
DECLARE @currentHotelId INT = (SELECT HotelId FROM Rooms WHERE Id = @currentRoomId)
... |
<gh_stars>1-10
CREATE TABLE [sprockit].[Process] (
[ProcessId] INT IDENTITY (1, 1) NOT NULL,
[ProcessGroup] INT CONSTRAINT [DF__sprockit_Process__ProcessGroup] DEFAULT ((1)) NOT NULL,
[ProcessPath] NVARCHAR (850) NOT NULL,
[ProcessType] NVARCHAR (10) NOT NULL... |
<filename>MuSprint/stories/sql/install.sql
REM
REM This installation file must be run by SYSDBA
REM To run in SQL*Plus: @@install
REM
SET FEEDBACK 1
SET ECHO ON
SET TRIMSPOOL ON
SET TAB OFF
SET PAGESIZE 100
-- Create stories collection using SODA PL/SQL
DECLARE
stories SODA_Collection_T;
BEGIN
stories := DBMS_SO... |
<reponame>Mogakamo/eGarage
-- CreateTable
CREATE TABLE `garages` (
`garageId` INTEGER NOT NULL AUTO_INCREMENT,
`garageName` VARCHAR(250) NOT NULL,
`servicesOffered` VARCHAR(250) NOT NULL,
`Location` VARCHAR(250) NOT NULL,
`garagePhone` VARCHAR(250) NOT NULL,
`garageEmail` VARCHAR(250) NOT NULL,
... |
-- -----------------------------------------------------
-- This is for cleaning some useless data when cloning
-- from production.
-- -----------------------------------------------------
-- Remove cron triggers for all quartz jobs
TRUNCATE TABLE QRTZ_CRON_TRIGGERS;
DELETE FROM QRTZ_TRIGGERS
WHERE TRIGGER_TYPE=... |
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.4.14
-- Dumped by pg_dump version 9.4.14
-- Started on 2017-11-09 02:15:58
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'SQL_ASCII';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_mes... |
<reponame>lucyaraujoceiba/vacunas<gh_stars>0
select id,nombre,estado,fecha_aplicacion, subsidiada, valor, dosis, id_usuario, dosis_pendiente,tiempo_entre_dosis
from vacuna |
<reponame>klaasg/medgen-mysql<gh_stars>1-10
-- #########################################################
call create_index('gene2condition', 'hgnc');
call create_index('gene2condition', 'hgnc_id');
call create_index('gene2condition', 'GeneID');
call create_index('gene2condition', 'ClinicalCond');
call create_index('ge... |
<reponame>tapanbanker/Hive-Programming
CREATE TABLE stores_product_data
(
StoreLocation VARCHAR(30),
Product VARCHAR(30));
CREATE TABLE product_data
(
Product VARCHAR(30));
CREATE TABLE revenue_per_day
(
OrderDate DATE,
Revenue DECIMAL(10,2));
from Sales_Data_without_Partition
insert overwrite table stores_product... |
CREATE TABLE GSPANOTHER.B_TABLE (
B_ID NUMBER NOT NULL ,
C_ID NUMBER,
D_ID NUMBER,
TEST_NAME VARCHAR2(100 CHAR),
TEST1 VARCHAR2(100 CHAR),
TEST2 VARCHAR2(500 CHAR),
TEST3 VARCHAR2(500 CHAR)
);
COMMENT ON table GSPANOTHER.B_TABLE is 'B_TABLE';
COMMENT ON column GSPANOTHER.B_TABLE.B_ID is 'B_ID';
COMMENT ON... |
<reponame>nathnael/cats
CREATE PROCEDURE [sp_del_TransactionGroup] (
@TransactionGroupID int,
@PartitionID int
)
AS
DELETE FROM [dbo].[TransactionGroup]
WHERE
([TransactionGroupID] = @TransactionGroupID) AND
([PartitionID] = @PartitionID) |
{% include 'header.sql' %}
CREATE OR REPLACE VIEW {{ target_table.full_name }}
AS
{% block select %}
SELECT *
FROM {{ source_table.full_name }}
{% endblock +%}
;
|
<reponame>llsand/orcas<gh_stars>10-100
create table tab_new
(
id number(15,4)
);
|
<reponame>nickschwab/sdl_server<filename>migrations/sqls/20190725182023-cancel-interaction-rpc-0184-up.sql<gh_stars>10-100
/* db-migrate create cancel-interaction-rpc-0184 -e pg-staging */
INSERT INTO function_group_hmi_levels(function_group_id, permission_name, hmi_level)
SELECT id AS function_group_id, 'CancelInter... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 16, 2018 at 02:32 AM
-- Server version: 10.1.35-MariaDB
-- PHP Version: 7.1.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!4... |
---------------------------------------------------------------
-- view: vw_opendata_holds_summary
---------------------------------------------------------------
-- drop view vw_opendata_holds_summary;
create or replace view vw_opendata_holds_summary as
select
to_char(date_placed, 'YYYY-MM') as month_placed,
ite... |
<gh_stars>0
create view _airbyte_test_normalization.`conflict_stream_array_2lict_stream_array_ab3__dbt_tmp` as (
-- SQL model to build a hash column based on the values of this record
select
*,
md5(cast(concat(coalesce(cast(_airbyte_conflict_stream_array_hashid as char), ''), '-', coalesce(cast(conflict... |
INSERT INTO `master_data` (`category`, `id`, `active`, `sequence`, `value`) VALUES ('COIN', 'BNBBUSD', b'1', b'0', '');
INSERT INTO `master_data` (`category`, `id`, `active`, `sequence`, `value`) VALUES ('COIN', 'ETHBTC', b'1', b'0', '');
|
<gh_stars>0
ALTER TABLE task ADD COLUMN time_created TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP; |
<reponame>saubhagyarai/shopping-cart<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 22, 2020 at 08:45 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.2.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = ... |
CREATE TABLE [dbo].[Resumes]
(
[Id] INT NOT NULL PRIMARY KEY IDENTITY,
[Description] NVARCHAR(MAX) NULL,
[StartDateTime] DATETIME NULL,
[EndDateTime] DATETIME NULL,
[ResumeKindId] INT NOT NULL,
[ParentId] INT NULL,
CONSTRAINT [FK_ResumeEntries_ResumeEntryKinds] FOREIGN KEY ([ResumeKindId])... |
with
source as (
select * from {{ ref("base_nytt__tlc_yellow_trips_2015") }}
),
filtered as (
select *
from source
where pickup_longitude > -75
and pickup_longitude < -73
and dropoff_longitude > -75
and dropoff_longitude < -73
and pickup_latitude > 40
and pickup_latitude < 42
and ... |
<filename>sqoop/queries/CMS-JM-DataPop-history-data.sql
select
JOBID as "SchedulerJobId",
FILENAME as "FileName",
ISPARENT as "IsParentFile",
PROTOCOL as "ProtocolUsed",
FILEEXITFLAG as "SuccessFlag",
FILETYPE as "FileType",
LUMIRANGE as "LumiRanges",
STRIPPEDFILES as "StrippedFiles",
BLOCKID as "BlockId",
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.