sql
stringlengths
6
1.05M
<reponame>huangrongwei/zhe800<filename>doc/zhe800.sql /* Navicat MySQL Data Transfer Source Server : mydata Source Server Version : 50714 Source Host : localhost:3306 Source Database : zhe800 Target Server Type : MYSQL Target Server Version : 50714 File Encoding : 65001 Date: 2018-...
<filename>Source/Apps/Microsoft/Released/Microsoft-SCCM2/Service/Database/NoETL/20 tables.sql SET ANSI_NULLS ON; SET ANSI_PADDING ON; SET ANSI_WARNINGS ON; SET ANSI_NULL_DFLT_ON ON; SET CONCAT_NULL_YIELDS_NULL ON; SET QUOTED_IDENTIFIER ON; go CREATE TABLE pbist_sccm.clienthealthclientinstalledversiondetails ( net...
<gh_stars>1-10 -- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 25 Jul 2020 pada 18.02 -- Versi server: 10.1.36-MariaDB -- Versi PHP: 7.2.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!4010...
<reponame>NaturalSolutions/ecoReleve-Data<gh_stars>10-100 SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER View [dbo].[VGSMData_With_EquipIndiv] as ( SELECT t.FK_Individual,s.ID as FK_Sensor,t.StartDate,t.EndDate, a.DateTime as date, a.Latitude_N as lat, a.Longitude_E as lon, a.Altitude_m as ele, 'gsm...
<reponame>scheltwort-it-services/common_schema call _create_array(@array_id); call _concatenate_array_elements(@array_id, '-', @result); select @result IS NULL;
/* * This document is a part of the source code and related artifacts * for CollectionSpace, an open source collections management system * for museums and related institutions: * * http://www.collectionspace.org * http://wiki.collectionspace.org * * Copyright © 2009 Regents of the University of California * ...
<gh_stars>1-10 CREATE DATABASE photos; BEGIN; CREATE USER photo WITH LOGIN SUPERUSER INHERIT NOCREATEDB CREATEROLE NOREPLICATION PASSWORD 'password'; ALTER ROLE photo SET client_encoding TO 'utf8'; ALTER ROLE photo SET default_transaction_isolation TO 'read committed'; ALTER ROLE photo SET timezone TO ...
CREATE TABLE smallint_table ( ID BIGSERIAL PRIMARY KEY NOT NULL, value SMALLINT ); CREATE TABLE integer_table ( ID BIGSERIAL PRIMARY KEY NOT NULL, value INTEGER ); CREATE TABLE bigint_table ( ID BIGSERIAL PRIMARY KEY NOT NULL, value BIGINT ); CREATE TABLE serial_table ( ID SERIAL PRIMARY KE...
-- phpMyAdmin SQL Dump -- version 4.4.15.10 -- https://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: 2020-04-22 11:38:12 -- 服务器版本: 5.5.61-log -- PHP Version: 5.6.37 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40...
<reponame>Trivadis/pgbasenv<filename>scripts/index_stats.sql -- NAME: index_stats -- VERSION: -- DESCRIPTION: Collect postgres index stats. /*collect postgres index stats collection is done via pg_stat_user_tables pg_statio_user_tables pg_statio_user_indexes table_stats */ with table_stats as ( select psut.relname,...
<reponame>yudong2015/openpitrix ALTER TABLE runtime ADD COLUMN owner_path VARCHAR(255) NOT NULL; CREATE INDEX runtime_owner_path_idx ON runtime (owner_path); UPDATE runtime SET owner_path = CONCAT(':', owner); ALTER TABLE runtime_credential ADD COLUMN owner_path VARCHAR(255) NOT NULL; CREATE INDEX runtime_credenti...
CREATE TABLE Entity1 ( id INTEGER IDENTITY PRIMARY KEY, value VARCHAR(50) NOT NULL );
<reponame>WormBase/intermine<gh_stars>1-10 \set sf_pid '\''Transcript:Y110A7A.10.2'\'' SELECT sf.primaryidentifier, location.* FROM sequencefeature sf JOIN location ON sf.chromosomelocationid = location.id WHERE primaryidentifier = :sf_pid ;
<reponame>LarsGrootkarzijn/LogitechMediaServer_SimpleAudio DROP TABLE IF EXISTS scanned_files; CREATE TABLE scanned_files ( url text NOT NULL COLLATE NOCASE, -- URL must be case insensitive, or we might duplicate tracks if the filename changes case only (https://github.com/Logitech/slimserver/issues/705#issuecomment...
/* This file is not used but here for reference */ CREATE USER starter WITH PASSWORD '<PASSWORD>'; CREATE DATABASE starter; GRANT ALL PRIVILEGES ON DATABASE starter TO starter;
-- @testpoint: 添加、修改、删除user列 drop table if exists user_05; create table user_05 (name varchar(13),school varchar(13)); alter table user_05 add "user" char(10); update user_05 set "user"='aa'; alter table user_05 drop "user"; drop table if exists user_05;
<gh_stars>0 DROP TABLE IF EXISTS STORE; DROP TABLE IF EXISTS COMPANY; CREATE TABLE COMPANY ( id VARCHAR(250) NOT NULL, user_owner VARCHAR(250) NOT NULL, name VARCHAR(250) NOT NULL, document VARCHAR(250) NOT NULL ); CREATE TABLE STORE ( id VARCHAR(250) NOT NULL, name VARCHAR(250) NOT NULL, ...
-- Hometeam per league per season stats CREATE TABLE hometeam_stats AS (SELECT home.home_team AS hometeam, season, league, SUM(home.h_win) AS home_win, SUM(home.h_loss) AS home_loss, SUM(home.h_draws) AS home_draws, SUM(home.home_team_goal) AS home_goals, ...
select * from albums; select albums.id, albums.title, albums.created_at, media.id media_id, media.url media_url, media.type media_type from albums LEFT OUTER JOIN albumCovers on albums.id == albumCovers.album_id LEFT OUTER JOIN media ON albumCovers.media_id == media.id ORDER BY albums.created_at DESC; select media.id...
 CREATE PROCEDURE dotnetnuke_dukes.[dnn_EngageEmployment_spGetDocument] @documentId int AS SELECT [DocumentId], [UserId], [FileName], [ContentType], [ContentLength], [ResumeData], [RevisionDate], [DocumentTypeId] FROM dnn_EngageEmployment_vwDocuments WHERE DocumentId = @documentId
<reponame>nikolaygornakov/SoftUni-Database-Basics-MSSQL-Server USE SoftUni GO SELECT DepartmentID, Salary AS ThirdHighestSalary FROM ( SELECT DepartmentID, MAX(Salary) AS Salary, DENSE_RANK() OVER(PARTITION BY DepartmentID ORDER BY Salary DESC) AS [Rank] FROM Employees GROUP BY DepartmentID, Salary...
<filename>sql/V1__create_events_table.sql CREATE TABLE events ( event_id VARCHAR(40) NOT NULL PRIMARY KEY, event_type VARCHAR(20) NOT NULL, timestamp TIMESTAMP NOT NULL, details JSON NOT NULL );
# Sequel Pro dump # Version 1191 # http://code.google.com/p/sequel-pro # # Host: localhost (MySQL 5.1.39-log) # Database: NRC_Data # Generation Time: 2012-10-30 16:14:05 -0400 # ************************************************************ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @...
<gh_stars>10-100 update egcl_collectionheader set source='SYSTEM' where source is null;
<filename>Assignments/Assignment 3/Solutions/task4.sql SET ECHO ON; SPOOL task4.lst; SET LINESIZE 300; /* * Task 4 */ SET ECHO ON; SET FEEDBACK ON; SET LINESIZE 100; SET PAGESIZE 100; SET SERVEROUTPUT ON; -- Question 4.1 CREATE OR REPLACE PROCEDURE WHOTAUGHT (SubjectCode IN SUBJECT.CODE%TYPE) IS LecturerFirstN...
<gh_stars>1-10 INSERT INTO provincia (id_provincia, nombre, codigo_31662) VALUES (1, '<NAME>', 'AR-B'), (2, 'CATAMARCA', 'AR-K'), (3, 'CHACO', 'AR-H'), (4, 'CHUBUT', 'AR-U'), (5, '<NAME>', 'AR-C'), (6, 'CORDOBA', 'AR-X'), (7, 'CORRIENTES', 'AR-W'), (8, '<NAME>', 'AR-E'), (9, 'FORMOSA', 'AR-P'), (10, 'JUJUY', 'AR-Y'), (...
# Write your MySQL query statement below select * from cinema where id%2 =1 and description!="boring" order by rating desc;
<filename>src/test/resources/sql/select/450227b6.sql -- file:interval.sql ln:308 expect:true select make_interval(secs := 'inf')
<filename>samples/audit/config/scripts/20_logon_audit_issue.sql<gh_stars>10-100 ---------------------------------------------------------------------------- -- Trivadis AG, Infrastructure Managed Services -- Saegereistrasse 29, 8152 Glattbrugg, Switzerland -------------------------------------------------------------...
DROP DATABASE IF EXISTS techtalk_db; CREATE DATABASE techtalk_db;
begin atomic declare count_quarter int default 0; declare cur_quarter int default 0; declare cur_amt int default 0; declare cur_tx int default 0; declare cur_date date; declare cur_item char(10); declare i int default 1; declare j int default 0; ...
<filename>pipelying.sql /* Navicat MySQL Data Transfer Source Server : localhost_3306 Source Server Version : 50549 Source Host : localhost:3306 Source Database : pipelying Target Server Type : MYSQL Target Server Version : 50549 File Encoding : 65001 Date: 2019-01-13 2...
<gh_stars>100-1000 /* * 有来商城数据库 * MySQL8.x版本 */ -- ---------------------------- -- 系统管理数据库 -- ---------------------------- CREATE DATABASE IF NOT EXISTS youlai DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_general_ci; -- ---------------------------- -- 商城会员数据库 -- ---------------------------- CREATE DATABASE IF...
create table foo(text varchar(32)) reuse_oid; commit; insert into foo values('1'); insert into foo values('2'); insert into foo values('3'); insert into foo values('4'); insert into foo values('5'); insert into foo values('6'); select * from foo order by 1; insert into foo values('7'); delete from foo where text=...
<filename>database/db_nylesouth.sql<gh_stars>0 /* Navicat Premium Data Transfer Source Server : localhost mysql Source Server Type : MySQL Source Server Version : 100137 Source Host : localhost:3306 Source Schema : db_nylesouth Target Server Type : MySQL Target Server Version :...
<reponame>CMU-CS-445-HIS-Group-6/CEO_MeMo -- -------------------------------------------------------- -- Host: localhost -- Server version: 10.5.10-MariaDB-log - mariadb.org binary distribution -- Server OS: Win64 -- HeidiSQL Version: 10.2.0.5599 -- -...
CREATE DATABASE parqueadero; -- CREATE TABLE vehiculos ( id serial PRIMARY KEY, placa varchar(10) COLLATE utf8_spanish_ci NOT NULL, valor decimal(10,2) NOT NULL DEFAULT 0.00, status boolean DEFAULT TRUE, createdAt timestamp DEFAULT now(), updatedAt timestamp ); SET @placa = 'TMI090'; SET @consulta_placa = (S...
<reponame>jorgenorena/SQL-Grade-System /* Insert student */ INSERT INTO students_courses (student_id, course_id) SELECT students.id, courses.id FROM students, courses WHERE students.full_name = '<NAME>' AND courses.name = 'Numerical Methods' AND courses.term = '2s2021'; /* Insert teaching assistant */ INSERT ...
SELECT EXT_ORG_ID , EFFDT , EFF_STATUS , EXT_ORG_TYPE , DESCR , DESCR50 , DESCRSHORT , ORG_CONTACT , ORG_LOCATION , ORG_DEPARTMENT , PROPRIETORSHIP , SETID , LASTUPDDTTM FROM PS_EXT_ORG_TBL WHERE 1=1 ORDER BY EXT_ORG_ID, EFFDT
<reponame>sean-pettersen/spettersen_IMT577<filename>IMT577/SQL/SQL_ITSession/create_dim_planet.sql /***************************************** Course: IMT 577 Instructor: <NAME> IT Session: 6 Date: 11/15/2021 *****************************************/ --CREATE TABLE CREATE OR REPLACE TABLE Dim_Planets( DimPlanetID ...
/*This file contains all of the values and tuples we are inserting into each database table. You may add values into this file, but be sure to check for foreign keys and restrictions in the create.sql file which specifies the datatypes, and restrictions for each atrtibute value*/ /* Primarily made by <NAME>, <NAME>, <...
SELECT wos_id, issn, doi, title, pubtype, doctype, volume, issue, pubyear, pubmonth, pubday, source, abstract FROM union_publications WHERE source IN ('AMERICAN ECONOMIC REVIEW', 'ECONOMETRICA', 'QUARTERLY JOURN...
<filename>v1.5/helpers/taxa/taxonqueryecolgroup.sql<gh_stars>1-10 SELECT DISTINCT ecg.taxonid, array_agg(ecg.ecolgroupid) AS ecolgroup, FROM ndb.ecolgroups ecg WHERE (${taxonid} IS NULL OR ecg.taxonid IN (${taxonid:csv})) AND (${ecolgroupid} IS NULL OR ecg.ecolgroupid = ${ecolgroupid}) GROUP B...
<filename>schema/core.sql<gh_stars>1-10 CREATE DATABASE wcore USE wcore CREATE TABLE w_user( id INT NOT NULL PRIMARY KEY auto_increment, -- primary key column w_id VARCHAR(32) NOT NULL unique, ext_id VARCHAR(32) NOT NULL, w_type INT NOT NULL DEFAULT 0, create_time BIGINT NOT NULL DEFAULT 0, ...
<filename>ProblemSets/PS3/PS3_Carpenter.sql sqlite> .mode csv sqlite> .import /home/ouecon022/DScourseS20/ProblemSets/PS3/FL_insurance_sample.csv d f sqlite> SELECT * ...> FROM df ...> LIMIT 10; sqlite> SELECT DISTINCT cou...
<reponame>msuliborski/database-tasks USE HR --1. SELECT department_name FROM departments WHERE department_id IN (SELECT department_id FROM employees WHERE salary < (SELECT AVG(salary) FROM employees)/2) --2. SELECT COUNT(department_id) FROM departments WHERE manager_id IS NULL -- 3. SELECT countries.country_name,...
CREATE TABLE log_tabla ( user_id VARCHAR2(30), object_type VARCHAR2(20), object_name VARCHAR2(30), object_owner VARCHAR2(30), creation_date DATE); CREATE OR REPLACE TRIGGER insercion_log AFTER CREATE ON DATABASE BEGIN INSERT INTO log_tabla (user_id, object_type, ob...
<gh_stars>10-100 USE employees; DESCRIBE employees; DESCRIBE departments; USE ada_678; /* Using the example from the lesson, re-create the employees_with_departments table. */ CREATE TEMPORARY TABLE employees_with_departments AS SELECT emp_no, first_name, last_name, dept_no, dept_name FROM employees.employees JOIN e...
<filename>oracle/sqlplus/coe.sql /*[[MOS#215187.1: Generate SQL Profile based on target SQL. Usage: coe [SQL_ID] [PLAN_HASH_VALUE] REM $Header: 215187.1 coe_xfr_sql_profile.sql 11.4.1.4 2010/07/12 csierra $ REM REM Copyright (c) 2000-2010, Oracle Corporation. All rights reserved. REM REM AUTHOR REM <EMAIL> REM REM S...
SET @sName = 'bx_timeline'; -- CONTENT PLACEHOLDERS DELETE FROM `sys_pages_content_placeholders` WHERE `module`=@sName AND `title`='_bx_timeline_page_content_ph_timeline'; SET @iCPHOrder = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_pages_content_placeholders` ORDER BY `order` DESC LIMIT 1); INSERT INTO `sys_page...
<filename>migrations/20180605231218_remove_gtcc_ppm_advance.up.sql UPDATE reimbursements r SET method_of_receipt = 'OTHER_DD' WHERE method_of_receipt = 'GTCC' AND r.id in ( SELECT advance_id from personally_procured_moves );
create trigger Cofoundry.PageVersion_CascadeDelete on Cofoundry.PageVersion instead of delete AS begin set nocount on; if not exists (select * from deleted) return declare @DefinitionCode char(6) = 'COFPGV' -- Dependencies delete from Cofoundry.UnstructuredDataDependency from Cofoundry.UnstructuredDat...
CREATE DATABASE IF NOT EXISTS `zg6kbqpoxrbx4hox`;
-- MySQL dump 10.13 Distrib 5.7.13, for osx10.11 (x86_64) -- -- Host: localhost Database: bitnami_wordpress -- ------------------------------------------------------ -- Server version 5.7.13 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RE...
-- find the top-level corpus ALTER TABLE _corpus ADD top_level boolean; CREATE TRIGGER unique_toplevel_corpus_name BEFORE UPDATE ON _corpus FOR EACH ROW EXECUTE PROCEDURE unique_toplevel_corpus_name(); UPDATE _corpus SET top_level = 'n'; UPDATE _corpus SET top_level = 'y' WHERE pre = (SELECT min(pre) FROM _corpus); --...
create database IDENTITY_DB; create database UM_DB; create database REG_DB; use IDENTITY_DB; source ~/wso2is/dbscripts/identity/mysql-5.7.sql; use UM_DB; source ~/wso2is/dbscripts/mysql5.7.sql; use REG_DB; source ~/wso2is/dbscripts/mysql5.7.sql; -- add tables that could vary in different IS packs use IDENTITY_DB; CRE...
CREATE TABLE IF NOT EXISTS table_name( column_name1 ); CREATE TEMP TABLE database_name.table_name( column_name1, column_name2 ); CREATE TEMPORARY TABLE table_name( column_name1, column_name2, CHECK(column_name1 == 1) ); CREATE TABLE table_name( column_name1, column_name2, CHECK(colum...
CREATE DATABASE IF NOT EXISTS `arrowhead`; USE `arrowhead`; CREATE TABLE IF NOT EXISTS `service_registry` ( `id` bigint(20) NOT NULL, `end_of_validity` datetime(6) DEFAULT NULL, `metadata` varchar(255) DEFAULT NULL, `service_uri` varchar(255) DEFAULT NULL, `udp` char(1) DEFAULT NULL, `version` int(11) DEF...
<reponame>parc-jason/mds<filename>migrations/sql/V2019.09.26.11.16__alter_status_dates_to_datetimes.sql ALTER TABLE mine_status ALTER COLUMN effective_date TYPE timestamp with time zone; ALTER TABLE mine_status ALTER COLUMN expiry_date TYPE timestamp with time zone;
CREATE OR REPLACE VIEW hdb_catalog.hdb_function_agg AS ( SELECT p.proname::text AS function_name, pn.nspname::text AS function_schema, CASE WHEN (p.provariadic = (0) :: oid) THEN false ELSE true END AS has_variadic, CASE WHEN ( (p.provolatile) :: text = ('i' :: character(1)) :: text ) ...
<reponame>abbasjavan/testguru ALTER TABLE static_commit_line_blame ADD COLUMN CREATED timestamp DEFAULT NOW(); ALTER TABLE COMMIT_HISTORY_GRAPH ADD COLUMN CREATED timestamp DEFAULT NOW();
-- To prevent mempool from filling blocks with reverted priority operations -- out of order, we keep a track of them. ALTER TABLE mempool_txs ADD COLUMN next_priority_op_serial_id BIGINT DEFAULT NULL;
drop table if exists tmp_tender_summary; create table tmp_tender_summary AS select r.id, r.release_type, r.collection_id, r.ocid, r.release_id, r.data_id, tender from (select data -> 'tender' AS tender, rs.* from tmp_release_summary_with_release_data rs ...
<filename>migrations/305-perms-stats.sql INSERT INTO groups VALUES (50000, 'Mozilla Corporation', 'Stats:View', NOW(), NOW()); INSERT INTO groups VALUES (50001, 'Statistic Viewers', 'Stats:View,CollectionStats:View', NOW(), NOW()); INSERT INTO groups_users ( SELECT NULL, 50000, groups_users.user_id FROM groups, group...
-- @testpoint:比较两个字符串,大小写相同,结果为t SELECT 'abc' ilike 'abc' AS RESULT;
-- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64) -- -- Host: 192.168.2.254 Database: proyectosfa -- ------------------------------------------------------ -- Server version 5.7.12-0ubuntu1.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_...
<gh_stars>0 CREATE TABLE [dbo].[ApplicationTables]( [ApplicationTableId] [int] IDENTITY(1,1) NOT NULL, [TableName] [nvarchar](255) NULL, [Model] [nvarchar](255) NULL );
<reponame>manuGarciaMons/PHP #inserts para categorias INSERT INTO categorias VALUES(NULL, 'Acción'); INSERT INTO categorias VALUES(NULL, 'Rol'); INSERT INTO categorias VALUES(NULL, 'Deportes'); #inserts para entradas INSERT INTO entradas VALUES(NULL,1,1,'Novedades de Gta 5 Online', 'Reviwe de GTA 5', CURDATE()); IN...
<reponame>ljangwon/ajax_upload CREATE TABLE gallery( id INT(11) PRIMARY KEY AUTO_INCREMENT, title VARCHAR(100), file_name VARCHAR(40) )ENGINE=INNODB;
<filename>database/localry.sql # Host: localhost (Version 5.5.5-10.1.28-MariaDB) # Date: 2018-04-07 09:53:48 # Generator: MySQL-Front 6.0 (Build 2.20) # # Structure for table "attaches" # DROP TABLE IF EXISTS `attaches`; CREATE TABLE `attaches` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `ref_id` int(11)...
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Feb 14, 2017 at 08:23 AM -- 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=@@CHARACTER_SET_CL...
-- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Sep 12, 2017 at 11:24 AM -- Server version: 10.1.21-MariaDB -- PHP Version: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
<reponame>egalli64/hron -- examples on comparison operators alter session set current_schema = hron; -- equality select * from region where region_id = 1; -- difference select * from region where region_id != 2; -- difference, alternative notation select * from region where region_id <> 2; -- strictly less than sel...
<reponame>MaxenceMeissirel/Crime-Data-Management-SQL -- list criminals and the number of crimes they each one have Select P.person_ID, P.first_name 'First Name', P.last_name '<NAME>', count(VC.implicated_ID) 'Suspected Committed Crime', count(PEN.Penalty_ID) 'Certain Committed Crime' ...
<gh_stars>1-10 version https://git-lfs.github.com/spec/v1 oid sha256:c6a040a97fbef135cda99d0e0d2edae5d189787a3e8a33c8ae8bdb6ee3756be1 size 8358
/************************************************************************************* * Create views for exercise_session table *************************************************************************************/ BEGIN; /* Cleanup */ DROP VIEW IF EXISTS get_exercise_session CASCADE; DROP VIEW IF EXISTS ge...
CREATE OR REPLACE VIEW watchops.deployments AS WITH deploys AS ( SELECT source, metadata->'deployment'->>'id' as deploy_id, time_created, CASE WHEN source like '%circleci%' then metadata->'workflow'->>'id' WHEN source like '%github%' then metadata->'deployment'->>'sha' ...
create view "postgres"._airbyte_test_normalization."nested_stream_with_c__ion_double_array_data_ab3__dbt_tmp" as ( -- SQL model to build a hash column based on the values of this record select md5(cast(coalesce(cast(_airbyte_partition_hashid as varchar ), '') || '-' || coalesce(cast("id" as varcha...
select "Running krrelease/datasql/KR_01_KREN_CHNL_T.sql..."; \. krrelease/datasql/KR_01_KREN_CHNL_T.sql select "Running krrelease/datasql/KR_01_KREN_PRODCR_T.sql..."; \. krrelease/datasql/KR_01_KREN_PRODCR_T.sql select "Running krrelease/datasql/KR_01_KRIM_AFLTN_TYP_T.sql..."; \. krrelease/datasql/KR_01_KRIM_AFLTN_TYP_...
<filename>server/prisma/migrations/20211104020512_init/migration.sql<gh_stars>1-10 -- CreateTable CREATE TABLE "Donation" ( "id" TEXT NOT NULL PRIMARY KEY, "count" INTEGER NOT NULL, "displayName" TEXT NOT NULL, "email" TEXT NOT NULL, "mobile" TEXT, "message" TEXT, "team" TEXT, "createdAt...
<reponame>bcgov/cas-ggircs-ciip-2018 -- Deploy ggircs:ciip_table_production to pg -- requires: ciip_table_application begin; create table ciip_2018.production ( id serial primary key, application_id integer references ciip_2018.application(id), facility_id in...
# INSERT INTO oauth_client_details # (client_id, resource_ids, client_secret, scope, authorized_grant_types, # web_server_redirect_uri, authorities, access_token_validity, refresh_token_validity, # additional_information, autoapprove) # VALUES # ('admin-client', 'oauth2-resource', 'admin-secret', 'read,write', 'pass...
<filename>management.api/src/main/resources/db/migration/derby/V20200329_07__PartyIdentifierType.sql CREATE TABLE Party_Identifier_Type ( Name VARCHAR(128) NOT NULL , Description VARCHAR(256) , ManagedBy_Party_Id BIGINT , Processed TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , CONSTRAINT PARTY...
PROMPT Run user examples set echo off set feedback off set linesize 1000 prompt Common examples from web exec ut_ansiconsole_helper.color_enabled(true); @@award_bonus/run_award_bonus_test.sql @@between_string/run_betwnstr_test.sql @@remove_rooms_by_name/run_remove_rooms_by_name_test.sql @@demo_of_expectations/run....
CREATE OR REPLACE PROCEDURE chess.surrender( p_user_id INT) LANGUAGE 'plpgsql' AS $BODY$ DECLARE v_game chess.game%ROWTYPE; BEGIN LOCK TABLE only chess.game; SELECT * INTO v_game FROM chess.game WHERE (chess.game.user_id1 = p_user_id or chess.game.user_id2 = p_user_id) and chess.game.is_play...
<reponame>jensim/sourcegraph<filename>migrations/frontend/1528395731_add_nearest_upload_direction.up.sql BEGIN; ALTER TABLE lsif_nearest_uploads ADD COLUMN ancestor_visible boolean; ALTER TABLE lsif_nearest_uploads ADD COLUMN overwritten boolean; UPDATE lsif_nearest_uploads SET ancestor_visible = false, overwritten = ...
<reponame>blinkops/queries-aws-compliance with bad_policies as ( select arn, count(*) as num_bad_statements from aws_iam_policy, json_each(policy_std, '$.Statement') as s, json_each(s.value, '$.Resource') as resource, json_each(s.value, '$.Action') as action where json_extract(s.value,...
<gh_stars>1-10 CREATE SEQUENCE [dbo].[SN] AS INT START WITH 1 INCREMENT BY 1 NO MAXVALUE NO CYCLE CACHE 10
<gh_stars>1000+ ALTER TABLE hydra_oauth2_consent_request ADD forced_subject_identifier VARCHAR(255) NULL DEFAULT ''; ALTER TABLE hydra_oauth2_authentication_request_handled ADD forced_subject_identifier VARCHAR(255) NULL DEFAULT ''; CREATE TABLE hydra_oauth2_obfuscated_authentication_session ( subject varc...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Anamakine: 127.0.0.1 -- Üretim Zamanı: 15 Oca 2018, 23:53:00 -- Sunucu sürümü: 10.1.21-MariaDB -- PHP Sürümü: 7.1.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHA...
-- @testpoint:插入一条数据,结合使用insert..update,insert...nothing语句 --预置条件enable_upsert_to_merge为off drop table if exists products_c7; --建表,指定一列是主键 CREATE TABLE products_c7 ( product_no integer PRIMARY KEY, name text, price numeric ); --常规插入一条数据 insert into products_c7 values(10,'grains',5.5); select * from produ...
CREATE EXTENSION IF NOT EXISTS postgis; CREATE EXTENSION IF NOT EXISTS pg_trgm; CREATE EXTENSION IF NOT EXISTS hstore; CREATE SCHEMA IF NOT EXISTS main; CREATE SCHEMA IF NOT EXISTS main_static;
insert into KokyakuKouza ( shiten_code , kamoku_code , kouza_no , kokyaku_no , kaisetu_date , syuki_zandaka , genzai_zandaka , update_ts) values ( 's001', 'k01', '1234567', 1, '2020-01-01 00:00:00', 10, 10, '2020-01-01 00:00:00'), ( 's001', 'k02', '1234567', 1, '2020-01-01 00:00:00', 10, 10, '2020-0...
-- ${flyway:timestamp} create or replace function housedb_timeseries.error_no_conversion() returns text as $$ begin return 'ZX091'; end; $$ language plpgsql; create or replace function housedb_timeseries.error_bad_formula() returns text as $$ begin return 'ZX092'; end; $$ language plpgsql; create or replace function ...
select * from django_admin_log where content_type_id = '42' and object_repr like 'Uyir%' -- above, we are querying the admin log. to determine content type ID -- go to python -- >>> from django.contrib.admin.models import ContentType -- >>> [(x.id, x.name) for x in ContentType.objects.all() if x.name == 'Program Sche...
<reponame>DrGabenator/GitC<gh_stars>0 select BL.Nome, COUNT(LV.Id) as 'Quantidade de livros', US.Nome as 'UserName' from Biblioteca BL inner join Livros LV on BL.Id = LV.Biblioteca inner join Usuario US on LV.UsuInc = US.Id group by BL.Nome, US.Nome
DROP TABLE IF EXISTS accounts; CREATE TABLE accounts( uid int(11) primary key auto_increment, uname varchar(30) NOT NULL, passwd varchar(255) NOT NULL, rtime date NOT NULL ); DROP TABLE IF EXISTS upinfo; CREATE TABLE upinfo( upid int(11) primary key, upname varchar(64) NOT NULL, des varchar...
INSERT INTO Manager(Email, LoginName, LoginPassword, Name, Surname , DateOfCreate, ConfirmedEmail, Activated) VALUES ('<EMAIL>', 'admin123', '12345678', 'Admin', 'Test' , GETDATE(), 'Yes', 'Yes'); INSERT INTO Customer(Email, LoginName, LoginPassword, DateOfCreate, ConfirmedEmail, Activated) VALUES ('<EMAIL>', 'user123...
-- phpMyAdmin SQL Dump -- version 4.1.12 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Sep 10, 2014 at 12:53 AM -- Server version: 5.6.16 -- PHP Version: 5.5.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
CREATE SCHEMA IF NOT EXISTS manage_indexes; CREATE TABLE IF NOT EXISTS manage_indexes.index_definitions ( schemaname TEXT , indexname TEXT , tablename TEXT , create_ddl TEXT , drop_ddl TEXT , repl_name TEXT , PRIMARY KEY (schemaname, indexname, repl_name) ); COMMENT ON TABLE manage_indexes...