sql stringlengths 6 1.05M |
|---|
<reponame>GabrielGust/dear.io<filename>MySQLScript/BancoDear-io.sql
create database deario;
use deario;
create table Users (
id_user int not null AUTO_INCREMENT primary key,
email varchar(33) not null,
user_password varchar(25) not null
)engine=innodb;
create table Notes (
id_note int not null AUTO_INCREMENT pri... |
ALTER TABLE log MODIFY COLUMN level ENUM( 'critical', 'debug', 'error', 'warning') DEFAULT 'debug'; |
<gh_stars>10-100
INSERT INTO `config` (`id_site`, `key`, `value`) VALUES (NULL,'reward_points_per_cents_value','1');
INSERT INTO `config` (`id_site`, `key`, `value`) VALUES (NULL,'reward_points_per_cents_operation','*');
INSERT INTO `config` (`id_site`, `key`, `value`) VALUES (NULL,'reward_points_shared_order_value','... |
alter table user_links alter column created_at set not null;
create type topic_action as enum ('topic_added', 'topic_removed');
create table user_link_topics (
id uuid primary key default gen_random_uuid(),
user_link_id uuid not null references user_links(id) on delete cascade,
action topic_action not null,
t... |
<reponame>hitachisolutionsamerica/Azure-Solution-Accelerator-to-automate-COVID-19-Vaccination-Proof-and-Test-Verification-Forms<gh_stars>1-10
--SQL Statement to create Users Table
CREATE TABLE dbo.Users (
UserID int,
FirstName varchar(255),
LastName varchar(255),
Title varchar(255),
Worklocation var... |
<reponame>mfooo/wow
-- Pit of saron
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1658100 AND -1658000;
INSERT INTO `script_texts` (`entry`,`content_default`,`content_loc1`,`content_loc2`,`content_loc3`,`content_loc4`,`content_loc5`,`content_loc6`,`content_loc7`,`content_loc8`,`sound`,`type`,`language`,`emote`,`com... |
DROP PROCEDURE sp_perfil_ver;
DELIMITER //
CREATE PROCEDURE sp_perfil_ver(
v_criterio TINYINT,
v_id_perfil INT
)
BEGIN
IF v_criterio = 1 THEN
SELECT
t1.*,
t2.nome,
t3.categoria
FROM tb_perfil AS t1
JOIN tb_funcionario AS t2
ON t1.id_perfil = t2.id_func
JOIN tb_ca... |
<gh_stars>0
'
Creates Channel xyz table
For patients, we create a table, where for each patient id,
we fill with relevant channel xyz data for this patient.
'
DROP TABLE IF EXISTS "chanxyz";
CREATE TABLE "chanxyz"(
pat_id TEXT,
chan_label TEXT,
x NUMERIC,
y NUMERIC,
z NUMERIC,
);
|
<filename>databases/migrations/models/1_20211206210351_update.sql
-- upgrade --
CREATE TABLE IF NOT EXISTS `chairs` (
`id` BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT,
`created_at` DATETIME(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
`updated_at` DATETIME(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CU... |
<reponame>chrisroederucdenver/Kao-Harmonization-Release
--alter table study_to_ohdsi_mapping
-- drop constraint study_to_ohdsi_mapping_to_table_fkey;
--CREATE unique INDEX idx_table_columns
-- ON ema.columns (table_name, column_name) ;
--alter table study_to_ohdsi_mapping
-- add constraint fpk_study_to_ohdsi... |
CREATE TABLE `ProjectKeyValuePairs` (
[Key] nvarchar(255) NOT NULL,
[Value] nvarchar(255) NOT NULL,
[ProjectId] int NOT NULL,
[Id] integer NOT NULL PRIMARY KEY AUTOINCREMENT
);
CREATE TABLE `Projects` (
[ProjectKey] nvarchar(255) NOT NULL,
[ProjectTitle] nvarchar(255) NOT NULL,
[LastChange] datetime NO... |
--
-- Relations between BA and BV.
--
CREATE TABLE mod_bam_reporting_relations_ba_bv (
ba_bv_id int NOT NULL,
bv_id int NOT NULL,
ba_id int NOT NULL,
PRIMARY KEY (ba_bv_id),
FOREIGN KEY (bv_id) REFERENCES mod_bam_reporting_bv (bv_id)
ON DELETE CASCADE,
FOREIGN KEY (ba_id) REFERENCES mod_bam_reporting_b... |
<reponame>gowthamrao/Covid19VaccineAesiIncidenceCharacterization
DELETE FROM @target_database_schema.@target_cohort_table where cohort_definition_id between 10 and 100;
with ages as (
SELECT 2 as age_id, 0 as age_low, 5 as age_high
UNION
SELECT 3 as age_id, 6 as age_low, 17 as age_high
UNION
SELECT 4 as age_... |
<reponame>rganardi/sqlfmt
select percentile_disc(0.25) within group (order by n) from generate_series(1,10) n
|
-- @product_version gpdb: [4.3.0.0-]
--
-- RESYNC UAO TABLE 1
--
CREATE TABLE resync_uao_alter_part_truncate_part1 (
unique1 int4,
unique2 int4
) with ( appendonly='true') partition by range (unique1)
( partition aa start (0) end (500) every (100), default partition default_part );
C... |
<filename>Database/UCSF/BugFix/2.10.1/ORNGAppDataPrimaryKey.sql
-- look for bad data. Fix it however you can
select nodeid, appid, keyname, count(*) from [ORNG.].[AppData] group by nodeid, appid, keyname having count(*) > 1
-- save data fist!
select * into #tmpOrngAppData FROM [ORNG.].[AppData]
/****** Object: Tab... |
# --- !Ups
ALTER TABLE PROVIDER ADD SEND_EMAIL NUMBER(1, 0) DEFAULT 0 NOT NULL;
ALTER TABLE ACTIVITY ADD SEND_EMAIL NUMBER(1, 0) NULL;
# --- !Downs
ALTER TABLE PROVIDER DROP COLUMN SEND_EMAIL;
ALTER TABLE ACTIVITY DROP COLUMN SEND_EMAIL; |
<reponame>Tuppince24/burger_fest
INSERT INTO burgers (burger_name) VALUES ('bacon');
INSERT INTO burgers (burger_name) VALUES ('burgers with cheese');
INSERT INTO burgers (burger_name, devoured) VALUES ('Wooper', true);
INSERT INTO burgers (burger_name, devoured) VALUES ('bigmak', true);
INSERT INTO burgers (burger_nam... |
<gh_stars>0
UPDATE fine,
payment
SET fine.date_payment=payment.date_payment
WHERE fine.name=payment.name
AND fine.number_plate = payment.number_plate
AND fine.violation=payment.violation
AND fine.date_violation = payment.date_violation;
UPDATE fine,
payment
SET fine.sum_fine = fi... |
/*
to copy the structure of an existing table
SELECT sql FROM sqlite_master WHERE type='table' AND name='mytable'
*/
/*
Following lines return the service_id that run on the chosen day
*/
DROP TABLE IF EXISTS running_services;
CREATE TABLE running_services(
trip_id
)
;
INSERT INTO running_services
SELECT tri... |
<filename>core/src/main/resources/db/migration/mysql/V1_1__create_tables.sql
CREATE TABLE META_TABLE_DEFINITION (
ID INT NOT NULL AUTO_INCREMENT,
PHYSICAL_NAME VARCHAR(128) NOT NULL,
LOGICAL_NAME VARCHAR(256) NOT NULL,
PRIMARY KEY (ID),
UNIQUE INDEX PHYSICAL_NAME_UK1 (PHYSICAL_NAME ASC)
);
|
<gh_stars>0
CREATE SEQUENCE cognipro_vr8600e_alarm_log_seq;
CREATE TABLE cognipro_vr8600e_alarm_log (
id_pk numeric(10) NOT NULL DEFAULT nextval('cognipro_vr8600e_alarm_log_seq'::regclass),
machine_id varchar(50) NOT NULL,
plc_timestamp timestamp NOT NULL,
shift varchar(10) NULL,
alarm_01 numeric(10) NULL DEFAULT ... |
<filename>database/create_tables.sql<gh_stars>0
CREATE TABLE IF NOT EXISTS `atividade` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL,
`description` varchar(600) NOT NULL,
`start_date` datetime NOT NULL,
`end_date` datetime NULL,
`status_id` int(11) NOT NULL,
`situation` tinyint(1) ... |
<filename>dbv-1/data/schema/tblAccountNextBilling.sql
CREATE TABLE `tblAccountNextBilling` (
`AccountNextBillingID` int(11) NOT NULL AUTO_INCREMENT,
`AccountID` int(11) NOT NULL DEFAULT '0',
`BillingCycleType` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
`BillingCycleValue` varchar(50) COLLATE utf8_unicode... |
<filename>bin/postgres/functions/skills_read.sql
--function for retrieving one or all skills
CREATE OR REPLACE FUNCTION skills_read(INTEGER) RETURNS SETOF skills AS
$Body$
BEGIN
RETURN QUERY
WITH RECURSIVE sorted_skills AS
(
SELECT * FROM skills WHERE previous_id = 0 AND user_id = $1
... |
<filename>Dump.sql
CREATE TABLE `Dialogs` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`from` int(11) DEFAULT NULL,
`to` int(11) DEFAULT NULL,
`new` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8;
CREATE TABLE `Messages` (
`id` int(11) NOT NULL AUTO_INCREMENT,
... |
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!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' */;
CREATE TABLE IF NOT EXISTS `curso`... |
/*
Navicat MySQL Data Transfer
Source Server : Imseam
Source Server Version : 50712
Source Host : localhost:3306
Source Database : imseam
Target Server Type : MYSQL
Target Server Version : 50712
File Encoding : 65001
Date: 2016-07-18 17:46:04
*/
SET FOREIGN_KEY_CHECKS=0;
-- -----... |
CREATE TABLE Manufacturers
(
ManufacturerId INT PRIMARY KEY IDENTITY,
[Name] NVARCHAR(20) NOT NULL,
EstablishedOn DATE NOT NULL
)
CREATE TABLE Models
(
ModelId INT PRIMARY KEY,
[Name] NVARCHAR(20) NOT NULL,
ManufacturerId INT NOT NULL,
CONSTRAINT ManufacturerId FOREIGN KEY (ManufacturerId) REFERENCES Manufacturers (Ma... |
ALTER TABLE `Experiment` ADD COLUMN `Cost_idCost` INT(11) NULL DEFAULT NULL AFTER `verifierOutputPreserveLast` ,
ADD CONSTRAINT `fk_Experiment_Cost1`
FOREIGN KEY (`Cost_idCost` )
REFERENCES `Cost` (`idCost` )
ON DELETE SET NULL
ON UPDATE CASCADE
, ADD INDEX `fk_Experiment_Cost1` (`Cost_idCost` ASC) ; |
<filename>Miscellaneous/StoredProcedures/Backup_2015 March 25/h3giNbsSetNbsEligible.sql
create procedure h3giNbsSetNbsEligible
@orderref int,
@nbsEligible bit
as
begin
insert into h3giNbsTracking values (@orderref, @nbsEligible)
end
GRANT EXECUTE ON h3giNbsSetNbsEligible TO b4nuser
GO
|
<reponame>Shuttl-Tech/antlr_psql<gh_stars>10-100
-- file:portals.sql ln:25 expect:true
DECLARE foo10 SCROLL CURSOR FOR SELECT * FROM tenk2
|
<gh_stars>1-10
CREATE PROCEDURE InsertPersonalDetails
-- Add the parameters for the stored procedure here
@title varchar(255),
@description varchar(255),
@startDate date,
@startTime time,
@endDate date,
@endTime time
AS
BEGIN
INSERT INTO EmployeeSchema.events(t... |
<gh_stars>0
CREATE DATABASE IF NOT EXISTS `dcorder-00` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `dcorder-00`;
-- Table structure for table `t_order_0000`
--
DROP TABLE IF EXISTS `t_order_0000`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE ... |
<reponame>bogdandmt/dbmigration
create table task (
id bigint(20),
description varchar(255),
name varchar(255),
creator varchar(255),
primary key (id)
); |
<reponame>kostin88/impala-tpcds-kit
-- start query 99 in stream 0 using template query99.tpl
select
substr(w_warehouse_name,1,20)
,sm_type
,cc_name
,sum(case when (cs_ship_date_sk - cs_sold_date_sk <= 30 ) then 1 else 0 end) as D30_days
,sum(case when (cs_ship_date_sk - cs_sold_date_sk > 30) and
... |
<gh_stars>10-100
//// CHANGE name=change0
CREATE MEMORY TABLE TABLE448(ID INTEGER NOT NULL PRIMARY KEY,FIELD1 VARCHAR(30),USERTYPE3FIELD USERTYPE3,USERTYPE5FIELD USERTYPE5,USERTYPE6FIELD USERTYPE6)
GO
|
<filename>liquibase-core/src/test/java/liquibase/verify/saved_state/compareGeneratedSqlWithExpectedSqlForMinimalChangesets/addPrimaryKey/db2.sql
-- Database: db2
-- Change Parameter: columnNames=id, name
-- Change Parameter: tableName=person
ALTER TABLE person ADD PRIMARY KEY (id, name);
CALL SYSPROC.ADMIN_CMD ('REORG ... |
<reponame>check-spelling/artifacthub-hub
-- Start transaction and plan tests
begin;
select plan(15);
-- Declare some variables
\set user1ID '00000000-0000-0000-0000-000000000001'
\set repo1ID '00000000-0000-0000-0000-000000000001'
-- Seed some data
insert into "user" (user_id, alias, email)
values (:'user1ID', 'user1... |
<gh_stars>0
BEGIN TRANSACTION;
PRAGMA application_id = 215794801;
PRAGMA user_version = 1;
CREATE TABLE `User` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`UserName` TEXT NOT NULL,
`Name` TEXT NOT NULL,
`PasswordHash` TEXT NOT NULL
);
CREATE TABLE `Audit` (
`ID` INTEGER NOT NULL PRIMARY KE... |
<filename>OJ/LeetCode/leetcode/problems/182.sql
/* Leetcode-cn */
/* Type: sql */
/* 题目信息 */
/*
*182. 查找重复的电子邮箱
编写一个 SQL 查询,查找 Person 表中所有重复的电子邮箱。
示例:
+----+---------+
| Id | Email |
+----+---------+
| 1 | <EMAIL> |
| 2 | <EMAIL> |
| 3 | <EMAIL> |
+----+---------+
根据以上输入,你的查询应返回以下结果:
+---------+
| Email |
+... |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Jan 05, 2019 at 06:03 PM
-- 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... |
<filename>project/project.sql
/* Drop all tables and procedures */
DROP TABLE IF EXISTS ticket;
DROP TABLE IF EXISTS booking;
DROP TABLE IF EXISTS passengers;
DROP TABLE IF EXISTS credit_card;
DROP TABLE IF EXISTS reservation;
DROP TABLE IF EXISTS contact;
DROP TABLE IF EXISTS passenger;
DROP TABLE IF EXISTS flight;
DR... |
<reponame>Razarac00/challenge-employeedb-Razarac00<gh_stars>0
-- Create a new database called 'EmployeeDB'
-- Connect to the 'master' database to run this snippet
USE master
GO
-- Create the new database if it does not exist already
IF NOT EXISTS (
SELECT name
FROM sys.databases
WHERE name = N'Emplo... |
CREATE TABLE aluno(
nome VARCHAR(50),
data_nascimento DATE,
idade INT,
nota FLOAT
);
INSERT INTO aluno(nome, data_nascimento, idade, nota) VALUES (
"Christian",
"2001-07-13",
20,
9.0
);
INSERT INTO aluno(nome, data_nascimento, idade, nota) VALUES (
"Deivid",
"2002-07-17",
1... |
<gh_stars>0
select float_11 from nulls2 where float_11 = '1'
1.0
|
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Versión del servidor: 8.0.28 - MySQL Community Server - GPL
-- SO del servidor: Linux
-- HeidiSQL Versión: 11.3.0.6295
-- --------------------------------------------------------
/... |
\o erosita_superset_clusters_alter_table_pkey.out
alter table catalogdb.erosita_superset_clusters add column pkey bigserial primary key;
\o
|
<gh_stars>0
INSERT INTO `customs_districts`(`code`, `name`) VALUES ('0000', '海关总署/全部关区');
INSERT INTO `customs_districts`(`code`, `name`) VALUES ('0100', '北京关区');
INSERT INTO `customs_districts`(`code`, `name`) VALUES ('0101', '机场单证');
INSERT INTO `customs_districts`(`code`, `name`) VALUES ('0102', '京监管处');
INSERT INTO... |
ALTER TABLE search_party ADD COLUMN search_party_collection_field_name VARCHAR(2000);
|
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 12, 2019 at 09:21 PM
-- Server version: 10.4.6-MariaDB
-- PHP Version: 7.3.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
<reponame>Seatfrog/UkRailTimetableDatabase
DROP TABLE IF EXISTS [dbo].[Associations]
GO
DROP TABLE IF EXISTS [dbo].[ScheduleLocations]
GO
DROP TABLE IF EXISTS [dbo].[ScheduleChanges]
GO
DROP TABLE IF EXISTS [dbo].[Schedules]
GO
DROP TABLE IF EXISTS [dbo].[Locations]
GO
DROP TABLE IF EXISTS [dbo].[Stations]
GO
SET... |
USE quantumbits_tracker;
INSERT INTO
department (id, name)
VALUES
(1, "Software Development");
INSERT INTO
department (id, name)
VALUES
(2, "Corporate");
INSERT INTO
department (id, name)
VALUES
(3, "Human Resources");
INSERT INTO
department (id, name)
VALUES
(4, "Information Technology");
INSERT INTO
... |
select c.name, o.id
from orders o
inner join customers c on o.id_customers = c.id
where o.orders_date < '2016/06/30'; |
--------------------------------------------------------
-- DDL for Table SDPOKSET_TMP
--------------------------------------------------------
CREATE TABLE "GROUNDFISH"."SDPOKSET_TMP"
( "CRUNO" VARCHAR2(10 BYTE),
"STRATUM" VARCHAR2(10 BYTE),
"SETNO" NUMBER(3,0),
"SDATE" DATE,
"NAFO" VARCHAR2(10 BYTE), ... |
DROP TABLE IF EXISTS #TempDB;
SELECT W.pid,PH.lm_name,SUM(B.qty) as sums
INTO #TempDB
FROM LM_CC CC,Local_Market LM,Buys B, Phones PH, Website W
WHERE B.rid = W.rid AND B.cc = CC.cc AND CC.lid = LM.lid AND Lm.phone_number = PH.phone_number
GROUP BY W.pid, PH.lm_name
-- SELECT T.pid, MAX(T.sums)
-- FROM #TempDB T
-- ... |
<filename>common/sql/insert/units_spells_immunity.sql<gh_stars>0
BEGIN;
INSERT INTO units_spells_immunity (id, spell_id) VALUES
(27, 8), --level 3--
(27, 9),
(27, 10),
(27, 31),
(27, 42),
(27, 43),
(27, 46),
(27, 61),
(27, 62),
(27, 63)... |
<gh_stars>0
-- Fact table for sessions. Join on session_key
with session_metrics as
(
select
session_key,
client_id,
min(event_date_dt) as session_start_date,
min(event_timestamp) as session_start_timestamp,
countif(event_name = 'page_view') as count_page_views,
su... |
<filename>poc/install/pocCore/pocSessionSave.sql<gh_stars>0
/*******************************************************************************
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
******... |
INSERT INTO WWS_COUNTRIES (ID, NAME, ISO3, ISO2, PHONECODE, CAPITAL, CURRENCY, CREATED_AT, UPDATED_AT, FLAG, WIKIDATAID) VALUES (134, 'Mali', 'MLI', 'ML', '223', 'Bamako', 'XOF', TO_TIMESTAMP('2018-07-20 16:41:03','YYYY-MM-DD HH24:MI:SS'), TO_TIMESTAMP('2019-08-02 21:38:23','YYYY-MM-DD HH24:MI:SS'), 1, 'Q912');
INSE... |
<gh_stars>1-10
create table heads
( hcode char(2) primary key,
hdesc varchar2(20),
budget number(7)
);
create table indents
( iid number(4) primary key,
hcode char(2) references heads(hcode),
di date,
idesc varchar2(30),
qty number(3),
placedby varchar2(20),
... |
--per cdo dept te fshire te fshihen dhe punonjesit
select * from hr.dbo.EMPLOYEES;
use hr go
create trigger after_department_delete on dbo.departments
for DELETE
AS
BEGIN
DELETE FROM hr.dbo.EMPLOYEES where DEPARTMENT_ID in (select DEPARTMENT_ID from deleted);
END;
delete from hr.dbo.departments whe... |
<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Aug 15, 2020 at 06:21 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.2.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... |
<reponame>Shuttl-Tech/antlr_psql
-- file:numeric_big.sql ln:44 expect:true
INSERT INTO num_exp_add VALUES (0,2,'-994877526002806872754342148749241.04353023451866590387054959174736129501310680280823383331007646306243540953499740615246583399296334239109936336446284803020643582102868247857009494139535009572740621288230740... |
-- Create table schema for 6 CSV files, remembering to specify data types and keys.
create table departments (
dept_no varchar,
dept_name varchar
);
select * from departments;
create table dept_employee (
emp_no int,
dept_no varchar
);
select * from dept_employee;
create table dept_manager (
dept_no varchar,... |
ALTER TABLE db_version CHANGE COLUMN required_10365_01_mangos_creature_ai_scripts required_10381_01_mangos_creature_model_race bit;
DROP TABLE IF EXISTS `creature_model_race`;
CREATE TABLE `creature_model_race` (
`modelid` mediumint(8) unsigned NOT NULL default '0',
`racemask` mediumint(8) unsigned NOT NULL defaul... |
update ps_gamedefs.dbo.skills set reqlevel = 255 where skillid between 201 and 286
delete from ps_gamedata.dbo.charskills where skillid between 201 and 286
|
<reponame>simhnna/sourcegraph
-- +++
-- parent: 1528395925
-- +++
BEGIN;
DROP INDEX IF EXISTS sub_repo_perms_repo_id;
DROP INDEX IF EXISTS sub_repo_perms_user_id;
DROP INDEX IF EXISTS sub_repo_perms_version;
COMMIT;
|
/*
Navicat MySQL Data Transfer
Source Server : phpstudy
Source Server Version : 50553
Source Host : localhost:3306
Source Database : zzh
Target Server Type : MYSQL
Target Server Version : 50553
File Encoding : 65001
Date: 2017-07-30 23:29:20
*/
SET FOREIGN_KEY_CHECKS=0;
-- ------... |
ALTER TABLE AM_APPLICATION_REGISTRATION ALTER COLUMN TOKEN_SCOPE TYPE VARCHAR(1500);
DROP TABLE IF EXISTS AM_CERTIFICATE_METADATA;
CREATE TABLE AM_CERTIFICATE_METADATA (
TENANT_ID INTEGER NOT NULL,
ALIAS VARCHAR(45) NOT NULL,
END_POINT VARCHAR(45) NOT NULL,
CONSTRAINT PK_ALIAS PRIMARY KEY (ALIAS),
CONSTRAINT... |
ALTER TABLE now_application_review ALTER COLUMN response_url TYPE varchar;
|
<reponame>FlyBase/chado<filename>schema/FBgg/main.sql
CREATE SCHEMA IF NOT EXISTS gene_group;
CREATE OR REPLACE FUNCTION gene_group.is_pathway(fbgg text, cvid varchar default '0003017') RETURNS bool AS
$$
SELECT EXISTS(
SELECT 1
FROM grp_cvterm gcvt
JOIN cvterm cvt... |
alter table `mst_project` add column if not exists `projectmodel_id` varchar(10) AFTER `projecttype_id`;
update `mst_project` set `projectmodel_id` = 'IH';
alter table `mst_project` modify column if exists `projectmodel_id` varchar(10) not null;
ALTER TABLE `mst_project` ADD KEY if not exists `projectmodel_id` (`pro... |
<gh_stars>1-10
CREATE TABLE example (id UUID NOT NULL, description VARCHAR(60) NOT NULL, PRIMARY KEY(id));
COMMENT ON COLUMN example.id IS '(DC2Type:uuid)';
CREATE TABLE customer (id UUID NOT NULL, name VARCHAR(60) NOT NULL, cpf CHAR(11) NOT NULL, cep CHAR(8) DEFAULT NULL, street_number VARCHAR(10) DEFAULT NULL, street... |
DROP TABLE IF EXISTS `escalation_queue`;
|
-- Dumping structure for view gtas.daily_apis_counts
DROP VIEW IF EXISTS `daily_apis_counts`;
-- Removing temporary table and create final VIEW structure
DROP TABLE IF EXISTS `daily_apis_counts`;
CREATE VIEW `daily_apis_counts` AS SELECT
id,
DATE(DATE_ADD(create_date, INTERVAL (SELECT val FROM app_confi... |
DROP TABLE IF EXISTS peptides_in_proteins;
CREATE TABLE peptides_in_proteins LIKE peptides_in_proteins_before_homology_filtering;
INSERT INTO peptides_in_proteins SELECT * FROM peptides_in_proteins_before_homology_filtering;
DELETE pip FROM
peptides_in_proteins as pip
LEFT JOIN best_peptides_for_annotation as best ... |
<reponame>aivakha/laravel-blog-app<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3306
-- Время создания: Мар 06 2022 г., 13:18
-- Версия сервера: 10.4.19-MariaDB
-- Версия PHP: 7.4.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+... |
CREATE VIEW ViewStatEventNonProfitOrgType
AS
SELECT
e.Id, t.Name AS Tag, e.DateOfEvent
FROM Event e
INNER JOIN NonProfitOrg n ON n.Id = e.NonProfitOrgId
INNER JOIN NonProfitOrgType t ON t.Id=n.TypeId
WHERE e.Deleted=0
|
CREATE DATABASE NDShoeStore;
drop database NDShoeStore;
USE NDShoeStore;
-- staffs
CREATE TABLE Staffs(
staff_id int auto_increment primary key,
staff_name varchar(50),
user_name varchar(50),
user_pass varchar(50),
staff_phone varchar(20),
role int not null default 1
);
-- customers
CREATE TABLE... |
<gh_stars>0
CREATE DATABASE employees;
USE employees;
|
/******************************************************
1. Find Names of All Employees by First Name
******************************************************/
SELECT
first_name, last_name
FROM
employees
WHERE
first_name LIKE 'Sa%'
ORDER BY employee_id;
/*****************************************************... |
DELETE FROM sso.permissions WHRER resource_type = 1; |
USE [WiseEyeV5Express]
GO
/****** Object: StoredProcedure [dbo].[CheckInOut_Update] Script Date: 4/17/2015 4:44:42 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[CheckInOut_Update]
@UserEnrollNumber int, @TimeStrOld datetime, @MachineNoOld int, @SourceOld nvarchar,
@OriginTyp... |
<gh_stars>0
CREATE TABLE Music
(
musicID integer not null PRIMARY KEY AUTOINCREMENT,
musicTitle varchar(100) not null,
musicPerformerName text not null,
musicOriginYear integer not null,
linkToPlay varchar(100) not null,
reasonToInclude text not null,
userID integer ... |
<filename>libs/sdc_etl_libs/sql/Fedex/CREATE_TABLE_tracking_events.sql<gh_stars>0
CREATE TABLE "LOGISTICS"."FEDEX"."TRACKING_EVENTS"
(
"RTYPE" VARCHAR,
"CCODE" VARCHAR,
"TPIDC" VARCHAR,
"TRCKNUM" VARCHAR,
"FILL1" VARCHAR,
"MTRKNUM" VARCHAR,
"FILL2" VARCHAR,
"SHIPD" VARCHAR,
"ESTDD" VARCHAR,
"ESTDT" VARCHAR,
... |
<gh_stars>1-10
use lacus;
SELECT part_year, country_info.name as country_name, max(max_temperature) as max_temperature,
max(precipitation) as precipitation, count(*) as obs_count,
count(distinct ghcn.station_id) as station_count
FROM ghcn
LEFT JOIN station_info ON ghcn.station_id = station_info.station_id
... |
<gh_stars>10-100
/*
Run this script on:
(local)\sqlexpress.CodeCampServerVersioned - This database will be modified
to synchronize it with:
(local)\sqlexpress.CodeCampServer
You are recommended to back up your database before running this script
Script created by SQL Compare version ... |
<reponame>payals/mimeo<filename>updates/mimeo--0.8.1--0.8.2.sql
-- Moved index creation step after data insertion. This will apply to all maker functions as well.
/*
* Snap refresh to repull all table data
*/
CREATE OR REPLACE FUNCTION refresh_snap(p_destination text, p_index boolean DEFAULT true, p_debug boolean D... |
/*
This script creates the Open Infobutton database for Oracle
Pre-requisites:
- Create or identify the tablespaces you will use
- login to SQL tool as DBA or privileged user
*/
CREATE ROLE "OIB_ROLE" NOT IDENTIFIED;
GRANT CREATE TABLE TO "OIB_ROLE";
GRANT CREATE VIEW TO "OIB_ROLE";
GRANT UNLIMITED TABLES... |
<gh_stars>0
-- @testpoint: box类型,使用(x1,y1),(x2,y2)方式插入空值,合理报错
drop table if exists test_box05;
create table test_box05 (name box);
insert into test_box05 values (box '(null,null),(null,null)');
insert into test_box05 values (box '('',''),('','')');
select * from test_box05;
drop table test_box05; |
SELECT
vbb_stops.stop_name,
vbb_stops.stop_lat,
vbb_stops.stop_lon,
routes_with_colours.route_short_name,
routes_with_colours.Hex,
routes_with_colours.Inverse
FROM vbb_trips
INNER JOIN (
SELECT *
FROM vbb_routes
INNER JOIN vbb_linienfarben
ON vbb_linienfarben.Linie = vbb_routes.route_short_name
WHERE (vbb_... |
create database T_OpFlix
use T_OpFlix
--DDL--
create table Tipos
(
IdTipo int primary key identity
,Nome varchar (255) not null unique
);
create table Plataformas
(
IdPlataforma int primary key identity
,Nome varchar (255) not null
);
create table Generos
(
IdGenero int primary key identity
,Nome varchar... |
<gh_stars>0
# 基础查询
/*
语法:
select 查询列表
form 表名;
类似于: System.out.println(打印);
特点:
1. 查询列表可以是,表中的字段,常量值,表达式,函数
2. 查询的结果是一个虚拟的表格
*/
USE test;
#1.查询表中的单个字段
SELECT xx FROM yy;
#2.查询表中的多个字段
SELECT xx, xx FROM yy;
#3.查询表中的所有字段
SELECT * FROM yy;
#4.查询常量池
SELECT 100;
SELECT 'olg';
#5.查询表达式
SELECT 100+150;
#6.查询函数
SELECT... |
<reponame>demchuk20/hapHere12
INSERT INTO hap_here.user_info (user_id, email, info, phone)
VALUES (1, '<EMAIL>', null, null);
INSERT INTO hap_here.user_info (user_id, email, info, phone)
VALUES (2, '<EMAIL>', null, null);
INSERT INTO hap_here.user_info (user_id, email, info, phone)
VALUES (3, '<EMAIL>2<EMAIL>', null, n... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 20 Okt 2021 pada 15.43
-- Versi server: 10.4.14-MariaDB
-- Versi PHP: 7.4.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C... |
<filename>db.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 05 Feb 2022 pada 16.44
-- Versi server: 10.4.22-MariaDB
-- Versi PHP: 8.0.14
SET
SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET
time_zone = "+00:00";
/*!401... |
-- phpMyAdmin SQL Dump
-- version 4.9.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 29, 2021 at 10:28 AM
-- Server version: 10.5.12-MariaDB-cll-lve
-- PHP Version: 7.2.34
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101... |
<reponame>danishabdullah/lunatic
\echo # Creating feedback_type type for conversation
create type feedback_type as enum (
'positive', 'negative', 'neutral'
);
insert into data.uisetup (name, details)
values
('feedback_type', '{"Negative":"negative","Neutral":"neutral","Positive":"positive"}'::jsonb)
;
-- ... |
drop database if exists techblog_db;
create database techblog_db;
use techblog_db; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.