sql
stringlengths
6
1.05M
-- -- Deletes a movie. -- -- PARAMS: -- id - The ID of the item to remove. -- -- RETURNS: None. -- CREATE PROCEDURE [dbo].[DeleteMovie] @id INT AS BEGIN SET NOCOUNT ON; DELETE FROM Movies WHERE Id = @id END
<gh_stars>10-100 -- file:hs_primary_setup.sql ln:25 expect:true SELECT pg_switch_wal()
-- -- -- DELIMITER $$ DROP PROCEDURE IF EXISTS _split_cleanup_dependency_tables $$ CREATE PROCEDURE _split_cleanup_dependency_tables() MODIFIES SQL DATA SQL SECURITY INVOKER COMMENT 'drop temporary tables' begin drop temporary table if exists _split_unique_key_columns; drop temporary table if exists _split_i...
select '<a href="'||apex_util.get_blob_file_src('P10023_ATTACHMENT',id)||'">'||filename||'</a>' from apex$team_dev_files where component_id = :P10024_ID and component_type = 'FEEDBACK'
<gh_stars>0 CREATE OR REPLACE STREAM item_rules ( source_item VARCHAR KEY, x INT, y INT, generates_item VARCHAR, description VARCHAR ) WITH ( KAFKA_TOPIC = 'item_rules', VALUE_FORMAT = 'AVRO', VALUE_AVRO_SCHEMA_FULL_NAME='io.confluent.developer.adventure.ItemRulesValue', PARTITIONS = 1 );
<filename>graph_algorithms/sql/v1_desperated/components.sql CREATE OR REPLACE FUNCTION scc_bfs_from( IN vertex_id INTEGER ) RETURNS VOID AS $$ DECLARE num_growing_path INTEGER; BEGIN -- init bfs edges table INSERT INTO bfs_edges SELECT vertex_id, edges.dst_id, 0 AS flag FROM edges WHERE edges.s...
<filename>dockertests/master-schema.sql -- Copyright 2017 Google Inc. -- -- 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 re...
<gh_stars>10-100 -- -- Copyright 2014-2016 <NAME>, <NAME> -- -- 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 app...
-- ---------------------------- -- Table structure for sms_flash_promotion_product_relation -- ---------------------------- DROP TABLE IF EXISTS `sms_flash_promotion_product_relation`;
select s_acctbal, s_name, n_name, p_partkey, p_mfgr, s_address, s_phone, s_comment from part, supplier, partsupp, nation, region where p_partkey = ps_partkey and s_suppkey = ps_suppkey and p_size = 15 and p_type like '%BRASS' and s_nationkey = n_nationkey and n_regionkey = r_region...
<filename>db/migrations/postgres/000051_create_msg_root_count.down.sql ALTER TABLE channelmembers DROP COLUMN IF EXISTS msgcountroot; ALTER TABLE channelmembers DROP COLUMN IF EXISTS mentioncountroot; ALTER TABLE channels DROP COLUMN IF EXISTS totalmsgcountroot;
<reponame>hbuiOnline/Software-design-project -- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Jul 11, 2020 at 07:24 PM -- Server version: 8.0.13-4 -- PHP Version: 7.2.24-0ubuntu0.18.04.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TR...
<filename>DataLayer/Scripts/TRUNCATE TABLE.sql use [explorer] go truncate table [dbo].[ExplorerTasks] truncate table [dbo].[ExplorerTasksLog] truncate table [dbo].[ExplorerObjectsParental] truncate table [dbo].[ExplorerObjects]
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 1172.16.31.10 -- Waktu pembuatan: 11 Agu 2020 pada 02.44 -- Versi server: 10.4.13-MariaDB -- Versi PHP: 7.4.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=...
-- phpMyAdmin SQL Dump -- version 4.9.7 -- https://www.phpmyadmin.net/ -- -- Host: localhost:8889 -- Generation Time: Aug 04, 2021 at 02:15 PM -- Server version: 5.7.32 -- PHP Version: 7.4.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Database: `iziprint` -- -- --------------------------...
<reponame>nmbazima/TSQLBeginners<filename>12_CTEsSubqueriesDerivedTables_Solutions.sql /****************************************************************************** Course videos: https://www.red-gate.com/hub/university/courses/t-sql/tsql-for-beginners Course scripts: https://litknd.github.io/TSQLBeginners CTE...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 1172.16.31.10 -- Generation Time: Jul 23, 2021 at 07:47 PM -- Server version: 10.4.13-MariaDB -- PHP Version: 7.3.27 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_...
-- mysqldump-php https://github.com/ifsnop/mysqldump-php -- -- Host: localhost Database: citlab -- ------------------------------------------------------ -- Server version 5.7.24-log -- Date: Fri, 04 Dec 2020 10:57:05 +0000 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 28 Nov 2014 pada 18.22 -- Versi Server: 5.6.17 -- PHP Version: 5.5.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL...
<reponame>knu-3-velychko/OOP-2sem<gh_stars>0 SELECT *, COUNT(satelites.id) AS satelites_count FROM planets LEFT JOIN satelites ON planets.id = satelites.planet_id GROUP BY planets.id, satelites.id ORDER BY planets.radius, satelites_count DESC LIMIT 1;
<reponame>ederjulianA/ilovato -- phpMyAdmin SQL Dump -- version 4.0.10deb1 -- http://www.phpmyadmin.net -- -- Servidor: localhost -- Tiempo de generación: 24-11-2014 a las 01:02:33 -- Versión del servidor: 5.5.40-0ubuntu0.14.04.1 -- Versión de PHP: 5.5.9-1ubuntu4.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone...
<filename>Project/Aurum.TestDB/dbo/Customer.sql CREATE TABLE [dbo].[Customer] ( [Id] INT NOT NULL PRIMARY KEY Identity, [Active] BIT NOT NULL DEFAULT 1, [FirstName] VARCHAR(100), [LastName] VARCHAR(100), [Notes] VARCHAR(MAX), [InsertDate] DateTime NOT NULL DEFAULT GETUTCDATE() )
define debug_group = &1 define iterations = 2 set feedback off begin dbms_session.reset_package; end; / begin dbms_output.enable; end; / set serveroutput on size unlimited set verify off set feedback on prompt prompt .. Joining debug group &&debug_group set feedback off begin debug_adm.debug_this(&&debug...
CREATE TABLE [srv].[BackupSettings] ( [DBID] INT NOT NULL, [FullPathBackup] NVARCHAR (255) NOT NULL, [DiffPathBackup] NVARCHAR (255) NULL, [LogPathBackup] NVARCHAR (255) NULL, [InsertUTCDate] DATETIME CONSTRAINT [DF_BackupSettings_InsertUTCDate] DEFAULT (getutcdate()) N...
-- file:horology.sql ln:30 expect:true SELECT timestamp with time zone 'J2452271+08'
-- Assessment mode alter table o_as_mode_course add column a_safeexambrowserconfig_xml text; alter table o_as_mode_course add column a_safeexambrowserconfig_plist text; alter table o_as_mode_course add column a_safeexambrowserconfig_pkey varchar(255); alter table o_as_mode_course add column a_safeexambrowserconfig_dloa...
-- SELECT weather stations near given airports -- miles SELECT a.iata, a.icao, a.city, s.usaf, s.wban, s.state, s.icao, 3956 * 2 * ASIN(SQRT(POWER(SIN((a.lat - abs(s.lat)) * pi()/180 / 2), 2) + COS(a.lat * pi()/180 ) * COS(abs(s.lat) * pi()/180) * POWER(SIN((a.lot - s.lot) * pi()/180 / 2), 2) )) as distan...
<filename>twitterstream-bq-pubsub/twitterscraper/bq/query-strings.sql<gh_stars>1-10 SELECT * FROM mydataset.mytable WHERE text LIKE '%term1%' AND text LIKE '%term2%' /* SELECT mytable.from, text, score FROM mydataset.mytable WHERE text like "%Trump%" and score > 0 */
BEGIN; DROP INDEX containers_build_id_not_null; COMMIT;
<reponame>liangry/sqlparser<filename>src/test/resources/com/foundationdb/sql/unparser/update-1.sql UPDATE t SET x = null, y = y + 1 WHERE x <= 4
REM REM Standard disclaimer - anything in here can be used at your own risk. REM REM It is very likely you'll need to edit the script for correct usernames/passwords etc. REM REM No warranty or liability etc etc etc. See the license file in the git repo root REM REM *** USE AT YOUR OWN RISK *** REM set termout off ...
<filename>persistence/sql/migrations/sql/20210829131458000000_session_aal_legacy.mysql.up.sql UPDATE sessions SET authentication_methods='[{"method":"v0.6_legacy_session"}]' WHERE JSON_LENGTH(authentication_methods)=0 AND aal='aal1';
CREATE TABLE users ( id SERIAL PRIMARY KEY, email varchar(255) NOT NULL, first_name varchar(255) NOT NULL, last_name varchar(255) NOT NULL, "password" varchar(255) NOT NULL ); INSERT INTO users(email, first_name, last_name, "password") VALUES ('<EMAIL>', 'John', 'Doe', 'some-hashed-password'), (...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Sep 07, 2019 at 10:46 PM -- Server version: 10.2.26-MariaDB -- PHP Version: 7.2.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; ...
<filename>Database/schema.sql<gh_stars>0 PRAGMA foreign_keys = ON; .headers on .mode csv .mode column /* permissions is a field that will either be "user" or "admin" in theory this could also be a boolean field called "admin" Need UNIQUE constraints on email and username */ CREATE TABLE accounts( accountId INTEGE...
CREATE TABLE [Source].[ApplePodcastHistory] ( [Feed URL] VARCHAR(MAX) NULL, [Episode ID] VARCHAR(MAX) NULL, [Visible?] VARCHAR(25) NULL, [Marked as played on] VARCHAR(30) NULL, [Manually set] VARCHAR(8) NULL, [Is New?] VARCHAR(8) NULL, [Last played on] VARCHAR(30) NULL, [Playback position] VARCHAR(50) NULL, [...
DROP TABLE IF EXISTS `events`; CREATE TABLE IF NOT EXISTS `events` ( `eventID` int(10) NOT NULL auto_increment, `eventTitle` varchar(256) NOT NULL, `eventDescription` varchar(256) default NULL, `location` varchar (256) default NULL, `eventStartDate` date default NULL, `eventEndDate` date default NU...
<gh_stars>0 -- MySQL dump 10.13 Distrib 5.7.34, for Linux (x86_64) -- -- Host: localhost Database: proj -- ------------------------------------------------------ -- Server version 5.7.34-0ubuntu0.18.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHA...
<reponame>knu-3-velychko/OOP-2sem SELECT p.name as pname, s.name as sname FROM planets p LEFT JOIN satelites s ON p.id = s.planet_id INNER JOIN galaxies g ON p.galaxy_id = g.id WHERE has_life = true AND g.name=?;
<filename>SQLdata/2022-06-01.sql INSERT IGNORE INTO detailCount (date, province_name, current_confirmed_count, confirmed_count, dead_count, cured_count) VALUES ('2022-06-01', '台湾', 2105112, 2121231, 2377, 13742), ('2022-06-01', '香港', 260765, 332398, 9378, 62255), ('2022-06-01', '上海市', 637, 63009, 595, 61777), ('2022-06...
create type endringsstatus as enum ('NY', 'ENDRET', 'UENDRET'); alter table uttaksperiode add column endringsstatus endringsstatus default null;
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 03, 2020 at 11:19 PM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.3.18 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
<reponame>jchavezval/employee-tracker USE thc_db; INSERT INTO department (id, name) VALUES (1, 'Operations') ,(2, 'Finance') ,(3, 'Producct') ,(4, 'Marketing') ,(5, 'Sales') ,(6, 'Human Resources') ,(7, 'Business Developent') ,(8, 'CEO & Assistant') ; INSERT INTO role (id, title, salary, department_id) VALUE...
CREATE TABLE [property].[RepoObject_Inheritance_temp] ( [RepoObject_guid] UNIQUEIDENTIFIER NOT NULL, [property_name] NVARCHAR (128) NOT NULL, [property_value] NVARCHAR (MAX) NULL, [property_value_new] NVARCHAR (MAX) NULL, ...
<gh_stars>1-10 /** * problem url: https://leetcode.com/problems/delete-duplicate-emails/ * leetcode profile url: https://leetcode.com/jamsrandorj/ * solved by jama **/ /* Write your PL/SQL query statement below */ DELETE p1 FROM Person p1, Person p2 WHERE p1.Email = p2.Email AND p1.Id > p2.Id;
<reponame>jdkoren/sqlite-parser -- fts2b.test -- -- db eval { -- CREATE VIRTUAL TABLE t4 USING fts2([norm],'plusone',"invert"); -- } CREATE VIRTUAL TABLE t4 USING fts2([norm],'plusone',"invert");
<filename>src/test/resources/sql/create_domain/d0f5e318.sql -- file:domain.sql ln:630 expect:true create domain testdomain1 as int constraint unsigned check (value > 0)
<reponame>ilaotan/golang_market_monitor<filename>mysql/conf/init.d/dump.sql -- Create Database db_monitor DROP DATABASE IF EXISTS `db_monitor`; CREATE DATABASE `db_monitor` DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
IF DB_NAME() != 'WideWorldImporters' USE WideWorldImporters SET NOCOUNT ON GO DBCC FREEPROCCACHE; ALTER DATABASE current SET QUERY_STORE CLEAR ALL; ALTER DATABASE current SET AUTOMATIC_TUNING (FORCE_LAST_GOOD_PLAN = OFF); GO DROP PROCEDURE IF EXISTS [dbo].[report] GO CREATE PROCEDURE [dbo].[report] (@packagetypeid i...
{%- set event_types = get_event_types() -%} with agg_sessions as( select user_guid ,session_guid ,min(event_timestamp) as session_start ,max(event_timestamp) as session_end ,{%- for event_type in event_types %} count( distinct case when event_type = '{{event_type}}' then event_id end) as to...
INSERT INTO test (name, age) VALUES ('Réglisse', 14); SELECT last_insert_id() AS id;
<filename>src/main/resources/db/migration/V2__init2.sql CREATE TABLE `blog_group` ( `groupId` varchar(64) NOT NULL DEFAULT '' COMMENT '主键', `name` varchar(200) DEFAULT NULL COMMENT '名称', `logo` varchar(200) DEFAULT NULL COMMENT '图标logo路径', `introduce` varchar(2000) DEFAULT NULL COMMENT '介绍', `status` int(11)...
-- Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute -- Copyright [2016-2020] EMBL-European Bioinformatics Institute -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may ob...
/* SQLyog Community v13.1.2 (64 bit) MySQL - 5.7.26 : Database - activiti6 ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREI...
<gh_stars>100-1000 DECLARE u_count number; user_name VARCHAR2 (50); BEGIN u_count :=0; user_name :='datauser'; SELECT COUNT (1) INTO u_count FROM dba_users WHERE username = UPPER (user_name); IF u_count != 0 THEN EXECUTE IMMEDIATE ('DROP USER '||user_name||' CASCADE'); ...
SELECT iev_customer_name, iev_state, geo_distance(iev_lat, iev_long, rct_lat, rct_long, 'km') AS dist_to_repairer_km FROM insurance_event_with_repair_info EMIT CHANGES LIMIT 2;
<reponame>nilslice/crates.io DROP FUNCTION canon_crate_name(text);
<gh_stars>100-1000 create view plugin_info as select p.name as plugin, h.name as hook, ph.original_name, ht.name as type from plugin as p join plugin_hook as ph on p.id = ph.plugin_id join hook as h on ph.hook_id = h.id join hook_type as ht on h.type_id = ht.id;
--============================================================================ USE [TechMarket]; GO ------------------------------------------------------------------------------ IF EXISTS( SELECT * FROM sys.tables WHERE name = 'ProductsAttributesValues' AND SCHEMA_NAME(schema_id) = 'dbo') BEGIN DROP TABLE dbo....
<reponame>st-wasik/Pub-DB SET IDENTITY_INSERT [dbo].[Pubs] ON INSERT INTO [dbo].[Pubs] ([id], [name], [adress_id], [e-mail], [telephone_no], [RowVersion]) VALUES (1, N'<NAME>', 3, N'<EMAIL>', N'929-847-374', 1) INSERT INTO [dbo].[Pubs] ([id], [name], [adress_id], [e-mail], [telephone_no], [RowVersion]) VALUES (2, N'Sm...
<reponame>Sen12345/restaurant -- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Mar 22, 2022 at 10:38 AM -- Server version: 10.4.22-MariaDB -- PHP Version: 8.0.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!401...
SELECT FLOOR(AVG(population)) FROM city;
<reponame>thatside/service-bus CREATE TABLE event_sourcing_indexes ( index_tag varchar NOT NULL, value_key varchar NOT NULL, value_data varchar NOT NULL, CONSTRAINT event_sourcing_indexes_pk PRIMARY KEY (index_tag, value_key) );
<reponame>treebat1/SQL USE HomeDepot; GO ALTER FULLTEXT INDEX ON DBO.Item_Info_homedepotC01 set change_tracking = manual; alter fulltext index on dbo.Item_Info_homedepotC02 set change_tracking = manual; ALTER FULLTEXT INDEX ON DBO.Item_Info_homedepotc01_userlists set change_tracking ...
<reponame>ljmf00/ipleiria_bases_dados -- ex 20 INSERT INTO historico_funcao VALUES ( 603, 7499, 'Escriturário', ( SELECT dtacontratacao FROM empregado WHERE numemp=7499 ), ( SELECT ADD_MONTHS(dtacontratacao, 12) FROM empregado WHERE numemp=7499 ), ( SELECT numdep FROM departamento WHERE nomede...
create <database/table> tableName (name1 type1, name2 type2 ....) [from databaseName] create database earth create table people (id int,name string,home string) from earth drop <database/table> Name from databaseName drop database earth drop table people from earth insert into databaseName.tableName (name1,name2...)...
-- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 17 Mar 2020 pada 16.36 -- Versi server: 10.1.37-MariaDB -- Versi PHP: 5.6.40 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHAR...
-- phpMyAdmin SQL Dump -- version 4.8.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 26, 2021 at 03:55 PM -- Server version: 10.1.31-MariaDB -- PHP Version: 7.0.29 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
REM INSERTING into SYS.AUX_STATS$ SET DEFINE OFF; Insert into SYS.AUX_STATS$ (SNAME,PNAME,PVAL1,PVAL2) values ('SYSSTATS_INFO','STATUS',null,'COMPLETED'); Insert into SYS.AUX_STATS$ (SNAME,PNAME,PVAL1,PVAL2) values ('SYSSTATS_INFO','DSTART',null,'02-04-2019 06:51'); Insert into SYS.AUX_STATS$ (SNAME,PNAME,PVAL1,PVAL2) ...
<filename>prisma/migrations/20220307185008_uuid_defaults/migration.sql -- CreateTable CREATE TABLE "comment" ( "id" VARCHAR NOT NULL, "userId" VARCHAR NOT NULL, "discussionId" VARCHAR NOT NULL, "text" VARCHAR NOT NULL, "likes" INTEGER DEFAULT 0, "dislikes" INTEGER DEFAULT 0, CONSTRAINT "com...
COPY acs2014_5yr.tmp_geoheader FROM '/mnt/tmp/acs2014_5yr/g20145ak.txt' WITH ENCODING 'latin1'; COPY acs2014_5yr.tmp_geoheader FROM '/mnt/tmp/acs2014_5yr/g20145al.txt' WITH ENCODING 'latin1'; COPY acs2014_5yr.tmp_geoheader FROM '/mnt/tmp/acs2014_5yr/g20145ar.txt' WITH ENCODING 'latin1'; COPY acs2014_5yr.tmp_geoheader F...
<gh_stars>100-1000 -- walthread.test -- -- db eval { -- BEGIN; -- INSERT INTO t1 VALUES(randomblob(100)); -- INSERT INTO t1 VALUES(randomblob(100)); -- INSERT INTO t1 SELECT md5sum(x) FROM t1; -- COMMIT; -- } BEGIN; INSERT INTO t1 VALUES(randomblob(100)); INSERT INTO t1 VALUES(rando...
<reponame>morten-egan/testdata_ninja<gh_stars>10-100 create or replace package body CR_IN_P as begin testdata_rulebuilder.rules('CR_IN_P').define_code := q'[begin if upper('##COLUMN_TYPE##') = 'BUILTIN' and (upper('##BUILTIN_TYPE##') = 'NUMITERATE' or upper('##BUILTIN_TYPE##') = 'EPOCHITERATE') then ...
<reponame>ccol002/larva-rv-tool DELIMITER $$ CREATE /*[DEFINER = { user | CURRENT_USER }]*/ PROCEDURE `new1000`.`prepare_data`(IN stime bigint(20), IN etime bigint(20)) /*LANGUAGE SQL | [NOT] DETERMINISTIC | { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL DATA } | SQL SECURITY { DEFINER...
<filename>MySQL/human-traffic-of-stadium.sql<gh_stars>0 # Time: O(n^3) # Space: O(n^3) SELECT DISTINCT s1.* FROM stadium AS s1, stadium AS s2, stadium AS s3 WHERE s1.people >= 100 AND s2.people >= 100 AND s3.people >= 100 AND ( (s2.id = s1.id + 1 AND s3.id = s2.id + 1 AND s3.id = s1.id + 2) -- s1, s2, s3 ...
<reponame>JeremieBeaudoin/LavalUniversityStockExchange<gh_stars>0 DROP FUNCTION getMarketValueForPortfolio; DROP FUNCTION getInvestedAmountInPortfolio; DROP FUNCTION getCashAmountInPortfolio; DROP FUNCTION getFrozenCashInPortfolio; DROP FUNCTION getNbOwnedSharesByTickerInPortfolio; DELIMITER // CREATE FUNCT...
<filename>introduction.sql create table DEPARTMENTS ( deptno number, name varchar2(50) not null, location varchar2(50), constraint pk_departments primary key (deptno) ); create table EMPLOYEES ( empno number, name varchar2(50) not null, job ...
<gh_stars>1-10 -- change psm.charge to NOT NULL ALTER TABLE psm CHANGE COLUMN charge charge SMALLINT(6) NOT NULL ;
<filename>migrations/frontend/1528395864_create_temporary_settings.up.sql BEGIN; CREATE TABLE IF NOT EXISTS temporary_settings ( id serial NOT NULL PRIMARY KEY, user_id integer NOT NULL UNIQUE, contents jsonb, created_at timestamp with time zone DEFAULT now() NOT NULL, updated_at timestamp with tim...
<gh_stars>1-10 {% macro sf_object_history(object,custom=false) -%} {%- set custom = false -%} {%- if "__" in object -%} {%- set custom = true -%} {%- endif -%} {%- set object_name = (object | replace("history","") | replace("field","") | replace("_","")) -%} {%- set parent -%} {%- if custom == true -%} paren...
create table t0(‰ DEFAULT(0=0)NOT/**/NULL);REPLACE into t0 select'';
<filename>database/laravel_krs.sql<gh_stars>0 /* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50505 Source Host : localhost:3306 Source Database : laravel_krs Target Server Type : MYSQL Target Server Version : 50505 File Encoding : 65001 Date: 2017-...
<gh_stars>0 CREATE TABLE IF NOT EXISTS `stores` ( `id` smallint(6) UNSIGNED NOT NULL AUTO_INCREMENT, `name` varchar(60) NOT NULL, `address` text, `postcode` varchar(10) NOT NULL, `lat` float(10,4) NOT NULL, `lng` float(10,4) NOT NULL, PRIMARY KEY (`id`), KEY `distance` (`lat`,`lng`) ) ENGINE=MyISAM DEFA...
<reponame>maxim-kuzmin/Makc2020<filename>net-core/sql/Tree/PostgreSQL/Tree.Axis.ParentOrSelf.sql<gh_stars>0 -- Axis ParentOrSelf with "cte_input" as ( select "id" "root_id" from "public"."dummy_tree" where "name" = 'Name-1-1' ) select "t1".* from "public"."dummy_tree" "t1" inner join "public"."dummy_tree...
<reponame>danakristiawan/apik<filename>db_apik.sql -- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: localhost:8889 -- Waktu pembuatan: 21 Des 2021 pada 01.55 -- Versi server: 5.7.34 -- Versi PHP: 7.4.21 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00...
<reponame>rwj42/MANYI-PMS<filename>db/zentao.sql -- DROP TABLE IF EXISTS `zt_action`; CREATE TABLE IF NOT EXISTS `zt_action` ( `id` mediumint(8) unsigned NOT NULL auto_increment, `objectType` varchar(30) NOT NULL default '', `objectID` mediumint(8) unsigned NOT NULL default '0', `product` varchar(255) NOT NULL,...
<filename>Diferenca.sql select p.*, ( ( (select sum(rp.recebimento_produto_quantidade) from tbl_recebimentos_produtos rp where rp.produto_id = p.produto_id)+ (select sum(ae.ajuste_quantidade) from tbl_ajustes_estoque ae where ae.produto_id = p.produto_id and ae.ajuste_tipo = 'E') )- ((select sum(ps.saida_p...
<filename>tehtavasarja-01/tehtava-03.sql /* --- KYSYMYS --- 3. Elokuvista tarvitaan listaus verkkosivulle, jossa esiintyy niiden nimi, kuvaus, vuokrausajan kesto, vuokran hinta, elokuvan pituus ja luokitus. */
<filename>SQLdata/2022-05-26.sql INSERT IGNORE INTO detailCount (date, province_name, current_confirmed_count, confirmed_count, dead_count, cured_count) VALUES ('2022-05-26', '台湾', 1624871, 1640271, 1658, 13742), ('2022-05-26', '香港', 260675, 332108, 9372, 62061), ('2022-05-26', '上海市', 1313, 62867, 594, 60960), ('2022-0...
CREATE TABLE artist_names ( id serial PRIMARY KEY, artist_id integer NOT NULL, name character varying NOT NULL, locale character varying NOT NULL, is_default boolean DEFAULT false NOT NULL, is_original boolean DEFAULT false NOT NULL, created_at timestamp without time zone NOT NULL, updated_at timestamp ...
<reponame>TeMcGee7/BetterBalancedGame-1 -- ============== -- == DISTRICT == -- ============== -- Create new district traderoute yield INSERT INTO District_TradeRouteYields(DistrictType, YieldType, YieldChangeAsOrigin, YieldChangeAsDomesticDestination, YieldChangeAsInternationalDestination) VALUES ('DISTRICT_AERODR...
create table Products ( id serial primary key, title text NOT NULL, description text NULL, active boolean not null default true, price decimal );
-- Verify piws:006 on pg BEGIN; -- XXX Add verifications here. ROLLBACK;
<reponame>atomblastt/Portal-PKL-STT-Payakumbuh<filename>db/pkl.sql -- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 25, 2019 at 11:32 PM -- Server version: 10.1.38-MariaDB -- PHP Version: 7.3.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = ...
<filename>conf/evolutions/default/56.sql -- !Ups ALTER TABLE companies RENAME COLUMN address TO address_old_version; ALTER TABLE companies RENAME COLUMN postal_code TO postal_code_old_version; ALTER TABLE companies RENAME COLUMN department TO department_old_version; ALTER TABLE companies ADD COLUMN department VARCHAR;...
CREATE SEQUENCE "User_id_seq"; DROP TABLE IF EXISTS "User"; CREATE TABLE "User" ( "id" int8 NOT NULL DEFAULT nextval('"User_id_seq"'::regclass), "name" varchar(255) NOT NULL, "login" varchar(255) NOT NULL UNIQUE, ...
<reponame>NensiSkenderi/t-sql-scripts use hr go create or alter trigger after_employees_update ON dbo.employees for UPDATE AS begin INSERT into hr.dbo.loget values('u be update', GETDATE()); end; update hr.dbo.EMPLOYEES set first_name = 'nsene' where EMPLOYEE_ID = 4; select * from hr.dbo.loget; c...
WITH RECURSIVE c0(src, trg) AS ((SELECT s0.src, s1.trg FROM (SELECT trg as src, src as trg, label FROM edge) as s0, (SELECT trg as src, src as trg, label FROM edge) as s1 WHERE s0.trg = s1.src AND s0.label = browserUsed AND s1.label = isSubclassOf UNION SELECT s0.src, s3.trg FROM (SELECT trg as src, src as trg, label ...
-- MySQL dump 10.13 Distrib 5.1.24-rc, for apple-darwin9.0.0b5 (i686) -- -- Host: localhost Database: todo -- ------------------------------------------------------ -- Server version 5.1.24-rc /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_...
<filename>src/test/resources/interrupt.test_4.sql -- interrupt.test -- -- db eval {SELECT md5sum(a || b) FROM t1} SELECT md5sum(a || b) FROM t1