sql stringlengths 6 1.05M |
|---|
<reponame>onemy/om-admin<gh_stars>0
/*
Navicat MySQL Data Transfer
Source Server : local
Source Server Version : 50732
Source Host : localhost:3306
Source Database : oma
Target Server Type : MYSQL
Target Server Version : 50732
File Encoding : 65001
Date: 2021-04-29 13:4... |
SELECT * FROM users ORDER BY id;
|
/* ---------------------------------------------------- */
/* Generated by Enterprise Architect Version 13.0 */
/* Created On : 16-���-2018 7:40:40 */
/* DBMS : PostgreSQL */
/* ---------------------------------------------------- */
/* Drop Sequences for Autonumber Columns */
/* Drop Tables *... |
create schema hadoop3book;
use hadoop3book;
create table if not exists students (student_id int,name String,gender String,dept_id int) row format delimited fields terminated by ',';
load data local inpath '/home/labuser/hiveqry/students.csv' overwrite into table students;
create table if not exists hadoop3book.departme... |
<reponame>mapofzones/database-hasura<filename>hasura/migrations/1630600332526_alter_table_public_zones_stats_alter_column_ibc_tx_in_mainnet_rating/down.sql<gh_stars>1-10
ALTER TABLE "public"."zones_stats" ALTER COLUMN "ibc_tx_in_mainnet_rating" SET NOT NULL;
|
<gh_stars>10-100
-- Get Insight history attributes for the retention policy
SELECT hist."AFFECTED_ATTRIBUTE",
count(hist."ID") updates
FROM "AO_8542F1_IFJ_OBJ_HIST" hist
GROUP BY hist."AFFECTED_ATTRIBUTE"
ORDER BY updates DESC;
-- the next query is extra
-- only ID aggregated
SELECT hist."OBJECT_TYPE_ATTRIBU... |
-- Table Definition ----------------------------------------------
CREATE TABLE tasks (
id SERIAL PRIMARY KEY,
user_id integer NOT NULL REFERENCES "user"(id),
task character varying(255) NOT NULL,
due_date date NOT NULL,
importance integer NOT NULL,
completion_status boolean NOT NULL DEFAULT f... |
SELECT group_concat(k.column_name ORDER BY k.ordinal_position) AS column_names, t.table_name AS table_name, t.table_schema AS table_schema, t.constraint_name AS constraint_name FROM information_schema.table_constraints t LEFT JOIN information_schema.key_column_usage k USING (constraint_name, table_schema, table_name) W... |
-- @product_version gpdb: [4.3.4.0 -],4.3.4.0O2
-- @Description Ensures that a reindex table during alter tab add partition operations is ok
--
DELETE FROM reindex_crtabforadd_part_ao_btree WHERE id < 12;
1: BEGIN;
2: BEGIN;
1: REINDEX TABLE reindex_crtabforadd_part_ao_btree;
2&: alter table reindex_crtabforadd_pa... |
<reponame>seasketch/next
--! Previous: sha1:e609611ee62bec274e5da81b6a89185120cafc5c
--! Hash: sha1:a943cd0256bce79a4ebda91b2090a622755945a4
-- Enter migration here
ALTER TYPE invite_status ADD VALUE if not exists 'SURVEY_INVITE_QUEUED';
ALTER TYPE invite_status ADD VALUE if not exists 'SURVEY_INVITE_SENT';
CREATE OR... |
--test '05/26/2008', '14:24:00', '14:24:00 05/26/2008' with operator -
select date'05/26/2008'-to_date('5/5/2008') from db_root;
select time'14:24:00'-to_time('8:8:8 am') from db_root;
select timestamp'14:24:00 05/26/2008'-to_timestamp('5/5/2008 8:8:8 am') from db_root;
|
<reponame>Zhaojia2019/cubrid-testcases
-- pass different formats of time/timestamp/datetime arguments
--1. pass different formats of time arguments
select time(time'3:15:17');
select time(time'8:19:34 AM');
select time(time'13:11:14 pm');
select time(time'12:30');
--error
select time(time'15:30 am');
--2. pass ... |
<reponame>Sebastian-123-web/tupcaltoque
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 02-09-2020 a las 00:39:03
-- Versión del servidor: 10.4.6-MariaDB
-- Versión de PHP: 7.2.22
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
STA... |
<reponame>Artemisa85/OperacionesReciprocas<filename>oreciprocas-db/src/main/resources/liquibase/sqlFile/WI/46008/exec/06_insert_plantilla.sql
/*****************************************************************************/
/* Archivo: 06_insert_plantilla.sql */
/* Base de datos:... |
<reponame>nsalesky/todolist-backend
-- Your SQL goes here
ALTER TABLE user_lists
ADD COLUMN is_owner BOOLEAN NOT NULL DEFAULT TRUE;
ALTER TABLE user_lists
ALTER COLUMN is_owner DROP DEFAULT; |
<reponame>Dizenparuzal/rinditugas<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 3.4.5
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Waktu pembuatan: 03. Juli 2020 jam 08:42
-- Versi Server: 5.5.16
-- Versi PHP: 5.3.8
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_S... |
<filename>insert_books.sql
insert into books (id, title, author) values
(1, 'War and Peace', '<NAME>'),
(2, 'Les Miserables', '<NAME>'),
(3, 'The Time Machine', '<NAME>'),
(4, 'A Journey into the Center of the Earth', '<NAME>'),
(5, 'The Dark World', '<NAME>'),
(6, 'The Wine in the Willows', '<NAME>'),
(7, 'Life On the... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Aug 19, 2021 at 04:47 PM
-- 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=@... |
<gh_stars>0
-- drop database patientdb;
create database patientdb;
use patientdb;
create table User(
user_id varchar(20) not null unique primary key,
user_name varchar(20) not null,
user_pw varchar(20) not null,
is_patient int not null,
age int not null,
weight float not null,
height float not nu... |
CREATE PROC [dbo].[uspLaterRatedIssueDelete]
@LaterRatedIssueID uniqueidentifier
AS
SET NOCOUNT ON
SET XACT_ABORT ON
BEGIN TRAN
UPDATE [dbo].[LaterRatedIssue]
SET
Deleted=1,
DeletedOn=GETDATE()
WHERE [LaterRatedIssueID] = @LaterRatedIssueID
COMMIT |
# ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: 127.0.0.1 (MySQL 5.7.21)
# Database: ticket
# Generation Time: 2018-09-12 05:41:00 +0000
# ************************************************... |
create table addresses (
id int4 not null,
address_comment varchar(100),
geohash varchar(16),
latitude varchar(12),
longitude varchar(12),
street varchar(64),
streetnumber varchar(5),
federalstate_id int4,
zipcode_id int4,
primary key ... |
<reponame>edersonlrf/ulbra-ads-bddii-aulas<filename>livro_cap3_exemplo07.sql
# Exemplo 7: - “Exemplo de chamada de função”
SELECT * FROM tbfuncionario;
SELECT nomefunc, salariofunc, dobro(salariofunc) AS dobro_s FROM tbfuncionario;
SELECT * FROM tbfuncionario WHERE salariofunc > dobro(1000);
UPDATE tbfuncionario SE... |
<filename>sql/images.sql
DROP TABLE IF EXISTS images;
CREATE TABLE images(
id SERIAL PRIMARY KEY,
url VARCHAR(300) NOT NULL,
username VARCHAR(255) NOT NULL,
title VARCHAR(255) NOT NULL,
description TEXT,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
INSERT INTO images (url, username, title... |
<reponame>rosasurfer/mt4-cli
pragma foreign_keys = off;
pragma recursive_triggers = off;
begin;
-- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- RosaSymbols: add update order
create t... |
-- Remove Zonemaster data from database
DROP DATABASE zonemaster;
DROP USER zonemaster;
|
CREATE OR REPLACE FUNCTION to_status(IN bushfireid INTEGER,IN status INT) RETURNS SMALLINT
AS $$
DECLARE reportstatus SMALLINT;
DECLARE snapshotid INTEGER;
DECLARE snapshottype SMALLINT;
--snapshot_type:1 initial, 2 final
DECLARE snapshotcursor CURSOR (bushfireid INTEGER,snapshottype SMALLINT) IS SELECT id FROM b... |
<reponame>zwkjhx/vertx-zero
-- liquibase formatted sql
-- changeset Lang:p-commodity-his-1
-- 库存变更记录:P_COMMODITY_HIS
DROP TABLE IF EXISTS P_COMMODITY_HIS;
CREATE TABLE IF NOT EXISTS P_COMMODITY_HIS
(
`KEY` VARCHAR(36) COMMENT '「key」- 产品变更记录主键',
`CODE` VARCHAR(255) COMMENT '「code」- 产品变更编号(系统可用)... |
library CryosurgeryofProstateDecision version '1.0.0'
using FHIR version '4.0.0'
include FHIRHelpers version '4.0.0' called FHIRHelpers
include CryosurgeryofProstate version '1.0.0' called CryosurgeryofProstate
codesystem "ICD-10-CM": 'http://hl7.org/fhir/sid/icd-10-cm'
codesystem "LOINC": 'http://loinc.org'
codesys... |
--
-- Commit Timestamp
--
SHOW track_commit_timestamp;
CREATE TABLE committs_test(id serial, ts timestamptz default now());
INSERT INTO committs_test DEFAULT VALUES;
INSERT INTO committs_test DEFAULT VALUES;
INSERT INTO committs_test DEFAULT VALUES;
SELECT id,
pg_xact_commit_timestamp(xmin) >= ts,
pg_xa... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Feb 16, 2021 at 02:06 PM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 5.6.40
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
<reponame>onurdogustemel/java101patika<gh_stars>0
-- 1.Command
-- SELECT ROUND(AVG(rental_rate),3) FROM film;
-- 2. Command
-- SELECT COUNT(title) FROM film WHERE title LIKE 'C%';
-- 3. Command
-- SELECT MAX(length) FROM film WHERE rental_rate = 0.99;
-- 4. Command
-- SELECT COUNT(DISTINCT replacement_cost) FROM film W... |
CREATE TABLE IF NOT EXISTS `list` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`ID_shift` int(11),
`Jira_num` text NOT NULL,
`Content` text NOT NULL,
`Action` text NOT NULL,
`Author` text NOT NULL,
`Destination` text NOT NULL,
`Edit_date` int(11) NOT NULL,
`Create_date` int(11) NOT NULL,
PRIM... |
<reponame>denyoe/sql-skills
DROP PROCEDURE IF EXISTS sql_skill_reset;
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `sql_skill_reset`()
BEGIN
-- START TRUNCATE
SET FOREIGN_KEY_CHECKS=0;
TRUNCATE TABLE user;
TRUNCATE TABLE theme;
TRUNCATE TABLE quiz_db;
TRUNCATE TABLE usergroup;
TRUNCATE TABLE sql_qu... |
<reponame>qua-bla/carnivora
---
name: ins_alias
description: Create e-mail aliases
returns: void
templates:
- user.userlogin
- email.insert
parameters:
-
name: p_localpart
type: email.t_localpart
-
name: p_domain
type: dns.t_hostname
-
name: p_mailbox_localpart
type: email.t_localpart
-
name: p_m... |
/*
This software has been released under the MIT license:
Copyright (c) 2009 <NAME>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the r... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 18 Agu 2020 pada 05.44
-- Versi server: 10.4.11-MariaDB
-- Versi PHP: 7.4.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Aug 05, 2021 at 01:51 PM
-- 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=@... |
<filename>legacy/cleaned_export-ts-procedures.sql
/*
navicat sql server data transfer
source server : db5-emswin-neotomadev
source server version : 110000
source host : db5.emswin.psu.edu:1433
source database : neotoma
source schema : ts
target server type : sql server
target server... |
<reponame>aliostad/deep-learning-lang-detection
-- create and fill last_contributions table
CREATE TABLE last_contributions LIKE contributions ;
INSERT INTO last_contributions
SELECT * FROM contributions ORDER BY id DESC LIMIT 200 ;
-- create the trigger
DROP TRIGGER insert_in_last_contributions ;
delimiter |
CREA... |
<reponame>aliostad/deep-learning-lang-detection<filename>data/test/sql/1923af2f0ff991ad4e7ad3e7573acdcc7aeb688aupgrade.sql
CREATE TABLE `mycrm`.`nav_category` (
`id` BIGINT NOT NULL ,
`label` VARCHAR(45) NULL ,
`account` VARCHAR(45) NULL ,
`seq_number` INT NULL ,
`delete_flag` INT NULL ,
`last_modified_by`... |
<gh_stars>10-100
-- file:tstypes.sql ln:24 expect:true
SELECT E'''1 \\''2'''::tsquery
|
<filename>SQL Queries/OperationsManager/Grooming_Logs_OpsDB.sql
select InternalJobHistoryId,
Command,
REPLACE(REPLACE(StatusCode,0,'Failed'),1,'Successful') as 'Status',
TimeStarted,
TimeFinished
from InternalJobHistory WITH (NOLOCK)
order by InternalJobHistoryId DESC |
<reponame>gavinjackson/junkcode
select day, date, type from eco_day where mid in
(select mid from eco_month where pid in
(select pid from eco_property where property_name = 'Ecocrackenback 3' and eid =
(select max(eid) from eco_execution_run)
)
)
order by date;
|
DROP PROCEDURE IF EXISTS InsertArticle;
DELIMITER ##
CREATE PROCEDURE InsertArticle(
IN new_author INT(11),
IN new_title VARCHAR(100),
IN new_content LONGTEXT,
IN new_post_time DATETIME,
IN new_private TINYINT(1))
BEGIN
INSERT INTO article
(author, title, content, post_time, private)
VALUE (n... |
CREATE TABLE `user` (
`user_id` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户id',
`id_number` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '身份证号',
`email` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '邮箱'... |
CREATE TABLE SOURCE_CENTER(
SC_ID NUMERIC(18) NOT NULL DEFAULT nextval('S_SOURCE_CENTER_PK'),
NAME VARCHAR(20) NOT NULL,
DESCRIPTION VARCHAR(40),
LAST_UPDATE_TM TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
ACTIVE_FLAG CHAR(1) DEFAULT 'Y' NOT NUL... |
-- create-db-position.sql: Position Master
-- design has one document
-- position, trades and associated security ids
-- bitemporal versioning exists at the document level
-- each time a document is changed, a new row is written
-- with only the end instant being changed on the old row
create sequence pos_master_seq... |
insert into periods(period_in_hours)
values
(1);
|
<filename>sql/2020/security/feature_adoption_by_technology.sql
#standardSQL
# Adoption of features based on the technology that is used
SELECT
client,
category,
app,
headername,
COUNT(DISTINCT url) AS total_pages_with_technology,
COUNT(DISTINCT IF(STARTS_WITH(url, 'https'), url, NULL)) AS total_https_pages,... |
/*
################################################################################
Migration script to add indexes to Ensembl RestCall History
author: <NAME>
date: 25 April 2017
version: 2.2.0.026
################################################################################
*/
CREATE INDEX ENSEMBL_RESTCALL_H... |
<filename>SQL/v5/backup/create_CDMv5_indices.sql
/*********************************************************************************
# Copyright 2016 Observational Health Data Sciences and Informatics
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance... |
<filename>resources/sql/patches/20130820.filemailkey.sql
ALTER TABLE {$NAMESPACE}_file.file
ADD `mailKey` varchar(20) NOT NULL;
|
select e.Name as Employee from Employee e left join Employee b on e.ManagerId = b.Id where e.Salary > b.Salary; |
DROP VIEW IF EXISTS view_kartu_barang2_bpmpd;
CREATE VIEW view_kartu_barang2_bpmpd AS
SELECT
*,
sum(pra_saldo) OVER (PARTITION BY kode_barang ORDER BY tanggal, id_persediaan) as saldo
FROM
view_kartu_barang_bpmpd
WHERE
1 = 1 AND
id_skpd = 10;
GRANT ALL PRIVILEGES ON view_kartu_barang2_bpmpd TO lap_bpmpd;
REVOK... |
<reponame>JaneliaSciComp/DatabaseScripts
select date_add(max(end_time),INTERVAL 1 DAY) into @start_time from compute_chargeback;
select date_add(max(end_time),INTERVAL 1 MONTH) into @end_time from compute_chargeback;
select date_add(date_format(date_add(max(close_date), INTERVAL 1 MONTH),'%Y-%m-01'), INTERVAL 14 DAY)... |
<filename>openGaussBase/testcase/KEYWORDS/unusable/Opengauss_Function_Keyword_Unusable_Case0027.sql
-- @testpoint:opengauss关键字unusable非保留),作为序列名
--关键字不带引号-成功
drop sequence if exists unusable;
create sequence unusable start 100 cache 50;
drop sequence unusable;
--关键字带双引号-成功
drop sequence if exists "unusable";
create... |
<filename>database/alihshawon_activejobs.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.9.7
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Aug 23, 2021 at 08:38 AM
-- Server version: 10.3.29-MariaDB-cll-lve
-- PHP Version: 7.3.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT... |
---- CREATING TABLES ----
CREATE TABLE public.metrics (
id INTEGER PRIMARY KEY,
host_id INTEGER,
created_at TIMESTAMP,
cpu_la1 FLOAT,
cpu_la5 FLOAT,
cpu_la15 FLOAT,
mem_used INTEGER,
mem_free INTEGER,
disk_used INTEGER,
disk_free INTEGER
);
CREATE TABLE public.hosts (
id IN... |
<gh_stars>0
/*
@Author: <NAME>
Date: 2017-05-03
So I created the schema in:
SchemAllThePeopleCreation.sql
Here I fill it up and test it to make sure the
INNER JOIN works as expected.
*/
INSERT INTO person (name) VALUES ('Tom');
INSERT INTO person (name) VALUES ('Neil');
INSERT INTO tissue (location, person_id_fk... |
<reponame>junicotandiago198/dpmptsp<filename>dalak.sql
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 29, 2021 at 03:20 PM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.2.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Aug 01, 2017 at 01:10
-- Server version: 10.1.19-MariaDB
-- PHP Version: 7.0.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACT... |
CREATE TABLE [dbo].[Locations] (
[Id] INT IDENTITY(1,1) NOT NULL,
[Name] VARCHAR (100) NOT NULL,
CONSTRAINT [PK_Locations] PRIMARY KEY CLUSTERED ([Id] ASC)
);
|
insert into foo select a from b straight_join c on d;
|
<filename>db/db/3table/upright/BATCH_PARAM_TABLE_DEF.sql
drop table if exists BATCH_PARAM_TABLE_DEF;
/*==============================================================*/
/* Table: BATCH_PARAM_TABLE_DEF */
/*==============================================================*/
create t... |
<filename>src/test/resources/postgres-set1/V1.01__trunk-table.sql
CREATE SCHEMA siptrunk;
SET search_path = siptrunk, pg_catalog;
CREATE TABLE trunk (
trunk_id integer NOT NULL,
name character varying(64)[] NOT NULL,
created_date integer NOT NULL,
last_updated integer NOT NULL,
deleted boolean NOT NULL,
delete... |
select SQL_BUFFER_RESULT * from table1;
|
-- inf 开头的 DB
CREATE TABLE IF NOT EXISTS "inf_config" (
"id" int NOT NULL GENERATED BY DEFAULT AS IDENTITY,
"group" varchar(50) NOT NULL,
"type" tinyint NOT NULL,
"name" varchar(100) NOT NULL DEFAULT '',
"key" varchar(100) NOT NULL DEFAULT '',
"value" varchar(500) NOT NULL DEFAULT '',
"sens... |
<reponame>uk-gov-mirror/ministryofjustice.hmpps-auth
alter table oauth_client_details
add created DATETIME2 NOT NULL DEFAULT CURRENT_TIMESTAMP;
alter table oauth_client_details
add secret_updated DATETIME2 NOT NULL DEFAULT CURRENT_TIMESTAMP;
|
INSERT INTO [STAGE].[SURFACE_DATA] VALUES ( 'SX6I03B', 56.1468, 1.0000);
INSERT INTO [STAGE].[SURFACE_DATA] VALUES ( 'SX6I03B', 51.2325, 0.0000);
INSERT INTO [STAGE].[SURFACE_DATA] VALUES ( 'SX6I03B', 46.3181, 8.5039);
INSERT INTO [STAGE].[SURFACE_DATA] VALUES ( 'SX6I03B', 41.4037, 95.0000);
INSERT INTO [STAGE].[SURFAC... |
<reponame>unifuzz/seeds
CREATE TABLE t1(a,b,c);EXPLAIN
INSERT INTO t1 VALUES(1,2,3);
INSERT INTO t1 VALUES(-1,-2,-3);
INSERT INTO t1 VALUES('000','000','000');
INSERT INTO t1 VALUES(1.5,2.05,3.005);
SELECT printf('0%200c',?/b,c) FROM t1 ORDER BY rowid;
|
<gh_stars>1-10
CREATE TABLE ptcore.parse_result (
id BIGSERIAL PRIMARY KEY NOT NULL,
program_id BIGINT NOT NULL,
created TIMESTAMP WITHOUT TIME ZONE NOT NULL DEFAULT now(),
user_name VARCHAR(200),
workouts VARCHAR(1000),
errors VARCHAR(1000),
FOREIGN KEY (program_id) REFERENCES ptcore.progra... |
CREATE TABLE ObservationEvents (
`_id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
`createdAt` timestamp NOT NULL ,
`observation_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`eventType` ENUM( 'DETERMINATION_ADDED', 'DETERMINATION_APPROVED', 'DETERMINATION_EXPERT_APPROVED', 'COMMENT_ADDED' ) NOT NULL,
`d... |
-- openv2.test
--
-- db eval {CREATE TABLE t1(x)}
CREATE TABLE t1(x) |
-- file:portals.sql ln:525 expect:true
explain (costs off) declare c1 scroll cursor for select (select 42) as x
|
<reponame>Shuttl-Tech/antlr_psql
-- file:aggregates.sql ln:527 expect:true
select sum(1/ten) filter (where ten > 0) from tenk1
|
<filename>data/sql/swganh_static/procedures/sp_GetMapLocations.sql
DELIMITER $$
DROP PROCEDURE IF EXISTS `sp_GetMapLocations` $$
CREATE PROCEDURE `sp_GetMapLocations`()
BEGIN
SELECT loc.id, loc.planet_id AS scene_id, loc.x, loc.z AS y, icon, loc.name, cat.main AS category_main, cat.sub AS category_sub
FROM planetm... |
USE compass_db;
INSERT INTO
courses(id, title, required)
VALUES
('CM1005', 'Introduction to Programming I', true),
('CM1010', 'Introduction to Programming II', true),
('CM1015', 'Numerical Mathematics', true),
('CM1020', 'Discrete Mathematics', true),
(
'CM1025',
'Fundamentals of Computer Science',
true
)... |
-- 2020-04-09T12:40:25.751Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Element_Trl SET Description='This is a Sales Transaction',Updated=TO_TIMESTAMP('2020-04-09 15:40:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Language='en_US' AND AD_Element_ID=1106
;
-- 2020-04-09T12:40:25.7... |
<gh_stars>0
CREATE TABLE location_mapping
(
id UUID NOT NULL,
location_id UUID NOT NULL,
ir_location_id UUID NOT NULL,
central_server_id UUID NOT NULL,
created_by VARCHAR(255) NOT NULL,
created_date TIMESTAMP NOT NULL,
... |
use sakila;
create table rentals_may as (
select *
from Rental
where rental_date like '%-05-%');
select * from rentals_may;
insert into rental_may values(1, 2, 24-05-2005);
create table rental_june as(
select *
from rental
where rental_date like '%-06-$');
select * from rentals_june;
insert into rental_june values( ... |
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: bhxb34dz8w6nd0kqt7vl-mysql.services.clever-cloud.com:3306
-- Generation Time: Jun 15, 2021 at 10:48 PM
-- Server version: 8.0.22-13
-- PHP Version: 7.2.34
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SE... |
create table REPORT_GROUP (
ID uuid not null,
CREATE_TS timestamp,
CREATED_BY varchar(50),
VERSION integer,
UPDATE_TS timestamp,
UPDATED_BY varchar(50),
--
TITLE varchar(255) not null,
CODE varchar(255),
LOCALE_NAMES text,
--
primary key (ID)
)^
------------------------------------------------... |
spool /tmp/create_database.log
create database "tibero"
user sys identified by tibero
maxinstances 8
maxdatafiles 100
character set UTF8
national character set UTF16
logfile
group 1 'log001.log' size 100M,
group 2 'log002.log' size 100M,
group 3 'log003.log' size 100M
maxloggroups 255
maxlogmembers 8
noarchivelog
d... |
<filename>query/compute/compute_firewall_rule_ssh_access_restricted.sql
with ip_protocol_all as (
select
name
from
gcp_compute_firewall
where
direction = 'INGRESS'
and action = 'Allow'
and source_ranges ?& array['0.0.0.0/0']
and (allowed @> '[{"IPProtocol":"all"}]' or allowed::text like '%... |
drop table if exists meta_field;
drop table if exists meta_model;
/*==============================================================*/
/* Table: meta_field */
/*==============================================================*/
create table meta_field
(
ID i... |
<gh_stars>1000+
SELECT repeat('abcdefghijklmnopqrstuvwxyz', number * 100) AS haystack, extractAllGroupsHorizontal(haystack, '(\\w)') AS matches FROM numbers(1023); -- { serverError 128 }
SELECT count(extractAllGroupsHorizontal(materialize('a'), '(a)')) FROM numbers(1000000) FORMAT Null; -- shouldn't fail
|
-- phpMyAdmin SQL Dump
-- version 4.5.4.1
-- http://www.phpmyadmin.net
--
-- Host: localhost:3306
-- Generation Time: 06-Mar-2016 às 13:44
-- Versão do servidor: 5.6.28
-- PHP Version: 5.6.18
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE... |
--+ holdcas on;
set system parameters 'dont_reuse_heap_file=yes';
create table t1(
a char(1200),
b varchar(1200),
c nchar(1200),
d NCHAR VARYING(1200),
e BIT(1200),
f BIT VARYING(1200),
g int,
h SMALLINT,
i BIGINT,
j NUMERIC,
k FLOAT,
l DOUBLE,
m MONETARY,
n DATE,
o TIME,
p TIMESTAMP,
... |
drop table if exists blogs;
create table blogs (
blog_id integer primary key autoincrement,
name text not null,
title_zh text,
author text,
release text,
revise text,
tags text,
abstract text,
toc text,
content text
);
drop table if exists users;
create table users (
user_id text not null,
user... |
INSERT INTO public.swuser(
id, name, email, password, created, photo, enable, obs, city)
VALUES (DEFAULT, 'Alexandre', '<EMAIL>', '0CC175B9C0F1B6A831C399E269772661', now(), NULL, TRUE, NULL, NULL);
INSERT INTO public.sworganization(
id, admin, name, description, created)
VALUES (DEFAULT, currval('swuser_id_seq'),... |
<gh_stars>0
USE BUDT703_Project_0501_09;
BEGIN TRANSACTION;
IF EXISTS (
SELECT *
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME = 'TerpsandBurps.Suggest' AND TABLE_SCHEMA = 'dbo' )
ALTER TABLE [TerpsandBurps.Suggest]
DROP CONSTRAINT IF EXISTS fk_Suggest_resId;
IF EXISTS (
SELECT *
FROM INFORMATION_SCHEMA.TA... |
SELECT customers.name,order_date,sku,quan
FROM items, orders LEFT JOIN customers ON customers.cid = orders.cid
WHERE items.oid = orders.oid
AND order_date > '2011-01-01'
|
CREATE TABLE [dbo].[MeetOfficial]
(
[Id] BIGINT IDENTITY(1, 1) NOT NULL,
[MeetId] BIGINT NOT NULL,
[OfficeId] BIGINT NOT NULL,
[MemberId] BIGINT NOT NULL,
[CreatedUtc] DATETIMEOFFSET N... |
<filename>db/upgrade2.0.sql
ALTER TABLE `oa_doc` CHANGE `lib` `lib` mediumint(8) unsigned NOT NULL AFTER `project`,
CHANGE `module` `module` mediumint(8) unsigned NOT NULL AFTER `lib`;
ALTER TABLE `oa_relation` RENAME TO `sys_relation`;
UPDATE `cash_trade` SET `type` = 'out' WHERE `type` = 'fee';
ALTER TABLE `cash_t... |
<gh_stars>0
CREATE TABLE [dbo].[Dim_Tempo]
(
[Cod_Dia] NVARCHAR(50) NOT NULL PRIMARY KEY,
[Data] DATE NULL,
[Cod_Semana] INT NULL,
[Nome_Dia_Semana] NVARCHAR(50) NULL,
[Cod_Mes] INT NULL,
[Nome_Mes] NVARCHAR(50) NULL,
[Cod_Mes_Ano] NVARCHAR(50) NULL,
[Nome_Mes_Ano] NVARCHAR(50) NULL... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 06, 2021 at 08:30 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
<filename>closedaydata/OLD/IAT1509190937.sql
INSERT INTO pos_itemtemp VALUES("IATT190002625","193083","191001","192001","30000","1","30000","0","30000","1","1","1","IAT1509190937","NHO2018000007","PAID","pedes level 1","193083"),
("IATT190002625","193054","191002","192010","20000","1","20000","0","20000","1","1","1","I... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 21, 2020 at 10:21 PM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.3.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40... |
<UserData Version="2.3.3.0">
<Properties />
</UserData> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.