sql
stringlengths
6
1.05M
<reponame>faizakmal/klinik -- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 07, 2020 at 04:59 AM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+...
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1:3306 -- Время создания: Мар 06 2020 г., 19:59 -- Версия сервера: 8.0.12 -- Версия PHP: 7.2.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACT...
-- savepoint.test -- -- execsql { -- SAVEPOINT sp1; -- SAVEPOINT sp2; -- ROLLBACK TO sp1; -- } SAVEPOINT sp1; SAVEPOINT sp2; ROLLBACK TO sp1;
-- core INSERT INTO text (text_id, text_type, english, german, swiss_german, spanish) values ('Waypoint', 'hint_desc','After you''ve activated a waypoint, you can teleport back using a teleport stone.','Nachdem du einen Wegpunkt aktiviert hast, kannst du dich mit einem Teleportstein dorthin zurück teleportieren.','Wen...
<gh_stars>100-1000 -- original: crash3.test -- credit: http://www.sqlite.org/src/tree?ci=trunk&name=test PRAGMA page_size = 1024; BEGIN; CREATE TABLE abc(a, b, c); INSERT INTO abc VALUES(1, 2, 3); COMMIT ;PRAGMA integrity_check ;SELECT * FROM abc ;BEGIN; CREATE TABLE abc(a PRIMARY...
<reponame>lheinrichde/secpass<filename>resources/sql/delete_categories.sql<gh_stars>10-100 DELETE FROM categories WHERE author = $1;
<filename>samples/features/automatic-tuning/force-last-good-plan/sql-scripts/init-blank-db.sql /*************************************************************************** * Run this script on a empty database if you don't have WWI database and * you want to use new database instead of full WWI * If you are using SSMS,...
<gh_stars>10-100 INSERT INTO royalty_recipients (artwork_id, name, asking_asset, amount, address, type) ( SELECT a.id, u.username, '<PASSWORD>' as asking_asset, a.royalty, u.address, 'individual' as type FROM artworks a INNER JOIN users u ON u.id = a.artist_id WHERE ...
DELETE FROM release_naming_regexes WHERE id = 218; INSERT INTO release_naming_regexes (id, group_regex, regex, status, description, ordinal) VALUES ( 218, '^alt\\.binaries\\.comics\\.dcp$', '/.*"(?P<match0>.{7,}?)(\\.part\\d*|\\.rar)?(\\.[A-Za-z0-9]{2,4}").+?yEnc$/', 1, '// Return anything between the quotes....
<gh_stars>100-1000 --undeprecate concept_id=40798976 [AVOF-2710] update concept set invalid_reason=null,valid_end_date=to_date('20991231','yyyymmdd'),standard_concept='S' where concept_id=40798976; update concept_relationship set invalid_reason=null,valid_end_date=to_date('20991231','yyyymmdd') where concept_id_1=40798...
-- -- PostgreSQL database dump -- SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages = warning; -- -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -- CREATE EXTENSION IF NOT EXISTS plpgs...
<reponame>ZhouZiXuan-imb/rent-project<filename>sql/devices.sql INSERT INTO `devices` VALUES (1, '电视', 'SBac4167b0-cf6a-6198', '2019-5-7 16:51:53', '2019-5-7 16:51:53'); INSERT INTO `devices` VALUES (2, '冰箱', 'SB33e3135d-98ac-aeef', '2019-5-7 16:51:53', '2019-5-7 16:51:53'); INSERT INTO `devices` VALUES (3, '洗衣机', 'SBda...
<gh_stars>0 create table users( id INTEGER primary key autoincrement, name text, email text, username char(255) );
-- -------------------------------------------- -- books -- -------------------------------------------- DROP TABLE IF EXISTS books; CREATE TABLE books ( id SERIAL PRIMARY KEY, isbn VARCHAR(20), title VARCHAR(255), author VARCHAR(100), year INT ); ALTER SEQUENCE books_id_seq RESTART WITH 1001;
<filename>Create.sql<gh_stars>0 CREATE DATABASE usuarios; -- Criar tabelas no database usuarios CREATE TABLE IF NOT EXISTS usuarios( id SERIAL NOT NULL PRIMARY KEY, nome VARCHAR(100), email VARCHAR(100), senha VARCHAR(32) ); CREATE TABLE IF NOT EXISTS calculos( id SERIAL NOT NULL PRIMARY KEY, ...
-- -- test from hell: group by with lots of results -- set schema 's'; select b1.k10, b2.k25, count(*), sum(b1.k10+b2.k25) from bench1m b1, bench1m b2 where b1.kseq=b2.kseq group by b1.k10, b2.k25 order by 1,2 ;
<reponame>tSQLt-org/tSQLt<gh_stars>100-1000 DROP TABLE IF EXISTS dbo.timelog; GO CREATE TABLE dbo.timelog( id INT IDENTITY(1,1), [@a] DATETIME2, [@c] DATETIME2, [@b] DATETIME2 ); GO SET NOCOUNT ON; GO CREATE PROCEDURE dbo.loopy @loopcount INT = 100000 AS BEGIN DECLARE @a DATETIME2, @b DATETIME2,@c DATETIME2...
-- Find Images for a particular store -- Returns resulting images, if any, of the specified store -- =========================================================================== SELECT store_id, image_id, height, width, size_in_bytes, content_type, image_type, source, url FROM blacknectar.store_images WHERE store_id = ...
<gh_stars>1-10 {% macro test_number_partitions(model, expected) %} {%- set result = get_partitions_metadata(model) %} {% if result %} {% set partitions = result.columns['partition_id'].values() %} {% else %} {% set partitions = () %} {% endif %} {% set actual = partit...
select 1 as id, 'banana' as fruit
CREATE DATABASE IF NOT EXISTS `ezegarraDB` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `ezegarraDB`; -- MySQL dump 10.13 Distrib 5.6.13, for Win32 (x86) -- -- Host: mysql.cs.pitt.edu Database: ezegarraDB -- ------------------------------------------------------ -- Server version 5.0.45-community-log /*!40101 SE...
<reponame>edyMartin2/deleted insert into ampip.reclog (id, user, message, time) values (1, '<EMAIL>', 'Se intento dar de alta al usuario <EMAIL>', '2021-04-12 13:38:11'), (2, '<EMAIL>', 'Se intento dar de alta al usuario <EMAIL>', '2021-04-12 13:38:14'), (3, '<EMAIL>', 'Se intento dar de alta al usuari...
<filename>medium/_08_mc_ind/cases/I035_qset17.sql --+ holdcas on; SELECT attr12_int_4vals_noidx, attr15_int_50vals_idx, COUNT(*) FROM x_base_c1 GROUP BY attr12_int_4vals_noidx, attr15_int_50vals_idx ORDER BY attr12_int_4vals_noidx; SELECT attr15_int_50vals_idx FROM x_virtual_c2 GROUP BY...
<reponame>Andyyh2005/datahub-integration-examples CREATE COLUMN TABLE "DH_INPUT"."com_sap_appint_s4_customerReturns" ("CustomerReturn" NVARCHAR(10) NOT NULL , "CustomerReturnType" NVARCHAR(4), "SalesOrganization" NVARCHAR(4), "DistributionChannel" NVARCHAR(2), "OrganizationDivision" NVARCHAR(2), "SalesGroup" NVARCHAR(3...
<reponame>Michin0suke/vtuber-music-laravel INSERT INTO `artist_children` VALUES ('1st_place','jin','2020-01-01 00:00:00','2020-02-25 14:24:19'),('asano_shimai_project','asano_akane','2020-01-01 00:00:00','2020-03-02 08:03:23'),('asano_shimai_project','asano_ruri','2020-01-01 00:00:00','2020-03-02 08:03:23'),('bnsi','ky...
<gh_stars>0 use account; CREATE TABLE credentials ( UserName varchar(255) NOT NULL, Password varchar(255) NOT NULL, LastLogin datetime NOT NULL, PRIMARY KEY (UserName) ); insert into account.credentials values('admin','admin','1998-01-23 12:45:56');
<filename>DataBaseScripts/Queries/SP_getOwnerInfoByName.sql SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO -- ============================================= -- Author: <NAME> -- Create date: 2020/6/1 -- Description: Query the information of an owner by name. -- ============================================= -- TODO I...
<filename>database/user_info.sql<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.0.9 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Mar 03, 2016 at 09:11 AM -- Server version: 5.6.14 -- PHP Version: 5.5.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARA...
create table Roles ( ID int NOT NULL IDENTITY(1,1) PRIMARY KEY, RoleName varchar(255), ); create table Users ( ID int NOT NULL IDENTITY(1,1) PRIMARY KEY, UserName varchar(255) NOT NULL, Email varchar(255), Shift varchar(255) NOT NULL, RoleOneDayAgo int FOREIGN KEY REFERENCES Roles(ID), RoleTwoDaysAgo int FOREIGN KEY ...
create type string_list as table of varchar2(255) / create type number_list as table of number / create type integer_list as table of number(10) / create type simple_varray as varray(255) of number(10); / create type float_varray as varray(255) of number(5, 2); / create or replace type t_obj as object ( id number, ...
<reponame>nfabiop/HackerRank<filename>SQL/15_Days_of_Learning_SQL.sql DECLARE @min_date as date SET @min_date = (SELECT MIN(submission_date) FROM SUBMISSIONS) --################################################################ SELECT Z1.submission_date, Z1.max_number_of_submissions, Z2.hacker_id, Z2.name FROM ( SELE...
delete from room_id; insert into room_id (nomis_room_description, prison_id, vsip_id, is_open) values ('HEI-FAMILYTIME-HB1_6', 'HEI', 'Family Visit Room', true); insert into room_id (nomis_room_description, prison_id, vsip_id, is_open) values ('HEI-PACE_ROOM-PACE', 'HEI', 'PACE Room', false); insert into room_id (nomi...
CREATE TABLE IF NOT EXISTS "job_advert_seniority_levels" ( "job_advert_id" uuid REFERENCES job_adverts("job_advert_id"), "seniority_level" VARCHAR(40) REFERENCES seniority_levels("seniority_level"), PRIMARY KEY ("job_advert_id", "seniority_level") );
<reponame>Angeliza-Medina/ThursdayTasks -- ------------------------ SELECT (ONE TABLE only) ------------------------ -- 4 (G) - Find all the French customers /*SELECT * FROM customers WHERE customers.country = 'France';*/ -- 5 (G) - Find first name and last name on employees with the title ”sales rep” /*SELECT firstN...
USE LAVADEIRA_DB; CREATE TABLE IF NOT EXISTS TB_LAVADEIRAS ( LAVD_CODIGO INT NOT NULL AUTO_INCREMENT, LAVD_NOME VARCHAR(45) NOT NULL, LAVD_LOGIN VARCHAR(45) NOT NULL, LAVD_SENHA VARCHAR(45) NOT NULL, LAVD_IMAGEM BLOB NOT NULL, PRIMARY KEY (LAVD_CODIGO) )ENGINE=InnoDB; CREATE TABLE IF NOT EXIS...
<reponame>handywepe/trison-mp -- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Feb 22, 2021 at 04:54 AM -- Server version: 5.7.24 -- PHP Version: 7.4.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SE...
-- Table: public.company -- DROP TABLE public.company; CREATE TABLE public.company ( id bigint NOT NULL DEFAULT nextval('company_id_seq'::regclass), name text NOT NULL, address text NOT NULL, city text NOT NULL, country text NOT NULL, email character varying, "phoneNumber" character varying,...
<filename>backend/de.metas.adempiere.adempiere/migration/src/main/sql/postgresql/system/10-de.metas.adempiere/5520750_sys_gh5027_AD_User_Record_Access_window.sql -- 2019-05-03T14:38:43.628 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Window (AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Wi...
<filename>World/Spells/spell_bonus_data.fire_strike.sql<gh_stars>0 DELETE FROM spell_bonus_data WHERE entry = '7712'; INSERT INTO spell_bonus_data VALUES ('7712','0','0','0','0','Fire Strike proc');
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: mysql:3306 -- Generation Time: Apr 05, 2021 at 03:38 PM -- Server version: 8.0.20 -- PHP Version: 7.4.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR...
<filename>sql_files/create_table.sql CREATE TABLE IF NOT EXISTS clean_store_transactions(STORE_ID varchar(50), STORE_LOCATION varchar(50), PRODUCT_CATEGORY varchar(50), PRODUCT_ID int, MRP float, CP float, DISCOUNT float, SP float, DATE date);
-- phpMyAdmin SQL Dump -- version 2.11.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jan 18, 2014 at 11:22 AM -- Server version: 5.0.45 -- PHP Version: 5.2.4 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; -- -- Database: `diary` -- -- -------------------------------------------------------- -- -- ...
<filename>schema/test/unit/trigger_functions/committed_changes_are_immutable_test.sql begin; select plan(3); insert into cif.change_status (status, triggers_commit, active) values ('testcommitted', true, true), ('testpending', false, true); create table test_table_with_status( test_col text, change_status varcha...
<reponame>oracle-developer/moats create or replace view top as select * from table(moats.top);
<reponame>emekdahl/fal select * from {{ ref ("middle_2") }}
drop table if exists t; create table t (a string, b string); insert into t values ('c',null); create index idx2 on t(nvl(a,b)) invisible; show index from t; commit; update t set a = null; select * from t; drop table t;
<gh_stars>1-10 -- create a table with a primary key,create a table with a foreign key, drop the foreign key,drop the primary key create class a (i int primary key, j int); create class b (i int primary key, j int foreign key references a); alter class a add constraint a_fk foreign key(j) references b; alter class...
<filename>play/materialize-cloud-dbt/models/example/market_orders.sql -- Copyright Materialize, Inc. and contributors. All rights reserved. -- -- 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 in...
<reponame>knledg/ck-graphql ---!> MARINER:MIGRATE:UP: BEGIN; CREATE TABLE users ( id serial, name text NOT NULL, nickname text NOT NULL, email text NOT NULL, created_at timestamp with time zone DEFAULT NOW(), updated_at timestamp with time zone DEFAULT NOW(), PRIMARY KEY (id) ); COMMIT; ---!> MARINER:M...
/*------------------------------------- * Filesize checker JS functions * Version: 1.1 (17.10.2015) * Author: <NAME> *------------------------------------- */ FUNCTION render_filesizechecker(p_dynamic_action IN apex_plugin.t_dynamic_action, p_plugin IN apex_plugin.t_plugin) ...
<filename>net.violet.platform/src/test/java/net/violet/platform/datamodel/NathanMp3Test_teardown.sql<gh_stars>1-10 SET FOREIGN_KEY_CHECKS = 0; DELETE FROM `nathan_version` WHERE version_id = 1; DELETE FROM `nathan_mp3`; DELETE FROM `files` WHERE id = 1; SET FOREIGN_KEY_CHECKS = 1;
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; -- -- Datenbank: `onlineshop` -- DROP SCHEMA IF EX...
SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for `qrtz_blob_triggers` -- ---------------------------- DROP TABLE IF EXISTS `qrtz_blob_triggers`; CREATE TABLE `qrtz_blob_triggers` ( `sched_name` varchar(120) COLLATE utf8mb4_bin NOT NULL, `trigger_name` varchar(2...
<reponame>mikesmeltzer/oqtane.framework /* migrate to new naming convention for scripts */ UPDATE [dbo].[SchemaVersions] SET ScriptName = 'Oqtane.Scripts.Tenant.00.09.00.00.sql' WHERE ScriptName = 'Oqtane.Scripts.Tenant.0.9.0.sql' GO UPDATE [dbo].[SchemaVersions] SET ScriptName = 'Oqtane.Scripts.Tenant.00.09.01.00...
-- Insert Data into table INSERT INTO agents (agent_id, first_name, last_name) VALUES (1, 'Diana', 'Lee'), (2, 'Anthony', 'Garcia'), (3, 'Karen', 'Clinton'); INSERT INTO regions (region_id, region_name) VALUES (11, 'Northeast'), (22, 'South'), (33, 'Midwest'), (44, 'West'); INSERT INTO agent_region_junc...
select p.username || ',' || p.gender || ',' || count(*) from workshops_person as p join workshops_task as t join workshops_role as r join workshops_event as e where p.id=t.person_id and t.role_id=r.id and t.event_id=e.id and r.name='instructor' and e.start>='2015-01-01' and e.start<='2015-12-31' group by p.username ord...
-- DROP VIEWS IF OBJECT_ID(N'[wwi_perf].[mvCustomerSales]') IS NOT NULL drop view [wwi_perf].[mvCustomerSales] IF OBJECT_ID(N'[wwi_perf].[vTableSizes]') IS NOT NULL drop view [wwi_perf].[vTableSizes] IF OBJECT_ID(N'[wwi_perf].[vColumnStoreRowGroupStats]') IS NOT NULL drop view [wwi_perf].[vColumnStoreRowGroupStats] ...
<reponame>dram/metasfresh<gh_stars>1000+ -- 13.03.2017 17:54:56 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AllowZoomTo,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,...
<filename>Calandria/static/sql/doscompuestos.sql INSERT INTO [squeegee].[dbo].[receta] ([pliego_goma] ,[pliego_mesa_alta] ,[green_tire] ,[presion_rodillo] ,[velocidad_maxima] ,[compuesto_a] ,[calibre_caliente_a] ,[ancho_squeegee_a] ,[ancho_pliego_a] ,[dima_a] ,[dimb_a] ,[compuesto_b] ...
<gh_stars>0 -- Adminer 3.6.2 MySQL dump SET NAMES utf8; SET foreign_key_checks = 0; SET time_zone = 'SYSTEM'; SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; CREATE DATABASE `photoshare` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `photoshare`; DROP TABLE IF EXISTS `Category`; CREATE TABLE `Category` ( `id` int(10) unsign...
<reponame>CloudifySource/cloudify-widget alter table widget add column show_advanced tinyint(1) default 0;
/* Navicat MySQL Data Transfer Source Server : mysql Source Server Version : 50717 Source Host : localhost:3306 Source Database : pan Target Server Type : MYSQL Target Server Version : 50717 File Encoding : 65001 Date: 2019-06-28 19:08:15 */ SET FOREIGN_KEY_CHECKS=0; -- ---------...
DROP TABLE IF EXISTS a; CREATE TABLE a (a UInt8, b UInt8) ENGINE MergeTree ORDER BY a; EXPLAIN SYNTAX SELECT * FROM a; DROP TABLE a;
<reponame>Zhaojia2019/cubrid-testcases drop table if exists index_comment; create table index_comment(id int primary key, name char(10)); create index i_t_comment_s on index_comment(id desc); select index_name, class_name, comment from db_index where class_name='index_comment' order by 1,2,3; alter index i_t_comment_...
<gh_stars>1000+ -- +migrate Up ALTER TABLE workflow_node_hook ADD COLUMN ref VARCHAR(50); update workflow_node_hook set ref = id; -- +migrate Down ALTER TABLE workflow_node_hook DROP COLUMN ref;
<reponame>khargol1/employee-tracker DROP TABLE IF EXISTS employees; DROP TABLE IF EXISTS roles; DROP TABLE IF EXISTS managers; DROP TABLE IF EXISTS departments; CREATE TABLE departments ( departments_id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY, departments_name VARCHAR(30) NOT NULL ); CREATE TABLE roles ...
<gh_stars>0 # # TABLE STRUCTURE FOR: tb_book_accounting # DROP TABLE IF EXISTS `tb_book_accounting`; CREATE TABLE `tb_book_accounting` ( `book_id` int(11) NOT NULL AUTO_INCREMENT, `Name` varchar(50) NOT NULL, `Status` varchar(15) NOT NULL, PRIMARY KEY (`book_id`) ) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHAR...
-- -- Table User -- DROP TABLE IF EXISTS User; CREATE TABLE User ( "id" INTEGER PRIMARY KEY NOT NULL, "email" TEXT NOT NULL UNIQUE, "password" TEXT NOT NULL, "name" TEXT NOT NULL, "gravatar" TEXT NOT NULL, "rating" INTEGER DEFAULT 0, "created" TIMESTAMP DEFAULT CURRENT_TIMESTAMP, "update...
<filename>db_scripts/tables/tbl_heading4_indexes.sql --------------------------------------------------------------- -- table: heading4. indexes --------------------------------------------------------------- -- index: cuix_heading4_key -- drop index cuix_heading4_key; create unique index cuix_heading4_key on heading...
<filename>MySql Cod3r/Banco Relacional/criarTabelaCidades.sql<gh_stars>0 create table if not exists cidades( id int unsigned not null auto_increment, nome varchar(255) not null, estado_id int unsigned not null, area decimal(10,2), PRIMARY KEY(id), foreign key(estado_id) references estados(id) );...
<reponame>ilhamali/rest-server-medis -- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 14 Des 2020 pada 18.55 -- Versi server: 10.3.16-MariaDB -- Versi PHP: 7.3.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zon...
<filename>sampdb/stored-programs/scores_by_name.sql<gh_stars>0 # Display scores for a student given a student name DROP PROCEDURE IF EXISTS scores_by_name; delimiter $ #@ _FRAG_ CREATE PROCEDURE scores_by_name (p_name VARCHAR(20)) BEGIN DECLARE v_id INT DEFAULT NULL; # look up student ID from name SELECT student...
-- https://data.stackexchange.com/stackoverflow/query/951/low-views-high-votes-yet-unanswered -- Enter Query Title -- Enter Query Description select /* Low views, high votes yet unanswered */ top 500 Id as [Post Link], Score, ViewCount from Posts where Score > 2 and ViewCount <> 0 and ParentId is null and AcceptedA...
<filename>DB/old/users.sql -- phpMyAdmin SQL Dump -- version 4.5.4.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Aug 02, 2018 at 05:38 PM -- Server version: 5.7.22 -- PHP Version: 5.6.36-1+ubuntu14.04.1+deb.sury.org+1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!4...
-- PARAM_VAL table -- 05/29/2016 -- -- NOTE: Fields that are later converted to numeric fail with leading blanks, -- ' 4' fails -- '04' passes -- '4' passes -- ' 8192' passes(!) -- -- PRIMARY KEY(FUNCTION_NAME,PARAM_NAME), -- The FUNCTION_NAME with PARAM_NAME must be unique. -- Combination comprises the key for t...
<gh_stars>1-10 -- phpMyAdmin SQL Dump -- version 4.6.6deb5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Feb 13, 2020 at 05:41 PM -- Server version: 5.7.28-0ubuntu0.19.04.2 -- PHP Version: 7.2.24-0ubuntu0.19.04.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!401...
/* AHORA NO ELIMINO QUE HAY QUE MANTENER LAS MIGRACIONES drop database if exists gestolab; create database gestolab default charset=utf8mb4_unicode_ci; */ use gestolab; /* DROP USER IF EXISTS 'oski_bc'; CREATE USER 'oski_bc'@'localhost'; SET PASSWORD FOR 'oski_bc'@'localhost' = PASSWORD('<PASSWORD>'); GRANT ALL PR...
<filename>EmployeeSQL/sql-challenge.sql --1.) List the following details of each employee: employee number, last name, --first name, sex, and salary. Select e.emp_no,e.first_name,e.last_name,e.sex,s.salary from employees as e inner join salaries as s on e.emp_no = s.emp_no; --2.) List first name, last name, and hir...
-- 2021-06-26T04:33:13.409Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,579396,0,'KPI_AllowedStaledTimeInMin',TO_TIMESTAMP('2021-06-...
if :P9_DESKTOP_THEME_STYLE_ID is not null then for c1 in (select theme_number from apex_application_themes where application_id = :app_id and ui_type_name = 'DESKTOP' and is_current = 'Yes') loop apex_util.set_current_theme_style ( ...
SELECT (TIMESTAMP '2012-08-31 01:00:00' - TIMESTAMP '2012-07-30 01:00:00') AS "interval";
CREATE TABLE whitespaces ( value String ) ENGINE = MergeTree() PARTITION BY tuple() ORDER BY tuple() INSERT INTO whitespaces SELECT value FROM ( SELECT arrayStringConcat(groupArray(' ')) AS spaces, concat(spaces, toString(any(number)), spaces) AS value FROM numbers(100000000) GROUP BY p...
SELECT * FROM t;
select reordered, avg(add_to_cart_order) from order_products group by reordered;
alter table "kundu"."analytics_data" add column "project_id" uuid null;
-- phpMyAdmin SQL Dump -- version 4.6.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 08, 2016 at 02:29 AM -- Server version: 5.7.14 -- PHP Version: 5.6.25 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */...
<reponame>scala-steward/scaladex DROP TABLE project_dependencies; CREATE TABLE project_dependencies ( source_organization VARCHAR(39) NOT NULL, source_repository VARCHAR(100) NOT NULL, source_version VARCHAR NOT NULL, target_organization VARCHAR(39) NOT NULL, target_repository VARCHAR(100) NOT NULL, ...
BEGIN; CREATE TABLE IF NOT EXISTS instances(id serial NOT NULL, type text NOT NULL, path text NOT NULL, name text NOT NULL, sort text NOT NULL, ...
<reponame>YangHao666666/hawq<gh_stars>100-1000 -- start_ignore drop table if exists s1; drop table if exists s2; -- setup two partitioned tables s1 and s2 create table s1 (d1 int, p1 int) distributed by (d1) partition by list (p1) ( values (0), values (1)); create table s2 (d2 int, p2 int) distributed by (d2) par...
CREATE TABLE [dbo].[EventTaskTemplate]( [Id] [int] IDENTITY(1,1) NOT NULL, [Name] [nvarchar](128) NOT NULL, [Data] [ntext] NOT NULL, PRIMARY KEY CLUSTERED ( [Id] ASC ) ) GO
<filename>data/gallery.sql -- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Czas generowania: 01 Wrz 2017, 10:03 -- Wersja serwera: 10.1.21-MariaDB -- Wersja PHP: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_...
CREATE TABLE "double_emulsion" ( "formulation_id" Varchar, "methodology" Varchar, "researcher_id" Varchar, "sample_id" Varchar, "notes" Varchar, "date" Date, "polymer" Varchar, "polymer_mass" Integer, "np_loading" Varchar, "loading_mass" Integer, "time_1" Integer, "amplitude_1" Integer, "time_...
<filename>empleado-insert.sql<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.4.12 -- http://www.phpmyadmin.net -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 31-07-2015 a las 16:38:55 -- Versión del servidor: 5.6.25 -- Versión de PHP: 5.6.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40...
/* find connection leaks*/ select count(*) as sessions, s.host_name, s.host_process_id, s.program_name, db_name(s.database_id) as database_name from sys.dm_exec_sessions s where is_user_process = 1 group by host_name, host_process_id, program_name, database_id order by co...
create tablespace cmpnydata datafile '/u01/app/oracle/product/11.2.0/xe/dbs/cmpny.dbf' size 100M
CREATE DATABASE users;
<gh_stars>1-10 -- Licensed to the Apache Software Foundation (ASF) under one -- or more contributor license agreements. See the NOTICE file -- distributed with this work for additional information -- regarding copyright ownership. The ASF licenses this file -- to you under the Apache License, Version 2.0 (the -- "Lic...
BEGIN DECLARE @testResultId INT; DECLARE @sql NVARCHAR(MAX); DECLARE @resultSize INT; DECLARE @processingTime FLOAT; DECLARE @queryPlan NVARCHAR(MAX); INSERT INTO sql_optimizer_benchmark.test_results(test_group, configuration, test) VALUES ('{0}', '{1}', '{2}'); SELECT @testResultId = IDENT_CURRENT('sql_opti...
<reponame>taritom/bn-api CREATE TABLE assets ( id uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, ticket_type_id uuid NOT NULL REFERENCES ticket_types(id), blockchain_name TEXT NOT NULL, blockchain_asset_id TEXT NULL, status TEXT NOT NULL, created_at TIMESTAMP NOT NULL DEFAULT now(), updated_at TIMES...
<filename>public/db/share.sql<gh_stars>1-10 -- phpMyAdmin SQL Dump -- version 4.2.7.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Dec 28, 2014 at 05:10 AM -- Server version: 5.5.39 -- PHP Version: 5.4.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...