sql stringlengths 6 1.05M |
|---|
<gh_stars>0
--
-- Creating a User table.
--
--
-- Table User
--
DROP TABLE IF EXISTS User;
CREATE TABLE User (
"id" INTEGER PRIMARY KEY NOT NULL,
"acronym" TEXT UNIQUE NOT NULL,
"password" TEXT,
"email" TEXT,
"created" TIMESTAMP,
"updated" DATETIME,
"deleted" DATETIME,
"active" DATETI... |
create table TRADEREQUESTS (
REQUESTID varchar(50) PRIMARY KEY,
OFFEREDCOLLECTIONID varchar(100) not null
); |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 1192.168.3.11
-- Generation Time: Sep 22, 2021 at 07:55 AM
-- Server version: 10.4.21-MariaDB
-- PHP Version: 8.0.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_... |
<filename>Maio 2022/aula-12.sql
select * from gafanhotos
where nome like '%silva%';
select distinct carga from cursos order by carga;
select count(nome) from cursos where carga > 40;
select max(totaulas) from cursos where ano = 2016;
select nome, min(totaulas) from cursos where ano = 2016;
select sum(totaulas) fro... |
create database open_bible;
use open_bible;
create table users(
id integer not null primary key auto_increment,
email varchar(255),
password varchar(255)
);
create table chapters(
id integer not null primary key auto_increment,
title varchar(255)
);
create table verses(
id integer not null primary key au... |
-- -------------------------------------- organizations --------------------------------------------------
INSERT INTO organizations (id, name, tag, phone_number, address, description, created_at, updated_at) VALUES (1, 'Apple', 'APPLE', '0900000001', 'Cupertino, California, Mỹ', 'Apple Inc. là một tập đoàn công nghệ m... |
-- DDL section
create table crm.product (
id numeric primary key,
title varchar(255) character set utf8
);
-- DML section
insert into product
values (1, 'Product1');
select count(*) from crm.product;
select id as ProductID, title as ProductName
from crm.product where id = :id;
\set content `cat data.txt`
|
SET SERVEROUTPUT ON;
/*cursors with parameters*/
DECLARE
CURSOR c_emps (p_dept_id NUMBER)
IS
SELECT first_name,
last_name,
department_name
FROM employees
JOIN departments USING (department_id)
WHERE department_id = p_dept_id;
v_emps c_emps%rowtype;
BEGIN
OPEN c_emps(20);
FETCH c_e... |
create table users
(
id bigint generated by default as identity,
email varchar(255) not null,
username varchar(255) not null,
first_name varchar(255) not null,
last_name varchar(255) not null,
publicity integer not null,
password varchar(255) not null,
role_admin ... |
$tables = @('Table01','Table02','Table03')
$SqlInstance = 'ServerNameHere'
$DbName = 'DatabaseNameHere'
$tableObj = (Get-DbaDatabase -SqlInstance $SqlInstance -Database $DbName).tables | Where-Object Name -In $tables
$DbaDependency = $tableObj | Get-DbaDependency
#$DbaDependency | ogv
$DbaDependency | Write-DbaDbTabl... |
<filename>src/main/resources/db/test-datavarehus/V0.05__dvh_statistikk_sykefravar.sql
-- Aggregates statistikk tabeller fra datavarehus
-- Sykefravær
-- OBS: det er to rader per linje med stat (= arstall/kvartal/orgnr -sammen med sektor og næring- /alder/kjønn/fylkbo)
-- rad #1 har taptedv, mens muligedev og antpers ... |
<filename>aplikasi_user.sql
-- phpMyAdmin SQL Dump
-- version 4.2.7.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Dec 24, 2017 at 09:50 AM
-- 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_CLIE... |
<filename>hasura/migrations/default/1639553041723_alter_table_public_artworks_alter_column_held/up.sql
ALTER TABLE "public"."artworks" ALTER COLUMN "held" TYPE text;
|
RESTORE FILELISTONLY FROM DISK = '/backup/wwi.bak'
RESTORE DATABASE WideWorldImporters FROM DISK = '/backup/wwi.bak'
WITH
MOVE 'WWI_Primary' TO '/var/opt/mssql/data/WideWorldImporters.mdf',
MOVE 'WWI_UserData' TO '/var/opt/mssql/data/WideWorldImporters_UserData.ndf',
MOVE 'WWI_Log' TO '/var/opt/mssq... |
insert into documents(url,title,publication_date,modified_date,author,publisher,affected_donors,affected_donees,document_scope,cause_area,notes) values
('https://forum.effectivealtruism.org/posts/wYaSxg4uGFLz4kJ6d/announcing-effective-altruism-grants','Announcing Effective Altruism Grants','2017-06-09',NULL,'<NAME>',... |
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50553
Source Host : 127.0.0.1:3306
Source Database : DepStore
Target Server Type : MYSQL
Target Server Version : 50553
File Encoding : 65001
Date: 2017-09-16 19:00:31
*/
SET FOREIGN_KEY_CHECKS=0;
-- ... |
/*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 80016
Source Host : localhost:3306
Source Schema : literature
Target Server Type : MySQL
Target Server Version : 80016
File Encoding : 65001
Date: 19/10/2021... |
select count(*) from no_nulls where rowid > 100
0
|
ALTER TABLE codebases ADD COLUMN last_used_workspace TEXT;
|
ALTER TABLE snapshots
DROP COLUMN action; |
CREATE SEQUENCE public.host_group_id_seq;
CREATE TABLE public.host_group (
host_group_id INTEGER NOT NULL DEFAULT nextval('public.host_group_id_seq'),
name VARCHAR NOT NULL,
CONSTRAINT p_hostgroup PRIMARY KEY (host_group_id)
);
ALTER SEQUENCE public.host_group_id_seq ... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Feb 09, 2018 at 06:52 AM
-- Server version: 10.1.19-MariaDB
-- PHP Version: 7.0.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... |
CREATE LOGIN login_AvailabilityGroup
WITH PASSWORD = '<PASSWORD>';
GO
CREATE USER login_AvailabilityGroup
FOR LOGIN login_AvailabilityGroup
GO
CREATE CERTIFICATE SQLAO1_cert
AUTHORIZATION login_AvailabilityGroup
FROM FILE='c:\TempDSCAssets\SQLAO1_cert.cert'
WITH PRIVATE KEY(FILE='c:\TempDSCA... |
<reponame>mrzechowicz/Projekt70762<filename>vsProjekt70762/vsProjekt70762/rapOp/Views/vBrandOrders.sql
CREATE VIEW [rapOP].[vBrandOrders] AS
SELECT B.Bra_Name as Brand, COUNT(O.Ord_Id) NumberOfSoldCars, SUM(O.Ord_SellPRice) as TotalSales
From Brand B WITH (NOLOCK) join [model] M WITH (NOLOCK) on B.Bra_id=M.Mod_BraId
... |
/*
SQLyog Ultimate v12.09 (64 bit)
MySQL - 10.4.17-MariaDB-log : Database - db_sistem_krs
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD... |
<reponame>githubdev99/fixit<filename>database/db_fixit.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 1172.16.31.10
-- Waktu pembuatan: 15 Des 2020 pada 21.15
-- Versi server: 10.4.17-MariaDB
-- Versi PHP: 7.4.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTI... |
<filename>public_html/Survey/structure/QuestionTable.sql
CREATE TABLE Questions(id int not null,survey_id int not null,question text,PRIMARY KEY (id),FOREIGN KEY(survey_id) REFERENCES Survey(id)); |
DROP TABLE IF EXISTS `ProtoItem`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/* Some description for the table : ProtoItem */
CREATE TABLE `ProtoItem` (
`ProtoItemId` bigint NOT NULL UNIQUE /* a technical id - OBLIGATORY */
, `Name` va... |
DEF title = 'Active SQL (GV$SESSION GV$SQLTEXT)';
DEF filename = 'ActiveSql.html';
DEF nextpage = 'BlockingSql.html';
DEF prevpage = 'DmlActivity.html';
@@00_begin.sql
SET MARK HTML ON TABLE "class=sortable" ENTMAP OFF;
@@sql/sub/ActiveSql.sql
SET MARK HTML OFF;
PRO <h2>Comments</h2>
PRO <p>This is use... |
CREATE DATABASE parquimetros;
USE parquimetros;
#--------------------------------------------------------------------------Creaci�n tablas entidades---------------------------------------#
CREATE TABLE Conductores (
dni INT UNSIGNED NOT NULL,
registro INT UNSIGNED NOT NULL,
nombre VARCHAR(32) NOT NULL,
apellido VAR... |
<reponame>hezmondo/mjinn
--useful mysql scripts
--useful table tools
-- to move a table to another schema:
ALTER TABLE yoda.bank_transaction RENAME dataport.bank_transaction
ALTER TABLE money_item AUTO_INCREMENT = 15406;
ALTER TABLE banking AUTO_INCREMENT = 3;
TRUNCATE table incomealloc;
ALTER TABLE incomealloc AUT... |
BEGIN;
SELECT plan(2);
-- add multiple records
PREPARE "insert1" AS
INSERT INTO "public"."people_v2" ("name", "surname")
VALUES
('Luke', 'Skywalker'),
('Han', 'Solo'),
('Leia', 'Princess'),
('Obi-Wan', 'Kenobi'),
('Yoda', 'Master');
SELECT performs_ok(
'insert1',
100,
'It should be able to ins... |
-- Extract World Grant Information from buprenorphine_data
DROP TABLE IF EXISTS buprenorphine_world_grants;
CREATE TABLE buprenorphine_world_grants AS
SELECT a.wos_id,b.* FROM case_buprenorphine_citation_network_years a
INNER JOIN wos_grants b on a.wos_id=b.source_id;
\copy buprenorphine_world_grants TO '/erniedev_da... |
CREATE TABLE OPPLYSNINGSPLIKT
(
ID BIGINT PRIMARY KEY,
FK_BEHANDLING_ID BIGINT REFERENCES behandling (id) NOT NULL,
STATUS VARCHAR NOT NULL,
BEGRUNNELSE TEXT,
VERSJON BIGINT DEFAULT 0 NOT NULL,
OPPRETTET_AV ... |
-- fkey2.test
--
-- execsql {
-- CREATE TABLE high("a'b!" PRIMARY KEY, b);
-- CREATE TABLE low(
-- c,
-- "d&6" REFERENCES high ON UPDATE CASCADE ON DELETE CASCADE
-- );
-- }
CREATE TABLE high("a'b!" PRIMARY KEY, b);
CREATE TABLE low(
c,
"d&6" REFERENCES high ON UPDATE CASCADE ON DELETE CASCAD... |
<filename>src/test/resources/sql/drop_group/b735d0bb.sql
-- file:privileges.sql ln:1107 expect:true
DROP GROUP regress_group2
|
<filename>plugins/bauleitplanung/db/postgresql/schema/2014-09-12_16-33-22_Version2.0.sql
BEGIN;
SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
--
-- TOC entry 8 (class 2615 OID 879860)
-- Name: baule... |
DELETE FROM authority
WHERE authority_name = 'ROLE_DOCTOR'; |
<reponame>WorldHealthOrganization/smart-immunizations
/*
* Library: IMMZ.IND.19
* Immunization coverage for Yellow Fever vaccine (Estimated Denominator)
* Compares the administered dose of yellow fever vaccine with the number of surviving infants.
*
* Numerator: Number of administrations of vaccines containing a... |
<reponame>tnt2017/test_akadem_media
# SQL-Front 5.1 (Build 4.16)
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE */;
/*!40101 SET SQL_MODE='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES */;
/*!40103 SET SQL_NOTES='ON' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNI... |
<reponame>Falumpaset/handson-ml2<filename>backend/model/src/main/resources/db/migration/V1_164__rented_applications_ts_msg_index.sql
alter table propertysearcher."user" add column "rented_applications_fetched" timestamp;
create index if not exists conversation_message_read_agent
on shared.conversation_message (con... |
INSERT INTO Customers (Id, CustomerName, ContactName, Date, City, PostalCode, Country, Test)
VALUES (NEWID(), 'Cardinal', '<NAME>', GETDATE(), 'Stavanger', '4006', 'Norway', NULL);
|
select * from {{ ref('incremental_append_new_columns') }} where false |
<reponame>lyhani82475/LYselect
/*
Navicat MySQL Data Transfer
Source Server : myMysql
Source Server Version : 50144
Source Host : localhost:3306
Source Database : slxy-select
Target Server Type : MYSQL
Target Server Version : 50144
File Encoding : 65001
Date: 2018-06-23 20:21:48
*/... |
<filename>src/sql/schema/2018-06-14-0940_generate_stats.sql
DROP TABLE IF EXISTS `derived_weekly_stats`;
CREATE TABLE IF NOT EXISTS `derived_weekly_stats` (
`week_beginning` DATE NOT NULL,
`p_monitor` INT UNSIGNED NOT NULL,
`p_block` INT UNSIGNED NOT NULL,
`rua_mc` INT UNSIGNED NOT NULL,
`ruf_mc` INT UNSIGNED... |
INSERT INTO Sonar_Config (name, sonar_server_url) VALUES
('World of Sonar Quest', 'https://sonarcloud.io');
INSERT INTO Level (min, max) VALUES
(0, 10),
(11, 30);
INSERT INTO Avatar_Class (name) VALUES
('Magician'),
('Warrior'),
('Adventurer'),
('Thief'),
('Bard'),
('Witch');
INSERT INTO Avatar_Rac... |
/*
10 March 2015
This patch removes the 100 character limit on the study_sample_columns's
column_name column. To my knowledge, there is no reason for this limit.
- <NAME>
*/
alter table qiita.study_sample_columns alter column column_name type varchar;
|
<filename>configs/db/tables/gems__openrosaforms.10.sql
CREATE TABLE IF NOT EXISTS gems__openrosaforms (
gof_id bigint(20) NOT NULL auto_increment,
gof_form_id varchar(249) collate utf8_unicode_ci NOT NULL,
gof_form_version varchar(249) collate utf8_unicode_ci NOT NUL... |
<filename>db_and_tools/old/func2.sql
select c2.name, c2.label, 'narrower', c.name, c.label --, a.*
from classification_scheme_association a
join classification_scheme_category c on a.classification_scheme_category_id = c.id
join classification_scheme_category c2 on a.parent_category_code = c2.id
order by c2.n... |
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 14 Sep 2020 pada 11.31
-- Versi server: 10.1.36-MariaDB
-- Versi PHP: 5.6.38
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHAR... |
/*
Navicat MySQL Data Transfer
Source Server : server 7
Source Server Version : 50505
Source Host : 10.80.20.200:3306
Source Database : curriculum_final
Target Server Type : MYSQL
Target Server Version : 50505
File Encoding : 65001
Date: 2021-01-21 09:10:31
*/
SET FOREIGN_KEY_CHEC... |
-- Query the sum of Northern Latitudes (LAT_N) from STATION
-- having values greater than 38.7880 and less than 137.2345.
-- Truncate your answer to 4 decimal places.
SELECT
ROUND(
SUM(lat_n),
4
) sum_lat_n
FROM station
WHERE
lat_n > 38.7880 AND
lat_n < 137.2345;
|
<reponame>sakthiRathinam/fastapicorenew
-- upgrade --
ALTER TABLE "user" ALTER COLUMN "date_of_birth" SET DEFAULT '2021-12-11';
ALTER TABLE "appointmentslots" ALTER COLUMN "doctor_id" DROP NOT NULL;
ALTER TABLE "appointments" ALTER COLUMN "doctor_id" DROP NOT NULL;
-- downgrade --
ALTER TABLE "user" ALTER COLUMN "date_... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 09 Des 2020 pada 04.30
-- Versi server: 10.4.14-MariaDB
-- Versi PHP: 7.4.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET... |
insert into employee values(10001, sysdate(), 'Johnny');
insert into employee values(10002, sysdate(), 'Bruno');
insert into employee values(10003, sysdate(), 'Lee');
insert into post values(11001, 'My First Post', 10001);
insert into post values(11002, 'My Second Post', 10001);
insert into post values(11003, 'My Third... |
<reponame>eliarlanRM/siscob
CREATE SEQUENCE boleto_seq;
CREATE TABLE boleto (
codigo BIGINT PRIMARY KEY DEFAULT NEXTVAL ('boleto_seq'),
descricao VARCHAR(50) NOT NULL,
status VARCHAR(50) NOT NULL,
valor VARCHAR(50) NOT NULL,
data_vencimento date NOT NULL
); |
<filename>seed.sql
USE employee_trackerDB;
INSERT INTO department (department_name)
VALUES ("Accounting"), ("Engineering"), ("Human Resources"), ("Legal");
INSERT INTO role (title, salary, department_id)
VALUES ("Accountant", 80000.00, 1), ("Controller", 140000.00, 1), ("Junior Developer", 65000.00, 2), ("Senior Deve... |
<reponame>dwiantaramd/MyDoctor
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 24, 2020 at 03:46 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone ... |
<gh_stars>0
-----------------
---- pow_a ----
-----------------
DROP TABLE if exists osmaxx.pow_a;
CREATE TABLE osmaxx.pow_a (
osm_id bigint,
lastchange timestamp without time zone,
geomtype char(1),
geom geometry(MULTIPOLYGON,900913),
aggtype text,
type text,
name text,
name_en text,
name_fr text,
na... |
CREATE TABLE `log` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(10) unsigned NOT NULL DEFAULT '0',
`area` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`level` varchar(9) COLLATE utf8_unicode_ci NOT NULL,
`message` longtext COLLATE utf8_unicode_ci NOT NULL,
`extra` longtext COLLATE utf8_u... |
<filename>src/main/resources/db/migration/V2__Create_auth_table.sql
CREATE TABLE `auth` (
`id` VARCHAR(100) PRIMARY KEY,
`username` VARCHAR(200) NOT NULL,
`email` VARCHAR(200) NOT NULL,
`password` VARCHAR(200) NOT NULL
); |
### Schema
DROP DATABASE IF EXISTS shopsmart_db;
CREATE DATABASE shopsmart_db;
USE shopsmart_db;
-- CREATE TABLE product
-- (
-- upccode BIGINT NOT NULL,
-- prodname varchar(255) NOT NULL,
-- proddescription varchar(255),
-- vid1 INT NOT NULL,
-- price1 DECIMAL(7,2) NOT NULL,
-- vid2 INT NOT NULL,... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 12, 2018 at 05:45 AM
-- Server version: 10.1.31-MariaDB
-- PHP Version: 7.2.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40... |
BEGIN TRAN
DECLARE @measurementToolParentId UNIQUEIDENTIFIER
DECLARE @superAdminUserId UNIQUEIDENTIFIER
DECLARE @statusId UNIQUEIDENTIFIER
DECLARE @measurementToolId UNIQUEIDENTIFIER
SELECT TOP 1 @superAdminUserId = [AccountId] FROM [dbo].[Account]
SELECT TOP 1 @statusId = [ListItemId] FROM [dbo].[ListItem] WHERE [... |
<filename>test_scripts/views/v_cashouts.sql
CREATE OR REPLACE VIEW v_cashouts AS (
SELECT
f_player_id,
f_stamp::DATE AS f_date,
(SUM(f_value)::NUMERIC / 100) AS f_cashouts
FROM
v_completed_transactions_on_real_money
WHERE
f_type IN (76, 87)
GROUP BY
f_pla... |
-- Teams schema
-- !Ups
CREATE TABLE teams (
id INTEGER PRIMARY KEY,
name TEXT NOT NULL,
description TEXT NOT NULL
);
-- !Downs
DROP TABLE teams; |
CREATE TABLE application_user
(
id serial,
create_timestamp timestamp without time zone,
last_edit_timestamp timestamp without time zone,
email character varying(255),
first_name character varying(255),
last_name character varying(255),
password character varying(255),
phone_number character varying(255... |
<gh_stars>10-100
SELECT tcc.case_id
FROM t_claim_case tcc
WHERE tcc.case_status = 7
|
/*!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 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!4010... |
<gh_stars>1-10
ALTER TABLE [dbo].[ZFC_SECURITY_NVP_GRPS]
ADD CONSTRAINT [FK_ZFC_NVP_GRPS_SEC_ZFC_NVP] FOREIGN KEY ([NVP_SEQ_ID]) REFERENCES [dbo].[ZFC_NVP] ([NVP_SEQ_ID]) ON DELETE NO ACTION ON UPDATE NO ACTION;
|
-- file:polymorphism.sql ln:51 expect:true
CREATE FUNCTION tfnp(int[],int) RETURNS int[] AS
'select $1 || $2' LANGUAGE SQL
|
-- file:guc.sql ln:64 expect:true
SET vacuum_cost_delay TO 100
|
-- AlterTable
ALTER TABLE "Track" ALTER COLUMN "slug" SET DATA TYPE TEXT;
|
<reponame>jlrzarcor/ITAM-dpa2021
/* ******* Schema Creation *******
Script: Create schemas:
> metadata to store info and processed data result of cleaning
> select model
> api and dashboard.
*/
DROP SCHEMA IF EXISTS metadata CASCADE;
CREATE SCHEMA metadata;
DROP SCHEMA IF EXISTS procdata CASCADE;
CRE... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Anamakine: 127.0.0.1
-- Üretim Zamanı: 01 Ağu 2020, 02:50:51
-- Sunucu sürümü: 10.4.13-MariaDB
-- PHP Sürümü: 7.4.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=... |
<gh_stars>0
SELECT
COUNT(*)
FROM [MAPages]
WHERE
[PageCd] <> @PageCd
AND [Slug] = @Slug |
CREATE TABLE Record (
_id INTEGER PRIMARY KEY AUTOINCREMENT,
DATE INTEGER NOT NULL
);
CREATE TABLE Barometer (
_id INTEGER PRIMARY KEY AUTOINCREMENT,
ID_RECORD INTEGER NOT NULL,
Pressure REAL NOT NULL,
Temperature REAL NOT NULL,
FOREIGN KEY( ID_RECORD ) REFERENCES Record( _id )
);
CREATE T... |
drop table Profile if exists;
create table Profile (
id bigint not null,
name varchar(50) not null,
age bigint not null,
genre1 varchar(50) ,
genre2 varchar(50) ,
genre3 varchar(50) ,
host bigint,
Group1 bigint,
vote varchar(50),
primary key (id)
);
drop sequence if exists seq_id;
CREATE... |
<filename>scripts/sql/delta/v040-v050/apolloconfigdb-v040-v050.sql
# delta schema to upgrade apollo config db from v0.4.0 to v0.5.0
Use ApolloConfigDB;
DROP TABLE `Privilege`;
ALTER TABLE `Release` DROP `Status`;
ALTER TABLE `Namespace` ADD KEY `IX_NamespaceName` (`NamespaceName`(191));
ALTER TABLE `Cluster` ADD KEY ... |
<gh_stars>100-1000
-- Automatically generated, do not edit.
\set ON_ERROR_STOP 1
SET search_path = 'sitemaps', 'musicbrainz', 'public';
ALTER TABLE artist_lastmod
ADD CONSTRAINT artist_lastmod_fk_id
FOREIGN KEY (id)
REFERENCES musicbrainz.artist(id)
ON DELETE CASCADE;
ALTER TABLE label_lastmod
ADD CON... |
--
SELECT current_date
,COUNT(register_time) AS num_projects
,COUNT(download_state) AS public_downloads
,COUNT(p_scm_state) AS public_svn_repository
,COUNT(a_scm_state) AS active_svn_repository
,COUNT(download_scm_state) AS pubic_download_or_svn_repository
FROM (
SELECT p_all.group_name ... |
GRANT ALL PRIVILEGES ON *.* TO 'homestead'@'%' IDENTIFIED BY 'secret' WITH GRANT OPTION;
flush privileges;
|
DROP TABLE IF EXISTS UnifTeste;
CREATE TABLE UnifTeste (
t_rec TEXT,
rx NUMERIC,
rvaluemin NUMERIC,
rvaluemax NUMERIC,
rvalueavg NUMERIC,
usfluxmin NUMERIC,
usfluxmax NUMERIC,
usfluxavg NUMERIC,
classemin TEXT,
classemax TEXT
);
DROP INDEX IF EXISTS unif_idx;
CREATE INDEX unif_i... |
<filename>public/db/db1.sql
-- Adminer 4.0.2 MySQL dump
SET NAMES utf8;
SET foreign_key_checks = 0;
SET time_zone = '+00:00';
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
DROP TABLE IF EXISTS `wp1of20_commentmeta`;
CREATE TABLE `wp1of20_commentmeta` (
`meta_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`comment_id... |
ALTER TABLE dwp_uc_household DROP COLUMN award_date;
ALTER TABLE dwp_uc_household DROP COLUMN last_assessment_period_start;
ALTER TABLE dwp_uc_household DROP COLUMN last_assessment_period_end;
ALTER TABLE dwp_uc_household DROP COLUMN no_of_children_under_four;
ALTER TABLE dwp_uc_household DROP COLUMN household_member_p... |
<reponame>pandeptwidyaop/himasi
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jan 19, 2017 at 09:19 AM
-- Server version: 10.1.13-MariaDB
-- PHP Version: 7.0.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTE... |
<reponame>sascha-beloborodov/soap-mock-service
-- MySQL dump 10.13 Distrib 5.7.9, for linux-glibc2.5 (x86_64)
--
-- Host: localhost Database: wsdl
-- ------------------------------------------------------
-- Server version 5.6.30-0ubuntu0.14.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*... |
CREATE TABLE SPENDING_PHA.BATCH_STEP_EXECUTION
(
STEP_EXECUTION_ID NUMBER(19) NOT NULL,
VERSION NUMBER(19) NOT NULL,
STEP_NAME VARCHAR2(100 BYTE) NOT NULL,
JOB_EXECUTION_ID NUMBER(19) NOT NULL,
START_TIME TIMESTAMP(6... |
<reponame>hungtt57/khoaluan
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Mar 01, 2016 at 02:38 PM
-- Server version: 10.1.9-MariaDB
-- PHP Version: 5.6.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SE... |
Select sd.Proizvod, p.Naziv,
( Sum ( Kolicina * Faktor * Decode( K_Robe, 1, 1, 0 ) ) ) Ulaz,
( Sum ( Kolicina * Faktor * Decode( K_Robe, -1, 1, 0 ) ) ) Izlaz,
( Sum ( Kolicina * Faktor * K_Robe ) ) Stanje,
p.Jed_Mere JedMere
From Dokument d, Stavka_Dok sd, Proizvod p
Where d.Vrsta_Dok ... |
SET DEFINE OFF;
ALTER TABLE AFW_13_REGN_PILTB ADD (
CONSTRAINT AFW_13_REGN_PILTB_FK2
FOREIGN KEY (REF_DV_TYPE_REGN_PILTB)
REFERENCES AFW_14_DETL_DOMN_VALR (SEQNC)
ENABLE VALIDATE)
/
|
ALTER TABLE _sessions CHANGE id id VARCHAR(40) NOT NULL
|
<filename>src/test/resources/subquery.test_32.sql<gh_stars>100-1000
-- subquery.test
--
-- execsql {
-- CREATE TABLE t1(a,b);
-- INSERT INTO t1 VALUES(1,2);
-- CREATE VIEW v1 AS SELECT b FROM t1 WHERE a>0;
-- CREATE TABLE t2(p,q);
-- INSERT INTO t2 VALUES(2,9);
-- SELECT * FROM v1 W... |
if (x = 0) then
select 0;
if (y = 1) then
set @errmsg = '';
select 1;
end if;
end if; |
<reponame>pringuet/udemy-SQL-A-Z<filename>10_between.sql<gh_stars>0
-- les paiements ('customer_id', 'amount') dont le montant est compris entre 0 et 2 par montants ascendants
select customer_id, amount from payment where amount between 0 and 2 order by amount asc;
-- les paiements ('customer_id', 'amount') dont le mo... |
sqlConvertApi01 =
SELECT
T1.*,
T2.PARAM1
FROM
(SELECT
TEMP.*,
ROWNUM ROWNUMBER
FROM
(SELECT
PARAM1,
PARAM2,
PARAM3,
PARAM4,
PARAM5,
PARAM6,
RTRIM(PARAM6) AS PARAM6,
PARAM7,
PARAM8
FROM
TABLE2
WHE... |
<reponame>kirillkrohmal/krohmal
create table trackersql (
id serial primary key not null,
name varchar(255),
description varchar(255)
);
|
-- MySQL dump 10.15 Distrib 10.0.29-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: localhost
-- ------------------------------------------------------
-- Server version 10.0.29-MariaDB-0+deb8u1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET... |
SELECT
TO_CHAR(first_seen_dt, 'YYYY-MM-DD HH24:MI') as time,
count(*) as inserts_per_minute
FROM
DSRC_RECORD
GROUP BY
TO_CHAR(first_seen_dt, 'YYYY-MM-DD HH24:MI')
ORDER BY
TO_CHAR(first_seen_dt, 'YYYY-MM-DD HH24:MI') desc; |
-- 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.
BEGIN TRANSACTION
IF NOT EXISTS (SELECT * FROM... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.