sql stringlengths 6 1.05M |
|---|
/*
Navicat MySQL Data Transfer
Source Server : DATASERVER
Source Server Version : 50505
Source Host : 192.168.254.200:3306
Source Database : sis_main_db
Target Server Type : MYSQL
Target Server Version : 50505
File Encoding : 65001
Date: 2021-03-08 16:43:08
*/
SET FOREIGN_KEY_CHEC... |
<gh_stars>1-10
-- mls institution reporting bad
use genesys_2018;
create table CROP_SPECIES_MLS_STATUS_VS_REPORTED as
(select c.crop, g.institution, g.source, MLS_Status as 'reported', cm.`MLS Annex 1`, count(*) count
FROM GMERGE g
left join CIAT_crop_taxon c on (g.species=c.taxon)
left join CROP_MLS cm on (c.crop=cm... |
<filename>egov/egov-ptis/src/main/resources/db/migration/sample/V20161231215738__ptis_property_rp_grp_wfmatrix.sql
----delete existing WF Matrix----
delete from eg_wf_matrix where objecttype='RevisionPetition';
---------RP Commom Matrix -------
insert into eg_wf_matrix values (nextval('seq_eg_wf_matrix'),'ANY','Revisi... |
<filename>Database/ClinVar.sql
-- MySQL dump 10.15 Distrib 10.0.35-MariaDB, for Linux (x86_64)
--
-- Host: localhost Database: ClinVar
-- ------------------------------------------------------
-- Server version 10.0.35-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHAR... |
/*
SQLyog Ultimate v11.11 (64 bit)
MySQL - 5.5.5-10.1.16-MariaDB : Database - dbrentalmobil
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @O... |
/*
CREATE three temp TABLE's
+ tmp_recent_snapshot
(Holds the most recent snapshot taken of all workers)
+ tmp_previous_snapshot
(Holds the 2nd last snapshot of all workers)
+ tmp_completed_work - holds all workers that have contributed.
Calculated using inner join with recent... |
<reponame>jabardigitalservice/pikobar-logistik-api<filename>database/seeds/data/product.sql
INSERT INTO `products` (id, name, description, material_group_status, material_group, total_stock, total_used, is_imported, created_at, updated_at) VALUES (1,'ABN',NULL,1,'ABN',NULL,NULL,0,NULL,NULL),
(2,'Alcohol One Swab',NULL,... |
CREATE OR REPLACE VIEW fact_loader.queue_deps_all AS
WITH RECURSIVE fact_table_dep_cutoffs AS
(SELECT
1 AS level
, qtd.queue_table_dep_id
, ftdqc.fact_table_dep_id
, ftdqc.fact_table_dep_queue_table_dep_id
--This dep_maximum_cutoff_time is being taken from the queue_table_deps, because we cannot go ... |
<gh_stars>1-10
CREATE TABLE Products(
Id INT PRIMARY KEY IDENTITY NOT NULL,
Name NVARCHAR(25) UNIQUE NOT NULL,
Description NVARCHAR(255) NOT NULL,
Recipe NVARCHAR(MAX) NOT NULL,
Price MONEY
)
CREATE TABLE Countries(
Id INT PRIMARY KEY IDENTITY NOT NULL,
Name NVARCHAR(50) UNIQUE
)
CREATE TABLE Distributors(
Id INT PRI... |
create table `TABLE1`
(
col1 int
) engine MyISAM;
|
<gh_stars>100-1000
-- analyze3.test
--
-- execsql {
-- PRAGMA case_sensitive_like=off;
-- BEGIN;
-- CREATE TABLE t1(a, b TEXT COLLATE nocase);
-- CREATE INDEX i1 ON t1(b);
-- }
PRAGMA case_sensitive_like=off;
BEGIN;
CREATE TABLE t1(a, b TEXT COLLATE nocase);
CREATE INDEX i1 ON t1(b); |
<filename>src/test/resources/sql/drop_table/92ea0978.sql
-- file:temp.sql ln:77 expect:true
DROP TABLE temptest
|
<reponame>mrudulpolus/kc<filename>coeus-db/coeus-db-sql/src/main/resources/org/kuali/coeus/coeus-sql/log/Release_1_0_logs/s2s/views/OSP$UNIT_ADMINISTRATOR_TYPE.sql<gh_stars>0
CREATE OR REPLACE VIEW OSP$UNIT_ADMINISTRATOR_TYPE (
UNIT_ADMINISTRATOR_TYPE_CODE, DESCRIPTION, UPDATE_TIMESTAMP, UPDATE_USER, VER_NBR, OBJ_ID... |
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50718
Source Host : 127.0.0.1:3306
Source Database : moneysys
Target Server Type : MYSQL
Target Server Version : 50718
File Encoding : 65001
Date: 2017-05-20 15:59:21
*/
SET FOREIGN_KEY_CHECKS=0;
-- ... |
/* SPDX-FileCopyrightText: 2020 Friedrich-Alexander University Erlangen-Nürnberg (FAU)
*
* SPDX-License-Identifier: Apache-2.0
*/
\connect product_model;
/*Create some dummy products*/
INSERT INTO public.product (name, version, vcs, description, comment, homepage_url, external_ref) VALUES
('First product', '0.1.0'... |
/*
Navicat MySQL Data Transfer
Source Server : localhost[127.0.0.1]
Source Server Version : 50540
Source Host : 127.0.0.1:3306
Source Database : think_blog
Target Server Type : MYSQL
Target Server Version : 50540
File Encoding : 65001
Date: 2016-10-20 23:04:12
*/
SET FOREIGN_KEY_C... |
--
-- Display «other» session's currently running
-- SQL statement.
--
select
sql.sql_id,
sql.executions,
sql.cpu_time / 1e6 cpu_time,
sql.elapsed_time / 1e6 elapsed_time,
substr(sql.sql_text, 1, 100) text
from
v$session ses left join
v$sqlarea sql on ses.sql_address = sql.address and
... |
if not exists(select 1 from dbo.stores)
BEGIN
INSERT INTO dbo.DatabaseServers(DatabaseServer, DatabaseName, Region) values ('internationalcookiesq2bpnesdylzbk.database.windows.net', 'internationalcookies-db-we', 'WE')
INSERT INTO dbo.DatabaseServers(DatabaseServer, DatabaseName, Region) values ('internationalcookie... |
<reponame>testsigmahq/testsigma
update workspaces w set description = 'Testsigma Simply travel is demo site. Here we will be showing how to achieve responsive web testing with Testsigma.' where id = 29;
update workspaces w set description = 'Demos how Testsigma simplifies iOS Native Workspace automation.' where id = 31... |
<gh_stars>0
create table mpp5308 (i int) partition by range(i) (start(1) end(10) every(1));
\d mpp5308_1_prt_5
alter table mpp5308_1_prt_5 drop constraint mpp5308_1_prt_5_check;
drop table mpp5308;
|
INSERT INTO `pw_hook` (`name`, `app_id`, `app_name`, `created_time`, `modified_time`, `document`) VALUES
('c_fresh_post', '', 'system', 1341470637, 1341470637, '\r\n\r\n\r\n\r\nPwPostDoBase'),
('c_manage_domanage', '', 'system', 1341470637, 1341470637, ''),
('c_post_doadd', '', 'system', 1341470637, 1341470637, '\r\... |
cls
$server = 'MSI'
$path = 'K:\'
$auto_delete = $true
$threshold_days_delete = 60
$disk_files = Get-ChildItem $path* -Recurse -ErrorAction Ignore -Include *.mdf, *.ndf, *.ldf;
$tsql_files = 'select physical_name from sys.master_files';
$db_files = (Invoke-DbaQuery -SqlInstance $server -Query $tsql_files).physical_nam... |
<gh_stars>0
TRUNCATE dataflow_batch_export;
TRUNCATE dataflow_batch_import;
TRUNCATE log_customer;
TRUNCATE log_quote;
TRUNCATE log_summary;
TRUNCATE log_summary_type;
TRUNCATE log_url;
TRUNCATE log_url_info;
TRUNCATE log_visitor;
TRUNCATE log_visitor_info;
TRUNCATE log_visitor_online;
TRUNCATE report_event;
TRUNCATE r... |
<reponame>shiningblue7/seabasketball<gh_stars>0
-- AlterTable
ALTER TABLE "User" ALTER COLUMN "subject" SET DEFAULT E'';
|
-- +migrate Up
create table pancake_squad (
id numeric not null unique primary key,
image json,
attributes json
);
-- +migrate Down
drop table pancake_squad; |
<filename>target/test-classes/sql-schema.sql
create database if not exists ims_test;
drop table if exists ims_test.customers;
drop table if exists ims_test.item;
drop table if exists ims_test.orders;
drop table if exists ims_test.orderline;
create table if not exists ims_test.customers(id int primary key auto_increment... |
<gh_stars>0
USE SoftUni
-- Problem 1
SELECT FirstName, LastName
FROM Employees
WHERE (LEFT(FirstName, 2) = 'SA')
-- Problem 2
SELECT FirstName, LastName
FROM Employees
WHERE CHARINDEX('ei', LastName, 1) > 0
-- Problem 3
SELECT FirstName
FROM Employees
WHERE DepartmentID IN (3, 10) AND HireDate BETWEEN '1995-01-0... |
/*
Enter your query here.
*/
SELECT DISTINCT CITY FROM STATION
WHERE MOD(ID, 2) = 0;
|
-- candidate_master_file
INSERT INTO fec.candidate_master_file
SELECT *
FROM error.candidate_master_file;
DELETE FROM error.candidate_master_file;
-- committee_master_file
INSERT INTO fec.committee_master_file
(SELECT ecm.*
FROM error.committee_master_file ecm
inner join fec.candidate_master_file f... |
<reponame>praveen11665/laravelCURD<filename>testlaravel.sql
-- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Oct 04, 2018 at 10:50 AM
-- Server version: 5.7.23-0ubuntu0.18.04.1
-- PHP Version: 7.2.10-0ubuntu0.18.04.1
SET SQL_MODE = "NO_AUTO_VALUE... |
<reponame>codiply/epsilon<gh_stars>1-10
CREATE TABLE [dbo].[AddressGeometry] (
[Id] BIGINT NOT NULL,
[Latitude] FLOAT (53) NOT NULL,
[Longitude] FLOAT (53) NOT NULL,
[ViewportNortheastLatitude] FLOAT (53) ... |
<reponame>Shuttl-Tech/antlr_psql
-- file:privileges.sql ln:382 expect:true
REVOKE ALL (one) ON atest5 FROM regress_user3
|
SELECT article_demandé, Ref_article
FROM DA
INNER JOIN concretisation ON Ref_DA=fk_Ref_DA
INNER JOIN Commandes ON Ref_commande=fk_Ref_commande
WHERE adresse_livraison = "ici" |
<filename>AuthGateway.Setup/AuthGateway.Wix.ServiceConfig/Sql/authgateway.2.3.7.sql
BEGIN TRANSACTION
SET QUOTED_IDENTIFIER ON
SET ARITHABORT ON
SET NUMERIC_ROUNDABORT OFF
SET CONCAT_NULL_YIELDS_NULL ON
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON
GO
ALTER TABLE [dbo].[SMS_CONTACT] ADD [LEFT_I... |
<reponame>endeavourhealth-discovery/Explorer
USE dashboards;
DROP PROCEDURE IF EXISTS buildDatasets;
DELIMITER //
CREATE PROCEDURE buildDatasets (
p_query_id INT,
p_patientcohorttab VARCHAR(64),
p_eventTypeString VARCHAR(500),
p_encountersDateRangeString VARCHAR(255),
p_encounterConcept_tmp VARC... |
<filename>conf/evolutions/default/1.sql
# --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table shop_item_model (
id bigint auto_increment not null,
title varchar(255),
image ... |
CREATE TABLE wf_process (
id VARCHAR(32) PRIMARY KEY NOT NULL comment '主键ID',
name VARCHAR(100) comment '流程名称',
display_Name VARCHAR(200) comment '流程显示名称',
type VARCHAR(100) comment '流程类型',
instance_Url VARCHAR(200) comment '实例url',
state ... |
<filename>test/expectations/should-allow-LIKE-defaults.escaped.sql
religion LIKE CONCAT('%', ?, '%') |
-- liquibase formatted sql logicalFilePath:dict/DataSourceClassification
-- changeset SYS:20210406-0
INSERT INTO "sys_dict"("data_dict_id", "dict_code", "dict_name", "dict_value", "dict_class", "seq", "pid", "dict_desc", "status", "created_time", "created_by", "updated_time", "updated_by", "tenant_id", "visibility", "... |
/*
Navicat Premium Data Transfer
Source Server : xiaofeng
Source Server Type : MySQL
Source Server Version : 80021
Source Host : localhost:3306
Source Schema : reader
Target Server Type : MySQL
Target Server Version : 80021
File Encoding : 65001
Date: 27/12/2020 12:1... |
<filename>Sql/01 Job.sql<gh_stars>1-10
USE [msdb]
GO
/****** Object: Job [AspSession_DeleteExpiredSessions] Script Date: 07/31/2010 23:53:16 ******/
BEGIN TRANSACTION
DECLARE @ReturnCode INT
SELECT @ReturnCode = 0
/****** Object: JobCategory [[Uncategorized (Local)]]] Script Date: 07/31/2010 23:53:16 **... |
<reponame>pflooky/fiddlesticks<filename>app/src/main/resources/h2/V2_insert_todo.sql
insert into todo.tasks(id, description, action_by, created, status)
values('1', 'Buy Groceries', 'user1', '2020-03-20 00:00:00', 'NEW');
insert into todo.tasks(id, description, action_by, created, status, updated)
values('2', 'Watch M... |
alter table o_feed modify f_external_feed_url varchar(4000);
alter table o_feed modify f_external_image_url varchar(4000);
alter table o_feed modify f_description varchar(4000);
alter table o_feed modify f_image_name varchar(1024);
alter table o_feed_item modify f_external_url varchar(4000);
alter table o_feed_item mo... |
/*
INSERT INTO @AccountClassifications([Index],[ParentIndex],[Code],[Name],[Name2],[AccountTypeParentId]) VALUES
(1,NULL, N'1',N'Assets', N'الأصول',@Assets),
(101,1, N'101',N'Cash', N'نقد',@Cash),
(102,1, N'102',N'Net accounts Receivable', N'',NULL),
(1021,10, N'1021',N'Account Receivables', N'الذمم المدينة التجارية و... |
<reponame>ursjoss/sipamato<gh_stars>10-100
/*
* Add a text array for the codes of all code classes
*/
ALTER TABLE paper ADD COLUMN IF NOT EXISTS codes text[] NOT NULL DEFAULT '{}';
CREATE INDEX gin_idx_codes ON paper USING GIN (codes);
UPDATE paper SET codes = '{1F,2N,3C,4G,5H,5S,6M,7L,8O}' WHERE id = 1;
UPDATE pa... |
<gh_stars>0
-- @testpoint:opengauss关键字Case(保留),作为外部数据源名
--关键字不带引号-合理报错
create data source Case;
--关键字带双引号-成功
drop data source if exists "Case";
create data source "Case";
drop data source "Case";
--关键字带单引号-合理报错
drop data source if exists 'Case';
create data source 'Case';
--关键字带反引号-合理报错
drop data source if exists ... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 04, 2021 at 06:54 AM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 7.4.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARAC... |
-- http://tech.pjin.jp/blog/2016/06/30/sql%E7%B7%B4%E7%BF%92%E5%95%8F%E9%A1%8C-%E5%95%8F11/
select goal_time from goals where pairing_id = 103;
|
<gh_stars>0
SELECT channel, COUNT(channel) FROM messages GROUP BY channel ORDER BY COUNT(channel) DESC;
|
<reponame>Koulinn/aux-backend
CREATE TABLE IF NOT EXISTS "candidate_skills" (
"candidate_id" uuid REFERENCES users("acc_id") ON DELETE CASCADE,
"skill" VARCHAR(40) REFERENCES skills("skill") NOT NULL,
"seniority_level" VARCHAR(40) REFERENCES seniority_levels("seniority_level"),
PRIMARY KEY ("candidate_id", "skill")... |
<reponame>sotheanith/CECS323-FinalProject
-- Views
-- Use the Create View statement to create the following views:
-- 1. Customer_v – for each customer, indicate his or her name as well as the customer type (prospect, steady or premier) as well as the number of years that customer has been with us.
create view Custome... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 23, 2022 at 12:51 PM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 8.0.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
CREATE TABLE [dbo].[USGeoName](
[PostalCode] [int] NOT NULL,
[PlaceName] [varchar](180) NULL,
[AdminName1] [varchar](100) NULL,
[AdminCode1] [varchar](20) NULL,
[AdminName2] [varchar](100) NULL,
[AdminCode2] [varchar](20) NULL,
[Latitude] [decimal](9, 4) NOT NULL,
[Longitude] [decimal](9, 4) NOT NULL,
[Accura... |
'proof that table successfully imported'
show tables in portfolio
'data type for date columns is Text'
describe supermarket
'insert new columns for date'
alter table supermarket add column new_date date
'checking all columns in dataset and creating indexes to help retrieve data from table faster'
select * from super... |
<filename>src/NuGetGallery.Operations/Scripts/NuGetDownloadsFuncs_UserAgent.sql
IF OBJECT_ID('[dbo].[UserAgentClient]') IS NOT NULL
DROP FUNCTION [dbo].[UserAgentClient]
GO
CREATE FUNCTION [dbo].[UserAgentClient] (@value nvarchar(900))
RETURNS NVARCHAR(128)
AS
BEGIN
-- NUGET CLIENTS
-- VS NuGet 2.8+ User Agen... |
--
-- add header_image_rotator toggle setting
--
\connect - jcms
INSERT INTO updatelog (name,value) VALUES ('db_version','20091023');
INSERT INTO settings VALUES (102, 'header_image_rotator', 'false', 'Use Image Rotator extra for header background image: true/false.', false, true);
|
<reponame>xnorman/cms<filename>cms/mydoc/mysql_db_sql.sql
use cms_demo;
CREATE TABLE IF NOT EXISTS `cms_demo`.`cms_category` (
`category_id` INT NOT NULL AUTO_INCREMENT,
`category_name` VARCHAR(100) NULL,
`category_flag` INT NULL DEFAULT 0,
`category_level` INT NULL DEFAULT 0,
`category_father_id` INT NULL,
... |
<gh_stars>1-10
UPDATE CODE_STYLE_REPORT
SET GRADE = 5
WHERE GRADE = '';
|
CREATE SEQUENCE ${ohdsiSchema}.pathway_analysis_sequence START WITH 1;
CREATE TABLE ${ohdsiSchema}.pathway_analysis
(
id INTEGER NOT NULL,
name VARCHAR(255) NOT NULL,
combination_window INTEGER,
min_cell_count INTEGER,
max_depth INTEGER,
allow_repeats bit DEFA... |
INSERT INTO `sys_menu` (`id`, `code`, `pcode`, `pcodes`, `name`, `icon`, `url`, `num`, `levels`, `ismenu`, `tips`, `status`, `isopen`) VALUES ('1010071408455258114', 'clubCoach', 'club', '[0],[club],', '教练', '', '/clubCoach', '99', '2', '1', NULL, '1', '0');
INSERT INTO `sys_menu` (`id`, `code`, `pcode`, `pcodes`, `nam... |
CREATE SCHEMA sparse_vector;
ALTER TYPE svec SET SCHEMA sparse_vector;
ALTER FUNCTION svec_in(cstring)
SET SCHEMA sparse_vector;
ALTER FUNCTION svec_out(sparse_vector.svec)
SET SCHEMA sparse_vector;
ALTER FUNCTION svec_recv(internal)
SET SCHEMA sparse_vector;
ALTER FUNCTION svec_send(sparse_vector.svec)
... |
-- @testpoint: pg_get_functiondef函数获取函数的定义
select pg_get_functiondef(oid) from PG_PROC where proname = 'age'; |
<filename>DB/SPs/i_updateEntity.sql
DELIMITER $$
DROP PROCEDURE IF EXISTS `i_updateEntity`$$
CREATE DEFINER=`root`@`localhost` PROCEDURE `i_updateEntity`(
in _name varchar(255),
in _category_id int,
in _sub_category varchar(255),
in _blurb varchar(511),
in _image_url varchar(511),
in _native_po... |
accept FINANCIAL_CYCLE PROMPT 'Enter the Current FINANCIAL_CYCLE >'
accept REPORT_PERIOD_CODE PROMPT 'Enter the Current REPORT_PERIOD_CODE >'
accept REPORT_PERIOD_END_DT PROMPT 'Enter the Current REPORT_PERIOD_END_DT (Ex: 31-07-2012 for sup schmea 31-MAY-2014 fr live) >'
set array 1
set head on
set feedback on
... |
/*
Warnings:
- A unique constraint covering the columns `[slug]` on the table `Project` will be added. If there are existing duplicate values, this will fail.
*/
-- CreateIndex
CREATE UNIQUE INDEX "Project_slug_key" ON "Project"("slug");
-- CreateIndex
CREATE INDEX "Project_slug_idx" ON "Project"("slug");
|
<reponame>binhcan/MTV_API_MVC_Project
USE [API_Server]
GO
/****** Object: Table [dbo].[Files] Script Date: 7/9/2020 5:01:21 PM ******/
DROP TABLE [dbo].[Files]
GO
/****** Object: Table [dbo].[Files] Script Date: 7/9/2020 5:01:21 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].... |
<reponame>Vrushali-Bidgar/Internmitwpu<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 12, 2019 at 08:38 PM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.2.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSAC... |
<gh_stars>0
/*
Navicat Premium Data Transfer
Source Server : 127.0.0.1
Source Server Type : MySQL
Source Server Version : 100418
Source Host : localhost:3306
Source Schema : sipekerba
Target Server Type : MySQL
Target Server Version : 100418
File Encoding : ... |
-- MySQL dump 10.13 Distrib 5.7.9, for linux-glibc2.5 (x86_64)
--
-- Host: 127.0.0.1 Database: SICOI
-- ------------------------------------------------------
-- Server version 5.7.10
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS *... |
ALTER TABLE "subjects" ADD COLUMN "genitive" VARCHAR(255) NULL;
ALTER TABLE "subjects" ADD CONSTRAINT "genitive_filled" CHECK ("genitive" != '');
|
CREATE OR REPLACE FUNCTION update_modified_column()
RETURNS TRIGGER AS $$
BEGIN
NEW.updated = now();
RETURN NEW;
END;
$$ language 'plpgsql';
CREATE OR REPLACE FUNCTION get_calculated_path(INT, TEXT)
RETURNS ltree AS
$$
DECLARE
result ltree;
BEGIN
EXECUTE format('SELECT CASE WHEN parent_id IS NULL TH... |
-- retrieves the urine output of adult patients
-- only for patients recorded on carevue
with agetbl as
(
select ad.subject_id, ad.hadm_id
from mimiciii.admissions ad
inner join mimiciii.patients p
on ad.subject_id = p.subject_id
where
-- filter to only adults
(
(extrac... |
INSERT INTO user (email, password)
VALUES
('<EMAIL>', 'pbkdf2:sha256:50000$TCI4GzcX$0de171a4f4dac32e3364c7ddc7c14f3e2fa61f2d17574483f7ffbb431b4acb2f') |
<reponame>EL-BID/nexso<filename>VS2013_PROJECT/DNN_DB/dbo/Stored Procedures/dnn_AddPackage.sql
CREATE PROCEDURE [dbo].[dnn_AddPackage]
@PortalID int,
@Name nvarchar(128),
@FriendlyName nvarchar(250),
@Description nvarchar(2000),
@PackageType nvarchar(50),
@Version nvarchar(50),
@License... |
RESTORE FILELISTONLY
FROM DISK = 'C:\Users\Mark.Green\Downloads\WideWorldImporters-Standard.bak'
RESTORE DATABASE WideWorldImporters
FROM DISK = 'C:\Users\Mark.Green\Downloads\WideWorldImporters-Standard.bak'
WITH MOVE 'WWI_Primary' TO 'C:\Users\Mark.Green\WideWorldImporters.mdf',
MOVE 'WWI_UserData' TO 'C:\Users\Mark... |
<reponame>Cour-des-comptes/open-anafi-backend<filename>dump_bdd/02_CCI_DGFIP_SQL_Donnees_config/type_sous_type_etablissements_201912231209_9.sql
INSERT INTO public.type_sous_type_etablissements (code_type_ets,code_sous_type,libelle_sous_type,creat_d,modif_d) VALUES ('421','10','SIVU - Syndicat à Vocation Unique ','2019... |
<filename>ncaa_pbp/cleaning/add_pk_bsf.sql
begin;
-- Add primary key to deduplicated box_scores_fielding table
alter table ncaa_pbp.box_scores_fielding
add primary key (game_id,section_id,player_name,position);
commit;
|
<reponame>m-ahmadi/exref
/*!40101 SET NAMES utf8 */;
DROP DATABASE IF EXISTS `p`;
CREATE DATABASE IF NOT EXISTS `p` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE `p`;
GRANT ALL PRIVILEGES ON p.* TO 'PC-Fantasy'@'localhost' IDENTIFIED BY 'php1020315106016php'; |
-- Assignment 2: Design and Develop SQL DDL statements which demonstrate the use of SQL objects such as Table, View, Index, Sequence, Synonym
-- Author: <NAME>.
-- existing databases in system
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql ... |
<reponame>Shuttl-Tech/antlr_psql
-- file:create_table_like.sql ln:22 expect:true
/* Throw error */
CREATE TABLE inhf (LIKE inhx INCLUDING DEFAULTS INCLUDING CONSTRAINTS)
|
/****** Object: StoredProcedure [microsoft].[sp_update_stats] Script Date: 29/06/2020 16:01:13 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROC [dbo].[sp_update_stats]
AS
IF OBJECT_ID('tempdb..#stats_ddl') IS NOT NULL
BEGIN;
DROP TABLE #stats_ddl;
END;
CREATE TABLE #stats_ddl
WITH
(
DIST... |
<filename>Scripts/InsertPais.sql
-- Inserindo dados na Tabela Pais --
INSERT INTO Pais VALUES ('Argentina', 'Argentino (a)');
INSERT INTO Pais VALUES ('Bolívia', 'Boliviano (a)');
INSERT INTO Pais VALUES ('Brasil', 'Brasileiro (a)');
INSERT INTO Pais VALUES ('Catar', 'Catariano (a)');
INSERT INTO Pais VALUES ('Chile', ... |
/*
* Copyright (c) 2017 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or... |
UPDATE p_device set connect = "未连接" where connect ="已连接" ; |
<gh_stars>1-10
/****** Object: View [dbo].[V_Analysis_Job_PSM_Summary_Export] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW V_Analysis_Job_PSM_Summary_Export
AS
SELECT AJ.AJ_datasetID AS Dataset_ID,
Count(*) AS Jobs,
IsNull(Max(PSM.Total_PSMs_FDR_Filter), Max(PSM.Tota... |
/*
* Copyright (c) 2011-2014 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
SELECT
s.entityid,
s.Id,
s.Name,
s.PDF,
s.Spanish_PDF,
s.video,
s.activeDate
FROM PublicSOPs.SOPs s |
<reponame>NCIP/cabio<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*/
create index TISSUE_SMPLE_TISSUE_ID on TISSUE_SAMPLE(TISSUE_ID) PARALLEL NOLOGGING tablespace CABIO;
create index TISSUE_SMPLE_T... |
<reponame>myogin/penjualan
-- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 26, 2019 at 04:29 AM
-- Server version: 10.1.34-MariaDB
-- PHP Version: 7.2.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+... |
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 31, 2022 at 05:48 AM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 7.4.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
CREATE TABLE joint(
bandId INT NOT NULL,
userId INT NOT NULL,
status VARCHAR(20) NOT NULL,
startDate DATETIME DEFAULT NULL,
endDate DATETIME DEFAULT NULL,
PRIMARY KEY (bandId, userId)
); |
<reponame>EddyChavez/PAAEBACK
use SWIITL;
/********************* INICIO MODIFICACIONES LUNES 15 DE ABRIL 2019 *********************************
* CONTROL DE CAMBIOS EN AMBIENTES
* LOCAL: PENDIENTE (FECHA DE APLICACIÓN)
* PRUEBAS: PENDIENTE (FECHA DE APLICACIÓN)
* PRODUCCIÓN: PENDIENTE (FECHA DE APLICACIÓN... |
<filename>DATA/migrations.sql
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Dec 30, 2018 at 08:42 AM
-- Server version: 5.6.35
-- PHP Version: 7.1.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `viavi`
--
-... |
<filename>catdog_db.sql
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server versie: 10.1.22-MariaDB - mariadb.org binary distribution
-- Server OS: Win32
-- HeidiSQL Versie: 9.4.0.5125
-- ------------------------... |
DROP MATERIALIZED VIEW all_karas;
ALTER TABLE serie_lang ALTER COLUMN fk_sid SET NOT NULL;
ALTER TABLE kara ALTER COLUMN subfile DROP NOT NULL;
ALTER TABLE kara ALTER COLUMN created_at TYPE TIMESTAMPTZ;
ALTER TABLE kara ALTER COLUMN modified_at TYPE TIMESTAMPTZ;
ALTER TABLE kara ADD COLUMN fk_repo_name character varyin... |
<filename>ifs-data-layer/ifs-data-service/src/main/resources/db/migration/V127_7_2__Migrate_comps_with_AT_to_all_have_RC_question.sql
-- IFS-4110: Script to fix a bug introduced by IFS-2123 that applicants could not choose a research category option
-- on the Application details page, nor from the Application overvie... |
-- file:jsonb.sql ln:274 expect:true
SELECT jsonb_exists_any('{"a":null, "b":"qq"}', ARRAY['b','a'])
|
<gh_stars>1-10
SELECT * FROM Employees; |
<reponame>manikanth/sql-server-samples
-- ======================
-- Stop Trace template
-- ======================
IF EXISTS (
SELECT * FROM sys.fn_trace_getinfo(<traceid,int,2>)
)
BEGIN
-- Stops the specified trace
EXEC sp_trace_setstatus <traceid,int,2>, 0
-- Closes the specified trace and deletes its definition ... |
<filename>heatwave-ml/titanic.sql
-- Copyright (c) 2022, Oracle and/or its affiliates.
-- Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
\sql
SET GLOBAL local_infile=1;
CREATE DATABASE heatwaveml_bench;
USE heatwaveml_bench;
DROP TABLE IF EXISTS titanic_train;
C... |
UPDATE solarnode.ocpp_socket
SET enabled = ?
WHERE socketid = ?
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.