sql
stringlengths
6
1.05M
-- Databricks notebook source DROP TABLE IF EXISTS POPULATION_COUNT; CREATE TABLE IF NOT EXISTS POPULATION_COUNT AS ( SELECT COUNT(*) AS TOTAL FROM US_POPULATION) -- COMMAND ---------- DROP TABLE IF EXISTS FIRST_YEAR_POPULATION; CREATE TABLE IF NOT EXISTS FIRST_YEAR_POPULATION AS ( SELECT date as YEAR, value as...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.7.7 -- https://www.phpmyadmin.net/ -- -- Host: localhost:8889 -- Generation Time: May 10, 2019 at 09:59 PM -- Server version: 5.6.38 -- PHP Version: 7.2.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACT...
<filename>addressing_dictionary--1.1.sql -- complain if script is sourced in psql, rather than via CREATE EXTENSION \echo Use "CREATE EXTENSION addressing_dictionary" to load this file. \quit ------------------------------------------------------------ -- Read about how dictionaries should be ordered and what should g...
<gh_stars>0 CREATE TABLE EnhetFilter ( ENHET_FILTER_ID SERIAL, ENHET_ID VARCHAR(32), FOREIGN KEY (ENHET_FILTER_ID) REFERENCES Filter (FILTER_ID) );
-- ALTER DATABASE tcount CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin DROP TABLE IF EXISTS `User`; CREATE TABLE `User` ( `GroupMeUserID` int NOT NULL, `Name` varchar(255) NOT NULL, PRIMARY KEY (`GroupMeUserID`) ) ; ALTER TABLE `User` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; DROP TABLE IF EX...
<filename>packages/schema-builder/sql/10000/meta.create_version.function.sql CREATE OR REPLACE FUNCTION _meta.create_version() RETURNS trigger AS $$ // init plv8 require plv8.execute( 'SELECT _meta.plv8_require();' ); const jsonPatch = require('rfc6902'); const diff = jsonPatch.createPatch({}, NEW); const c...
<filename>conf/evolutions/default/66.sql<gh_stars>1-10 -- !Ups ALTER TABLE companies DROP IF EXISTS address_old_version; ALTER TABLE companies DROP IF EXISTS postal_code_old_version; ALTER TABLE companies DROP IF EXISTS department_old_version; ALTER TABLE companies DROP IF EXISTS done; ALTER TABLE reports DROP IF EXI...
CREATE OR REPLACE VIEW SalleIntermediaire (nSalle, typePoste, nombre, tarif) AS ( SELECT s.nSalle, p.typePoste, COUNT(p.nPoste) as nombre, t.tarif from Salle s, Poste p, types t where s.nSalle = p.nSalle AND t.typeLP = p.typePoste GROUP BY p.nSalle, typeLP, tarif ); select * from SalleIntermed...
-- Deploy tupa:user-push-token to pg BEGIN; ALTER TABLE "user" ADD COLUMN push_token TEXT; create unique index user_active_push_token ON "user"(push_token) WHERE push_token IS NOT NULL AND active IS TRUE; COMMIT;
<filename>src/test/resources/sql/select/94ca969f.sql -- file:line.sql ln:67 expect:true SELECT line '[(0,0),(1,1)]' ?# line '[(1,0),(1,1)]'
<gh_stars>10-100 # Write your MySQL query statement below SELECT tb1.Request_at as Day, Round(SUM(case when tb1.Status = 'completed' then 0 else 1 end)/count(*), 2) as 'Cancellation Rate' From Trips as tb1 inner join Users as tb2 on tb1.Client_Id = tb2.Users_Id and tb2.Banned = "No" inner join Users as tb3 on tb1.Drive...
-- -------------------------------------------------------- -- 主机: 127.0.0.1 -- 服务器版本: 5.7.27 - MySQL Community Server (GPL) -- 服务器OS: Win64 -- HeidiSQL 版本: 10.2.0.5599 -- -------------------------------------------------------- /...
<filename>src/EA.Weee.Database/scripts/Everytime/0007-InsertQuarterWindowTemplates.sql<gh_stars>1-10 GO PRINT N'Altering [Lookup].[QuarterWindowTemplate]...'; DECLARE @tblTempQuarterWindowTemplate TABLE ( Id UNIQUEIDENTIFIER NOT NULL, Quarter int NOT NULL, AddStartYears int NOT NULL, StartMonth int NOT NULL, S...
<reponame>everettttt/dbt_pendo_source select * from {{ var('guide_event') }}
CREATE TABLE [dbo].[Author] ( [AuthorId] [int] NOT NULL IDENTITY(1, 1), [Name] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ) ON [PRIMARY] GO ALTER TABLE [dbo].[Author] ADD CONSTRAINT [PK_Author] PRIMARY KEY CLUSTERED ([AuthorId]) ON [PRIMARY] GO
<reponame>gilangsuleman/Scheduler insert into prodi(id,nama,singkatan,ketua) values ('abc','Teknik Informatika','TI','Ismail Mohidin');
CREATE OR REPLACE VIEW gv_taxon_groups_taxon_lists AS SELECT tgtl.id, tg.id as taxon_group_id, tg.title, tgtl.taxon_list_id FROM taxon_groups_taxon_lists tgtl JOIN taxon_groups tg ON tg.id=tgtl.taxon_group_id AND tg.deleted=false AND tgtl.deleted=false;
<reponame>gxwebsoft/webshop<filename>doc/database/upgrade/v1.1.41.sql ALTER TABLE `webshop_wxapp_live_room` ADD COLUMN `id` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键id' FIRST , DROP PRIMARY KEY, ADD PRIMARY KEY (`id`), ADD INDEX `room_id` (`room_id`), AUTO_INCREMENT=10001;
select printf('%.2f', double_6) as double_6 from nulls where double_6 > 98 99.00
/* Navicat Premium Data Transfer Source Server : 本地数据库 Source Server Type : MySQL Source Server Version : 80012 Source Host : 127.0.0.1:3306 Source Schema : cms Target Server Type : MySQL Target Server Version : 80012 File Encoding : 65001 Date: 30/12/20...
<filename>fixtures/doctests/backup/000/input.sql<gh_stars>0 psql --set ON_ERROR_STOP=on dbname < dumpfile
<filename>database/postgresql/src/main/resources/com/intel/mtwilson/database/postgresql/20120328172802_patch-ta_db-0.5-to-0.5.1.sql<gh_stars>10-100 -- created 2012-03-28 CREATE TABLE changelog ( ID decimal(20,0) NOT NULL, APPLIED_AT varchar(25) NOT NULL, DESCRIPTION varchar(255) NOT NULL, PRIMARY KEY (ID) ); I...
<filename>dhis-2/dhis-support/dhis-support-db-migration/src/main/resources/org/hisp/dhis/db/migration/2.37/V2_37_4__Update_ou_path_index.sql drop index if exists in_organisationunit_path; create index if not exists in_organisationunit_path on organisationunit using btree(path varchar_pattern_ops);
<reponame>dyre07/KingKong -- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 25, 2017 at 05:18 PM -- Server version: 10.1.21-MariaDB -- PHP Version: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER...
begin commit begin create (_0:`Person` {`name`:"Alice"}) create (_1:`Person` {`name`:"Bob"}) create (_2:`Person` {`name`:"Charlie"}) create (_3:`Employee` {`name`:"Driver"}) create (_4:`Employee` {`name`:"Mechanic"}) create (_5:`Employee` {`name`:"Inspector"}) create (_6:`Train` {`name`:"Express train"}) create (_7:`Tr...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Oct 24, 2016 at 07:31 AM -- Server version: 10.1.9-MariaDB -- PHP Version: 5.6.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA...
<filename>sql/01/03_insert.sql INSERT INTO hoge (name) VALUES ('my_name');
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1:3306 -- Время создания: Июл 02 2021 г., 18:36 -- Версия сервера: 10.3.22-MariaDB -- Версия PHP: 7.4.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
<filename>src/exercicies/reset.sql select * from tb_courses; select * from tb_instructors; select * from tb_requests; select * from tb_requests_details; select * from tb_students; select * from tb_types_courses; show tables; drop table tb_requests_details; drop table tb_courses; drop table tb_instructors; dro...
INSERT INTO requests VALUES ( null, 'Prestamo', 500000, '2021-10-12 23:03:26', '2021-10-12 23:03:26' ), ( null, 'Permiso', 1008000, '2021-10-12 23:03:26', '2021-10-12 23:03:26' ), ( null, 'Prestamo', 8990000, '2021-10-12 23:03:26', '2021-10-12 23:03:26' ), ( null, 'Prestamo', 55465600, '2021-10-12 23:03:26', '2021-10-...
CREATE DATABASE `engage` /*!40100 DEFAULT CHARACTER SET latin1 */; CREATE TABLE `users` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(100) NOT NULL, `email` varchar(100) NOT NULL, `phone` varchar(25) DEFAULT NULL, `birth` date NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `Unique` (`email`) ) ENGINE=...
CREATE TABLE [dbo].[GetPlayerStatisticsDto] ( [DtoId] UNIQUEIDENTIFIER NOT NULL PRIMARY KEY, [PlayerName] VARCHAR(MAX) NOT NULL, [GamesPlayed] INT NOT NULL, [Winnings] INT NOT NULL, [PayIn] INT NOT NULL, [Profit] INT NOT NULL, [ProfitPerGame] FLOAT NOT NULL )
INSERT Items(ID,Titel,Categorie,Postcode,Locatie,Land,Verkoper,Prijs,Valuta,Conditie,Thumbnail,Beschrijving) VALUES (120889939328,'MÄRKLIN MODELISME - 3 x DIVERSE HUISJES/MAISON DIVERS MARKLIN (K5-378°',30675,'2900','België','BE','mrailtrainshop','9.0','EUR','Tweedehands','img120889939328.jpg','<font face="Arial" size=...
create or replace package rsa_utils_pkg as -- -- function check_prime (p_num in number) return boolean; -- -- function find_d (p_e in number, p_z in number) return number; -- -- function find_e (p_z in number) return number; -- -- function find_gcd (p_n1 IN POSITIVE, p_n2...
DROP TABLE IF EXISTS scenarios;
/* SQLyog Community v9.63 MySQL - 5.5.16 : Database - tutor ********************************************************************* */ /*!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...
<reponame>cyberark/identity-demo-angular<filename>spring-boot/src/main/resources/schema.sql CREATE TABLE `dbuser` ( `id` int AUTO_INCREMENT PRIMARY KEY, `display_name` VARCHAR(32) DEFAULT NULL, `mail` VARCHAR(64) DEFAULT NULL, `mobile_number` VARCHAR(15) DEFAULT NULL, `name` VARCHAR(32) DEFAULT NULL, `passw...
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'aspnet_Membership_BasicAccess' AND type = 'R') CREATE ROLE [aspnet_Membership_BasicAccess] AUTHORIZATION [dbo] IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'aspnet_Membership_FullAccess' AND type = 'R') CREATE ROLE [aspnet_Members...
<reponame>alexvas/contra_cqrs --liquibase formatted sql --changeset aavasiljev:4 CREATE TABLE shows ( id SERIAL NOT NULL PRIMARY KEY, start TIMESTAMP NOT NULL, hall_id INT NOT NULL CONSTRAINT show_hall_ref REFERENCES hall DEFERRABLE, movie_id INT NOT NULL CONSTRAINT show_mov...
Rem Rem Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. Rem Rem Licensed under the Apache License, Version 2.0 (the "License"); Rem you may not use this file except in compliance with the License. Rem You may obtain a copy of the License at Rem Rem http://www.apache.org/licenses/LIC...
-- -- JBoss, Home of Professional Open Source -- Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual -- contributors by the @authors tag. See the copyright.txt in the -- distribution for a full listing of individual contributors. -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- y...
<filename>master/static/migrations/20200601100734_add-checkpoints-metadata.tx.down.sql ALTER TABLE public.checkpoints RENAME COLUMN metadata TO labels;;
ALTER TABLE `mkt_feed_app` DROP COLUMN `has_image`;
CREATE TABLE emp ( empname text, salary integer, last_date timestamp, last_user text ); CREATE FUNCTION emp_stamp() RETURNS trigger AS $emp_stamp$ BEGIN -- Check that empname and salary are given IF NEW.empname IS NULL THEN RAISE EXCEPTION 'empname cannot be null'; ...
<gh_stars>100-1000 create schema hll_func; set current_schema = hll_func; create table hll_func_test(id int); create table hll_func_test1(id int); insert into hll_func_test values (generate_series(1,5)); insert into hll_func_test1 values (generate_series(1,500)); --------------CONTENTS-------------------- -- hyperlog...
<reponame>BryceStPierre/ActivityAnalysis CREATE TABLE [Source].[NetflixViewingHistory] ( [Title] VARCHAR(150) NULL, [Date] DATETIME NULL )
<reponame>NiveenAlSmadi/Jops-App DROP TABLE jobs ; CREATE TABLE IF NOT EXISTS jobs( id SERIAL PRIMARY KEY , title VARCHAR(256) , company VARCHAR(256) , location VARCHAR(256) , url VARCHAR(256) , description text );
<filename>sql/yjbb/603757.sql EXEC [EST].[Proc_yjbb_Ins] @Code = N'603757',@CutoffDate = N'2017-09-30',@EPS = N'1.84',@EPSDeduct = N'0',@Revenue = N'7.72亿',@RevenueYoy = N'37.80',@RevenueQoq = N'16.88',@Profit = N'1.24亿',@ProfitYoy = N'28.92',@ProfiltQoq = N'30.28',@NAVPerUnit = N'10.0172',@ROE = N'27.04',@CashPerUnit ...
create cached table T_METADATA ( MET_ID_C varchar(36) not null, MET_NAME_C varchar(50) not null, MET_TYPE_C varchar(20) not null, MET_DELETEDATE_D datetime, primary key (MET_ID_C) ); create cached table T_DOCUMENT_METADATA ( DME_ID_C varchar(36) not null, DME_IDDOCUMENT_C varchar(36) not null, DME_IDMETADATA_C varchar(...
CREATE FUNCTION New_UnitType(UnitType text) RETURNS integer LANGUAGE sql SET search_path TO ccms, public AS $$ INSERT INTO UnitTypes (UnitType) VALUES (UnitType) RETURNING UnitTypeID $$;
<reponame>TheScorpoi/BD_Project USE p5g8 GO CREATE FUNCTION WineDB.checkIfNIFExists (@NIF INT) RETURNS INT AS BEGIN DECLARE @counter INT SELECT @counter=COUNT(1) FROM WineDB.Pessoa WHERE NIF=@NIF RETURN @counter END GO CREATE FUNCTION WineDB.checkIfNum_FuncExists (@Num_Func INT) RETURNS INT AS BEGIN DECLAR...
<reponame>allanlimo02/News-Portal SET MODE PostgreSQL; --CREATE DATABASE ALIAS news_portal; --\c news_portal; CREATE TABLE IF NOT EXISTS departments ( id int PRIMARY KEY auto_increment, department_name VARCHAR ); CREATE TABLE IF NOT EXISTS users (id int PRIMARY KEY auto_increment, username VARCHAR, depa...
<gh_stars>0 INSERT INTO `countries` (`name`, `iso_code_2`, `iso_code_3`, `isd_code`, `created_by`, `updated_by`) VALUES ('Afghanistan', 'AF', 'AFG', '93', 1, NULL), ('Albania', 'AL', 'ALB', '355', 1, NULL), ('Algeria', 'DZ', 'DZA', '213', 1, NULL), ('American Samoa', 'AS', 'ASM', '1684', 1, NULL), ('Andorra', 'AD', 'AN...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Waktu pembuatan: 05 Jan 2022 pada 06.47 -- Versi server: 10.4.13-MariaDB -- Versi PHP: 7.4.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH...
-- Sweet script from Stephen to wrangle and export some data as csv from a local db drop function if exists create_property_id(home_name varchar); drop table if exists tmp_properties; drop table if exists tmp_spaces; create function create_property_id(home_name varchar) returns varchar language plpgsql as $$ b...
INSERT INTO products.category(id, nome) VALUES(1, 'Eletrônico'); INSERT INTO products.category(id, nome) VALUES(2, 'Móveis'); INSERT INTO products.category(id, nome) VALUES(3, 'Brinquedos');
prompt --application/shared_components/user_interface/templates/list/wizard_progress begin -- Manifest -- REGION TEMPLATE: WIZARD_PROGRESS -- Manifest End wwv_flow_api.component_begin ( p_version_yyyy_mm_dd=>'2021.10.15' ,p_release=>'21.2.6' ,p_default_workspace_id=>18303204396897713 ,p_default_application_id=...
<filename>wiki2/maintenance/oracle/archives/patch-change_tag-change_tag_rc_tag_id.sql<gh_stars>1-10 -- T193874: Add new indexes to change_tag table using ct_tag_id instead of ct_tag define mw_prefix='{$wgDBprefix}'; CREATE UNIQUE INDEX &mw_prefix.change_tag_u04 ON &mw_prefix.change_tag (ct_rc_id,ct_tag_id); CREATE UN...
<reponame>GhostDovahkiin/SisMoney CREATE TABLE category( id IDENTITY NOT NULL PRIMARY KEY, category_name VARCHAR NOT NULL); INSERT INTO category(category_name) VALUES('Netflix'); INSERT INTO category(category_name) VALUES('Amazon');
/****** Object: View [dbo].[uvw_Test2] Committed by VersionSQL https://www.versionsql.com ******/ CREATE VIEW dbo.uvw_Test2 WITH SCHEMABINDING AS -- View (indexed or standard) to display products and product descriptions by language. SELECT p.[Name] ,pm.[Name] AS [ProductModel] ,pmx.[CultureID] ...
<filename>src/plsql/flow_constants_pkg.pks create or replace package flow_constants_pkg authid definer as gc_version constant varchar2(10 char) := '21.1.0'; gc_vcbool_true constant varchar2(10 char) := 'true'; gc_vcbool_false constant varchar2(10 char) := 'false'; gc_numbool_true constant number ...
-- spell_script_names -- By Mikadmin <NAME> -- Fix error consol : Scriptname:`xxxxxx` spell (spell_id:xxxxxx) does not exist in `Spell.dbc`. DELETE FROM `spell_script_names` WHERE `spell_id` IN (5698, 58630, 59046, 59450, 64899, 64985, 65074, 65195, 68184, 68572, 68574);
---------------------------------------------------------------------------- -- $Id: lgs.sql 21 2009-09-16 09:11:28Z soe $ ---------------------------------------------------------------------------- -- Trivadis AG, Infrastructure Managed Services -- Saegereistrasse 29, 8152 Glattbrugg, Switzerland ---------...
<reponame>subkanthi/ClickHouse<filename>tests/queries/0_stateless/02316_cast_to_ip_address_default_column.sql SET cast_ipv4_ipv6_default_on_conversion_error = 1; DROP TABLE IF EXISTS ipv4_test; CREATE TABLE ipv4_test ( id UInt64, value String ) ENGINE=MergeTree ORDER BY id; ALTER TABLE ipv4_test MODIFY COLUMN...
<reponame>Datasilk/Saber-Collector IF EXISTS (SELECT * FROM sys.objects WHERE type = 'P' AND name = 'ArticleWords_Remove') DROP PROCEDURE [dbo].[ArticleWords_Remove] GO CREATE PROCEDURE [dbo].[ArticleWords_Remove] @articleId int = 0, @word nvarchar(50) = '' AS IF @word = '' BEGIN DELETE FROM ArticleWords WHERE a...
<gh_stars>1-10 create or replace package math_util_pkg as /* Purpose: Package handles general math functionality Remarks: Who Date Description ------ ---------- ------------------------------------- MBR 22.09.2006 Created */ -- safe division by zero function safedi...
<gh_stars>1-10 /****** Object: View [dbo].[V_PDE_Filter_Criteria_Tmp] ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE VIEW dbo.V_PDE_Filter_Criteria_Tmp AS SELECT dbo.T_Filter_Set_Criteria_Names.Criterion_Name, dbo.T_Filter_Set_Criteria.Criterion_Comparison, dbo.T_Filter_Set_Criteria.Criteri...
<gh_stars>1-10 create table test_table ( id bigint not null primary key auto_increment, description varchar(256) default null );
alter table passcode_record add column test_event_id int references test_event on delete cascade; alter table passcode_record alter column user_id drop not null; alter table passcode_record alter column type drop not null;
source db/create_db.sql; source db/create_procedure.sql; source db/create_procedure_outdated.sql;
--# Copyright IBM Corp. All Rights Reserved. --# SPDX-License-Identifier: Apache-2.0 /* * Shows the size of each data slice . Use to check for overall system data Skew */ CREATE OR REPLACE VIEW DB_MEMBER_QUICK_SIZE AS SELECT T.MEMBER , DECIMAL(ROUND(T.TBSP_USED_KB / (1024 * 1024.0),3),17,3) AS USED_GB , ...
SELECT CASE WHEN my_col IS NOT NULL THEN 'Y' ELSE 'N' END AS my_new_col, CASE WHEN TRIM(my_other_col) = 'confirmed' THEN 'Y' ELSE 'N' END AS new_col FROM my_table; SELECT DISTINCT ON (a, b) a, b, c FROM d ORDER BY a, b, c; SELECT ...
-- start_ignore drop resource group rg1; drop resource group rg2; \! gpconfig -c gp_resource_manager -v queue -- end_ignore \! echo $? -- start_ignore \! gpstop -rai -- end_ignore \! echo $?
<reponame>redmic-project/device-oag-buoy-buoy-client<gh_stars>0 DROP TABLE IF EXISTS acmplus; CREATE TABLE acmplus ( id BIGSERIAL PRIMARY KEY, date TIMESTAMP WITH TIME ZONE NOT NULL, vx double precision, vy double precision, speed double precision, direction double precision, water_temp dou...
-- put your custom update commands here
--VISTA EN DONDE SE MUESTRAN SOLO LOS REGISTROS ACTIVOS DE LA TABLA "MATRICULA" CREATE VIEW vw_Matricula_SeleccionarActivos AS SELECT * FROM Matricula WHERE Activo = 1
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 1192.168.127.12 -- Generation Time: Mar 16, 2020 at 06:09 PM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.2.28 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 S...
# Write your MySQL query statement below select distinct p1.Email from Person p1 inner join Person p2 on p1.Email = p2.Email where p1.Id != p2.Id
-- @BeeOverwrite YES -- @BeeGenerateTime 20200820_230345 CREATE TABLE pms( `id` int(11) NOT NULL AUTO_INCREMENT, `app_id` int(11) NOT NULL, `pid` int(11) NOT NULL, `name` varchar(255) N...
-- APPEND A SINGLE DOCUMENT WITH A RANDOM GENERATED SUBJECT -- DEPENDS ON uuid-ossp EXTENSION -- CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; DROP FUNCTION IF EXISTS fetchq.doc_append(CHARACTER VARYING, JSONB, INTEGER, INTEGER); CREATE OR REPLACE FUNCTION fetchq.doc_append( PAR_queue VARCHAR, PAR_payload JSONB,...
<gh_stars>10-100 CREATE OR REPLACE PROCEDURE NCAOWII.SP_COPY_D(P_TABLE varchar2) IS v_strsql VARCHAR2(400); v_code NUMBER; v_errm varchar2(1024); v_IS_EXIST number := 0; BEGIN --every Saturday ,if P_TABLE is new table,then add record msg into table_control ---by ZhangWJ 2012-02-06 IF TO_CHAR(SYSDATE+0....
-- file:insert.sql ln:276 expect:true drop table mlparted5
-- file:triggers.sql ln:1246 expect:false elsif (TG_OP = 'INSERT') then raise warning 'before insert (new): %', new.*::text
ALTER TABLE [dbo].[SimpleTranslation] ADD CONSTRAINT [CHK_SimpleTranslation_OnlyOneParent] CHECK (((((((((((((case when [CategoryID] IS NULL then (0) else (1) end+case when [KeywordID] IS NULL then (0) else (1) end)+case when [ProductID] IS NULL then (0) else (1) end)+case when [CompanyID] IS NULL then (0) else (...
\c stock_db CREATE OR REPLACE FUNCTION FN_GET_WORKER_BY_ID(worker_id int4) RETURNS TABLE (name text, surname text, birthdate TIMESTAMP, privilege_level int4) AS $$ BEGIN RETURN QUERY SELECT w.name, w.surname, w.birthdate, w.privilege_level FROM t_workers w WHERE w.pk = worker_id; END $$ LAN...
# ************************************************************ # Sequel Pro SQL dump # Version 4541 # # http://www.sequelpro.com/ # https://github.com/sequelpro/sequelpro # # Host: localhost (MySQL 5.7.19) # Database: ee-rspec # Generation Time: 2017-09-18 18:16:40 +0000 # **********************************************...
<reponame>bartekus/reactuate-app drop function app_private.register_user( f_service character varying, f_identifier character varying, f_profile json, f_auth_details json, f_email_is_verified boolean );
select forks = 0 as no_forks, watchers = 0 as no_watchers, open_issues = 0 as no_open_issues, count(*) as cnt from gha_forkees group by no_forks, no_watchers, no_open_issues order by cnt desc;
-- Based on the information in the below csv files. -- mwm_tess_ob_8x1_GaiaID.csv mwm_tess_ob_8x3_GaiaID.csv create table catalogdb.mwm_tess_ob ( gaia_dr2_id bigint, ra double precision, dec double precision, h_mag double precision, instrument varchar, cadence varchar );
ALTER TABLE per_0_tm ADD COLUMN review_start TIMESTAMP; ALTER TABLE per_0_tm ADD COLUMN review_end TIMESTAMP; ALTER TABLE per_0_tm ADD COLUMN is_reviewed BOOLEAN DEFAULT FALSE; INSERT INTO uncategorized_post(post_type, content) VALUES ('mukadimah_program_prepare', 'Bagian ini berisi penjelasan mengenai Progr...
create or replace package body flow_diagram as function create_diagram( pi_dgrm_name in flow_diagrams.dgrm_name%type, pi_dgrm_category in flow_diagrams.dgrm_category%type, pi_dgrm_version in flow_diagrams.dgrm_version%type) return flow_diagrams.dgrm_id%type as l_diagram_exists binary_integer; ...
create table [Explored] ( [entry] nvarchar(127) not null primary key, [displayText] nvarchar(127), qualityScore decimal(3, 2), obscurityScore decimal(3, 2), breakfastTestFailure tinyint not null default 0, [length] int, col1 char(1), col2 char(1), col3 char(1), col4 char(1), col5 char(1)...
<filename>BackOffice.EventProviders.SqlEventProvider/SqlScripts/Messages/ProductChanged_Msg.sql CREATE MESSAGE TYPE ProductChanged_Msg VALIDATION = WELL_FORMED_XML
USE SQLDBATools go -- Distinct Errors select distinct Cmdlet from [Staging].[CollectionErrors] as e with(nolock) -- Server not Reachable select 'Server Unreachable' as Category, * from [Staging].[CollectionErrors] as e with(nolock) where e.Command like '%Test-Connection%' -- Server not Reachable select 'PSRemoting (...
<filename>docker-compose/mysql/init_db.sql DROP SCHEMA zonnepanelen; CREATE SCHEMA zonnepanelen; CREATE TABLE `extras` ( `id` bigint(20) UNSIGNED NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -...
DROP TABLE IF EXISTS `ARTICLES`; CREATE TABLE IF NOT EXISTS ARTICLES ( id INT AUTO_INCREMENT NOT NULL PRIMARY KEY, heading TEXT, author VARCHAR(50), body TEXT, description TEXT, thumbnail VARCHAR(50), created_at DATETIME ); insert into ARTICLES (id, heading, description, thumbnail, body, author, created_at) val...
-- eje 3.13 select distinct x.nompro,y.nompro from opc.proveedor x, opc.proveedor y --select x.nompro, y.nompro from opc.proveedor x, opc.proveedor y --where (not (x.codpro = y.codpro)) and (not (x.ciudad = y.ciudad)) where x.codpro != y.codpro and x.ciudad != y.ciudad; --describe opc.proveedor; -- selecc...
create schema [NYC] go create table [NYC].[NYPD_MotorVehicleCollisions]( [UniqueKey] [int] NULL, [CollisionDate] [date] NULL, [CollisionDayOfWeek] [varchar](9) NULL, [CollisionTime] [time](7) NULL, [CollisionTimeAMPM] [varchar](2) NOT NULL, [CollisionTimeBin] [varchar](11) NULL, [Borough] [varchar](200) NULL, ...
/* Lab 8 - Dimensional Model and ETL Student name: <NAME> Student number: C16434996 Description: Using create table statement to create staging and dimension tables by using multiple sequences to hold the count for surrogate keys in staging tables construct procedures for loadi...
/* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. */ /****************************************************************************** * * You may not use the identified files except in compliance with the Apache * License, Version 2.0 (the "License.") * * You may obtain a copy ...