sql stringlengths 6 1.05M |
|---|
<filename>contrib/gp_internal_tools/uninstall_gp_session_state.sql
SET search_path = session_state;
BEGIN;
DROP VIEW session_level_memory_consumption;
DROP FUNCTION session_state_memory_entries_f();
DROP SCHEMA session_state;
COMMIT;
|
create table users (login varbinary(256) not null, passhash varbinary(256) not null, id integer primary key auto_increment not null, time integer not null);
create unique index users_idx on users (login);
|
DO
$$
BEGIN
IF register_patch('CreatingSampleBasisQuestion', 'jekabskarklins', 'Create sample basis special question', '2020-10-05') THEN
BEGIN
INSERT INTO questions(
question_id,
data_type,
question,
default_config,
natural_key,
cate... |
<reponame>blukitas/SQL-pills
USE emt_supervielle_desa_prueba
GO
IF EXISTS (SELECT 1 FROM tablas_depurar_SPV WHERE atd_tabla='wf_cmb_objetos' )
BEGIN
UPDATE tablas_depurar_SPV set
atd_SP='wf_p_pase_historico_cob_SPV',
atd_orden = 1,
atd_baja_fecha = null,
atd_periodicidad = 7,
atd_ultima_ejecuci... |
/****** Object: View [dbo].[MessagesComplete] Script Date: 09/21/2011 16:45:15 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER VIEW [dbo].[MessagesComplete]
AS
SELECT
M.TopicId
,M.MessageId
,M.MessageBody
,M.MessageCreationDate
,M.MessageLastEditDate
,M.ParentId
,M.UserId
... |
<reponame>seushermsft/active-learning-detect
-- Set up table
CREATE TABLE Image_Tags (
ImageTagId SERIAL UNIQUE,
ImageId integer REFERENCES Image_Info(ImageId) ON DELETE RESTRICT,
X_Min decimal(6,2) NOT NULL,
X_Max decimal(6,2) NOT NULL,
Y_Min decimal(6,2) NOT NULL,
Y_Max decimal(6,2) NOT NULL,
... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 03, 2021 at 03:24 AM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.2.33
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARAC... |
-- MS SQL
-- Database Name: Fiesta
-- ------------------------------------------------------
--
--
-- Table structure for table `products`
--
DROP TABLE IF EXISTS [products];
CREATE TABLE products (
[id] INT PRIMARY KEY IDENTITY (1, 1),
[product_name] varchar(255) NOT NULL,
[product_price] decimal(5,2) NOT... |
--4
USE SoftUni
GO
SELECT [FirstName], [LastName]
FROM [Employees]
WHERE [JobTitle] NOT LIKE '%engineer%'
|
-- manual load because for r2dbc not created core migration
CREATE TABLE IF NOT EXISTS STORES (
store_id VARCHAR(18) DEFAULT GEN_RANDOM_UUID() PRIMARY KEY,
name VARCHAR(120) NOT NULL,
phone VARCHAR(14) NOT NULL
);
CREATE TABLE IF NOT EXISTS ORDERS (
order_id VARCHAR(18) DEFAULT GEN_RANDOM_UUID()... |
<reponame>ludhrani/Online-Bookstore
-- MySQL stored procedures for database manipulation
DELIMITER //
DROP PROCEDURE IF EXISTS add_new_user//
CREATE PROCEDURE add_new_user(
IN uname VARCHAR(30),
IN sname VARCHAR(30),
IN bname VARCHAR(30),
IN addr VARCHAR(50),
IN bkg_card_nr VARCHAR(19),
IN pass VARC... |
<filename>db_siakuntansi.sql
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 1172.16.31.10
-- Generation Time: Aug 26, 2019 at 03:24 PM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.3.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zon... |
--Mapping details per classifier + effective grants + specified grants
SELECT * FROM
(SELECT
wc.name AS 'ClassifierName'
,wc.group_name AS 'GroupName'
,wc.importance AS 'ClassifierImportance'
,wg.importance AS 'GroupImportance'
,wcd.classifier_type
,wcd.classifier_value
,wg.min_percentage_... |
CREATE TABLE users
(
uid INT NOT NULL PRIMARY KEY,
state VARCHAR(50) NOT NULL,
state_data text NOT NULL
);
CREATE TABLE event_classes
(
ecid SERIAL NOT NULL PRIMARY KEY,
uid INT NOT NULL,
text_id VARCHAR(50) NOT NULL,
name VA... |
<gh_stars>1-10
-- миграция с основними таблицами
-- файлы
CREATE TABLE files
(
id bigserial NOT NULL,
created timestamp DEFAULT timezone('UTC'::text, NOW()) NOT NULL, -- по умолчанию задаёт время создания создания сущности
user_id ... |
CREATE TABLE Models(
ModelID INT NOT NULL,
Name VARCHAR(50) NOT NULL,
ManufacturerID INT NOT NULL
)
CREATE TABLE Manufacturers(
ManufacturerID INT NOT NULL,
Name VARCHAR(50) NOT NULL,
EstablishedOn DATE
)
INSERT INTO Models (ModelID, Name, ManufacturerID)
VALUES
(101,'X1', 1),
(102, 'i6', 1),
(103, 'Model S', 2),
(10... |
create database `niko-prod` default character set utf8 collate utf8_general_ci;
use niko-prod;
-- ----------------------------
-- Table structure for ab_test
-- ----------------------------
DROP TABLE IF EXISTS `ab_test`;
CREATE TABLE `ab_test` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`method` varchar(255) NOT NUL... |
CREATE OR REPLACE
PACKAGE BODY json_UT IS
----------------------------------------------------------
-- PRIVATE TYPES
----------------------------------------------------------
----------------------------------------------------------
-- LOCAL MODULES
----------------------------------------------------------
PROCE... |
CREATE TABLE "departments" (
"dept_no" VARCHAR(10) NOT NULL,
"dept_name" VARCHAR(30) NOT NULL,
CONSTRAINT "pk_departments" PRIMARY KEY (
"dept_no"
)
);
CREATE TABLE "dept_emp" (
"emp_no" INT NOT NULL,
"dept_no" VARCHAR(10) NOT NULL,
CONSTRAINT "pk_dept_emp" PRIMARY KEY (
... |
<filename>SQL/1264. Page Recommendations.sql
/*
1264. Page Recommendations
Table: Friendship
+---------------+---------+
| Column Name | Type |
+---------------+---------+
| user1_id | int |
| user2_id | int |
+---------------+---------+
(user1_id, user2_id) is the primary key for this table.
Ea... |
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 1192.168.127.12
-- Erstellungszeit: 21. Dez 2017 um 08:55
-- Server-Version: 10.1.25-MariaDB
-- PHP-Version: 5.6.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET ... |
<gh_stars>1-10
INSERT INTO
sso.user_password_table("user_id", "hash", "allow_reset", "require_update", "static")
VALUES
($1, $2, $3, $4, $5)
ON CONFLICT
("user_id")
DO UPDATE SET
"hash" = $2,
"allow_reset" = $3,
"require_update" = $4,
"static" = $5
RETURNING
"created_at",
"updated_at... |
-- 1330 Number of visit_detail records inside a valid observation period
SELECT
1330 AS analysis_id,
CAST(NULL AS VARCHAR(255)) AS stratum_1,
CAST(NULL AS VARCHAR(255)) AS stratum_2,
CAST(NULL AS VARCHAR(255)) AS stratum_3,
CAST(NULL AS VARCHAR(255)) AS stratum_4,
CAST(NULL AS VARCHAR(255)) AS stratum_5,
COUNT... |
-- Function: stratcon.delete_metrics(integer, text)
-- DROP FUNCTION stratcon.delete_metrics(integer, text);
CREATE OR REPLACE FUNCTION stratcon.delete_metrics(IN in_sid integer, IN in_metric text)
RETURNS TABLE(table_name text, deleted_rows numeric) AS
$BODY$DECLARE
delcount numeric;
metriccount numeri... |
-- +goose Up
-- SQL in this section is executed when the migration is applied.
ALTER TABLE payment_template
ALTER COLUMN amount TYPE character varying(64),
ALTER COLUMN amount SET DEFAULT '',
ALTER COLUMN amount SET NOT NULL;
-- +goose Down
-- SQL in this section is executed when the migration is rolled ba... |
DELETE FROM indexes;
|
<gh_stars>1-10
DROP VIEW IF EXISTS application;
DROP VIEW IF EXISTS codestyle;
DROP VIEW IF EXISTS codetext;
DROP VIEW IF EXISTS codetextraw;
DROP VIEW IF EXISTS codetype;
DROP VIEW IF EXISTS domain;
DROP VIEW IF EXISTS labeltext;
DROP VIEW IF EXISTS text;
|
-- Revert ggircs-portal:trigger_functions/signature_md5 from pg
begin;
drop function ggircs_portal_private.signature_md5;
commit;
|
select * from {{ var('test_create_table') }}
union all
select * from {{ var('test_create_second_table') }}
|
<filename>system-database/tms/testdata/h2_load_bank_demo_data.sql
INSERT INTO DIMENSIONS.ACCOUNT SELECT * FROM CSVREAD('/home/rtws/accounts.csv');
INSERT INTO DIMENSIONS.BRANCH SELECT * FROM CSVREAD('/home/rtws/branch.csv');
INSERT INTO DIMENSIONS.BANK SELECT * FROM CSVREAD('/home/rtws/bank.csv');
INSERT INTO DIMENSION... |
<gh_stars>1000+
ALTER TABLE {$NAMESPACE}_diviner.diviner_livebook
ADD configurationData LONGTEXT COLLATE utf8_bin NOT NULL;
UPDATE {$NAMESPACE}_diviner.diviner_livebook
SET configurationData = '{}' WHERE configurationData = '';
ALTER TABLE {$NAMESPACE}_diviner.diviner_livesymbol
ADD title VARCHAR(255);
ALTER T... |
-- @testpoint:opengauss关键字returns(非保留),作为用户组名
--关键字不带引号-成功
drop group if exists returns;
create group returns with password '<PASSWORD>';
drop group returns;
--关键字带双引号-成功
drop group if exists "returns";
create group "returns" with password '<PASSWORD>';
drop group "returns";
--关键字带单引号-合理报错
drop group if exists 'retu... |
<filename>SMPP/SmppClient/DataTypes/spSMPP_Pdu_Insert.sql
USE [Database]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[spSMPP_Pdu_Insert]
@SMSCServiceID INT,
@LogKey NVARCHAR(128),
@Direction SMALLINT,
@CommandLength BIGINT,
@CommandId... |
<gh_stars>0
-- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64)
--
-- Host: 192.168.2.254 Database: proyectosfa
-- ------------------------------------------------------
-- Server version 5.7.12-0ubuntu1.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=... |
with diffs as (
SELECT
old.[SurveyID]
,old.[ShotInfoID]
,old.[InlineDeviation] [OldInlineDeviation], new.[InlineDeviation] [NewInlineDeviation], old.[InlineDeviation] - new.[InlineDeviation] [DiffInlineDeviation], ABS(old.[InlineDeviation]) - ABS(new.[InlineDeviation]) [DiffAbsInlineDeviation]
,old.[Crossli... |
DROP DATABASE IF EXISTS adidas;
CREATE DATABASE adidas;
USE adidas;
DROP TABLE IF EXISTS shoes;
DROP TABLE IF EXISTS looks;
DROP TABLE IF EXISTS shares;
CREATE TABLE shoes (
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(50) NOT NULL,
img_url VARCHAR(150),
short_desc VARCHAR(150),
long_desc VARCH... |
-- from surveys database to check id/name
--select * from survey.Survey
-- check counts
SELECT COUNT(*) FROM [acquisition].[ShotInfo]
SELECT COUNT(*) FROM [acquisition].[ShotInfoDeviation]
SELECT COUNT(*) FROM [acquisition].[ShotInfoDeviation2]
-- to do
-- check the events count
select count(*) from (select distin... |
ALTER TABLE public.transfers ALTER COLUMN messagePayload VARBINARY(322);
|
<reponame>maysincerity/GradLab<gh_stars>0
create table test1 (uid int not null primary key, uname char(20) not null);
create table test2 (uid int not null, lid int not null
foreign key (uid) references test1 (uid));
|
<reponame>grglucastr/api-agenda-springboot<filename>contatos.sql
DROP database if EXISTS agenda;
CREATE DATABASE agenda;
use agenda;
CREATE TABLE `contatos` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`email` varchar(100) NOT NULL,
`nome` varchar(255) NOT NULL,
`sexo` char(1) NOT NULL,
`telefone` varchar(100) ... |
<filename>lib/sql/getUserGroupsOwner.sql
SELECT
m.AttributeName as Role,
m.ID as GroupID,
m.StringValue as Username,
o.ObjectType,
o.GroupType,
o.Description,
n.StringValue as Unit
FROM
dbMetakatalog.dbo.tblMultiValue m,
dbMetakatalog.dbo.tblObjects o
INNER JOIN
dbMetakatalog.dbo.tblMultiValue n O... |
<filename>src/routes/features/sql/get-features-list.sql
WITH columns AS (
SELECT
ns.nspname AS table_schema,
class.relname AS table_name,
attr.attname AS column_name,
trim(leading '_' from tp.typname) AS type_name
FROM pg_attribute attr
JOIN pg_catalog.pg_class AS class ON class.oid = attr.attre... |
<filename>sqlData/libros.sql
-- phpMyAdmin SQL Dump
-- version 4.9.5deb2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Feb 19, 2022 at 06:30 PM
-- Server version: 8.0.25-0ubuntu0.20.04.1
-- PHP Version: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;... |
Drop table [dbo].[Teams]
GO
CREATE TABLE [dbo].[Teams]
(
[TeamId] INT NOT NULL PRIMARY KEY,
[TeamName] NVARCHAR(50) NOT NULL,
[Location] NVARCHAR(50) NULL,
[TimeZone] NVARCHAR(50) NOT NULL
)
GO
DROP TABLE [dbo].[Games]
GO
CREATE TABLE [dbo].[Games]
(
[GameId] INT NOT NULL PRIMARY K... |
SELECT COUNT(*)
FROM
tag as t,
site as s,
question as q,
tag_question as tq
WHERE
t.site_id = s.site_id
AND q.site_id = s.site_id
AND tq.site_id = s.site_id
AND tq.question_id = q.id
AND tq.tag_id = t.id
AND (s.site_name in ('stackoverflow'))
AND (t.name in ('.net-4.0','angular2-routing','angularjs-scope','big-o','c++1... |
-- Populate Acts and Venues here, but not Events (which are date-dependant;
-- those are created by the FakeDataLoaderEjb
-- ACTS
-- Movies are Acts but in a joined table.
insert into acts(id, title, type, year) values( -100, 'Star Wars Episode 15: The Next Jedi', 0, 2021);
insert into movies (id, director) values (-... |
<gh_stars>1-10
--select * from testflowitem
select testflowitem_id, testflowdef_id, testflowdef_name, testflowitem_item_id, item_number, item_description, testtype_name, testflowitem_override,
testflowitem_created_timestamp, testflowitem_modified_timestamp
from testflowitem
inner join testflowdef on testflowitem_fl... |
SET NOCOUNT ON;
SELECT Count(*) AS 'Total',
CASE
WHEN ch.lastevaluationhealthy = 1 THEN 'Healthy Client'
WHEN ch.lastevaluationhealthy = 2 THEN 'Unhealthy Client'
WHEN ch.lastevaluationhealthy = 3 THEN 'Unknown'
END AS 'Health',
ch.lastevaluationhealthy
FROM v_r_s... |
<filename>src/Cms/Resource/incremental/mysql/0056_widget_relation_added_section.sql
ALTER TABLE `cms_category_widget_category`
ADD `cms_category_section_id` int(11) NULL AFTER `cms_category_id`,
ADD FOREIGN KEY (`cms_category_section_id`) REFERENCES `cms_category_section` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;
D... |
alter table users add column access jsonb not null default '{"all":"a"}';
|
<filename>airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_simple_streams/second_output/airbyte_incremental/test_normalization/renamed_dedup_cdc_excluded.sql
delete
from "postgres".test_normalization."renamed_dedup_cdc_excluded"
where (_airbyte_uniqu... |
<gh_stars>100-1000
CREATE TABLE [dbo].[RelatedBug] (
[RelatedBugID] [int] IDENTITY (1, 1) NOT NULL ,
[BugID] [int] NOT NULL ,
[LinkedBugID] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[RelatedBug] ADD
CONSTRAINT [PK_BugRelation] PRIMARY KEY CLUSTERED
(
[RelatedBugID]
) ON [PRIMARY]
GO
SET QUOTED_... |
<filename>inst/sql/cr_openalex_inst_full_raw.sql
WITH
first_aff AS (
SELECT
doi,
author_position,
id,
country_code,
display_name
FROM (
SELECT
doi,
author_position,
institutions
FROM
`subugoe-collaborative.openalex.works`,
UNNEST(authorships)
WHERE
... |
-- on the purposes tables, add a uuid id field and rename the existing
-- unique id from NALD
alter table water.purposes_primary
drop constraint "purposes_primary_pkey",
add column "purpose_primary_id" uuid default public.gen_random_uuid(),
add primary key ("purpose_primary_id");
alter table water.purposes_prim... |
CREATE TABLE ontime ( Yearss int, Monthss int, DayofMonthss int, DayOfWeek int, DepTime int, CRSDepTime int, ArrTime int, CRSArrTime int, UniqueCarrier varchar(5), FlightNum int, TailNum String, ActualElapsedTime int, CRSElapsedTime int, AirTime int, ArrDelay int, DepDelay int, Origin String, Dest String, Distance int,... |
<reponame>BernardIgiri/archive-RaffleTicketApp
INSERT INTO `raffle` SET
`title` = 'Hidden Raffle',
`description` = 'Example 1 Raffle description goes here',
`isPublic` = 0,
`date` = ADDDATE(NOW(), INTERVAL 10 DAY),
`drawingTime` = ADDDATE(NOW(), INTERVAL 10 DAY);
INSERT INTO `raffle` SET
`title` = 'Soon Raf... |
-- Add repository groups
update gha_repos set repo_group = 'Kubernetes' where name in (
'kubernetes/kubernetes',
'GoogleCloudPlatform/kubernetes',
'kubernetes',
'kubernetes/'
);
update gha_repos set repo_group = 'SIG API Machinery' where name in (
'kubernetes-client/csharp',
'kubernetes-client/gen',
'ku... |
-- Large REDCap Projects
--
-- Requirements
-- This query requires the last_user concept be added via the Report Production Candidates module. See https://github.com/ctsit/report_production_candidates
SELECT rcps.project_id, rcp.app_title, last_user, rcp.purpose, rcp.status, rcp.last_logged_event FROM redcap_projec... |
SELECT number, number / 2 AS n, j1, j2 FROM remote('127.0.0.{2,3}', system.numbers) ANY LEFT JOIN (SELECT number / 3 AS n, number AS j1, 'Hello' AS j2 FROM system.numbers LIMIT 0) USING n LIMIT 10;
SELECT dummy + 2 AS number, number / 2 AS n, j1, j2 FROM remote('127.0.0.{2,3}', system.one) ANY INNER JOIN (SELECT number... |
ALTER TABLE t_user DROP COLUMN encrypted_backup_key; |
<reponame>actiontech/txle<gh_stars>10-100
INSERT INTO `txle_sample_merchant` VALUES (1, 'merchant_1', 0.00000, 1, now());
INSERT INTO `txle_sample_merchant` VALUES (2, 'merchant_2', 0.00000, 1, now());
INSERT INTO `txle_sample_merchant` VALUES (3, 'merchant_3', 0.00000, 1, now());
INSERT INTO `txle_sample_merchant` VAL... |
----------------------------
------------------ TRIGGERS:
----------------------------
CREATE OR REPLACE FUNCTION muckwork.project_progress() RETURNS TRIGGER AS $$
BEGIN
IF NEW.quoted_at IS NULL THEN
NEW.progress := 'created';
ELSIF NEW.approved_at IS NULL THEN
NEW.progress := 'quoted';
ELSIF NEW.started_at IS ... |
-- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Jun 30, 2021 at 01:43 PM
-- Server version: 5.7.21
-- PHP Version: 7.2.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... |
CREATE function SQL_SalesAvg15D (@xcase int,@mat nvarchar(18),@NEng nvarchar(40))
returns nvarchar(Max)
as
begin
declare @sql nvarchar(max),@sql1 nvarchar(max)
set @sql1 =
case @xcase
when 1 then ',mcomp, mplant_location,mplant_salezone '
when 2 then ',mplant_location,mplant_salezone '
when 3 then ',mcom... |
<gh_stars>0
CREATE FUNCTION [SqlNet].[StringInsert]
(@text NVARCHAR (MAX), @startIndex INT, @value NVARCHAR (MAX))
RETURNS NVARCHAR (MAX)
AS
EXTERNAL NAME [SqlNet].[Sql.Net.Types.StringType].[StringInsert]
|
<gh_stars>0
DROP TABLE IF EXISTS `test_064`; |
CREATE TABLE IF NOT EXISTS checklists (
todo_id INT PRIMARY KEY,
name VARCHAR(255),
cost DECIMAL (7,2),
initiated_on VARCHAR(255),
is_completed INT NOT NULL DEFAULT 0
);
CREATE TABLE IF NOT EXISTS products (
product_id INT PRIMARY KEY,
name VARCHAR(255) NOT NULL,
description VARCHAR(200... |
<filename>migrations/0003_extend_game_session.up.sql<gh_stars>0
ALTER TABLE game_sessions
ADD COLUMN deposit VARCHAR(64) NOT NULL DEFAULT '0.0000 BET',
ADD COLUMN last_update NUMERIC NOT NULL DEFAULT 0,
ADD COLUMN player_win_amount VARCHAR(64) DEFAULT NULL; |
/*========================================================================================================================
-- Description: Determining the SET options for the current session in SQL Server
-- Scope: Session
-- Author: <NAME>, Madeira Data Solutions
-- Create Date: 07/11/2021
-- Last Update: 07/11/2021... |
-- Eg. psql -h 127.0.0.1 -U meteo -d vocab -f views.sql
set search_path = contr_vocab_db, public;
-- Types
drop view if exists rdf;
drop view if exists rdf_types;
create view rdf_types as
select classification_scheme_name as subject,
'rdf:type'::varchar as predicate,
'skos:ConceptScheme'::varchar as objec... |
CREATE TABLE Job(
Job_ID int PRIMARY KEY NOT NULL IDENTITY(1000,1),
Start_Location varchar(50),
End_Location varchar(50),
Job_Date datetime,
Load_ID int FOREIGN KEY REFERENCES Load(Load_ID),
Customer_ID int FOREIGN KEY REFERENCES Customer(Customer_ID)
);
|
<gh_stars>0
CREATE TABLE [Valid].[LLDDandHealthProblem] (
[UKPRN] INT NOT NULL,
[LearnRefNumber] VARCHAR (12) NOT NULL,
[LLDDCat] INT NOT NULL,
[PrimaryLLDD] INT NULL,
[LLDDandHealthProblem_ID] BIGINT NOT NULL,
PRIMARY KEY CLUSTERED ([UKPRN], [Lear... |
-- phpMyAdmin SQL Dump
-- version 4.5.0.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Feb 17, 2016 at 06:40 PM
-- Server version: 5.6.21-log
-- PHP Version: 5.6.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIEN... |
-- phpMyAdmin SQL Dump
-- version 4.8.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 04, 2018 at 03:47 AM
-- Server version: 10.1.31-MariaDB
-- PHP Version: 7.2.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
<filename>delivery2/trigger_2.sql
-- =================================================================================================
-- Author: <NAME>
-- <NAME>
-- <NAME>
--
-- Description: Triggers for wear insertion and update
-- A device cannot be associated with a patie... |
SELECT DISTINCT INV.NAME "Investment Name",
SRM.FULL_NAME "Resource",
(
SELECT PROLE.LAST_NAME
FROM SRM_RESOURCES PROLE
WHERE PROLE.ID = TEAM.PRROLEID
) "Project Role",
DECODE (TEAM.PRBOOKING, 15, 'Hard', 10, 'Mixed', 5, 'Soft') "Booking Status",
DECODE (T... |
USE [Koski_SA]
GO
/****** Object: StoredProcedure [sa].[p_lataa_lukio_paatason_suoritus] Script Date: 22.12.2021 11:24:57 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [sa].[p_lataa_lukio_paatason_suoritus] AS
TRUNCATE TABLE sa.sa_lukio_paatason_suoritus
INSERT INTO sa.sa_lukio_paata... |
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 01 Bulan Mei 2020 pada 16.02
-- Versi server: 10.1.37-MariaDB
-- Versi PHP: 7.2.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
<filename>database/db_v2/laravel_ecommerce.sql
-- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 15, 2020 at 05:05 PM
-- Server version: 10.4.8-MariaDB
-- PHP Version: 7.3.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION... |
<reponame>Chickey49/Bantr
CREATE DATABASE IF NOT EXISTS `bantr_db` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `bantr_db`;
-- MySQL dump 10.13 Distrib 8.0.22, for Win64 (x86_64)
--
-- Host: localhost Database: bantr_db
-- ----------------------------... |
<gh_stars>1-10
create database airdnd_DB;
use airdnd_DB; |
<gh_stars>1-10
insert into user_contact (user_id, type, value, verified)
select user_id, 'MOBILE_PHONE', mobile, mobile_verified from users where mobile is not null;
|
-- Revert seattleflu/schema:roles/enrollment-processor/rename from pg
begin;
alter role "enrollment-processor" rename to enrollment_processor;
commit;
|
<filename>src/test/resources/e_select.test_2.sql
-- e_select.test
--
-- execsql {SELECT * FROM x2 JOIN x3}
SELECT * FROM x2 JOIN x3 |
<filename>src/test/resources/minmax3.test_15.sql
-- minmax3.test
--
-- execsql { DROP INDEX i1 ; CREATE INDEX i1 ON t1(y DESC) }
DROP INDEX i1 ; CREATE INDEX i1 ON t1(y DESC) |
<gh_stars>1000+
-- 2021-06-29T16:06:17.582442200Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
DELETE FROM AD_UI_Element WHERE AD_UI_Element_ID=584479
;
-- 2021-06-29T16:06:17.599442400Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
DELETE FROM AD_Element_Link WHERE AD_Field_ID... |
UPDATE EPS_PROP_PER_DOC_TYPE SET DESCRIPTION='StatementofCommitment' WHERE DOCUMENT_TYPE_CODE='4';
UPDATE EPS_PROP_PER_DOC_TYPE SET DESCRIPTION='BudgetDetails' WHERE DOCUMENT_TYPE_CODE='3';
COMMIT; |
<filename>coeus-db/coeus-db-sql/src/main/resources/org/kuali/coeus/coeus-sql/log/Release_1_0_logs/s2s/views/OSP$EPS_PROPOSAL.sql
CREATE OR REPLACE VIEW OSP$EPS_PROPOSAL ( PROPOSAL_NUMBER, PROPOSAL_TYPE_CODE, STATUS_CODE, CREATION_STATUS_CODE, BASE_PROPOSAL_NUMBER, CONTINUED_FROM, TEMPLATE_FLAG, ORGANIZATION_ID, PERFOR... |
DELETE FROM strings WHERE entry BETWEEN 1143 AND 1148;
INSERT INTO strings VALUES
(1143, 'Spawned by event %u (%s)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1144, 'Despawned by event %u (%s)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1145, 'Part of pool %u',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1146, 'Part of... |
<reponame>skahler-yuga/yugabyte-db
-- Copyright (c) YugaByte, Inc.
-- NOTE: This is not a versioned migration. Editing this file will tell flyway to re-apply it!
-- Probably safest to not edit this file
alter table if exists certificate_info add column if not exists checksum varchar(32);
|
BEGIN;
CREATE TABLE "consulta_validez_unidadeducativa" (
"id" serial NOT NULL PRIMARY KEY,
"cue" varchar(9) NOT NULL UNIQUE,
"nombre" varchar(255) NOT NULL,
"tipo_unidad_educativa" varchar(20) NOT NULL,
"jurisdiccion_id" integer REFERENCES "registro_jurisdiccion" ("id") DEFERRABLE INITIALLY DEFERRED... |
-- Add bank account owner
ALTER TABLE `client` ADD `bank_account_owner` varchar(255) DEFAULT NULL AFTER `notes`;
|
<gh_stars>1-10
/*L
Copyright SAIC
Distributed under the OSI-approved BSD 3-Clause License.
See http://ncip.github.com/cabio/LICENSE.txt for details.
L*/
drop index LOC_RANGE_QUERY;
drop index LOC_TRANSCRIPT_ID;
drop index LOC_SNP_ID;
drop index LOC_SEQUENCE_ID;
drop index LOC_MARKER_ID;
drop inde... |
<reponame>opengauss-mirror/Yat
-- @testpoint: opengauss关键字trusted(非保留),作为同义词对象名,部分测试点合理报错
--前置条件
drop table if exists explain_test;
create table explain_test(id int,name varchar(10));
--关键字不带引号-成功
drop synonym if exists trusted;
create synonym trusted for explain_test;
insert into trusted values (1,'ada'),(2, 'bob')... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 30, 2020 at 02:11 PM
-- Server version: 10.4.6-MariaDB
-- PHP Version: 7.1.32
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!... |
DECLARE
genreid INTEGER;
amount INTEGER;
BEGIN
for v_rec in (
SELECT GENRE.GENREID, COUNT(*) as Amount FROM GENRE
INNER JOIN TRACK
ON TRACK.GENREID = GENRE.GENREID
INNER JOIN INVOICELINE
ON INVOICELINE.TRACKID = TRACK.TRACKID
INNER JOIN
(
SELECT INVOICEID FROM INVOICE
INNER JOIN CUSTOMER
O... |
<filename>mysql/employeetracker_seeds.sql<gh_stars>0
INSERT INTO edepartment (name) VALUES ('Engineering');
INSERT INTO edepartment (name) VALUES ('Human Resources');
INSERT INTO edepartment (name) VALUES ('Consulting');
INSERT INTO edepartment (name) VALUES ('Nursing');
INSERT INTO edepartment (name) VALUES ('Operatio... |
-- CreateTable
CREATE TABLE `user` (
`id` INTEGER NOT NULL AUTO_INCREMENT,
`publicId` VARCHAR(191) NOT NULL,
`firstname` VARCHAR(191) NOT NULL,
`lastname` VARCHAR(191) NOT NULL,
`email` VARCHAR(191) NOT NULL,
`password` VARCHAR(191) NOT NULL,
`created_at` DATETIME(3) NOT NULL DEFAULT CURRENT... |
<reponame>megan-donnelly/messaging-mini-app<gh_stars>0
SELECT conversations.id, messages.content, messages."updatedAt", users."firstName", users."lastName"
FROM conversations
JOIN messages
ON (conversations.id = messages."conversationId")
JOIN users
ON (messages."userId" = users.id)
WHERE conversations.id = 1
O... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 29, 2020 at 12:22 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_CHARACTER_SET_CLIEN... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.