sql stringlengths 6 1.05M |
|---|
--Initialization
create table duplicates (col1 number, col2 number);
insert into duplicates
select trunc(dbms_random.value(1,4000)),trunc(dbms_random.value(1,200)) from dual connect by level<1000000;
insert into duplicates
select null,null from dual union all
select null,null from dual union all
select 1,null from du... |
select SYS_CONTEXT ('USERENV','DB_NAME') AS INSTANCE_NAME,
OWNER as SCHEMA_NAME,
MVIEW_NAME AS OBJECT_NAME,
CONTAINER_NAME,
QUERY AS DEFINITION,
REFRESH_MODE,
REFRESH_METHOD,
BUILD_MODE,
LAST_REFRESH_DATE,
COMPILE_STATE,
SYS_CONTEXT ('USERENV','DB_NAME') || OWNER AS ROWKEY
from dba_mviews; |
create or replace package body flow_viewer
as
function render
(
p_region in apex_plugin.t_region
, p_plugin in apex_plugin.t_plugin
, p_is_printer_friendly in boolean
)
return apex_plugin.t_region_render_result
as
l_return apex_plugin.t_region_render_result;
beg... |
<reponame>deepest-stack/backend
CREATE OR REPLACE FUNCTION DL_SCHEMA.train(
layers_def VARCHAR[][2],
losses VARCHAR[][2],
optimizer VARCHAR[2],
metrics VARCHAR[][2],
train_table VARCHAR,
x_columns VARCHAR[],
y_column VARCHAR,
epochs I... |
<reponame>aravi5/drill-test-framework<filename>framework/resources/Functional/no_result_set/DRILL_6834_set_option_no_result_set.sql
set `exec.query.return_result_set_for_ddl` = false;
--@test
set `store.format` = 'json';
reset `store.format`;
reset `exec.query.return_result_set_for_ddl`; |
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE FUNCTION [dbo].[fn_SHR_CIC_Link_GeneralHeading](
@GH_ID int,
@GeneralHeading nvarchar(255),
@HTTPVals varchar(500),
@PathToStart varchar(50)
)
RETURNS nvarchar(max) WITH EXECUTE AS CALLER
AS
BEGIN
RETURN '<A HREF="' + ISNULL(@PathToStart,'') + 'bresults.asp?... |
INSERT INTO REF.CauseOfLoss (causeOfLossCode, causeOfLossDesc, isActive) VALUES
('EQ','Earthquake',1),
('WS','Windstorm/Hurricane',1),
('FL','Flood',1),
('FR','Interior Fire',1),
('TR','Terrorism',1),
('CS','Severe Convective Storm',1),
('WT','Winterstorm',1),
('ALL','RMS ALL PERILS',1)
... |
SELECT
array(1, 2, NULL) AS val,
toTypeName(val) AS ty
|
/*L
Copyright Ekagra Software Technologies Ltd.
Copyright SAIC, SAIC-Frederick
Distributed under the OSI-approved BSD 3-Clause License.
See http://ncip.github.com/common-security-module/LICENSE.txt for details.
L*/
ALTER TABLE CSM_USER MODIFY COLUMN LOGIN_NAME VARCHAR(500);
ALTER TABLE CSM_USER... |
<reponame>al-ry/DB-labs
USE notifications
CREATE TABLE recipient
(
id_recipient INT PRIMARY KEY IDENTITY,
id_address INT REFERENCES address(id_address),
name nvarchar(50) NOT NULL,
surname nvarchar(50) NOT NULL,
phone_number nvarchar(12) NOT NULL,
passport nvarchar(12) NOT NULL
);
CREATE TABLE post
(
id_post ... |
CREATE TABLE TAB_FATURAMENTO
(DATA_VENDA DATE NULL, TOTAL_VENDA FLOAT);
SELECT * FROM CLIENTES;
SELECT * FROM VENDEDORES;
SELECT * FROM PRODUTOS;
DELETE FROM ITEMS_NOTAS;
DELETE FROM NOTAS;
INSERT INTO NOTAS (NUMERO, DATA_VENDA, CPF, MATRICULA, IMPOSTO)
VALUES
('0100', TO_DATE('2019-06-05','YYYY-MM-DD'), '147115671... |
<filename>migrations/mysql/20220512170322_fix_profit_symbol_length.sql
-- +up
-- +begin
ALTER TABLE profits
CHANGE symbol symbol VARCHAR(20) NOT NULL;
-- +end
-- +down
-- +begin
SELECT 1;
-- +end
|
# Membuat tabel karyawan2
CREATE TABLE karyawan2(
nama varchar(30) NOT NULL, id_dep int(5) NOT NULL
)ENGINE = MyISAM;
INSERT INTO karyawan2 (nama, id_dep)
VALUES
('Dani', 17),
('Anisa', 18),
('Bagus', 12); |
<gh_stars>0
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 ('serverfault'))
AND (t.name in ('bash','email','hard-drive','mysql','networking','p... |
<filename>db/ngg_pos_ngg_users.sql
-- MySQL dump 10.13 Distrib 5.7.11, for Linux (x86_64)
--
-- Host: localhost Database: ngg_pos
-- ------------------------------------------------------
-- Server version 5.7.11-0ubuntu6
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER... |
<reponame>tgprojets/ffst
UPDATE tbl_licence SET is_qs = 0;
|
<reponame>sarkaromar/iem<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 02, 2017 at 02:49 AM
-- Server version: 5.7.14
-- PHP Version: 5.6.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_... |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 18, 2018 at 03:59 PM
-- Server version: 10.1.28-MariaDB
-- PHP Version: 7.1.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
<reponame>enriqueescobar-askida/Pluralsight.Revolution
/* create tables to store raw data */
use [OnlineFraudDetection]
go
set ansi_nulls on
go
set quoted_identifier on
go
DROP TABLE IF EXISTS OnlineFraudDetection.dbo.sql_scoring
GO
create table OnlineFraudDetection.dbo.sql_scoring
(
transactionID varchar(255),
acc... |
CREATE TABLE Courses (
`CourseID` INT,
`CourseCode` VARCHAR(7) CHARACTER SET utf8,
`CourseName` VARCHAR(53) CHARACTER SET utf8,
`LectureID` VARCHAR(5) CHARACTER SET utf8,
`TutorialID` VARCHAR(3) CHARACTER SET utf8,
`LabID` VARCHAR(3) CHARACTER SET utf8,
`Semester` VARCHAR(6) CHARACTER SET ut... |
<reponame>codingbat/Computer-Repair-System-2015<filename>Oracle SQL Files/customers.sql
INSERT INTO Customers VALUES (1,'Cooper','Antoine','31-Jan-1998','Roundabout On Malahide Road','Rathborne Court','Aherlow','Meath','692-382-2867','<EMAIL>','OAP','14-Jan-2015','NA');
INSERT INTO Customers VALUES (2,'Zupkova','Daniel... |
<reponame>rasilon/pg_logical_fan_in_proof_of_concept<filename>source1/00_set_up_source.sql
CREATE DATABASE source1;
\c source1
CREATE SCHEMA source1;
CREATE TABLE source1.source(
id serial primary key,
payload jsonb
);
INSERT INTO source1.source(payload) values('{"a": 42}');
|
<reponame>piougy/CzechIdMng
--
-- CzechIdM 7 Flyway script
-- BCV solutions s.r.o.
--
-- Add start recalculation for identity and identity contract synchronization config.
ALTER TABLE sys_sync_contract_config ADD COLUMN start_auto_role_rec boolean;
UPDATE sys_sync_contract_config SET start_auto_role_rec = true WHERE ... |
<reponame>thanbv1510/coding-probs
-- https://leetcode.com/problems/department-highest-salary/
SELECT Department.name AS 'Department',
Employee.name AS 'Employee',
Salary
FROM Employee
JOIN
Department ON Employee.DepartmentId = Department.Id
WHERE (Employee.DepartmentId, Salary) IN
(S... |
CREATE TABLE `OLTP` (
`OLTP_no` int(11) NOT NULL AUTO_INCREMENT,
`test_no` int(11) DEFAULT NULL,
`tps` decimal(8,2) DEFAULT NULL,
`latency` decimal(8,2) DEFAULT NULL,
`errors` decimal(8,2) DEFAULT NULL,
`reconnects` decimal(8,2) DEFAULT NULL,
`time` int(11) DEFAULT NULL,
`threads` decimal(8,2) DEFAULT N... |
<gh_stars>0
DROP TABLE IF EXISTS permission;
CREATE TABLE permission (
permission_id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,
student_id INTEGER NOT NULL,
project_id INTEGER NOT NULL,
FOREIGN KEY (student_id) REFERENCES student(student_id) ON DELETE CASCADE,
FOREIGN KEY (project_id) REFERENCES project(pr... |
<filename>Manager_Control/GetDefaultRemoteInfoForManager.sql
/****** Object: StoredProcedure [dbo].[GetDefaultRemoteInfoForManager] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[GetDefaultRemoteInfoForManager]
/****************************************************
**
** De... |
insert into LINK_POOL (LINK) VALUES ('https://sina.cn');
|
PRINT 'Updating Disposed Property Agencies'
----------------------------------------------------------------
-- Summary
-- Previously disposed property would set the AgencyId=null.
-- Going forward they will retain their original agency.
-- Reset disposed properties to their project agency.
-- Note it is possible that... |
<reponame>tapper/Tapper-Schema
-- Convert schema '/2home/ss5/local/projects/Tapper/src/Tapper-Schema/upgrades/Tapper-Schema-ReportsDB-2.010010-SQLite.sql' to '/2home/ss5/local/projects/Tapper/src/Tapper-Schema/upgrades/Tapper-Schema-ReportsDB-2.010011-SQLite.sql':
BEGIN;
CREATE TEMPORARY TABLE reportcomment_temp_alt... |
<reponame>mikhan808/rsyntaxtextarea-antlr4-extension<filename>third_party/antlr_grammars_v4/sql/plsql/examples-sql-script/procedure_with_cursor_and_limit.sql<gh_stars>1-10
CREATE OR REPLACE PROCEDURE SF_JOB_CLEANUP_SHOWCASES_START (FPN_ANZ_ZUM_VERARBEITEN NUMBER DEFAULT 10000, FPN_BULK_LIMIT NUMBER DEFAULT 5000) AS
... |
-- @testpoint: opengauss关键字strict(非保留),作为函数名,部分测试点合理报错
--关键字不带引号-成功
drop function if exists strict;
create function strict(i integer)
returns integer
as $$
begin
return i+1;
end;
$$ language plpgsql;
/
--清理环境
drop function strict;
--关键字带双引号-成功
drop function if exists "strict";
create function "strict"(i integer)
r... |
CREATE TABLE app_user (user_id SERIAL PRIMARY KEY, user_Name VARCHAR(50), Caloric_Needs int, Gluten_Sensitivity bool, Allergies VARCHAR(25), Vegan_Vegetarian VARCHAR(11), Spice_Tolerance VARCHAR(25));
CREATE TABLE Meal_Plan (plan_ID SERIAL PRIMARY KEY, plan_Name VARCHAR(25) not null, Number_of_Meals int not null, calo... |
<filename>koajs/database/db.schema.sql<gh_stars>0
CREATE TABLE `users` (
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE,
`username` TEXT NOT NULL UNIQUE DEFAULT "",
`hash_password` TEXT NOT NULL DEFAULT "",
`hash_email` ... |
<reponame>Nalakabit/Laravel_ToDoList
-- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Jul 20, 2021 at 09:30 AM
-- 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_zon... |
<reponame>ujjwalstha/goevents<filename>checkpoint3.sql
-- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 1172.16.58.3
-- Generation Time: Jan 17, 2018 at 03:30 AM
-- Server version: 5.7.14
-- PHP Version: 7.0.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!401... |
<reponame>carthage-college/django-djpagan
SELECT
ROW_NUMBER() OVER (ORDER BY end_date) AS latest, prog,
yr, sess, subsess, acyr, beg_date, end_date
FROM
acad_cal_rec
WHERE
beg_date > DATE("2010-01-01")
AND
beg_date < CURRENT
AND
subsess = ""
ORDER BY
end_date DESC
INTO TEMP
ordered_terms... |
INSERT INTO Room (name)
VALUES ((:name)::varchar(200)); |
--05. EEE-Mails
SELECT A.FirstName,
A.LastName,
FORMAT(A.BirthDate, 'MM-dd-yyyy') AS BirthDate,
C.Name,
A.Email
FROM Accounts AS A
JOIN Cities AS C ON C.Id = A.CityId
WHERE A.Email LIKE 'e%'
ORDER BY C.Name ASC
--06. City Statistics
SELECT C.Name, COUNT(*) AS Hotels FROM Hotels AS H
JOIN Cities A... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 08, 2021 at 07:26 PM
-- Server version: 10.4.19-MariaDB
-- PHP Version: 7.4.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARAC... |
<reponame>myokapis/BudgetTools
--IF NOT EXISTS(SELECT * FROM sys.procedures WHERE object_id = OBJECT_ID('dbo.uspReportExpenses'))
-- EXEC('CREATE PROCEDURE dbo.uspReportExpenses');
--ALTER PROCEDURE dbo.uspReportExpenses
declare
@BeginPeriodID int,
@EndPeriodID int
--AS
SET NOCOUNT ON;
select @beginperiodid = 20... |
<reponame>malu17/alx-higher_level_programming<filename>0x0E-SQL_more_queries/12-no_genre.sql<gh_stars>0
-- lists all shows contained in hbtn_0d_tvshows without genre linked
SELECT a.title, b.genre_id
FROM tv_shows a
LEFT JOIN tv_show_genres b
ON a.id = b.show_id
WHERE b.genre_id IS NULL
ORDER BY a.title ASC, b.genre_id... |
<gh_stars>0
DROP TABLE IF EXISTS records;
CREATE TABLE IF NOT EXISTS records(
id SERIAL PRIMARY KEY,
Country VARCHAR(255),
TotalConfirmed NUMERIC,
TotalDeaths NUMERIC,
TotalRecovered NUMERIC,
Date Date
); |
CREATE OR REPLACE FUNCTION organism_tree(latin_name TEXT) RETURNS TABLE(tsn INT, parent_tsn INT, level INT) AS
$BODY$
BEGIN
RETURN QUERY
WITH RECURSIVE rec("taxonID", "parentNameUsageID", level) AS (
SELECT "taxonID", "parentNameUsageID", 0 FROM col.taxon_exported WHERE "taxonID" = organism_taxon_id(l... |
<reponame>JumHorn/leetcode
# Write your MySQL query statement below
select Name as Customers
from Customers
where Id not in(select CustomerId from Orders) |
<reponame>vampy/university
-- phpMyAdmin SQL Dump
-- version 4.5.3.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jan 19, 2016 at 07:11 PM
-- Server version: 5.5.46-0ubuntu0.14.04.2
-- PHP Version: 5.5.31-2+deb.sury.org~trusty+1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00"... |
CREATE OR REPLACE FUNCTION set_user_id(user_id bigint)
RETURNS void
LANGUAGE plpgsql
SECURITY DEFINER
SET search_path TO public, pg_temp
AS $$
BEGIN
IF set_config('uniphant.user_id',user_id::text,TRUE) = user_id::text THEN
-- Assert OK
ELSE
RAISE EXCEPTION 'Bug! set_config() did not return the value';
END IF;
RETUR... |
<reponame>ianfrantz/Docker-with-Databases<filename>Database Software/Microsoft/SQL-Server/SQL Code/Create Data Objects/CREATE.VIEW.sql
/****************************** Prologue *******************************************
***
*** Purpose:
*** Object type: View
*** Name:
*** Hardcoded: N/A
**************... |
ALTER TABLE geoname ALTER COLUMN gpoint SET NOT NULL;
ALTER TABLE geoname ALTER COLUMN gpoint_meters SET NOT NULL;
CREATE INDEX geoname_gpoint ON geoname USING GIST ("gpoint" GIST_GEOMETRY_OPS);
CREATE INDEX geoname_gpoint_meters ON geoname USING GIST ("gpoint_meters" GIST_GEOMETRY_OPS);
|
-- Revert travis-logs:log_parts_created_at_not_null from pg
BEGIN;
SET client_min_messages = WARNING;
ALTER TABLE log_parts
ALTER COLUMN created_at
DROP NOT NULL;
ALTER TABLE log_parts
ALTER COLUMN created_at
DROP DEFAULT;
COMMIT;
|
USE [ANTERO]
GO
/****** Object: StoredProcedure [sa].[p_lataa_oiva_tutkinto_oikeudet] Script Date: 25.10.2020 19:06:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[sa].[p_lataa_oiva_tutkinto_oikeudet]') AND type in (N'P', N'PC'))
BE... |
ALTER TABLE "public"."turn_scorings" DROP COLUMN "round_id" CASCADE; |
/*
Warnings:
- You are about to drop the `Tag` table. If the table is not empty, all the data it contains will be lost.
- You are about to drop the `_m:m. A user has many tags` table. If the table is not empty, all the data it contains will be lost.
*/
-- DropForeignKey
ALTER TABLE "_m:m. A user has many tags" ... |
-- upgrade --
ALTER TABLE `audit_messages` MODIFY COLUMN `attachment` VARCHAR(1000);
-- downgrade --
ALTER TABLE `audit_messages` MODIFY COLUMN `attachment` VARCHAR(2000);
|
CREATE TABLE "modifiedentity" (
"tkey" BIGINT NOT NULL,
"version" INTEGER NOT NULL,
"targetobjectkey" BIGINT NOT NULL,
"targetobjecttype" VARCHAR(255) NOT NULL,
"value" VARCHAR(255)
);
ALTER TABLE "modifiedentity" ADD CONSTRAINT "modifiedentity_pk" PRIMARY KEY ("tkey");
ALTER TABLE "modifiedentity"... |
DROP INDEX IF EXISTS payment.customer_old_id_idx;
|
-- Name: CreateScanElement
-- Schema: posda_phi
-- Columns: []
-- Args: ['element_signature_id', 'seen_value_id', 'series_scan_id']
-- Tags: ['UsedInPhiSeriesScan', 'NotInteractive']
-- Description: Create Scan Element
insert into scan_element(
element_signature_id, seen_value_id, series_scan_id
)values(
?, ?, ?)
|
<filename>macros/utils/get_value_by_target.sql<gh_stars>1-10
{% macro get_value_by_target(dev_value, default_value, dev_target_name='dev') %}
{% if target.name == dev_target_name %}
{% set value = dev_value %}
{% else %}
{% set value = default_value %}
{% endif %}
{{ return(value) }}
{% endmacro %}
|
-- This sql script is intended to be run via initdb or with the postgres container's
-- docker-entrypoint-initdb.d autorun functionality. It will creeate the test schema
-- and test user to be exercised by the corresponding pg client's requests script to
-- assist in the postgresql monitor in generating metrics.
drop... |
-- phpMyAdmin SQL Dump
-- version 4.3.11
-- http://www.phpmyadmin.net
--
-- Vært: 127.0.0.1
-- Genereringstid: 08. 03 2019 kl. 22:28:40
-- Serverversion: 5.6.24
-- PHP-version: 5.6.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*... |
<gh_stars>0
TRUNCATE TABLE `avaya_reports_db`.`avaya_cms_report`; |
CREATE PROCEDURE tSQLt.FakeTable
@TableName NVARCHAR(MAX),
@SchemaName NVARCHAR(MAX) = NULL, --parameter preserved for backward compatibility. Do not use. Will be removed soon.
@Identity BIT = NULL,
@ComputedColumns BIT = NULL,
@Defaults BIT = NULL
AS
BEGIN
SET NOCOUNT ON;
DECLARE @Command N... |
<reponame>codelikeali/bookshop
-- phpMyAdmin SQL Dump
-- version 4.9.5deb2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jun 22, 2020 at 07:25 PM
-- Server version: 8.0.20-0ubuntu0.20.04.1
-- PHP Version: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTIO... |
begin
for i in (select 'drop package body ' || object_name as stmt from user_objects where object_type='PACKAGE_BODY') loop
execute immediate i.stmt;
end loop;
end;
/
show errors;
begin
for i in (select 'drop package ' || object_name as stmt from user_objects where object_type='PACKAGE') loop
... |
<reponame>rnebular/scratch-pads
---- Script #1 - Populate database [DUMMY-AG] with simulated data using SQLCMD Mode.
-- Run script using sqlcmd command line tool.
-- sqlcmd -N -C -M -i <file>.sql
:CONNECT DUMMY-AG-L.stage.local
USE [DUMMY-AG]
GO
IF EXISTS (select * from sysobjects where name='test_table')
DROP ... |
<gh_stars>0
-- Fragt die Daten ab, die für die Darstellung der Kämpferliste im PreLogin benötigt wird.
SELECT
x.name,
x.gender,
x.coloredName,
x.title,
x.isInFront,
x.guildName,
x.guildTag,
x.raceName,
x.level,
x.locationTitle,
x.dead,
x.lastActive,
x.online
FROM
... |
CREATE TABLE IF NOT EXISTS public.kullanici
(
id numeric(19,0) NOT NULL,
name character(50) COLLATE NOT NULL,
surname character(50) COLLATE NOT NULL,
email character(50) COLLATE NOT NULL,
phone character(15) COLLATE NOT NULL,
CONSTRAINT user_pkey PRIMARY KEY (id)
)
|
DROP TABLE IF EXISTS Account;
DROP TABLE IF EXISTS Transactions;
CREATE TABLE `Account` (
`account_id` varchar(1000) NOT NULL,
`balance` double NOT NULL,
`name` varchar(255) NOT NULL,
`subtype` varchar(255) NOT NULL,
`mask` int NOT NULL
;
CREATE TABLE `Transactions` (
`transaction_id` int NOT NULL,
`... |
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 13, 2017 at 11:09 AM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 7.1.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET... |
SELECT a_int FROM types WHERE a_time = '13:15:01'
|
drop table if exists b_adv_banner;
drop table if exists b_adv_banner_2_country;
drop table if exists b_adv_banner_2_day;
drop table if exists b_adv_banner_2_site;
drop table if exists b_adv_banner_2_page;
drop table if exists b_adv_banner_2_stat_adv;
drop table if exists b_adv_banner_2_weekday;
drop table if exi... |
SELECT m.MountainRange,p.PeakName,p.Elevation
FROM Peaks AS p
JOIN Mountains AS m
ON m.Id=p.MountainId
WHERE m.MountainRange='Rila'
ORDER BY p.Elevation DESC |
CREATE TABLE `sure` (
`index` smallint(3) UNSIGNED NOT NULL auto_increment,
`ayas` smallint(3) UNSIGNED NULL DEFAULT NULL,
`start` smallint(4) UNSIGNED NULL DEFAULT NULL,
`end` smallint(4) UNSIGNED NULL DEFAULT NULL,
`name` varchar(100) NULL DEFAULT NULL,
`tname` varchar(100) NULL DEFAULT NULL,
`ename` varchar(100) NUL... |
<filename>server/persistence/database-schema/src/main/resources/db/migration/V1__InitialTables.sql
CREATE TABLE test_run(
id bigserial primary key,
public_id varchar(12) unique,
total_test_count integer not null,
total_passing_count integer not null,
total_skipped_count integer n... |
<reponame>Shuttl-Tech/antlr_psql
-- file:union.sql ln:263 expect:true
set enable_bitmapscan = off
|
<gh_stars>10-100
-- file:alter_table.sql ln:2223 expect:true
CREATE TABLE part_7 (
LIKE list_parted2,
CONSTRAINT check_a CHECK (a IS NOT NULL AND a = 7)
) PARTITION BY LIST (b)
|
UPDATE TOP(1)
TBookInfo
SET
ISBN=@ISBN,
BookName=@BookName,
Author=@Author,
Publisher=@Publisher,
Price=@Price,
Summary=@Summary
WHERE
BookInfoID=@BookInfoID |
Select * From Department Left Outer Join Employee ON employee.dept_no = department.dept_no Where employee.dept_no IS NULL; |
<reponame>goldmansachs/obevo-kata
CREATE PROCEDURE SP279(OUT MYCOUNT INTEGER) SPECIFIC SP279_78554 LANGUAGE SQL NOT DETERMINISTIC READS SQL DATA NEW SAVEPOINT LEVEL BEGIN ATOMIC DECLARE MYVAR INT;SELECT COUNT(*)INTO MYCOUNT FROM TABLE391;SELECT COUNT(*)INTO MYCOUNT FROM TABLE73;SELECT COUNT(*)INTO MYCOUNT FROM TABLE132... |
/*
Navicat MySQL Data Transfer
Source Server : 192.168.3.11
Source Server Version : 50133
Source Host : localhost:3306
Source Database : yaowan_db
Target Server Type : MYSQL
Target Server Version : 50133
File Encoding : 65001
Date: 2016-03-21 22:09:58
*/
SET FOREIGN... |
<filename>QueryMultiDb.Tests.System/SqlResources/Test9.sql
SET STATISTICS IO ON;
SET STATISTICS TIME ON;
SELECT 1;
SELECT TOP 10 SmallText AS [ SmallishText ], *
FROM TestTableOne;
|
<reponame>Godeta/SQL_manipulation
--Table creation
CREATE TABLE student_grades (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT,
number_grade INTEGER,
fraction_completed REAL);
INSERT INTO student_grades (name, number_grade, fraction_completed)
VALUES ("Winston", 90, 0.805);
INSERT INTO stude... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Sep 21, 2019 at 02:49 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_CLIENT=@@CHARACTER_SE... |
DROP TABLE IF EXISTS statesdb; |
IF OBJECT_ID('usp_SearchOrdersMulti', 'P') IS NOT NULL
BEGIN
PRINT '-- DROP: [dbo].[usp_SearchOrdersMulti]'
DROP PROCEDURE [dbo].[usp_SearchOrdersMulti]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <NAME> example DAL
-- Create date: 2021-02-25... |
<reponame>mrvic/Online2017<gh_stars>1-10
select * from fakultet.stud order by pbrStan desc;
select * from fakultet.stud group by pbrStan order by pbrStan desc;
select count(stud.imeStud), stud.pbrStan AS broj_studenata_u_mjestu from fakultet.stud
group by pbrStan order by pbrStan desc;
select max(stud.mbrStud), stud.... |
CREATE OR REPLACE FUNCTION auth()
RETURNS void
LANGUAGE plpgsql
SECURITY DEFINER
SET search_path TO public, pg_temp
AS $$
DECLARE
_request_path constant text := current_setting('request.path');
_resource_id integer;
_user_id bigint;
BEGIN
IF _request_path = '/' THEN
-- Swagger OpenAPI specification
RETURN;
END IF;
... |
-- For user's security searching
-- Author: <NAME>
-- Date: 18.07.2019
create or replace function articles.find_user_security(
security_login varchar(50)
) returns table(
user_id uuid,
user_surname varchar(50),
user_name varchar(50),
user_birth_date date,
user_login varchar(50),
user_password varchar(250)... |
<gh_stars>0
INSERT INTO hydra_jwk (pk, sid, kid, version, keydata, created_at) VALUES (9, 'sid-0009', 'kid-0009', 2, 'key-0002', now());
INSERT INTO hydra_oauth2_trusted_jwt_bearer_issuer (id, issuer, subject, allow_any_subject, scope, key_set, key_id)
VALUES ('30e51720-4a88-48ca-8243-de7d8f461675', 'some-issuer', 'so... |
CREATE TABLE "HR"."SCHOOLFEES"
( "ID" NUMBER(*,0) NOT NULL ENABLE,
"MATRI" VARCHAR2(20 BYTE),
"PREINSCRIPTION" VARCHAR2(20 BYTE),
"TRANCHE1" VARCHAR2(20 BYTE),
"TRANCHE2" VARCHAR2(20 BYTE),
"IDSTUDENT" NUMBER(*,0),
"ID_OPTION" NUMBER(*,0),
"MATRICULE" VARCHAR2(25 BYTE),
"CIVILITY" VARCHAR2(3 BYTE... |
INSERT INTO `guns`.`sys_menu` (`id`, `code`, `pcode`, `pcodes`, `name`, `icon`, `url`, `num`, `levels`, `ismenu`, `tips`, `status`, `isopen`) VALUES ('1051442597173297154', 'chapter', 'system', '[0],[system],', '章节管理', '', '/chapter', '99', '2', '1', NULL, '1', '0');
INSERT INTO `guns`.`sys_menu` (`id`, `code`, `pcode`... |
<gh_stars>10-100
SELECT
eda.enrolment_id,
eda.kb,
eda.priority
FROM v_enrolment_destination_admission eda
WHERE
eda.specoffer_id = $$SPECOFFER_ID$$
AND eda.enrolment_id NOT IN (
SELECT
mon.enrolment_id
FROM v_enrolment_mon mon
WHERE mon.specoffer_id = $$SPECOFFER_ID$$
) |
/*Creates a date entry for every day for each animal in the water monitoring system.
It uses LabKeys ehr_lookup.calendar to create and ongoing date row from the
first date the animal gets added to the system. It adds all the water the animal receives
for every single day in the system. If no water is given to the... |
<gh_stars>1-10
/********************************************************************************
component-centric-delta-language-lang-specific-words-gb-call-proc
Assertion:
Calling procedure testing that terms that contain EN-GB
language-specific words are in the same GB language refset.
Note:
**************... |
select * from {{ ref('does_not_exist') }}
|
SELECT
*
FROM
storage.workflows
ORDER BY
name ASC
|
<reponame>cncf/apisnoopregexp
-- this matches distinct request_uris and verbs and then populate this on the corresponing audit_ids
-- so this can update a lot of audits that share the same request_uri and verb - this is the most useful option IMHO
with ndata as (
select
op.id,
ev.request_uri,
ev.verb
fr... |
<reponame>weiminyu/nomulus<filename>db/src/main/resources/sql/flyway/V44__create_domain_history.sql
-- Copyright 2020 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 co... |
<filename>sql/core/src/test/resources/sql-tests/inputs/ansi/datetime.sql
--IMPORT datetime.sql
|
drop table large_notifications;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.