sql stringlengths 6 1.05M |
|---|
<gh_stars>1-10
ALTER TABLE posts MODIFY inserted_date date NOT NULL
ALTER TABLE posts MODIFY inserted_date date NULL |
<filename>src/main/resources/data.sql
INSERT INTO author (id, first_name, last_name, email, date_of_birth)
VALUES (1, 'John', 'Doe', '<EMAIL>', TO_DATE('20/09/1976', 'DD/MM/YYYY'));
INSERT INTO author (id, first_name, last_name, email, date_of_birth)
VALUES (2, 'David', 'Jacobson', '<EMAIL>', TO_DATE('01/03/198... |
--+ holdcas on;
set names utf8;
create table t1 (s1 string collate utf8_ko_cs_uca);
create table t2 (s1 string collate utf8_gen);
insert into t1 values ('가伽각가'), ('가伽伽가');
insert into t2 values ('가伽각가'), ('가伽伽가');
select trim ('가' FROM s1) from t1 order by 1;
select trim ('가' FROM s1) from t2 order by 1;
select t... |
drop table if exists a;
create table a ( id int, s string collate binary, s1 string collate binary);
insert into a values (1, '','12345abcdeabcde') , (2,'b','12345abcdeabcde');
select s, s1, position(s in s1) from a;
drop table if exists a;
|
-- @testpoint:opengauss关键字dec(非保留),作为角色名
--关键字不带引号-成功
drop role if exists dec;
create role dec with password '<PASSWORD>' valid until '2020-12-31';
drop role dec;
--关键字带双引号-成功
drop role if exists "dec";
create role "dec" with password '<PASSWORD>' valid until '2020-12-31';
drop role "dec";
--关键字带单引号-合理报错
drop role... |
-- @testpoint: create gin index:在同一列上多个索引
SET ENABLE_SEQSCAN=off;
RESET ENABLE_INDEXSCAN;
RESET ENABLE_BITMAPSCAN;
show ENABLE_SEQSCAN;
show ENABLE_INDEXSCAN;
show ENABLE_BITMAPSCAN;
--partition table
DROP TABLE IF EXISTS test_gin_student_row;
CREATE TABLE test_gin_student_row
(
num int,
data1 text,
d... |
<gh_stars>0
USE [DevTest]
GO
DROP TABLE IF EXISTS dbo.TableC;
GO
CREATE TABLE [dbo].[TableC](
[ID] [int] IDENTITY(1,1) NOT NULL,
[DirPath] [varchar](1024) NULL,
[FileCount] [int] NULL,
[ChangeDate] [datetime] NULL,
CONSTRAINT [PK__TableC__3214EC2772A462E2] PRIMARY KEY CLUSTERED
(
[ID] ASC
)WITH (PAD_INDEX = OFF... |
create procedure table_copy(@tablecount int)
as
begin
set nocount on;
DECLARE @v_max_table int;
DECLARE @v_counter_table int;
DECLARE @tnamee VARCHAR(255);
set @v_max_table = @tablecount;
set @v_counter_table = 1;
while @v_counter_table < @v_max_table begin
set @tnamee = concat('SELECT * INTO test_', @v_counter_table... |
<reponame>rominamanik/Tugas_ci<filename>tokoaja.sql
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 06 Feb 2019 pada 18.25
-- Versi server: 10.1.36-MariaDB
-- Versi PHP: 7.2.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION... |
SELECT SUM(POPULATION)
FROM CITY
WHERE DISTRICT = "California" or DISTRICT = "CALIFORNIA"
|
<reponame>jhrabows/autopipes
create table floor_drawing(
id INT GENERATED BY DEFAULT AS IDENTITY,
name VARCHAR(255) NOT NULL,
upd_date TIMESTAMP,
text_size NUMBER,
configuration CLOB,
CONSTRAINT floor_drawing_pk PRIMARY KEY(id),
CONSTRAINT floor_drawing_uk UNIQUE(name)
);
create table floor_area(
drawin... |
<reponame>devopsmanojn/laraclassified
-- MySQL dump 10.13 Distrib 5.7.26, for osx10.10 (x86_64)
--
-- Host: 127.0.0.1 Database: laraclassified
-- ------------------------------------------------------
-- Server version 5.7.26
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARA... |
{### To fill subtype combobox ###}
{% if subtype %}
SELECT DISTINCT typ.typname AS stype,
(CASE WHEN typ.typcollation > 0 THEN true ELSE false END) AS is_collate
FROM pg_opclass opc
JOIN pg_type typ ON opc.opcintype = typ.oid
WHERE opc.opcmethod = 403
ORDER BY 1
{% endif %}
{### To fill subtype opclass combobox... |
<reponame>Neo-Florescence/neo-expensive
/*
Warnings:
- The primary key for the `permissions` table will be changed. If it partially fails, the table could be left without primary key constraint.
- The primary key for the `roles` table will be changed. If it partially fails, the table could be left without primar... |
-- 1. Elimine la tabla, si existe:
DROP TABLE IF EXISTS vehiculos;
-- 2. Cree la tabla:
create table vehiculos(
patente CHAR(6) NOT NULL,
tipo CHAR(4),
horallegada TIME NOT NULL,
horasalida TIME,
PRIMARY KEY (patente,horallegada)
);
-- 3. Ingrese algunos registros:
INSERT INTO vehiculos (patente,tipo,hor... |
<gh_stars>0
use gym_app_db;
INSERT INTO Appointments (userName, month, day, time, am_pm, gym, photo, RookieUserName, ExpertUserName) VALUES ("rdavis", "9", "18", "1", "pm", "1234", "http://s2.dmcdn.net/KXGeE/320x180-DbQ.jpg", NULL, "rdavis");
INSERT INTO Appointments (userName, month, day, time, am_pm, gym, photo, Roo... |
-- Insert data
-- crypted https://www.dailycred.com/article/bcrypt-calculator
INSERT INTO users
VALUES (1, 'admin', '<EMAIL>', <PASSWORD>.');
INSERT INTO users
VALUES (2, 'user', '<EMAIL>', <PASSWORD>');
INSERT INTO roles VALUES (1, 'ROLE_USER'); -- ROLE_USER in class Constants
INSERT INTO roles VALUES (2, 'ROLE_ADMIN... |
select
A.*
from
information_schema.TABLES A
where 1 = 1
-- and TABLE_SCHEMA = 'information_schema'
and TABLE_SCHEMA = 'com'
;
/*
테이블정의서
[별지 10] 테이블정의서(공공기관의 데이터베이스 표준화 지침)
물리DB명
테이블소유자
테이블 영문명
테이블한글명
테이블 유형
관련엔터티명
테이블설명
업무분류체계
보존 기간
테이블 볼륨
발생주기
공개/비공개사유
*/
select
'goddb01' as "물리DB명", /* 정보시스템에... |
<reponame>chema-mengibar/northern-ireland-medical-report<gh_stars>0
ALTER TABLE dbo.D_PRACTICE ADD
CONSTRAINT D_PRACTICE_UNQ1 UNIQUE( "ID_PRACTICE_ORG" );
ALTER TABLE [dbo].F_PRESCRIBING ADD
CONSTRAINT F_PRESCRIBING_FK4
FOREIGN KEY ("ID_PRACTICE") REFERENCES [dbo].[D_PRACTICE]("ID_PRACTICE_ORG"); |
<gh_stars>0
CREATE TABLE IF NOT EXISTS form_assessment_intake (
id bigint(20) NOT NULL auto_increment,
date datetime default NULL,
pid bigint(20) default NULL,
user varchar(255) default NULL,
groupname varchar(255) default NULL,
authorized tinyint(4) default NULL,
activity tinyint(4) default NULL,
dcn varchar(10) defau... |
DROP VIEW AVERAGES_ROUTE_1;
DROP VIEW AVERAGES_ROUTE_5;
DROP VIEW AVERAGES_TRIP_1;
DROP VIEW AVERAGES_TRIP_5;
DROP SOURCE avgr1;
DROP SOURCE avgr5;
DROP SOURCE avgt1;
DROP SOURCE avgt5;
|
CREATE TABLE IF NOT EXISTS public."Keys"
(
"id" uuid NOT NULL,
"public_key" VARCHAR(128) NOT NULL,
CONSTRAINT "PK_ID" PRIMARY KEY (id)
) |
<reponame>anrodigina/ClickHouse
DROP TABLE IF EXISTS alter;
CREATE TABLE alter (d Date DEFAULT toDate('2015-01-01'), n Nested(x String)) ENGINE = MergeTree(d, d, 8192);
INSERT INTO alter (`n.x`) VALUES (['Hello', 'World']);
SELECT * FROM alter;
SELECT * FROM alter ARRAY JOIN n;
SELECT * FROM alter ARRAY JOIN n WHERE... |
<gh_stars>1-10
-- 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.
/****** Script for SelectTopNRows ... |
<gh_stars>1-10
select name
from alicloud_ecs_key_pair
where name = 'dummy-{{output.key_name.value}}'; |
SELECT *
FROM (SELECT A = 1,
[BY] = 2,
C = 3
UNION ALL
SELECT A = 4,
[BY] = 5,
C = 6
) AS Data(A, [BY], C) |
<reponame>krattai/AEBL
#These are the changes to upgrade to Cclite 0.5.0
ALTER TABLE `om_registry` ADD `allow_ip_list` VARCHAR( 60 ) NOT NULL AFTER `merchant_key` ;
ALTER TABLE `om_users` CHANGE `userPin` `userPublickey` TEXT DEFAULT NULL ;
ALTER TABLE `om_registry` ADD `latest_news` TEXT NOT NULL ;
# this swap... |
<reponame>yilegel/win.last
create table test11
(
id int(6) primary key auto_increment,
song_name char(20) not null,
songer char(8) not null,
description text
);
insert into test11 values('','如水','卫兰','难过亦过,难道我嫌损失未多'); |
<gh_stars>1-10
--+ holdcas on;
set system parameters 'alter_table_change_type_strict=yes';
drop table if exists foo;
create table foo(a int auto_increment, b char(20), c smallint default 22)auto_increment=100;
insert into foo(b) values('aaa');
alter table foo change a aa int auto_increment;
alter table foo modify b c... |
-- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Feb 20, 2015 at 12:14 AM
-- Server version: 5.5.41-0ubuntu0.14.04.1
-- PHP Version: 5.5.9-1ubuntu4.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CL... |
-- +migrate Up
CREATE TABLE currencies
(
code varchar(4) PRIMARY KEY,
precision int not null
);
INSERT INTO currencies
VALUES ('USD', 2),
('EUR', 2),
('BTC', 8);
CREATE TABLE accounts
(
id uuid PRIMARY KEY,
currency_code varchar(4) not null references currencies (code),
... |
<filename>tests/test_support/base-users-setup.sql
insert into role (name) values ('anonymous'),('admin'),('editor');
insert into users (first_name,last_name,password,email) values ('Admin','BEIS-Person','<PASSWORD>!','<EMAIL>');
insert into users (first_name,last_name,password,email) values ('Editor','BEIS-Person','... |
CREATE TABLE "tags" (
"id" bigserial NOT NULL,
"name" text NOT NULL UNIQUE,
"count" bigint DEFAULT 0,
"type" smallint DEFAULT 0,
CONSTRAINT "pk_tagid" PRIMARY KEY ( "id" ),
CONSTRAINT "uq_name" UNIQUE ( "name" )
);
|
<filename>SQL/Aggregation/Weather Observation Station 13.sql
-- https://www.hackerrank.com/challenges/weather-observation-station-13/problem
SELECT FORMAT(ROUND(SUM(LAT_N),2),'###.##'), FORMAT(ROUND(SUM(LONG_W),2), '###.##')
FROM STATION
|
SELECT c.name, ic.is_descending_key FROM sys.tables t
INNER JOIN sys.schemas s ON t.schema_id = s.schema_id
INNER JOIN sys.indexes i ON i.object_id = t.object_id
INNER JOIN sys.index_columns ic ON ic.object_id = t.object_id AND ic.index_id = i.index_id
INNER JOIN sys.columns c ON c.object_id = t.object_id AND c.column_... |
<reponame>Exeta/exeta
set schema 'exeta';
create or replace function control_list_features
( integer -- task_id
) returns text
language sql
as
$$
with recursive
ti (position, name, identifier_type_id) as (select position, name, identifier_type_id from task_identifiers where task_id = $1 and identifier_type_id ... |
-- phpMyAdmin SQL Dump
-- version 5.1.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 30, 2022 at 04:56 AM
-- Server version: 10.4.22-MariaDB
-- PHP Version: 7.4.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
-- CreateTable
CREATE TABLE "Room" (
"id" SERIAL NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "Message" (
"id" SERIAL NOT NULL,
"payload" TEXT NOT NULL,
"createdAt" TIMESTAMP(3) N... |
CREATE PROCEDURE [GalleryPicture_GetFull]
(
@GalleryId INT = -1,
@CategoryId INT
)
AS
SET NOCOUNT ON
SELECT p.GalleryId, p.Caption, p.Thumbnail, p.ImageURL,
pc.Title AS CategoryName, pc.CategoryId
FROM Gallery p
INNER JOIN GalleryCategory pc ON p.CategoryId = pc.CategoryId
WHERE (p.IsA... |
<reponame>defpub/defpub-rest-service
create table if not exists user (
id char(32) not null,
username varchar(255),
encrypted_password varchar(255),
role char(32),
primary key (id));
create table if not exists publication (
id char(32) not null,
message varchar(255),
user_id char(32) no... |
<filename>backend/postgres_db/postgres/sql/09_language_get.sql
/*************************************************************************************
* language: GET view
*************************************************************************************/
BEGIN;
/* Cleanup */
DROP VIEW IF EXISTS get_language;
/*... |
-- phpMyAdmin SQL Dump
-- version 4.1-dev
-- https://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jun 25, 2013 at 05:44 PM
-- Server version: 5.5.27-log
-- PHP Version: 5.4.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIEN... |
<filename>db_sql/toko_online.sql
-- MariaDB dump 10.19 Distrib 10.6.4-MariaDB, for Linux (x86_64)
--
-- Host: localhost Database: toko_online
-- ------------------------------------------------------
-- Server version 10.4.21-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @O... |
<gh_stars>0
INSERT INTO Sheet2 (DateField, IntegerField, Text, DecimalField) VALUES (1261783140000, 1000, 'Text 172.722035879186', 172.722035879186);
INSERT INTO Sheet2 (DateField, IntegerField, Text, DecimalField) VALUES (1251059520000, 1001, 'Text 48.647887773539', 48.647887773538955);
INSERT INTO Sheet2 (DateField... |
select ifnull
(select distinct Salary from Employee
order by Salary desc limit 1, 1) null as SecondHighestSalary |
DROP TABLE IF EXISTS `order_master`;
CREATE TABLE `order_master` (
`order_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '订单ID',
`order_sn` bigint(20) unsigned NOT NULL COMMENT '订单编号 yyyymmddnnnnnnnn',
`customer_id` int(10) unsigned NOT NULL COMMENT '下单人ID',
`order_money` decimal(8,2) NOT NULL COMMENT '订... |
-- 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.
PRINT N'Adding foreign keys to [edfi].[StudentSpec... |
<gh_stars>1-10
----------------------------------------------------------------
-- [user_profiles] Table
--
CREATE OR REPLACE FUNCTION InsertUserProfile (
v_profile_id UUID,
v_user_id UUID,
v_ssh_public_key_id UUID,
v_ssh_public_key TEXT
)
RETURNS VOID AS $PROCEDURE$
BEGIN
INSERT INTO user_pro... |
insert into user_info (
id,
name,
add_date,
depart_team,
job_level,
e_mail,
password,
state
) values (
'ehdvudee',
'신동평',
now(),
'rd2',
'slave',
'<EMAIL>',
'<PASSWORD>',
0
);
-- root cert 추가해야함
|
<gh_stars>1-10
-- simple booleans
result := true;
result := false;
result := null;
result := status;
result := var%FOUND;
result := var%ISOPEN;
result := var%NOTFOUND;
result := :var%FOUND;
result := :var%ISOPEN;
result := :var%NOTFOUND;
result := SQL%FOUND;
result := SQL%ISOPEN;
result := SQL%NOTFOUND;
-- composi... |
CREATE TABLE SCHEMA_TEST.TEST_TBL2 (
TEST_TBL2_ID BIGINT NOT NULL COMMENT 'TEST_TBL2_ID',
TEST_TBL1_ID BIGINT NOT NULL COMMENT 'TEST_TBL1_ID',
TEST_NAME VARCHAR(20) NULL DEFAULT NULL COMMENT 'TEST_NAME'
)
COMMENT='テストテーブル2' |
<gh_stars>10-100
CREATE TYPE policy.incentive_state_enum AS enum('regular', 'null', 'disabled');
ALTER TABLE policy.incentives
ADD COLUMN datetime timestamp WITH time zone,
ADD COLUMN result integer NOT NULL DEFAULT 0,
ADD COLUMN state policy.incentive_state_enum NOT NULL DEFAULT 'regular';
UPDATE policy.incent... |
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3306
-- Время создания: Ноя 30 2017 г., 23:53
-- Версия сервера: 5.5.53
-- Версия PHP: 5.6.29
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ... |
ALTER TABLE "public"."producer" ADD COLUMN "block_net_limit" integer NULL;
|
-- MySQL dump 10.13 Distrib 5.7.32, for Linux (x86_64)
--
-- Host: localhost Database: currencies
-- ------------------------------------------------------
-- Server version 5.7.32-0ubuntu0.18.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER... |
CREATE TABLE IF NOT EXISTS "metrics" (
"value" INTEGER NOT NULL,
"harvestedAt" DATETIME NOT NULL,
"level" TINYINT DEFAULT 0 NOT NULL
);
|
UPDATE
COMMANDES_NOTIFICATIONS
SET
destinatairesQuery = "WITH validDef AS (SELECT mailPersonne, prenomPersonne FROM CENTRE_COUTS_PERSONNES c INNER JOIN PERSONNE_REFERENTE p ON c.idPersonne = p.idPersonne WHERE idCentreDeCout = (SELECT idCentreDeCout FROM COMMANDES WHERE idCommande = :idCommande) AND ( montantMaxValid... |
<filename>database.sql<gh_stars>0
CREATE DATABASE `ip_watch` CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
USE ip_watch;
CREATE TABLE `ip_logs` (
`log_id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`requested_on` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`http_client` VARCHAR(255) NOT NULL,
`ip_addr... |
-- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Client : 127.0.0.1
-- Généré le : Jeu 24 Août 2017 à 15:26
-- Version du serveur : 5.7.14
-- Version de PHP : 7.0.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... |
<reponame>tabeldatadotcom/springboot-archetype
-- data menu resource-postgresql96
insert into COMPONENT_MENUS(ID, TITLE, PATH, ICON_ID, IS_MENU, CREATED_BY, module, PARENT_ID)
VALUES ('001', 'Dashboard', '/dashboard', null, 0, 'migration', 'webapp', null);
insert into COMPONENT_MENUS(ID, TITLE, PATH, ICON_ID, IS_MENU, ... |
CREATE TABLE [dbo].[Reservation]
(
[Id] UNIQUEIDENTIFIER NOT NULL PRIMARY KEY,
[AccountId] BIGINT NOT NULL,
[IsLevyAccount] TINYINT NOT NULL,
[CreatedDate] DATETIME NOT NULL DEFAULT GETDATE(),
[StartDate] DATETIME NULL,
[ExpiryDate] DATETIME NULL,
[Status] TINYINT NOT NULL DEFAULT 0,
[CourseId] VARCHAR... |
<filename>agi_leitungskataster_pub/agi_leitungskataster_pub_abwasser_schacht.sql
SELECT
row_number() OVER ()::integer AS t_id,
knoten.lage AS geometrie,
bauwerk.baujahr,
bauwerk.bezeichnung,
bauwerk.baulicherzustand AS baulicherzustand,
organisation.bezeichnung AS eigentuemer,
bauwerk... |
-- # Problem: https://www.hackerrank.com/challenges/what-type-of-triangle/problem
-- # Score: 20
SELECT
CASE
WHEN A + B <= C OR A + C <= B OR B + C <= A THEN 'Not A Triangle'
WHEN A = B AND A = C AND B = C THEN 'Equilateral'
WHEN A = B OR A = C OR B = C THEN 'Isosceles'
ELSE 'Scale... |
CREATE TABLE IF NOT EXISTS listAddresses (
id INTEGER PRIMARY KEY AUTOINCREMENT,
address VARCHAR(255),
createdAt int
)
|
<filename>src/main/resources/db/migration/V0.1.0.37__pincodes_737.sql
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_C... |
DROP KEYSPACE IF EXISTS cyanite_test;
CREATE KEYSPACE IF NOT EXISTS cyanite_test WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'} AND durable_writes = true;
USE cyanite_test;
CREATE TYPE IF NOT EXISTS metric_point (
max double,
mean double,
min double,
sum double
);
CREATE TYPE IF N... |
<reponame>cityofaustin/transportation-vz-data
--
-- PostgreSQL database dump
--
-- Dumped from database version 10.6
-- Dumped by pg_dump version 10.10
-- Started on 2019-10-15 13:52:44 CDT
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET... |
<reponame>rjakubco/jboss-migration
DROP TABLE BUSINESS_DESCR;
DROP TABLE BUSINESS_CATEGORY;
DROP TABLE BUSINESS_IDENTIFIER;
DROP TABLE BUSINESS_NAME;
DROP TABLE DISCOVERY_URL;
DROP TABLE ADDRESS_LINE;
DROP TABLE ADDRESS;
DROP TABLE PHONE;
DROP TABLE EMAIL;
DROP TABLE CONTACT_DESCR;
DROP TABLE CONTACT;
DROP TABLE SERVIC... |
### Punto 3, 4, 5, 6 ###
SELECT HIGH_PRIORITY STRAIGHT_JOIN c.name, t.first_name, st.last_name, st.first_name
FROM course AS c
INNER JOIN teacher AS t ON c.assigned_teacher = t.id
INNER JOIN student_by_course AS st_c ON c.id = st_c.course
INNER JOIN student AS st ON st_c.student = st.registration_number
WHERE c.id ... |
library "Inheritance" version '1.0.0'
using "Abstract" version '1.0.0'
context Alpha
define "validLetterA":
[Alpha] a where
a.id > 1
and a.index = 1
define "cohort":
exists("validLetterA")
|
-- Deploy ggircs-portal:tables/gas_001 to pg
-- requires: tables/gas
begin;
alter table ggircs_portal.gas add column is_ciip_emission boolean default true;
create unique index gas_gas_type_uindex on ggircs_portal.gas(gas_type);
comment on column ggircs_portal.gas.is_ciip_emission is 'boolean column indicates whether... |
REVOKE ALL ON public.smart_metering_device FROM osp_admin;
REVOKE SELECT ON public.smart_metering_device FROM osgp_read_only_ws_user;
ALTER TABLE smart_metering_device RENAME TO smart_meter;
GRANT ALL ON public.smart_meter TO osp_admin;
GRANT SELECT ON public.smart_meter TO osgp_read_only_ws_user; |
<gh_stars>0
CREATE USER MAPPING FOR postgres SERVER test_fs_for_user_mapping
OPTIONS ("user" 'test_user', password '<PASSWORD>');
|
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.0.10.10
-- http://www.phpmyadmin.net
--
-- Хост: 127.0.0.1:3306
-- Время создания: Апр 11 2016 г., 21:05
-- Версия сервера: 5.5.45
-- Версия PHP: 5.5.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER... |
<reponame>TCIA/common-security-module
/*L
Copyright Ekagra Software Technologies Ltd.
Copyright SAIC, SAIC-Frederick
Distributed under the OSI-approved BSD 3-Clause License.
See http://ncip.github.com/common-security-module/LICENSE.txt for details.
L*/
#USE csm_dev_bkwrdscmptbl_3_1;
ALTER TAB... |
<filename>sql/_06_manipulation/_01_select/_017_and_or/cases/1001.sql
--Test OR expression
create class xoo ( a int, b char(10) );
insert into xoo values(1, '1');
insert into xoo values(null, '3');
insert into xoo values(3, null);
select * from xoo where a in ( null, 1) order by 1;
select * from xoo where a in ( 1, nul... |
<reponame>LasseWolter/clowdr<filename>hasura/migrations/1619818399323_alter_table_public_ContentItemHallway_alter_column_groupId/up.sql<gh_stars>10-100
alter table "public"."ContentItemHallway" rename column "groupId" to "itemId";
|
<reponame>sburns/amy
CREATE TABLE "django_migrations" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "app" varchar(255) NOT NULL, "name" varchar(255) NOT NULL, "applied" datetime NOT NULL);
CREATE TABLE "django_content_type" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "name" varchar(100) NOT NULL, "app_label" ... |
<reponame>pajelonek/clip-watcher-api
INSERT INTO EMPLOYEES (name, dept, salary)
VALUES ('wiktor', '1', 1234); |
INSERT INTO `base`.`powerSocketAndPlugTypes` (`id`, `type`, `maxCurrent`, `isBasic`, `picLoc`) VALUES
(1, 'C13', '10A', TRUE, '/NetMapp/vendors/ms-Dropdown/images/PowerPlugs/C13.jpg'),
(2, 'C14', '10A', TRUE, '/NetMapp/vendors/ms-Dropdown/images/PowerPlugs/C14.jpg'),
(3, 'C19', '16A', TRUE, '/NetMapp/vendors/ms-Drop... |
-- MySQL dump 10.13 Distrib 5.7.28, for Linux (x86_64)
--
-- Host: localhost Database: homestead
-- ------------------------------------------------------
-- Server version 5.7.28-0ubuntu0.18.04.4
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_... |
<reponame>JuanSoto30/RES-PV
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost
-- Tiempo de generación: 04-03-2022 a las 05:24:01
-- Versión del servidor: 8.0.27
-- Versión de PHP: 8.0.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
... |
-- sp_io_stat_sys.sql
-- report on total IO for the system
-- aggregated per the hour
@clears
set line 200
@@sp_get_date_range
@@sp_get_instance
@@sp_get_block_size
@clear_for_spool
spool sp_io_stat_sys_&&c_instance_name..csv
prompt SNAP TIME,PHYS READS,PHYS WRITES,READ TIME,WRITE TIME,PHYS BLOCK READS,PHYS BLOCK... |
-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 22 Jan 2019 pada 10.46
-- Versi Server: 5.6.17
-- PHP Version: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!... |
DROP TABLE IF EXISTS review;
DROP TABLE IF EXISTS reviewRest;
CREATE TABLE review
(
id SERIAL PRIMARY KEY,
name VARCHAR(255),
review VARCHAR
);
CREATE TABLE reviewRest
(
id SERIAL PRIMARY KEY,
score INT ,
email VARCHAR(255),
name VARCHAR(255),
review VARCHAR,
idRest INT,
review_date TIMESTAMP NO... |
<reponame>rubynetix/connect4
UPDATE games SET state = ?
WHERE game_id = UUID_TO_BIN(?);
|
SELECT * FROM etapa_producao as ep
inner join usuario as us on ep.id_usuario = us.id
where us.id = 1;
select * from processo where id = 1;
insert into etapa_producao (id_usuario, id_processo, tempo_restante) values (1, 1, '01:00:00');
SHOW EVENTS FROM craftbeers;
SET GLOBAL event_scheduler = ON;
SHOW PROCESSLIST;... |
-- phpMyAdmin SQL Dump
-- version 4.4.13.1
-- http://www.phpmyadmin.net
--
-- Host: localhost:3306
-- Generation Time: Nov 17, 2015 at 07:26 PM
-- Server version: 5.6.27
-- PHP Version: 5.5.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... |
CREATE USER actionsvc PASSWORD '<PASSWORD>'
NOSUPERUSER NOCREATEDB NOCREATEROLE NOREPLICATION INHERIT LOGIN;
CREATE SCHEMA action;
SET search_path TO action, public;
-- create postgres extension to allow generation of v4 UUID
CREATE EXTENSION IF NOT EXISTS "pgcrypto";
GRANT USAGE ON SCHEMA action TO actionsvc; |
Drop Database if Exists furfamily_db;
create Database furfamily_db; |
-- AlterTable
ALTER TABLE "User" ALTER COLUMN "group_id" DROP NOT NULL;
-- CreateTable
CREATE TABLE "Group" (
"id" SERIAL NOT NULL,
"name" TEXT NOT NULL,
CONSTRAINT "Group_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "Board" (
"id" SERIAL NOT NULL,
"group_id" INTEGER,
"name" TEXT N... |
-- +goose Up
ALTER TABLE tweets
RENAME TO Tweet;
-- +goose Down
ALTER TABLE Tweet
RENAME TO tweets;
|
-- file:boolean.sql ln:131 expect:true
INSERT INTO BOOLTBL2 (f1) VALUES (bool 'false')
|
"""
1633. Percentage of Users Attended a Contest
Easy
SQL Schema
Table: Users
+-------------+---------+
| Column Name | Type |
+-------------+---------+
| user_id | int |
| user_name | varchar |
+-------------+---------+
user_id is the primary key for this table.
Each row of this table contains the name ... |
<reponame>mrudulpolus/kc
drop table protocol_attachment_psa_to_pro;
drop table protocol_attachment_personnel;
drop table protocol_attachment_pta_to_pro;
drop table protocol_attachment_protocol;
drop table protocol_attachment_file;
CREATE TABLE PROTOCOL_ATTACHMENT_FILE
(PA_FILE_ID NUMBER NOT NULL ENABLE,
SEQUEN... |
CREATE TABLE `order` ( `orderID` VARCHAR(10) NOT NULL ,
`orderDate` VARCHAR(255) NOT NULL ,
`orderStatus` VARCHAR(255) NOT NULL ,
`orderTotal` INT NOT NULL ,
`clientID` VARCHAR(10) NOT NULL,
PRIMARY KEY (`orderID`),
FOREIGN KEY (`clientID`) REFERENCES `client`(`clientID`)) ENGINE = InnoDB; |
<gh_stars>0
SELECT * FROM Employees
WHERE
JobTitle='Sales Representative' |
-- 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.
INSERT INTO edfi.Descriptor ([Namespace], CodeVa... |
<filename>src/server/src/main/resources/db/postgres/V2.0.0__specific_nodes_repair.sql
--
-- PostgreSQL schema addition for repair on specific nodes
--
ALTER TABLE "repair_unit"
ADD "nodes" TEXT [];
ALTER TABLE "repair_unit"
ADD "datacenters" TEXT [];
|
<reponame>goldmansachs/obevo-kata
CREATE FUNCTION func884() RETURNS integer
LANGUAGE plpgsql
AS $$ DECLARE val INTEGER; BEGIN val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE245);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE41);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE235... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.