sql
stringlengths
6
1.05M
<filename>code/daymet_query.sql COPY(SELECT featureid, date_part('year', date) as year, date, tmax, tmin, prcp, dayl, srad, swe FROM daymet WHERE featureid IN (730259, 730482, 730531, 730650, 730675, 730733, 730764, 730849, 730912, 730916, 730933, 731120, 731587, 731705, 731788, 731959, 731967, 732022, 732106, 732107,...
<filename>schema.sql -- MySQL dump 10.13 Distrib 5.7.21, for macos10.13 (x86_64) -- -- Host: localhost Database: TinyLibrary -- ------------------------------------------------------ -- Server version 5.7.21 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@...
<filename>transform/snowflake-dbt/tests/retention/arr_changes_beg_plus_changes_equals_end.sql<gh_stars>1-10 --Test that the beg ARR, plus the changes that are calculated independently, equals the ending ARR. Also check to see that --the end arr ties out to the arr in mrr_totals_levelled. WITH test AS ( SELECT ...
-- file:create_view.sql ln:53 expect:true CREATE OR REPLACE VIEW viewtest AS SELECT a FROM viewtest_tbl WHERE a <> 20
<reponame>Shuttl-Tech/antlr_psql -- file:alter_table.sql ln:930 expect:true alter table atacc2 add foreign key (id) references atacc1("........pg.dropped.1........")
<reponame>yujiorama/spring-petclinic-rest<filename>src/main/resources/db/postgresql/initDB.sql CREATE TABLE IF NOT EXISTS vets ( id SERIAL, first_name VARCHAR(30), last_name VARCHAR(30), CONSTRAINT pk_vets PRIMARY KEY (id) ); CREATE INDEX IF NOT EXISTS idx_vets_last_name ON vets (last_name); ...
<reponame>FrankyBoy/ApiDoc USE [ApiDoc] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[tab_Nodes]( [fID] [int] NOT NULL, [frParentId] [int] NOT NULL, [fName] [nvarchar](50) NOT NULL, [frDescription] [int] NOT NULL, [fChangeDate] [datetime] NOT NULL, [fAu...
-- Cache Hit Ratio SELECT trunc(sum(blks_hit) / sum(blks_read + blks_hit) * 100, 2) AS cache_hit_ratio FROM pg_stat_database; -- Mostrar parâmetro shared_buffers show shared_buffers;
<reponame>mokuki082/MoCookie<gh_stars>1-10 CREATE OR REPLACE FUNCTION Test.pct_normal_case() RETURNS BOOLEAN AS $$ DECLARE result BOOLEAN; BEGIN PERFORM Blockchain.addAUT('aaa123'); PERFORM Blockchain.addAUT('bbb123'); PERFORM Blockchain.commitBlock(); PERFORM Blockchain.addGCT('aaa123', ...
-- SPDX-License-Identifier: Apache-2.0 -- Licensed to the Ed-Fi Alliance under one or more agreements. -- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0. -- See the LICENSE and NOTICES files in the project root for more information. /************************************************...
<reponame>sven-olding/domino-jna /* Generic table that will receive all domino documents. * * The first block of columns is required for the sync (e.g. to find document * information like the sequence time, basically "last modified", by the doc UNID. * * The field __modifiedinthisfile_millis is a reserved field ...
-- ============================================= -- Create basic stored procedure template -- ============================================= -- Drop stored procedure if it already exists IF EXISTS ( SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE SPECIFIC_SCHEMA = N'dbo' AND SPECIFIC_NAME = N'spInsertSt...
{% if target.type == 'bigquery' or target.type == 'snowflake' or target.type == 'redshift' %} {% if var("attribution_warehouse_ltv_sources") %} {% if 'custom_ltv_customer' in var("attribution_warehouse_ltv_sources") %} with source as ( select * from {% if var("attribution_demo_mode") %} ...
<reponame>gh-determined-ai/determined<filename>master/static/migrations/20210506153239_drop-prior-batches-processed.tx.down.sql -- This migration is not reversable since it drops data. -- Users should back up before upgrading to 0.15.4.
<reponame>jmaslak/switchinfo -- -- COPYRIGHT (C) 2012, ANTELOPE ENTERPRISES AND JOELLE MASLAK -- ALL RIGHTS RESERVED -- -- -- Creates (if NULL passed in as switch_id) or updates (all other values of -- switch_id) switch records. -- -- switch_id = Null if new, otherwise set to switch_id to update -- -- On add, all the ...
-- ============================================= -- Author: <NAME> -- Create date: August 8, 2013 -- Description: Return a list of Oracle database owners, i.e. schemas, and the number of their associated tables for the parameters provided. -- Usage: /* USE [DBA] GO DECLARE @return_value int EXEC @return_...
<reponame>peymanME/Exchange<filename>data/databaseScript.sql<gh_stars>0 -- ----------------------------------------------------- -- Schema db_exchange -- ----------------------------------------------------- CREATE SCHEMA IF NOT EXISTS `db_exchange` DEFAULT CHARACTER SET utf8 ; USE `db_exchange` ; -- -----------------...
<reponame>whosonfirst/concordances-whosonfirst-wikidata<filename>code/00_airport.sql SET work_mem = '3GB'; SET jit = on; SET jit_above_cost = 10; -- time psql -e -f /wof/code/00_airport.sql -- select base_name , comp_name_en, base_id,comp_id, _jarowinkler from newd.base_wd_match_airports_match where _step='2' ...
--SELECT-Abfrage mit UDFs SELECT a.id, udf_benutzername(a.bearbeiter), a.titel, s.status_text FROM udf_aufgaben_in_status(4) AS a LEFT OUTER JOIN udf_statustexte('DE') AS s ON a.STATUS = s.id;
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server version: 10.4.13-MariaDB - mariadb.org binary distribution -- Server OS: Win64 -- HeidiSQL Version: 11.0.0.5919 -- -----------------------------------------------...
CREATE TABLE IF NOT EXISTS `user` ( `uid` int NOT NULL AUTO_INCREMENT, `username` varchar(15) NOT NULL, `email` varchar(50) NOT NULL, `password` varchar(100) NOT NULL, `recoverytoken` varchar(50) DEFAULT NULL, `recovery_at...
<gh_stars>0 -- MySQL dump 10.13 Distrib 8.0.21, for Win64 (x86_64) -- -- Host: localhost Database: controle_traslado_alunos -- ------------------------------------------------------ -- Server version 8.0.21 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@...
<reponame>dimayaschhuk/test_001 -- phpMyAdmin SQL Dump -- version 4.2.12deb2+deb8u2 -- http://www.phpmyadmin.net -- -- Хост: localhost -- Время создания: Фев 11 2019 г., 13:26 -- Версия сервера: 5.5.58-0+deb8u1 -- Версия PHP: 5.6.30-0+deb8u1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 ...
<filename>webdatainfo.sql<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.5.4.1deb2ubuntu2.1 -- http://www.phpmyadmin.net -- -- Servidor: localhost -- Temps de generació: 04-10-2018 a les 18:02:05 -- Versió del servidor: 5.7.23-0ubuntu0.16.04.1 -- Versió de PHP: 7.1.16-1+ubuntu16.04.1+deb.sury.org+1 SET SQL_MODE = "NO_...
<reponame>jishisv/sipernes<filename>src/Minsal/Sipernes/ReportesBundle/Resources/views/rpt_consultas/consulta_rpt_21.sql SELECT mnt_empleado.nombre Enfermera, ctl_establecimiento.nombre establecimiento, enf_anotacion.observacion_anot Anotacion, mnt_paciente.primer_nombre Paciente FROM public.c...
USE [Monopoly] GO /****** Object: Table [Player].[PropertiesOwned] Script Date: 2/19/2022 10:17:08 AM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [Player].[PropertiesOwned]( [rowid] [int] IDENTITY(1,1) NOT NULL, [player] [int] NOT NULL, [property] [varchar](50) NOT NULL, [acquisitio...
<reponame>JZaaa/CakeAdmin-3.7 /* SQLyog Ultimate v12.5.1 (64 bit) MySQL - 10.1.29-MariaDB : Database - cakeadmin_3_7 ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*...
INSERT INTO user_collaborates_on_tournament(tournament_id, username, is_admin) VALUES ($1, $2, $3) RETURNING *;
CREATE TABLE [Transactions] ( -- TODO: 1. Transaction ID should be a Primary Key, fields with a b-tree index TransactionId int IDENTITY NOT NULL /*Complete this*/ , VendingMachineId char(36), ItemName varchar(255), ItemId int, PurchasePrice smallmoney, TransactionStatus int, TransactionDate datetime, ...
<reponame>metatooth/cannabis<gh_stars>1-10 begin; create table worker_config ( nickname varchar(255) unique, config jsonb not null unique, createdat timestamp default current_timestamp, updatedat timestamp default current_timestamp, deleted boolean default false, deletedat timestamp, primary key (nicknam...
<reponame>rhomicom-systems-tech-gh/Rhomicom-DB-Scripts /* Formatted on 12-19-2018 8:44:05 AM (QP5 v5.126.903.23003) */ DROP TABLE EPAY.EPAY_PSB6_TRNS CASCADE CONSTRAINTS PURGE; CREATE TABLE EPAY.EPAY_PSB6_TRNS ( INTERRUPTION_ID NUMBER NOT NULL, INTERRUPTION_NATURE_ID INTEGER, -- NATURE OF ...
<gh_stars>10-100 -- file:triggers.sql ln:788 expect:true DROP TRIGGER instead_of_delete_trig ON main_view
ALTER TABLE /*_*/pagetriage_log DROP ptrl_comment;
<gh_stars>1-10 UPDATE `creature_template` SET `ScriptName`='npc_taretha' WHERE `entry`=18887; UPDATE `creature_template` SET `ScriptName`='npc_thrall_old_hillsbrad' WHERE `entry`=17876;
<reponame>kevin154/cs50<gh_stars>0 SELECT count(title) FROM movies WHERE id IN (SELECT movie_id FROM ratings WHERE rating = 10);
DROP TYPE comment_attitude CASCADE; DROP TYPE gender_enum CASCADE; DROP TYPE race_enum CASCADE; DROP TYPE policy_type CASCADE; DROP TYPE Hospital_rating CASCADE; DROP TABLE State_info CASCADE; DROP TABLE City CASCADE; DROP TABLE Hospital CASCADE; DROP TABLE Patient_hospitalization CASCADE; DROP TABLE Policy_p...
<reponame>proshantokuet/test<filename>opensrp-web/src/main/resources/scripts/report_procedure.sql<gh_stars>0 -- FUNCTION: public.test2_anc_data(text[]) -- DROP FUNCTION public.test2_anc_data(text[]); CREATE OR REPLACE FUNCTION core.test2_report( filterarray text[]) RETURNS TABLE(providerName text, householdCo...
<reponame>spantons/Interface-for-shopping-car--Node.js-Mongo-DB- -- phpMyAdmin SQL Dump -- version 3.5.1 -- http://www.phpmyadmin.net -- -- Servidor: localhost -- Tiempo de generación: 16-10-2013 a las 21:04:22 -- Versión del servidor: 5.5.25 -- Versión de PHP: 5.4.4 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone...
#standardSQL # 20.01 - Adoption of HTTP/2 by site and requests SELECT client, firstHtml, JSON_EXTRACT_SCALAR(payload, "$._protocol") AS http_version, COUNT(0) AS num_requests, ROUND(COUNT(0) * 100 / SUM(COUNT(0)) OVER (PARTITION BY client), 2) AS pct FROM `httparchive.almanac.requests` WHERE ...
<filename>tests/unittests/excel/excel_io_2.sql -------------------------------------------------------------------------- -- excel export / import test -------------------------------------------------------------------------- .run ../common/postgresql_setup.sql CREATE TABLE MyTable(a INTEGER, b DATE, c TIME, d TIMEST...
<filename>maint/createParameters_to_Ancillary.sql create table Parameters_to_Ancillary (prim_key INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, Parameter_fk INT UNSIGNED NOT NULL COMMENT 'refers to row in Parameters', Ancillary_fk INT UNSIGNED NOT NULL COMMENT 'refers to row in Ancillary', ...
<reponame>nileshmahale03/SSIS USE AdventureWorksDataMart GO CREATE TABLE [dbo].[CustomerDim]( [CustomerKey] [int] IDENTITY(1,1) NOT NULL, [CustomerAlternateKey] [varchar](15) NOT NULL, [Title] [varchar](8) NULL, [FirstName] [varchar](50) NULL, [MiddleName] ...
<filename>database/seeds/SQLFiles/Users.sql INSERT INTO `users` (`id`,`first_name`,`last_name`,`email`,`password`,`role_id`,`supplier_id`) VALUES (1,'Siyou','Technology','<EMAIL>','$2y$10$74HLmu5fsmAq96gmtTZFTOnuoe4083kcXonHGqi02SDs4JbMyreZ.',2,NULL); INSERT INTO `users` (`id`,`first_name`,`last_name`,`email`,`password...
<gh_stars>0 USE codeforthefences; CREATE TABLE user ( `id` int AUTO_INCREMENT primary key NOT NULL, `createdDate` datetime NOT NULL, `username` nvarchar(64) UNIQUE NOT NULL, `password` nvarchar(128) NOT NULL, `sessionId` nvarchar(128) NULL, `lastLogin` datetime NULL ); CREATE TABLE blogPost ( `id` int A...
# ************************************************************ # Sequel Pro SQL dump # Version 4541 # # http://www.sequelpro.com/ # https://github.com/sequelpro/sequelpro # # Host: 127.0.0.1 (MySQL 5.5.42) # Database: appshare2 # Generation Time: 2016-06-23 23:00:37 +0000 # *********************************************...
USE DHallPickerFinal GO CREATE PROCEDURE AddTodaysMenu( @DishName varchar(100), @DiningHallID int, @MealTypeID int, @DateAdded date) AS INSERT INTO Dish (DishName, DiningHallID, MealTypeID, DateAdded) VALUES (@DishName, @DiningHallID, @MealTypeID, @DateAdded) GO CREATE PROCEDURE SelectAllDishes(...
<gh_stars>100-1000 -- avtrans.test -- -- execsql {PRAGMA fullfsync=OFF} PRAGMA fullfsync=OFF
<filename>ServerAPI/DBConstructor/Modules/Core/ObjectField.sql<gh_stars>1-10 ---- CORE_JURISDICTION ---- IF NOT EXISTS(SELECT * FROM [System].[ObjectField] WHERE Name = 'Name' AND ObjectId = [System].[LookupObject]('Core', 'Jurisdiction')) BEGIN INSERT INTO [System].[ObjectField] ( [ObjectFieldId], [ObjectI...
<filename>dbms/t_query/ATSavePageToStep.sql --liquibase formatted sql --changeset artemov_i:ATSavePageToStep.sql dbms:postgresql runOnChange:true splitStatements:false stripComments:false insert into s_mt.t_query( ck_id, cl_select, ck_provider, ck_user, ct_change, cc_query )values( 'ATSavePageToStep'...
<gh_stars>0 /* Warnings: - You are about to drop the column `price` on the `BinanceAssets` table. All the data in the column will be lost. - You are about to drop the column `roi` on the `BinanceAssets` table. All the data in the column will be lost. */ -- AlterTable ALTER TABLE `BinanceAssets` DROP COLUMN `pri...
<reponame>smith750/kc insert into krim_role_mbr_t (role_mbr_id, role_id, mbr_id,MBR_TYP_CD, ver_nbr, obj_id) values (krim_role_mbr_id_bs_s.nextval,(select role_id from krim_role_t where nmspc_cd = 'KC-SYS' and role_nm = 'Manager'), (select grp_id from krim_grp_t where nmspc_cd = 'KC-WKFLW' and grp_nm = 'KcAdmin'),'G',1...
<reponame>kevin-at-datical/liquibase-test-harness ALTER TABLE LBUSER.authors ADD CONSTRAINT test_unique_constraint UNIQUE (email) DEFERRABLE INITIALLY DEFERRED ALTER TABLE LBUSER.authors DROP CONSTRAINT test_unique_constraint DROP INDEX
<reponame>Civeloo/GeN-XE7 --{sqlPrepararMensajes=sqlMensajesNoLeido+' AND '+whereSinEnviar+' AND '+whereNoEmbalado; --{sqlMensajesNoLeido=sqlMensajes+' AND '+whereNoLeido; --{sqlMensajes=sqlSelectOrderItems+', messages.*'+sqlOrderFrom+' INNER JOIN messages ON orders.id = messages.order_id'+' WHERE '+wherePaid+' AND (NO...
<gh_stars>0 /************************ Standardized derived elements ************************/ --HINT DISTRIBUTE_ON_KEY(subject_id) CREATE TABLE cohort ( cohort_definition_id INTEGER NOT NULL , subject_id INTEGER NOT NULL , cohort_start_date DATE NOT NULL , cohort_end_date DATE NOT NULL ) ; ...
<reponame>junioraby/TRDC<filename>web/Sql.sql INSERT INTO `trdc`.`type_journal` (`dateajout`, `code`, `nom`) VALUES ('2016-02-13 02:33:18', 'CRE_DOS', 'Création de dossier');
<gh_stars>1-10 -- user -- insert new user into table INSERT INTO users ( email, uid, password_digest, created_at, updated_at ) VALUES ( $<email>, $<uid>, $<password_digest>, $<created_at>, $<updated_at> ) RETURNING id;
<filename>dbforum.sql<gh_stars>1-10 -- phpMyAdmin SQL Dump -- version 4.7.9 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 17, 2021 at 06:12 AM -- Server version: 10.1.31-MariaDB -- PHP Version: 7.2.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_...
<filename>db/python_bi_demo.sql -- phpMyAdmin SQL Dump -- version 4.7.9 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3309:3306 -- Generation Time: May 26, 2020 at 08:20 PM -- Server version: 5.7.21 -- PHP Version: 5.6.35 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zo...
/* Navicat Premium Data Transfer Source Server : ztlele Source Server Type : MySQL Source Server Version : 50720 Source Host : localhost Source Database : ztlele Target Server Type : MySQL Target Server Version : 50720 File Encoding : utf-8 Date: 12/12/2018 11:43:00 AM...
<filename>sql/_01_object/_02_class/_006_reusable_oid/cases/_014_partition_alter.sql<gh_stars>1-10 create table foo(id int) reuse_oid partition by list (id)( partition p0 values in (1,2,3), partition p1 values in (4,5,6), partition p2 values in (7,8,9) ); commit; insert into foo values (1); insert ...
INSERT INTO [AircraftDetail] ( [Icao] ,[CreatedUtc] ,[UpdatedUtc] ) VALUES ( @icao ,@createdUtc ,@updatedUtc );
<gh_stars>1-10 -- -- PostgreSQL database dump -- -- Dumped from database version 11.1 -- Dumped by pg_dump version 11.1 SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_catalog.set_config('search...
<filename>functions/pglogical_ticker.add_ticker_tables_to_replication.sql<gh_stars>0 CREATE OR REPLACE FUNCTION pglogical_ticker.add_ticker_tables_to_replication( --For use with cascading replication, you can pass --a set_name in order to add all current subscription tickers --to this replication set p_cascade_to_set_n...
<filename>Scripts/SafranQueries/V3/TableFillGenerator.sql declare @insert nvarchar(max), @tableName nvarchar(128), @tableId int, @columns nvarchar(max) declare copy_cursor cursor for select o.name, o.object_id from sys.objects o join sys.schemas s on s.schema_id = o.schema_id where type = 'u' and o.name not like ...
/* Navicat Premium Data Transfer Source Server : 本地 Source Server Type : MySQL Source Server Version : 50553 Source Host : localhost:3306 Source Schema : blog Target Server Type : MySQL Target Server Version : 50553 File Encoding : 65001 Date: 11/03/2019 17:00:50 */ ...
<reponame>tmtflx/care-ity -- phpMyAdmin SQL Dump -- version 5.0.3 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Jan 04, 2021 at 03:45 AM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.4.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 S...
<reponame>k-maru/Toi SELECT * FROM Emp -- Context.StartMarker("Com"); INNER JOIN Com ON Emp.ComId = Com.ComId -- Context.EndMarker(); WHERE 1 = 1 --! 従業員名 -- if(!string.IsNullOrEmpty(Model.Name)){ AND Emp.EmpName = 'Foo'/* Context.SqlParameter(nameof(Model.Name), Model.Name); */ -- } --! 部署 -- if(Model.De...
<filename>sql/blog.sql -- phpMyAdmin SQL Dump -- version 4.9.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Aug 13, 2020 at 11:05 AM -- Server version: 5.7.24 -- PHP Version: 7.2.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00";...
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Servidor: 1192.168.3.11 -- Tiempo de generación: 16-11-2018 a las 00:18:28 -- Versión del servidor: 10.1.36-MariaDB -- Versión de PHP: 7.2.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:...
insert into users (id, firstname, lastname, email) values ('100001', 'MARTINA', 'jindal', '<EMAIL>'); -- orders table insert into orders (id, matterRef, type, status, createdAt) values ('100001', 'SAI Office Inquiry', 'Property Information Report', 'Completed', '2018-10-14'); insert into orders (id, matt...
<reponame>sidbmw/ICS4U ---- ---- ----INSERT INTO eom_main_screen_layout (STUDENT_ID, EXPECTATION, SEQ_NO, X_4S4P) ----SELECT STUDENT_ID, EXPECTATION, eom_main_screen_layout_s.NEXTVAL, TASK ----FROM EOM_MARKS WHERE STUDENT_ID = 1 AND EXPECTATION = 'B2' AND MARK = '4/4+'; -- ----------------------------------------------...
CREATE TABLE [dbo].[Subscriptions] ( [AccountId] BIGINT NOT NULL, [State] NVARCHAR(15) NOT NULL, [TrialEndDate] DATETIMEOFFSET NULL, [Version] BIGINT NOT NULL, CONSTRAINT [PK_Subscriptions] PRIMARY KEY CLUSTERED ([AccountId]), CONSTRAINT [FK_Subscriptions_AccountId_Account...
<reponame>eveisesi/skillz UPDATE users SET `uuid` = `id`;
<gh_stars>100-1000 -- e_fkey.test -- -- execsql { -- BEGIN; -- CREATE TABLE t0(a PRIMARY KEY, b); -- INSERT INTO t0 VALUES('x0', NULL); -- } BEGIN; CREATE TABLE t0(a PRIMARY KEY, b); INSERT INTO t0 VALUES('x0', NULL);
-------------------------------------------------------------- -- active transactions using version store -------------------------------------------------------------- SELECT t.transaction_id ,t.name ,t.transaction_type ,t.transaction_state ,s.transaction_id ,s.session_id ,s.elapsed_time_secon...
-- phpMyAdmin SQL Dump -- version 4.5.2 -- http://www.phpmyadmin.net -- -- 主機: localhost -- 產生時間: 2016 年 06 月 05 日 17:52 -- 伺服器版本: 10.1.13-MariaDB -- PHP 版本: 5.6.21 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CH...
# PROJECT CREATION AND FASTA UPLOAD drop table protein_sequence; CREATE TABLE protein_sequence ( id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, sequence MEDIUMTEXT NOT NULL ); alter table protein_sequence add index(sequence(1000)); DROP TABLE fasta_file; CREATE TABLE fasta_file ( id INT UNSIGNED NOT ...
CREATE DATABASE Questions; use Questions; create table Usuario( id varchar(20) not null primary key, clave varchar(20), tipo integer ); create table Question( id integer auto_increment not null primary key, questionname varchar(40), topic varchar(20) ); create table Answer( id integer auto_increment no...
-- security_functions UPDATE `security_functions` SET `name` = 'Results' WHERE `id` IN (1015,2016,7015); -- db_patches DELETE FROM `db_patches` WHERE `issue`='POCOR-3583';
<filename>sql/system_role_202009162056.sql<gh_stars>1-10 INSERT INTO public.system_role (create_by,update_by,create_at,update_at,is_deleted,is_activate,role_name,role_level,description,data_scope) VALUES (NULL,'admin','2018-11-23 11:04:37.000','2020-05-11 18:34:06.000',false,false,'超级管理员',1,'-','全部') ,(NULL,'admin','2...
-- ---------------------------- -- Table structure for task_meta -- ---------------------------- DROP TABLE IF EXISTS `task_meta`; CREATE TABLE `task_meta` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id', `task_id` varchar(64) NOT NULL COMMENT '任务标识', `name` varchar(64) NOT NULL DEFAULT '' COMMENT '任务名称', `...
<gh_stars>100-1000 -- Revert delivery:phase_run_logs from pg BEGIN; DROP TABLE IF EXISTS phase_run_logs; COMMIT;
-- +goose Up -- SQL in section 'Up' is executed when this migration is applied ALTER TABLE certificates ADD COLUMN issued_at timestamptz, ADD COLUMN not_before timestamptz, ADD COLUMN metadata jsonb, ADD COLUMN sans jsonb, ADD COLUMN common_name TEXT; -- +goose Down -- SQL section 'Down' is executed whe...
<gh_stars>0 ALTER TABLE `offers` CHANGE `google_360` `google_360` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;
BEGIN; SELECT _v.unregister_patch ('024-create-counters-btree-idx'); DROP INDEX measurement_start_time_btree_idx COMMIT;
insert into ${WrkSchema}.${Table}_n (party_id, start_ts, end_ts, source_id, name) select coalesce(p.party_id, nextval('${WrkSchema}.${Table}_s') , to_timestamp('\${TimeStamp[YYYY-MM-DD HH24:MI:SS]}', 'YYYY-MM-DD HH24:MI:SS') , to_timestamp('${MaxTimeStamp}', 'YYYY-MM-DD HH24:MI:SS') , s.ico from ${StgSchema}.czso_res...
<filename>L2J_DataPack/sql/character_offline_trade_items.sql CREATE TABLE IF NOT EXISTS `character_offline_trade_items` ( `charId` int(10) NOT NULL DEFAULT '0', `item` int(10) NOT NULL DEFAULT '0', `count` bigint(20) NOT NULL DEFAULT '0', `price` bigint(20) NOT NULL DEFAULT '0', PRIMARY KEY (`charId`,`item`) ...
SELECT title FROM movies INNER JOIN ratings ON ratings.movie_id = movies.id WHERE id IN ( SELECT movie_id FROM stars WHERE person_id = ( SELECT id FROM people WHERE name = "<NAME>" ) ) ORDER BY rating DESC LIMIT 5;
<filename>src/db/sql/configurations/add.sql insert into airq.configurations (${values:name}) values(${values:csv}) ${returning:raw}
<reponame>scala-steward/sundial # --- !Ups ALTER TABLE process_definition ADD COLUMN notifications JSONB NOT NULL DEFAULT '[]'::jsonb; # --- !Downs ALTER TABLE process_definition DROP COLUMN IF EXISTS notifications;
<gh_stars>0 insert into estados (id, nome, sigla, regiao, populacao) values (1000, 'Novo', 'NV', 'Sul', 2.54); -- inclui o 1000 insert into estados (nome, sigla, regiao, populacao) values ('Novo New', 'NN', 'Norte', 12.54); -- incrementa o último, se for o 1000 o id desse será 1001
<filename>SQL/ExerciciosAula/exercicio_01.sql create table FUNCIONARIO( Codigo number, coddep number, Nome varchar2(100) not null, Telefone varchar2(50), Email varchar2(100), constraint pk_cliente primary key (Codigo) --com essa sintaxe nos escolhemos o nome da primary key, apesa...
USE bisto6yhwq3qietv0eon; DROP TABLE IF EXISTS rating; DROP TABLE IF EXISTS movie; DROP TABLE IF EXISTS genre; CREATE table genre( id int (11) not null auto_increment, genre_name VARCHAR(255) not null, PRIMARY KEY (id) ); insert into genre (genre_name) values ('Action'); insert into genre (genre_name) values ('Ani...
<reponame>ramak919/Oracle-E-Business-Suite /* Formatted on 7/14/2015 12:14:51 PM (QP5 v5.149.1003.31008) */ SELECT grt.doc_id Batch_id ,GBS.BATCHSTEP_NO ,gbs.step_status_meaning step_status ,grt.resources ,gbsr.actual_rsrc_usage ,gbsr.actual_rsrc_qty ,gbsr.usage_...
<gh_stars>1-10 Table point holds the x coordinate of some points on x-axis in a plane, which are all integers. Write a query to find the shortest distance between two points in these points. | x | |-----| | -1 | | 0 | | 2 | The shortest distance is '1' obviously, which is from point '-1' to '0'. So the...
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Dec 09, 2019 at 02:19 PM -- Server version: 10.1.38-MariaDB -- PHP Version: 7.1.26 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
CREATE TABLE dbo.Products ( Id INT IDENTITY(1, 1) NOT NULL CONSTRAINT PK_Products PRIMARY KEY, Title NVARCHAR(255) NOT NULL, Description NVARCHAR(2555) NOT NULL, Price DECIMAL(9, 2) NOT NULL, Icon VARBINARY(MAX) NULL, MaxPurchases INT NOT NULL, Enabled BIT NOT NULL );
DROP TABLE xtblVendorMaterial ; CREATE TABLE xtblVendorMaterial ( VendorID char(4) , MaterialID char(3) , CurrentPrice money NOT NULL CONSTRAINT pkVendorMaterial PRIMARY KEY (VendorID, MaterialID) , CONSTRAINT fkVendor FOREIGN KEY (VendorID) REFERENCES xtblVendor (VendorID) , CONSTRAINT fkRM ...
<gh_stars>1-10 CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; CREATE TABLE tags ( id UUID PRIMARY KEY DEFAULT uuid_generate_v4(), article_id UUID NOT NULL REFERENCES articles (id) ON DELETE CASCADE, name TEXT NOT NULL, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, updated_at TIMESTAMP DEFAULT CURRENT...
-- randexpr1.test -- -- db eval {SELECT 19-case 13-f when b then t1.a*11-t1.d-+17*t1.b-coalesce((select 17 from t1 where 13<=f),+coalesce((select (abs(17+~coalesce((select a from t1 where 11<>t1.b and 11 not between t1.e and 19),17)+t1.e+t1.d & b)/abs(c))+f from t1 where 19 not between 19 and c),d)) else 19 end*t1.e+b...