sql stringlengths 6 1.05M |
|---|
<gh_stars>0
create table if not exists exceptions
(
sensor_id INTEGER,
exception_time INTEGER,
exception_text TEXT NULL,
stacktrace TEXT NULL,
cleared INTEGER
) |
# --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table item (
id bigint not null,
name varchar(255),
quantity integer,
constraint pk_item primary key (id))
;
create seq... |
<filename>db/migrations/sqlite/000026_create_tokenaccount_table.down.sql
DROP TABLE IF EXISTS tokenaccount;
|
<filename>internal/post/sql/get/publicPosts/ForUser/Total.sql<gh_stars>1-10
SELECT COUNT(postId)
FROM Posts
WHERE userId IN (
SELECT followUserId
FROM (
SELECT followUserId
FROM UserFollows
WHERE userId = ?
AND accepted = 1
) tmp
)
AND published != 0
OR userId = ? |
-- start_ignore
! gpconfig -c gp_vmem_limit_per_query -v '0' --skipvalidation
! gpconfig -c gp_vmem_protect_limit -v '8192'
! gpconfig -c runaway_detector_activation_percent -v 0
! gpstop -rai;
-- end_ignore
|
-- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 09, 2017 at 04:31 AM
-- Server version: 5.7.20-0ubuntu0.16.04.1
-- PHP Version: 7.0.22-0ubuntu0.16.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_C... |
<filename>pdf-driver/spec/ISOCodes.ddl
-- ISO 3166 country codes
def CountryCode = Choose {
afghanistan = @"AF" ;
alandIslands = @"AX" ;
albania = @"AL" ;
algeria = @"DZ" ;
americanSamoa = @"AS" ;
andorra = @"AD" ;
angola = @"AO" ;
anguilla = @"AI" ;
antarctica = @"AQ" ;
antiguaAndBarbuda... |
<filename>sql/000-DropAll.sql
DROP TABLE IF EXISTS comment;
DROP TABLE IF EXISTS photo_draft;
DROP TABLE IF EXISTS tag_draft;
DROP TABLE IF EXISTS post;
DROP TABLE IF EXISTS draft;
DROP TABLE IF EXISTS photo;
DROP TABLE IF EXISTS image;
DROP TABLE IF EXISTS category;
DROP TABLE IF EXISTS tag;
DROP TABLE IF EXISTS autho... |
/****** Object: StoredProcedure [etl].[SharePoint_PhysicalLocations] Script Date: 8/10/2020 12:34:33 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/*select * from frps.PhysicalLocations
select * from ETL.OperatingUnit*/
CREATE proc [etl].[SharePoint_PhysicalLocations] as
insert in... |
/*******************************************************************************
PoC Web-Application-Framwork
http://poc-online.net/
Copyright (c) 2013, PoC - <NAME>
Released under the MIT license
http://poc-online.net/license
-- pocPackage: pocCore
******************************************************************... |
CREATE VIEW V_EmployeeNameJobTitle AS
SELECT FirstName + ' ' + ISNULL( MiddleName , '') + ' ' + LastName AS [Full Name], JobTitle
FROM Employees |
USE todo;
CREATE TABLE users(
id int(3) NOT NULL AUTO_INCREMENT,
first_name varchar(20) DEFAULT NULL,
last_name varchar(20) DEFAULT NULL,
username varchar(250) DEFAULT NULL,
password varchar(20) DEFAULT NULL,
PRIMARY KEY (id) ) ENGINE=InnoDB;
CREATE TABLE todos(
id bigint(20) NOT NULL AUTO_INCREMENT,
description va... |
CREATE TABLE [dbo].[rx_tx_20110401] (
[TitleCode] VARCHAR (50) NULL,
[EffectiveDate] VARCHAR (50) NULL,
[Rep] VARCHAR (50) NULL,
[Steps] VARCHAR (50) NULL,
[PayInterval_Shift] VARCHAR (50) NULL,
[Annual] VARCHAR (50) NULL,
[Monthl... |
<gh_stars>0
INSERT INTO `caso_spotify`.`pais`
(`idPais`, `Nombre_Pais`)VALUES
(57,"Colombia"),
(54,"Argentina"),
(1,"Estados Unidos");
INSERT INTO `caso_spotify`.`discografica`
(`idDiscografica`,
`Nombre`,
`Pais_idPais`)
VALUES
(1, "Columbia Records", 1);
INSERT INTO `caso_spotify`.`artista`
(`idartista`,
`nombre_Art... |
SELECT INSTITUTION
, ACAD_PLAN
, EFFDT
, EFF_STATUS
, DESCR
, DESCRSHORT
, ACAD_PLAN_TYPE
, ACAD_PROG
, PLN_REQTRM_DFLT
, DEGREE
, DIPLOMA_DESCR
, TRNSCR_DESCR
, FIRST_TERM_VALID
, CIP_CODE
, HEGIS_CODE
, ACAD_CAREE... |
-- WHERE Kullanımı |
CREATE TABLE IF NOT EXISTS "people" (
"id" INTEGER not NULL,
"first_name" TEXT not NULL,
"last_name" TEXT not NULL,
"email" TEXT not NULL,
"ip_address" TEXT not NULL,
PRIMARY KEY("id" AUTOINCREMENT)
); |
<filename>db/seeds.sql
-- inserting departments into departments table
INSERT INTO departments (department)
VALUES ("Engineering"),("Sales"),("Marketing"),("Accounting"),("Human Resources");
-- inserting roles into roles table
INSERT INTO roles (title, department_id, salary)
VALUES ("Front-End Developer",1,50000),("Sal... |
DROP VIEW vAdministrateurs;
DROP VIEW vEtudiants;
DROP VIEW vEnseignants;
DROP VIEW vNonArchive;
DROP VIEW vArchives;
DROP TABLE Document;
DROP TABLE Licence;
DROP TABLE Personne;
DROP TABLE Interne_UTC;
DROP TYPE TInterne_UTC;
DROP TYPE CollPersonne;
DROP TYPE RefPersonne;
DROP TYPE TPersonne;
DROP TYPE CollLicence... |
CREATE SCHEMA IF NOT EXISTS metadatos;
----MODELLING
DROP TABLE IF EXISTS metadatos.models;
CREATE TABLE metadatos.models(
fecha VARCHAR,
objetivo VARCHAR,
model_name VARCHAR,
hyperparams VARCHAR,
AUROC VARCHAR,
AUPR VARCHAR,
precision VARCHAR,
recall VARCHAR,
f1 VARCHAR,
train_time VARCHAR,
tes... |
<reponame>getwasim/egov-smartcity-suites-test
Insert into eg_roleaction (roleid, actionid) values ((select id from eg_role where name = 'Works Creator'),(select id from eg_action where name ='SaveMilestone' and contextroot = 'egworks'));
Insert into eg_roleaction (roleid, actionid) values ((select id from eg_role where... |
-- Create the 2019 tables while we are messing around here
create table hourly_2019(
CONSTRAINT __hourly_2019_check
CHECK(valid >= '2019-01-01 00:00+00'::timestamptz
and valid < '2020-01-01 00:00+00'::timestamptz))
INHERITS (hourly);
CREATE INDEX hourly_2019_idx on hourly_2019(station, network, valid);
CR... |
<reponame>GunnerJnr/_CodeInstitute
/**
* Select multiple columns using CONCAT
*/
SELECT CONCAT(first_name, ' ', last_name)
AS full_name FROM `mydb`.`people`;
/**
* Using the DISTINCT keyword
* retrieve only single instances of the values in a column (no duplicate values)
*/
SELECT DISTINCT(amount) FROM mydb.order... |
<gh_stars>1-10
CREATE TABLE movies(
movieID SERIAL PRIMARY KEY,
title VARCHAR,
genresTemp VARCHAR
);
CREATE TABLE users(
userID SERIAL PRIMARY KEY,
email VARCHAR,
password VARCHAR,
name VARCHAR,
emailVerified BOOLEAN
);
CREATE TABLE links(
movieID SERIAL PRIMARY KEY,
imdbI... |
<gh_stars>1-10
INSERT INTO ACCOUNT_CODES (REC_ACCOUNT_CODE, ACCOUNT_CODE, ACCOUNT_NAME, POSTING_STATUS_FLAG, ACCOUNT_TYPE, SUB_ACCOUNT_TYPE, TXN_POSTING_TYPE, ALL_CASELOAD_FLAG,MODIFY_USER_ID,MODIFY_DATE,LIST_SEQ,CASELOAD_TYPE,PARENT_ACCOUNT_CODE)
VALUES (null, 2000, 'LIABILITIES', 'N', 'L', null, null, 'Y','OMS_OWNER'... |
<filename>src/FirebirdDbComparer.Tests/Compare/ComparerTestsData/Creating/TriggerExternalEngine_30.Source.sql<gh_stars>10-100
create table t (id int);
create trigger new_ee_trigger
after update on t
external name 'FooBar!new_ee_trigger'
engine FbNetExternalEngine; |
<reponame>jkvetina/BUG<gh_stars>1-10
prompt --install
@@application/set_environment.sql
@@application/delete_application.sql
@@application/create_application.sql
@@application/shared_components/navigation/lists/desktop_navigation_menu.sql
@@application/shared_components/navigation/lists/desktop_navigation_bar.sql
@@app... |
<gh_stars>0
-- https://leetcode.com/problems/exchange-seats/
USE [sql_training]
GO
CREATE TABLE seat
(
id INT NOT NULL IDENTITY(1,1) CONSTRAINT pk_seat PRIMARY KEY,
student NVARCHAR(MAX)
);
INSERT INTO seat(student) VALUES('Abbot');
INSERT INTO seat(student) VALUES('Doris ');
INSERT INTO seat(student) VALUES('Eme... |
-- This script uses sqlcmd scripting variables. They are in the form
-- $(MyVariable). For information about how to use scripting variables
-- on the command line and in SQL Server Management Studio, see the
-- "Executing Replication Scripts" section in the topic
-- "Programming Replication Using System Stored Proce... |
<gh_stars>0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_E... |
version https://git-lfs.github.com/spec/v1
oid sha256:8d51c9db1fddd18d08014bd24aef3958c46c1861bf799a7661fc111c8c506c99
size 446
|
<reponame>Jozefiel/Dockerized-MRBS-1.9.0
-- Add the max length of bookings fields
ALTER TABLE %DB_TBL_PREFIX%area
ADD COLUMN max_secs_per_day_enabled smallint DEFAULT 0 NOT NULL,
ADD COLUMN max_secs_per_day int DEFAULT 0 NOT NULL,
ADD COLUMN max_secs_per_week_enabled smallint DEFAULT 0 ... |
<filename>oscm-devruntime/javares/sql/upd_postgresql_02_00_22.sql
--add a column which stores how ofter the userid of the specific row was used
ALTER TABLE "platformuser" ADD COLUMN "useridcnt" BIGINT;
ALTER TABLE "platformuser" ADD COLUMN "olduserid" VARCHAR(255);
UPDATE platformuser AS pl SET olduserid = userid;
-... |
<filename>dbv/sdb/setup/08_config_dbv.sql
----------------------------------------------------------------------------
-- Trivadis AG, Infrastructure Managed Services
-- Saegereistrasse 29, 8152 Glattbrugg, Switzerland
----------------------------------------------------------------------------
-- Name......: 09_con... |
/*
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 applicable law or agreed to in writing, software
distri... |
-- $Horde: horde/scripts/sql/horde_groups.oci8.sql,v 1.1.2.3 2009/10/19 10:54:33 jan Exp $
CREATE TABLE horde_groups (
group_uid NUMBER(16) NOT NULL,
group_name VARCHAR2(255) NOT NULL UNIQUE,
group_parents VARCHAR2(255) NOT NULL,
group_email VARCHAR2(255),
PRIMARY KEY (group_uid)
);
CREATE TABLE h... |
UPDATE scheduled_reports SET report_time = '00:00', report_on = '{"day_no":1}', report_period = '{"no":1,"period_id":"3"}' WHERE period_id = 3 AND report_on IS NULL;
UPDATE scheduled_reports SET report_time = '00:00', report_on = '[{"day":1}]', report_period = '{"no":1,"period_id":"1"}' WHERE period_id = 1 AND report_... |
<reponame>nikhilbhatewara/Leetcode
# Write your MySQL query statement below
select a.user_id as buyer_id,
a.join_date,
ifnull(count(b.order_id),0) as orders_in_2019
from users a
left join orders b
on a.user_id = b.buyer_id
and year(b.order_date) = 2019
group by a.user_id
|
DROP DATABASE IF EXISTS burgers_db;
CREATE DATABASE burgers_db;
USE burgers_db;
CREATE TABLE burgers (
id int AUTO_INCREMENT NOT NULL,
burger_name varchar(30) NOT NULL,
eaten BOOLEAN DEFAULT false,
primary key (id)
);
|
CREATE SCHEMA [driver]
|
/*
SQLyog Community v13.1.7 (64 bit)
MySQL - 10.3.22-MariaDB : Database - test-bookstore
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_... |
-- phpMyAdmin SQL Dump
-- version 4.5.5
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jun 07, 2016 at 12:36 PM
-- Server version: 10.0.25-MariaDB
-- PHP Version: 5.6.22
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... |
<reponame>VndrGrhrd/cms-basic-admin<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Tempo de geração: 07/10/2021 às 13:00
-- Versão do servidor: 5.7.34
-- Versão do PHP: 7.4.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+0... |
<reponame>RosenDev/SoftuniLearning<filename>C#DbFundamentals/C#DB Basics/Joins, Subqueries, CTE and Indices/14. Countries With or Without Rivers.sql
SELECT TOP 5 CountryName, RiverName
FROM Countries AS C
LEFT JOIN CountriesRivers AS CR
ON C.CountryCode= CR.CountryCode
LEFT JOIN Rivers AS R
ON CR.RiverId=R.Id
WHERE C.... |
<filename>src/SFA.DAS.Commitments.Database/Tables/Standard.sql
CREATE TABLE [dbo].[Standard]
(
[Id] INT NOT NULL,
[Title] VARCHAR(500) NOT NULL,
[Level] TINYINT NOT NULL,
[Duration] INT NOT NULL,
[MaxFunding] INT NOT NULL,
[EffectiveFrom] DATETIME NULL,
[EffectiveTo] DATETIME NULL,
CONS... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 1172.16.31.10
-- Generation Time: Aug 13, 2020 at 03:07 PM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.4.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... |
INSERT INTO twitter_posts (content, verification_text)
VALUES ( 'Nice, @fundrequest_io can now be tracked on @BlockfolioApp! #opensource', 'can now be tracked on');
INSERT INTO twitter_posts (content, verification_text)
VALUES ( 'Nice, @fundrequest_io can now be tracked on @get_delta! #opensource', 'can now be tracked... |
-- https://leetcode.com/problems/department-highest-salary/
--
-- The Employee table holds all employees. Every employee has an Id, a salary,
-- and there is also a column for the department Id.
--
-- +----+-------+--------+--------------+
-- | Id | Name | Salary | DepartmentId |
-- +----+-------+--------+... |
<reponame>bencarlson/Sitecore-v902-XP1-Scaled-Installation<filename>clean_db_xp1.sql
USE [master]
GO
If Exists (select name from master.sys.server_principals where name = 'collectionuser')
BEGIN
DROP LOGIN [collectionuser]
END
GO
DROP DATABASE [xp902_MarketingAutomation]
GO
DROP DATABASE [xp902_Messaging]
GO
DROP ... |
<gh_stars>1-10
DROP TABLE IF EXISTS genre CASCADE;
DROP TABLE IF EXISTS author CASCADE;
DROP TABLE IF EXISTS book;
CREATE TABLE IF NOT EXISTS genre (
id INTEGER PRIMARY KEY,
name VARCHAR(64),
description VARCHAR(64)
);
CREATE TABLE IF NOT EXISTS author (
id INTEGER PRIMARY KEY,
las... |
<reponame>mehsoy/jaws
delete from administrators;
delete from project_managers;
delete from workers;
delete from workers_has_storages;
delete from jobs;
delete from storages;
delete from managers_has_members;
delete from users;
delete from workspaces;
|
<filename>db/patches/0790_related_org_fix.sql
alter table organization_map drop constraint organization_map_organization_identifier_fkey,
add constraint organization_map_organization_identifier_fkey foreign key (organization_identifier)
references organization(identifier) on update cascade on delete cascade... |
INSERT INTO IACUC_CORRESPONDENT_TYPE ( CORRESPONDENT_TYPE_CODE, DESCRIPTION, QUALIFIER, UPDATE_TIMESTAMP, UPDATE_USER, VER_NBR, OBJ_ID )
VALUES ( '1', 'IACUC correspondent', 'P', sysdate, 'admin', 1, SYS_GUID() )
/
INSERT INTO IACUC_CORRESPONDENT_TYPE ( CORRESPONDENT_TYPE_CODE, DESCRIPTION, QUALIFIER, UPDATE_TIMESTAMP... |
<filename>sql/seed.sql
USE company_db;
INSERT INTO department(name)
VALUES ('Sales'),('Engineering'),('HR');
USE company_db;
SELECT * FROM department;
USE company_db;
INSERT INTO role(title,salary,department_id)
VALUES('Account Executive',85000,1),('Sales Intern',40000,1),
('Senior Engineer',120000,2),('Junior Engin... |
CREATE PROCEDURE [dbo].[pe_NL_GP_Accs]
@AccType int
AS
Select AccIndex, AccNum, AccDesc, AccType
FROM pe_view_NL_Accounts
WHERE AccType = @AccType
ORDER BY AccDesc |
DROP TABLE IF EXISTS `account_role`;
CREATE TABLE `account_role` (
`account_id` bigint(20) unsigned NOT NULL COMMENT '账户Id',
`role_id` bigint(20) unsigned NOT NULL COMMENT '角色Id',
PRIMARY KEY (`account_id`,`role_id`),
KEY `fk_ref_role` (`role_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='账户角色表';
INSER... |
<filename>src/main/resources/scripts/class_queries/medical_record/surgical_intervention/save.sql
INSERT INTO residence.surgical_intervention
VALUES (?, ?, ?, ?, ?); |
CREATE INDEX idx_application_id
ON applications(id);
|
<filename>openGaussBase/testcase/SQL/DDL/partition/Opengauss_Function_DDL_Partition_List_Case0068.sql
-- @testpoint: List分区表结合列约束not null,部分测试点合理报错
--step1:创建list分区表,结合列约束;expect:成功
drop table if exists t_partition_list_0068;
create table t_partition_list_0068
(id int,
age int not null,
n... |
<reponame>trra/codevault-sql-logging<gh_stars>0
{%- set function = {name: 'formatMessage'} -%}
{%- set table = tables.records -%}
{%- set tableName = table.tableName -%}
PRINT '--- TEST FUNCTION [{{schemaName}}].[formatMessage] ---'
DECLARE @test varchar(150) = ''
DECLARE @expect varchar(max) = ''
DECLARE @actual varc... |
USE [master]
GO
/* For security reasons the login is created disabled and with a random password. */
/****** Object: Login [AppAccess] Script Date: 09/01/2015 13:48:14 ******/
CREATE LOGIN [AppAccess] WITH PASSWORD=N'<PASSWORD>', DEFAULT_DATABASE=[App4Learn], DEFAULT_LANGUAGE=[us_english], CHECK_EXPIRATION=OFF, CH... |
<reponame>francois/elm-scoutges<gh_stars>0
-- Revert scoutges:extensions/unaccent from pg
SET client_min_messages TO 'warning';
BEGIN;
DROP EXTENSION unaccent;
COMMIT;
-- vim: expandtab shiftwidth=2
|
<reponame>vgalaktionov/snaql-migration
{% sql 'create_roles' %}
CREATE TABLE roles (
id INT NOT NULL,
title VARCHAR(100),
PRIMARY KEY (id)
)
{% endsql %} |
-- A veces, solo queremos combinar todas las filas de una tabla con todas las filas de otra tabla.
-- si tuviéramos una tabla shirtsy una tabla de pants, podríamos querer conocer todas las combinaciones posibles para crear diferentes conjuntos.
SELECT shirts.shirt_color,
pants.pants_color
FROM shirts
CROSS JOIN p... |
CREATE TABLE `reports` (
`ID` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`ReportType` VARCHAR(16) NOT NULL COLLATE 'utf8_bin',
`ReportContent` TEXT NOT NULL COLLATE 'utf8_bin',
`ReportedTimestamp` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`ID`)
)
COLLATE='utf8_bin'; |
<gh_stars>1-10
create table geoTable (
userId INT,
country VARCHAR(50),
postalCode VARCHAR(50),
college VARCHAR(50)
);
insert into geoTable (userId, country, postalCode, college) values (1, 'Madagascar', null, 'Université de Fianarantsoa');
insert into geoTable (userId, country, postalCode, college) values (2, 'Arg... |
grant select, insert, update, delete on data."user" to api;
alter table data.user enable row level security;
-- Define the RLS policy controlling what rows are visible to a
-- particular user.
create policy user_access_policy on data.user to api
using (
-- The student users can see on her or his user.
(request.us... |
INSERT INTO batch (id, kjoredato)
VALUES (nextval('batch_seq'), TO_TIMESTAMP('05-01-2022', 'DD-MM-YYYY SS:MS')),
(nextval('batch_seq'), TO_TIMESTAMP('28-01-2022', 'DD-MM-YYYY SS:MS')),
(nextval('batch_seq'), TO_TIMESTAMP('25-02-2022', 'DD-MM-YYYY SS:MS')),
(nextval('batch_seq'), TO_TIMESTAMP('25-03... |
-- 27.06.2016 15:37
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_SysConfig SET Description='By setting this configuration you can switch on and off the automatical closing of invoice candidates when they are set to be cleared. Closing invoice candidates means setting their Process_Overrid... |
<filename>atd-vzd/schema/atd_txdot__rural_urban_type_lkp.sql
--
-- PostgreSQL database dump
--
-- Dumped from database version 10.6
-- Dumped by pg_dump version 10.10
-- Started on 2019-10-15 13:56:34 CDT
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encodin... |
UPDATE creature_template SET ScriptName='npc_kingdom_of_dalaran_quests' WHERE entry IN (29169,23729,26673,27158,29158,29161,26471,29155,29159,29160,29162);
|
<gh_stars>1-10
--- This SQL schema was extracted excatly as is documented on
--- https://iso639-3.sil.org/code_tables/download_tables (date: 2021-05-08)
--- so was not inferred.
--- https://iso639-3.sil.org/sites/iso639-3/files/downloads/iso639-3_table_definition.txt
CREATE TABLE [ISO_639-3] (
Id char(3... |
-- MySQL dump 10.13 Distrib 5.5.46, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: ianus
-- ------------------------------------------------------
-- Server version 5.5.46-0ubuntu0.14.04.2
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHA... |
<filename>subscribe.sql
/*
Navicat MySQL Data Transfer
Source Server : MySQL
Source Server Version : 50505
Source Host : 127.0.0.1:3306
Source Database : dbalv
Target Server Type : MYSQL
Target Server Version : 50505
File Encoding : 65001
Date: 2016-07-27 11:28:59
*/
SET FOREIGN_K... |
<reponame>leongold/ovirt-engine<gh_stars>0
update vm_static set numatune_mode ='interleave'; |
<reponame>uoregon-libraries/newspaper-curation-app
-- +goose Up
ALTER TABLE `jobs` ADD COLUMN `retry_count` INT(11) COLLATE utf8_bin;
-- +goose Down
ALTER TABLE `jobs` DROP COLUMN `retry_count`;
|
<gh_stars>1-10
drop table scenes;
|
<gh_stars>100-1000
-- Inspired by https://blog.ethereum.org/2015/08/18/frontier-first-100k-blocks/
-- The following SQL queries capture partially what was depicted in that post.
-- The first 50 block times (in seconds):
SELECT b.bn, (b.block_timestamp - a.block_timestamp) AS delta
FROM
(SELECT block_number AS bn, ... |
<gh_stars>10-100
SET search_path = pg_catalog;
DROP OPERATOR public.||++(text, text);
CREATE OPERATOR public.||++ (
PROCEDURE = public.nonull_append_strings,
LEFTARG = text,
RIGHTARG = text,
COMMUTATOR = OPERATOR(public.||+-+),
NEGATOR = OPERATOR(public.||+++),
MERGES
);
ALTER OPERATOR public.||++(text, text) ... |
CREATE OR REPLACE FUNCTION os.fn_queue(p_id integer)
RETURNS void AS
$$
DECLARE
v_function_name text := 'os.fn_queue';
v_location int;
BEGIN
v_location := 1000;
INSERT INTO os.ao_queue(status, queue_date, id, refresh_type,
target_schema_name, target_tab... |
<gh_stars>0
-- codd:no-txn
CREATE TABLE other_table(); |
<reponame>kpehl/week-in-view
DROP DATABASE IF EXISTS week_in_view_draft_db;
CREATE DATABASE week_in_view_draft_db;
DROP USER IF EXISTS 'wiv_admin'@'localhost';
CREATE USER 'wiv_admin'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON week_in_view_draft_db.* TO 'wiv_admin'@'localhost'; |
<filename>queries/grade/delete_uc.sql
DELETE FROM uc
WHERE id_uc = ${id_uc} |
#SUBSTR() => Extrai uma substring de uma string (Começando em qualquer posição).
#SUBSTR(string, start, length) ou SUBSTR(string from start for length)
#Parâmetros:
# string: Obrigatório. String para extração
# start: Obrigatório. Pode ser número positivo ou negativo. Se for positico, a função extrai do início da str... |
SELECT a.employeeid, a.lastname, totallateorders = count(b.orderid)
FROM employees AS a INNER JOIN orders AS b
ON a.employeeid = b.employeeid
WHERE b.shippeddate >= b.requireddate
GROUP BY a.employeeid, a.lastname
ORDER BY totallateorders DESC; |
<reponame>Shuttl-Tech/antlr_psql
-- file:identity.sql ln:86 expect:true
SELECT * FROM itest2
|
CREATE FUNCTION grest.native_script_list ()
RETURNS TABLE (
script_hash text,
creation_tx_hash text,
type scripttype,
script jsonb
)
LANGUAGE PLPGSQL AS
$$
BEGIN
RETURN QUERY
SELECT
ENCODE(script.hash, 'hex'),
ENCODE(tx.hash, 'hex'),
script.type,
script.json
FROM script
... |
INSERT INTO categories_category (
id,
name,
name_ru,
name_uk,
description,
description_ru,
description_uk,
logo,
grid,
grid_ru,
grid_uk,
title,
code,
icon,
level,
lft,
rght,
tree_id,
age,
sex
) SELECT
id,
name,
name_ru,
name... |
CREATE TABLE [dbo].[tbDemo] (
[ID] NVARCHAR (5) NOT NULL,
[Code] INT NOT NULL,
[Name] NVARCHAR (256) NULL,
[Note] NVARCHAR (1024) NULL,
CONSTRAINT [PK_tbDemo] PRIMARY KEY CLUSTERED ([ID] ASC, [Code] ASC)
);
|
<reponame>ElderResearch/DAPM
/* This module reads in the ip base table, determines which users have have frequently
shared IP addresses over a certain time period and inserts risk scores into the entity score table indicating
the severity of the sharing behavior for the most recent bus_perd_end_dt. The (quantile) scor... |
<filename>sql/titv-by-genomic-window-fail.sql<gh_stars>0
# Select variant ids for which the ti/tv ratio for a given window is outside a defined range.
SELECT
var.variant_id AS variant_id,
titv,
"titv_by_genomic_window" AS failure_reason,
FROM (
SELECT
variant_id,
reference_name,
start,
end,
INTEGER(FLOOR(s... |
<reponame>santedb/openiz<filename>OpenIZ.Warehouse.ADO/Data/SQL/PSQL/Updates/20200618-PSQL.sql
-- TABLE FOR MESSAGES TO BE SENT
CREATE TABLE MSG_QUEUE_TBL (
MSG_ID UUID NOT NULL DEFAULT uuid_generate_v1(), -- UNIQUE IDENTIFIER FOR THE MESSAGE
CRT_UTC TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP, -- CREATION TIME O... |
<filename>blog/src/main/resources/sql/create-table.sql
-- use lfz;
-- set NAMES utf8mb4;
-- pxc5.7.22
CREATE TABLE IF NOT EXISTS blog (
id int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
title varchar(50) NOT NULL DEFAULT '' COMMENT '博客标题',
real_content TEXT NOT NULL COMMENT '文章的实际内容,md',
show_content ... |
/*
Navicat MySQL Data Transfer
Source Server : MySQL-local
Source Server Type : MySQL
Source Server Version : 50722
Source Host : localhost:3306
Source Schema : authority_db
Target Server Type : MySQL
Target Server Version : 50722
File Encoding : 65001
Date: 21/06/20... |
<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 4.3.13.3
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: 2016-05-08 12:29:59
-- 服务器版本: 5.6.26
-- PHP Version: 5.5.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ... |
<reponame>nadiiiiia/INASSURE2
-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Mar 23, 2017 at 02:08 PM
-- Server version: 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_CLI... |
<reponame>digice/sqlayer
CREATE USER 'test'@'%' IDENTIFIED WITH mysql_native_password AS '<PASSWORD>';
GRANT USAGE ON *.* TO 'test'@'%' REQUIRE NONE WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0;
CREATE DATABASE IF NOT EXISTS `test`;
GRANT ALL PRIVILEGES ON `test`.... |
<reponame>vaibhav-bot-bhopal/nishant.in<gh_stars>0
-- MySQL dump 10.13 Distrib 8.0.26, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: blueolz8_nishant
-- ------------------------------------------------------
-- Server version 8.0.26
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SE... |
DROP TABLE public.full_packs;
DROP TABLE public.full_unpacks;
DROP TABLE public.linehauls;
DROP TABLE public.service_areas;
DROP TABLE public.shorthauls;
DROP TABLE public.zip3s;
DROP TABLE public.zip5_rate_areas;
|
CREATE TABLE "public"."patient_live_status"("id" serial NOT NULL, "created_at" timestamptz NOT NULL DEFAULT now(), "updated_at" timestamptz NOT NULL DEFAULT now(), "facility" integer NOT NULL, "hospital_patient_id" text NOT NULL, "patient" integer NOT NULL, "severity" text NOT NULL, "test_status" text NOT NULL, "ward" ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.