sql stringlengths 6 1.05M |
|---|
<filename>backend/notes/schema_v4.sql
create table "metric-data" (
-- TODO: server or app
time timestamp not null,
"call-count" real not null,
"total-call-time" real not null,
"total-exclusive-time" real not null,
"min-call-time" real not null,
"max-call-time" real not null,
... |
alter table
subgraphs.subgraph_deployment
add
column debug_fork text;
|
<reponame>fanfuxiaoran/kafka_fdw
\i test/sql/setup.inc
CREATE FOREIGN TABLE kafka_test_junk (
part int OPTIONS (partition 'true'),
offs bigint OPTIONS (offset 'true'),
some_int int,
some_text text,
some_date date,
some_time timestamp,
junk text OPTIONS (junk 'true'),
junk_err text OPTION... |
CREATE TABLE IF NOT EXISTS guilds (
GuildID integer PRIMARY KEY,
Prefix text DEFAULT "t.",
LogChannel integer DEFAULT 0,
StarboardChannel integer DEFAULT 0,
LevelUpChannel integer DEFAULT 0,
WelcomeChannel integer DEFAULT 0
);
CREATE TABLE IF NOT EXISTS exp (
ID text PRIMARY KEY,
UserID... |
<filename>tests/migrations/sqlite.sql<gh_stars>1-10
/**
* SQLite
*/
DROP TABLE IF EXISTS "post";
CREATE TABLE "post" (
"id" INTEGER NOT NULL PRIMARY KEY,
"title" TEXT NOT NULL,
"body" TEXT NOT NULL
);
DROP TABLE IF EXISTS "tag";
CREATE TABLE "tag" (
"id" INTEGER NOT NULL PRIMARY KEY,
"slu... |
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE quota(host TEXT NOT NULL, type INTEGER NOT NULL, quota INTEGER NOT NULL, PRIMARY KEY(host, type)) WITHOUT ROWID;
CREATE TABLE buckets(id INTEGER PRIMARY KEY, storage_key TEXT NOT NULL, host TEXT NOT NULL, type INTEGER NOT NULL, name TEXT NOT NULL, use_count IN... |
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 26-04-2018 a las 06:46:03
-- Versión del servidor: 10.1.21-MariaDB
-- Versión de PHP: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CL... |
<gh_stars>0
/* Using this dataset, show the SQL query to find the rolling 3 day average transaction amount for each day in January 2021. */
create table transactions_grouped_by_day
as
select
sum(a.transaction_amount) as transaction_amount,
a.t_date as transaction_day
from (
select
transaction_amount,
... |
CREATE TABLE [dbo].[tbl_transactions] (
[Id] INT IDENTITY (1, 1) NOT NULL,
[type] VARCHAR (50) NULL,
[dea_cust_id] INT NULL,
[grandTotal] DECIMAL (18, 2) NULL,
[transaction_date] DATETIME NULL,
[tax] DECIMAL (18... |
-- 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_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESUL... |
<filename>mobio.sql
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Oct 07, 2020 at 10:41 AM
-- Server version: 10.4.10-MariaDB
-- PHP Version: 7.4.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00... |
<gh_stars>0
DROP DATABASE IF EXISTS tarotclubdb;
CREATE DATABASE tarotclubdb;
\c tarotclubdb;
CREATE TABLE IF NOT EXISTS users (
id bigserial PRIMARY KEY NOT NULL,
username TEXT NOT NULL,
password TEXT NOT NULL,
email TEXT NOT NULL,
attr JSON, -- autres paramètres en vrac (nom complet, avatar, twi... |
-- =============================================
-- Author: <NAME>
-- Create date: 2020-08-28
-- Description: Updating firstname and lastname
-- =============================================
CREATE PROCEDURE ums_Update_name_user
@param_Id nvarchar(256),
@param_fname nvarchar(256),
@param_lname nvarchar(256)
AS
IF (... |
/*
Navicat Premium Data Transfer
Source Server : yezi
Source Server Type : MySQL
Source Server Version : 50718
Source Host : localhost:3306
Source Schema : zerd
Target Server Type : MySQL
Target Server Version : 50718
File Encoding : 65001
Date: 09/04/2019 13:24:05
*... |
/*
https://www.hackerrank.com/challenges/revising-aggregations-sum/problem
*/
SELECT SUM(POPULATION) FROM CITY WHERE DISTRICT = "California" |
<reponame>Georgiana21/sakai<filename>signup/resources/updateSqlScripts/updatingMySqlScript_July_2010.sql
alter table signup_site_groups modify calendar_event_id VARCHAR(2000);
alter table signup_sites modify calendar_event_id VARCHAR(2000);
|
<filename>BookListerCMS_ttomczak3/webbooks/webbooks_users.sql
-- MySQL dump 10.13 Distrib 8.0.12, for Win64 (x86_64)
--
-- Host: localhost Database: webbooks
-- ------------------------------------------------------
-- Server version 8.0.12
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/... |
<filename>restaurant_kone.sql
-- MariaDB dump 10.19 Distrib 10.5.12-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: restaurant_kone
-- ------------------------------------------------------
-- Server version 10.5.12-MariaDB-1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... |
-- TABLE HAS TO BE CREATED BEFORE HAND. This is same structure postgress SQL creates
-- It very unfortunate the connector doesn't handle __connect_topic text primary key field since its a field without specific length.
-- Such things one would expect the connector would be able to handle based on the dialect.
create t... |
CREATE EXTENSION IF NOT EXISTS moddatetime;
CREATE TABLE artist (
id INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT (NOW() AT TIME ZONE 'utc'),
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT (NOW() AT TIME ZONE 'utc'),
name TEXT NOT... |
SELECT
o.organism_id
, o.name
, o.template
, o.gene_counter_start
, o.gene_counter_current
, o.transcript_counter_start
, o.transcript_counter_current
, o.created
, o.modified
, o.created_by
FROM
osi.organisms AS o
WHERE
LOWER(o.name) = LOWER(?)
;
|
CREATE SEQUENCE usagedatareporting_id_seq START WITH 1;
CREATE TABLE UsageDataReporting (
id BIGINT DEFAULT nextval('usagedatareporting_id_seq') PRIMARY KEY,
serverId VARCHAR(255) NOT NULL,
lastReportedAt TIMESTAMP
);
--//@UNDO
DROP TABLE IF EXISTS UsageDataReporting;
DROP SEQUENCE usagedatar... |
<gh_stars>1-10
-- Macro to rename a relation
{% macro rename_named_relation(from_name, to_name) %}
{%- set from_relation = api.Relation.create(database=target.database, schema=target.schema, identifier=from_name, type='table') -%}
{%- set to_relation = api.Relation.create(database=target.database, schema=target.schema,... |
<gh_stars>1-10
-- Verify ggircs-portal:tables/application_review_step_001 on pg
begin;
do
$do$
begin
if (select exists(
select * from ggircs_portal.application_review_step
where review_step_id > 1
and application_id in (select id from ggircs_portal.application where reporting_year = 2018)))
... |
CREATE TABLE IF NOT EXISTS `Org` (
`id` int NOT NULL AUTO_INCREMENT,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`createdAt` datetime(3) DEFAULT CURRENT_TIMESTAMP(3),
PRIMARY KEY (`id`),
UNIQUE KEY `Org.name_unique` (`name`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_... |
<filename>!dev_files/db/dump-20171116.sql
-- MySQL dump 10.16 Distrib 10.1.25-MariaDB, for Linux (x86_64)
--
-- Host: localhost Database: test_xcompany
-- ------------------------------------------------------
-- Server version 10.1.25-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40... |
<gh_stars>0
SELECT * FROM ms_produk; |
<reponame>rochaandre/scripts-oracle-named
-- Tablespace Summary report
--Note: You need to connect as SYS or
--need direct grants on dba_data_files to run this report.
Set linesize 120 pagesize 60 feedback off heading on
ttitle skip center "Space usage report by Tablespace" skip 2
col Tablespace format a15
... |
select FirstName + ' ' + + LastName AS "full name", CustomerID, Country
from dbo.Customer
where not country = 'USA'
select FirstName + ' ' + LastName AS "full name", CustomerID, Country
from dbo.Customer
where country = 'Brazil'
select distinct BillingCountry
from dbo.Invoice
select sum(Total) AS Sales
from dbo... |
<reponame>kkousounnis/Mysql_Excersises
-- LEFT OUTER JOIN
USE `classicmodels`;
SELECT
`customers`.`customerNumber`,
`customers`.`customerName`,
`orders`.`orderNumber`,
`orders`.`status`
FROM
`customers`
LEFT OUTER JOIN `orders`
ON `customers`.`customerNumber` = `orders`.`customerNumber`; |
<gh_stars>0
-- MySQL dump 10.13 Distrib 5.6.35, for osx10.9 (x86_64)
--
-- Host: localhost Database: laraclassified
-- ------------------------------------------------------
-- Server version 5.6.35
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTE... |
ALTER TABLE course DROP COLUMN university_id;
ALTER TABLE course ADD COLUMN university_id INT REFERENCES university(id) ON DELETE RESTRICT NOT NULL;
ALTER TABLE project_group DROP COLUMN course_id;
ALTER TABLE project_group ADD COLUMN course_id INT REFERENCES course(id) ON DELETE RESTRICT NOT NULL;
ALTER TABLE review... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 09 Nov 2021 pada 12.28
-- Versi server: 10.4.11-MariaDB
-- Versi PHP: 7.4.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SE... |
##############################################################################################################################
# Copyright 2013 <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 ... |
<reponame>221B-io/databrary.org
alter table "public"."projects_funding" drop constraint "projects_funding_pkey";
alter table "public"."projects_funding"
add constraint "projects_funding_pkey"
primary key ( "projectId" );
|
INSERT INTO slfweb.bookmakers (id, created_at, updated_at, nom, logo, status, pirorite) VALUES (1, '2015-10-18 11:07:06', '2015-10-18 11:07:06', 'Pinnacle Sports', '', 0, 3);
INSERT INTO slfweb.bookmakers (id, created_at, updated_at, nom, logo, status, pirorite) VALUES (2, '2015-10-19 15:03:11', '2015-10-19 15:03:11', ... |
-- Copyright (c) Microsoft. All rights reserved.
-- Licensed under the MIT license. See LICENSE file in the project root for full license information.
---------------------------------------------------------------------------------------------------
-- Script to upgrade Local Shard Map from version 0.0 to 1.0
-------... |
alter table OS_HISTORYSTEP drop constraint historystep_entry_fk;
alter table OS_CURRENTSTEP drop constraint currentstep_entry_fk;
drop table OS_HISTORYSTEP;
drop table OS_PROPERTYENTRY;
drop table OS_WFENTRY;
drop table OS_CURRENTSTEP;
DROP TABLE hibernate_sequence;
create table OS_HISTORYSTEP (
id BIGINT not null,
... |
<reponame>datacentricity/log4tsql
create procedure [CommonSchemaTests].[test log4Private.JournalDetail column structure]
as
begin
create table CommonSchemaTests.expected
(
JournalId int not null
, ExtraInfo varchar(max) null
) ;
exec tSQLt.AssertEqualsTableSchema 'CommonSchemaTests.expected', 'log4Private.J... |
-- file:numeric.sql ln:815 expect:true
INSERT INTO num_input_test(n1) VALUES ('555.50')
|
<filename>Database/Tables/EntitySearchFilter.sql
-- **************************************************************************************************
-- Table:EntitySearchFilter
-- Description: Stores the searched filters for a saved entity search
-- ********************************************************************... |
<reponame>mfooo/wow<gh_stars>1-10
UPDATE `creature_template` SET `ScriptName` = 'npc_saikkal_the_elder' WHERE `entry` = 22932;
|
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 2.6.1-pl3
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generato il: 22 Dic, 2006 at 12:47 PM
-- Versione MySQL: 3.23.49
-- Versione PHP: 4.2.0
--
-- Database: `cart`
--
-- --------------------------------------------------------
--
-- Struttura della tabella ... |
CREATE TABLE IF NOT EXISTS follow
(
username varchar(255),
following varchar(255),
primary key (username, following),
FOREIGN KEY (username) REFERENCES users (username),
FOREIGN KEY (following) REFERENCES users (username)
) |
<filename>metrics/kubernetes/prs_labels.sql
with issues as (
select sub.issue_id,
sub.event_id,
sub.repo_name,
sub.repo_id
from (
select distinct
id as issue_id,
dup_repo_name as repo_name,
dup_repo_id as repo_id,
last_value(event_id) over issues_ordered_by_update as event_id... |
-- Copyright (C) ---Put here your own copyright and developer email---
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later ver... |
<reponame>greysond/datahub
-- create metadata aspect table
create table metadata_aspect_v2 (
urn varchar(500) not null,
aspect varchar(200) not null,
version bigint(20) not null,
metadata longtext not null,
systemmetad... |
<filename>docker/mariadb/backup/his_patient.sql
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jul 28, 2019 at 04:14 PM
-- Server version: 5.7.27-0ubuntu0.18.04.1
-- PHP Version: 7.2.19-0ubuntu0.18.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTO... |
<filename>database/mazad.sql
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Sep 26, 2021 at 12:35 PM
-- Server version: 5.7.24
-- PHP Version: 7.4.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+0... |
<filename>src/main/resources/db/migration/mysql/V1__init.sql
create table empresa (id bigint not null auto_increment, cnpj varchar(255) not null, data_atualizacao datetime not null, data_criacao datetime not null, razao_social varchar(255) not null, primary key (id)) ENGINE=InnoDB;
create table funcionario (id bigint n... |
SELECT
COUNT(RA)
FROM SPLETIVO (NOLOCK)
INNER JOIN SMATRICPL (NOLOCK) ON
SMATRICPL.CODCOLIGADA = SPLETIVO.CODCOLIGADA
AND SMATRICPL.CODFILIAL = SPLETIVO.CODFILIAL
AND SMATRICPL.IDPERLET = SPLETIVO.IDPERLET
WHERE
SMATRICPL.CODSTATUS IN (101)
AND SPLETIVO.CODPERLET IN ('2022.1') |
<filename>assets/sql/cart-old.sql<gh_stars>0
/*
SQLyog Community v11.52 (64 bit)
MySQL - 10.1.16-MariaDB : Database - cart
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQU... |
Select S.Name
From ( Students S join Friends F Using(ID)
join Packages P1 on S.ID=P1.ID
join Packages P2 on F.Friend_ID=P2.ID)
Where P2.Salary > P1.Salary
Order By P2.Salary;
|
<gh_stars>0
drop table chatinfo;
drop table itinerarylight;
drop table service_city;
drop table sup_and_order;
drop table itinerary;
drop table wk_favor_keys;
drop table order_info;
drop table wk_order;
drop table mypiece;
drop table mypiece_imgurl;
drop table mypiecetags;
drop table expense;
drop table match_table;
dr... |
<reponame>metasloth/elhg-discord
CREATE TABLE IF NOT EXISTS MemeLog (
guildid NUMERIC,
link TEXT,
userid NUMERIC,
sendtime TEXT
);
CREATE TABLE IF NOT EXISTS MemeStore (
fetched TEXT,
link TEXT,
subreddit TEXT
);
|
-- Clue #1: We recently got word that someone fitting <NAME>'s description has been
-- traveling through Southern Europe. She's most likely traveling someplace where she won't be noticed,
-- so find the least populated country in Southern Europe, and we'll start looking for her there.
carmen=# select country, populati... |
/*
@author <NAME> / 01 / XII RPL-1
*/
--- Pratkikum soal no 2
SELECT kode_mk, nama_mk, sks, semester
FROM matakuliah
ORDER BY nama_mk;
|
<reponame>winfredSunga-jw0226/bamazon
--sql scripts for challenge #1
DROP DATABASE IF EXISTS bamazon;
CREATE DATABASE bamazon;
USE bamazon;
DROP TABLE IF EXISTS products;
CREATE TABLE products (
item_id SMALLINT UNSIGNED AUTO_INCREMENT NOT NULL,
product_name VARCHAR(1000) NOT NULL,
department_name VARCHAR(50... |
CREATE TABLE [dbo].[MenuItem] (
[Id] INT NOT NULL,
[NavigateUrl] NVARCHAR (256) NOT NULL,
[Text] NVARCHAR (256) NOT NULL,
[Target] NVARCHAR (256) NOT NULL,
[ParentId] INT CONSTRAINT [DF_MenuItem_ParentId] DEFAULT ((-1)) NOT NULL,
... |
-- MySQL dump 10.13 Distrib 8.0.18, for Win64 (x86_64)
--
-- Host: localhost Database: dbLPM
-- ------------------------------------------------------
-- Server version 8.0.18
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40... |
USE [master]
GO--
IF DB_ID('UnitTests') IS NOT NULL BEGIN
ALTER DATABASE [UnitTests] SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
DROP DATABASE [UnitTests]
END
GO--
CREATE DATABASE [UnitTests]
GO--
USE [UnitTests]
GO--
IF OBJECT_ID('[dbo].[Import_Employees]') IS NOT NULL DROP PROCEDURE [dbo].[Import_Employees]
GO-... |
DECLARE @NamedInstance bit
IF CAST(SERVERPROPERTY('ServerName') AS varchar) LIKE '%\%' SET @NamedInstance = 1 ELSE SET @NamedInstance = 0
DECLARE @ServiceName varchar(50)
IF @NamedInstance = 0
BEGIN
SET @ServiceName = 'MSSQLSERVER'
END
ELSE
BEGIN
SET @ServiceName = 'MSSQL$' + RIGHT(CAST(SERVERPROPERTY('ServerName') A... |
<gh_stars>10-100
-- file:plpgsql.sql ln:2662 expect:false
begin
select * from foo where f1 = p1 and f1::text = p3 into strict x
|
-- AlterTable
ALTER TABLE "ApiRoute" ADD COLUMN "caching" JSONB NOT NULL DEFAULT E'{}';
|
<reponame>SkyFire/CCDB406_PUBLIC<filename>CCDB/database/main_db/world_rebase/game_event_model_equip.sql
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NA... |
SELECT * FROM votes WHERE `student`=? && `song_id`=? |
---Tat ca Nhan Vien binh thuong (tru Truong Phong, Truong Chi Nhanh, Truong Du An) chi duoc phep xem thong tin cua phong minhf va luong cua minh
create view view_nhanvien1 as
select * from nhanvien where manv not in (select truongphong from phongban)
and manv not in (select truongda from duan) and manv not in (select ... |
/*********************************************************************************
Create storage (database) to store the tweets
Create compute (warehouse) to run analytical queries on the tweets
*********************************************************************************/
use role sysadmin;
create or replace wa... |
#standardSQL
# meta nodes
CREATE TEMPORARY FUNCTION getMetaNodes(payload STRING)
RETURNS ARRAY<STRING>
LANGUAGE js AS '''
try {
var $ = JSON.parse(payload);
var almanac = JSON.parse($._almanac);
return almanac['meta-nodes'].nodes.map(n => n.name || n.property);
} catch (e) {
return [];
}
''';
WITH totals AS (... |
-- Create Enhanced Table Function (ETF) using input syntax:
-- CREATE FUNCTION tabfunc(t anytable) RETURNS ...
-- MPP-16614, the SELECT query would fail
DROP FUNCTION IF EXISTS transform(anytable);
CREATE OR REPLACE FUNCTION transform(a anytable)
RETURNS SETOF outtable
AS '$libdir/tabfunc_... |
<gh_stars>0
1I: helpers/example.sql;
select example();
|
BEGIN;
SELECT plan( 2 );
CREATE TABLE postgres_auth_methods (
auth_method text NOT NULL unique
);
COPY postgres_auth_methods (auth_method) FROM stdin;
md5
ldap
krb
ident
ident pgadmin
ident sameuser
\.
select lives_ok($$
select bitemporal_internal.pk_constraint('release_version_id') ;
select bitemporal_interna... |
create table num_t(zero int, one int, null_c int);
insert into num_t values (0, 1, NULL);
select 1 from num_t where zero=0 XOR zero=0;
select 1 from num_t where zero=0 XOR 1=zero;
select 1 from num_t where zero=0 XOR zero=NULL;
select 1 from num_t where zero=0 XOR 2=zero;
select 1 from num_t where zero=0 XOR 'a'=zero... |
/* SQL query that pulls North American pollen types names, pollen type IDs, and two columns of higher taxon names for each pollen type
from the Neotoma Paleoecology Database
By <NAME>
Notes:
- Geographical extent of the sites is defined by the lat/long bounding box but can change this by modifying conditiions in the ... |
<filename>Tenant.SiteMetadata/private/sql/views/vw_SitesLockedReadOnly.sql<gh_stars>0
CREATE OR ALTER VIEW dbo.SitesLockedNoAccess
AS
SELECT
*
FROM
dbo.tvf_Sites(15,1)
WHERE
LockState = 2
|
<reponame>sejoung/spring-batch-test<gh_stars>0
insert into TB_READER(data,sync_yn,reg_dt) values('나는1','N',SYSDATE);
insert into TB_READER(data,sync_yn,reg_dt) values('너는2','N',SYSDATE);
insert into TB_READER(data,sync_yn,reg_dt) values('또는3','N',SYSDATE);
insert into TB_READER(data,sync_yn,reg_dt) values('하는4','N',SYS... |
<reponame>beleo/devilbox-dolphin
-- menu top
UPDATE `sys_menu_top` SET `Picture` = 'comments-alt' WHERE `Name` = 'Chat';
-- update module version
UPDATE `sys_modules` SET `version` = '1.1.0' WHERE `uri` = 'chat' AND `version` = '1.0.9';
|
/*
=====================================================================================================================
trigger: signUpAsClient()
whatdoes: registra un cliente al dar de alta un usuario.
====================================================================================================================... |
CREATE TABLE nv_store (
id bigint NOT NULL,
name text NOT NULL,
value int NOT NULL,
createdAt timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
ALTER TABLE nv_store ADD PRIMARY KEY (id);
ALTER TABLE nv_store MODIFY id bigint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1; |
CREATE PROCEDURE [dbo].[spToDos_ReadById]
@OwnerId nvarchar(50),
@Id int
AS
BEGIN
SET NOCOUNT ON;
SELECT ToDos.Id,
ToDos.ToDoText,
ToDos.IsComplete
FROM [dbo].[ToDos]
WHERE ToDos.OwnerId = @OwnerId AND Todos.Id = @Id;
END |
alter table TB_WORK_PACKAGES
add SCHEDULED_DATE timestamp;
REORG table TB_WORK_PACKAGES;
|
CREATE TABLE ren_cms_Sub_Categories (
CID UNIQUEIDENTIFIER NULL
, langCode VARCHAR (128) NOT NULL
, longName VARCHAR (255) NOT NULL
, PKID UNIQUEIDENTIFIER ROWGUIDCOL NOT NULL
, ref VARCHAR (255) NOT NULL
, shortName VARCHAR (255) NOT NULL
)
|
create or replace package fsm_req_pkg
authid definer
as
/* Constructor for FSM_REQ_TYPE
* @param p_req instance of FSM_REQ_TYPE to be created
* @param p_req_id ID of the request
* @param p_req_fst_id Status of the request, reference to FSM_STATUS
* @param p_req_fev_list List of a... |
<gh_stars>1-10
/* Formatted on 12-20-2018 9:55:35 AM (QP5 v5.126.903.23003) */
DECLARE
L_SQL VARCHAR2 (4000);
BEGIN
FOR CUR IN ( SELECT *
FROM ALL_OBJECTS
WHERE OBJECT_TYPE IN ('TABLE', 'SEQUENCE', 'FUNCTION')
AND OWNER IN (SELECT USERNAME
... |
create or replace package body file_text_data_api
as
--------------------------------------------------------------------------------
procedure insert_rows (
i_frd_id in file_raw_data.frd_id%type)
is
l_ftd_id file_text_data.ftd_id%type;
begin
l_ftd_id:=insert_rows(i_frd_id);
end insert_rows;
------... |
<reponame>StJudeWasHere/seonaut
ALTER TABLE `projects` DROP COLUMN `follow_nofollow`; |
DROP TABLE IF EXISTS `uteknark`;
CREATE TABLE `uteknark` (
`id` INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
`stage` INT(3) UNSIGNED NOT NULL DEFAULT 1,
`time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`x` FLOAT(10) NOT NULL,
`y` FLOAT(10) NOT NULL,
`z` FLOAT(10)... |
<filename>backend/de.metas.ui.web.base/src/main/sql/postgresql/system/41-de.metas.ui.web.base/5479160_sys_gh711webui_PickingTerminal_viewProfiles_messages_delete.sql
-- 2017-12-04T00:16:01.753
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
DELETE FROM AD_Message_Trl WHERE AD_Message_ID=544589
;
-- ... |
-- phpMyAdmin SQL Dump
-- version phpStudy 2014
-- http://www.phpmyadmin.net
--
-- 主机: localhost
-- 生成日期:
-- 服务器版本: 5.5.53
-- PHP 版本: 7.0.12
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHA... |
<reponame>Solotzy/Analysis-of-BlogEngine.NET<gh_stars>0
ALTER TABLE `be_PostComment` ADD `IsSpam` tinyint(1) NOT NULL DEFAULT '0';
ALTER TABLE `be_PostComment` ADD `IsDeleted` tinyint(1) NOT NULL DEFAULT '0';
ALTER TABLE `be_Posts` ADD `IsDeleted` tinyint(1) NOT NULL DEFAULT '0';
ALTER TABLE `be_Pages` ADD `IsDeleted`... |
<reponame>BrettPWRE/HDB<gh_stars>0
alter table hdb_ext_site_code_sys
add
constraint hdb_ext_site_code_sys_fk1
foreign key (agen_id)
references hdb_agen(agen_id);
alter table hdb_ext_site_code_sys
add
constraint hdb_ext_site_code_sys_fk2
foreign key (model_id)
references hdb_model(model_id);
|
<gh_stars>0
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE general_params ( "name" text, "value" text );
INSERT INTO "general_params" VALUES('list_report_data_table','V_Storage_List_Report');
INSERT INTO "general_params" VALUES('list_report_data_sort_dir','DESC');
INSERT INTO "general_params" VALUES('de... |
<gh_stars>0
set session group_concat_max_len = 1000000
go
drop view permissions_meta.db_gen_table_columns
go
create view permissions_meta.db_gen_table_columns as (
select get_column_tables.table_schema,
get_column_tables.table_name,
group_concat(
concat('\t', get_column... |
SELECT F1(f2(a),b) FROM t |
UPDATE `sp_metric_expression` SET `enable` = 0 WHERE `id` = (SELECT `id` FROM (SELECT `id` FROM `sp_metric_expression` WHERE `enable` = 1 AND `expression` LIKE "%\"alias\":\"application_cache_service\"%") AS `ids`);
UPDATE `sp_metric_expression` SET `enable` = 0 WHERE `id` = (SELECT `id` FROM (SELECT `id` FROM `sp_metr... |
CREATE TABLE semaphores (
id int PRIMARY KEY AUTO_INCREMENT,
lockstring varchar(128) UNIQUE,
created datetime NOT NULL,
expires datetime NOT NULL,
locked_by text NOT NULL
);
|
<gh_stars>100-1000
select * from Artist; |
<gh_stars>0
-- Put your SQLite "down" migration here
DROP INDEX orderdetailproductid ;
DROP INDEX orderdetailorderid;
CREATE INDEX ordercustomerid;
CREATE INDEX orderemployeeid;
CREATE INDEX productsupplierid;
CREATE INDEX employeereportsto; |
<filename>sql/_23_apricot_qa/_02_performance/_02_function_based_index/cases/function_based_index_function_LEFT.sql
--+ 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 ... |
<reponame>navikt/helse-spesialist
ALTER TABLE notat
DROP COLUMN saksbehandler_navn;
ALTER TABLE notat
ADD CONSTRAINT notat_saksbehandler_ref_fkey FOREIGN KEY (saksbehandler_oid) REFERENCES saksbehandler (oid);
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.