sql stringlengths 6 1.05M |
|---|
<filename>src/test/resources/sql/insert/41b6461a.sql
-- file:update.sql ln:16 expect:true
INSERT INTO update_test VALUES (5, 10, 'foo')
|
<filename>6_CSDL/script/qltv.sql
create database qltv
go
use qltv
go
create table docgia (
ma_docgia int,
ho nvarchar(50),
tenlot nvarchar(50),
ten nvarchar(50),
ngaysinh date,
primary key(ma_docgia)
)
create table treem (
ma_docgia int,
ma_docgia_nguoilon int,
primary key(ma_docgia)
)
create table nguoilo... |
<filename>backend/de.metas.adempiere.adempiere/migration/src/main/sql/postgresql/system/10-de.metas.adempiere/5480160_sys_gh3140-picking-wh-group-trl.sql
-- 2017-12-09T13:22:20.981
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-12-09 13... |
<gh_stars>1000+
ALTER SESSION SET CONTAINER=CUSTOMSCRIPTS;
CREATE USER TEST IDENTIFIED BY test;
GRANT CONNECT, RESOURCE TO TEST;
ALTER USER TEST QUOTA UNLIMITED ON USERS;
exit;
|
CREATE TABLE log (
id INTEGER PRIMARY KEY AUTOINCREMENT,
facility INTEGER,
severity INTEGER,
socket TEXT NOT NULL,
appname TEXT,
pid INTEGER,
time TEXT,
msg TEXT NOT NULL,
sdata TEXT
) STRICT;
CREATE TRIGGER delete_old AFTER INSERT ON log
BEGIN
DELETE FROM log where id < NEW.id - 16777216;
END;
|
-- 1. for each store show the difference in sales between 2014 and 2015
SELECT
storeId,
SUM(CASE WHEN YEAR(purchaseDate) = 2014 THEN 1 ELSE 0 END) AS VAL14,
SUM(CASE WHEN YEAR(purchaseDate) = 2015 THEN 1 ELSE 0 END) AS VAL15
FROM purchase
GROUP BY storeId;
-- 2. % of all customers that have purchases at least 1 produ... |
<gh_stars>0
CREATE TABLE IF NOT EXISTS payment_processors (
id int NOT NULL AUTO_INCREMENT,
name varchar(255),
type varchar(255),
apiKey varchar(255),
merchantAccount varchar(255),
loginAccount varchar(255),
loginPassword varchar(255),
secretKey varchar(255),
PRIMARY KEY (id)
);
|
-- Drop table
-- DROP TABLE SGIPD_DEV.dbo.Plazas2021_from_prod;
CREATE TABLE SGIPD_DEV.dbo.Plazas2021_from_prod (
ID_SECUENCIAL bigint NULL,
COD_INFRA bigint NULL,
NOMBRE_CENTRO_EDUCATIVO varchar(83) COLLATE Modern_Spanish_CI_AS NULL,
Departamento varchar(12) COLLATE Modern_Spanish_CI_AS NULL,
Municipio varchar(... |
<reponame>paullewallencom/joomla-978-1-7821-6837-9<gh_stars>0
ALTER TABLE `#__folio` ADD `checked_out` int(11) NOT NULL DEFAULT '0';
ALTER TABLE `#__folio` ADD `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00';
ALTER TABLE `#__folio` ADD `access` int(11) NOT NULL DEFAULT '1';
ALTER TABLE `#__folio` ... |
<filename>spring-boot-shiro/src/main/resources/init/sys_user_role.sql<gh_stars>1-10
/*
Navicat Premium Data Transfer
Source Server : local
Source Server Type : MySQL
Source Server Version : 50718
Source Host : localhost:3306
Source Schema : boot
Target Server Type : MySQL
Targe... |
<filename>src/main/resources/db/migration/V76__add_uzcard_payment_system.sql
alter type nw.BANK_CARD_PAYMENT_SYSTEM add value 'uzcard';
|
-------------------------------------------------------------------------------
--
-- PLEASE NOTE
--
-- No warranty, no liability, no support.
--
-- This script is 100% at your own risk to use.
--
-------------------------------------------------------------------------------
drop table &&1 cascade constraints purge;
... |
UPDATE ACT_DMN_DATABASECHANGELOGLOCK SET LOCKED = 1, LOCKEDBY = '192.168.10.1 (192.168.10.1)', LOCKGRANTED = to_timestamp('2020-10-06 14:12:22.607', 'YYYY-MM-DD HH24:MI:SS.FF') WHERE ID = 1 AND LOCKED = 0;
DROP INDEX ACT_IDX_DEC_TBL_UNIQ;
ALTER TABLE ACT_DMN_DECISION_TABLE RENAME TO ACT_DMN_DECISION;
CREATE UNIQUE... |
<filename>db/game_init_script.sql
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50553
Source Host : localhost:3306
Source Database : game
Target Server Type : MYSQL
Target Server Version : 50553
File Encoding : 65001
Date: 2017-05-19 05:29:40
*/
... |
<gh_stars>1-10
--Create index on serial column and retrieve information from db_index
create serial seq_test
start with 1
increment by 1
nomaxvalue;
create table ddl_0001(id int primary key, name varchar(20));
insert into ddl_0001 values(seq_test.next_value,'Jerry');
insert into ddl_0001 values(seq_test.next_value,'To... |
<reponame>yosuaalvin/direktori-ft
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 18, 2017 at 07:48 PM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_C... |
insert into departamento (nombre) values( 'Amazonas ');
insert into departamento (nombre) values( 'Antioquia ');
insert into departamento (nombre) values( 'Arauca ');
insert into departamento (nombre) values( 'Atlántico ');
insert into departamento (nombre) values( 'Bolívar ');
insert into departamento (nombre) values(... |
<reponame>NexuS-Pt/the-legacy-game<filename>database.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.1.6
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 10, 2014 at 01:08
-- Server version: 5.5.36
-- PHP Version: 5.4.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
... |
<filename>5.2.3/Database/Constraints/AFW_13_PAGE_IR_PK.sql<gh_stars>1-10
SET DEFINE OFF;
ALTER TABLE AFW_13_PAGE_IR ADD (
CONSTRAINT AFW_13_PAGE_IR_PK
PRIMARY KEY
(SEQNC)
ENABLE VALIDATE)
/
|
<filename>migrations/V2017_02_20_06_41_47__mention-fields.sql
-- -*- sql-dialect: postgres; -*-
drop table clippingsbot.mentions;
create table clippingsbot.mentions (
pattern_id bigint not null references clippingsbot.patterns (pattern_id),
feed text not null,
title text not null,
comments_url text not null,
... |
<gh_stars>1-10
----alter length-----
ALTER TABLE eglc_advocate_master ALTER COLUMN specilization TYPE character varying(100);
ALTER TABLE eglc_advocate_master_aud ALTER COLUMN specilization TYPE character varying(100);
|
<reponame>CoralReefCI/coralreefci
-- MySQL dump 10.16 Distrib 10.1.26-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: 127.0.0.1 Database: heupr
-- ------------------------------------------------------
-- Server version 5.5.8
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CH... |
<reponame>lzpeng723/minimal-cloud<filename>sql/minimal-cloud.sql
create DATABASE `minimal-system` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
create DATABASE `minimal-tool` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
create DATABASE `minimal-sample-jpa` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci... |
UPDATE creature_template SET npcflag=npcflag|1, ScriptName='npc_cairne_bloodhoof' WHERE entry=3057;
UPDATE `gameobject_template` SET `ScriptName`='go_barov_journal' WHERE `entry`=180794; |
USE YelpDB
GO
DELETE Tips
DELETE Checkins
DELETE UserFriends
DELETE Users
DELETE BusinessAttributes -- insert not implemented
DELETE Attributes -- insert not implemented
DELETE BusinessCategories
DELETE Categories
DELETE Businesses
DECLARE @YelpUsers TABLE (json_data varchar(max));
DECLARE @YelpBusinesses TAB... |
<gh_stars>0
ALTER TABLE resource
ADD CONSTRAINT fk_parentid_resourceid FOREIGN KEY (parent_id) REFERENCES resource(id); |
CREATE TABLE [dbo].[Season] (
[SeasonId] UNIQUEIDENTIFIER NOT NULL,
[SeasonDescription] VARCHAR (50) NOT NULL,
[IbaProgramId] UNIQUEIDENTIFIER NOT NULL,
[StartWeek] DATETIME NULL,
[EndWeek] DATETIME NULL,
CONSTRAINT [PK_Season] PRIMARY KEY CLU... |
BEGIN TRANSACTION;
DROP TABLE T9;
COMMIT;
|
-- ADD COLUMN COMMIT_ID IN APPLY_HISTORY TABLE
ALTER TABLE "APPLY_HISTORY" ADD "COMMIT_UUID" VARCHAR2(255);
|
<gh_stars>10-100
ALTER TABLE ${ohdsiSchema}.cohort_definition_details
DROP CONSTRAINT FK_cohort_definition_details_cohort_definition
;
ALTER TABLE ${ohdsiSchema}.cohort_definition_details
ADD CONSTRAINT FK_cohort_definition_details_cohort_definition
FOREIGN KEY (id)
REFERENCES ${ohdsiSchema}.cohort_defi... |
<reponame>lmwnshn/postgres
--
-- Tests for procedures / CALL syntax
--
CREATE PROCEDURE test_proc1()
LANGUAGE plpythonu
AS $$
pass
$$;
CALL test_proc1();
-- error: can't return non-None
CREATE PROCEDURE test_proc2()
LANGUAGE plpythonu
AS $$
return 5
$$;
CALL test_proc2();
CREATE TABLE test1 (a int);
CREATE PROC... |
DROP INDEX app_public.parent_dir_idx;
DROP INDEX app_public.page_content_strings_idx;
DROP INDEX app_public.page_page_cs_idx;
DROP INDEX app_public.page_cs_cs_idx;
DROP INDEX app_public.page_page_assets_idx;
DROP INDEX app_public.page_assets_assets_idx;
DROP INDEX app_public.page_gallery_idx;
DROP INDEX app_public.gal... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 27 Sep 2019 pada 08.58
-- Versi server: 10.1.34-MariaDB
-- Versi PHP: 7.2.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SE... |
<filename>djpagan/sql/detail_student.sql
--
-- PROGRAM_ENROLLMENT
--
SELECT
id_rec.id, trim(firstname) as firstname, trim(lastname) as lastname,
prog, subprog, major1, major2, major3, nurs_prog, cl, cohort_yr,
cohort_ctgry, acst, plan_grad_yr, plan_grad_sess, deg, tle
FROM
id_rec, prog_enr_rec
WHERE
... |
<gh_stars>0
create or replace procedure seq_timestamp (
seq_value_out out pls_integer
, seq_timestamp_out out timestamp
, enable_locking boolean default true
)
as
seqValueOut pls_integer;
seqTimestamp timestamp;
lockHandle varchar2(128);
lockAcquired boolean := false;
glockResult integer;
localInstanceNumber... |
<reponame>hec3555/wildcart
-- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost:3306
-- Tiempo de generación: 20-12-2018 a las 11:10:56
-- Versión del servidor: 5.7.23
-- Versión de PHP: 7.1.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SE... |
-- MySQL setup development
-- Script for create database and user in testDatabase
CREATE DATABASE IF NOT EXISTS hbnb_test_db;
CREATE USER IF NOT EXISTS 'hbnb_test'@'localhost' IDENTIFIED BY 'hbnb_test_pwd';
GRANT ALL PRIVILEGES ON hbnb_test_db.* TO 'hbnb_test'@'localhost';
GRANT SELECT ON performance_schema.* TO '... |
<filename>database/sql/daftar.sql
INSERT INTO `daftar` (`id`, `barang_bukti`, `no_stnk_sim`, `nama`, `no_kendaraan`, `tanggal_tilang`, `tanggal_sidang`, `status_penilangan`, `pelanggaran`, `total_denda`,`tempat_sidang`, `alamat`,`keterangan`,`surat_tilang`) VALUES
(1,'STNK', 32032411, 'Nama Anda 1','F5685XR', '2000-01... |
-- phpMyAdmin SQL Dump
-- version 3.3.9
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tiempo de generación: 21-10-2018 a las 23:52:55
-- Versión del servidor: 5.5.8
-- Versión de PHP: 5.3.5
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SE... |
<reponame>jgebal/bitmap_set_index
ALTER SESSION SET PLSQL_WARNINGS = 'ENABLE:ALL';
ALTER SESSION SET PLSQL_CODE_TYPE = NATIVE;
/
ALTER SESSION SET PLSQL_OPTIMIZE_LEVEL = 3;
/
CREATE OR REPLACE PACKAGE BODY bmap_segment_builder AS
--PRIVATE SPECIFICATIONS
ge_subscript_beyond_count EXCEPTION;
PRAGMA EXCEPTION_INI... |
<filename>Exams/Supermarket29.08.2018(AwfulDB)/Update.sql<gh_stars>1-10
UPDATE Items
SET Price *= 1.27
WHERE CategoryId IN (1,2,3) |
select COUNT(*) from empty_table e1, empty_table e2 where e1.col0 = e2.col0; |
<reponame>quchunguang/test<filename>testpostgresql/arg.sql
SELECT * FROM weather WHERE city=:city::varchar(20) AND prcp > 0.0;
|
<reponame>jjromannet/node-red-projects
CREATE TABLE `current-config-ogrzewanie` (
`idconfig` int(11) NOT NULL AUTO_INCREMENT,
`tempZadana` decimal(4,2) NOT NULL,
`tempZadzialania` decimal(4,2) NOT NULL,
`minimalneZalaczenie` int(11) NOT NULL,
PRIMARY KEY (`idconfig`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT C... |
<reponame>tymowskyy/to-do<gh_stars>1-10
CREATE TABLE `lists` (
`list_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`last_edit` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `tasks` (
`task_id` int(11) NOT NULL,
`list_id... |
create table if not exists business (
"business_id" VARCHAR NULL,
"name" VARCHAR NULL,
"address" VARCHAR NULL,
"city" VARCHAR NULL,
"state" VARCHAR NULL,
"postal_code" VARCHAR NULL,
"latitude" VARCHAR NULL,
"longitude" VARCHAR NULL,
"stars" VARCHAR NULL,
"review_count" V... |
SELECT short_name, unit_of_measurement, description FROM {{ .schema }}.met_element_definitions
|
<reponame>Datasilk/Connector
CREATE PROCEDURE [dbo].[User_Create]
@name nvarchar(64),
@email nvarchar(64),
@username nvarchar(64),
@password nvarchar(255),
@photo bit = 0,
@status smallint = 1
AS
DECLARE @id int = NEXT VALUE FOR SequenceUsers
INSERT INTO Users (userId, [name], email, username, [password], phot... |
CREATE KEYSPACE IF NOT EXISTS fmke
WITH REPLICATION = {
'class': 'SimpleStrategy',
'replication_factor': 1
};
CREATE TABLE IF NOT EXISTS fmke.patients (
ID int PRIMARY KEY,
Name text,
Address text,
);
CREATE TABLE IF NOT EXISTS fmke.pharmacies (
ID int PRIMARY KEY,
Name text,
Address t... |
-- Regel: Ausdauer im Kampf
INSERT INTO Regeln (Name, Anwenden, Typ, Beschreibung) VALUES ('AusdauerImKampf', 1, 'Optional', 'Kampf: Ausdauerverlust (WdS 83)')
GO
-- Miserable Eigenschaft bugfix, Tags für Ausrüstung, Handelsgut Name not null
UPDATE [VorNachteil] set Vorteil=0, Nachteil=1, Typ='Nachteile' where V... |
EXEC [EST].[Proc_yjbb_Ins] @Code = N'600509',@CutoffDate = N'2017-09-30',@EPS = N'0.318',@EPSDeduct = N'0',@Revenue = N'28.75亿',@RevenueYoy = N'8.32',@RevenueQoq = N'13.07',@Profit = N'2.87亿',@ProfitYoy = N'5.00',@ProfiltQoq = N'778.99',@NAVPerUnit = N'5.4576',@ROE = N'5.89',@CashPerUnit = N'0.9201',@GrossProfitRate = ... |
<filename>install/db/mysql8/install.sql<gh_stars>0
-- таблица мультикорзин
CREATE TABLE IF NOT EXISTS `germes_multibasket` (
`ID` INT(18) NOT NULL AUTO_INCREMENT, -- просто строчки
`ACTIVE` CHAR(1) NOT NULL DEFAULT 'Y', -- активность слепка корзины
`USER_ID` INT(18) NOT NULL, -- ID пользователя
`ACCOUNT... |
<reponame>carry0987/SitemapGenerator<gh_stars>0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/* create article */
CREATE TABLE IF NOT EXISTS article (
id int(3) UNSIGNED NOT NULL AUTO_INCREMENT,
freq varchar(10) NOT NULL,
priority char(3) NOT NULL DEFAULT '0.5',
lastmod datetime NOT NULL,
... |
<gh_stars>0
/*
* Desarrollado por : DennisM.Andino
* Contactame a mi correo : <EMAIL>
* mi canal de Youtube: CodigoCompartido
* proyecto disponible en : https://github.com/dennis-andino/GT
*/
CREATE VIEW VW_SCHEDULES as
select s.id as id, s.availability,s.tutor as tutorid, l.alias as tutor, s2.starttime, s2.finish... |
<gh_stars>0
USE `Schedule`;
SELECT `Flight`.`ICAONumber` AS `FlightNumber`,
`Schedule`.`Status` AS `Status`,
`Departure`.`ICAOCode` AS `Departure`,
`Arrival`.`ICAOCode` AS `Arrival`,
`Departure`.`ScheduledTime` AS `ScheduledDeparture`,
`Arrival`.`ScheduledTime` AS `ScheduledArrival`,... |
-- saldo_name: workday,
-- unit_name: WORK_DAY, WORK_WEEK, WORK_HOUR
--// if saldo_active = 1 then:
--// its converted and not more used, beacuse not existing, but for show, the history of changes, and leave the parent_id connection
CREATE TABLE "main"."users" (
"id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
... |
<gh_stars>0
/* This is a csv file from the website https://transtats.bts.gov
The timeline is from 2012-10-01 to 2012-11-30
It contains flights data from six airports
- ['BOS', 'EWR', 'JFK', 'MIA', 'PHL', 'SJU']
- Boston (BOS)
- Miami (MIA)
- Newark (EWR)
- New York (JFK)
- Philadelphia (PHL)
- Purto Rico (SJU)... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.9.2deb1
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Waktu pembuatan: 10 Des 2019 pada 16.18
-- Versi server: 10.3.15-MariaDB-1
-- Versi PHP: 7.3.12-1+0~20191128.49+debian10~1.gbp24559b
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRA... |
-- decimal numbers
-- numeric(precision), real, double precision
CREATE TABLE table_numbers (
number_id SERIAL PRIMARY KEY,
col_numeric numeric(20, 5),
col_real real,
col_double double precision
);
SELECT
*
FROM table_numbers;
INSERT INTO table_numbers (col_numeric, col_real, col_double) VALUES
(.9, .9, .9),
(3.... |
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Versión del servidor: 10.1.22-MariaDB - mariadb.org binary distribution
-- SO del servidor: Win32
-- HeidiSQL Versión: 9.5.0.5196
-- ------------------------------------------------... |
INSERT INTO [dbo].[LearnerSatisfaction] VALUES ('10000020','5 E LTD.','Private Sector Public Funded', '97.4', NULL,'922','473','2018/2019', 2019)
GO
INSERT INTO [dbo].[LearnerSatisfaction] VALUES ('10000028','WOODSPEEN TRAINING LIMITED','Private Sector Public Funded', NULL, 'There was not enough data to award a score'... |
SELECT pl.[Name], pl.Seats, COUNT(t.Id) AS [Passengers Count]
FROM Planes AS pl
LEFT JOIN Flights AS f ON pl.Id = f.PlaneId
LEFT JOIN Tickets AS t ON f.Id = t.FlightId
GROUP BY pl.[Name], pl.Seats
ORDER BY [Passengers Count] DESC, pl.[Name], pl.[Seats] |
/*
Warnings:
- You are about to drop the column `user_id` on the `ShoppingCard` table. All the data in the column will be lost.
- You are about to alter the column `expired_at` on the `user_active_session` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `... |
-- file:tstypes.sql ln:176 expect:true
SELECT ts_rank_cd(' a:1 s:2 d:2A g'::tsvector, 'a <-> s')
|
<reponame>flexsocialbox/una
-- FORMS
UPDATE `sys_form_inputs` SET `db_pass`='<PASSWORD>' WHERE `object`='bx_posts' AND `name`='published';
|
-- 2020-12-09T09:12:57.491Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsUseDocSequence='N',Updated=TO_TIMESTAMP('2020-12-09 11:12:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=550503
;
|
<filename>services/common/src/main/resources/db/postgresql/tenants/pahma/fnc-utils-getnagpra-nuxeo_pahma.sql<gh_stars>0
CREATE OR REPLACE FUNCTION utils.getnagpra(cocid character varying)
RETURNS SETOF nagpratype
LANGUAGE plpgsql
STRICT
AS $function$
DECLARE
updsql text;
t varchar[];
reptabs v... |
CREATE OR REPLACE FUNCTION water_class(waterway TEXT) RETURNS TEXT AS $$
SELECT CASE WHEN waterway='' THEN 'lake' ELSE 'river' END;
$$ LANGUAGE SQL IMMUTABLE;
DROP VIEW IF EXISTS water_z0_3575;
CREATE VIEW water_z0_3575 AS (
-- etldoc: ne_110m_ocean -> water_z0
SELECT geometry, 'ocean'::text AS class F... |
-- Repeat all tests with the new function names.
-- postgis-users/2006-July/012764.html
SELECT ST_SRID(ST_Collect('SRID=32749;POINT(0 0)', 'SRID=32749;POINT(1 1)'));
SELECT ST_Collect('SRID=32749;POINT(0 0)', 'SRID=32740;POINT(1 1)');
select ST_asewkt(ST_makeline('SRID=3;POINT(0 0)', 'SRID=3;POINT(1 1)'));
select ST_... |
<reponame>SI-SOFIA/sisofia
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Apr 14, 2016 at 05:30 PM
-- Server version: 10.1.10-MariaDB
-- PHP Version: 7.0.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET... |
mysql -u root -p
use mysql;
select user,host,authentication_string from mysql.user;
CREATE USER 'flowable'@'%' IDENTIFIED BY 'flowable';
update user set host='%' where user='flowable';
SELECT User, Host from mysql.user;
#GRANT ALL PRIVILEGES ON *.* TO 'flowable'@'localhost';
GRANT ALL PRIVILEGES ON *.* TO 'flowabl... |
<reponame>allixender/gwml2-geoappschema-sql<gh_stars>0
-- downs
DROP table if exists public.aquifertypeterm;
drop SEQUENCE IF EXISTS public.aquifertypeterm_id_seq;
Drop INDEX if EXISTS aquifertypeterm_id_uindex;
Drop INDEX if EXISTS aquifertypeterm_gml_id_uindex;
-- downs
DROP table if exists public.bholeinclination... |
<filename>tests/unittests/general/variable_3.sql
--------------------------------------------------------------------------
-- testing variables
--------------------------------------------------------------------------
.eval print(parent);
.eval parent = "asdf";
.eval print(parent);
.eval print(asdf);
|
<reponame>Rob--W/phabricator<gh_stars>1000+
RENAME TABLE {$NAMESPACE}_pastebin.pastebin_pastetransaction_comment
TO {$NAMESPACE}_paste.paste_transaction_comment;
|
<filename>db_schema.sql
-- MySQL dump 10.13 Distrib 5.1.43, for redhat-linux-gnu (x86_64)
--
-- Host: localhost Database: ircplanet_services
-- ------------------------------------------------------
-- Server version 5.1.43
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACT... |
ALTER TABLE `avm_transactions` MODIFY `canonical_serialization` MEDIUMBLOB;
ALTER TABLE `pvm_blocks` MODIFY `serialization` MEDIUMBLOB;
ALTER TABLE `avm_transactions` MODIFY `created_at` timestamp(6) not null default current_timestamp(6);
alter table `avm_outputs` MODIFY `created_at` timestamp(6) not null default curr... |
DROP DATABASE IF EXISTS burgers_db;
CREATE DATABASE burgers_db;
USE burgers_db;
DROP TABLE IF EXISTS burgers;
CREATE TABLE burgers (
id INT (50) AUTO_INCREMENT NOT NULL PRIMARY KEY,
burger_name VARCHAR (300),
devoured boolean DEFAULT FALSE,
createdAt TIMESTAMP NOT NULL Default CURRENT_TIMESTAMP
); |
<gh_stars>0
INSERT INTO eventos (nombre,tematica, descripcion , fecha_evento, hora_evento, idCategoria, idPonente) VALUES ('Responsive Web Design','Desarrollo Web','Evento de web','2021-12-09', '10:00:00', '3', '1');
INSERT INTO eventos (nombre,tematica, descripcion , fecha_evento, hora_evento, idCategoria, idP... |
<filename>benchmark/Hatred/queries-vectorwise-disabled/32.sql
--SELECT "Hatred_1"."State" AS "State", SUM(1) AS "TEMP(Calculation_-454863522739130367)(2109769841)(0)" FROM "Hatred_1" WHERE (("Hatred_1"."State" NOT IN ('', 'AK', 'DC')) AND ("Hatred_1"."Keyword" = 'slut')) GROUP BY 1;
|
<filename>Src/QueueDb.Sql/AppDbo/Tables/AgentRegistration.sql<gh_stars>0
CREATE TABLE [AppDbo].[AgentRegistration] (
[AgentId] [dbo].[KeyIdType] IDENTITY (1, 1) NOT NULL,
[AgentName] [dbo].[AgentNameType] NOT NULL,
[_createdDate] [dbo].[DateType] CONSTRAINT [DF_AgentRegistration__createdDa... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 14, 2021 at 04:26 PM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 8.0.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
<reponame>SGershman/simpleimpact<filename>Procedures/dbo.uspLoadSWOTStrategy_LivableStreets.sql
EXEC dbo.uspAddSWOTStrategy @strategy_name = 'Political Leaders Emerging', @strategy_type_name = 'Opportunity', @strategy_category_name = 'Political';
EXEC dbo.uspAddSWOTStrategy @strategy_name = 'Boston leaders say all the ... |
<reponame>ogulcan99/webfitness-website
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Anamakine: 127.0.0.1
-- Üretim Zamanı: 22 May 2021, 21:45:23
-- Sunucu sürümü: 10.4.19-MariaDB
-- PHP Sürümü: 8.0.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
... |
<gh_stars>1-10
CREATE VIEW [dbo].[dnn_vw_Portals]
AS
SELECT
P.PortalID,
P.PortalGroupID,
PL.PortalName,
dbo.dnn_FilePath(PL.LogoFile) AS LogoFile,
PL.FooterText,
P.ExpiryDate,
P.UserRegistration,
P.BannerAdvertising,
P.AdministratorId,
... |
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Nov 25, 2017 at 02:13 PM
-- Server version: 5.6.34
-- PHP Version: 7.1.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `golang_rest`
--
-- ----------------------... |
<filename>mysql/init/init.sql
CREATE USER 'username'@'%' IDENTIFIED BY 'password';
GRANT All privileges ON *.* TO 'username'@'%';
CREATE DATABASE IF NOT EXISTS LabelMe;
use LabelMe;
create table user(
id INT NOT NULL AUTO_INCREMENT,
username VARCHAR(100) NOT NULL,
password VARCHAR(40) NOT NULL,
PRIMARY KE... |
<filename>dic.sql
column table_name format a30
select table_name from dictionary where table_name like upper('%&mascara%')
/
|
<reponame>pavel-voinov/oracle-dba-workspace<filename>scripts/sysdba/kill_sessions_by_event.sql
set serveroutput on size unlimited verify off timing off feedback off linesize 1024 pagesize 9999 heading off long 32000 autotrace off newpage none
set termout off
define fmask=''
column time_stamp new_value fmask
SELECT '... |
<reponame>woorim960/woowahan-agile-codingtest
-- 코드를 입력하세요
SELECT ANIMAL_ID, NAME, SEX_UPON_INTAKE
FROM ANIMAL_INS
WHERE NAME = 'Lucy' or NAME = 'Pickle' or NAME = 'Rogan' or NAME = 'Sabrina' or NAME = 'Mitty' or NAME = 'Ella'; |
<filename>queries/Failing Tasks - Last Day.sql
select
title,
completed_at at time zone 'utc' as time_since_failure_pst,
wb.updated_at,
coalesce(su.name || '@twitter.com', '<EMAIL>') as wb_owner,
notes
from background_jobs bj
left join workbooks wb on wb.name = bj.title and bj.si... |
<filename>src/jk64reportmap_action_pkg.sql
-- jk64 ReportMap Action v1.0 Aug 2020
-- https://github.com/jeffreykemp/jk64-plugin-reportmap
-- Copyright (c) 2020 <NAME>
-- Released under the MIT licence: http://opensource.org/licenses/mit-license
subtype plugin_attr is varchar2(32767);
function render
( p_dynamic_... |
INSERT INTO axtInfo VALUES ('hg12','Blastz Best in Genome','chr1','/cluster/store2/mm.2002.02/mm2/bed/blastz.gs13.2002-08-30/axtBest/chr1.axt');
INSERT INTO axtInfo VALUES ('hg12','Blastz Best in Genome','chr12','/cluster/store2/mm.2002.02/mm2/bed/blastz.gs13.2002-08-30/axtBest/chr12.axt');
INSERT INTO axtInfo VALUES (... |
<gh_stars>100-1000
CREATE PROCEDURE [dbo].[usp_sqlwatch_logger_hadr_database_replica_states]
AS
declare @snapshot_type_id tinyint = 29
declare @date_snapshot_current datetime2(0)
--get snapshot header
exec [dbo].[usp_sqlwatch_internal_insert_header]
@snapshot_time_new = @date_snapshot_current OUTPUT,
@snapshot_ty... |
<gh_stars>0
-- noinspection SqlNoDataSourceInspectionForFile
-- create chromosome table
DROP TABLE IF EXISTS chromosomes;
CREATE TABLE chromosomes (
_chromosomes_key INTEGER,
chromosome_num INTEGER,
chromosome TEXT,
species_id TEXT,
PRIMARY KEY (_chromosomes_key)
);
-- insert chromosome data
INSERT INTO... |
/* ALTER TABLE: https://www.postgresql.org/docs/current/sql-altertable.html */
ALTER TABLE IF EXISTS ONLY name*
RENAME COLUMN column_name TO new_column_name;
ALTER TABLE IF EXISTS name
RENAME column_name TO new_column_name;
ALTER TABLE name
RENAME CONSTRAINT constraint_name TO new_constraint_name;
ALTER TAB... |
<filename>base/src/main/resources/org/ambraproject/service/migration/migrate_ambra_1004.sql
alter table userProfile
add column passwordReset bit(1) NOT NULL DEFAULT b'0' after password;
|
<filename>zm-db-conf/src/db/mysql/create_database.sql
--
-- ***** BEGIN LICENSE BLOCK *****
-- Zimbra Collaboration Suite Server
-- Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Synacor, Inc.
--
-- This program is free software: you can redistribute it and/or modify it under
-- th... |
<filename>_includes/tutorials/joining-table-table/ksql/code/tutorial-steps/dev/transient-join.sql
SELECT M.ID, M.TITLE, M.RELEASE_YEAR, L.ACTOR_NAME
FROM MOVIES M
INNER JOIN LEAD_ACTOR L
ON M.ROWKEY=L.ROWKEY
LIMIT 3;
|
TRUNCATE transactions;
ALTER TABLE transactions ADD COLUMN hash VARCHAR NOT NULL UNIQUE; |
\connect compass
COPY applications(id,tenant,name) from '/docker-entrypoint-initdb.d/03_app.csv' DELIMITER ',' CSV;
COPY apis(id,name,app_id) from '/docker-entrypoint-initdb.d/04_api.csv' DELIMITER ',' CSV;
COPY events(id,name,app_id) from '/docker-entrypoint-initdb.d/05_ev.csv' DELIMITER ',' CSV;
COPY documents(id,nam... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.