sql stringlengths 6 1.05M |
|---|
/* pg_metricus--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION pg_metricus" to load this file. \quit
CREATE OR REPLACE FUNCTION send_metric(text)
RETURNS void
AS 'pg_metricus','send_metric'
LANGUAGE c IMMUTABLE STRICT;
|
SELECT setval('SEQ_EGWTR_DOCUMENT_NAMES', COALESCE((SELECT MAX(id)+1 FROM egwtr_document_names), 1), false);
SELECT setval('SEQ_EGWTR_APPLICATION_PROCESS_TIME', COALESCE((SELECT MAX(id)+1 FROM egwtr_application_process_time), 1), false); |
-- Update max capacity field to match POJO type of integer
ALTER TABLE beacon_use
ALTER COLUMN max_capacity TYPE integer USING max_capacity::integer; |
set define on verify off
define EXEC_PATH = '&1'
define PKG_VERSION = '&2'
col exec_script_version new_val exec_script_version noprint;
SELECT CASE
WHEN apde_pkg.get_apde_version = '&PKG_VERSION.' THEN
'null'
ELSE
'drop_compile_apde_pkg'
END AS exec_script_version
FROM ... |
ALTER TABLE merchShipment
ADD COLUMN shipmentStatusKey UNIQUEIDENTIFIER NULL
GO
ALTER TABLE merchShipment
ADD COLUMN shipmentNumber INT NULL
GO
ALTER TABLE merchShipment
ADD COLUMN shipmentNumberPrefix NVARCHAR(255) NULL
GO
CREATE TABLE merchShipmentStatus(
[pk] [uniqueidentifier] DEFAULT ('newid()') NOT NUL... |
<gh_stars>1-10
CREATE TABLE public.departments
(
department_code bigint NOT NULL,
city character varying(255) COLLATE pg_catalog."default",
department_name character varying(255) COLLATE pg_catalog."default",
manager_id bigint,
CONSTRAINT departments_pkey PRIMARY KEY (department_code),
CONSTRAIN... |
<filename>Load_into_DBAdata/Monthly_Report_Run.sql
/*
*/
-- Site1
--1 Inventory
exec DBADATA.DBO.[Usp_load_OS_Info] --tbl_OS_version
exec DBADATA.DBO.[Usp_Load_cpu_ram_Inventory_load] --tbl_load_Inventory_CPU_RAM_count
exec DBADATA.DBO.[Usp_load_settings] -- tbl_load_inventory_settings
--1 insert lower version
--inse... |
<reponame>AddressForAll/pg_pubLib
CREATE or replace FUNCTION jsonb_objslice(
key text, j jsonb, rename text default NULL
) RETURNS jsonb AS $f$
SELECT COALESCE( jsonb_build_object( COALESCE(rename,key) , j->key ), '{}'::jsonb )
$f$ LANGUAGE SQL IMMUTABLE;
COMMENT ON FUNCTION jsonb_objslice(text,jsonb,text)
... |
<gh_stars>0
USE data_extracts;
DROP PROCEDURE IF EXISTS BHRbuildCohortForDiabetes;
DELIMITER //
CREATE PROCEDURE BHRbuildCohortForDiabetes()
BEGIN
DROP TABLE IF EXISTS cohort_bhr;
-- build cohort of anyone who had diabetes
CREATE TABLE cohort_bhr AS
SELECT DISTINCT
p.id ... |
<reponame>TddSamaNoMercy/crawler
CREATE TABLE LINKS_TO_BE_PROCESSED (
LINK VARCHAR(1000)
);
CREATE TABLE LINKS_ALREADY_PROCESSED (
LINK VARCHAR(1000)
);
CREATE TABLE NEWS (
ID BIGINT PRIMARY KEY AUTO_INCREMENT,
TITLE TEXT,
CONTENT TEXT,
URL VARCHAR(1000),
CREATED_AT TIMESTAMP DEFAULT NOW(),
MODIFIED_AT TIMESTAMP DEFAUL... |
<reponame>sunfuchang/springcloud-demo
CREATE TABLE `service-point`.`t_point` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`userId` bigint(20) NULL DEFAULT NULL,
`point` int(10) NULL DEFAULT NULL,
`preparePoint` int(10) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARA... |
CREATE FUNCTION mesure_email_mandataire(mesure_row mesures)
RETURNS TEXT AS $$
SELECT users.email FROM users, mandataires WHERE mandataires.id = mesure_row.mandataire_id AND users.id = mandataires.user_id
$$ LANGUAGE sql STABLE;
|
<gh_stars>1-10
SELECT id, buying_type, created_time, effective_status, name, objective, spend_cap, start_time, status, stop_time, updated_time, budget_rebalance_flag, can_use_spend_cap FROM {table4130} WHERE name IN ('Публикация: "#дизайн #интерьер #спальня"', 'Публикация: "Классический стиль интерьера не выходит из мо... |
-- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 07-Fev-2020 às 13:28
-- Versão do servidor: 10.4.8-MariaDB
-- versão do PHP: 7.3.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @... |
-- ================================================
USE [SIGEUNBB]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [bib].[Sp_UPD_estado_prestamos]
@_iEstadoPrestamoId INTEGER,
@_cDescriEstadoPrestamo VARCHAR(15),
@_cUsuarioSis VARCHAR(50),
@_cEquipoSis VARCHAR(50),
@_cIpSis VARCHAR(15),... |
DROP DATABASE IF EXISTS microblog_db;
CREATE DATABASE microblog_db;
|
<gh_stars>1-10
create database barbearia;
use barbearia;
create table user(
idUser INT AUTO_INCREMENT PRIMARY KEY,
userUser varchar(200),
senhaUser varchar(200)
);
create table cliente(
idCliente INT AUTO_INCREMENT PRIMARY KEY,
nomeCliente varchar(255),
cpfCliente varchar(12)
);
create table servico(
idServico INT A... |
USE [_SQL_]
GO
CREATE SCHEMA Security
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Security].[AuditHistory](
[ID] [INT] IDENTITY(1,1) NOT NULL,
[IDSnap] [INT] NOT NULL,
[event_time] [DATETIME2](7) NOT NULL,
[Action_name] [NVARCHAR](128) NULL,
[succeeded] [BIT] NOT NULL,
[is_column_permissio... |
CREATE PROCEDURE [dbo].[sproc_GetInvoiceByEmployee]
(
@EmployeeId int
)
AS
SELECT CAST((SELECT Invoice.*
FROM Customer INNER JOIN
Invoice ON Customer.CustomerId = Invoice.CustomerId
WHERE dbo.Customer.SupportRepId = @EmployeeId FOR JSON PATH) AS VARCHAR(MAX)) AS JSONDATA |
/* UserLayerDataService parseFields() have parsed schema/featureType incorrectly for userlayers which geom crs can be mapped to srid code.
* GeoTools encodeType() adds srid to geom and then parseFields() parsed schema incorrectly.
* corrupted user_layer fields is like: [{"srid=3067":"avi"},{"String":"name"},{"the_geo... |
DROP TABLE IF EXISTS enum_test;
CREATE TABLE enum_test(timestamp DateTime, host String, e Enum8('IU' = 1, 'WS' = 2)) Engine = MergeTree PARTITION BY toDate(timestamp) ORDER BY (timestamp, host);
INSERT INTO enum_test SELECT '2020-10-09 00:00:00', 'h1', 'WS' FROM numbers(1);
ALTER TABLE enum_test MODIFY COLUMN e Enum... |
<reponame>dbosque/Stub<filename>dbStub/Schema Objects/Tables/Keys/dbo.Response.PK_Response.pkey.sql
ALTER TABLE [dbo].[Response] ADD CONSTRAINT [PK_Response] PRIMARY KEY CLUSTERED ([ResponseID]) ON [PRIMARY]
|
with balance_transaction as (
select *
from {{ ref('stg_stripe__balance_transaction') }}
), charge as (
select *
from {{ ref('stg_stripe__charge')}}
), payment_intent as (
select *
from {{ ref('stg_stripe__payment_intent')}}
), cards as (
select *
from {{ ref('stg_stripe__card')... |
<filename>chapter_006/basic/src/main/java/ru/job4j/join/selectnousedetals.sql
SELECT engine.brand, engine.type FROM engine LEFT OUTER JOIN car
ON engine.en_id = car.en_id
WHERE car.car_id IS NULL;
SELECT transmission.brand, transmission.type FROM transmission
LEFT OUTER JOIN car ON transmission.trans_id = car.trans_id... |
drop table if exists T_SYS_USER;
drop table if exists T_SYS_ROLE;
drop table if exists T_SYS_U2R;
drop table if exists T_SYS_PERMSSION;
drop table if exists T_SYS_MENU;
drop table if exists T_SYS_R2P;
drop table if exists T_BLOG;
create table T_SYS_USER (
ID bigint generated by... |
<filename>TABLE/CTID_MODIFIER.sql
CREATE TABLE "CTID_MODIFIER"
( "IDENTIFICATION_MODIFIER" VARCHAR2(15 CHAR),
CONSTRAINT "PKEY_CTID_MODIFIER" PRIMARY KEY ("IDENTIFICATION_MODIFIER")
USING INDEX ENABLE
) |
#standardSQL
# Percent of third party requests and bytes by category and content type.
WITH requests AS (
SELECT
pageid AS page,
req_host AS host,
type AS contentType,
respBodySize AS body_size
FROM
`httparchive.summary_requests.2020_08_01_mobile`
),
third_party AS (
SELECT
category,
... |
DROP FUNCTION public.get_full_stats_for_each_zone(integer, integer);
|
<reponame>yihong0618/diskquota
CREATE DATABASE db_insert_after_drop;
\c db_insert_after_drop
CREATE EXTENSION diskquota;
SELECT diskquota.wait_for_worker_new_epoch();
-- Test Drop Extension
CREATE SCHEMA sdrtbl;
SELECT diskquota.set_schema_quota('sdrtbl', '1 MB');
SET search_path TO sdrtbl;
CREATE TABLE a(i int) DISTRI... |
# ************************************************************
# Database: agavecore
# Generation Time: 2016-03-24 15:13:24 +0000
# ************************************************************
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RES... |
CREATE DATABASE TRANSPORTADORA;
USE TRANSPORTADORA;
CREATE TABLE LOCAL(
UF CHAR(2) UNIQUE NOT NULL,
CEP CHAR(9) UNIQUE NOT NULL,
CIDADE VARCHAR(25),
BAIRRO VARCHAR(25),
RUA VARCHAR(25),
NUMERO INT,
COMPL VARCHAR(15), /*COMPLEMENTO*/
PRIMARY KEY(UF,CEP)
);
CREATE TABLE CLIENTE(
IDCLIENTE VARCHAR(14) PRIMARY... |
<reponame>thuydx/civilization-vi-vietnamese
INSERT INTO "Languages" VALUES('vi_VN','Tiếng Việt',null,2,1);
INSERT INTO "AudioLanguages" VALUES('Tiếng Việt', 'vi_VN');
INSERT INTO "DefaultAudioLanguages" VALUES('vi_VN','Tiếng Việt');
INSERT INTO "SteamLanguages" VALUES('vietnamese','vi_VN');
INSERT INTO "EpicLangua... |
<reponame>NetworkTeamGG/SMF
--
-- PostgreSQL database dump
--
-- Dumped from database version 11.10 (Ubuntu 11.10-1.pgdg20.04+1)
-- Dumped by pg_dump version 11.10 (Ubuntu 11.10-1.pgdg20.04+1)
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
S... |
/*
****** Problem 19 - Select All ******
*/
SELECT * FROM "Towns";
SELECT * FROM "Departments";
SELECT * FROM "Employees"; |
GRANT all privileges ON DAW204_DBdepartamentos.* TO "DAW204"@"%" IDENTIFIED BY "paso";
create database if not exists DAW204_DBdepartamentos;
use DAW204_DBdepartamentos;
create table Departamento (
CodDepartamento varchar(3) not null primary key,
DescDepartamento varchar(255) not null unique
)Engine=InnoDB;
create tab... |
UNWIND $user_urls AS user
UNWIND user.urls as url
WITH user, url
WHERE user.idx IS NOT NULL AND url IS NOT NULL
MATCH (u:User {userId:user.idx})
MATCH (ur:Url {name:url})
MERGE (u)-[:LINKS_TO]->(ur);
|
<gh_stars>0
-- cerner_2^5_2018
declare @dbName varchar(50)
set @dbName = DB_NAME()
IF NOT EXISTS (SELECT 1 FROM master.sys.databases where name = @dbName)
BEGIN
return
END
declare
@fileName VARCHAR(50),
@filePath VARCHAR(300),
@SQL VARCHAR(MAX)
declare @tempTable TABLE (name nvarchar(50),filePath nvarchar(300)... |
<reponame>ourcredit/sale
/*
Navicat Premium Data Transfer
Source Server : 192.168.3.11
Source Server Type : MySQL
Source Server Version : 80011
Source Host : 192.168.3.11:3306
Source Schema : sale
Target Server Type : MySQL
Target Server Version : 80011
File Encoding :... |
<reponame>navikt/familie-ks-sak
create table GR_PERSONOPPLYSNINGER
(
ID bigint primary key,
BEHANDLING_ID bigint references BEHANDLING (id) not null,
OPPGITT_ANNEN_PART VARCHAR(50),
VERSJON bigint default 0 not null,
OPPRETTET_AV VARCHAR(20)... |
<reponame>marcopeg/skill-matrix<gh_stars>1-10
DROP TRIGGER IF EXISTS "set_public_res_groups_updated_at" ON "public"."res_groups";
ALTER TABLE "public"."res_groups" DROP COLUMN "updated_at";
|
/*
Warnings:
- The primary key for the `User` table will be changed. If it partially fails, the table could be left without primary key constraint.
- You are about to drop the column `id` on the `User` table. All the data in the column will be lost.
*/
-- DropForeignKey
ALTER TABLE "Hub" DROP CONSTRAINT "Hub_ow... |
-- file:triggers.sql ln:528 expect:true
INSERT INTO trigger_test VALUES(2, 'baz', 'quux')
|
<gh_stars>10-100
-- file:tstypes.sql ln:58 expect:true
SELECT $$'\\as'$$::tsquery
|
prompt --application/shared_components/logic/application_processes/standard_tests
begin
-- Manifest
-- APPLICATION PROCESS: Standard Tests
-- Manifest End
wwv_flow_api.component_begin (
p_version_yyyy_mm_dd=>'2021.10.15'
,p_release=>'21.2.2'
,p_default_workspace_id=>9690978936188613
,p_default_application_id=>... |
<filename>sql/updates/world/already_applied/12_11_18_01_spell_target_position.sql
-- Fixe Teleportieren Tol Barad (Allianz)
INSERT INTO `spell_target_position` (`id`, `target_map`, `target_position_x`, `target_position_y`, `target_position_z`, `target_orientation`) VALUES (88342, 732, -344.6, 1043.8, 21.5, 1.5);
-- Fi... |
/**************************************************************************
* Copyright 2016 Observational Health Data Sciences and Informatics (OHDSI)
*
* 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 Li... |
create table t_summary_user_daily
(
id BIGINT(19) auto_increment
primary key,
user_id BIGINT(19) not null comment '人员id',
dept_id BIGINT(19) not null comment '辖区id',
summary_date DAT... |
<gh_stars>0
/*
Navicat MySQL Data Transfer
Source Server : 本地数据库(local)
Source Server Version : 50725
Source Host : localhost:3306
Source Database : test1
Target Server Type : MYSQL
Target Server Version : 50725
File Encoding : 65001
Date: 2021-07-30 18:19:02
*/
SET FOREIGN_KEY_CH... |
CREATE ROLE keystonejsuser WITH LOGIN PASSWORD '<PASSWORD>';
CREATE DATABASE keystonejs OWNER keystonejsuser;
CREATE ROLE konguser WITH LOGIN PASSWORD '<PASSWORD>';
CREATE DATABASE kong OWNER konguser;
CREATE ROLE keycloakuser WITH LOGIN PASSWORD '<PASSWORD>';
CREATE DATABASE keycloak OWNER keycloakuser; |
<filename>alicloud-test/tests/alicloud_kms_secret/test-get-query.sql
select name, arn, secret_type, description, tags_src, account_id, region
from alicloud_kms_secret
where name = '{{ resourceName }}'; |
<gh_stars>1-10
/*
2_Identify_aggregate_TimeSeriesValues_waterYear.sql
-- Keep caldender year as is
Use case 2: identify and compare time series and seasonal discharge data across data sources.
What is the discharge at the node “below Stewart Dam” in Idaho?
Aggregate time series data from daily cfs into cumulative ... |
<filename>udf_exec_python.sql
create or replace function EXEC_PYTHON(script string, arg1 variant)
returns variant
as
$$
STARSNOW_REQUEST('http://<your_tabpy_server>/evaluate',
OBJECT_CONSTRUCT('method','post', 'data',
OBJECT_CONSTRUCT( 'script'... |
<filename>schemaDB/sd2_mannually_MOJE_UPROSZCZANIE.sql
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Czas generowania: 21 Lis 2021, 00:14
-- Wersja serwera: 10.4.21-MariaDB
-- Wersja PHP: 7.3.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone =... |
<reponame>ToEndThePeace/4.3.2-guided-JWT
SELECT * FROM users;
-- Test query
SELECT * FROM roles; |
<reponame>DuduShopping/UserService
CREATE TABLE Users (
UserId BIGINT PRIMARY KEY IDENTITY,
Username VARCHAR(20) NOT NULL UNIQUE,
Role CHAR(1) NOT NULL,
Password VARCHAR(100) NOT NULL,
CreatedOn DATETIME NOT NULL DEFAULT SYSDATETIME(),
LastLogin DATETIME NULL,
LoginAttempts INT NOT NULL DEFAULT 0,
) |
<reponame>mellnda1917051007/UAS_SIG
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 1172.16.31.10
-- Waktu pembuatan: 15 Jul 2021 pada 13.54
-- Versi server: 10.4.13-MariaDB
-- Versi PHP: 7.2.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*... |
/****** Object: Procedure [dbo].[GetGridView] Committed by VersionSQL https://www.versionsql.com ******/
CREATE PROCEDURE [dbo].[GetGridView]
AS
SELECT
RegulatingReserveID,
CompanyID,
RegulatingReserveP,
RegulatingReserveN,
RRP_Accepted,
RRN_Accepted,
OfferDate,
Accepted
FROM RegulatingReserve
WHERE
cas... |
with
BaseData(BankAccountID, UploadValidator) as
(
select 1, '920156438K78'
union all select 2, '920156438S00'
union all select 3, '920156438K77'
union all select 6, '920336884K75'
union all select 7, '920336884S00'
union all select 8, '920448085K75'
union all select 9, '920448085S00'
)
upda... |
DROP TABLE IF EXISTS `carts`;
CREATE TABLE `carts` (
`user_id` int NOT NULL,
`food_id` int NOT NULL,
`quantity` int NOT NULL,
`status` int NOT NULL DEFAULT '1',
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY... |
CREATE DATABASE IF NOT EXISTS `connekt`;
CREATE TABLE IF NOT EXISTS `USER_INFO` (
`userId` varchar(100) NOT NULL DEFAULT '',
`apikey` varchar(100) NOT NULL DEFAULT '',
`groups` text,
`lastUpdatedTS` bigint(20) unsigned NOT NULL,
`updatedBy` varchar(100) NOT NULL DEFAULT '',
PRIMARY KEY (`userId`),
UNIQU... |
<reponame>masterwallet/etherscan-server<gh_stars>1-10
DROP TABLE IF EXISTS `blocks`;
CREATE TABLE `blocks` (
`blockNumber` INT NOT NULL,
`timeStamp` INT NOT NULL,
`blockHash` CHAR(66) NOT NULL,
PRIMARY KEY (`blockNumber`),
INDEX k_timeStamp(`timeStamp`),
INDEX k_blockHash(`blockHash`)
) ENGINE='InnoDB';... |
INSERT INTO task_people (people_id, name, task_id) VALUES
(6, 'john', 1),
(7, 'emma', 2);
|
BEGIN;
insert into student (first_name, last_name, alias) values ( "Susanne", "Richardson", "milgram");
insert into student (first_name, last_name, alias) values ( "Jamie", "Jacobs", "rooster");
insert into student (first_name, last_name, alias) values ( "Henry", "Fowler", "31337");
insert into student (first_name, la... |
ALTER TABLE dob_permits
ADD COLUMN "bbl" numeric;
UPDATE dob_permits SET bbl = replace((CASE
WHEN borough='MANHATTAN' THEN 1
WHEN borough='BRONX' THEN 2
WHEN borough='BROOKLYN' THEN 3
WHEN borough='QUEENS' THEN 4
WHEN borough='STATEN ISLAND' THEN 5
ELSE 0
END || block || RIGHT(lot,4)),' '... |
<reponame>nalgeon/metro<gh_stars>1-10
-- cities
create table city (
id text,
name text,
url text,
fullkey
);
insert into city (id, name, url, fullkey)
select
json_extract(value, '$.id') as id,
json_extract(value, '$.name') as name,
json_extract(value, '$.url') as url,
fullkey
from json_tre... |
<gh_stars>10-100
CREATE TABLE creditCard (
ccid SERIAL PRIMARY KEY,
ccNumber VARCHAR(20) NOT NULL
);
|
<gh_stars>1000+
UPDATE externalsystem_config_shopware6
SET freightcost_normalvat_rates='0, 7.7, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27',
freightcost_reduced_vat_rates='2.5, 5, 5.5, 6, 7, 8, 9, 10',
updatedby=99, updated='2021-09-08 10:12'
WHERE externalsystem_config_shopware6_id = 540000
;
|
<filename>src/t_hcc_orderby_advisor_log.sql
/*
Copyright 2015 <NAME>, <EMAIL>
Licensed under the Apache License, Version 2.0
*/
CREATE TABLE T_HCC_ORDERBY_ADVISOR_LOG
(
TABLE_NAME VARCHAR2(30),
OWNER VARCHAR2(30),
ORDER_BY_COLS VARCHAR2(4000),
BYTES NUMBER,
COLS_USED NUMBER,
DAT... |
<filename>emit-attic/emit-system/src/main/resources/fr/icam/emit/queries/measurement-find.sql<gh_stars>1-10
SELECT
mm.`id` AS id,
mm.`started` AS started,
mm.`stopped` AS stopped,
mm.`uuid` AS uuid,
m.`id` AS measureId,
m.`name` AS measureName,
m.`unit` AS measureUnit,
i.`id` AS instrumentId,
i.`name... |
<reponame>lftao/jkami-demo<filename>src/main/java/jkami/demo/dao/sql/IUserDao/findListByName.sql
select
*
from
tb_user
where
name = :name |
use [BehdarDrugStore]
insert into [user]
([username], [password], [fname], [lname], [ncode], [type], [status])
values
('admin', 'admin', 'admin', 'admin', '1234567891', 0, 1),
('sysuser', 'sysuser', 'sysuser', 'sysuser', '1234567892', 1, 1),
('accuser', 'accuser', 'accuser', 'accuser', '1234567893', 2, 1)
;
inse... |
<filename>migrations/001_create_customers.up.sql
create table customers (
customer_id varchar(40),
first_name varchar(40),
middle_name varchar(40),
last_name varchar(40),
nick_name varchar(40),
suffix varchar(3),
birth_date datetime,
status varchar(20),
email varchar(120),
type varchar(25),... |
<gh_stars>10-100
ALTER TABLE mod_releases DROP COLUMN IF EXISTS dependency_snapshot;
ALTER TABLE mod_releases DROP COLUMN IF EXISTS install_count;
ALTER TABLE mod_releases DROP COLUMN IF EXISTS mod_order;
ALTER TABLE mod_releases ADD COLUMN dependency_snapshot jsonb NOT NULL DEFAULT '{}';
ALTER TABLE mod_releases ADD ... |
drop procedure if exists updateAnalyticsCurrConvMonth;
DELIMITER //
CREATE PROCEDURE updateAnalyticsCurrConvMonth(p_month int, p_year int, p_aud_rate decimal(10,4), p_brl_rate decimal(10,4), p_eur_rate decimal(10,4), p_gbp_rate decimal(10,4), p_mxn_rate decimal(10,4))
BEGIN
/***********************
*
* ... |
<filename>fineract-provider/src/main/resources/sql/migrations/core_db/V23__remove-enable-disable-configuration-for-client-group-status.sql
DELETE FROM `c_configuration` WHERE `name`='allow-pending-client-status';
DELETE FROM `c_configuration` WHERE `name`='allow-pending-group-status';
ALTER TABLE `m_client` DROP COLUM... |
--
-- Table structure for table `user_account_segment_role_mapping`
--
CREATE TABLE IF NOT EXISTS `user_account_segment_role_mapping` (
`user_account_segment_role_mapping_id` int(11) NOT NULL AUTO_INCREMENT,
`user_account_segment_mapping_id` int(11) NOT NULL,
`role_id` int(11) NOT NULL,
PRIMARY KEY (`user_accou... |
GO
IF OBJECT_ID('[DOI].[spRefreshMetadata_System_SysCheckConstraints]') IS NOT NULL
DROP PROCEDURE [DOI].[spRefreshMetadata_System_SysCheckConstraints];
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE [DOI].[spRefreshMetadata_System_SysCheckConstraints]
@DatabaseName NVARCHAR(128) = NULL... |
<reponame>ashlyrclark/docs.particular.net
startcode MsSqlServer_SubscriptionSubscribeSql
merge [dbo].[EndpointNameSubscriptionData] with (holdlock) as target
using(select @Endpoint as Endpoint, @Subscriber as Subscriber, @MessageType as MessageType) as source
on target.Subscriber = source.Subscriber and
target... |
autocommit off;
select product_code
from all joe.inventory_v i
group by product_code
order by 1 desc;
rollback;
|
INSERT INTO users (`name`,`email`,`city_id`,`password`) VALUES ('<NAME>','<EMAIL>','1','JcfoKBYAB4k');
INSERT INTO users (`name`,`email`,`city_id`,`password`) VALUES ('<NAME>','<EMAIL>','2','ZEE54kg');
INSERT INTO users (`name`,`email`,`city_id`,`password`) VALUES ('<NAME>','<EMAIL>','3','VJyMV1Zat');
INSERT INTO users... |
<filename>ExamPrep/Exam/SQLQuery7.sql<gh_stars>0
SELECT TOP(5) C.Name, COUNT(C.Id) AS [Count]
FROM Categories C
JOIN Reports R ON R.CategoryId = C.Id
GROUP BY C.Name
ORDER BY [Count] DESC, C.Name |
--
-- Script
--
CREATE TABLE [Account].[UserRestrictedArea] (
[Id] [INT] IDENTITY (1, 1) NOT NULL,
[UserId] [INT] NOT NULL,
[Area] [VARCHAR](255) NOT NULL,
CONSTRAINT [PK_UserRestrictedArea] PRIMARY KEY CLUSTERED ([Id] ASC)
)
ALTER TABLE [Account].[UserRestrictedArea]
WITH CHECK... |
<filename>sql/q10_v2.sql<gh_stars>0
select count(distinct pler.dec_number)
from bpi_final.permit_log_entry_relationship pler
left join bpi_final.prepaidtravelcosts_event pe on (pe.permit_id = pler.case_id)
left join bpi_final.domesticdeclaration_event de
on (de.declarationnumber = p... |
\unset ON_ERROR_STOP
\set VERBOSITY verbose
\echo
\echo 'CREATE TABLE IF NOT EXISTS available_tool ('
\echo ' tool_id INTEGER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,'
\echo ' tool_type TEXT NOT NULL,'
\echo ' available INTEGER DEFAULT 5 NOT NULL,'
\echo ' CHECK(available >= 0)'
\echo ');'
\prompt c
... |
<reponame>ivancekic/sql-data-analysis
alter table invej.proizvod add zad_nab_cena_dok_vred number null;
alter table invej.proizvod add zad_nab_cena_dok_dat date null;
alter table invej.proizvod add zad_nab_cena_rucni_unos number null;
CREATE TABLE invej.PLANIRANJE_MAPIRANJE
(
VRSTA VARCHAR2(100) NOT NUL... |
<reponame>hhwy-omh/laravel<gh_stars>1-10
/*
Navicat Premium Data Transfer
Source Server : mvc
Source Server Type : MySQL
Source Server Version : 50721
Source Host : localhost:3306
Source Schema : lar_sns
Target Server Type : MySQL
Target Server Version : 50721
File Encoding ... |
# SQL Manager 2005 Lite for MySQL 3.6.5.1
# ---------------------------------------
# Host : localhost
# Port : 3306
# Database : fsonline2
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION... |
create table messages ( message_id serial primary key, message varchar(255) not null)
create table CAMEL_MESSAGEPROCESSED ( processorName varchar(255), messageId varchar(100), createdAt timestamp)
select count(*) from messages where message = ?
select count(*) from audit_log where message = ?
create table audit_log ( ... |
INSERT INTO s_product_streams (name, conditions, type, sorting, description) VALUES ('AwStream', null, 2, '"{\\"Shopware\\\\\\\\Bundle\\\\\\\\SearchBundle\\\\\\\\Sorting\\\\\\\\PriceSorting\\":{\\"direction\\":\\"DESC\\"}}"', 'lorem ipsum');
DELETE FROM s_product_streams_selection;
INSERT INTO s_product_streams_select... |
<filename>hLanguage/Database/hLanguages/hLanguages.insert.sql
INSERT INTO `hLanguages` (
`hLanguageId`,
`hLanguageCode`,
`hLanguageLocalization`,
`hLanguageCharset`,
`hLanguageDescription`,
`hLanguageName`
) VALUES
(1, 'en', 'en-us', 'utf-8', 'English - United States', 'English'),
(2, 'e... |
-- file:copy2.sql ln:248 expect:true
ROLLBACK TO SAVEPOINT s1
|
<filename>src/TestDb/dbo/Stored Procedures/ProcWithLengthTypes.sql
CREATE PROCEDURE [dbo].[ProcWithLengthTypes]
@binary BINARY(3),
@char CHAR(3),
@nchar NCHAR(3),
@nvarchar NVARCHAR(3),
@varbinary VARBINARY(3),
@varchar VARCHAR(3)
AS
SELECT
[binary] = @binary,
[char] = @char,
[nchar] = @... |
--
-- Table structure for table admins
--
DROP TABLE IF EXISTS term_resources;
DROP TABLE IF EXISTS terms;
DROP TABLE IF EXISTS contributors;
DROP TABLE IF EXISTS admins;
DROP TYPE IF EXISTS link_t;
CREATE TABLE admins (
id SERIAL PRIMARY KEY,
admin_name varchar(100) NOT NULL,
email varchar(100),
admin_passw... |
-- \ir '../../intershop/db/010-trm.sql'
-- \timing off
-- \set X :yellow
-- -- turn off echo and keep things quiet.
-- -- format the output for nice tap.
-- \set echo none
-- \set quiet 1
-- -- \pset format unaligned
-- -- \pset tuples_only true
-- \pset pager
-- -- revert all changes on failure.
-- \set on_error_r... |
<gh_stars>100-1000
--DROP TABLE IF EIXISTS STRENGTH_TMP;
CREATE TABLE STRENGTH_TMP
(
DRUG_CODE VARCHAR(255),
INGREDIENT_CODE VARCHAR(255),
INGREDIENT_NAME VARCHAR(255),
AMOUNT_VALUE FLOAT,
AMOUNT_UNIT VARCHAR(255),
NUMERATOR_VALUE FLOAT,
NUMERATOR_UNIT VARCHAR(255... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 3.5.1
-- http://www.phpmyadmin.net
--
-- Host: db.cip.gatech.edu
-- Generation Time: Oct 21, 2013 at 10:42 PM
-- Server version: 5.5.15-log
-- PHP Version: 5.3.13
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHA... |
<reponame>argius/fondue
insert into app1.books ( title, author ) values ('The Mythical Man-Month', '<NAME>');
insert into app1.books ( title, author ) values ('Inherit the Stars', '<NAME>');
insert into app1.books ( title, author ) values ('And Then There Were None', '<NAME>');
insert into app1.books ( title, author ) ... |
//// CHANGE name=change0
CREATE MEMORY TABLE TABLE291(ID INTEGER NOT NULL PRIMARY KEY,FIELD1 VARCHAR(30),USERTYPE0FIELD USERTYPE0,USERTYPE5FIELD USERTYPE5)
GO
|
<reponame>andreylipattsev/almanac.httparchive.org
#standardSQL
# beforeinstallprompt usage - based on 2019/14_06.sql
SELECT
client,
COUNT(DISTINCT page) AS freq,
total,
COUNT(DISTINCT page) / total AS pct
FROM
`httparchive.almanac.summary_response_bodies`
JOIN
(SELECT _TABLE_SUFFIX AS client, COUNT(0) AS to... |
<filename>conf/evolutions/default/41.sql
# --- MapRoulette Scheme
# --- !Ups
-- Add suggested_fix for tasks
ALTER TABLE challenges ADD COLUMN has_suggested_fixes boolean DEFAULT false;;
# --- !Downs
ALTER TABLE challenges DROP COLUMN has_suggested_fixes;;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.