sql stringlengths 6 1.05M |
|---|
<gh_stars>100-1000
DROP TABLE dummy_entity;
CREATE TABLE dummy_entity (id SERIAL PRIMARY KEY, PREFIX_ATTR1 BIGINT, PREFIX_ATTR2 VARCHAR(100));
|
SELECT * FROM (SELECT range(number) AS x FROM system.numbers LIMIT 10) WHERE length(x) % 2 = 0;
SELECT * FROM (SELECT arrayMap(x -> toNullable(x), range(number)) AS x FROM system.numbers LIMIT 10) WHERE length(x) % 2 = 0;
SELECT * FROM (SELECT arrayMap(x -> (x, x), range(number)) AS x FROM system.numbers LIMIT 10) WHER... |
<filename>persistence/sql/migrations/20190100000013000000_client.cockroach.down.sql
DROP TABLE hydra_client;
|
<reponame>christywear/UlServer
-- MySQL dump 10.13 Distrib 5.1.73, for redhat-linux-gnu (x86_64)
--
-- Host: localhost Database: ul_server
-- ------------------------------------------------------
-- Server version 5.1.73
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER... |
<reponame>dimagilg/commcare-hq
DROP FUNCTION IF EXISTS get_case_by_external_id(TEXT, TEXT, TEXT);
CREATE FUNCTION get_case_by_external_id(p_domain TEXT, p_external_id TEXT, p_type TEXT DEFAULT NULL) RETURNS SETOF form_processor_commcarecasesql AS $$
DECLARE
query_expr TEXT := 'SELECT * FROM form_processor_commc... |
-- // create quiz_results
-- Migration SQL that makes the change goes here.
CREATE TABLE IF NOT EXISTS `t_quiz_results` (
`id` INTEGER UNSIGNED AUTO_INCREMENT PRIMARY KEY,
`quiz_slug` varchar(191) null,
`first_name` varchar(191) not null ,
`last_name` varchar(191) not null,
`email` varchar(191) not ... |
DROP DATABASE IF EXISTS organization_db;
CREATE DATABASE organization_db;
USE organization_db;
CREATE TABLE departments (
id INT AUTO_INCREMENT,
name VARCHAR(30) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE roles (
id INT AUTO_INCREMENT,
title VARCHAR(30) NOT NULL,
salary DECIMAL(8,2) UNSIGNED NOT NULL,
d... |
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 1172.16.31.10
-- Generation Time: Aug 02, 2020 at 11:29 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET ... |
<filename>sql/el_queries4.sql<gh_stars>0
/*
* EL Topic 4
*
* - I think similarly being able to graph sets of people or individuals' amount
* giving per cycle would be interesting.
*
* - In the 2 year cycle when does a specific person tend to give (eg: when should
* we call them)?
*
* - Are ... |
<reponame>warncke/immutable-commerce<filename>sql/immutable/01-resource-undelete.sql
CREATE TABLE `resourceUndelete` (
`resourceDeleteId` binary(16) NOT NULL,
`sessionId` binary(16) NOT NULL,
`resourceUndeleteCreateTime` datetime(6) NOT NULL,
PRIMARY KEY (`resourceDeleteId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8... |
<reponame>SonicTheCat/Databases-Basics
UPDATE Reports
SET StatusId = 2
WHERE (StatusId = 1 AND CategoryId = 4) |
-- =============================================
-- Author: <NAME>
-- Create date: 02-Jun-2010
-- Description: Returns a list of Object Consolidatn Codes and
-- their corresponding Level for use with Report Builder, etc.
-- =============================================
CREATE FUNCTION [dbo].[udf_ObjectLevelCodesLis... |
<filename>create_feedback_table.sql
CREATE DATABASE IF NOT EXISTS Music;
CREATE TABLE IF NOT EXISTS Music.feedback
(
userID varchar(36),
userIP varchar(45),
timestamp timestamp,
questionID varchar(64),
rating int,
comment text,
CONSTRAINT pk_userquestion PRIMARY KEY (userID,questionID)
);
|
use TelerikAcademy;
select y.FirstName + ' ' + y.LastName as [Employee Name],
x.FirstName + ' ' + x.LastName as [Manager Name]
from Employees x
right outer join Employees y
on x.ManagerID = y.EmployeeID; |
CREATE TABLE [dbo].[HostServer] (
[HostName] varchar(30) NOT NULL PRIMARY KEY,
[IPAddr] varchar(15) NOT NULL
) |
/*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 100414
Source Host : localhost:3306
Source Schema : perpus2
Target Server Type : MySQL
Target Server Version : 100414
File Encoding : 65001
Date: 06/10/2020 ... |
<filename>SQL/SQLD/TRANSPOSE/Transpose_Practice.sql
SELECT * FROM sales;
SELECT * FROM sales
UNPIVOT(salesamount FOR country IN (india AS 'India', us AS 'US', uk AS 'UK'))
PIVOT(SUM(salesamount) FOR salesagent IN ('David' david, 'John' john)); |
INSERT INTO department (name) VALUES ('HR'), ('Sales'), ('Management'), ('Technicians');
INSERT INTO role (title, salary, department_id) VALUES ('Director', 150000, 1), ('Representative', 85000, 1), ('Senior', 130000, 2), ('Middle', 75000, 2), ('Upper', 250000, 3), ('Lower', 145000, 3), ('Master', 13000, 4), ('Middle'... |
<gh_stars>1-10
SET DEFINE OFF;
ALTER TABLE AFW_17_COURL_DESTN ADD (
CONSTRAINT AFW_17_FIL_ATENT_DESTN_FK1
FOREIGN KEY (REF_FIL_ATENT)
REFERENCES AFW_17_COURL (SEQNC)
ON DELETE CASCADE
ENABLE VALIDATE)
/
|
prompt --application/set_environment
set define off verify off feedback off
whenever sqlerror exit sql.sqlcode rollback
--------------------------------------------------------------------------------
--
-- ORACLE Application Express (APEX) export file
--
-- You should run the script connected to SQL*Plus as the Oracle... |
ALTER USER 'knex_cleaner'@'%' IDENTIFIED WITH mysql_native_password BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'knex_cleaner'@'%';
|
<filename>src/test/resources/sql/release_savepoint/62a795a2.sql
-- file:transactions.sql ln:80 expect:true
RELEASE SAVEPOINT y
|
<reponame>flexsocialbox/una
SET @sName = 'bx_forum';
-- SETTINGS
UPDATE `sys_options` SET `value`='title,text,text_comments' WHERE `name`='bx_forum_searchable_fields';
DELETE FROM `sys_options` WHERE `name`='bx_forum_labels';
-- MENUS
UPDATE `sys_menu_items` SET `active`='0' WHERE `set_name`='bx_forum_vi... |
<filename>BD/Laborator/lab08/demo.sql
-- -- select *
-- -- from
-- -- (
-- -- select ename, sal
-- -- from emp
-- -- order by sal
-- -- )
-- -- where rownum <= 3;
-- -- select ename, sal
-- -- from emp
-- -- order by sal
-- -- fetch next 3 rows only;
-- -- Ex 1
-- select id_dep, nume, functie, salariu
-- from an... |
<reponame>MartyBonacci/DeepDiveTutor
INSERT INTO skill(skillId, skillName)VALUES (1, 'HTML');
INSERT INTO skill(skillId, skillName)VALUES (2, 'Bootstrap');
INSERT INTO skill(skillId, skillName)VALUES (3, 'jQuery');
INSERT INTO skill(skillId, skillName)VALUES (4, 'PHP');
INSERT INTO skill(skillId, skillName)VALUES (5, '... |
<filename>sql/local-tables/table_mdl_elp_course_variables.sql
CREATE TABLE `mdl_elp_course_variables` (
`id` bigint(10) NOT NULL AUTO_INCREMENT,
`effective_time` bigint(10) NOT NULL COMMENT 'Time at which this course data replaced an earlier version',
`courseid` bigint(10) NOT NULL COMMENT 'Course id as in mdl_co... |
<reponame>nathnael/cats
CREATE PROCEDURE [sp_sel_Store]
AS
SELECT
[StoreID],
[Name],
[HubID],
[IsTemporary],
[IsActive],
[StackCount],
[StoreManName]
FROM
[dbo].[Store] |
<filename>quickstart/ssb-exp/ssb-query/q1/3.sql
-- Query 1.3
select
/*+ NO_INDEX(date)*/
sum(lo_extendedprice*lo_discount) as revenue
from
lineorder straight_join date
where
lo_orderdate = d_datekey and
d_weeknuminyear = 7 and
d_year = 1859 and
lo_discount between 60 and 106 and
lo_quantity ... |
ALTER TABLE {$NAMESPACE}_conduit.conduit_methodcalllog
ADD callerPHID VARCHAR(64);
ALTER TABLE {$NAMESPACE}_conduit.conduit_methodcalllog
ADD KEY `key_created` (dateCreated);
ALTER TABLE {$NAMESPACE}_conduit.conduit_methodcalllog
ADD KEY `key_method` (method);
ALTER TABLE {$NAMESPACE}_conduit.conduit_methodcal... |
1
2
|
--+ holdcas on;
set system parameters 'compat_mode=mysql';
create table t1(a CHAR(10) AUTO_INCREMENT);
create table t2(a VARCHAR(10) AUTO_INCREMENT);
create table t3(a NCHAR(10) AUTO_INCREMENT);
create table t4(a NCHAR VARYING(10) AUTO_INCREMENT);
create table t5(a BIT(10) AUTO_INCREMENT);
create table t7(a BIT VARYIN... |
<reponame>thevivekdwivedi/AI-MaaS
-- MySQL dump 10.13 Distrib 5.7.17, for macos10.12 (x86_64)
--
-- Host: localhost Database: nodetut
-- ------------------------------------------------------
-- Server version 5.6.37
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_... |
# ************************************************************
# Sequel Pro SQL dump
# Version (null)
#
# https://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: 127.0.0.1 (MySQL 8.0.16)
# Database: testtest
# Generation Time: 2019-12-27 09:12:15 +0000
# *******************************************... |
UPDATE sensor_report
SET abs_humidity = ROUND(216.7 * ( humidity / 100 ) * 6.112 * EXP(17.62 * temperature / (243.12 + temperature)) / (273.15 + temperature), 2)
WHERE abs_humidity IS NULL and humidity > 0 AND temperature > 0;
UPDATE sensor_report
SET abs_humidity = 0.00
WHERE abs_humidity IS NULL and humidity = 0.00 ... |
SELECT first_name, last_name, job_title AS JobTitle FROM `employees`
WHERE salary BETWEEN 20000 AND 30000
ORDER BY employee_id; |
SELECT
TRACT10,
SUM(POP_TOT) AS POP_SUM,
SUM(CASE WHEN DIST_BUS < 999
THEN POP_TOT
ELSE NULL END) AS POP_BUS_TOT,
SUM(CASE WHEN DIST_LRT < 999
THEN POP_TOT
ELSE NULL END) AS POP_TRN_TOT,
SUM(CASE WHEN DIST_MIN < 999
THEN POP_TOT
ELSE NULL END) AS POP_MIN_TOT,
CASE
WHEN SUM(POP_TOT) = 0 THEN 0
E... |
-- MySQL dump 10.13 Distrib 8.0.27, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: campus_eats_fall2020
-- ------------------------------------------------------
-- Server version 8.0.27
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RE... |
SELECT ks.source
FROM kanji_source ks
WHERE ks.id NOT IN (SELECT k.source_id
FROM student_kanji sk
JOIN kanji k ON sk.kanji_id = k.id
JOIN kanji_source kks ON k.source_id = kks.id
JOIN student s ON sk... |
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jul 26, 2019 at 09:34 AM
-- Server version: 10.1.36-MariaDB
-- PHP Version: 7.2.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
<reponame>ucdavis/ipa-web
ALTER TABLE `SectionGroups` ADD COLUMN `ShowTheStaff` TINYINT(1) NOT NULL DEFAULT '0';
|
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Creato il: Giu 28, 2020 alle 08:12
-- Versione del server: 10.4.10-MariaDB
-- Versione PHP: 7.3.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET... |
<filename>0x0D-SQL_introduction/7-insert_value.sql<gh_stars>1-10
-- inserts a new row in the table `first_table` (database hbtn_0c_0) in MySQL server.
INSERT INTO `first_table` (`id`, `name`) VALUES (89, "Holberton School");
|
<gh_stars>10-100
SELECT AlbumId, AlbumTitle, MarketingBudget
FROM Albums@{FORCE_INDEX=AlbumsByAlbumTitle}
WHERE AlbumTitle >= @startTitle AND AlbumTitle < @endTitle
|
B.1.1 : Execution of each SQL query used to complete the task given in PART A :
1. Write a query to display all bus_station name into upper case.
select upper (bus_station) bus_station from place_header
2. Write a query to print “mpstme” into upper case.
select upper ('mpstme') from dual
3. Write a query to displa... |
-- Übung 17: Alle Tage eines Jahres per Series Generate Function im BW-Format erzeugen lassen
-- Musterlösungen für alle Teilaufgaben der Übung
/*************************************************************/
--Lösungsvorschlag:
SELECT to_nvarchar(GENERATED_PERIOD_START,'YYYYMMDD') AS calmonth
FROM SERIES_GENERATE_D... |
<reponame>cristianspinetta/footpath-routing<gh_stars>0
insert into transport_public_combination (fromStopId, fromCoordinate, toStopId, toCoordinate, fromTravelInfoId,
toTravelInfoId, distance)
select
candidateCombination.stop_id_from,
candidateCombination.stop_coordinate_from,
candidateCombination.stop_id_to,
... |
version https://git-lfs.github.com/spec/v1
oid sha256:d1c0893dc1b563f2dd108498f906b3f8848596e1f3728f75a781196be9e2374a
size 6587
|
<reponame>pro-zw/m8chat
# --- !Ups
CREATE OR REPLACE FUNCTION advert.list_adverts_nearby(IN _current_user_id INTEGER, IN _page INTEGER, IN _page_size INTEGER)
RETURNS TABLE (_advert_id INTEGER, _business_name TEXT, _first_photo TEXT, _plan_name TEXT, _distance INTEGER) AS $$
DECLARE
_page_offset INTEGER := _page *... |
{%- macro type_string() -%}
{{ adapter.dispatch('type_string', packages = fivetran_log._get_utils_namespaces()) () }}
{%- endmacro -%}
{%- macro default__type_string() -%}
string
{%- endmacro -%}
{%- macro redshift__type_string() -%}
varchar
{%- endmacro -%}
{%- macro snowflake__type_string() -%}
varch... |
<filename>for_blog/sql/decucin_comment.sql
/*
Navicat Premium Data Transfer
Source Server : for_blog
Source Server Type : MySQL
Source Server Version : 80026
Source Host : localhost:3306
Source Schema : blog
Target Server Type : MySQL
Target Server Version : 80026
File Encodin... |
<gh_stars>0
TRUNCATE TABLE maurodatamapper.datamodel.join_dataclass_to_facet CASCADE;
TRUNCATE TABLE maurodatamapper.datamodel.join_dataelement_to_facet CASCADE;
TRUNCATE TABLE maurodatamapper.datamodel.data_element CASCADE;
TRUNCATE TABLE maurodatamapper.datamodel.join_datamodel_to_facet CASCADE;
TRUNCATE TABLE ma... |
<gh_stars>1-10
DROP TABLE IF EXISTS t;
CREATE TABLE t (b UInt8) ENGINE = Memory;
SELECT a FROM merge(REGEXP('.'), '^t$'); -- { serverError 47 }
SELECT a FROM merge(REGEXP('\0'), '^t$'); -- { serverError 47 }
SELECT a FROM merge(REGEXP('\0a'), '^t$'); -- { serverError 47 }
SELECT a FROM merge(REGEXP('\0a'), '^$'); -- { ... |
ALTER TABLE {$NAMESPACE}_owners.owners_path
ADD UNIQUE KEY `key_path` (packageID, repositoryPHID, pathIndex);
|
<reponame>kltm/go-site<gh_stars>10-100
-- These views are useful for mining correlations between terms
-- and peptide motifs; peptide motifs are stored as seq_dbxrefs
CREATE OR REPLACE VIEW gene_product_dbxref AS
SELECT
gene_product.*,
dbxref.xref_key,
dbxref.xref_dbname,
dbxref.xref_desc
FROM
gene_product
IN... |
<reponame>Zhaojia2019/cubrid-testcases
-- [er]create class using Constraints UNIQUE and Shared ordering
create table t1 (
id int ,
c1 int UNIQUE Shared 2
);
drop t1; |
<reponame>VictorGMBraga/clowdr
CREATE INDEX "room_Room_created_at" on
"room"."Room" using btree ("created_at");
|
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 02, 2019 at 01:30 PM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.3.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
-- phpMyAdmin SQL Dump
-- version 4.9.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jul 06, 2020 at 08:33 PM
-- Server version: 10.3.23-MariaDB-cll-lve
-- PHP Version: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!4... |
CREATE SCHEMA P0;
GO
--creating tables
CREATE TABLE P0.Customer
(
ID INT IDENTITY NOT NULL,
FirstName NVARCHAR(128) NOT NULL,
LastName NVARCHAR(128) NOT NULL,
CONSTRAINT PK_Customer_ID PRIMARY KEY (ID)
)
CREATE TABLE P0.StoreLocation
(
ID INT IDENTITY NOT NULL,
LocationName NVARCHAR(128) NOT NULL,
CONSTRAINT PK_... |
select count (*) from (
select docid from frequency where term="transactions"
intersect
select docid from frequency where term="world"
);
|
<gh_stars>0
/*
SQLyog Ultimate v8.8
MySQL - 5.7.26 : Database - gebang
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN... |
Create database file_uploader;
USE file_uploader;
CREATE TABLE IF NOT EXISTS
`file_uploader`.`files` (
`id` INT NOT NULL AUTO_INCREMENT ,
`name` VARCHAR(512) NOT NULL ,
`size` INT NOT NULL ,
`type` VARCHAR(512) NOT NULL ,
`ext` VARCHAR(512) NOT NULL ,
`path` ... |
<reponame>mcknz/sql-tdd
if db_id('Food_And_Stuff') is not null
begin
alter database Food_And_Stuff set single_user with rollback immediate
drop database Food_And_Stuff
end
create database Food_And_Stuff |
<gh_stars>0
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: localhost Database: notes
-- ------------------------------------------------------
-- Server version 5.7.20-0ubuntu0.16.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CH... |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 25-Jun-2019 às 16:18
-- Versão do servidor: 10.3.16-MariaDB
-- versão do PHP: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET... |
<filename>spkfu.sql
-- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 02 Apr 2020 pada 06.06
-- Versi server: 10.4.8-MariaDB
-- Versi PHP: 7.3.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!... |
insert into word_tbl(id, word, lang_id, pos_id)
values (nextval('pk_sequence'),'1', 10000, 1001),
(nextval('pk_sequence'),'2', 10000, 1001),
(nextval('pk_sequence'),'3', 10000, 1001),
(nextval('pk_sequence'),'4', 10000, 1001),
(nextval('pk_sequence'),'5', 10000, 1001),
(nextval('pk_se... |
update eg_wf_matrix set validactions='Forward' where validactions='Generate Work Order' and
objecttype='SewerageApplicationDetails' and additionalrule='NEWSEWERAGECONNECTION';
|
<reponame>navikt/tiltaksgjennomforing-backend
alter table dvh_melding add column sendt boolean not null default false; |
/******************************************************************************
* (Exercise 4) Warfarin New Users 65 or Older at Index With Prior AFIB
******************************************************************************/
WITH CTE_DRUG_INDEX AS (
SELECT de.PERSON_ID, MIN(de.DRUG_EXPOSURE_START_DATE) AS IND... |
<reponame>YiqinXiong/HUST-Database-Lab
SELECT DISTINCT tr.PCardID,PName,Sex,Age
FROM TakeTrainRecord tr,TrainPass tp,Passenger p,Station s
WHERE tr.TID = tp.TID
AND tr.AStationID = tp.SID
AND tr.AStationID = s.SID
AND tr.PCardID = p.PCardID
AND SStatus = 1
AND CityName = '武汉'
AND DATEPART(YYYY,tp.ATime) = '2020'
AND DA... |
<filename>src/main/resources/db/migration/postgres/V201810271200__alterMovieList.sql<gh_stars>10-100
-- ALTER TABLE movie_list ADD COLUMN IF NOT EXISTS update_time TIMESTAMP DEFAULT now();
-- ALTER TABLE movie_list ADD COLUMN IF NOT EXISTS movie_type TEXT DEFAULT 'NORMAL';
delete from public.movie_list where id not in... |
<filename>backend/de.metas.acct.base/src/main/sql/postgresql/system/43-de.metas.acct/5515220_cli_gh478_disable_not_supported_CostingElements.sql<gh_stars>1000+
create table backup.M_CostElement_BKP20190306 as select * from M_CostElement;
update M_CostElement set IsActive='N' where CostingMethod not in ('S', 'A');
/*
... |
<filename>db/patches/1120_schema_doc.sql
comment on column image.position is '';
comment on column image.title is '';
comment on column image.description is '';
comment on column image.attributes is '';
comment on column image.time_start is '';
comment on column image.time_end is '';
comment o... |
<reponame>Jorengarenar/homework
-- Clients without orders yet | using `NOT` and `EXISTS`
SELECT * FROM Customers
WHERE NOT EXISTS (SELECT NULL FROM Orders
WHERE Orders.CustomerID = Customers.CustomerID);
|
<reponame>majia2968/Mental-Health-eScreening
INSERT INTO assessment_variable_type (assessment_variable_type_id, name, description)
VALUES ('5', 'Operator', 'Formula Operator Such as +,-,/,* etc');
INSERT INTO assessment_variable (assessment_variable_id, assessment_variable_type_id, display_name, description)
VALUES (7... |
CREATE TABLE OPENBILL_CATEGORIES (
id bigserial PRIMARY KEY,
name character varying(256) not null
);
COMMENT ON TABLE OPENBILL_CATEGORIES IS 'Account category. A convenient way to group accounts, for example: user accounts and system accounts, and also restrict transa... |
<filename>sql/kafka_avro.sql
-- Test how extension deserializes some AVRO types
-- This test REQUIRES a running Kafka instance. See 'kafka_test' directory for
-- instructions on how to setup one
-- start_matchignore
-- m/^NOTICE: Kafka-ADB: Offset for partition [0-9]* is not known, and is set to default value [0-9]*$... |
<reponame>molinsp/course-dbt-pere
{% snapshot stg_users_snapshot %}
{{
config(
target_schema='snapshots',
unique_key='id',
strategy='timestamp',
updated_at='updated_at'
)
}}
SELECT *
FROM {{ ref('stg_users') }}
{% endsnapshot %} |
/**
* <feature scope="SanteDB.Persistence.Data.ADO" id="20171123-01" name="Update:20171123-01" applyRange="0.9.0.0-0.9.0.11" invariantName="npgsql">
* <summary>Update: Add entity relationship validation for providers and state/county</summary>
* <remarks></remarks>
* <isInstalled>select ck_patch('20171123-01')</... |
-- Replace colon ":" with hyphen "-" for fund codes in fund distributions
UPDATE ${myuniversity}_${mymodule}.po_line
SET jsonb =
(
-- Update each fundDistribution element
SELECT jsonb_set(jsonb, '{fundDistribution}', jsonb_agg(
distrib || jsonb_build_object('code', replace(distrib ->> 'code', ':', '-... |
<gh_stars>10-100
ALTER TABLE /*_*/job
ADD COLUMN job_attempts integer unsigned NOT NULL default 0;
CREATE INDEX /*i*/job_cmd_token_id ON /*_*/job (job_cmd,job_token,job_id);
|
<filename>src/it/oracle-08/verify/service/install_object_0_schema_5_TYPE_BODY.sql
set define '&'
prompt Execute /database/schema/type_bodies/dummy_type_body_a.sql
@./database/schema/type_bodies/dummy_type_body_a.sql
prompt Execute /database/schema/type_bodies/dummy_type_body_b.sql
@./database/schema/type_bodies/dummy_t... |
-- Tags: no-s3-storage
-- FIXME this test fails with S3 due to a bug in DiskCacheWrapper
drop table if exists txn_counters;
create table txn_counters (n Int64, creation_tid DEFAULT transactionID()) engine=MergeTree order by n;
insert into txn_counters(n) values (1);
select transactionID();
-- stop background cleanup... |
-- // BUG-112148 Create DB schema for Environment
-- Migration SQL that makes the change goes here.
CREATE TABLE IF NOT EXISTS environment (
id bigserial NOT NULL,
name character varying(255) NOT NULL,
description text,
cloudplatform character varying(255) NOT NULL,
credential_id bigint NOT NULL,
... |
<filename>test/sql/allow_camel_names.sql
begin;
comment on schema public is '@graphql({"inflect_names": false})';
create table "AccountHolder"(
"someId" int primary key,
"accountHolderId" int references "AccountHolder"("someId")
);
comment on table "AccountHolder" is e'@graphql({"total... |
<gh_stars>0
-- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
--
-- Copyright 2011 Oracle and/or its affiliates. All rights reserved.
--
-- Oracle and Java are registered trademarks of Oracle and/or its affiliates.
-- Other names may be trademarks of their respective owners.
--
-- The contents of this file ar... |
CREATE TABLE if not exists gems__consents (
gco_description varchar(20) not null,
gco_order smallint not null default 10,
gco_code varchar(20) not null default 'do not use',
gco_changed timestamp not null default current_timestamp on update current_timestamp,
gco_changed_by bigint... |
<filename>adega.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 16-Set-2021 às 02:45
-- Versão do servidor: 10.4.20-MariaDB
-- versão do PHP: 8.0.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!... |
<reponame>cscl-git/digit-bpa
CREATE TABLE EGF_SUBSCHEDULE
( ID bigint,
REPORTTYPE character varying(10),
SUBSCHEDULENAME character varying(100),
SUBSCHNAME character varying(10)
) ; |
SELECT ProductName, UnitPrice, QuantityPerUnit FROM Products WHERE UnitsInStock=0; |
/* @(#) sp_#count [objectname pattern] */
/* vim: set ts=2 sw=2 tw=0 et :*/
use sybsystemprocs
go
print 'Installing PROCEDURE: sp_#count'
go
create or replace proc sp_#count
as
/*
#----------------------------------------------------------------------
Author: <NAME>
#-------------------------------------------------... |
<filename>Epsilon/Epsilon.Database/Scripts/DevScripts/WifiDemoAppSettings.sql
-- !!! IMPORTANT!
-- Do not add this script to PostDeployment script!
-- Just use this directly from within SQL Management studio on your development database.
-- This is a script to use in development environment with settings for a dem... |
ALTER TABLE `mmi_cache` ADD COLUMN `ttl` integer,
ADD KEY (`ttl`);
|
<reponame>dzulfiardev/Student-Attendance-App-Codeigniter-4<filename>attendance_app.sql
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 02 Apr 2021 pada 04.43
-- Versi server: 10.1.35-MariaDB
-- Versi PHP: 7.2.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET... |
INSERT INTO [dbo].[Contact] ([Email], [Name], [PhoneNumber]) VALUES (
'<EMAIL>',
'<NAME>',
'555-123-0001'
);
INSERT INTO [dbo].[Contact] ([Email], [Name], [PhoneNumber]) VALUES (
'<EMAIL>',
'<NAME>',
'555-123-0002'
);
INSERT INTO [dbo].[Contact] ([Email], [Name], [PhoneNumber]) VALUES (
'... |
create schema auth
go
create function auth.role_exists(@role varchar(256))
returns bit as
begin
declare @exists bit = 0;
set @exists = coalesce(
(select 1 from sys.database_principals where name = @role), 0);
return @exists;
end;
go
create table auth.users (
email varchar(254) not null,
p... |
<reponame>mamonovd/apgdiff
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.5.2
-- Dumped by pg_dump version 9.5.2
-- Started on 2016-05-02 12:14:40 KRAT
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies =... |
-- 2017-12-06T00:00:40.813
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
DELETE FROM AD_Message_Trl WHERE AD_Message_ID=544591
;
-- 2017-12-06T00:00:40.841
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
DELETE FROM AD_Message WHERE AD_Message_ID=544591
;
-- 2017-12-06T00:01:02.... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: May 28, 2016 at 08:11 PM
-- Server version: 10.1.10-MariaDB
-- PHP Version: 5.6.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.