sql
stringlengths
6
1.05M
<filename>src/test/resources/sql/insert/b9a43b73.sql -- file:point.sql ln:9 expect:true INSERT INTO POINT_TBL(f1) VALUES ('(-10.0,0.0)')
<filename>sql/table_relationships.sql select distinct ccu.table_name as main_table , tc.table_name as slave_table from information_schema.table_constraints as tc join information_schema.key_column_usage as kcu on tc.constraint_name = kcu.constraint_name join information_schema.constraint_column_usage...
-- 2022-01-26T14:28:08.234783700Z INSERT INTO AD_Val_Rule (AD_Client_ID,AD_Org_ID,AD_Val_Rule_ID,Code,Created,CreatedBy,EntityType,IsActive,Name,Type,Updated,UpdatedBy) VALUES (0,0,540569,'C_BPartner.IsSummary = ''N'' AND (EXISTS(SELECT * FROM C_BPartner_Location l WHERE C_BPartner.C_BPartner_ID = l.C_BPartner_ID AND l...
-- -- Table structure for table 'radippool' -- -- See also "procedure.sql" in this directory for additional -- indices and a stored procedure that is much faster. -- CREATE TABLE radippool ( id BIGSERIAL PRIMARY KEY, pool_name varchar(64) NOT NULL, FramedIPAddress INET NOT NULL, NASIPAddress VARCHAR(16) NOT N...
-- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64) -- -- Host: localhost Database: usermanagement -- ------------------------------------------------------ -- Server version 5.7.17-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESU...
-- Migrationscripts for ebean unittest -- drop dependencies drop view if exists migtest_e_history2_with_history; -- apply changes alter table migtest_e_basic drop column old_boolean; alter table migtest_e_basic drop column old_boolean2; alter table migtest_e_basic drop column eref_id; alter table migtest_e_history2...
<reponame>Richardace/adn-veterinary<gh_stars>0 select count(1) from cita where fecha = :fecha and hora = :hora and id != :id
-- Test data for API tests -- Activate "Zabbix Server" host UPDATE hosts SET status=0 WHERE host='Zabbix server'; -- host groups INSERT INTO hosts (hostid, host, name, status, description) VALUES (50009, 'API Host', 'API Host', 0, ''); INSERT INTO hosts (hostid, host, name, status, description) VALUES (50010, 'API Te...
CREATE TABLE "CTCONTAINER_TYPE" ( "CONTAINER_TYPE" VARCHAR2(20 CHAR) NOT NULL ENABLE, CONSTRAINT "PKEY_CTCONTAINER_TYPE" PRIMARY KEY ("CONTAINER_TYPE") USING INDEX ENABLE )
DROP TABLE operations;
<reponame>JaneliaSciComp/DatabaseScripts CREATE OR REPLACE VIEW simpson_image_property_vw AS SELECT image_id as image_id, MAX(IF(STRCMP(image_property_vw.type,'organ'),null,value)) AS 'organ', MAX(IF(STRCMP(image_property_vw.type,'specimen'),null,value)) AS 'specimen', MAX(IF(STRCMP(imag...
/* Navicat MySQL Data Transfer Source Server : ll Source Server Type : MySQL Source Server Version : 50642 Source Host : 192.168.127.12:3306 Source Schema : code_evaluation Target Server Type : MySQL Target Server Version : 50642 File Encoding : 65001 Date: 03/08/202...
ALTER TABLE Users ADD CONSTRAINT CHK_Password CHECK (LEN(Password) > 4)
create table players ( player_id varchar(10) constraint player_id_pk primary key, hp integer not null default 100 );
CREATE database bamazon; DROP DATABASE IF EXISTS bamazon; USE bamazon; CREATE TABLE product ( id INT NOT NULL AUTO_INCREMENT, product_name VARCHAR(60) NOT NULL, department_name VARCHAR(60) NOT NULL, price DECIMAL (10, 4) NOT NULL, stock_quantity INT (4) NOT NULL, PRIMARY KEY (id) ); INSERT INTO product ...
<reponame>Lifeni/node-monitor<gh_stars>0 -- CreateTable CREATE TABLE "SystemInfo" ( "id" SERIAL NOT NULL, "name" TEXT NOT NULL, "time" TIMESTAMP(3) NOT NULL, "systemId" INTEGER NOT NULL, "osId" INTEGER NOT NULL, "cpuId" INTEGER NOT NULL, CONSTRAINT "SystemInfo_pkey" PRIMARY KEY ("id") ); -...
CREATE TABLE `tblVendorRateDiscontinued` ( `DiscontinuedID` int(11) NOT NULL AUTO_INCREMENT, `VendorRateID` int(11) NOT NULL, `AccountId` int(11) NOT NULL, `TrunkID` int(11) NOT NULL, `RateId` int(11) NOT NULL, `Code` varchar(50) COLLATE utf8_unicode_ci NOT NULL, `Description` varchar(200) COLLATE utf8_un...
<filename>create_objects.sql CREATE SCHEMA IF NOT EXISTS {schema_prefix}_staging; CREATE SCHEMA IF NOT EXISTS {schema_prefix}_integration; DROP TABLE IF EXISTS {schema_prefix}_integration.transaction; CREATE TABLE {schema_prefix}_integration.transaction ( serial_number VARCHAR(18) NOT NULL , processing_date DATE...
<reponame>darlanaraujo/Projetos drop database cadastros; create database if not exists cadastros default charset utf8 default collate utf8_general_ci; use cadastros; create table if not exists usuarios( id int(11) auto_increment, usuario varchar(30) not null unique, senha varchar(30) not null, primary key (id) ) def...
<reponame>stmandl/exa-toolbox<filename>json/json_table.sql /* json_table.sql JSON data that is stored in EXASOL tables can be accessed through UDFs. This script presents a generic Python UDF json_table to access field values in JSON documents through path expressions. See also https://www.exasol.com/support/browse/SO...
CREATE DATABASE IF NOT EXISTS `test_db`; CREATE DATABASE IF NOT EXISTS `test_db`; USE `test_db`; CREATE TABLE IF NOT EXISTS `test_table` (`id` int(11) NOT NULL AUTO_INCREMENT,PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=latin1; GRANT CREATE USER, SELECT, INSERT, UPDATE, DELETE ON *.* TO 'grant_user'@'localhost' ID...
<filename>test/fixtures/dialects/bigquery/declare_variable.sql declare var1 int64; declare var2, var3 string; declare var4 default 'value'; declare var5 int64 default 1 + 2; declare arr1 array<string>; declare arr2 default ['one', 'two']; declare arr3 default []; declare arr4 array<string> default ['one', 'two']; decla...
--liquibase formatted sql --changeset uk.gov.pay:payouts_read_permission INSERT INTO permissions(id, name, description) VALUES (47, 'payouts:read', 'View Payouts'); INSERT INTO role_permission VALUES ((SELECT id FROM roles WHERE name = 'super-admin'), (SELECT id FROM permissions WHERE name = 'payouts:read'), NOW(), ...
--! Previous: sha1:75a22705ed605efe9977682348d29a05a6849aa9 --! Hash: sha1:1b2db9b78acbec09569d11a908e41d2bac3446d7 --! split: 1-current.sql -- Enter migration here CREATE TYPE friend_status AS ENUM ( 'friend', 'pending-sent', 'pending-received', 'none' );
<reponame>svetinsideu/monorepo create table phrases ( film_id char(10) not null constraint phrases_films_id_fk references films, phrase text not null, time_offset integer ); alter table phrases owner to postgres;
<gh_stars>0 description: myyoyo version: 1 up: - CREATE TABLE CredentialStorageByEmail( email text, user_id uuid, apitoken text, PRIMARY KEY ( email, user_id, apitoken)) down: - DROP TABLE CredentialStorageByEmail
CREATE TABLE `ROLE` ( `ID` VARCHAR(50) NOT NULL, `NAME` VARCHAR(50) NOT NULL, `DESCRIPTION` VARCHAR(100) NOT NULL, `CREATED_AT` DATETIME NULL DEFAULT NULL, `UPDATED_AT` DATETIME NULL DEFAULT NULL, PRIMARY KEY (`ID`) ); CREATE TABLE `USER` ( `ID` VARCHAR(50) NOT NULL, `EMAIL` VARCHAR(50) NOT NULL,...
-- script: OmsInternal/exec-batch-operation.sql -- Выполняет операцию над пакетными заданиями, реализованными с помощью модуля -- Scheduler. -- -- Параметры: -- operationCode - код операции ( возможные коды перечислены ниже) -- patternList - список масок пакетных заданий ( формат: -- ...
ALTER TABLE DOCUMENT DROP COLUMN PROCESS_INST_ID; ALTER TABLE DOCUMENT MODIFY COLUMN CONTENT MEDIUMTEXT; ALTER TABLE DOCUMENT ADD (STATUS_CODE SMALLINT, STATUS_MESSAGE VARCHAR(1000), PATH VARCHAR(1000)); UPDATE DOCUMENT set OWNER_TYPE = 'ADAPTER_REQUEST' where OWNER_TYPE = 'ADAPTOR_REQUEST'; UPDATE DOCUMENT set O...
-- start_ignore SET gp_create_table_random_default_distribution=off; -- end_ignore CREATE INDEX cr_ao_gist_idx1 ON cr_ao_table_gist_index USING GiST (property);
<filename>test.sql -- phpMyAdmin SQL Dump -- version 4.0.10.10 -- http://www.phpmyadmin.net -- -- Хост: 127.0.0.1:3306 -- Время создания: Ноя 10 2015 г., 12:23 -- Версия сервера: 5.6.26 -- Версия PHP: 5.6.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH...
-- phpMyAdmin SQL Dump -- version 4.5.4.1deb2ubuntu2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Oct 17, 2017 at 10:07 AM -- Server version: 5.7.19-0ubuntu0.16.04.1 -- PHP Version: 7.0.22-0ubuntu0.16.04.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_C...
-- phpMyAdmin SQL Dump -- version 4.2.11 -- http://www.phpmyadmin.net -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 03-07-2015 a las 14:55:10 -- Versión del servidor: 5.6.21 -- Versión de PHP: 5.6.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARAC...
-- -- Function -- CREATE FUNCTION to_function_1(args1 integer, args2 integer) RETURNS integer AS $$ BEGIN RETURN args1 * args2 + args1; END $$ LANGUAGE plpgsql; CREATE FUNCTION to_function_2(args1 integer, args2 integer) RETURNS integer AS $$ BEGIN RETURN args1 * args1 + args2; END $$ LANGUAGE plpgsql; CREATE FUNCT...
/* * METODO QUE LO USA: addContactBusiness */ DROP PROCEDURE IF EXISTS `SP_SELUSER_TOADD`; DELIMITER $$ CREATE DEFINER=`root`@`localhost` PROCEDURE `SP_SELUSER_TOADD`(IN `i_business_id` INT UNSIGNED, IN `i_contact_id` INT UNSIGNED, IN `i_buspush_id` INT UNSIGNED, ...
<gh_stars>0 INSERT INTO Genero (IdGenero, Descricao) VALUES (0, 'Romance'), (1, 'Terror'), (2, 'Filosofia'), (3, 'Ciências'); SELECT * FROM Genero
/* Navicat Premium Data Transfer Source Server : localhost_3306 Source Server Type : MySQL Source Server Version : 80020 Source Host : localhost:3306 Source Schema : seabasedb Target Server Type : MySQL Target Server Version : 80020 File Encoding : 65001 Date: 21/02/...
CREATE TABLE IF NOT EXISTS `user_paket_soal` ( `id_user_paket_soal` int NOT NULL AUTO_INCREMENT , `id_user_paket` int NOT NULL , `id_periode_soal` int NOT NULL , `start_time` datetime NULL , `is_finished` int(1) NOT NULL DEFAULT 0, `email_sent` datetime NULL , `created` datetime NOT NULL , PRIMARY KEY (`id_user_pak...
DROP TABLE IF EXISTS Basilisk DROP TABLE IF EXISTS Dragons DROP TABLE IF EXISTS Dragon_Rider DROP TABLE IF EXISTS DRAGON_HORDE
<reponame>airtank20/Presentations<gh_stars>1-10 -- Let's cheat so we can see transactions in flight -- DO NOT DO THIS IN PRODUCTION!!! USE MASTER GO ALTER DATABASE AdventureWorksDW2017 MODIFY FILE (NAME=AdventureWorksDW2017_log, filegrowth=8kb) DBCC SHRINKFILE (N'AdventureWorksDW2017_log' , 0, TRUNCATEONLY) G...
-- clean up DROP PROCEDURE IF EXISTS sp_account_fetch; -- go CREATE PROCEDURE sp_account_fetch ( p_accountId BIGINT ) this_proc:BEGIN SELECT a.accountId , a.userName , a.salt , a.hash , a.createdOn , a.updatedOn FROM account a WHERE a.ac...
/* Navicat Premium Data Transfer Source Server : 本地ASUS Source Server Type : MySQL Source Server Version : 50727 Source Host : localhost:3306 Source Schema : db03 Target Server Type : MySQL Target Server Version : 50727 File Encoding : 65001 Date: 08/04/2020 14:39:51...
<gh_stars>10-100 metadata :name => "libvirt", :description => "SimpleRPC Libvirt Agent", :author => "R.I.Pienaar <<EMAIL>>", :license => "ASL2.0", :version => "0.2.1", :url => "http://devco.net/", :timeout => 10 ...
<filename>scripts/data_migrations/2018-11-12_backfill-dimension-timestamps.sql -- Copy created_at dates from page to dimension. UPDATE dimension SET created_at = page.created_at from page WHERE dimension.page_id = page.guid and dimension.page_version = page.version and dimension.created_at IS NULL; -- Copy updated_at...
<filename>data-public/metadata/database/generate-db-97.sql USE [master] GO CREATE DATABASE [NlsyLinks97] CONTAINMENT = NONE ON PRIMARY ( NAME = N'NlsyLinks97', FILENAME = N'D:\database\nlsy-links\nlsy_links_97.mdf' , SIZE = 319488KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB ) LOG ON ( NAME = N'NlsyLinks97_log', ...
CREATE PROCEDURE [ZFP_SET_ACCT_RLS]( @P_ACCT VARCHAR(50), @P_SE_SEQ_ID INT, @P_ROLES VARCHAR(1000), @P_ADDUPD_BY INT, @P_ErrorCode int OUTPUT ) AS BEGIN TRAN DECLARE @ACCT_SEQ_ID INT SET @ACCT_SEQ_ID = (SELECT ACCT_SEQ_ID FROM ZFC_ACCTS WHERE ACCT = @P_ACCT) -- NEED TO DELETE EXISTING ROLE ASSOCITAED WITH THE...
<gh_stars>10-100 ALTER TABLE `currency_accounts` ADD `is_sale_account` TINYINT(1) NOT NULL DEFAULT '0' AFTER `is_faucet`; INSERT INTO `oracle_urls` (`oracle_url_id`, `format_id`, `url`) VALUES (NULL, 3, 'https://coinmarketcap.com/'); ALTER TABLE `user_games` ADD `display_currency_id` INT NULL DEFAULT NULL AFTER `bettin...
DECLARE @whoisactive_table VARCHAR(4000) ; DECLARE @schema VARCHAR(4000) ; DECLARE @dsql NVARCHAR(4000) ; SET @whoisactive_table = QUOTENAME ('##WhoIsActive_' + CAST(NEWID() as varchar(255))); EXEC sp_WhoIsActive @get_transaction_info = 1, @output_column_list = '[block%][%]', @get_plans = 1, @find_block_leaders ...
{{ config( materialized='table' ) }} with int_users_orders as ( SELECT users.user_full_names, sum(orders.order_cost) as sum_order_cost, sum(orders.shipping_cost) as sum_shipping_cost, coalesce(sum(orders.revenue),0) as sum_revenue, coalesce(sum(order_items.order_quantity),0) as sum_ord...
ALTER TABLE "ccgprojecttracking$projectdetails_employee_2" DROP CONSTRAINT "uniq_ccgprojecttracking$projectdetails_employee_2_ccgprojecttracking$projectdetailsid"; DROP INDEX "idx_ccgprojecttracking$projectdetails_employee_2_ccgprojecttracking$employee_ccgprojecttracking$projectdetails"; ALTER TABLE "ccgprojecttracking...
<reponame>ojessensky/orcas create or replace package body pa_orcas_extension_parameter is type t_parameter_map is table of varchar2(2000) index by varchar2(2000); pv_parameter_map t_parameter_map; pv_is_map_initialized number := 0; function get_extension_parameter return varchar2 is begin return '@extens...
<filename>migrations/000002_add_movies_check_constraints.up.sql ALTER TABLE movies ADD CONSTRAINT movies_runtime_check CHECK (runtime >= 0); ALTER TABLE movies ADD CONSTRAINT movies_year_check CHECK (year BETWEEN 1888 AND date_part('year', now())); ALTER TABLE movies ADD CONSTRAINT genres_length_check CHECK (array_le...
<reponame>srcarter3/awips2<gh_stars>0 COPY stns.FFGZON(PKEY, STATION_ID, STATION_NUM, NAME, STATE, COUNTRY, LATITUDE, LONGITUDE, WFO) FROM stdin with delimiter as ','; 1,ALZ001,10010,Lauderdale,AL,US,34.89,-87.78, BMX 2,ALZ002,10020,Colbert,AL,US,34.65,-87.83, BMX 3,ALZ003,10030,Franklin,AL,US,34.43,-87.84, BMX 4,ALZ00...
<gh_stars>1-10 SELECT * FROM DEPARTMENTS; SELECT FIRST_NAME NAME FROM EMPLOYEES; SELECT DISTINCT job_id AS JOB From EMPLOYEES; SELECT EMPLOYEE_ID,(END_DATE - START_DATE)/365 FROM JOB_HISTORY; SELECT CITY FROM LOCATIONS WHERE COUNTRY_ID<>'US'; SELECT FIRST_NAME AS NAME, HIRE_DATE FROM EMPLOYEES ORDER BY HIRE_DATE D...
/* This function has been tested with dateparts of month and quarters. Further testing is required to validate that it will work on other dateparts. */ {% macro last_day(date, datepart) %} {{ adapter_macro('dbt_utils_sqlserver.last_day', date, datepart) }} {% endmacro %} {%- macro default_last_day(date, datepart) ...
<filename>master/static/migrations/20210202051432_add-trial-best-val-column.tx.down.sql ALTER TABLE public.trials DROP COLUMN best_validation_id; DROP FUNCTION public.page_info;
<reponame>digitalsatori/narrows<filename>migrations/sqls/20170424171941-dropUsername-up.sql UPDATE users SET email = CONCAT(username, '@example.com') WHERE email IS NULL; ALTER TABLE users DROP username; ALTER TABLE users MODIFY email varchar(128) UNIQUE AFTER id;
select * from ( select * from ( select * from ( select * from ( select * from ( select * from ( select * from ( select * from ( select * from ( select * from ( select * from ( select * from ( select * from ( select * from ( select * from ( select * from ( select * from ( select * from ( select * from ( select * from ( ...
<filename>visconti db/project_canvas_student.sql -- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server version: 5.7.10-log - MySQL Community Server (GPL) -- Server OS: Win32 -- HeidiSQL Version: 9.3.0.4984 -- -------...
<gh_stars>0 /* This function counts the number of facilities located in risk areas scenario_par:integer identifier of the scenario(1) result_name:text name of the restulting variable(edu_risk) result_name_pct:text name of the restulting variable in terms of % of population(atm_prox) amenity_list:text[] array with t...
<filename>backend/src/main/resources/dataTest.sql INSERT INTO tb_disciplina (NOME_DA_DISCIPLINA, CURSO_ENUM) VALUES ('Aerobiologia', 1); INSERT INTO tb_disciplina (NOME_DA_DISCIPLINA, CURSO_ENUM) VALUES ('Anatomia', 1); INSERT INTO tb_disciplina (NOME_DA_DISCIPLINA, CURSO_ENUM) VALUES ('Antropologia', 1); INSE...
<filename>appFacturador/SQL-Scripts/Stored-Procedures/2. Invoice Detail Table/SP_InsertInvoiceDetail.sql --STORED PROCEDURES FOR INVOICE_DETAIL --1. In case we need to switch database --USE marketDB; CREATE PROCEDURE SP_InsertInvoiceDetail ( @ClientId int, @ProductId int, @InvoiceId int, @ProductUnits int, ...
<gh_stars>0 -- MySQL dump 10.13 Distrib 5.7.23, for Linux (x86_64) -- -- Host: db Database: homecloud -- ------------------------------------------------------ -- Server version 5.7.23 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS ...
<reponame>fendys01/Construction-Project ALTER TABLE member_itins ADD COLUMN img varchar(250);
INSERT INTO books (author, title, isbn, image_url, description, bookshelf) VALUES ('<NAME>', 'IT', 'www.fake.com', 'image.jpg', 'This is a scary book', 'this is a test'); INSERT INTO books (author, title, isbn, image_url, description, bookshelf) VALUES ('<NAME>', 'IT2', 'www.fake2.com', 'image2.jpg', 'This is a scary ...
<filename>Databases Basics - MS SQL Server/Built-in Functions/Built-in Functions/Queries for Geography Database .sql USE Geography -- Problem 10 SELECT CountryName, IsoCode FROM Countries WHERE LEN(CountryName) - LEN(REPLACE(CountryName, 'A', '')) >= 3 ORDER BY IsoCode -- Problem 11 SELECT PeakName, RiverName, LOWE...
-- -------------------------------------------------------- -- Poslužitelj: 127.0.0.1 -- Server version: 10.1.9-MariaDB - mariadb.org binary distribution -- Server OS: Win32 -- HeidiSQL Verzija: 9.3.0.4984 -- -------------------------------------------------...
DROP TRIGGER accounts_before_insert;
select 'first down'
CREATE ROLE [RoleA]
-- Set query.name NOT NULL DO $$ BEGIN RAISE NOTICE '--- Running alter-script v 2.2.3: add query.name NOT NULL constraint ---'; RAISE NOTICE 'Removing nameless queries.'; DELETE FROM <misp2_schema>.query WHERE name IS NULL; RAISE NOTICE 'Adding the constraint'; ALTER TABLE...
<filename>prisma/init/17.15.sql<gh_stars>1-10 INSERT INTO "Jutsu" ("id", "name", "description", "kanji", "romaji", "portugues", "games", "mangaPanini", "tvBrasileira", "range", "rank", "handSeals") VALUES (1748, E'Papéis da Resma Explosiva', E'O usuário anexa um papel explosivo em uma kunai e lança como um projétil co...
<reponame>macbre/index-digest<filename>sql/0074-single-column.sql -- Report tables with just a single column -- -- https://github.com/macbre/index-digest/issues/74 DROP TABLE IF EXISTS `0074_bag_of_ints`; CREATE TABLE `0074_bag_of_ints` ( `item_id` int(9) NOT NULL AUTO_INCREMENT, PRIMARY KEY (`item_id`) ) CHARSET=utf...
create table ignore_data ( id integer auto_increment not null, user_id uuid, target_id bigint not null, date timestamp not null, constraint uq_ignore_data_user_id_target_id unique (user_id,target_id), constraint pk...
-- vtab6.test -- -- execsql { -- SELECT * FROM t9 LEFT JOIN (SELECT x, q FROM t10, t11 WHERE t10.y=t11.p) -- ON( a=x); -- } SELECT * FROM t9 LEFT JOIN (SELECT x, q FROM t10, t11 WHERE t10.y=t11.p) ON( a=x);
select count(DISTINCT(address)) as number_current_holders, t.day -- sushi_balance from (SELECT address, SUM(amount)/1e18 as sushi_balance FROM ( SELECT date_trunc('day',evt_block_time) as day, "from" AS address, -value AS amount FROM erc20."ERC20_evt_Transfer" e WHERE contract_address='\x6b359506...
ALTER TABLE orders ADD COLUMN internal_status character varying(50) NOT NULL DEFAULT 'UNCLAIMED';
CREATE VIEW project_group_hours_report_view AS SELECT g.project_id, g.group_title, g.group_pending, g.students, IFNULL( CAST( SUM(TIME_TO_SEC(TIMEDIFF(e.end, e.start))) / 3600 AS DECIMAL(8,2) ), 0 ) AS hours FROM project_group_report_view g LEFT JOIN reservation r USING (group_id...
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 04-06-2021 a las 20:18:43 -- Versión del servidor: 5.7.34-log -- Versión de PHP: 7.3.28 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; CREATE DATABASE appausa...
DELIMITER / INSERT INTO KRIM_TYP_ID_BS_S VALUES(NULL) / INSERT INTO KRIM_TYP_T (KIM_TYP_ID, OBJ_ID, VER_NBR, NM, SRVC_NM, ACTV_IND, NMSPC_CD) VALUES( (SELECT (MAX(ID)) FROM KRIM_TYP_ID_BS_S), UUID(), 1, 'Derived Role: Investigators', 'proposalRoleTypeService', 'Y', 'KC-PD') / INSERT INTO KRIM_ROLE_PERM_ID_BS_S VALUES(N...
DROP DATABASE IF EXISTS jparestresource; create database jparestresource; CREATE USER jparestresource WITH PASSWORD '<PASSWORD>'; GRANT ALL PRIVILEGES ON DATABASE jparestresource to jparestresource;
DROP TABLE IF EXISTS log;
<reponame>andreylipattsev/almanac.httparchive.org #standardSQL # 14_02: AMP plugin version SELECT client, amp_plugin_version, COUNT(0) AS freq, SUM(COUNT(0)) OVER (PARTITION BY client) AS total, COUNT(0) / SUM(COUNT(0)) OVER (PARTITION BY client) AS pct FROM ( SELECT client, url, REGEXP_EXTRACT(...
use product CREATE TABLE _widgets ( id int unsigned NOT NULL AUTO_INCREMENT, name varchar(30), PRIMARY KEY (id), UNIQUE KEY name_idx (name) ) ENGINE=InnoDB; use analytics CREATE TABLE _trending ( content_id int unsigned NOT NULL, content_type char(10) NOT NULL, PRIMARY KEY (content_id, content_type) ) EN...
-- 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 "License"); you may not...
<filename>db/schema/v6/downgrade.sql<gh_stars>1-10 DO $BODY$ BEGIN ASSERT false, 'sorry, downgrade too complicated'; END $BODY$;
/*L Copyright Duke Comprehensive Cancer Center Distributed under the OSI-approved BSD 3-Clause License. See http://ncip.github.com/catrip/LICENSE.txt for details. L*/ delete from annotatable_entity; insert into annotatable_entity values (1); insert into annotatable_entity values (2); insert into annotatable_ent...
--tests last_day with invalid date select last_day(date'2/31/2008') from db_root;
<gh_stars>0 --9. Write a SQL query to find all departments and the average salary for each of them. USE TelerikAcademy SELECT dep.Name, AVG(empl.Salary) AS 'Average Salary' FROM Employees empl INNER JOIN Departments dep ON empl.DepartmentID = dep.DepartmentID GROUP BY dep.Name
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.5.5.1 -- http://www.phpmyadmin.net -- -- Client : 127.0.0.1 -- Généré le : Ven 01 Juin 2018 à 07:58 -- Version du serveur : 5.7.11 -- Version de PHP : 5.6.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@...
<filename>mebel.sql<gh_stars>0 -- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1:3306 -- Время создания: Май 15 2020 г., 22:23 -- Версия сервера: 10.3.13-MariaDB-log -- Версия PHP: 7.1.32 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /...
<reponame>wugenshui/demo-springboot<filename>db/db-flyway/src/main/resources/db/migration/V0.0.2__Beta1.sql CREATE TABLE `bbb` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '编号', `table_name` varchar(200) DEFAULT '' COMMENT '表名称', `table_comment` varchar(500) DEFAULT '' COMMENT '表描述', `sub_table_name` varc...
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Jan 10, 2020 at 04:40 AM -- Server version: 10.4.8-MariaDB -- PHP Version: 7.3.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
<gh_stars>1-10 -- -- PostgreSQL database dump -- SET statement_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = off; SET check_function_bodies = false; SET client_min_messages = warning; SET escape_string_warning = off; SET search_path = dis_history, pg_catalog; SET default_tablespace = '...
<gh_stars>1-10 /* * Copyright (c) 2017 Public Library of Science * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use,...
-- This script enables mixed authentication on SQL Server, creates a user 'rdemo' with password '<PASSWORD>' and gives them the orrec permissions -- Pre-requisites: -- 1) You should connect to the database in the SQL Server of the DSVM with: -- Server Name: localhost -- Integrated authentication is used DECLARE @Use...
CREATE TABLE [dbo].[Files] ( [Id] INT IDENTITY (1, 1) NOT NULL, [Filename] VARCHAR (200) NOT NULL, [ContentType] VARCHAR (200) NOT NULL, [IsImage] BIT NOT NULL, [Append] BIT NOT NULL, [Contents] VARBINARY (MAX) NOT NULL, [Title...
<reponame>bhikkhu-kosalla-china/mint -- This file should undo anything in `up.sql` DROP INDEX IF EXISTS sentences_unique ; DROP TABLE sentences; DROP TYPE TSentenceType
-- Your SQL goes here CREATE TABLE channels ( id SERIAL PRIMARY KEY, uid VARCHAR (36) , title VARCHAR (255) NOT NULL, summary VARCHAR (1024), lang VARCHAR (16) NOT NULL DEFAULT('en'), setting JSON NOT NULL DEFAULT('{}'), status TStatus NOT NULL ...
-- file:jsonb.sql ln:856 expect:true SELECT '["a","b","c",[1,2],null]'::jsonb -> -1