sql stringlengths 6 1.05M |
|---|
<gh_stars>0
SELECT registerMeasurement(21.22, 67.96, 32.59, 38.88, 87.93, 89.63, 10.0, 9, 'BASE LARROQUE');
SELECT registerMeasurement(11.01, 29.53, 77.91, 79.99, 50.65, 39.71, 4.0, 67, 'BASE CONCEPCION DEL URUGUAY');
SELECT registerMeasurement(1.89, 62.32, 43.99, 55.32, 34.80, 73.28, 96.0, 60, 'BASE GUALEGUAYCHU');
SE... |
<gh_stars>0
-- CreateTable
CREATE TABLE "Todo" (
"id" SERIAL NOT NULL,
"title" TEXT NOT NULL,
"desc" TEXT,
CONSTRAINT "Todo_pkey" PRIMARY KEY ("id")
);
-- CreateIndex
CREATE UNIQUE INDEX "Todo_title_key" ON "Todo"("title");
|
<reponame>hmcts/rd-location-ref-api<filename>src/integrationTest/resources/db/testmigration/V1_16__insert_court_type_to_service_mapping.sql
insert into court_type_service_assoc(
court_type_service_assoc_id,
service_code,
court_type_id,
created_time
)
values(
'1',
'AAA3',
'10',
now())... |
CREATE PROCEDURE SEIDR.usp_JobExecution_SetStatus
@JobExecutionID bigint,
@JobProfileID int,
@FilePath varchar(250),
@FileSize bigint,
@FileHash varchar(88),
@Success bit,
@Working bit,
@ExecutionStatusCode varchar(5) = null,
@ExecutionStatusNameSpace varchar(128) = null,
@ExecutionTimeSeconds int = null,
... |
<reponame>fireflycons/Invoke-SqlExecute<filename>Pester/TestResources/Should_report_exception_with_detail_of_included_file.2.sql
DECLARE @x INT
SET @x = 1
GO
-- Re-insert the same value to get a PK violation
-- If this insert is moved to another line, the test assertion will fail until it is updated.
INSERT INTO test... |
<filename>03-MVC/ContactApp/ContactDb.sql
--create a database
create database ContactAppDb
go
--Create table
create table Contact(
Id int IDENTITY (1,1),
FirstName varchar(30) not null,
MiddleName varchar(30) null,
LastName varchar (30) not null,
Mobile varchar (15) not null,
WorkPhone varchar(15) null,
HomePhone va... |
<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 3.4.10.1
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tiempo de generación: 28-06-2019 a las 18:20:14
-- Versión del servidor: 5.5.20
-- Versión de PHP: 5.3.10
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET... |
<reponame>ministryofjustice/prison-api<gh_stars>1-10
CREATE TABLE "OFFENDER_VSC_SENTENCES"
( "OFFENDER_BOOK_ID" NUMBER(10,0) NOT NULL,
"SENTENCE_SEQ" NUMBER(6,0) NOT NULL,
"ORDER_ID" NUMBER(10,0),
"SENTENCE_CALC_TYPE" VARCHAR2(12 CHAR) NOT NULL,
"SENTENCE_STATUS" VARCHAR2(12 CHAR) NOT NULL,
... |
<reponame>NHMD/svampeatlas
SELECT ta.FullName, MIN(o.observationDate) as found_date, l.name as locality, u.name as reported_by FROM Observation o, Determination d, Taxon t, Taxon ta, Users u, Locality l WHERE o.locality_id=l._id AND o.primaryuser_id=u._id AND o.primarydetermination_id = d._id AND d.taxon_id=t._id AND ... |
-- analyze.test
--
-- execsql {
-- SELECT count(*) FROM sqlite_master WHERE name='sqlite_stat1'
-- }
SELECT count(*) FROM sqlite_master WHERE name='sqlite_stat1' |
<gh_stars>10-100
-- file:domain.sql ln:189 expect:true
INSERT INTO nulltest values ('a', 'b', 'c', NULL, 'd')
|
--
-- SQL functions for NIPAP
--
--
-- calc_indent is an internal function that calculates the correct indentation
-- for a prefix. It is called from a trigger function on the ip_net_plan table.
--
CREATE OR REPLACE FUNCTION calc_indent(arg_vrf integer, arg_prefix inet, delta integer) RETURNS bool AS $_$
DECLARE
r re... |
create view Metadata.vUserTable as
select
x.*
from
Metadata.vTable x where x.IsUserDefined = 1 |
<reponame>irvingR23/TransaccionesSwing<filename>SwingTransacciones/Archivos SQL/procesosAlmacenado.sql
use estudiantes;
delimiter $$
create procedure crearEstudiante(
in nombreT varchar(45),
in calificacionT int
)
begin
declare exit handler for sqlexception
begin
get diagnostics condition 1
@texto=message_text;
select ... |
<reponame>miquifant/getemall
-- ============================================================================================= --
-- USERS and PRIVILEGES for getemall database.
--
-- Created by miquifant on 2020-11-09
-- ============================================================================================= --
--... |
-- SSB dataset
-- ELT Queries
-- ELT Query 1
-- This query is used to summarize the revenue by manufacturer, category, and brand per month per year for all regions.
drop table if exists elt_monthly_revenue_by_region_manufacturer_category_brand;
create table elt_monthly_revenue_by_region_manufacturer_category_brand
... |
<reponame>caltangelo/pipewrench<gh_stars>10-100
DROP TABLE IF EXISTS `{{ conf.raw_database.name }}`.`{{ table.destination.name }}_avro`;
DROP TABLE IF EXISTS `{{ conf.raw_database.name }}`.`{{ table.destination.name }}_partitioned`;
DROP TABLE IF EXISTS `{{ conf.staging_database.name }}`.`{{ table.destination.name }}`;... |
<reponame>niveathika/module-ballerina-sql
CREATE TABLE IF NOT EXISTS StringTypes (
id INT IDENTITY,
varchar_type VARCHAR(255),
charmax_type CHAR(10),
char_type CHAR,
character... |
alter table jig
rename column initial_cover_set to first_cover_assigned; |
#
# : A
#
DROP TABLE A;
CREATE TABLE A
(
ID VARCHAR(50) NOT NULL PRIMARY KEY,
B_ID VARCHAR(50),
E_ID VARCHAR(50),
F_ID VARCHAR(50),
A_Libelle VARCHAR(50)
);
INSERT INTO A VALUES ('a', 'b', 'e', NULL, 'aaa');
#
# : Accounts
#
DROP TABLE Accounts;
CREATE TABLE Accounts
(
Account_Id INTEGER NOT NULL PRI... |
<gh_stars>0
-------------------------------------------------------------------------------
--
-- $Id$
--
-- linz_asp_uploader - LINZ ASP loader for PostgreSQL
--
-- Copyright 2012 Crown copyright (c)
-- Land Information New Zealand and the New Zealand Government.
-- All rights reserved
--
-- This program is released... |
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 5.7.23 - MySQL Community Server (GPL)
-- Server OS: Win64
-- HeidiSQL Version: 9.5.0.5196
-- --------------------------------------------------------
/*... |
SELECT t_id AS t_id, -1::int8 AS t_basket, 'dm01vch24lv95dgemeindegrenzen_gemeindegrenze'::varchar(60) AS t_type, NULL::varchar(200) AS t_ili_tid,
geometrie, entstehung AS entstehung, gemeindegrenze_von AS gemeindegrenze_von
FROM agi_dm01avso24.gemeindegrenzen_gemeindegrenze;
|
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 13-05-2019 a las 07:00:07
-- Versión del servidor: 10.1.37-MariaDB
-- Versión de PHP: 7.1.26
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";... |
<reponame>DavidLGoldberg/qolor
select * from [test_brackets] b
|
<filename>sql/contact/getEmailNotifications.sql
SELECT tmp.`url`, CONCAT(CASE WHEN tmp.`https` = 'Y' THEN 'https' ELSE 'http' END, '://', tmp.`url`) as `site_url`,
tmp.`account_mail`, tmp.`account_name`,
tmp.`name`, tmp.`mail`, tmp.`subject`, tmp.`message`, tmp.`guid`,
tmp.`created_at`, tmp.`update... |
CREATE TABLE `user` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uuid` char(36) CHARACTER SET utf8mb4 DEFAULT '',
`username` varchar(255) CHARACTER SET utf8mb4 NOT NULL DEFAULT '',
`email` varchar(255) CHARACTER SET utf8mb4 NOT NULL DEFAULT '',
`birthdate` date NOT NULL,
`password` CHAR(60) CHARACTER... |
<gh_stars>1-10
--[12] 관리자가 그룹 정보 업데이트: 나중에 그룹명 변경하는 로직 추가할 것...
Create Proc dbo.UpdateGroupAdmin
@DomainID NVarChar(30), -- 현재 사용자
@Name NVarChar(50), -- 이름
@Description NVarChar(255), -- 설명(소개)
@UID Int -- 현재 그룹 UID
As
--[!] 해당 그룹이 이미 등록되어있으면
Declare @Result Int
Select @Result = Cou... |
<filename>examples/schema-migration/user/2-3.sql
/*** Add is_admin column to user table ***/
ALTER TABLE "user"
ADD COLUMN is_admin bit;
UPDATE "user" SET is_admin = '0';
ALTER TABLE "user"
ALTER COLUMN is_admin SET NOT NULL;
|
<gh_stars>10-100
create index material_member_id on material(member_id);
|
CREATE TABLE public.employee (
emp_id INTEGER NOT NULL,
emp_nm VARCHAR(40),
first_in_time TIMESTAMP WITH TIME ZONE DEFAULT clock_timestamp(),
last_chg_time TIMESTAMP WITH TIME ZONE DEFAULT clock_timestamp(),
CONSTRAINT employee_pkey PRIMARY KEY(emp_id)
)
WITH (oids = false);
CREATE TYPE public.em... |
<filename>Database/Ods/Agency.sql
CREATE VIEW [dbo].[Agency]
AS
Select eo.EducationOrganizationId,
eo.NameOfInstitution,
cast(0 as bit) IsChoice,
cast(lea.StateEducationAgencyId as varchar) AgencyCode,
a.City,
year(getdate()) SchoolYear,
lt.CodeValue AgencyType, lt.Description AgencyTypeDescrip... |
<filename>p8e-migration/sql/V14__Refactor_definition_jars.sql<gh_stars>10-100
DELETE FROM definition;
DROP INDEX definition_target_type_target_id_idx;
ALTER TABLE definition DROP CONSTRAINT definition_pkey;
ALTER TABLE definition RENAME to class_resource;
ALTER TABLE class_resource DROP COLUMN target_type;
ALTER TABLE... |
#create database if not exists talent default charset utf8;
#use talent;
DROP TABLE IF EXISTS `version`;
CREATE TABLE `version` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`version` varchar(255) NOT NULL COMMENT '版本',
`url` varchar(500) DEFAULT NULL COMMENT '下载链接',
`ostype` varchar(255) NOT NULL COMMENT ... |
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.5beta2
-- Dumped by pg_dump version 9.5beta2
-- Started on 2016-02-04 22:58:01
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_mes... |
<filename>db/migrations/20200215093323_change_room_label_to_dir.down.sql
alter table room_exit rename column to_room_dir to to_room_label; |
<gh_stars>0
#standardSQL
-- Query Vote Tags By Answerer
SELECT
tag,
COUNT(tag) AS count
FROM (
SELECT SPLIT(q.tags, '|') AS tag
FROM `bigquery-public-data.stackoverflow.votes` v
LEFT JOIN `bigquery-public-data.stackoverflow.posts_answers` a
ON v.post_id = a.id
LEFT JOIN `bigquery-public-data.stack... |
-- this script contains a number of sql functions that emulate data contianed in a FishNet-II
-- database.
-- NOTES:
-- species is in [fn_portal_species] (this may not alway be the case)
-- FN011 - project run in a year:
CREATE OR REPLACE FUNCTION fn011 (_year varchar) RETURNS TABLE (prj_cd varchar,prj_nm varchar,p... |
<filename>APEX/f402/application/shared_components/logic/application_computations/g_user_date_time_format_002.sql<gh_stars>0
prompt --application/shared_components/logic/application_computations/g_user_date_time_format_002
begin
-- Manifest
-- APPLICATION COMPUTATION: G_USER_DATE_TIME_FORMAT
-- Manifest End
wwv_... |
<reponame>LucaStorer/GardenerJob
select t.db,
sum(CASE WHEN t.tabella = 'clienti' THEN t.count ELSE 0 END) AS clienti,
sum(CASE WHEN t.tabella = 'prodotti' THEN t.count ELSE 0 END) AS prodotti from
(select 'gj' as db, 'clienti' as tabella, count(`clienti`.`ID`) as count from `clienti` where `delete` = 0
union all
selec... |
CREATE PROC usp_CalculateFutureValueForAccount
@AccountID INT,
@InterestRate DECIMAL(18,4)
AS
BEGIN
SELECT TOP 1
ah.Id AS [Acount ID],
ah.FirstName AS [First Name],
ah.LastName AS [Last Name],
a.Balance AS [Current Balance],
dbo.ufn_CalculateFutureValue(Balance, @InterestRate, 5)
... |
<reponame>Haritest/sunbird-cb-devops
CREATE TABLE IF NOT EXISTS bodhi.continue_learning (
root_org text,
user_id text,
context_path_id text,
data text,
date_accessed bigint,
resource_id text,
PRIMARY KEY ((root_org, user_id), context_path_id)
) WITH CLUSTERING ORDER BY (context_path_id ASC)
... |
INSERT INTO cewit_iis.cewit_staff (id, contact_id, title, department, school, school_code, is_cewit_staff, is_iuwit_member, is_advisory_council, created_at, updated_at, deleted_at) VALUES (1, 3, 'staff title 1', 'informatics', 'SoIC', 'SoIC', 1, 0, 0, '2017-08-16 10:33:29', '2017-08-16 10:33:29', null); |
<reponame>farhad-nstu/Shop-Accounts<filename>shopaccounts.sql
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 19, 2021 at 04:04 AM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET... |
-- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Dec 07, 2016 at 03:11 AM
-- Server version: 5.5.53-0ubuntu0.14.04.1
-- PHP Version: 5.5.9-1ubuntu4.20
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_C... |
-- MYSQL
CREATE TABLE IF NOT EXISTS `users` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL,
`fullname` varchar(100) NOT NULL,
`password` varchar(128) NOT NULL,
`email` varchar(100) NOT NULL,
`email_public` varchar(100) NOT NULL,
`accesslevel` smallint(6) unsigned NOT NULL D... |
<filename>src/_installation/visitors.sql<gh_stars>10-100
--
-- Table structure for table `visitors`
--
CREATE TABLE IF NOT EXISTS `visitors` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`visitor_ip` varchar(256) NOT NULL,
`visitor_city` varchar(64) NOT NULL,
`visitor_state` varchar(64) NOT NUL... |
<filename>FlightJournal.Web/Migrations/FlightContext/202103201755056_Added export id fieds to training models.sql<gh_stars>10-100
ALTER TABLE [dbo].[Training2Exercise] ADD [ExerciseIdForExport] [uniqueidentifier] NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000'
ALTER TABLE [dbo].[Training2Lesson] ADD [LessonIdF... |
<filename>sql/schema/schema.postgres.sql
-- ---------------------------------------------------------------------------
-- RackMonkey - Know Your Racks - http://www.rackmonkey.org --
-- Version 1.2.5-1 --
-- (C)2004-2009 <NAME> (wgreen at users.so... |
<reponame>gpipperr/OraPowerShell
--==============================================================================
-- GPI - <NAME>
-- Desc: get the profiles of the database
-- Date: September 2013
-- see http://docs.oracle.com/cd/B28359_01/network.111/b28531/vpd.htm
--===========================================... |
--***************************************************************************
-- *
-- * IBM INC.
-- *
-- * PROPRIETARY DATA
-- *
-- * Licensed Material - Property Of IBM
-- *
-- * "Restricted Materials of IBM"
-- *
-- * IBM Informix Client SDK
-- *
-- * (c) Copyr... |
<gh_stars>0
INSERT INTO company
(
company_id,
company_desc,
company_name,
hot_line,
is_lock
)
VALUES
(
1,
'<NAME>',
'<NAME>',
'0915444333',
0
);
INSERT INTO company
(
company_id,
company_desc,
company_name,
hot_line,
is_lock
)
VALUES
(
2,
'<NAME> <NAME>áp',
'<NAME>',
'0947444222',... |
<filename>src/test/resources/META-INF/sql/RoleDaoJpaTest_tearDown.sql
DELETE FROM db.db_role;
|
create or replace procedure check_valid_site_ot_id (cur_objecttype_id number, cur_site_id number)
IS
check_val number;
BEGIN
SELECT count(*) INTO check_val FROM hdb_site WHERE site_id = cur_site_id AND objecttype_id = cur_objecttype_id;
if check_val < 1 then
SELECT count(*) INTO check_val FROM hdb_s... |
<filename>create.sql
create sequence person_seq start with 1 increment by 1
create table address (address_id bigint not null, primary key (address_id))
create table person (person_id bigint not null, firstname varchar(100), lastname varchar(100), main_address_id bigint, primary key (person_id))
alter table person add c... |
-- Tags: no-fasttest
SELECT h3NumHexagons(0);
SELECT h3NumHexagons(1);
SELECT h3NumHexagons(2);
SELECT h3NumHexagons(3);
SELECT h3NumHexagons(4);
SELECT h3NumHexagons(5);
SELECT h3NumHexagons(6);
SELECT h3NumHexagons(7);
SELECT h3NumHexagons(8);
SELECT h3NumHexagons(9);
SELECT h3NumHexagons(10);
SELECT h3NumHexagons(1... |
{% if target.type == 'redshift' %}
{% if var("marketing_warehouse_ad_sources") %}
{% if 'facebook_ads' in var("marketing_warehouse_ad_sources") %}
with base as (
select *
from {{ ref('stg_facebook_ads__creative_history') }}
), numbers as (
select *
from {{ ref('utils__facebook_ads__numbers')}}
), required... |
INSERT INTO GROUPS
( GROUP_ID, GROUP_KEY, GROUP_NAME, DESCRIPTION, PARENT_GROUP_KEY, GROUP_CLASS, ROW_ID,
INSERT_USER, INSERT_DATETIME, UPDATE_USER, UPDATE_DATETIME, DELETE_FLAG )
VALUES
(0,'g-all','ALL USERS','全てのユーザが所属するグループ',null,0,'g-all',0,'2015-07-04 00:00:00',null,null,0);
ALTER TABLE USERS DROP COLUMN IF ... |
DO
$$
BEGIN
-- Look for our constraint
IF NOT EXISTS (SELECT constraint_name
FROM information_schema.constraint_column_usage
WHERE constraint_name = 'unique_name_per_cloud') THEN
EXECUTE 'ALTER TABLE provider ADD CONSTRAINT unique_name_per_cloud UNIQUE (customer_u... |
--USE [VORegistry]
create schema rr; |
-- @testpoint: explain plan语句结合merge语句和when match,not match中update语句使用,合理报错
-- @modify at: 2020-11-12
--建表
drop table if exists explain_t1;
drop table if exists explain_t2;
drop table if exists explain_t3;
create table explain_t1(a int, b int);
create table explain_t2(f1 int,f2 int);
create table explain_t3(f3 int,f4 i... |
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 29-05-2020 a las 23:09:46
-- Versión del servidor: 10.4.11-MariaDB
-- Versión de PHP: 7.4.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... |
<reponame>NimbusServices/SAEON.ObservationsDatabase<filename>SQL/2.0.08/7.1) CreateOrganisationRoles.sql
Insert into OrganisationRole (Code,Name,Description,UserId) values('Owner','Owner','Owner role',(Select UserId from aspnet_Users where UserName = 'Tim'))
Insert into OrganisationRole (Code,Name,Description,UserId) v... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 01 Nov 2021 pada 01.49
-- Versi server: 10.4.17-MariaDB
-- Versi PHP: 7.3.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C... |
<reponame>annices/VisitorStatistics1.0
SET NOCOUNT ON -- Don't display system messages such as "rows effected" etc.
IF DB_ID('VisitorStatistics') IS NULL
BEGIN
CREATE DATABASE VisitorStatistics
PRINT '>> The database was created successfully!'
END
ELSE
BEGIN
PRINT '>> The database already exists!'
END
GO
... |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 03 Feb 2020 pada 16.57
-- Versi server: 10.4.6-MariaDB
-- Versi PHP: 7.1.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... |
CREATE TABLE "SystemUser" (
"systemUserId" bigint generated always as identity,
"login" varchar NOT NULL,
"password" varchar NOT NULL,
"fullName" varchar NULL
);
ALTER TABLE "SystemUser" ADD CONSTRAINT "pkSystemUser" PRIMARY KEY ("systemUserId");
CREATE TABLE "SystemGroup" (
"systemGroupId" bigint generated... |
<filename>service/src/main/resources/db/migration/V1.17__Add_Note_Table.sql
-- Add note table to store notes against beacon records
CREATE TABLE IF NOT EXISTS note (
id uuid PRIMARY KEY,
beacon_id uuid REFERENCES beacon (id),
note text,
type text,
created_date timestamp,
person_id uuid,
full... |
CREATE TABLE services (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
protocol TEXT NOT NULL,
host TEXT NOT NULL,
port TEXT
); |
-- command to run the script in terminal
-- 🔻 use this command if your terminal is already in the dev_tools directory
-- psql -U postgres -a -f remake_database.sql
-- or
-- 🔻 use this command if your terminal is pointing at the root directory of your project
-- psql -U postgres -a -f data/dev_tools/remake_database.sq... |
<gh_stars>1-10
ALTER TABLE chatroach.states DROP CONSTRAINT fk_pageid_ref_facebook_pages;
|
<reponame>aquSiLwH/Pretius-APEX-Enhanced-Lov-Item
create or replace package APEX_ENHANCED_LOV_ITEM as
procedure render (
p_item in apex_plugin.t_item,
p_plugin in apex_plugin.t_plugin,
p_param in apex_plugin.t_item_render_param,
p_result in out nocopy apex_plug... |
<reponame>paulissoft/oracle-build-tools
CREATE TYPE "ORACLE_TOOLS"."T_REF_CONSTRAINT_OBJECT" authid current_user under oracle_tools.t_constraint_object
( ref_object$ oracle_tools.t_named_object -- referenced table
, constructor function t_ref_constraint_object
( self in out nocopy oracle_tools.t_ref_constraint_object... |
<filename>.docker/db/init.sql
CREATE DATABASE instagram_clone;
--
-- PostgreSQL database dump
--
-- Dumped from database version 14.1 (Debian 14.1-1.pgdg110+1)
-- Dumped by pg_dump version 14.1
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';... |
-- randexpr1.test
--
-- db eval {SELECT case case when coalesce((select b from t1 where not exists(select 1 from t1 where d-e+coalesce((select max(b) from t1 where case case when t1.d-t1.e not between t1.f and e then 11 else t1.d end when t1.e then f else b end+t1.e=13),t1.c) not in (( -c),c,t1.d))),t1.f)<>a and c not... |
-- Execute this file on database cobolscriptwebsite
--
-- Table structure for table `customers`
--
DROP TABLE IF EXISTS `customers`;
CREATE TABLE IF NOT EXISTS `customers` (
`Id` int(11) NOT NULL AUTO_INCREMENT,
`Name` varchar(200) DEFAULT NULL,
`Address` text,
`Notes` text,
PRIMARY KEY (`Id`)... |
<reponame>aehrc/release-validation-framework
/********************************************************************************
file-centric-snapshot-inferred-relationship-immutable
Assertion:
There is a 1:1 relationship between the id and the immutable values in Inferred Relationship snapshot
*******************... |
<reponame>j-benn/ANDS-ResearchData-Registry
-- JUST TO BE SURE
ALTER TABLE doi_alternate_identifiers DROP CONSTRAINT "doi_id";
ALTER TABLE doi_contributors DROP CONSTRAINT "doi_id";
ALTER TABLE doi_creators DROP CONSTRAINT "doi_id";
ALTER TABLE doi_dates DROP CONSTRAINT "doi_id";
ALTER TABLE doi_descriptions DROP CONST... |
<gh_stars>100-1000
-- =======================================================================
-- com.sun.ts.tests.ejb30.persistence.entitytest.cascadeall.oneXone
DROP TABLE AEJB_1X1_BI_BTOB ;
CREATE TABLE AEJB_1X1_BI_BTOB (id VARCHAR(255) NOT NULL, name VARCHAR(255), value INTEGER, PRIMARY KEY (id)) ;
DROP TABLE BEJB_1... |
$.track.segments[*] ? (@.location[1] < 13.4) ? (@.HR > 130)."start time"
|
-- This SQL code was generated by sklearn2sql (development version).
-- Copyright 2018
-- Model : CaretClassifier_rf_pca
-- Dataset : FourClass_10
-- Database : teradata
-- This SQL code can contain one or more statements, to be executed in the order they appear in this file.
-- Model deployment code
WITH "ADS_s... |
DROP FUNCTION IF EXISTS get_multiple_forms_attachments(TEXT[]);
CREATE FUNCTION get_multiple_forms_attachments(form_ids TEXT[]) RETURNS SETOF form_processor_xformattachmentsql AS $$
CLUSTER '{{ PL_PROXY_CLUSTER_NAME }}';
SPLIT form_ids;
RUN ON hash_string(form_ids, 'siphash24');
$$ LANGUAGE plproxy;
|
DROP TABLE IF EXISTS todo;
CREATE TABLE todo (
id uuid NOT NULL default uuid_generate_v4(),
create_date timestamp with time zone NOT NULL,
update_date timestamp with time zone NOT NULL,
name text NOT NULL,
completed boolean NOT NULL DEFAULT false,
due timestamp with time zone
);
CREATE TRIGGER todo_insert... |
<filename>src/main/resources/db/migration/V1__example_migration.sql<gh_stars>0
create sequence id_sequence;
CREATE or replace FUNCTION next_id(OUT "result" bpchar) RETURNS "bpchar"
AS $BODY$
DECLARE
seq_id bigint;
calc bigint;
foo text;
BEGIN
SELECT nextval('id_sequence') INTO seq_id;
calc = seq_id... |
<reponame>Nerucius/1718.databases2
-- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Oct 24, 2017 at 07:17 PM
-- Server version: 10.0.31-MariaDB-0ubuntu0.16.04.2
-- PHP Version: 7.0.22-0ubuntu0.16.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET... |
INSERT INTO users VALUES(10000000,'2021-06-09 19:53:50.874076',false,'<EMAIL>',true,false,'test','test',false,'123','2021-06-09 19:53:50.874076');
INSERT INTO addresses VALUES (10000000, 'test','test','test','test','test','test','test');
INSERT INTO cooperations VALUES (10000000,'test','11111111','UA1111111111111111111... |
<filename>server/migrations/2020-01-10-045717_create_users/up.sql
-- Your SQL goes here
CREATE TABLE users (
bankid TEXT NOT NULL,
bankid_lower TEXT PRIMARY KEY NOT NULL,
username TEXT NOT NULL,
password_hash TEXT NOT NULL,
balance UNSIGNED BIG INT DEFAULT 0 CHECK(balance >= 0) NOT NULL
)
|
INSERT INTO
episode(title, description, published, explicit, keywords,
duration, show_notes, url, media_url, feed_id, guid,
media_length, mime_type
)
VALUES($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13) |
SELECT *
FROM owner
ORDER BY owner_age DESC |
<reponame>astrapi69/user-auth<filename>auth-application/src/main/resources/db/migration/V2__initialize-schema.sql
INSERT INTO applications (id, version, name, domain_name, email)
VALUES ('0084d910-d153-4bd4-86bf-f5e5a8492c7e', 1, 'test-application', 'testapp.com',
'<EMAIL>');
INSERT INTO permissions (id, descr... |
<reponame>stewartm83/sakila-postgres
INSERT INTO public.dim_film_actor_bridge
VALUES (1, 1, '0.10'), (1, 10, '0.10'), (1, 20, '0.10'), (1, 30, '0.10'), (1, 40, '0.10'), (1, 53, '0.10'),
(1, 108, '0.10'), (1, 162, '0.10'), (1, 188, '0.10'), (1, 198, '0.10'), (2, 19, '0.25'), (2, 85, '0.25'),
(2, 90, '0.25'), (2, 160... |
<gh_stars>1-10
CREATE TABLE IF NOT EXISTS Todo(id IDENTITY PRIMARY KEY, done BOOLEAN, text VARCHAR(255));
|
<gh_stars>1-10
-- Deploy pacbio_pools
BEGIN;
SET search_path TO viroserve;
CREATE OR REPLACE VIEW pacbio_pool AS (
SELECT sample.sample_id as sample_id,
sample.name as sample_name,
r2.pcr_product_id as pcr_product_id,
r2.name ... |
<gh_stars>1-10
DELETE FROM "movie" WHERE movie_id = ?; |
-------------------------------------------------------------------------------------------------------
-- create new table to hold adjudications and punishments
CREATE TABLE [HPA].[ADJUDICATIONS] (
[PK_ADJUDICATION] [INT] NOT NULL IDENTITY (1, 1)
CONSTRAINT PK_ADJUDICATIONS PRIMARY KEY,
[AD... |
ALTER TABLE [dbo].[users] ADD [failed_login] [datetime] NULL
GO
ALTER TABLE [dbo].[users] ADD [failed_login_counter] [int] NULL
GO
|
--Problem 19
SELECT TOP(10) eOne.FirstName, eOne.LastName, eOne.DepartmentID
FROM Employees AS eOne
WHERE Salary > (SELECT AVG(Salary) AS AverageSalary
FROM Employees AS eTwo
WHERE eTwo.DepartmentID = eOne.DepartmentID
GROUP BY DepartmentID)
ORDER BY eOne.DepartmentID |
-- harvest information
create table usina_harvest (
Property text,
Sector text,
Found text,
Farm text,
Grid text,
Plot text,
Variety text,
Category text,
TotalArea float,
ProductionArea float,
PercentMechanization text,
Effective text,
MechanizedArea float,
ManualMechanization float,
mechTons text,
manTons text,
TCH fl... |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
<reponame>LaudateCorpus1/RosettaCodeData<gh_stars>1-10
FUNCTION algoLuhn ( p_numeroVerif VARCHAR2 )
RETURN NUMBER
IS
i NUMBER;
v_NBi SMALLINT;
v_retour SMALLINT;
v_somme NUMBER := 0;
v_nbCar NUMBER;
BEGIN
v_nbCar := LENGTH(p_numeroVerif);
FOR i IN 1..v_nbCar
LO... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.