sql stringlengths 6 1.05M |
|---|
<reponame>wangsikai/learn<filename>yoo-master-dc2492330d5d46b48f1ceca891e0f9f7e1593fee/module/yoomath/yoomath/src/main/java/tpl/sql/HolidayActivity02WeekPowerRank.sql<gh_stars>1-10
## 查询周战力排行记录
#macro($getWeekPowerRank(code,userId,time))
SELECT * FROM holiday_activity_02_week_power_rank WHERE activity_code = :code and ... |
-- begin DASHBOARD_PERSISTENT_DASHBOARD
alter table DASHBOARD_PERSISTENT_DASHBOARD add constraint FK_DASHBOARD_PERSISTENT_DASHBOARD_ON_GROUP foreign key (GROUP_ID) references DASHBOARD_DASHBOARD_GROUP(ID)^
create unique index IDX_DASHBOARD_PERSISTENT_DASHBOARD_UNIQ_REFERENCE_NAME on DASHBOARD_PERSISTENT_DASHBOARD (REFE... |
/*
* Licensed to The Apereo Foundation under one or more contributor license
* agreements. See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*
* The Apereo Foundation licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may... |
CREATE TABLE "SENTRY_USER" (
"USER_ID" NUMBER NOT NULL,
"USER_NAME" VARCHAR2(128) NOT NULL,
"CREATE_TIME" NUMBER NOT NULL
);
ALTER TABLE "SENTRY_USER"
ADD CONSTRAINT "SENTRY_USER_PK" PRIMARY KEY ("USER_ID");
ALTER TABLE "SENTRY_USER"
ADD CONSTRAINT "SENTRY_USER_USER_NAME_UNIQUE" UNIQUE ("USER_NAME");
CREA... |
-- 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.
CREATE TABLE [analytics_config].[IndexJournal] (
... |
<gh_stars>10-100
DROP INDEX IF EXISTS LOCAL_CATEGORY_MEMBER_IDX_ARTICLE_ID;
DROP INDEX IF EXISTS LOCAL_CATEGORY_MEMBER_IDX_CATEGORY_ID
|
<filename>migrations/6.sql
DROP TABLE "comment";
|
<filename>demo/CaretClassifier_rf_pca/BreastCancer/firebird/demo3_caret_CaretClassifier_rf_pca_firebird.sql
-- This SQL code was generated by sklearn2sql (development version).
-- Copyright 2018
-- Model : CaretClassifier_rf_pca
-- Dataset : BreastCancer
-- Database : firebird
-- This SQL code can contain one or mor... |
autocommit off;
ALTER CLASS x_base_c1
ADD ATTRIBUTE tmp_attr1 integer,
tmp_attr2 integer;
ALTER CLASS x_base_c1
DROP ATTRIBUTE attr3_smallint_noidx, attr4_float_noidx;
SELECT * FROM x_base_c1 WHERE attr1_int_unique_idx < 5 order by 1;
ROLLBACK WORK;
SELECT * FROM x_base_c1 WHERE attr1_in... |
<filename>src/main/resources/schema.sql<gh_stars>0
/**
* O DROP DEVE OCORRER NA SEGUINTE ORDEM POR CONTA DE DEPENDENCIA ENTRE AS TABELAS.
* TOTAL DE 8 NOTICIAS, 6 MANGAS/HQS E 8 USUARIOS CADASTRADOS.
* A TABELA DE USUÁRIOS FICARÁ RESPONSAVEL PELOS MANGÁS/HQ QUE O MESMO POSSUI,
DEPOIS DEVE-SE REALIZAR O JOIN E LIMPAR ... |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 1172.16.17.32
-- Generation Time: Nov 22, 2017 at 11:04 AM
-- Server version: 10.1.28-MariaDB
-- PHP Version: 7.1.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET... |
CREATE TABLE IF NOT EXISTS `mqtt_users` (
`Id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`Identity` varchar(128) NOT NULL,
`Username` varchar(128) NOT NULL,
`Password` varchar(512) NOT NULL,
`LastHandshakeAt` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`Id`),
UNIQUE KEY `Username` (`Username`),
UNIQUE ... |
DROP TABLE IF EXISTS `orderitems`;
DROP TABLE IF EXISTS `orders`;
DROP TABLE IF EXISTS `items`;
DROP TABLE IF EXISTS `customers`;
CREATE TABLE IF NOT EXISTS `customers` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`first_name` VARCHAR(64) NOT NULL,
`surname` VARCHAR(64) NOT NULL,
PRIMARY KEY (`id`)
);
CREA... |
<filename>db_scripts/views/vw_cashmanagement.sql
---------------------------------------------------------------
-- view: vw_cashmanagement
---------------------------------------------------------------
-- drop view vw_cashmanagement;
create or replace view vw_cashmanagement as
select
t.timestamp as day_time,
... |
<reponame>jacksoncurdo/Employee-Tracker
USE companyemployee_db;
INSERT INTO department
(name)
VALUES
("Management"),
("Human Resources"),
("Tech"),
("Legal"),
("Sales");
INSERT INTO role
(title,
salary,
department_id)
VALUES
("Manager", "200000.50", 1),
("HR Specialist", "55000.80", 2),
("Legal Advisor", "100000.50",... |
-- +goose Up
-- SQL in section 'Up' is executed when this migration is applied
CREATE TABLE `incomes` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`user_id` INT(11) NOT NULL,
`referer_id` INT(11) NOT NULL,
`type` TINYINT(4) NOT NULL COMMENT '0: reward, 1: offerwall',
`income` DECIMAL(19, 8) NOT NULL,
`referer_i... |
<reponame>ligana/Ensemble-om-SpringBoot<filename>db/db/3table/level/AMEND_BRANCH.sql
create table AMEND_BRANCH
(
AMEND_SEQ_NO Varchar2(50) not null,
AMEND_BUSI_SORT Varchar2(3),
AMEND_KEY Varchar2(30),
AMEND_DATE Varchar2(8),
BEFORE_VAL Varchar2(4000),
AFTER_VAL Varchar2(4000),
USER_ID Varch... |
INSERT into eg_roleaction (roleid,actionid) values ((select id from eg_role where name='BANK COLLECTION REMITTER'),(select id from eg_action where name='RemittancePrintBankChallan')); |
use ck2;
create or replace view Complete_Character as select
c.id, birth, death, is_female, mother_id, real_father_id,
s.name as personal_name, d.name as dynasty_name, perceived_father_id
from Characters c, Character_Status s, Dynasties d
where c.id = character_id and dynasty_id = d.id
;
|
<filename>bdc_collectors/scripts/load_scihub_provider.sql<gh_stars>1-10
INSERT INTO bdc.providers (name, description, uri, credentials)
VALUES ('SciHub', '',
'https://scihub.copernicus.eu/dhus',
'{"username": "<EMAIL>", "password": "password"}')
ON CONFLICT DO NOTHING; |
CREATE TABLE IF NOT EXISTS public.transaction
(
id uuid NOT NULL DEFAULT uuid_generate_v4(),
type transaction_type NOT NULL,
account_id uuid NOT NULL,
category_id uuid NOT NULL,
amount decimal(11,4) NOT NULL,
date timestamp without time zone NULL,
billed_date timestamp without time zone NUL... |
<reponame>tangxingchu/yidpu
CREATE DATABASE IF NOT EXISTS `weichu_youdianpu_db` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `weichu_youdianpu_db`;
-- MySQL dump 10.13 Distrib 5.7.17, for macos10.12 (x86_64)
--
-- Host: 127.0.0.1 Database: weichu_youdianpu_db
-- -----------------------------------------------------... |
<reponame>surajpotnuru/sqllineage
insert overwrite table query10
select cd_gender,
cd_marital_status,
cd_education_status,
count(*) cnt1,
cd_purchase_estimate,
count(*) cnt2,
cd_credit_rating,
count(*) cnt3,
cd_dep_count,
count(*) cnt4,
cd_dep_employ... |
DROP TABLE IF EXISTS `user`;
SET character_set_client = utf8mb4 ;
CREATE TABLE `user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(50) DEFAULT NULL,
`password` varchar(50) DEFAULT NULL,
`salt` varchar(50) DEFAULT NULL,
`email` varchar(100) DEFAULT NULL,
`type` int(11) DEFAULT NULL COMMENT '0-普... |
-- 2020-11-27T08:08:33.740Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Tab_Callout (AD_Client_ID,AD_Org_ID,AD_Tab_Callout_ID,AD_Tab_ID,Classname,Created,CreatedBy,EntityType,IsActive,SeqNo,Updated,UpdatedBy) VALUES (0,0,540048,118,'de.metas.marketing.base.callout.AD_User_TabCallout... |
<reponame>dram/metasfresh
CREATE OR REPLACE FUNCTION dlm.enable_dlm_triggers(p_table_name text, p_silent boolean DEFAULT false)
RETURNS void AS
$BODY$
DECLARE
v_trigger_select_sql text;
v_trigger_view_row dlm.triggers;
BEGIN
v_trigger_select_sql = '
SELECT v.*
FROM dlm.triggers v
JOIN public.AD_Table t ON lower... |
CREATE OR REPLACE VIEW planet_osm_polygon AS
SELECT
osm_id,
tags->'access' as "access",
tags->'addr:housename' as "addr:housename",
tags->'addr:housenumber' as "addr:housenumber",
tags->'admin_level' as "admin_level",
tags->'aerialway' as "aerialway",
tags->'aeroway' as "aeroway",
tags->'amenity' as "amenity",
tags->'b... |
-- Some comment at the top
SET CURRENT SCHEMA = 'DB2TEST';
SET CURRENT PATH = 'DB2TEST';
CREATE TABLE "TEST" (
"OBJ_ID" BIGINT NOT NULL,
"TEXT" VARCHAR(30),
"IS_TEXT_NULL" INTEGER NOT NULL DEFAULT 1);
COMMENT ON TABLE "TEST" IS 'Test table';
ALTER TABLE "TEST" ADD CONSTRAINT TEST_PK PRIMARY... |
<gh_stars>0
--
-- Copyright 2017 Kuelap, Inc.
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law o... |
<reponame>chs820/grafana_blog_bi
with date_data as (
select
*
from
UNNEST(GENERATE_DATE_ARRAY('2013-01-01', '2050-01-01', INTERVAL 1 DAY)) as date_stamp
),
utils_date as (
SELECT
date_stamp
-- month details
,date_trunc(date_stamp, month) as month_start_da... |
BEGIN;
ALTER TABLE repo
ADD CONSTRAINT deleted_at_unused CHECK ((deleted_at IS NULL));
COMMIT;
|
select
'{{ var("from_root_to_second") }}' as from_root,
'{{ var("from_second_to_second") }}' as from_second
|
<reponame>yuananf/tpcds-presto<gh_stars>1-10
WITH customer_total_return AS
(SELECT
cr_returning_customer_sk AS ctr_customer_sk,
ca_state AS ctr_state,
sum(cr_return_amt_inc_tax) AS ctr_total_return
FROM catalog_returns, date_dim, customer_address
WHERE cr_returned_date_sk = d_date_sk
AND d_year = 20... |
--
-- Copyright © 2012 - 2018 camunda services GmbH and various authors (<EMAIL>)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-... |
<reponame>ChaoticEvil/satan
# --- !Ups
CREATE TABLE IF NOT EXISTS `users` (
`id` INTEGER NOT NULL AUTO_INCREMENT,
`username` VARCHAR(32) NOT NULL UNIQUE,
`email` VARCHAR(50) NOT NULL UNIQUE,
`uid` VARCHAR(50) NOT NULL UNIQUE,
`password` VARCHAR(32) NOT NULL,
`first_name` VARCHAR(50),
... |
SELECT
i_item_id,
i_item_desc,
i_current_price
FROM item, inventory, date_dim, store_sales
WHERE i_current_price BETWEEN 62 AND 62 + 30
AND inv_item_sk = i_item_sk
AND d_date_sk = inv_date_sk
AND d_date BETWEEN cast('2000-05-25' AS DATE) AND (cast('2000-05-25' AS DATE) + INTERVAL 60 days)
AND i_m... |
WITH interest_income_query AS(SELECT s.sale_date_key, s.branch_key, s.product_key , s.customer_key, s. loan_amount , SUM(i.interest) AS interest_income
FROM
sale s, installment i
WHERE s.sale_date_key = i.sale_date_key AND
s.branch_key = i.sale_branch_key AND
s.product_key = i.sale_product_key AND
s.customer_key =... |
CREATE TABLE alter_table (
id INT,
name VARCHAR(50),
fKey INT
);
CREATE INDEX fkeyIndex ON alter_table(fKey);
CREATE TABLE table_fk (
id INT unique
);
CREATE INDEX idIndex ON table_fk(id); |
<filename>2021-08-19/Dump20210819/banco_conta.sql<gh_stars>0
-- MySQL dump 10.13 Distrib 8.0.22, for Win64 (x86_64)
--
-- Host: localhost Database: banco
-- ------------------------------------------------------
-- Server version 8.0.22
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET... |
CREATE TABLE IF NOT EXISTS seaflow_raw (
time TIMESTAMPTZ NOT NULL,
lat DOUBLE PRECISION,
lon DOUBLE PRECISION,
temp DOUBLE PRECISION,
salinity DOUBLE PRECISION,
conductivity DOUBLE PRECISION,
par DOUBLE PRECISION,
stream_pressure DOUBLE PRECISION,
file_duration DOUBLE PRECISION,
event_rate DOUBLE P... |
-- phpMyAdmin SQL Dump
-- version 4.6.6
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Aug 21, 2018 at 12:27 PM
-- Server version: 5.7.17-log
-- PHP Version: 7.1.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT... |
<filename>db/test/inputs.sql
-- Password: <PASSWORD>.
INSERT INTO user VALUES ('gianni', '$argon2i$v=19$m=4096,t=3,p=1$DB7STJ2ZhOo6Q+b4oKcZgg$l50XjT7LXO5fzKvh7DGm6MKwvWrPgREnapPvOyg0kqU', 'Gianni', 'Bicicletta', '<EMAIL>', '2020-5-11', 'Senior Developer', 'Rio De Janeiro', 0);
INSERT INTO user VALUES ('carlo', '$argon2... |
<filename>prisma/migrations/20220117214113_create_delivery_enum/migration.sql
-- CreateEnum
CREATE TYPE "DeliveryStatus" AS ENUM ('pending', 'delivered', 'notDelivered');
-- AlterTable
ALTER TABLE "deliveries" ADD COLUMN "status" "DeliveryStatus" NOT NULL DEFAULT E'pending';
|
INSERT INTO `user`(u_email, u_pass, u_fname, u_lname ) VALUES ("<EMAIL>", "<PASSWORD>","F_Name", "L_Name");
|
<filename>web/src/main/resources/org/support/project/web/dao/sql/UsersDao/UsersDao_select_all.sql
SELECT * FROM USERS
WHERE DELETE_FLAG = 0;
|
<filename>db/eapi.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 14, 2019 at 01:35 PM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.3.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zon... |
--
-- Copyright 2010-2016 the original author or authors.
--
-- 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.apa_id_faseche.org/licenses/LICENSE-2.0
--
-- ... |
<reponame>cagatayy94/symfonyshop.tk
-- auto-generated definition
CREATE TABLE public.iyzico
(
id SERIAL NOT NULL CONSTRAINT iyzico_pk PRIMARY KEY,
iyzico_api_key TEXT DEFAULT 'IYZICO_API_KEY'::TEXT NOT NULL,
iyzico_secret_key TEXT DEFAULT 'IYZICO_SECRET_KEY'::TEXT NOT NULL,
iyzico_base_url TEXT DEFAUL... |
BEGIN;
CREATE TABLE "voters_voter" ("id" serial NOT NULL PRIMARY KEY, "lname" varchar(255) NOT NULL, "fname" varchar(255) NOT NULL, "mname" varchar(255) NOT NULL, "suffix" varchar(255) NOT NULL, "addr1" varchar(255) NOT NULL, "addr2" varchar(255) NOT NULL, "city" varchar(255) NOT NULL, "zip" varchar(255) NOT NULL, "gen... |
<reponame>Bjornej/Bazooka
CREATE VIEW rd.[TemplatedTaskParameters]
AS SELECT TemplatedTaskParameters.[Id], [TemplatedTaskId], [TaskTemplateParameterId], [Value], Name, Optional , Encrypted, dbo.TaskTemplateParameters.Description FROM dbo.TemplatedTaskParameters INNER JOIN dbo.TaskTemplateParameters on [TaskTemplatePa... |
<reponame>RafaelBarbosa3A/Grupo-Corcovado<filename>Banco de Dados.sql
CREATE DATABASE CORCOVADOPI
USE CORCOVADOPI
CREATE TABLE PRODUTO (
ID INT NOT NULL IDENTITY PRIMARY KEY ,
NOME VARCHAR(250) NOT NULL,
DESCRICAO VARCHAR(250) NOT NULL,
FABRICANTE VARCHAR(250) NOT NULL,
CODIGO INT NOT NULL,
ESTOQUE IN... |
CREATE TABLE brand
(
id SERIAL NOT NULL,
name VARCHAR(50) NOT NULL,
logo VARCHAR(200),
archived BOOLEAN DEFAULT '0',
color VARCHAR(100) NOT NULL,
external_id VARCHAR(500),
PRIMARY KEY (id),
UNIQUE (name)
);
CREATE TABLE referential_type
(
id ... |
\copy (select distinct release_group from context order by 1 desc) to movies.dat;
|
<reponame>AjAgr/Synapse
DROP VIEW IF EXISTS [call_center];
GO
DROP VIEW IF EXISTS [catalog_page];
GO
DROP VIEW IF EXISTS [catalog_returns];
GO
DROP VIEW IF EXISTS [catalog_sales];
GO
DROP VIEW IF EXISTS [customer];
GO
DROP VIEW IF EXISTS [customer_address];
GO
DROP VIEW IF EXISTS [customer_demographics];
G... |
set log_error_verbosity = 'terse';
create table ref_1 (
id int4 primary key,
val text
);
create table ref_2 (
id int4 primary key,
ref int4 not null references ref_1,
val text
);
create table ref_3 (
id int4 primary key,
ref2 int4 not null references ref_2,
val text
);
select * from... |
<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 4.2.7.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Dec 12, 2014 at 04:51 PM
-- Server version: 5.6.20
-- PHP Version: 5.5.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTE... |
DROP TABLE IF EXISTS conreality.event RESTRICT;
CREATE TABLE conreality.event (
-- The event's sequential identifier (ID).
id bigserial NOT NULL PRIMARY KEY,
-- The event timestamp (in Zulu time).
timestamp timestamp WITH TIME ZONE NOT NULL DEFAULT now(),
-- The event's predicate (an action or verb).
... |
<reponame>Sourav692/FAANG-Interview-Preparation
# Time: O(n * m)
# Space: O(n * m)
SELECT school_id, IFNULL(min(score), -1) as score
FROM Schools LEFT JOIN Exam ON capacity >= student_count
GROUP BY school_id
ORDER BY NULL;
|
BEGIN;
DROP TABLE dns_providers;
DROP TABLE dns_config;
COMMIT;
|
<reponame>kukuhpelog/Portal-Students-11
-- phpMyAdmin SQL Dump
-- version 3.2.4
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 29. Januari 2018 jam 18:28
-- Versi Server: 5.1.41
-- Versi PHP: 5.3.1
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... |
<reponame>cgoodfred/koku<gh_stars>0
DELETE FROM {{schema | sqlsafe}}.reporting_aws_cost_summary_p
WHERE usage_start >= {{start_date}}::date
AND usage_start <= {{end_date}}::date
AND source_uuid = {{source_uuid}}
;
INSERT INTO {{schema | sqlsafe}}.reporting_aws_cost_summary_p (
id,
usage_start,
usag... |
SELECT
v.concept_id,
c1.concept_name drug_exp_concept_name,
c1.vocabulary_id drug_exp_vocab_id,
c1.concept_class_id drug_exp_concept_class,
c1.standard_concept drug_exp_std,
ISNULL(v.drug_type_concept_id, 0) drug_type_concept_id,
c2.concept_name drug_type_concept_name,
v.source_concept_id,
c3.concep... |
-- Label key for `bb.location`.
INSERT INTO
label_key (
id,
creator_id,
updater_id,
key
)
VALUES
(
20001,
1,
1,
'bb.location'
);
-- Label key for `bb.tenant`.
INSERT INTO
label_key (
id,
creator_id,
updater_id,
... |
# --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table energie_deal (
id bigserial not null,
resource_id bigint,
supplier varchar(255),
name ... |
-- <NAME> <EMAIL>.
-- Initial data.
--
-- SET character_set_client=utf8;
-- SET character_set_connection=utf8;
INSERT INTO TASSOCIATION(ASSOCIATION_ID, CODE, GUID, NAME, DESCRIPTION) VALUES (1, 'accessories', 'accessories' , 'Accessories' , 'Product accessories');
INSERT INTO TASSOCIATION(ASSOCIATION_ID, CODE, GUID,... |
--
-- Timeperiods exclusions.
--
CREATE TABLE mod_bam_reporting_timeperiods_exclusions (
timeperiod_id int NOT NULL,
excluded_timeperiod_id int NOT NULL,
UNIQUE (timeperiod_id, excluded_timeperiod_id),
FOREIGN KEY (timeperiod_id) REFERENCES mod_bam_reporting_timeperiods (timeperiod_id)
ON DELETE CASCADE,
... |
CREATE SCHEMA `java_academy_2022` DEFAULT CHARACTER SET utf8;
USE `java_academy_2022`;
CREATE TABLE `java_academy_2022`.`book`
(
`id` BIGINT(11) NOT NULL AUTO_INCREMENT,
`title` VARCHAR(45) NOT NULL,
`authors` VARCHAR(80) NULL,
`year` INT NULL,
`publisher... |
-- these may already be set. If so, they will print error but not fail
alter table apidb.snp add primary key (snp_id);
alter table apidb.sequencevariation add primary key (sequence_variation_id);
WHENEVER SQLERROR EXIT 1;
grant insert, select, update, delete on apidb.Snp to gus_w;
grant select ON apidb.Snp to gus_r... |
-- Remove Slider manager module, not required any more
DELETE FROM [rb_GeneralModuleDefinitions] WHERE [GeneralModDefID] in ('1010d514-73b2-4e46-b6a9-2c0182d22865')
Go
IF EXISTS (SELECT * FROM sys.objects
WHERE object_id = OBJECT_ID(N'[dbo].[rb_SliderImages]') AND type in (N'U'))
BEGIN
drop table rb_SliderImages
END... |
CREATE TABLE `[prefix]_ml_sites` (
`id` bigint(16) NOT NULL,
`filename` varchar(64) NOT NULL DEFAULT '' COMMENT 'Dateiname',
`dir` varchar(128) NOT NULL DEFAULT '' COMMENT 'Verzeichnis',
`title` varchar(32) NOT NULL DEFAULT '' COMMENT 'Seitentitle',
`start_site` bigint(16) NOT NULL DEFAULT '0' COMMENT 'Starts... |
<filename>db/schema.sql<gh_stars>0
DROP DATABASE IF EXISTS tech_blog_post_db;
CREATE DATABASE tech_blog_post_db; |
SELECT year,
month,
SUM(volume) AS volume_sum
FROM tutorial.aapl_historical_stock_price
GROUP BY year, month
ORDER BY year, month;
|
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 11, 2019 at 09:24 AM
-- Server version: 10.3.15-MariaDB
-- PHP Version: 7.1.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @... |
select NAME from CITY where COUNTRYCODE='USA' and POPULATION>120000; |
<gh_stars>0
/*
IF EXISTS (SELECT name FROM sysobjects WHERE (name = 'MemberCaseCarePlanGoal_Update' AND type = 'P'))
DROP PROCEDURE dbo.MemberCaseCarePlanGoal_Update
GO
*/
CREATE PROCEDURE dbo.MemberCaseCarePlanGoal_Update
/* STORED PROCEDURE - INPUTS (BEGIN) */
@memberCaseCarePlanGoalId BIGINT,
@st... |
<filename>books.sql
-- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Sep 29, 2019 at 01:03 AM
-- Server version: 5.7.27-0ubuntu0.18.04.1
-- PHP Version: 7.2.19-0ubuntu0.18.04.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/... |
begin deferrable;
begin not deferrable;
|
<reponame>tfuru17/abf
/*****************************************************************************
-- Package Name : ABF_LOG_DTL_SQ
-- Meaning :
-- Creation Date : 2018-07-14
-- Created by tfurukaw
*****************************************************************************/
CREATE SEQUENCE ABF_LOG_DTL_SQ
START WIT... |
-- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Apr 16, 2018 at 12:03 AM
-- Server version: 5.6.38
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... |
<gh_stars>0
CREATE TABLE `daily_price` (
`id` int NOT NULL AUTO_INCREMENT,
`data_vendor_id` int NOT NULL,
`symbol_id` int NOT NULL,
`price_date` datetime NOT NULL,
`created_date` datetime NOT NULL,
`last_updated_date` datetime NOT NULL,
`open_price` decimal(19,4) NULL,
`high_price` decimal(19,4) NULL,
... |
<gh_stars>0
/*
Navicat MySQL Data Transfer
Source Server : 127.0.0.1_3306
Source Server Version : 50505
Source Host : 127.0.0.1:3306
Source Database : db_tesda_affiliated_school
Target Server Type : MYSQL
Target Server Version : 50505
File Encoding : 65001
Date: 2019-02-19 22:55:15... |
-- --------------------------------------------------
-- Generated by Enterprise Architect Version 9.2.921
-- Created On : Thursday, 24 July, 2014
-- DBMS : MySql
-- --------------------------------------------------
SET FOREIGN_KEY_CHECKS=0;
-- Drop Tables, Stored Procedures and View... |
Use Lab01; -- using database
GO
SELECT TOP 10 SellerFirstName, SellerLastName, SellerVisaCardSeries
FROM dbo.tblSeller
WHERE (SellerGender = N'Male') AND (SellerVisaCardSeries LIKE N'41%1');
GO
SELECT Top 10 *
FROM dbo.tblBill INNER JOIN dbo.tblSeller ON tblBill.BillSellerID = tblSeller.SellerID
INNER JOIN d... |
SELECT * from pexp_testmodela
|
/*
* Populates the database with a static set of test data.
*/
INSERT INTO membership_types
(member_type, membership_desc, membership_desc_short)
VALUES
(1, 'Full Member', 'Full'),
(2, 'Social Member', 'Social'),
(3, 'Associate Member', 'Associate'),
(4, 'Resident Associate', 'RA');
INSERT INTO members
... |
<reponame>ucdavis/ipa-web<gh_stars>1-10
SET foreign_key_checks = 0;
DROP TABLE `CensusSnapshots`;
DROP TABLE `CourseOverlaps`;
DROP TABLE `GraduateStudents`;
DROP TABLE `InstructorTeachingAssistantPreferences`;
DROP TABLE `InstructorWorkgroupRelationships`;
DROP TABLE `Subjects`;
DROP TABLE `Subjects_has_Workgroups`;
... |
-- AlterTable
ALTER TABLE "Cmdb" ADD COLUMN "state" INTEGER DEFAULT 10;
-- AlterTable
ALTER TABLE "Ticket" ADD COLUMN "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
ADD COLUMN "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
ADD COLUMN "state" INTEGER DEFAULT 10;
-- AlterTabl... |
USE join-us-db;
CREATE TABLE users
(
email VARCHAR(255) PRIMARY KEY,
created_at TIMESTAMP DEFAULT NOW()
);
INSERT INTO users(email) VALUES ("<EMAIL>"), ("<EMAIL>"); |
/* This file was generated by ODB, object-relational mapping (ORM)
* compiler for C++.
*/
DROP TABLE IF EXISTS `DataSource`;
CREATE TABLE IF NOT EXISTS `schema_version` (
`name` VARCHAR(255) NOT NULL PRIMARY KEY,
`version` BIGINT UNSIGNED NOT NULL,
`migration` TINYINT(1) NOT NULL)
ENGINE=InnoDB;
DELETE FROM... |
SELECT DISTINCT
s.FirstName + ' ' + s.LastName AS [FullName]
FROM Students s
LEFT JOIN StudentsExams se ON s.Id = se.StudentId
WHERE se.ExamId IS NULL; |
CREATE SCHEMA `routingmsdb` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci ;
use routingmsdb;
CREATE USER 'routingmsdb'@'%' IDENTIFIED BY 'routingmsdb';
GRANT ALL PRIVILEGES ON routingmsdb.* TO 'routingmsdb'@'%';
##Voyage Table DDL
CREATE TABLE `voyage` (
`Id` int(11) NOT NULL AUTO_INCREMENT,
`voyage_number... |
<reponame>everpcpc/databend
set enable_planner_v2 = 1;
DROP DATABASE IF EXISTS db1;
CREATE DATABASE db1;
USE db1;
CREATE TABLE IF NOT EXISTS t1(a Int8, b UInt32, c UInt64, d String) Engine = FUSE;
CREATE TABLE IF NOT EXISTS t2(a Int8, b UInt32, c UInt64, d String) Engine = FUSE;
INSERT INTO t1 (a,b,c,d) VALUES(1, 1,... |
-- Demonstration 1A
-- Step 1 - Switch to the tempdb database
USE tempdb;
GO
-- Step 2 - Query the sys.spatial_reference_systems system view
SELECT * FROM sys.spatial_reference_systems;
GO
-- Step 3 - Drill into the value for srid 4326
SELECT * FROM sys.spatial_reference_systems
WHERE spatial_reference_id = 4326;... |
<filename>src/test/resources/META-INF/sql/DsDataStore.sql
#storeToDatabase
INSERT INTO {schema}.ds_data VALUES (null, ?, ?, ?, ?, ?);
|
<reponame>MCZbase/DDL
CREATE OR REPLACE FUNCTION "AY" (pub_id in varchar2 )
return varchar2
-- @deprecated does not appear to be used
--
-- function ay returns a list of author last names for a publication
-- if single author, the last name of the first author,
-- if two authors, the last n... |
<gh_stars>0
-- ALTER TABLE santeh_calculation DROP trash
ALTER TABLE santeh_calculation ADD trash SMALLINT( 1 ) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'флаг удаления записи';
-- ALTER TABLE santeh_calculation_position DROP trash
ALTER TABLE santeh_calculation_position ADD trash SMALLINT( 1 ) UNSIGNED NOT NULL DEFAULT... |
<filename>Exercise1-DataDefinitionAndDataTypes/Movies/PopulateTables.sql
INSERT INTO Directors (DirectorName, Notes) VALUES
('Bash Director', 'GoAT!'),
('First son of Bash Director', 'Not so great...'),
('Second son of Bash Director', 'Somewhat better than his brother.'),
('Wannabe Director', 'Utter failure.'),
('Forgo... |
/*
Post-Deployment Script Template
--------------------------------------------------------------------------------------
This file contains SQL statements that will be appended to the build script.
Use SQLCMD syntax to include a file in the post-deployment script.
Example: :r .\myfile.sql
... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: 2017 年 2 月 15 日 14:51
-- サーバのバージョン: 10.1.19-MariaDB
-- PHP Version: 5.6.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+09:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... |
DROP TABLE IF EXISTS user;
DROP TABLE IF EXISTS pet;
CREATE TABLE user (
id INTEGER PRIMARY KEY AUTOINCREMENT,
username TEXT UNIQUE NOT NULL,
password TEXT NOT NULL
);
CREATE TABLE pet (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT UNIQUE NOT NULL,
type TEXT NOT NULL,
breed TEXT NOT NULL,
descripti... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.