sql
stringlengths
6
1.05M
SELECT * FROM actor LIMIT 100; SELECT * FROM address LIMIT 100; SELECT * FROM city LIMIT 100; SELECT * FROM country LIMIT 100; SELECT * FROM customer LIMIT 100; SELECT * FROM customer_list LIMIT 100; SELECT * FROM film LIMIT 100; SELECT * FROM film_actor LIMIT 100; SELECT * FROM inventory LIMIT 100; SELECT * FROM payme...
<reponame>cognitir/advanced_sql<gh_stars>0 -- with our higher-price orders, do we tend to give more frequent discounts? SELECT CORR(unitprice, discount) FROM order_details; -- Are there any countries that we ship to where we tend to give more -- frequent discounts for our higher priced orders? SELECT o.shipcountry,...
<reponame>frank780117/spring-data-rest-example<gh_stars>1-10 insert into Customer (id, email, firstname, lastname) values (1, '<EMAIL>', 'Dave', 'Matthews'); insert into Customer (id, email, firstname, lastname) values (2, '<EMAIL>', 'Carter', 'Beauford'); insert into Customer (id, email, firstname, lastname) values (3...
<reponame>4O4/crossforms-stdlib CREATE OR REPLACE PACKAGE STD_RECORD_PROPS IS /* * STDLIB for Oracle Forms 10g * Copyright (c) 2017, <NAME> * License: MIT */ ------------------------------------------------------------------------------ -- Public namespace for Built-in Record Properties --------...
-- +migrate up CREATE TABLE IF NOT EXISTS "public"."ev_races" ( "id" serial, "event_id" integer, "game_id" integer, "category_id" integer, "description" text, "video_link" text, "estimate" integer, "created_at" timestamp without time zone, "updated_at" timestamp without time zone, FOREIGN KEY ("even...
<reponame>mcagov/beacons -- Create a trigger to refresh the beacon search materialized view on update into the legacy beacon table CREATE TRIGGER refresh_beacon_search_on_update_into_legacy_beacons AFTER UPDATE ON legacy_beacon FOR EACH STATEMENT EXECUTE PROCEDURE refresh_beacon_search_view(); -- Creat...
UPDATE t_question SET correct = 3 where id = 918;
<reponame>emwalker/digraph<gh_stars>10-100 create extension if not exists "uuid-ossp"; create extension if not exists citext; create table organizations ( id uuid primary key default uuid_generate_v1mc(), name varchar(256) not null ); create table users ( id uuid primary key default uuid_generate_v1mc(), name...
<reponame>Shuttl-Tech/antlr_psql<filename>src/test/resources/sql/select/41bdc6c5.sql<gh_stars>10-100 -- file:oidjoins.sql ln:332 expect:true SELECT ctid, oprleft FROM pg_catalog.pg_operator fk WHERE oprleft != 0 AND NOT EXISTS(SELECT 1 FROM pg_catalog.pg_type pk WHERE pk.oid = fk.oprleft)
<gh_stars>1-10 --liquibase formatted sql --changeset vrafael:framework_20200225_02_dboLinkSet logicalFilePath:path-independent splitStatements:true stripComments:false endDelimiter:\nGO runOnChange:true SET ANSI_NULLS ON SET QUOTED_IDENTIFIER ON GO --------- framework "RecordSQL" v2 (https://github.com/vrafael/records...
-- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTI...
<gh_stars>1-10 /*EP*/ /* Création de vues sur les données éclairage public*/ /* Objectif : Offrir la possibilité de visualiser les données globales dans GCE (impossible via des vues matéralisées) via des jointures entre tables relationnelles pour répondre aux enjeux de gestion par la Communauté de Commune Thann-Cerna...
-- PHP ARTISAN MIGRATION -- MySQL dump 10.13 Distrib 8.0.16, for osx10.14 (x86_64) -- -- Host: status.monitor.barnab.eu Database: cachet -- ------------------------------------------------------ -- Server version 5.5.5-10.4.5-MariaDB-1:10.4.5+maria~bionic /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_...
<gh_stars>0 CREATE TABLE "FINANCE"."HFD"."AMORTIZATION" ( "HFDID" VARCHAR, "PATIENTID" VARCHAR, "DOCDONYM" VARCHAR, "DUEDATE" VARCHAR, "PRINCIPALAMOUNT" VARCHAR, "INTEREST" VARCHAR, "TOTALPAYMENTAMOUNT" VARCHAR, "_ETL_FILENAME" VARCHAR, "_SF_INSERTEDDATETIME" DATETIME );
<reponame>eanderson-ei/nv-admin<gh_stars>0 INSERT INTO scoring_curves_v100 ( attr_value, b_sage_cover, b_shrub_cover, b_forb_cover_arid, b_forb_cover_mesic, b_forb_rich_arid, b_forb_rich_mesic, s_forb_cover_arid, s_forb_cover_mesic, s_forb_cover_meadow, s_forb_rich_arid, ...
ALTER TABLE dialogs ADD COLUMN owner_last_received_at timestamp, ADD COLUMN owner_last_read_at timestamp; UPDATE dialogs SET owner_last_received_at = last_received_at; UPDATE dialogs SET owner_last_read_at = last_read_at; ALTER TABLE dialogs ALTER COLUMN owner_last_received_at SET NOT NULL, ALTER COLUMN owner...
DROP TABLE IF EXISTS project_type; DROP TABLE IF EXISTS project_nfa; DROP TABLE IF EXISTS project_stakeholder; DROP TABLE IF EXISTS stakeholder_factor; DROP TABLE IF EXISTS stakeholder; DROP TABLE IF EXISTS nfa_project; DROP TABLE IF EXISTS metric_nfa; DROP TABLE IF EXISTS type; DROP TABLE IF EXISTS new_nfa; DROP TAB...
<filename>star-tiger-framework-admin/database/sql/ddl/sys_dept.sql drop table if exists sys_dept; create table sys_dept ( dept_flow varchar(32) not null comment '部门流水号', org_flow varchar(32) not null comment '机构流水号', dept_code varchar(50) comment '部门代码', dept_name varchar(500) comment '...
USE `es_extended`; INSERT INTO `items` (`name`, `label`, `weight`) VALUES ('bread', 'Chleba', 1), ('water', 'Voda', 1) ;
-- Table structure for VERSION CREATE TABLE IF NOT EXISTS `VERSION` ( `VER_ID` BIGINT NOT NULL, `SCHEMA_VERSION` VARCHAR(127) NOT NULL, `VERSION_COMMENT` VARCHAR(255), PRIMARY KEY (`VER_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; INSERT INTO VERSION (VER_ID, SCHEMA_VERSION, VERSION_COMMENT) VALUES (1, '', 'In...
UPDATE alipay_gzentity SET <#if alipayGzentity.templateName ?exists && alipayGzentity.templateName ?length gt 0> template_name = :alipayGzentity.templateName, </#if> <#if alipayGzentity.templateId ?exists && alipayGzentity.templateId ?length gt 0> template_id = :alipayGzentity.templateId, </#if> ...
select id, count(*) num from ( (select requester_id id from request_accepted) union all (select accepter_id id from request_accepted) ) as A group by id order by num desc limit 1;
<filename>migrations/4_add_email_to_users_table.sql<gh_stars>1-10 -- +migrate Up ALTER TABLE users ADD COLUMN email VARCHAR(128) DEFAULT "" AFTER id; -- +migrate Down ALTER TABLE users DROP COLUMN email;
<reponame>echo-xiaozhi/bmxt -- MySQL dump 10.13 Distrib 5.5.46, for Linux (x86_64) -- -- Host: localhost Database: b1bdb -- ------------------------------------------------------ -- Server version 5.5.46 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHA...
-- phpMyAdmin SQL Dump -- version 4.2.11 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: May 17, 2018 at 10:06 AM -- Server version: 5.6.21 -- PHP Version: 5.6.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; ...
<gh_stars>0 drop schema if exists MyHobby; create schema MyHobby; ALTER DATABASE MyHobby CHARACTER SET utf8 COLLATE utf8_general_ci; use MyHobby; CREATE TABLE Estudio ( codigo INT NOT NULL UNIQUE AUTO_INCREMENT, nome TEXT ); ALTER TABLE Estudio ADD CONSTRAINT PK_Estudio PRIMARY KEY (codigo); CREATE TABLE Foto ( c...
SELECT t_id + 999999999 AS t_id, 999999904::int8 AS t_basket, 'dm01vch24lv95dgemeindegrenzen_lsnachfuehrung'::varchar(60) AS t_type, NULL::varchar(200) AS t_ili_tid, nbident, identifikator, beschreibung, ST_CurveToLine(perimeter)::geometry(POLYGON,2056) AS perimeter, gueltigkeit, gueltigereintrag FROM agi_dm01avso24....
<reponame>ninjaref/data /** * Inserts a row into the Obstacle table. */ INSERT INTO Obstacle(title, course_id) VALUES (:title, :id) RETURNING obstacle_id;
<reponame>copenhagenr/geo-sql-database INSERT INTO `geo_zones` VALUES (1,'AD','Europe/Andorra'), (2,'AE','Asia/Dubai'), (3,'AF','Asia/Kabul'), (4,'AG','America/Antigua'), (5,'AI','America/Anguilla'), (6,'AL','Europe/Tirane'), (7,'AM','Asia/Yerevan'), (8,'AO','Africa/Luanda'), (9,'AQ','Antarctica/McMurdo'), (10,'AQ','A...
<reponame>13f/picker USE [qichacha] GO /****** Object: Table [dbo].[QichachaCompanySearch] Script Date: 2016/4/20 22:43:09 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[QichachaCompanySearch]( [Keyword] [nvarchar](400) NOT NULL, [CreatedAt] [datetime] NULL, [UpdatedAt] [datetime...
<gh_stars>1-10 CREATE TABLE IF NOT EXISTS rooms ( id BIGINT NOT NULL PRIMARY KEY, objectid BIGINT NOT NULL, objectguid UUID NOT NULL, changeid BIGINT NOT NULL, number VARCHAR(50) NOT NULL, roomtype INT NOT NULL, opertypeid INT NOT NULL, previd BIGINT, nextid BIGINT, updatedate DA...
<reponame>allenalvin333/Hackerrank_DBMS<filename>13.sql -- https://www.hackerrank.com/challenges/weather-observation-station-5/problem SELECT CITY,LENGTH(CITY) FROM STATION ORDER BY LENGTH(CITY), CITY ASC LIMIT 1; SELECT CITY,LENGTH(CITY) FROM STATION ORDER BY LENGTH(CITY) DESC LIMIT 1;
CREATE PROCEDURE [Application].[Configuration_ApplyFullTextIndexing] WITH EXECUTE AS OWNER AS BEGIN IF SERVERPROPERTY(N'IsFullTextInstalled') = 0 BEGIN PRINT N'Warning: Full text options cannot be configured because full text indexing is not installed.'; END ELSE BEGIN -- if full text is installed ...
INSERT INTO `term_relation` (`term_id`, `service_id`, `post_type`, `ID`) VALUES (22, '22', 'post', 1), (29, '21', 'post', 12), (74, '7', 'experience', 17), (70, '7', 'experience', 18), (73, '7', 'experience', 19), (71, '7', 'experience', 20), (75, '7', 'experience', 21), (72, '7', 'experience', 22), (76, '7', 'experien...
<filename>src/main/resources/data.sql INSERT INTO customers values("Paco","Fulanez","<EMAIL>",10001)
<reponame>tizian/Cendric2 INSERT INTO text (text_id, text_type, english, german, swiss_german, spanish) values ('DL_Choice_WhoAreYou', 'dl_npc_thea', 'Who are you?','Wer bist du?','Wer bisch du?', '¿Quién eres?'); INSERT INTO text (text_id, text_type, english, german, swiss_german, spanish) values ('DL_Choice_WhatAreYo...
INSERT INTO orders (id, date, amount, paid) VALUES (1, current_date, 100.0, true); INSERT INTO orders (id, date, amount, paid) VALUES (2, current_date - 1, 50.0, true); INSERT INTO payment (id, order_id, credit_card_number) VALUES (1, 1, '4532756279624064'); INSERT INTO payment (id, order_id, credit_card_number) VALUE...
-- noinspection SqlResolve INSERT INTO User (firstname,lastname,email,dateofbirth,password,role) VALUES ('Admin','User','<EMAIL>',DATE '2000-12-22','admin','ADMIN'),('James','Holder','<EMAIL>',DATE '2000-12-21','jholden','USER'),('Alex','Kamal','<EMAIL>',DATE '2000-12-11','akamal','USER'),('Naomi','Nagato','<EMAIL>',DA...
-- auto Generated on 2020-01-08 -- DROP TABLE IF EXISTS myshop.tb_item_cat; CREATE TABLE myshop.tb_item_cat( id BIGINT (15) NOT NULL AUTO_INCREMENT COMMENT '类目ID', parent_id BIGINT (15) NOT NULL DEFAULT -1 COMMENT '父类目ID=0时,代表的是一级的类目', `name` VARCHAR (50) NOT NULL DEFAULT '' COMMENT '类目名称', `status` INT (11) NOT NU...
CREATE DATABASE IF NOT EXISTS `auth` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin */; USE `auth`; -- MySQL dump 10.13 Distrib 5.7.17, for macos10.12 (x86_64) -- -- Host: 127.0.0.1 Database: auth -- ------------------------------------------------------ -- Server version 5.7.20 /*!40101 SET @OLD_CHARACTER_...
CREATE TABLE IF NOT EXISTS phenotype ( id VARCHAR(255) NOT NULL, allowed_values VARCHAR(255) NOT NULL, created_date TIMESTAMP, description TEXT NOT NULL, last_modified_date TIMESTAMP, phenotype_group VARCHAR(255) NOT NULL, type VARCHAR(255) NOT NUL...
<reponame>piangles/Datastore DROP PROCEDURE IF EXISTS Backbone.CreateTokenBasedCredentialEntry; CREATE PROCEDURE Backbone.CreateTokenBasedCredentialEntry ( IN UserId VARCHAR(25), IN Token VARCHAR(250) ) AS $$ BEGIN INSERT INTO TokenBasedCredentials (UserId, Token) VALUES (UserId, Token); END ...
--Modify EVENT_PAYLOAD Column to BLOB ALTER TABLE STUDENT_PROFILE_REQUEST_EVENT ADD ( EVENT_PAYLOAD_BLOB BLOB ) LOB (EVENT_PAYLOAD_BLOB) STORE AS EVENT_PAYLOAD_BLOB (TABLESPACE API_STUDPROFRQST_BLOB_DATA); UPDATE STUDENT_PROFILE_REQUEST_EVENT SET EVENT_PAYLOAD_BLOB = UTL_RAW.CAST_TO_RAW(EVENT_PAYLOA...
CREATE TABLE IF NOT EXISTS release ( name varchar(128), release_id varchar(256), version varchar(32), metadata text, project varchar(32), PRIMARY KEY(name, version, project) ); CREATE TABLE IF NOT EXISTS package ( project varchar(32), release_id varchar(256), uri varchar(256), ...
CREATE TABLE IF NOT EXISTS `smi_certs` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL, `email` varchar(255) NOT NULL, `cert` text NOT NULL, PRIMARY KEY (`id`), KEY `user_id` (`user_id`) ) ENGINE=InnoDB ; DROP TABLE IF EXISTS `smi_pkcs12`; CREATE TABLE IF NOT EXISTS `smi_pkcs12` ( `acc...
CREATE TABLE mqtt_device ( id bigint NOT NULL, creation_time timestamp without time zone NOT NULL, modification_time timestamp without time zone NOT NULL, version bigint, device_identification character varying(40) NOT NULL, ...
<filename>org.conqat.engine.sourcecode/test-data/org.conqat.lib.parser.partitioner/json_ext.sql create OR replace package json_ext as /* Copyright (c) 2009 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), t...
<reponame>pdv-ru/ClickHouse<filename>tests/queries/0_stateless/01659_array_aggregation_ubsan.sql SELECT arraySum([-9000000000000000000, -9000000000000000000]);
<filename>src/test/tinc/tincrepo/mpp/gpdb/tests/package/language/plr/query02.sql -- start_ignore drop table emp cascade; -- end_ignore CREATE TABLE emp (name text, age int, salary numeric(10,2)); INSERT INTO emp VALUES ('Joe', 41, 250000.00); INSERT INTO emp VALUES ('Jim', 25, 120000.00); INSERT INTO emp VALUES ('Jon',...
<filename>_database/admin_menu.sql /* Navicat MySQL Data Transfer Source Server : MySQL55 Source Server Version : 50523 Source Host : localhost:3399 Source Database : yii2-brainblog Target Server Type : MYSQL Target Server Version : 50523 File Encoding : 65001 Date: 2017-12-13 16:5...
create table aoo(a int, b bigint); create table boo(c char(20)); insert into aoo values(1,1), (2,2), (3,3); insert into boo values('a'), ('b'), ('c'); delete a, b from aoo a, boo b where a.a >1 and b.c='a'; select * from aoo order by a; select * from boo order by c; drop table aoo, boo;
DECLARE @MyCursor CURSOR; DECLARE @tableName varchar(max); BEGIN SET @MyCursor = CURSOR FOR select TABLE_Name from INFORMATION_SCHEMA.TABLES where TABLE_NAME not in ('__MigrationHistory', '__EFMigrationsHistory'); -- Drop constraints OPEN @MyCursor FETCH NEXT FROM @MyCursor INTO @tableName ...
-- {% func Test() %} select 1; -- {% endfunc %}
<reponame>SumOfUs/api-services SELECT userfield.* FROM ak_sumofus.core_userfield userfield JOIN ak_sumofus.core_user user ON user.id = userfield.parent_id WHERE email=?
<reponame>dyoder838/Eat-Da-Burger INSERT INTO burgers (name) VALUES ('Jumbo'); INSERT INTO burgers (name) VALUES ('Big Fat Boss Burger'); INSERT INTO burgers (name, eaten) VALUES ('Messy Burger', true); INSERT INTO burgers (name, eaten) VALUES ('Tiny Burger', true); INSERT INTO burgers (name, eaten) VALUES ('Colossal B...
CREATE TABLE IF NOT EXISTS supplementary_risk ( supplementary_risk_id serial primary key, supplementary_risk_uuid uuid not null unique, risk_source varchar(200) not null, source_id varchar(200) not null, crn ...
<filename>src/main/resources/db/migration/V1.0__users.sql<gh_stars>0 -- https://docs.spring.io/spring-security/site/docs/current/reference/htmlsingle/#user-schema create table `users` ( username varchar(50) not null primary key, password varchar(60) not null, email varchar(255) not null, first_name varchar(120...
<gh_stars>0 /*!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 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 ...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Dec 12, 2016 at 07:48 PM -- Server version: 10.1.19-MariaDB -- PHP Version: 5.6.28 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR...
<filename>dist/tools/sql/server/castle_manor_production.sql CREATE TABLE IF NOT EXISTS `castle_manor_production` ( `castle_id` TINYINT UNSIGNED NOT NULL DEFAULT '0', `seed_id` SMALLINT UNSIGNED NOT NULL DEFAULT '0', `can_produce` BIGINT NOT NULL DEFAULT '0', `start_produce` BIGINT NOT NULL DEFAULT '0', `seed_price...
<gh_stars>100-1000 -- tkt3201.test -- -- execsql { -- CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT); -- INSERT INTO t1 VALUES(1, 'one'); -- INSERT INTO t1 VALUES(2, 'two'); -- } CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT); INSERT INTO t1 VALUES(1, 'one'); INSERT INTO t1 VALUES(2, 'two');
# ************************************************************ # Sequel Pro SQL dump # Version 4541 # # http://www.sequelpro.com/ # https://github.com/sequelpro/sequelpro # # Host: localhost (MySQL 5.6.35) # Datenbank: kittnwp # Erstellt am: 2018-06-02 13:54:05 +0000 # **************************************************...
<gh_stars>10-100 CREATE TYPE [dbo].[TraceFlags] AS TABLE ( [TraceFlag] SMALLINT NULL, [Status] SMALLINT NULL, [Global] SMALLINT NULL, [Session] SMALLINT NULL);
<filename>temoa_utopia.sql<gh_stars>1-10 BEGIN TRANSACTION; /* ------------------------------------------------------- Tables in this section correspond to Sets ------------------------------------------------------- */ -- User-defined flags to split set elements into proper subsets CREATE TABLE time_period_labels (...
<reponame>yang2556269/WX -- phpMyAdmin SQL Dump -- version 4.5.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 2016-09-18 08:27:04 -- 服务器版本: 5.7.11 -- PHP Version: 7.0.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET...
create temp table prs as select ipr.issue_id, pr.created_at, pr.merged_at as merged_at from gha_issues_pull_requests ipr, gha_pull_requests pr where pr.id = ipr.pull_request_id and pr.merged_at is not null and pr.created_at >= '{{from}}' and pr.created_at < '{{to}}' and pr.event_id = ( select i.event_...
{{ config( enabled = False ) }} select * from "{{ this.schema }}"."seed"
-- -- 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 applicable law or agreed to in writing, software -- distribut...
alter table pedido add codigo varchar(36)not null after id; update pedido set codigo = uuid(); alter table pedido add constraint uk_pedido_codigo unique(codigo);
DELIMITER // DROP PROCEDURE IF EXISTS sp_partner_member_orders // /* BPメンバーの注文書一覧 */ CREATE PROCEDURE sp_partner_member_orders ( in_partner_id integer, in_date date ) BEGIN DECLARE curr_ym char(6); DECLARE next_ym char(6); SET curr_ym = DATE_FORMAT(in_date, '%Y%m'); SET next_ym = DATE_FORMAT(...
<reponame>hmah78/OMS_2 -- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Nov 27, 2020 at 03:29 PM -- Server version: 5.7.31 -- PHP Version: 7.3.21 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
-- Add up migration script here CREATE TABLE IF NOT EXISTS api_key ( email VARCHAR(255) PRIMARY KEY, content TEXT ); CREATE TABLE IF NOT EXISTS api_token ( id SERIAL PRIMARY KEY, email VARCHAR(255), last_used DATE NOT NULL DEFAULT CURRENT_DATE, content TEXT );
select name, addr, count(1) from table1 group by name, addr order by name, addr;
SELECT dimtime.DateValue, lanein.Entering_id, col.Name, COUNT(DISTINCT lanein.Card_Id) AS CardCount FROM dbo.DimTime dimtime JOIN CardActivities lanein ON lanein.StartTime <= dimtime.DateValue and lanein.ActivityId = 3 JOIN BoardColumns col on col.Id = lanein.Entering_id LEFT JOIN CardActivities laneout ON lanein.Leav...
<filename>db/sql/20200422160902_add_labels.sql -- +goose Up CREATE TABLE labels ( id serial PRIMARY KEY, key varchar(255), value varchar(255), resource varchar(255), resource_id INTEGER, -- auditing info created_at timestamp NOT NULL DEFAULT (NOW() at time zone 'u...
<filename>posda/posdatools/queries/sql/CreateDicomEditCompareDisposition.sql -- Name: CreateDicomEditCompareDisposition -- Schema: posda_files -- Columns: [] -- Args: ['subprocess_invocation_id', 'process_pid', 'dest_dir'] -- Tags: ['adding_ctp', 'for_scripting'] -- Description: Create an entry in dicom_edit_compare_di...
SELECT o_orderpriority, count(*) AS order_count FROM orders WHERE o_orderdate >= date'1993-07-01' AND o_orderdate < date'1993-07-01' + interval 3 month AND EXISTS ( SELECT * FROM lineitem WHERE l_orderkey = o_orderkey AND l_...
<reponame>ANASMALVAT/HealthPlus<gh_stars>100-1000 -- MySQL dump 10.16 Distrib 10.1.34-MariaDB, for Linux (x86_64) -- -- Host: localhost Database: test_HMS2 -- ------------------------------------------------------ -- Server version 10.1.34-MariaDB /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /...
<reponame>Madhur1997/skeema CREATE TABLE `hasfloat` ( id int(10) unsigned NOT NULL, decimal_is_fine decimal(25,2), float_is_bad float(23), /* annotations: has-float */ float2_is_bad float(7,4), /* annotations: has-float */ double_is_bad double(53,2), /* annotations: has-float */ PRIMARY KEY (`id`) ) ENGINE=...
<reponame>Caprowni/concourse DROP INDEX worker_resource_caches_uniq; DROP INDEX worker_task_caches_uniq; DROP INDEX worker_resource_config_check_sessions_uniq;
<filename>src/olympia/migrations/782-add-theme-update-counts.sql<gh_stars>1-10 CREATE TABLE `theme_update_counts` ( `id` int(11) UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, `addon_id` int(11) UNSIGNED NOT NULL DEFAULT '0', `count` int(11) UNSIGNED NOT NULL DEFAULT '0', `date` date NOT NULL DEFAULT '00...
<filename>src/app/voltdb/voltdb_src/tests/frontend/org/voltdb/planner/testplans-const-ddl.sql CREATE TABLE T1 ( T1_PK INTEGER NOT NULL ,INT1 INTEGER ,CONSTRAINT T1_PK_TREE PRIMARY KEY(T1_PK)); CREATE VIEW V_T1 ( V1 ,COUNT_T1_PK ) AS SELECT INT1 ,COUNT(*) FROM T1 GROUP BY INT1 ...
-- phpMyAdmin SQL Dump -- version 4.7.9 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Apr 03, 2019 at 01:50 PM -- Server version: 5.7.21 -- PHP Version: 7.2.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHA...
<reponame>galenguyer/bartender CREATE TABLE machines ( "id" SERIAL PRIMARY KEY, "name" VARCHAR(255) NOT NULL, "display_name" VARCHAR(255) NOT NULL, "active" BOOLEAN NOT NULL DEFAULT true ); CREATE TABLE items ( "id" SERIAL PRIMARY KEY, "name" VARCHAR(255) NOT NULL, "price" INTEGER ); CREAT...
DROP USER 'localusr'@'localhost'; CREATE USER 'localusr'@'localhost' IDENTIFIED BY '<PASSWORD>'; GRANT DELETE, INSERT, SELECT, UPDATE ON inspectordb.* TO 'localusr'@'localhost'; DROP USER 'lnetusr'@'192.168.1.0/255.255.255.0'; CREATE USER 'lnetusr'@'192.168.1.0/255.255.255.0' IDENTIFIED BY '<PASSWORD>'; GRANT ...
/* Keep this due MS compatibility l:see LICENSE file g:utility r:091128\s.zaglio: added group and continued develop r:090921\s.zaglio: select source code of @obj withhtml t:sp__script_tohtml 'sp__script_tohtml' */ create proc [dbo].[sp__script_parse] @obj sysname=null, @dbg smallint=0 ...
-- Also known as an OUI -- https://standards.ieee.org/develop/regauth/oui/oui.csv CREATE TABLE IF NOT EXISTS IEEEAssignedLargeMediaAccessControlAddressBlocks ( assignedPrefix INTEGER UNSIGNED NOT NULL PRIMARY KEY, registrant VARCHAR(64) NULL, registrantAddress TINYTEXT ...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Apr 05, 2019 at 05:49 AM -- Server version: 10.1.13-MariaDB -- PHP Version: 5.6.21 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR...
<reponame>knaw-huc/elucidate-server<filename>elucidate-server/src/main/resources/database/sql/migrations/v003/03_add_search_by_range.sql<gh_stars>0 --DROP FUNCTION public.annotation_search_by_range(character varying, character varying, integer, integer); CREATE FUNCTION public.annotation_search_by_range( _targe...
<filename>db/migrations/001_init_database.up.sql create table if not exists users( id INTEGER NOT NULL PRIMARY KEY, name VARCHAR, hash VARCHAR, token VARCHAR, created DATETIME DEFAULT CURRENT_TIMESTAMP, updated DATETIME DEFAULT CURRENT_TIMESTAMP );
<gh_stars>0 SELECT nomeproduto, nomecategoria FROM produtos AS p INNER JOIN categorias AS c ON p.categoriaID = c.categoriaID
-- Revert yabon-prono:bet-with-gain from pg BEGIN; DROP VIEW bet_with_gain; COMMIT;
<gh_stars>1-10 -- Source: https://msdn.microsoft.com/en-us/library/ms175466(v=sql.110).aspx USE tempdb; GO DECLARE @myDoc XML; SET @myDoc = '<Root> <ProductDescription ProductID="1" ProductName="Road Bike"> <Features> </Features> </ProductDescription> ...
-- phpMyAdmin SQL Dump -- version 4.0.4.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jul 23, 2013 at 03:37 PM -- Server version: 5.5.32 -- PHP Version: 5.3.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */...
<reponame>truthly/pg-cbor<filename>FUNCTIONS/major_type_6.sql CREATE OR REPLACE FUNCTION cbor.major_type_6( cbor bytea, encode_binary_format text, additional_type integer, length_bytes integer, data_value numeric ) RETURNS cbor.next_state IMMUTABLE LANGUAGE plpgsql AS $$ BEGIN IF additional_type = 2 THEN RETURN ( ...
<gh_stars>1-10 create database bancopw; use bancopw; create table tb_transacao( cd_transacao int primary key auto_increment, vl_transacao float, dt_transacao date, st_transacao varchar(50), ds_transacao varchar(255), id_forma int null, id_categoria int null, id_usuario int null); create table tb_forma( cd_forma int ...
CREATE TABLE IF NOT EXISTS networkInfo ( id INTEGER PRIMARY KEY AUTOINCREMENT, version int, subversion VARCHAR(255), protocolversion int, localservices VARCHAR(255), timeoffset int, connections int, networks text, relayfee float, localaddresses text, warnings VARCHAR(255), createdAt int )
<filename>packages/types/verify/schemas/public/domains/url.sql<gh_stars>10-100 -- Verify schemas/public/domains/url on pg BEGIN; SELECT verify_type ('public.url'); ROLLBACK;
-- file:privileges.sql ln:252 expect:true SELECT * FROM atest2
<reponame>scheltwort-it-services/common_schema<gh_stars>100-1000 SET @s := 'The quick brown fox'; SELECT decode_xml(@s) = @s ;