sql stringlengths 6 1.05M |
|---|
<gh_stars>0
SELECT FirstName,
LastName,
City,
STATE
FROM Person Person
LEFT JOIN Address Address ON Address.PersonId = Person.PersonId |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Author: danf
* Created: Feb 22, 2018
*/
DELETE FROM assets WHERE name LIKE 'places_%';
|
CREATE TABLE [dbo].[FlatNotes] (
[Other] NVARCHAR (MAX) NULL,
[FlatTypeId] INT NOT NULL,
[Id] INT IDENTITY (1, 1) NOT NULL,
[Date] DATETIME NOT NULL,
[Text] NVARCHAR (MAX) NOT NULL,
[GenotypeId] INT NOT NULL,
CONSTRAINT [PK_Fla... |
<gh_stars>1-10
DROP OWNED BY supabase_auth_admin;
DROP USER supabase_auth_admin; |
<filename>queries/MySQL/schema_optimization.sql<gh_stars>1-10
/***
* ____ __ ____ _ _ _ _ _
* | _ \ / _| / __ \ | | (_) (_) | | (_)
* | |_) | ___| |_ ___ _ __ ___ | | | |_ __ | |_ _... |
<filename>dolly-backend-app/src/main/resources/db/migration/V1.0.0__CreateTables.sql
-------------------------------
-- C R E A T E T A B L E S --
-------------------------------
create table bruker
(
id integer primary key,
bruker_id varchar(50) unique,
brukernavn varchar(100),
epost v... |
<gh_stars>10-100
-- file:alter_generic.sql ln:230 expect:true
CREATE OPERATOR FAMILY alt_opf2 USING hash
|
<reponame>flexsocialbox/una
SET @sName = 'bx_payment';
-- PROVIDERS
UPDATE `bx_payment_providers_options` SET `check_type`='EmailOrEmpty', `check_error`='_sys_form_account_input_email_error' WHERE `name`='strp_cancellation_email';
|
<reponame>gpipperr/OraPowerShell
--==============================================================================
-- GPI - <NAME>
-- Desc: get the status of the last backup in the database
--==============================================================================
set linesize 130 pagesize 300
column input... |
<reponame>dram/metasfresh
-- 2018-10-31T14:06:33.183
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Column (AD_Reference_ID,FieldLength,Version,IsKey,IsParent,IsTranslated,IsIdentifier,SeqNo,AD_Client_ID,IsActive,Created,CreatedBy,IsUpdateable,DDL_NoForeignKey,IsSelectionColumn,IsSync... |
<gh_stars>1-10
UPDATE creature_template SET ScriptName='boss_eck' WHERE entry=29932;
|
<reponame>DoubleLForce5/Employee_Tracker<filename>db/schema.sql
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
DROP DATABASE IF EXISTS employee_trackerDB;
CREATE DATABASE employee_trackerDB;
USE employee_trackerDB;
CREATE TABLE department (
id INT NOT NULL AUTO_INCREMENT,
nam... |
<gh_stars>1-10
CREATE TABLE cm_file(
fileid int identity(1,1) NOT NULL CONSTRAINT PK_cm_file1 PRIMARY KEY,
sectionid int NOT NULL,
publisherid int NOT NULL,
filepath varchar(255) NOT NULL,
title varchar(100) NULL,
filesize int NOT NULL,
nrofdownloads int NOT NULL,
contenttype varchar(50) NOT NULL,
datepublis... |
<filename>3/data.sql<gh_stars>0
--
-- Database: `sqlite.db`
--
-- --------------------------------------------------------
--
-- Table structure for table `tree_data`
--
CREATE TABLE IF NOT EXISTS `tree_data` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`nm` varchar(255) NOT NULL
);
--
-- Dumping data for table `t... |
<filename>gears/tables.users.sql
CREATE TABLE `users` (
`id` VARCHAR(255) NOT NULL,
`email` VARCHAR(255) DEFAULT NULL,
`password` VARCHAR(255) DEFAULT NULL,
`salt` VARCHAR(255) DEFAULT NULL,
`name` VARCHAR(255) DEFAULT NULL,
`avatar` V... |
SELECT c.`customer_id`, CONCAT(c.`first_name`, ' ', c.`last_name`) AS 'full_name', c.`gender`
FROM `customers` AS c
ORDER BY `full_name`, c.`customer_id`; |
<filename>src/test/resources/subject/after-test.sql<gh_stars>0
-- noinspection SqlResolveForFile
delete from assessed_episode where true;
delete from subject where true;
delete from assessment where true;
|
ALTER TABLE dbo.PhoneNumber ADD CONSTRAINT PK_C_PhoneNumber PRIMARY KEY CLUSTERED (PhoneNumberId)
GO
|
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.9.7
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Waktu pembuatan: 04 Okt 2021 pada 21.39
-- Versi server: 10.3.31-MariaDB
-- Versi PHP: 7.3.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40... |
<filename>database/views/mayor_compra_view.sql<gh_stars>0
INSERT INTO `mayor_compra_view` VALUES ('ERNSH', '<NAME>', 'Guaraná Fantástica', 248);
INSERT INTO `mayor_compra_view` VALUES ('SAVEA', 'Save-a-lot Markets', 'Konbu', 248);
INSERT INTO `mayor_compra_view` VALUES ('QUICK', 'QUICK-Stop', '<NAME>', 243);
INSERT INT... |
<filename>jcf-showcase/src/META-INF/db-script/hsql-sample-db-script.sql
DROP TABLE TN_SAMPLE IF EXISTS;
CREATE TABLE TN_SAMPLE (
NOTI_NO VARCHAR(10) PRIMARY KEY,
TITLE VARCHAR(30),
CONTENT VARCHAR(100),
USER_ID VARCHAR(10),
REG_DAY VARCHAR(8),
REG_TIME VARCHAR(8),
USE_FLAG VARCHAR(1),
CNT INTEGER
);
INSERT IN... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Tempo de geração: 06-Abr-2021 às 18:44
-- Versão do servidor: 5.7.31
-- versão do PHP: 7.3.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
<reponame>SebastianPegoraro/PythonPractice
/*Lista las asignaturas del tipo "optativa".*/
select * from asignatura where tipo = 'optativa'
/*Lista los nombres de Departamento de la Universidad.*/
select nombre from departamento
/*Listar apellidos y nombre de las Personas, convirtiendo ambos elementos a mayúsculas*/
sel... |
<reponame>matigo/streams
INSERT INTO `SiteContact` (`site_id`, `name`, `subject`, `mail`, `message`, `nonce_match`, `nonce`, `agent`, `from_ip`)
SELECT tmp.`site_id`, tmp.`name`, tmp.`subject`, tmp.`mail`, tmp.`message`,
tmp.`nonce_match`, tmp.`nonce`, tmp.`agent`, tmp.`from_ip`
FROM (SELECT si.`id` as `site_i... |
<filename>data/open-source/extracted_sql/alibaba_cobarclient.sql
CREATE TABLE IF NOT EXISTS offers( id BIGINT(20) AUTO_INCREMENT PRIMARY KEY, memberId VARCHAR(32), subject VARCHAR(512), gmtUpdated TIMESTAMP default CURRENT_TIMESTAMP())
SELECT memberId FROM offers where id=
select name from followers where name='fname'
... |
DROP TABLE IF EXISTS nacionalnost CASCADE;
DROP TABLE IF EXISTS liga CASCADE;
DROP TABLE IF EXISTS tim CASCADE;
DROP TABLE IF EXISTS igrac CASCADE;
DROP SEQUENCE IF EXISTS nacionalnost_seq;
DROP SEQUENCE IF EXISTS liga_seq;
DROP SEQUENCE IF EXISTS tim_seq;
DROP SEQUENCE IF EXISTS igrac_seq;
CREATE TABLE nacionalnost ... |
-- file:functional_deps.sql ln:38 expect:true
SELECT id, keywords, title, body, created
FROM articles
GROUP BY keywords
|
<reponame>hdimitrieski/e-shop
create table rating
(
id uuid not null,
rating integer,
catalog_item_id uuid not null
);
|
CREATE ROLE client_test_application WITH LOGIN PASSWORD '<PASSWORD>';
DROP DATABASE IF EXISTS client_test;
CREATE DATABASE client_test;
GRANT ALL PRIVILEGES ON DATABASE client_test TO client_test_application;
\c client_test;
CREATE EXTENSION IF NOT EXISTS "uuid-ossp" SCHEMA pg_catalog;
CREATE EXTENSION IF NOT EXISTS "... |
<reponame>russell-esastar/ESA-Star
use esa;
drop table if exists phone;
create table phone
(
phone_id bigint NOT NULL AUTO_INCREMENT,
phone_num varchar(30) not null,
phone_raw varchar(50) null,
country varchar(2) null,
text_messaging varchar(1) null,
verified varchar(1) not null default '0',
date_verified... |
<gh_stars>0
INSERT INTO book (id, title) VALUES (11, "The Pragmatic Programmer");
INSERT INTO member (id, name) VALUES (43, "<NAME>");
INSERT INTO checkout_item (member_id, book_id) VALUES (43, 11);
SELECT member.name FROM book, checkout_item, member WHERE book.id = checkout_item.book_id AND member.id = checkout_item.m... |
CREATE SCHEMA [EntityCode]
AUTHORIZATION [dbo];
|
-- 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.
USE generate
IF NOT EXISTS (SELECT 1 FROM INFORMA... |
CREATE OR REPLACE FUNCTION ado.default_stamp_fn()
RETURNS trigger AS
$BODY$
DECLARE
BEGIN
-- you may wish to replace "session_user()" with "current_user()" or a custom function depending on
-- your permission model
-- we truncate timestamps to the second because many clients and front end software can't ... |
create table user_sq (
next_val bigint(10) not null,
primary key (next_val)
);
insert into user_sq (next_val) values (1);
create table user (
id bigint(10) not null,
login varchar(100) not null,
email varchar(100) not null,
password varchar(100) not null,
password_force_change int(1) not null,
... |
set session time_zone='+00:00';
drop table if exists onlineddl_test;
create table onlineddl_test (
id int auto_increment,
create_time timestamp NULL DEFAULT '0000-00-00 00:00:00',
update_time timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
counter int(10) unsigned DEFAULT NULL,
primary ... |
<filename>src/test/tinc/tincrepo/mpp/gpdb/tests/storage/access_methods/appendonly_checksum/sql_scenario/count_chksum_on_corrupt_header_large_co.sql<gh_stars>0
-- start_ignore
SET gp_create_table_random_default_distribution=off;
-- end_ignore
-- Large Content Header
select count(*) from chksum_on_corrupt_header_large_co... |
--
-- Copyright (c) 2011-2013 University of Texas at Austin. All rights reserved.
--
-- $COPYRIGHT$
--
-- Additional copyrights may follow
--
-- This file is part of PerfExpert.
--
-- PerfExpert is free software: you can redistribute it and/or modify it under
-- the terms of the The University of Texas at Austin Resea... |
<gh_stars>0
# --- !Ups
ALTER TABLE reasonable_adjustment_version RENAME COLUMN version_timetsamp_utc TO version_timestamp_utc;
# --- !Downs
ALTER TABLE reasonable_adjustment_version RENAME COLUMN version_timestamp_utc TO version_timetsamp_utc;
|
SELECT AvgBefore1980-AvgAfter1980
FROM
(
SELECT avg(AvgsStars) AS AvgBefore1980
FROM (
SELECT avg(stars) AS AvgsStars
FROM Rating, Movie
WHERE Rating.mID = Movie.mID AND Movie.year < 1980
GROUP BY Rating.mID
)
),
(
SELECT avg(AvgsStars) AS AvgAfter1980
FROM (
... |
<gh_stars>0
LOAD DATA INFILE 'your_file'
INTO TABLE employee
FIELDS ENCLOSED BY '\"' TERMINATED BY ','
;
|
INSERT INTO category (ID,Title,URL) VALUES (1,'Fitna','fitna');
INSERT INTO category (ID,Title,URL) VALUES (2,'<NAME>','tony-takitani');
INSERT INTO category (ID,Title,URL) VALUES (3,'Attila (Attila the Hun)','attila-attila-the-hun');
INSERT INTO category (ID,Title,URL) VALUES (4,'One Day','one-day');
INSERT INTO categ... |
/* CURSO SQL SOFTBLUE */
CREATE DATABASE curso_sql;
USE curso_sql;
CREATE TABLE funcionarios
(
id int unsigned not null auto_increment,
nome varchar(45) not null,
salario double not null default '0',
departamento varchar(45) not null,
PRIMARY KEY (id)
);
create table CURSOS (
id int unsigned not... |
<filename>saved_local_backent_2019-02-22.sql
--
-- PostgreSQL database dump
--
-- Dumped from database version 10.6 (Ubuntu 10.6-0ubuntu0.18.04.1)
-- Dumped by pg_dump version 10.6 (Ubuntu 10.6-0ubuntu0.18.04.1)
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_e... |
-- bulk update, so disable trigger
alter table osm_roads disable trigger all;
select kartoza_evaluate_road_score();
select kartoza_evaluate_road_admin();
-- reenable trigger
alter table osm_roads enable trigger all;
-- trigger database update to check trigger executions
update osm_roads set id = id
where id in (
s... |
<filename>src/main/sql/medium/ProjectEmployeesIII_1077.sql
-- #Table: Project
-- #
-- #
-- #+-------------+---------+
-- #| Column Name | Type |
-- #+-------------+---------+
-- #| project_id | int |
-- #| employee_id | int |
-- #+-------------+---------+
-- #(project_id, employee_id) is the primary key of... |
<reponame>chriskid824/MVC
CREATE TABLE [dbo].[Role] (
[Id] INT IDENTITY (1, 1) NOT NULL,
[Name] VARCHAR (256) NOT NULL,
[Description] VARCHAR (256) NULL,
[Is_Enabled] BIT NOT NULL,
[Created_By] INT NOT NULL,
[Created_Date] DATETIME NOT N... |
<gh_stars>1-10
/*
Use subquery for min timestamp based on this article.
https://www.xaprb.com/blog/2006/12/07/how-to-select-the-firstleastmax-row-per-group-in-sql/
*/
/*
inner part of next query
*/
SELECT id, topic, DATE(timestamp), MIN(timestamp) AS min_timestamp
FROM Trend
GROUP BY topic, DATE(timestamp);
SE... |
<filename>src/cli/bundled/sql/ProductSet.sql
CREATE TABLE product_set (
id String,
auto_creation_url Nullable(String),
filter Nullable(String),
name Nullable(String),
product_count Nullable(Int64)
)
ENGINE = Log
|
-- tkt-94c04eaadb.test
--
-- execsql { CREATE TABLE t1(a, b) }
CREATE TABLE t1(a, b) |
<reponame>yemrekeskin/sql-lessons
CREATE DATABASE PIVOT_DB
USE PIVOT_DB
CREATE TABLE tblSatis(
ID int identity(1,1),
MUSTERI varchar(50),
SATILAN_URUN varchar(50),
TUTAR int,
AY varchar(30)
)
insert into tblSatis
values('Nida', 'Telefon', 900, 'Ocak')
insert into tblSatis
values('Turabi', 'Buzdolabı', 1200, 'Mar... |
<gh_stars>1000+
-- 2018-04-27T11:34:25.072
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
DELETE FROM AD_Process_Trl WHERE AD_Process_ID=540396
;
-- 2018-04-27T11:34:25.080
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
DELETE FROM AD_Process WHERE AD_Process_ID=540396
;
-- 2018... |
-- 01.10.2015 12:29
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Process_Para SET AD_Element_ID=541830, ColumnName='PaymentDate', Description=NULL, Help=NULL, Name='Zahldatum',Updated=TO_TIMESTAMP('2015-10-01 12:29:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=540783... |
CREATE TABLE [dbo].[VF_DATA_PROVIDER] (
[DATA_PROVIDER_ID] INT NOT NULL,
[DATA_PROVIDER_Name] VARCHAR (350) NOT NULL,
CONSTRAINT [PK_VF_DATA_PRVIDER] PRIMARY KEY CLUSTERED ([DATA_PROVIDER_ID] ASC)
);
|
INSERT INTO `guns`.`sys_menu` (`id`, `code`, `pcode`, `pcodes`, `name`, `icon`, `url`, `num`, `levels`, `ismenu`, `tips`, `status`, `isopen`) VALUES ('1075949305505751042', 'billingDetail', '0', '[0],', '账单明细', '', '/billingDetail', '99', '1', '1', NULL, '1', '0');
INSERT INTO `guns`.`sys_menu` (`id`, `code`, `pcode`, ... |
<gh_stars>0
CREATE TABLE `delay_task`
(
`id` int not null primary key auto_increment,
`name` varchar(50) NOT NULL DEFAULT '' COMMENT '任务名:任务的名称,与执行任务的方法对应,用于执行任务时寻找执行任务的方法',
`info` varchar(512) NOT NULL DEFAULT '' COMMENT '任务信息:放置执行任务所需的参数信息',
`description` ... |
update pipeline_couplings set required_status_checks = $2, updated=now() where pipeline_coupling = $1 and deleted = false |
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SE... |
ALTER TABLE proxy_endpoints ADD COLUMN type TEXT NOT NULL DEFAULT '';
ALTER TABLE proxy_endpoints DROP CONSTRAINT proxy_endpoints_api_id_name_key;
ALTER TABLE proxy_endpoints ADD UNIQUE("api_id", "type", "name");
UPDATE proxy_endpoints SET type='http';
|
<filename>kylin-it/src/test/resources/query/sql_tableau/query09.sql
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- t... |
-- MariaDB dump 10.17 Distrib 10.4.13-MariaDB, for Linux (x86_64)
--
-- Host: localhost Database: controlServicios
-- ------------------------------------------------------
-- Server version 10.4.13-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@... |
-- phpMyAdmin SQL Dump
-- version 4.4.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jan 08, 2016 at 12:31 PM
-- 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_S... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3306
-- Время создания: Сен 01 2018 г., 07:41
-- Версия сервера: 5.7.20
-- Версия PHP: 7.2.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @... |
-- @testpoint:opengauss关键字nologin(非保留),作为视图名
--关键字explain作为视图名,不带引号,创建成功
CREATE or replace VIEW nologin AS
SELECT * FROM pg_tablespace WHERE spcname = 'pg_default';
drop view nologin;
--关键字explain作为视图名,加双引号,创建成功
CREATE or replace VIEW "nologin" AS
SELECT * FROM pg_tablespace WHERE spcname = 'pg_default';
drop VIEW... |
<filename>sql/Del primer entregable/PRUEBAS_LUZ/cuerpo pruebas luz.sql
CREATE OR REPLACE
PACKAGE BODY PRUEBAS_LUZ AS
PROCEDURE inicializar AS
BEGIN
DELETE FROM LUZ;
END inicializar;
PROCEDURE insertar (nombre_prueba VARCHAR2, w_fecha_gasto DATE, w_coste NUMBER, w_proximo_cobro date, w_gasto_kwh NUMBER, salidaEsper... |
/* BREAK & CONTINUE */
DECLARE @Counter INT;
SET @Counter = 1;
WHILE (@Counter <= 10)
BEGIN
PRINT @Counter;
SET @Counter = @Counter + 1;
CONTINUE;
IF (@Counter = 4)
BEGIN
BREAK;
END
END |
-- Create Function String
CREATE FUNCTION [dspUtil].[StringTable_Text] (@Name TSTRING)
RETURNS TSTRING
AS
BEGIN
DECLARE @Text_En TSTRING;
SELECT @Text_En = ST.Text_en
FROM dbo.StringTable AS ST
WHERE ST.StringTableName = @Name;
RETURN dspUtil.String_ReplaceEnter(@Text_En);
END; |
--
-- Creating a sample table.
--
--
-- Table Book
--
DROP TABLE IF EXISTS Comm;
CREATE TABLE Comm (
"id" INTEGER PRIMARY KEY NOT NULL,
"userid" TEXT NOT NULL,
"email" TEXT NOT NULL,
"title" TEXT NOT NULL,
"comment" TEXT NOT NULL,
"parentid" TEXT,
"created" TIMESTAMP,
"updated" DATETI... |
<reponame>trigyn-products/jquiver
ALTER TABLE jq_file_upload
ADD file_config_id VARCHAR(50) NOT NULL; |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 13-11-2016 a las 22:34:09
-- Versión del servidor: 10.1.16-MariaDB
-- Versión de PHP: 5.6.24
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT... |
<filename>data/db/264-item.sql
ALTER TABLE `post`
ADD COLUMN `item_id` INT UNSIGNED NULL AFTER `uid`,
ADD INDEX `fk_post_3_idx` (`item_id` ASC);
ALTER TABLE `post`
ADD CONSTRAINT `fk_post_3`
FOREIGN KEY (`item_id`)
REFERENCES `item` (`id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION;
ALTER TABLE `item`
ADD COLU... |
<reponame>talhahussaini/CodeIgn
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 04, 2019 at 06:44 PM
-- Server version: 10.3.16-MariaDB
-- PHP Version: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zo... |
<filename>cendana.sql
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 08, 2021 at 06:58 PM
-- Server version: 10.4.20-MariaDB
-- PHP Version: 7.4.22
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @... |
<reponame>MinisterioPublicoRJ/api-cadg<filename>dominio/documentos/queries/dados_assunto.sql<gh_stars>1-10
SELECT
pena.nome_delito,
pena.artigo_lei,
pena.max_pena,
pena.multiplicador
FROM {schema_aux}.tb_penas_assuntos pena
JOIN {schema}.mcpr_assunto_documento asdo ON pena.id = asdo.asdo_assu_dk
WHERE asdo.asdo_doc... |
alter table exames alter column id_hospital type text;
alter table pacientes alter column id_hospital type text;
alter table desfechos alter column id_hospital type text;
update desfechos set id_hospital = 'HCFMUSP' where id_hospital = '0';
UPDATE desfechos set id_hospital = 'HSL' where id_hospital = '1';
update pa... |
-- file:numeric_big.sql ln:511 expect:true
VACUUM ANALYZE num_exp_add
|
<gh_stars>1-10
select round_id, player_id, zigging_or_zagging_predicate, min(tick_id) as start_tick, max(tick_id) as end_tick,
bit_or(strafe_right) + bit_or(strafe_left) as zig_and_zag, count(*) as zig_zag_length
from (
select *, sum(case when not (forward and (strafe_left xor strafe_right)) then 0 else... |
<filename>verify/unregistered_email_resets.sql
-- Verify postgraphile_user_system:unregistered_email_resets on pg
BEGIN;
SET search_path TO app_private,public;
SELECT email, attempts, latest_attempt
FROM unregistered_email_password_resets
WHERE FALSE;
ROLLBACK;
|
<reponame>vegetweb/warehouse-docker
CREATE OR REPLACE VIEW list_sample_images AS
SELECT si.id, si.sample_id, si.path, si.caption, si.created_on,
si.created_by_id, si.updated_on, si.updated_by_id, si.deleted,
su.website_id
FROM sample_images si
JOIN samples s ON s.id = si.sample_id AND s.deleted = fals... |
# --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table feedback (
name VARCHAR(255),
email VARCHAR(255),
subject varchar(255),
message VARCHAR(255),
);
create sequence fe... |
<gh_stars>1-10
insert into event_map(event_up_name, event_down_name) values('HA_VM_RESTART_FAILED', '');
insert into event_map(event_up_name, event_down_name) values('HA_VM_FAILED', '');
|
<gh_stars>0
------
-- Test for AvroParser user defined parser
------
create table t (f1 varchar,
f2 date,
f3 varchar,
f4 varchar,
f5 varchar,
f6 varchar,
f7 varchar,
f8 varchar,
f9 varchar,
f10 varchar,
f11 varchar,
f12 varchar,
f13 va... |
-- drop existing member(user) from group other
autocommit off;
call login('dba','') on class db_user;
create USER user1;
create USER user2 groups user1;
call find_user ('user1') on class db_user to admin;
call drop_member('user2') ON admin;
DROP user user1;
DROP user user2;
rollback;
autocommit on;
|
<filename>db-design/lab2/task2-2.sql<gh_stars>0
INSERT INTO train.train
VALUES
( 1, '2020-5-1', 'exp1', '100', '10', '2020-5-1 01:53:55', '2020-5-1 11:53:55' ),
( 2, '2020-5-2', 'exp2', '200', '20', '2020-5-2 02:53:55', '2020-5-2 12:53:55' ),
( 3, '2020-5-3', 'exp3', '300', '30', '2020-5-3 03:53:55', '2020-5-3 13:53... |
CREATE DATABASE IF NOT EXISTS `elib` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `elib`;
-- MySQL dump 10.13 Distrib 5.7.17, for Linux (x86_64)
--
-- Host: localhost Database: elib
-- ------------------------------------------------------
-- Server version 5.7.18-0ubuntu0.16.04.1
/*!40101 SET @OLD_CHARACTER_SET... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost
-- Tiempo de generación: 05-05-2021 a las 16:22:08
-- Versión del servidor: 8.0.21-0ubuntu0.20.04.4
-- Versión de PHP: 7.2.34-1+ubuntu20.04.1+deb.sury.org+1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET ti... |
<reponame>Xicodeman/wenaplaypro
# ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: imperiumcms.net (MySQL 5.5.5-10.3.20-MariaDB)
# Database: wenaplay
# Generation Time: 2019-11-18 12:30:17 +... |
<gh_stars>0
USE [SAI_Work2]
GO
/****** Object: Table [dbo].[ActionButton] Script Date: 11/27/2017 3:48:49 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[ActionButton](
[SysID] [bigint] NOT NULL,
[Description] [varchar](50) NULL,
[DocDate] [date] NULL,
... |
<filename>exercicio_5.sql
USE exercicio_2;
/*Selecione os nomes de todos os alunos que já fizeram alguma matrícula na Softblue, sem repetição*/
SELECT DISTINCT(a.aluno) FROM pedido p INNER JOIN aluno a ON p.aluno = a.codigo;
/*Exiba o nome do aluno mais antigo da Softblue*/
SELECT DISTINCT(a.aluno) FROM pedido p
INNE... |
<filename>scripts/install.sql
CREATE TABLE `users` (
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
`name` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL
);
INSERT INTO users
(`name`, `email`, `password`)
VALUES
('Andy', '<EMAIL>', MD5('a password')); |
USE `essentialmode`;
CREATE TABLE `whitelist` (
`identifier` varchar(60) NOT NULL,
PRIMARY KEY (`identifier`)
);
|
CREATE VIEW [dbo].[vwAliases]
AS
select LAG.LocalAuthorityGroupID AS 'AliasID',
LAG.CodeName AS 'AliasCodeName',
LAG.ShortName AS 'AliasShortName',
LAG.FullName AS 'AliasFullName',
LAG.[LocalAuthorityGroupTypeID] AS 'AliasTypeId',
LAG.[LocalAuthorityGroupPurposeID] AS 'AliasGroupPurposeId'
... |
SELECT YEAR(call_time) as year, MONTH(call_time) as month , 'ALL' as call_type, 'ALL' as network_type, COUNT(*) as total_records,
COUNT(DISTINCT TO_DATE(call_time)) as total_days, COUNT(DISTINCT uid) as unique_id, {imei} {imsi}
COUNT(DISTINCT cell_id) as unique_location_name FROM {provider_prefix}_consolidate_data_all... |
INSERT INTO Appointment VALUES
('A001','P001','D010','2017-01-11 09:30:00'),
('A002','P002','D009','2017-01-11 08:30:00'),
('A003','P003','D005','2017-01-12 10:30:00'),
('A004','P004','D005','2017-01-12 11:30:00'),
('A005','P005','D005','2017-01-13 12:30:00'),
('A006','P006','D007','2017-01-14 13:30:00'),
('A007','P0... |
<reponame>ricardolevi2005/livro-nodejs
CREATE DATABASE livro_nodejs;
\c livro_nodejs
CREATE TABLE patents (
id serial PRIMARY KEY,
name TEXT UNIQUE NOT NULL
);
CREATE TABLE divisions (
id serial PRIMARY KEY,
name TEXT UNIQUE NOT NULL
);
CREATE TABLE stormtroopers (
id serial PRIMARY KEY,
name TEXT NOT NULL,... |
-- enc2.test
--
-- execsql {
-- CREATE TABLE t5(a);
-- INSERT INTO t5 VALUES('sqlite');
-- }
CREATE TABLE t5(a);
INSERT INTO t5 VALUES('sqlite'); |
<reponame>Shuttl-Tech/antlr_psql
-- file:numeric_big.sql ln:426 expect:true
INSERT INTO num_exp_mul VALUES (9,7,'-44929599044588573810654775.83678007633232843418115790847152455559258007804727916986432256198687661496804050903769496933400455947645400628259699874770581538122521805603947464462448454681701547899144129061961... |
-- 2019-06-05T11:41:46.436
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsP... |
BEGIN TRANSACTION;
CREATE TRIGGER IF NOT EXISTS update_product_amount_on_restock_insert AFTER INSERT ON restock BEGIN
UPDATE products SET amount = products.amount + NEW.amount WHERE products.id = NEW.product;
END;
CREATE TRIGGER IF NOT EXISTS update_product_amount_on_restock_delete AFTER DELETE ON restock BEGIN
UPDA... |
<reponame>alexyekymov/cvdb<filename>config/populate_db.sql
INSERT INTO resume(uuid, full_name)
VALUES ('7de882da-02f2-4d16-8daa-60660aaf4071', 'Name1'),
('a97b3ac3-3817-4c3f-8a5f-178497311f1d', 'Name2'),
('dd0a70d1-5ed3-479a-b452-d5e04f21ca73', 'Name3');
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.