sql stringlengths 6 1.05M |
|---|
-- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Nov 21, 2019 at 09:58 AM
-- Server version: 5.6.21
-- PHP Version: 5.6.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... |
<reponame>Shuttl-Tech/antlr_psql
-- file:horology.sql ln:128 expect:true
SELECT timestamp with time zone '2005-04-03 12:00-06' - interval '1 day' as "Apr 2, 12:00"
|
<filename>test/sql/official-suite/attach4-1.sql
-- original: attach4.test
-- credit: http://www.sqlite.org/src/tree?ci=trunk&name=test
ATTACH 'sub_f' AS sub_name
;CREATE TABLE sub_name.tbl(x)
;INSERT INTO sub_name.tbl VALUES('sub_f')
;SELECT x FROM sub_name.tbl
;SELECT x FROM sub_name.tbl
;UPDATE sub_name.tbl SET x ... |
<gh_stars>10-100
-- You can access environment variables from the config using jinja as follow
select 2 |
<reponame>Jeff-Thompson12/risk_assessment
CREATE TABLE IF NOT EXISTS metric(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name CHAR,
description CHAR,
class CHAR, /*class = maintenance or test*/
weight REAL
); |
<reponame>VictorAdad/sigi-api-adad<filename>data/sql/catalogos/grupo_etnico.sql
-----------------------------------------------------
-----------------------------------------------------
--- GRUPO ETNICO
--- Catálogo de interoperabilidad
--- http://sigejupe2.pjedomex.gob.mx/sigejupe/catalogos/gruposednicos.json
--- ID... |
--
-- Copyright 2005-2014 The Kuali Foundation
--
-- Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php
--
-- Unless required by ap... |
PROMPT Prepare runner for the top 2 package by package name for current user
--Arrange
declare
c_path varchar2(100) := 'test_package_2';
l_objects_to_run ut_suite_items;
l_test0_suite ut_logical_suite;
l_test1_suite ut_logical_suite;
l_test2_suite ut_logical_suite;
begin
--Act
l_objects_to_run := ut_suite... |
<reponame>aravi5/drill-test-framework<gh_stars>0
select * from `filter/pushdown/DRILL_5796_test_data.parquet` where ts_col in ('2016-01-09 23:05:45', '2016-01-13 23:09:41', '2016-01-01 22:57:53') order by id limit 5;
|
create table tk_module(
id int not null auto_increment primary key,
name char(30) not null default '' comment '模块',
title char(30) not null default '' comment '模块名称',
sort int not null default 0,
is_valid int not null default 0,
create_time int not null default 0,
update_time int not null default 0... |
<gh_stars>1-10
SELECT fn_db_add_column('cluster', 'migration_bandwidth_limit_type', 'VARCHAR(16) NOT NULL DEFAULT ''AUTO''');
SELECT fn_db_add_column('cluster', 'custom_migration_bandwidth_limit', 'integer NULL');
SELECT fn_db_create_constraint('cluster',
'check_cluster_custom_migration_b... |
-- { echo }
EXPLAIN PIPELINE SELECT sleep(1);
SELECT sleep(1) SETTINGS log_processors_profiles=true, log_queries=1, log_queries_min_type='QUERY_FINISH';
SYSTEM FLUSH LOGS;
WITH
(
SELECT query_id
FROM system.query_log
WHERE current_database = currentDatabase() AND Settings['log_processors_p... |
<reponame>klaus7/restapi
insert into SEC_USER_ROLE (ID, CREATE_TS, VERSION, USER_ID, ROLE_NAME)
values ('14ee9a2a-df58-4c5c-b35f-255da48feeab', current_timestamp, 0, '60885987-1b61-4247-94c7-dff348347f93', 'rest-full-access')^ |
<reponame>share-research/pace-admin<filename>hasura/migrations/default/1588877372866_create_table_public_confidence_type/up.sql
CREATE TABLE "public"."confidence_type"("id" serial NOT NULL, "name" text NOT NULL, "description" text NOT NULL, "rank" integer NOT NULL, PRIMARY KEY ("id") , UNIQUE ("id"), UNIQUE ("name")); |
-- postgres scibot_test
-- CONNECT TO scibot_test USER postgres;
-- NOTE dev-db/postgresql uuid use flag is required
CREATE EXTENSION "uuid-ossp"; -- keep this on public schema for safety
|
if EXISTS (SELECT * FROM [dbo].[Idempotence] WHERE MessageId = @MessageId and AssignedThreadId is null)
update [dbo].[Idempotence] set
InboxWorkQueueUri = @InboxWorkQueueUri,
AssignedThreadId = @AssignedThreadId,
DateThreadIdAssigned = getdate()
where
MessageId = @MessageId;
else
if NOT EXISTS (SELECT * F... |
/*L
Copyright SAIC
Distributed under the OSI-approved BSD 3-Clause License.
See http://ncip.github.com/cabio/LICENSE.txt for details.
L*/
create index ZSTG_SNPRTER_CYTO_STOP on ZSTG_SNP_REPORTER(CYTO_STOP) PARALLEL NOLOGGING tablespace CABIO_MAP_FUT;
create index ZSTG_SNPRTER_CYTO_START on ZSTG_SNP_R... |
<gh_stars>0
create table t_players
(
vorname text,
nachname text,
p_alter int,
koerpergroesse numeric
)
insert into t_players VALUES( 'toto', 'zimmerman', '20', '1.9');
insert into t_players VALUES( 'aniess', 'keinert', '21', '1.7');
--- <NAME>
---mt
CREATE TABLE public.stadt
(
vorname ,
nachname ,
p... |
CREATE OR ALTER PROCEDURE [capture].[test insert_captures_multi_row_inserts]
AS
BEGIN
-----------------------------------------------------------------------------------------------------------------
-- Arrange:
------------------------------------------------------------------------------------------------------... |
<filename>database/patch_20_12_2018.sql
ALTER TABLE `erp_material_outward_batchwise` CHANGE `cgst_amt` `cgst_amt_per` FLOAT(10,2) NOT NULL DEFAULT '0.00';
ALTER TABLE `erp_material_outward_batchwise` CHANGE `sgst_amt` `sgst_amt_per` FLOAT(10,2) NOT NULL DEFAULT '0.00';
ALTER TABLE `erp_material_outward_batchwise` CHANG... |
<reponame>Peedrooo/Learning_SQL<filename>CursoEmVideo/aula6.sql
select id,nome from gafanhotos
order by nome, id;
select nome,profissao from gafanhotos
where profissao = 'Programador'
order by nome;
select nome,profissao from gafanhotos
where altura >= 1.65
order by profissao,nome ;
select sexo,altura from gafanhoto... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Feb 25, 2021 at 06:03 AM
-- Server version: 5.7.31
-- PHP Version: 7.3.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@... |
<reponame>maximcondon/Project_MovieRecommender<gh_stars>0
CREATE TABLE IF NOT EXISTS movies(
movieId INT PRIMARY KEY,
title VARCHAR(512) NOT NULL,
genres VARCHAR(1024)
);
CREATE TABLE IF NOT EXISTS links(
movieId INT PRIMARY KEY,
imdbId VARCHAR(512) NOT NULL,
tmdbId VARCHAR(1024)
);
CREATE TABLE IF NOT EX... |
create table item_attach(
fullname varchar(150) not null,
item_id integer(5) not null,
regdate timestamp default now(),
primary key (fullname)
);
alter table item_attach add constraint fk_item_attach foreign key (item_id) references async_image_item (item_id); |
<reponame>GUSAR1T0/VXDS-DEV-TOOLS<gh_stars>0
DROP TABLE [simple-note-service].[Note]; |
<reponame>allan-stewart/dotnet-docker-example<gh_stars>0
CREATE TABLE todo_items (
item_id text NOT NULL PRIMARY KEY,
item_text text NOT NULL,
created_at timestamp with time zone NOT NULL,
completed_at timestamp with time zone
);
|
-- MySQL dump 10.16 Distrib 10.1.34-MariaDB, for Win32 (AMD64)
--
-- Host: localhost Database: mpce1
-- ------------------------------------------------------
-- Server version 10.1.34-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_... |
<reponame>SeppPenner/oqtane.framework<gh_stars>1-10
/*
Create tables
*/
CREATE TABLE [dbo].[Site](
[SiteId] [int] IDENTITY(1,1) NOT NULL,
[Name] [nvarchar](200) NOT NULL,
[Logo] [nvarchar](50) NOT NULL,
[CreatedBy] [nvarchar](256) NOT NULL,
[CreatedOn] [datetime] NOT NULL,
[ModifiedBy] [nvarchar](256) NOT NU... |
INSERT INTO `sru`.`Movimento` (`dataHora`, `idUsuarios`, `idCardapio`, `idTipoMovimento`) VALUES ('2019-08-29 11:06:54', '56', '215', '1');
INSERT INTO `sru`.`Movimento` (`dataHora`, `idUsuarios`, `idCardapio`, `idTipoMovimento`) VALUES ('2019-08-29 11:35:10', '414', '215', '1');
INSERT INTO `sru`.`Movimento` (`dataHor... |
create table forms (
id serial,
user_id serial not null references users on delete cascade,
uuid uuid not null default uuid_generate_v4(),
name text not null,
description text,
created_at timestamp without time zone not null default now(),
updated_at timestamp without time zone not null default now(),
p... |
-- @Title: 不同性别每日分数总计 (Running Total for Different Genders)
-- @Author: Singularity0909
-- @Date: 2020-11-08 21:54:37
-- @Runtime: 1270 ms
-- @Memory: 0 B
select t1.gender, t1.day,
(
select sum(t2.score_points)
from Scores t2
where t2.gender = t1.gender and t2.day <= t1.day
) total
from Scores t1
group b... |
<reponame>mohamed-waleed-rady/elearning-php
SELECT
courses.id,
lectures.type
FROM
lectures
JOIN courses ON courses.id = lectures.course AND courses.deleted = 0
WHERE
lectures.id = %d AND lectures.deleted = 0
GROUP BY
lectures.id; |
<gh_stars>1-10
SELECT (COUNT( CITY ) - COUNT( DISTINCT CITY )) AS RESULT FROM STATION;
|
SELECT TOP(5) FirstName, LastName
FROM Employees
ORDER BY Salary DESC |
-- file:inherit.sql ln:396 expect:true
create table p1(f1 int)
|
<reponame>phuphan626/sql-challenge<gh_stars>0
-- 1. List the following details of each employee: employee number, last name, first name, sex, and salary.
-- For this, I can query the above information, using the right join from 'employees' to 'salaries' to get the salary column
-- Because the employees table have diffe... |
<filename>dbcopy/2017-10-17 14!04!32.sql
-- ----------备份详情--------------------
-- 姓名:admin
-- 备份时间:2017-10-17 14:04:32
-- 备份数据表:dz_system_log,dz_stytem,dz_role_user,dz_role,dz_rank,dz_node,dz_news,dz_nav,dz_frontuser,dz_friendlink
-- --------------------------------------
-- ----------------------------
-- Ta... |
-- -----------------------------------------------------
-- Table `WIN_DEVICE`
-- -----------------------------------------------------
CREATE TABLE WIN_DEVICE (
DEVICE_ID VARCHAR(45) NOT NULL,
CHANNEL_URI VARCHAR(100) DEFAULT NULL,
DEVICE_INFO VARCHAR2(4000) DEFAULT NULL,
IMEI VARCHAR(45) DEFAULT NULL,
IMSI ... |
<reponame>greenvilleassociates/fusionshellplus
ALTER TABLE /*_*/site_stats DROP KEY /*i*/ss_row_id, ADD PRIMARY KEY (ss_row_id);
|
create database questionanswer character set UTF8mb4 collate utf8mb4_bin;
show variables like 'char%';
|
<filename>exam3.sql
CREATE TABLE "carpet" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "name" varchar(100) NOT NULL,
"quantity" integer NOT NULL, "reorder_quantity" integer NOT NULL, "date_created" datetime NOT NULL,
"date_modified" datetime NOT NULL);
CREATE TABLE "carpet_cut" ("id" integer NOT NULL PRIMARY KEY ... |
<reponame>devaescasio/CRM
/*
SQLyog Ultimate v12.2.1 (64 bit)
MySQL - 5.6.17 : Database - enchan_crm
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!400... |
# --- !Ups
CREATE TABLE IF NOT EXISTS `play_chat`.`account` (
`id` BIGINT(20) UNSIGNED AUTO_INCREMENT,
`name` VARCHAR(128) NOT NULL,
`password` VARCHAR(128) NOT NULL,
`mail` VARCHAR(256) NOT NULL,
`create_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_time` TIMESTAMP ... |
CREATE TABLE blogs(
id serial PRIMARY KEY,
name varchar,
); |
CREATE TABLE contact_statistics (
person NUMBER(10),
merged_contact_id NUMBER(10),
call_count NUMBER(10),
total_duration NUMBER(10),
call_count_in NUMBER(10),
total_duration_in NUMBER(10),
call_count_out NUMBER(10),
total_duration_out NUMBER(10)
);
delete from contact_statistics;
insert into contact_st... |
-- ------------------------------------------------------------------
-- Title: Oxford Acute Severity of Illness Score (OASIS)
-- This query extracts the Oxford acute severity of illness score.
-- This score is a measure of severity of illness for patients in the ICU.
-- The score is calculated for every hour of the pa... |
DROP TABLE Doctor
GO
DROP TABLE Patient
GO
DROP TABLE Person
GO
DROP TABLE InheritanceParent
GO
CREATE TABLE InheritanceParent
(
InheritanceParentId int NOT NULL,
TypeDiscriminator int NULL,
Name nvarchar(50) NULL,
PRIMARY KEY(InheritanceParentId)
)
GO
DROP TABLE In... |
<filename>src/project.dao/sql/ProjectTemplate_MySql.sql
/*
Navicat Premium Data Transfer
Source Server : 190
Source Server Type : MySQL
Source Server Version : 50729
Source Host : 192.168.1.190:3306
Source Schema : ProjectTemplate
Target Server Type : MySQL
Target Server Versio... |
<filename>lib/templates/db/dynamic_action_plg.pks
CREATE OR REPLACE PACKAGE #plg_short_name#_plg_pkg IS
--
-- Plug-in Render Function
-- #param p_dynamic_action
-- #param p_plugin
-- #return apex_plugin.t_dynamic_action_render_result
FUNCTION render_#plg_short_name#(p_dynamic_action IN apex_plugin.t_d... |
<reponame>Shuttl-Tech/antlr_psql<gh_stars>10-100
-- file:interval.sql ln:72 expect:true
INSERT INTO INTERVAL_TBL_OF (f1) VALUES ('-2147483649 days')
|
-- file:event_trigger.sql ln:337 expect:true
create table rewritemetoo1 of rewritetype
|
<gh_stars>1000+
CREATE TABLE Testing2 (ID integer NOT NULL)
;
CREATE TABLE Testing3 (ID integer NOT NULL)
;
|
select count(*) from title t,cast_info ci,movie_info mi,movie_info_idx mi_idx where t.id=ci.movie_id and t.id=mi.movie_id and t.id=mi_idx.movie_id and t.production_year < 1974 and mi_idx.info_type_id = 100 and t.kind_id < 7 and mi.info_type_id > 46 and ci.person_id = 139310;
select count(*) from title t,movie_companies... |
DECLARE @TargetDlgHandle UNIQUEIDENTIFIER
DECLARE @Message varbinary(max)
DECLARE @MessageName Sysname
BEGIN TRAN;
WAITFOR (
RECEIVE TOP(1)
@TargetDlgHandle=Conversation_Handle
,@Message=Message_Body
,@MessageName=Message_Type_Name
FROM [{queueName}]),
TIMEOUT 1000;
SELECT cast(@Message a... |
<gh_stars>1-10
/*
* Please make sure to adopt the tables prefix here
*/
-- tags are missing yet
-- add users
DELETE FROM `bancha_10_samples_users` where 1=1;
INSERT INTO `bancha_10_samples_users` (`id`, `name`, `login`, `created`, `email`, `avatar`, `weight`, `height`) VALUES
(1, 'Roland', 'roland', '2011-07-28 ... |
<filename>extras/scripts/windows/scripts/db_create.sql
-- Create service database if not exist
CREATE DATABASE IF NOT EXISTS xxxdb;
-- Use service database
USE xxxdb;
-- Account table, contain all account profiles.
CREATE TABLE IF NOT EXISTS account (
uuid varchar (64) NOT NULL,
pwd ... |
<filename>features/org.wso2.carbon.consent.mgt.server.feature/resources/dbscripts/mssql.sql<gh_stars>0
IF NOT EXISTS ( SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[CM_PII_CATEGORY]') AND TYPE IN (N'U'))
CREATE TABLE CM_PII_CATEGORY (
ID INTEGER NOT NULL IDENTITY,
NAME VARCH... |
<gh_stars>0
INSERT INTO cicerot.cicerotwebapp_pais (`id`,`nombre_pais`, `created_at`, `updated_at`)
VALUES
(1, 'Afganistán', NOW(), NOW()),
(2, 'Islas Gland', NOW(), NOW()),
(3, 'Albania', NOW(), NOW()),
(4, 'Alemania', NOW(), NOW()),
(5, 'Andorra', NOW(), NOW()),
(6, 'Angola', NOW(), NOW()),
(7, 'Anguilla', NOW(), NO... |
<reponame>mansimathpal/sql
use mansi
create table Students(SId int primary key, Marks int, Grade varchar(5))
insert into Students(SId, Marks, Grade)
select x.Stud.Query('SId').value('.', 'int'),
x.Stud.Query('Marks').value('.', 'int'),
x.Stud.Query('Grade').value('.', 'varchar(5)') from (select CAST(x As XML) from OPEN... |
alter table team add column open_shift_cloud varchar(255);
update team set open_shift_cloud = 'ab-cloud'; |
<filename>sql/2019/13_Ecommerce/13_02.sql
#standardSQL
# 13_02: Top shops
SELECT
_TABLE_SUFFIX AS client,
app,
COUNT(0) AS freq,
total,
ROUND(COUNT(0) * 100 / total, 2) AS pct
FROM
`httparchive.technologies.2019_07_01_*`
JOIN
(SELECT _TABLE_SUFFIX, COUNT(0) AS total FROM `httparchive.summary_pages.2019_07... |
-- Utility function for grouping/slotting time with a given interval.
CREATE OR REPLACE FUNCTION date_group(
field timestamp,
group_interval interval
)
RETURNS timestamp LANGUAGE SQL STABLE AS
$BODY$
SELECT to_timestamp((EXTRACT(EPOCH from $1)::int /
EXTRACT(EPOCH from group_interval)... |
-- +goose Up
ALTER TABLE workflow_executions
ADD COLUMN started_at TIMESTAMP,
ADD COLUMN workflow_template_version_id INT REFERENCES workflow_template_versions,
ADD COLUMN phase VARCHAR(50),
ADD COLUMN cron_workflow_id INT REFERENCES cron_workflows,
DROP COLUMN failed_at,
DROP COLUMN workflow_te... |
<filename>inst/sql/sql_server/checks/source_to_concept_map_frequency.sql
-- source_to_concept_map
select source_vocabulary_id, target_vocabulary_id, count_big(*) as count from @vocabDatabaseSchema.source_to_concept_map
group by source_vocabulary_id, target_vocabulary_id
order by source_vocabulary_id, target_vocabulary... |
<gh_stars>10-100
# The following query computes the allelic frequency for BRCA1 variants in the
# PGP dataset.
#
# Note that the new BigQuery feature of user-defined javascript
# functions is in limited preview. For more info, see
# https://www.youtube.com/watch?v=GrD7ymUPt3M#t=1377
SELECT
vars.contig_name AS conti... |
<reponame>Q-xyz/meminero
create table public.integrity_checkpoints
(
number bigint,
created_at timestamp default now()
);
create index integrity_checkpoints_created_at_idx on public.integrity_checkpoints (created_at desc);
|
<filename>sql/2021/capabilities/fugu.sql
#standardSQL
CREATE TEMP FUNCTION getFuguAPIs(data STRING)
RETURNS ARRAY<STRING>
LANGUAGE js AS '''
const $ = JSON.parse(data);
return Object.keys($);
''';
SELECT
_TABLE_SUFFIX AS client,
fuguAPI,
COUNT(DISTINCT url) AS pages,
total,
COUNT(DISTINCT url) / total AS pct... |
EXEC DBMS_MONITOR.SESSION_TRACE_ENABLE(binds=>TRUE, waits=>TRUE);
ALTER SESSION SET EVENTS '10051 trace name context forever, level 1';
ORADEBUG SETMYPID
ORADEBUG TRACEFILE_NAME
-- ORA-10079: trace data sent/received via SQL*Net
ORADEBUG EVENT 10079 TRACE NAME CONTEXT FOREVER, LEVEL 1;
-- looks like this event disable... |
<reponame>lchx1010/pxf<filename>regression/sql/FDW_WritableSmokeTest.sql
-- FDW test
CREATE SERVER writable_smoke_test_hdfs
FOREIGN DATA WRAPPER {{ HCFS_PROTOCOL }}_pxf_fdw
OPTIONS (config '{{ SERVER_CONFIG }}');
CREATE USER MAPPING FOR CURRENT_USER SERVER writable_smoke_test_hdfs;
CREATE FOREIGN TABLE writable_smoke... |
USE ClubcDb;
CREATE TABLE tblClubcUserClass
(
Class int NOT NULL PRIMARY KEY,
Descript nvarchar(50) NOT NULL UNIQUE
);
CREATE TABLE tblClubcUsers
(
ID nvarchar(50) NOT NULL PRIMARY KEY,
Pass nvarchar(50) NOT NULL,
Class nvarchar(50) NOT NULL REFERENCES tblClubcUserClass(Descript),
Nickname nvarchar(50) NOT NULL... |
<filename>sql/_03_object_oriented/_02_collection_type/_005_object_type/cases/1002.sql
--+ holdcas on;
-- [er]create a class with udt to set and insert data to this calss using a attribute to be defined
set system parameters 'create_table_reuseoid=no';
create class t1(
id int not null,
a multiset(varchar(10)),
b set(va... |
# --- !Ups
ALTER TABLE APPOINTMENT DROP COLUMN subject;
ALTER TABLE APPOINTMENT_VERSION DROP COLUMN subject;
# --- !Downs
ALTER TABLE APPOINTMENT ADD COLUMN subject varchar(200);
ALTER TABLE APPOINTMENT_VERSION ADD COLUMN subject varchar(200); |
ALTER TABLE [Account]
DROP CONSTRAINT FK_Account_Role;
ALTER TABLE [Account]
DROP COLUMN [RoleId]; |
<reponame>lucscodenstuff/CatMAsh
IF EXISTS (SELECT * FROM sys.objects WHERE type = 'P' AND name = 'GetTotalWeight')
DROP PROCEDURE GetTotalWeight
GO
CREATE PROCEDURE GetTotalWeight
as
BEGIN
SET NOCOUNT ON
SELECT DISTINCT SUM(c.ProbabilityWeight) as totalWeight
FROM Cats c
JOIN CatsFurs cf on c.ID = cf.CatId
JOIN FurT... |
<reponame>jmcnamara44/HairSalon
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: May 05, 2018 at 12:05 AM
-- Server version: 5.6.34-log
-- PHP Version: 7.1.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone... |
<reponame>tihomirmagdic/aqm-api
insert into airq.regiontypes
(${values:name})
values(${values:csv})
${returning:raw} |
<filename>MySQL/Exams/21.10.2018/14.Extract_the_less_popular_job.sql
SELECT
tc.job_during_journey
FROM travel_cards AS tc
JOIN journeys AS j
ON tc.journey_id = j.id
WHERE j.id = (
SELECT jor.id
FROM journeys AS jor
ORDER BY DATEDIFF(jor.journey_end, jor.journey_start) DESC
LIMIT 1
)
GROUP BY tc.job_during... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 28, 2020 at 03:18 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
--
-- 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.apache.org/licenses/LICENSE-2.0
--
-- Unles... |
ALTER TYPE currency_type ADD VALUE 'Delirium Orb';
ALTER TYPE map_fragment_type ADD VALUE 'Simulacrum';
ALTER TYPE item_type ADD VALUE 'Cluster Jewel'; |
<reponame>razuhmd/janitor<filename>src/config/db/shop_cart_items.sql
CREATE TABLE `SITE_DB`.`shop_cart_items` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`cart_id` int(11) NOT NULL,
`item_id` int(11) NOT NULL,
`quantity` int(11) NOT NULL,
`custom_name` varchar(100) DEFAULT NULL,
`custom_price` int(11) DEFAUL... |
alter table "public"."game_session" drop constraint "game_session_closest_guesser_id_fkey";
|
<gh_stars>0
-- migrate:up
create table users (
id integer,
name text,
email text not null
);
-- migrate:down
drop table users;
|
with a as (
select "LoanPartId"
, "PrincipalRemaining"
, "LoanStatusCode"
, "Interest"
from "MyInvestmentItem"
)
,
b as (
select
"LoanPartId"
, "AdditionDateTime"
, "Interest"
from "Investments"
)
,
c as (
select
a.*
, b."AdditionDateTime"
from
a
... |
set define off
set verify off
set serveroutput on size 1000000
set feedback off
WHENEVER SQLERROR EXIT SQL.SQLCODE ROLLBACK
begin wwv_flow.g_import_in_progress := true; end;
/
-- AAAA PPPPP EEEEEE XX XX
-- AA AA PP PP EE XX XX
-- AA AA PP PP EE XX XX
-- ... |
-- View: camdecmpswks.vw_location_reporting_frequency
-- DROP VIEW camdecmpswks.vw_location_reporting_frequency;
CREATE OR REPLACE VIEW camdecmpswks.vw_location_reporting_frequency
AS
SELECT rf.mon_plan_rf_id,
ml.oris_code,
ml.location_identifier,
ml.mon_loc_id,
ml.fac_id,
mp.mon_plan_id,
rf... |
<reponame>abcghy/GraduteDesign<filename>test.sql<gh_stars>1-10
drop database test;
create database test;
use test;
create table user (
id INT(20) primary key auto_increment,
email varchar(50) not null unique,
password varchar(20) not null,
nickname varchar(20) not null,
phone varchar(12),
rate T... |
<reponame>Manukumar1/DVD-Rental-System
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 29, 2017 at 04:01 PM
-- Server version: 10.1.25-MariaDB
-- PHP Version: 5.6.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET t... |
-- IFS-5676 add new timestamp for mark as complete
ALTER TABLE question_status ADD COLUMN marked_as_complete_on DATETIME; |
<reponame>aliostad/deep-learning-lang-detection
-- --------------------------------------------------------
--
-- Create a views for legacy tables
--
CREATE VIEW `associations` AS SELECT * FROM `languages_associations`;
CREATE VIEW `template_styles` AS SELECT * FROM `templates`;
CREATE VIEW `viewlevels` AS SELECT * F... |
<reponame>ibrahimozekici/app-server2
-- +migrate Up
alter table device
add column dr smallint;
-- +migrate Down
alter table device
drop column dr;
|
<filename>Scripts/Save_Error_Log_To_Table.sql
/*
Original link: https://sqlstudies.com/2018/05/31/updated-query-to-view-data-in-the-error-log/
Author: <NAME>
*/
IF OBJECT_ID(N'tempdb..#LogInfo', 'U') IS NOT NULL DROP TABLE #LogInfo;
DECLARE @searchstring1 nvarchar(500) = '';
DECLARE @searchstring2 nvarchar(50... |
-- file:join.sql ln:28 expect:true
INSERT INTO J1_TBL VALUES (NULL, 0, 'zero')
|
<filename>2020-S2/psets/2019/pset7/movies/12.sql
SELECT movies.title FROM people
JOIN stars ON people.id = stars.person_id
JOIN movies ON stars.movie_id = movies.id
WHERE people.name = "<NAME>" AND movies.title IN(
SELECT movies.title FROM people
JOIN stars ON people.id = stars.person_id
JOIN movies ON stars.movie_id =... |
<filename>sql/memoryTables.sql
/* Shiftsk Memory Tables
*
*/
BEGIN;
CREATE TABLE IF NOT EXISTS "mem_accounts"(
"username" VARCHAR(20),
"isDelegate" SMALLINT DEFAULT 0,
"u_isDelegate" SMALLINT DEFAULT 0,
"secondSignature" SMALLINT DEFAULT 0,
"u_secondSignature" SMALLINT DEFAULT 0,
"u_username" VARCHAR(20... |
USE employees;
INSERT into department
(id, name)
VALUES
(1,"Sales"),
(2,"Engineering"),
(3,"Finance"),
(4,"Legal");
INSERT into role
(id, title, salary, department_id)
VALUES
(1,"Sales Lead", 100000, 1),
(2,"Salesperson", 70000, 1),
(3,"Lead Engineer", 150000, 2),
(4,"Software ... |
-- 2019-01-24T06:17:59.295
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Window SET InternalName='MSV3_Server_Product_Category',Updated=TO_TIMESTAMP('2019-01-24 06:17:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Window_ID=540425
;
-- 2019-01-24T06:18:36.707
-- I forgot to set the D... |
--
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
--
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:
--
CREATE EXTENSION IF NOT EXISTS plpgs... |
<reponame>abelli85/meterEff
-- set serveroutput on
-- transfer data from szcc-oracle to jdzx-oracle
/*
drop index uidx_data_device_data;
/
create unique index uidx_data_device_data on szv_data (devicecode, pipe, postdatetodate);
/
*/
desc szcc_jk.v_meterinfo@szcclnk;
-- 远传大表, 19000+
select count(distinct deviceco... |
<reponame>nasim-aust/Mysql-Project-using-java-_University
-- MySQL dump 10.13 Distrib 5.7.18, for Win64 (x86_64)
--
-- Host: localhost Database: university
-- ------------------------------------------------------
-- Server version 5.7.18-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.