sql stringlengths 6 1.05M |
|---|
<reponame>csharad/paryxa
DROP TABLE IF EXISTS test_attempts; |
RM - Dias Úteis
Dias Uteis (SQL)
-DROP FUNCTION DIASUTEISMES
--CREATE FUNCTION DIASUTEISMES (@MES INT, @ANO INT, @CODCOLIGADA DCODCOLIGADA, @CHAPA DCHAPA)
--RETURNS INT
--AS BEGIN
DECLARE @CODCOLIGADA DCODCOLIGADA
DECLARE @CHAPA DCHAPA
DECLARE @MES INT
DECLARE @ANO INT
DECLARE @MESPROX INT
DECLARE @ANOPROX INT
DECL... |
create table scopes (
id serial primary key,
name character varying
);
create index scopes_name on scopes(name);
create table scopes_vendors (
scopes_id integer references scopes(id),
vendor_id integer references vendors(id)
);
create index scopes_vendors_scopes_id on scopes_vendors(scop... |
<reponame>mkhamdank/skripsijagung
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 10 Jul 2019 pada 05.45
-- Versi Server: 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_... |
EXEC [EST].[Proc_yjbb_Ins] @Code = N'600216',@CutoffDate = N'2017-09-30',@EPS = N'0.14',@EPSDeduct = N'0',@Revenue = N'39.18亿',@RevenueYoy = N'-1.38',@RevenueQoq = N'10.56',@Profit = N'1.31亿',@ProfitYoy = N'-67.55',@ProfiltQoq = N'-37.58',@NAVPerUnit = N'7.2508',@ROE = N'1.88',@CashPerUnit = N'0.2854',@GrossProfitRate ... |
<reponame>xjohannes/august9
create table Project(
projectName varchar(40) primary key,
email varchar (40)
);
create table Song(
songId integer primary key,
title varchar(40) not null,
project varchar(40) not null references Project(projectName),
duration integer,
hasProductionStatus varchar(20),
added ... |
<reponame>KMRRingQA/HobbyProject<filename>src/main/resources/data.sql
insert into manufacturer (id, name, email, password) values (21,'PREMDOR','<EMAIL>','<PASSWORD>');
insert into manufacturer (id, name, email, password) values (22,'Gaven','<EMAIL>','<PASSWORD>');
insert into manufacturer (id, name, email, password) v... |
<reponame>teambition/urbs-console<filename>sql/schema.sql
-- Keywords and Reserved Words https://dev.mysql.com/doc/refman/5.7/en/keywords.html name status channel value values group user
CREATE DATABASE IF NOT EXISTS `urbs_console` CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
CREATE TABLE IF NOT EXISTS `urbs_console`.`o... |
<reponame>d-cent/objective8
BEGIN;
SET LOCAL SCHEMA 'objective8';
CREATE TYPE invitation_status AS ENUM ('active', 'accepted', 'rejected', 'expired');
ALTER TABLE invitations
ADD COLUMN status invitation_status NOT NULL default 'active';
COMMIT;
|
<reponame>i-am-VasuKatravath/Bookshop-Automation-Software
show databases;
create database bookshop_database;
use bookshop_database;
show tables;
CREATE TABLE vs_members( emp_id int,username varchar(40),age int,address varchar(50),doj varchar(20), user_password varchar(15), PRIMARY KEY (emp_id));
ALTER TABLE vs_members... |
-- delete.test
--
-- execsql {
-- INSERT INTO t3 VALUES(1);
-- INSERT INTO t3 SELECT a+1 FROM t3;
-- INSERT INTO t3 SELECT a+2 FROM t3;
-- CREATE TABLE t4 AS SELECT * FROM t3;
-- PRAGMA count_changes=ON;
-- DELETE FROM t3;
-- DELETE FROM t4;
-- }
INSERT INTO t3 VALUES(1);
INSE... |
<reponame>Webprogr/slim-standard
INSERT INTO `user` (`id`, `name`, `email`, `password_hash`, `role`, `updated_at`, `created_at`, `deleted_at`) VALUES
(1, 'Samuel', '<EMAIL>', '$2y$10$RKoLSet3bfPhl2ZwTxzG0uAU/fsLxWlLI/C6OMyOXoYi8j57A9VFa', 'admin', '2020-03-27 12:54:42', '2019-07-23 03:11:13', NULL),
(2, '<NAME>', '<E... |
<reponame>iNeverSleeeeep/INServer
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for staticmaps
-- ----------------------------
DROP TABLE IF EXISTS `staticmaps`;
CREATE TABLE `staticmaps` (
`UUID` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_c... |
<filename>DataFileHeaderStatus.sql
select file#, status, error,recover from v$datafile_header |
INSERT IGNORE INTO colors (id, name) VALUES
(1, "Rojo"),
(2, "Blanco"); |
<filename>tests/suites/0_stateless/02_function/02_0057_function_nullif.sql
SET enable_planner_v2 = 1;
SELECT '==nullif_const_values==';
-- SELECT NULLIF(1, 1);
SELECT NULLIF(2, 1);
SELECT NULLIF(1, 2);
SELECT NULLIF(1, NULL);
SELECT NULLIF(NULL, 1);
-- SELECT NULLIF('a', 'a');
SELECT NULLIF('a', 'b');
SELECT NULLIF('b... |
create table if not exists items(
id serial primary key,
name varchar(100),
description varchar(200),
time_of_creation bigint);
); |
INSERT INTO engine(name)
VALUES
('engineOne'),
('engineTwo'),
('engineThree');
INSERT INTO carcass(name)
VALUES
('carcassOne'),
('carcassTwo'),
('carcassThree');
INSERT INTO transmission(name)
VALUES
('transmissionOne'),
('transmissionTwo'),
('transmissionThree');
INSERT INTO cars(name, id_carcass, id_engine, id_tr... |
<reponame>quddnr153/next-step-java-web
DROP TABLE IF EXISTS USERS;
CREATE TABLE USERS (
userId varchar(12) NOT NULL,
password varchar(12) NOT NULL,
name varchar(20) NOT NULL,
email varchar(50),
PRIMARY KEY (userId)
);
INSERT INTO USERS VALUES('admin', 'password', '<PASSWORD>... |
SELECT s_store_name
,i_item_desc
,sc.revenue
,i_current_price
,i_wholesale_cost
,i_brand
FROM store
JOIN item
JOIN (
SELECT ss_store_sk
,AVG(revenue) AS ave
FROM (
SELECT ss_store_sk
,ss_item_sk
,SUM(ss_sales_price) AS revenue
FROM store_sales
JOIN date_dim
WHERE ss_sold_date_sk ... |
-- Copyright 2016 The Nomulus Authors. All Rights Reserved.
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by a... |
CREATE TABLE IF NOT EXISTS pipeline.datastorage_root (
datastorage_root_id SERIAL NOT NULL,
datastorage_root_path TEXT NOT NULL,
PRIMARY KEY (datastorage_root_id),
UNIQUE (datastorage_root_path)
);
CREATE OR REPLACE FUNCTION get_nfs_datastorage_root(path te... |
CREATE ROLE superman WITH LOGIN PASSWORD '<PASSWORD>' NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION;
CREATE DATABASE heroes_database;
GRANT ALL PRIVILEGES ON DATABASE heroes_database TO superman ;
GRANT ALL PRIVILEGES ON DATABASE heroes_database TO super;
CREATE ROLE superbad WITH LOGIN PASSWORD '<PASSWORD... |
create table ums_member_rule_setting
(
id bigint auto_increment
primary key,
continue_sign_day int null comment '连续签到天数',
continue_sign_point int null comment '连续签到赠送数量',
consume_per_point decimal(10, 2) null comment '每消费多少元获取1个点',
low_order_amount ... |
-- adds securityOptionsModified column ---
ALTER TABLE "Entity" ADD "securityOptionsModified" boolean NOT NULL DEFAULT false;
|
--test abs function using numeric tpye as its operand
select abs(-5) from db_root;
select abs(0) from db_root;
select abs(5) from db_root;
select abs(-5.55) from db_root order by 1; |
<filename>Minimalistic Balance Acken/Minimalistic Balance Acken/Policies/Exploration.sql
/*Bugs **=supposedly fixed*/
/*POLICY_EXPLORATION*/
UPDATE Policies SET EmbarkedExtraMoves=1 WHERE Type='POLICY_EXPLORATION';
/*POLICY_MARITIME_INFRASTRUCTURE*/
/*POLICY_NAVAL_TRADITION*/
INSERT INTO Policy_BuildingClassProductio... |
<reponame>mywaylearning/waybook-api
ALTER TABLE `Post`
ADD COLUMN `link` varchar(255),
ADD COLUMN `linkTitle` varchar(255),
ADD COLUMN `linkDescription` text;
|
<gh_stars>0
drop database scrapper;
create database scrapper;
use scrapper;
create table actors(
name VARCHAR(50),
picture VARCHAR(100),
description VARCHAR(50),
born_info VARCHAR(50),
imdb_uri VARCHAR(50) NOT NULL,
PRIMARY KEY (imdb_uri)
);
create table movies(
name VARCHAR(50),
years... |
-- CreateTable
CREATE TABLE "Collection" (
"id" TEXT NOT NULL,
"value" TEXT NOT NULL,
"valId" TEXT NOT NULL,
"ownerId" TEXT NOT NULL,
"modificationTimestamp" TEXT NOT NULL,
"color" TEXT NOT NULL,
CONSTRAINT "Collection_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "Link" (
"i... |
drop database if exists BdGerenciadorDeProcessos;
create database if not exists BdGerenciadorDeProcessos
default character set utf8
default collate utf8_general_ci;
use BdGerenciadorDeProcessos;
drop table if exists processo;
create table if not exists processo (
id bigint not null auto_increment primary key,
nu... |
#https://cloud.google.com/docs
#creating the initial logistic regression model, this creates classification_model_1
CREATE OR REPLACE MODEL `ecommerce.classification_model`
OPTIONS
(
model_type='logistic_reg',
labels = ['will_buy_on_return_visit']
)
AS
#standardSQL
SELECT
* EXCEPT(fullVisitorId)
FROM
# features
... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 10, 2022 at 05:47 AM
-- 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";
/*!40101 SET @OLD... |
SELECT t1.name, count(*)
FROM
site as s,
so_user as u1,
question as q1,
answer as a1,
tag as t1,
tag_question as tq1
WHERE
q1.owner_user_id = u1.id
AND a1.question_id = q1.id
AND a1.owner_user_id = u1.id
AND s.site_id = q1.site_id
AND s.site_id = a1.site_id
AND s.site_id = u1.site_id
AND s.site_id = tq1.site_id
AND s.s... |
-- RETRIEVE A LIST OF EMPLOYEES ORDERED BY DEPARTMENT ID.
SELECT * FROM EMPLOYEES
ORDER BY DEP_ID; |
{{
config(
unique_key='event_pk'
)
}}
with s_events as (
select * from {{ ref('int__events') }}
),
add_actor_type_combo as (
select
*,
case
when actor1_code < actor2_code then actor1_code || ' - ' || actor2_code
else actor2_code || ' - ' || actor1_code
end as actor_type_combo
... |
<filename>Introduction-to-Database/CMU15445/exercise/homework1/placeholder/q9_dre_and_eminem.sql
with duos_list(id1, id2, count) as (
select a1.artist as id1,
a2.artist as id2,
count(*) as c
from artist_credit_name a1
inner join artist_credit_name a2 on a1.artist_credit=a2.artist_credit
inner join release r o... |
CREATE Procedure Integration.IngestOrderData
AS
BEGIN
DECLARE @SQL nvarchar(max) = N''
DECLARE @timestamp char(8) = convert(char(8), getdate(), 112)
--This should match Staging table layout EXCEPT do NOT include identity and change dates to nvarchar
--***Note: for fact tables, exclude NULL foreign keys from exter... |
<filename>SQL/7KYU/length_based_select_with_like.sql<gh_stars>1-10
select first_name, last_name
from names
where first_name like '______%' |
create database jiraf_goal;
create table goal(
id_goal uuid primary key,
g_title varchar(50) not null,
g_description varchar(500) not null,
g_reporter_id uuid not null,
g_assignee_id uuid,
g_date_of_create timestamp not null,
g_date_of_update timestamp,
g_label_id uuid
);
create table label (
id_label uuid p... |
ALTER TABLE code_ref_class_dependencies
ADD `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
ADD `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间';
ALTER TABLE code_ref_class_fields
ADD `create_time` timestamp NULL DEFAULT CURRENT_TIMEST... |
<filename>backend/de.metas.swat/de.metas.swat.base/src/main/sql/postgresql/system/48-de.metas.order/5502450_sys_gh4644_C_Order_DocNo_UQ_Index_DDL.sql
DROP INDEX IF EXISTS public.c_order_documentno;
-- 2018-10-10T11:40:42.558
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
DROP INDEX IF EXIS... |
<filename>Database/2021_06_16_001 CreateRoles.sql
USE [Rehersal]
GO
/****** Object: Table [dbo].[Role] Script Date: 16.06.2021 21:52:53 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Role](
[RoleID] [int] IDENTITY(1,1) NOT NULL,
[RoleName] [nvarchar](50) NOT NULL,
CONSTRAINT [PK_Rol... |
-- source
CREATE TABLE player_source (
player_id INT,
team_id INT,
player_name VARCHAR,
height DOUBLE
) WITH (
'connector.type' = 'filesystem',
'connector.path' = 'file:///Users/chenshuai1/github/flink-sql-submit/src/main/resources/player.csv',
'format.type' = 'csv',
'format.fields.0.name' = 'player_id'... |
<reponame>allwaysoft/Oracle-DBA-Common-Scripts
select FILE_TYPE,PERCENT_SPACE_USED,PERCENT_SPACE_RECLAIMABLE,NUMBER_OF_FILES from v$flash_recovery_area_usage |
CREATE DATABASE IF NOT EXISTS Film;
USE Film;
DROP TABLE IF EXISTS film;
CREATE TABLE film (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`Name` varchar(45) DEFAULT NULL,
`Year` int(5) DEFAULT NULL,
`Country` varchar(45) DEFAULT NULL,
`Genres` varchar(45) DEFAULT NULL,
`Director` varchar(45) DEFAULT NULL,
`... |
echo -1000 > /proc/self/oom_score_adj
|
<filename>openGaussBase/testcase/SQL/DATATYPE/character/nvarchar2/Opengauss_Function_Datatype_Nvarchar2_Case0006.sql
-- @testpoint: 插入空值
-- @modified at: 2020-11-16
drop table if exists test_nvarchar2_06;
create table test_nvarchar2_06 (id int,name nvarchar2(8));
insert into test_nvarchar2_06 values (1,'');
insert int... |
<filename>db/setup.sql
CREATE DATABASE dev;
CREATE TABLE dev.links (
hash VARCHAR(10) PRIMARY KEY,
url VARCHAR(255) NOT NULL
); |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.2.7.1
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 05-05-2017 a las 23:48:27
-- Versión del servidor: 5.5.39
-- Versión de PHP: 5.4.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_C... |
CREATE TABLE [dbo].[concept_relationship] (
[concept_id_1] INT NOT NULL,
[concept_id_2] INT NOT NULL,
[relationship_id] VARCHAR (20) NOT NULL,
[valid_start_date] VARCHAR (8) NOT NULL,
[valid_end_date] VARCHAR (8) NOT NULL,
[invalid_reason] VARCHAR (1) NULL
);
|
DROP DATABASE IF EXISTS MOTWDECK;
CREATE DATABASE IF NOT EXISTS MOTWDECK CHARACTER SET utf8 COLLATE utf8_spanish_ci;
USE MOTWDECK;
CREATE TABLE PLAYBOOKS(
ID INTEGER PRIMARY KEY,
TITLE VARCHAR(25),
LEGEND TEXT
);
INSERT INTO PLAYBOOKS VALUES
(1, "The Chosen", "Your birth was propheseid. You are the Chosen One... |
<filename>src/main/resources/sql/medicoBase/prescrivi_esame.sql
/*
Query per prescrivere un esame
-------------------------------------------------------------
@author <NAME> <<EMAIL>>
*/
INSERT INTO esame_prescritto (
id_prescrivente, id_paziente, annotazioni,
codice_esame, is_medico, data_prescriz... |
<filename>src/CASE-DB/Tables/CFSubject.sql<gh_stars>0
CREATE TABLE [dbo].[CFSubject]
(
[Id] UNIQUEIDENTIFIER NOT NULL,
[Title] VARCHAR(200) NOT NULL,
[HierarchyCode] VARCHAR(200) NOT NULL,
[Description] VARCHAR(200) NULL,
[LastChangeDateTime] SMALLDATETIME NOT NULL,
CONSTRAINT [PK_CFSubject_Id... |
<filename>sql/queries.sql<gh_stars>1-10
--selecteer plantvakken die in de geometrie van de feature bodem vallen en kijk of de grondsoort overeenkomt--
SELECT pv.id, pv.gewas, pv.voorkeur_grondsoort, pv.geom, bm.omschrijvi, bm.geom
FROM plantvak as pv, bodem as bm
WHERE ST_INTERSECTS(bm.geom, pv.geom)
AND pv.voorkeur_g... |
<reponame>tempcke/dts<filename>db/sql/initial_schema.sql
DROP TABLE IF EXISTS template;
CREATE TABLE template (
template_id CHAR(36) NOT NULL COMMENT 'UUID to identify a single unique version',
doc_type VARCHAR(255) NOT NULL COMMENT 'user provided document type, works as a category',
... |
CREATE TABLE users (
id BIGSERIAL PRIMARY KEY,
email TEXT,
password TEXT
);
CREATE UNIQUE INDEX email_unique_idx on USERS (LOWER(email));
|
<filename>leetcode/Database/197.RisingTemperature/solution.sql<gh_stars>10-100
SELECT W2.Id
FROM Weather W1 INNER JOIN Weather W2 ON W1.Date = DATE_ADD(W2.Date, INTERVAL -1 DAY)
WHERE W1.Temperature < W2.Temperature;
|
{### Get the variables information for debugging ###}
{% if session_id %}
SELECT
name, varClass, value,
pg_catalog.format_type(dtype, NULL) as dtype, isconst
FROM pldbg_get_variables({{session_id}}::int)
ORDER BY varClass
{% endif %} |
<filename>src/main/resources/db/migration/V6__PlaysForTeam.sql
CREATE TABLE PlaysForTeam (
playerId UUID REFERENCES player(playerId),
teamId UUID REFERENCES team(teamId),
PRIMARY KEY(playerId, teamId),
startDate date,
endDate date
); |
<gh_stars>1-10
/*
Navicat Premium Data Transfer
Source Server : 本机
Source Server Type : MySQL
Source Server Version : 50733
Source Host : localhost:3306
Source Schema : wjchenge_test
Target Server Type : MySQL
Target Server Version : 50733
File Encoding : 65001
Date:... |
<reponame>GastonPalomeque/palo
CREATE TABLE IF NOT EXISTS hits
(
id text NOT NULL,
footprint text,
path text,
url text,
language text,
user_agent text,
referer text,
date timestamp with time zone,
CONSTRAINT hits_pkey PRIMARY KEY (id)
); |
<reponame>PJChamley/das-payments-V2
CREATE TABLE [Payments2].[ProviderAdjustmentPayments]
(
[Ukprn] [bigint] NOT NULL,
[SubmissionId] [uniqueidentifier] NOT NULL,
[SubmissionCollectionPeriod] [int] NOT NULL,
[SubmissionAcademicYear] [int] NOT NULL,
[PaymentType] [int] NOT NULL,
[PaymentTypeName] [nvarchar](250) ... |
<reponame>Shuttl-Tech/antlr_psql<filename>src/test/resources/sql/insert/8f6c675f.sql
-- file:foreign_key.sql ln:137 expect:true
INSERT INTO FKTABLE VALUES (NULL, 2, 4)
|
/**
* References:
* - https://community.oracle.com/thread/3905510
* - http://jacob.jkrall.net/totp/
*/
create or replace package oos_util_totp
as
function generate_secret(p_length number default 16) return varchar2;
function format_key_uri(
p_type number default null
, p_label_accountname varchar2
... |
-- Drop table if exists
-- DROP TABLE IF EXISTS salaries;
-- DROP TABLE IF EXISTS dept_manager;
-- DROP TABLE IF EXISTS employees;
-- DROP TABLE IF EXISTS dept_emp;
-- DROP TABLE IF EXISTS titles;
-- DROP TABLE IF EXISTS departments;
-- Create table and view column datatypes
CREATE TABLE departments (
dept_no VARCHAR... |
<filename>EmployeeSQL/employees.sql
-- Drop table if exists
DROP TABLE employees;
-- Create new table
CREATE TABLE employees (
emp_no INT NOT NULL PRIMARY KEY,
emp_title_id VARCHAR NOT NULL,
birth_date DATE NOT NULL,
first_name VARCHAR NOT NULL,
last_name VARCHAR NOT NULL,
sex VARCHAR NOT NULL,
hire_date DATE N... |
CREATE OR REPLACE TYPE "STRING_ARRAY" AS VARRAY(4000) OF VARCHAR2(4000 CHAR);
CREATE TABLE "BL_ENTITY_ANNO"
(
"ID" NUMBER(9,0) NOT NULL,
"VERSION" NUMBER(9,0) NOT NULL,
"TYPE" VARCHAR2(255 CHAR) NOT NULL,
"CREATED_ON" DATE,
"CREATED_BY" VARCHAR2(16 BYTE),
"UPDATED_ON" DATE,
"UPDATED_BY"... |
use innodb_schema;
-- Create syntax for TABLE 'airlines'
CREATE TABLE `airlines` (
`iata_code` char(2) DEFAULT NULL,
`airline` varchar(30) DEFAULT NULL,
UNIQUE KEY `idx_iata_code` (`iata_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Create syntax for TABLE 'airports'
CREATE TABLE `airports` (
`ia... |
ALTER TABLE genomic_feature_disease_action DROP user_id;
|
CREATE INDEX IF NOT EXISTS idx_channels_team_id ON channels(teamid);
DROP INDEX IF EXISTS idx_channels_team_id_type;
DROP INDEX IF EXISTS idx_channels_team_id_display_name;
|
-- Groups orgunits into groups based on the text match in the where clause for the orgunit group with the given id
insert into orgunitgroupmembers(orgunitgroupid,organisationunitid)
select 22755 as orgunitgroupid,ou.organisationunitid as organisationunitid from organisationunit ou
where lower(name) like '%dispensary... |
<filename>tests/_data/dump.sql
--
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
--
-- Name: api; Type: DATABASE; Schema: -; Owner: postgres
--
CR... |
select max(length(from_subtree)),
max(length(to_subtree))
from HGT_COM_INT_FRAGMS t
select count(*)
from HGT_COM_INT_FRAGMS
select count(*)
from HGT_COM_INT_CONTINS
select count(*)
from system_lobs.lob_ids
SELECT sum(lob_length)/(1024.0*1024.0) FROM system_lobs.lob_ids
checkpoint
drop table HGT_PAR_... |
<reponame>opengauss-mirror/Yat
-- @testpoint:opengauss关键字Authorization(保留),作为角色名
--关键字不带引号-合理报错
drop role if exists Authorization;
create role Authorization with password '<PASSWORD>' valid until '2020-12-31';
--关键字带双引号-成功
drop role if exists "Authorization";
create role "Authorization" with password '<PASSWORD>' va... |
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 1192.168.3.11
-- Generation Time: Dec 11, 2019 at 10:36 AM
-- Server version: 10.1.36-MariaDB
-- PHP Version: 7.2.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET... |
<reponame>samchandra/technical-assessment
create schema pushservicedbdev collate utf8mb4_unicode_ci;
-- applications: table
CREATE TABLE `applications`
(
`id` int(16) NOT NULL AUTO_INCREMENT,
`app_id` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
`app_nam... |
<filename>SQL/requete3.sql
SELECT name
FROM Tags
ORDER BY post_count
LIMIT 10
|
<reponame>KebecStatoil/SqlJambalaya
/****** Object: StoredProcedure [system_p].[InsertSegdReference] Script Date: 27.05.2020 10:57:02 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROC [system_p].[InsertSegdReference]
@SurveyName char(7),
@OriginalContainer nvarchar(128),
@OriginalFilePat... |
<filename>sqls/users/adminUserAdd.sql<gh_stars>0
IF EXISTS (SELECT *
FROM sysobjects
WHERE type = 'P' AND name = 'adminUserAdd')
BEGIN
DROP Procedure adminUserAdd
END
GO
CREATE PROCEDURE [dbo].adminUserAdd(
@email VARCHAR(50),
@firstName VARCHAR(100),
@lastName VARCHAR(100),
@displayNa... |
<reponame>Ctrl-Alt-Defeat/demo
SELECT * FROM USERS;
INSERT INTO users(full_name,role,location,img,type_of_work,email,password,phone_num,status,exp,username) VALUES ('Hanaa','3','35.868519,31.897918','https://images.unsplash.com/photo-1503023345310-bd7c1de61c7d?ixid=MXwxMjA3fDB8MHxzZWFyY2h8MXx8aHVtYW58ZW58MHx8MHw%3D&i... |
<reponame>IgorGuariroba/postgres
CREATE TABLE IF NOT EXISTS cliente(
idCliente integer CONSTRAINT pk_idCliente PRIMARY KEY,
nome varchar(120) NOT NULL);
SELECT * FROM cliente;
CREATE TABLE IF NOT EXISTS locacao(
idlocacao integer CONSTRAINT pk_idlocacao PRIMARY KEY,
data_locacao DATE DEFAULT CURRENT_DATE,
data_... |
<gh_stars>0
START TRANSACTION;
INSERT INTO store_type (store_name) VALUES
('grenade'),
('bayonet'),
('sulphur'),
('wood'),
('stone'),
('fur'),
('bait'),
('teeth'),
('meat'),
('scales'),
('cloth'),
('charm'),
('gems'),
('coins'),
('seed'),
('crops'),
(... |
CREATE TABLE companies (
company_uuid uuid primary key,
name text not null,
address text not null,
city text not null,
country text not null,
email text,
phone_number text
);
CREATE TABLE employees (
employee_uuid uuid primary key,
company_uuid uuid references companies(company_uuid... |
<filename>src/hg/lib/cgapAlias.sql
CREATE TABLE cgapAlias (
cgapID varchar(40) NOT NULL default '',
alias varchar(80) NOT NULL default '',
KEY cgapID (cgapID),
KEY alias (alias)
) ENGINE=MyISAM;
|
SELECT MAX(Salary) as `SecondHighestSalary`
FROM Employee
WHERE Salary < (
SELECT MAX(Salary)
FROM Employee
);
|
USE [master]
GO
CREATE DATABASE TableRelations ON PRIMARY
( NAME = N'TableRelations_Data', FILENAME = N'D:\Courses\Data\TableRelations_Data.mdf' , SIZE = 167872KB , MAXSIZE = UNLIMITED, FILEGROWTH = 16384KB )
LOG ON
( NAME = N'TableRelations_Log', FILENAME = N'D:\Courses\Data\TableRelations_Log.ldf' , SIZE = 204... |
<gh_stars>1-10
insert into menu_item (id, description, code, name, locked, price, measure_id) values (1, 7, 1, 'salt', 0, '8.97', 9);
insert into menu_item (id, description, code, name, locked, price, measure_id) values (2, 5, 7, 'pepper', 0, '2.06', 2);
insert into menu_item (id, description, code, name, locked, pri... |
<reponame>fmidev/chile-smartmet
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.5.10
-- Dumped by pg_dump version 9.5.10
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages =... |
<gh_stars>0
SELECT Distinct RemoteIPAddress, RemoteDevice, RemotePlatform, NCM_Nodes.NodeCaption as Observer, NCM_Nodes.AgentIP
FROM [NCM_Cisco_CDP] inner join NCM_Nodes on NCM_Nodes.NodeID = NCM_Cisco_CDP.NodeID
where
RemoteIPAddress not in (SELECT [IpAddress]
FROM [NCM_ConfigI... |
<filename>db/migrations/postgres/000020_create_posts.up.sql
CREATE TABLE IF NOT EXISTS posts (
id VARCHAR(26) PRIMARY KEY,
createat bigint,
updateat bigint,
deleteat bigint,
userid VARCHAR(26),
channelid VARCHAR(26),
rootid VARCHAR(26),
parentid VARCHAR(26),
originalid VARCHAR(26),
... |
<filename>conf/evolutions/default/51.sql
# --- !Ups
create table pull_request_reviewers (
pull_request_id BIGINT NOT NULL,
user_id INT NOT NULL
);
alter table pull_request_reviewers add constraint fk_pull_request_reviewers_1 foreign key (pull_request_id) references pull_request (id) on delete restrict on update... |
use NHibernate;
drop table if exists USERS;
create table USERS
(
LOGONID varchar(20) not null default '0',
NAME varchar(40) default null,
PASSWORD varchar(20) default null,
EMAILADDRESS varchar(40) default n... |
-- locales
DROP TABLE IF EXISTS `locales`;
-- locale_content_translations
DROP TABLE IF EXISTS `locale_content_translations`;
-- locale_contents
DROP TABLE IF EXISTS `locale_contents`;
-- translations_backup
DROP TABLE IF EXISTS `translations`;
DROP TABLE IF EXISTS `z_3674_translations`;
RENAME TABLE `z_3674_transla... |
<filename>moat369/sql/moat369_fc_oracle_version.sql
-- Set version variables. Value will be 'Y' or 'N'
COL is_ver_le_9_1 new_v is_ver_le_9_1 nopri
COL is_ver_le_9_2 new_v is_ver_le_9_2 nopri
COL is_ver_le_9 new_v is_ver_le_9 nopri
COL is_ver_le_10_1 new_v is_ver_le_10_1 nopri
COL is_ver_le_10_2 new_v is_ver_l... |
SELECT
relname,
nspname,
pgroup,
relallvisible
FROM pg_class c , pg_namespace n, pgxc_class x
WHERE (x.pcrelid=c.oid AND c.relnamespace = n.oid AND n.nspname NOT IN ('pg_toast', 'pg_catalog', 'information_schema')) |
select barcode, subject, classification from items where
subject like 'Sachkunde%' and
classification not in (
'B - Biographie',
'Ba - Basteln / Handarbeit',
'Be - Beschäftigung / Spielen',
'Ber - Berufe',
'De - Deutsche Geschichte',
'Es - Essen / Kochen',
'G - Geschichte / Kulturen'... |
<reponame>pathfindercb/coblist
-- phpMyAdmin SQL Dump
-- version 4.4.15.9
-- https://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: May 11, 2018 at 01:31 PM
-- Server version: 5.6.37
-- PHP Version: 7.1.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_... |
<reponame>Daniel-Abrecht/DPA-HTML-form-generator
DROP TABLE IF EXISTS car;
DROP TABLE IF EXISTS color;
CREATE TABLE color (
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(45) NOT NULL,
code VARCHAR(6) NOT NULL,
PRIMARY KEY(id)
);
CREATE TABLE car (
id INT NOT NULL AUTO_INCREMENT COMMENT '{"hidden":true}',
... |
<reponame>Eunoia1729/MySQL-Solutions-HackerRank
select t4.submission_date, hacker_count, top_hacker, name
from (
select submission_date, count(distinct hacker_id) as hacker_count
from (
select s1.submission_date, s1.hacker_id
from submissions s1
join submissions s2 on (s2.submission_date... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.