sql
stringlengths
6
1.05M
<reponame>ngthuc/TSV2017-12 -- phpMyAdmin SQL Dump -- version 4.0.4.2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Dec 26, 2017 at 04:57 AM -- Server version: 5.6.13 -- PHP Version: 5.4.17 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
<filename>Codefights/arcade/db/level-2/8.contestLeaderboard/MySQL/solution1.sql -- MySQL CREATE PROCEDURE contestLeaderboard() SELECT name FROM `leaderboard` ORDER BY score DESC LIMIT 3, 5 ;
<reponame>TerrasAppSolutions/seeg-mapbiomas-workspace WITH CTS AS (SELECT CT.* FROM classificacao_tarefas AS CT LEFT JOIN classificacoes AS C ON C.id = CT.classificacao_id LEFT JOIN biomas AS B ON B.id = C.bioma_id LEFT JOIN cartas AS CA ON CA.id = C.carta_id WHERE (B.nome = 'PANTANAL' AND CA.codigo = 'SE-21-V-B' ...
<filename>Scripts/Table_and_Index_storage_size.sql --Get Table and Index storage size in sql server --Link: http://stackoverflow.com/questions/15896564/get-table-and-index-storage-size-in-sql-server#15896658 /* Author: marc_s This query here will list the total size that a table takes up - clustered index, heap and all...
<reponame>NowinskiK/ssdt-training /****** Object: UserDefinedTableType [Website].[OrderIDList] Script Date: 10/06/2020 18:14:16 ******/ CREATE TYPE [Website].[OrderIDList] AS TABLE( [OrderID] [int] NOT NULL, PRIMARY KEY CLUSTERED ( [OrderID] ASC )WITH (IGNORE_DUP_KEY = OFF) )
<filename>Problemset/product-sales-analysis-ii/product-sales-analysis-ii.sql -- @Title: 产品销售分析 II (Product Sales Analysis II) -- @Author: Singularity0909 -- @Date: 2020-09-28 01:32:06 -- @Runtime: 838 ms -- @Memory: 0 B select Product.product_id, sum(Sales.quantity) total_quantity from Product join Sales on Product.p...
delete from bans where server_id=:server_id: and ban_id=:ban_id:;
-- test scrollable cursor support create function sc_test() returns setof integer as $$ declare c scroll cursor for select f1 from int4_tbl; x integer; begin open c; fetch last from c into x; while found loop return next x; fetch prior from c into x; end loop; close c; end; $$ language plpgsql;
DROP DATABASE IF EXISTS employeetrackerDB; CREATE database employeetrackerDB; USE employeetrackerDB; CREATE TABLE Department ( -- * id - INT PRIMARY KEY -- * name - VARCHAR(30) to hold department name id INT NOT NULL AUTO_INCREMENT, name VARCHAR(30) NOT NULL, PRIMARY KEY (id) ); CREATE TABLE Rol...
<reponame>FalveyLibraryTechnology/deselection-guide SELECT posted_books.barcode, posted_books.title, posted_books.pub_year FROM posted_books INNER JOIN posted_files ON posted_files.file_id = posted_books.file_id WHERE posted_files.month > '2020-01-15' AND posted_files.month < '2020-02-15';
create table if not exists measurements ( sensor_id INTEGER, measurement_time INTEGER, value NUMERIC, collection_time_ms INTEGER )
insert into contract(id, create_time, customer_id, customer_name, customer_id_number, customer_mobile_phone, interest_rate, commitment, repayment_type, maturity_date, status, version) values('20200917000001', '2020-09-17 18:00:16', '1', 'zhangsan', '410782199001011234', '18911112222', 9.9, 9000.00, 'DEBJ', '...
/* SAP HANA certified machine types */ /* https://cloud.google.com/solutions/sap/docs/certifications-sap-hana#hana-cert-table-vms */ UPDATE instances SET hana = '1' WHERE name LIKE 'n1-highmem-32'; UPDATE instances SET hana = '1' WHERE name LIKE 'n1-highmem-64'; UPDATE instances SET hana = '1' WHERE name LIKE 'n1-high...
INSERT INTO q_ob_benefit(benefittype_id, abbrname, name, identifier, begdate, enddate, description, parent_id, uid, utid, uapp, status, actual, note, crtuser, crtusergroup, create_date, update_date ) VALUES (2, 'NULL', 'Особи, яким Законом України «Про статус ветеранів війни, гарантії їх соціального захисту» надано т...
CREATE TABLE IF NOT EXISTS urls ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, url TEXT NOT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB AUTO_INCREMENT=500 DEFAULT CHARSET=utf8;
CREATE TABLE resource_table ( uuid VARCHAR2(40) NOT NULL, json CLOB, key CLOB, key_id VARCHAR2(40) NOT NULL, processed VARCHAR2(700), start_date DATE, fhir_version VARCHAR2(40) NOT NULL ); CREATE TABLE patient_map ( id VARCHAR2(40) NOT NULL, signature VARCHAR2(40) NOT NULL, subject_id VARCHAR2(40),...
ALTER TABLE IDN_OAUTH_CONSUMER_APPS ADD USER_ACCESS_TOKEN_EXPIRE_TIME BIGINT DEFAULT 3600000; ALTER TABLE IDN_OAUTH_CONSUMER_APPS ADD APP_ACCESS_TOKEN_EXPIRE_TIME BIGINT DEFAULT 3600000; ALTER TABLE IDN_OAUTH_CONSUMER_APPS ADD REFRESH_TOKEN_EXPIRE_TIME BIGINT DEFAULT 84600000; DROP PROCEDURE IF EXISTS drop...
<reponame>EuPathDB/ApiCommonData /* table for SpliceSite sites */ CREATE TABLE apidb.SpliceSiteGenes ( splice_site_gene_id NUMBER(10) not null, splice_site_feature_id NUMBER(10) not null, protocol_app_node_id NUMBER(10) NOT NULL, source_id VARCHAR2(50), is_dominant ...
-- Things to note if you're not familiar with sqlite3: -- -- - After connecting always run "PRAGMA foreign_keys = ON" or foreign key -- constraints will not be honored. -- - Primary keys may be NULL (and thus always need a NOT NULL constraint) -- - Tables with primary keys that are not integers and that don't nee...
<filename>exam.sql<gh_stars>0 -- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Mar 09, 2022 at 07:28 PM -- Server version: 10.4.22-MariaDB -- PHP Version: 7.4.27 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!401...
<gh_stars>0 -- MySQL dump 10.13 Distrib 5.7.18, for Linux (x86_64) -- -- Host: localhost Database: YouPHPTube-Encoder -- ------------------------------------------------------ -- Server version 5.7.18-0ubuntu0.16.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET...
-- mysql -usomeUser -psomePass < 20200304T184700-create_tables.sql use lax_db; create table users ( token VARCHAR(60) PRIMARY KEY, email VARCHAR(60), display_name VARCHAR(40), password VARCHAR(60) ); create table channels ( channel_name VARCHAR(60) PRIMARY KEY, creator_token VARCHAR(60), num_messages I...
CREATE OR REPLACE FUNCTION mt_user_u_pg1(i_id integer, i_name character varying, i_user character varying) RETURNS integer AS $BODY$ begin update mabotech.user set name = i_name, lastupdateon = now(), lastupdatedby = i_user where id = i_id; return 1; end; $BODY$ LANGUAGE plpgsql VOLATILE
<reponame>scaperex/My_Projects<gh_stars>0 /* Note that we perform left outer join on each part of stats as to make sure we get all stats on all treks No matter if specfic stat is zero (which can happen with number of recommendation for example) */ CREATE VIEW WarmUpView AS Select top 1000000 HikersStats.Trek, Hiker...
------------------------------------------------------------------------------- -- -- Script: shared_pool_lru_stats.sql -- Purpose: to check the shared pool lru stats -- For: 8.0 and higher -- -- Copyright: (c) Ixora Pty Ltd -- Author: <NAME> -- -------------------------------------------------------------------------...
<reponame>okauppinen/oskari-server -- update proper config for views UPDATE portti_view_bundle_seq set config = '{ "name": "MyPlacesImport", "sandbox": "sandbox", "flyoutClazz": "Oskari.mapframework.bundle.myplacesimport.Flyout", "maxFileSizeMb": 10 }' WHERE bundle_id = (SELECT id FROM portti_bundle WHERE ...
/***************************************** Course: IMT 577 Instructor: <NAME> IT Session: 5 Date: 11/14/2021 Notes: Create dimension characters for IT Session 6 *****************************************/ USE DATABASE IMT577_ITSESSIONDW; --CREATE TABLE CREATE OR REPLACE TABLE Dim_Characters( DimCharacterID...
<filename>src/main/resources/tpch/icarus/queries/q19.sql -- (Q19) Discounted Revenue Query -- tables: tpch_lineitem, tpch_part SELECT sum(l_extendedprice * (1 - l_discount)) AS revenue FROM tpch_lineitem, tpch_part WHERE ( p_partkey = l_partkey AND p_brand = 'Brand#12' AND (p_container = 'SM CASE' OR ...
<gh_stars>1-10 CREATE TABLE `tags` ( `runID` bigint(20) NOT NULL, `tagname` varchar(500) NOT NULL, `tag` varchar(500) NOT NULL) CREATE TABLE `solverRun` ( `runID` bigint(20) NOT NULL, `runtime` bigint(20) NOT NULL) CREATE TABLE `startup` ( `runID` bigint(20) NOT NULL, `startTime` datetime NOT NULL) select * from startu...
<gh_stars>1-10 alter table short_url alter column modified_at drop not null;
-- phpMyAdmin SQL Dump -- version 4.8.2 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Aug 13, 2018 at 06:55 AM -- Server version: 10.1.34-MariaDB -- PHP Version: 7.2.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
<reponame>anjkrish2608/employee-tracker<gh_stars>0 USE employee_DB; INSERT INTO departmentTable(name) VALUES("IT"),("Accounting"),("Construction"); INSERT INTO roleTable(title,salary,department_id) VALUES("Head of IT",50000,1),("Head of Accounting",100000,2),("Head of Construction",70000,3); INSERT INTO employeeTabl...
<reponame>MarkPryceMaherMSFT/Synapse if exists(select * from sys.procedures p inner join sys.schemas s on p.schema_id = s.schema_id where p.name like 'poly_into' and s.name = 'dbo') BEGIN DROP PROC [dbo].[poly_into] END go CREATE PROC [dbo].[poly_into] @tbname [varchar](200), -- Table we wish to load into @schem...
<reponame>tconbeer/dbt-utils {% set prefix_with = "prefix_" if target.type != "snowflake" else "PREFIX_" %} {% set suffix_with = "_suffix" if target.type != "snowflake" else "_SUFFIX" %} with data as ( select {{ dbt_utils.star( from=ref("data_star"), prefix=...
use mysql; select host, user from user; -- 因为mysql版本是5.6,因此新建用户为如下命令: --create user legendshop_sr1 identified by 'legendshop_sr1123'; -- 将docker_mysql数据库的权限授权给创建的docker用户,密码为<PASSWORD>: --grant all on legendshop_dev.* to legendshop_sr1@'%' identified by 'legendshop_sr1123' with grant option; -- 这一条命令一定要有: grant all PRI...
alter table test_event drop column acknowledged; create table test_event_acknowledgement ( acknowledgement_id int primary key, test_event_id int not null references test_event, acknowledgement_date timestamp ); create index acknowledegment_test_event_idx on test_event_acknowledgement(test_event_id);
{% macro get_incremental_manifest_status(incremental_manifest_table, models_in_run) -%} {% if not execute %} {{ return(['', '', '', '']) }} {% endif %} {% set last_success_query %} select min(last_success) as min_last_success, max(last_success) as max_last_success, coalesce(count...
INSERT INTO wordcollocation.pos (Entry, EntryZht, EntryZhs, EntryJap, RowVersion, CanDel) VALUES ('noun', '名詞', '名词', '名詞', '2016-10-03 23:22:35', 0); INSERT INTO wordcollocation.pos (Entry, EntryZht, EntryZhs, EntryJap, RowVersion, CanDel) VALUES ('verb', '動詞', '动词', '動詞', '2016-10-03 23:23:36', 0); INSERT INTO wordco...
<gh_stars>1-10 insert into sline_article_attr values('1','0','','线路攻略','','0','0','','','','1'); insert into sline_article_attr values('2','0','','酒店攻略','','0','0','','','','1'); insert into sline_article_attr values('3','0','','租车攻略','','0','0','','','','1'); insert into sline_article_attr values('4','0','','景点攻略','',...
DROP VIEW IF EXISTS thr_report_monthly CASCADE; CREATE VIEW thr_report_monthly AS SELECT "awc_location_months"."awc_id" AS "awc_id", "awc_location_months"."awc_name" AS "awc_name", "awc_location_months"."awc_site_code" AS "awc_site_code", "awc_location_months"."supervisor_id" AS "supervisor_id", "awc_location_months"."...
<reponame>GuilhermeVieira/mac0350-database \c acc_peo; -------------------------------------------------------------------------------- -- Create Group -------------------------------------------------------------------------------- CREATE OR REPLACE FUNCTION relaciona_usuario_pessoa (IN us_email email, INOUT pe_nusp...
<gh_stars>0 /* Navicat Premium Data Transfer Source Server : gcloud Source Server Type : MySQL Source Server Version : 50725 Source Host : 192.168.3.11:3306 Source Schema : db_pandaisikek Target Server Type : MySQL Target Server Version : 50725 File Encoding : 65001 ...
CREATE TABLE Transactions( id int auto_increment, act_src_id int not null, act_dest_id int null, amount decimal(12,2), `type` varchar(10), --deposit, withdraw, transfer, etc memo TEXT, expected_total decimal (12,2) created datetime default current_timestamp, primary key (id), for...
<filename>script_manual/2020_06_22_131029_gestion_hospitalaria_prescripcion_detalle.sql CREATE TABLE `siemprea_bspi_gestion_hospitalaria`.`prescripcion_detalle` ( `PRESC_DETA_COD` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, `PRESCRIPCION_COD` BIGINT UNSIGNED NOT NULL, `FARMACIA_COD` BIGINT UNSIGNED NOT NULL, `PROD...
-- phpMyAdmin SQL Dump -- version 4.9.5deb2 -- https://www.phpmyadmin.net/ -- -- 主機: localhost:3306 -- 產生時間: 2021 年 11 月 15 日 18:26 -- 伺服器版本: 10.3.31-MariaDB-0ubuntu0.20.04.1 -- PHP 版本: 7.4.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
CREATE DATABASE who; \connect who CREATE TABLE mortality_rates ( country text, year smallint, cause text, sex char(1), deaths int, PRIMARY KEY(country, year, cause, sex) );
<reponame>gcorron/Festival CREATE TABLE [dbo].[Judge] ( [Id] INT NOT NULL, [Location] INT NOT NULL, [Name] NVARCHAR (50) NOT NULL );
WITH gdp_provincial_all_industries as ( SELECT year_begin_date, gdp FROM stg.provincial_gdp_yearly_snapshot WHERE TRUE AND industry = 'All industries [T001]' AND geo = '{geo}' AND year_begin_date BETWEEN DATE('{start_date}') AND DATE('{end_date}') AND gd...
<reponame>christophanneser/Bao-for-Presto SELECT COUNT(*) FROM tag as t, site as s, question as q, tag_question as tq WHERE t.site_id = s.site_id AND q.site_id = s.site_id AND tq.site_id = s.site_id AND tq.question_id = q.id AND tq.tag_id = t.id AND (s.site_name in ('stackoverflow')) AND (t.name in ('android-recyclervi...
<filename>ClimateChangeAnalysis/sql/Tables/corporations.sql<gh_stars>0 -- Table: public.corporations -- DROP TABLE public.corporations; CREATE TABLE IF NOT EXISTS public.corporations ( account_number integer NOT NULL, organization character varying(200) COLLATE pg_catalog."default", country character vary...
<filename>SQl Queries/chit_fund.sql<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Nov 18, 2019 at 07:18 AM -- Server version: 10.4.8-MariaDB -- PHP Version: 7.3.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION...
<filename>ci3-login.sql -- Adminer 4.7.7 MySQL dump SET NAMES utf8; SET time_zone = '+00:00'; SET foreign_key_checks = 0; SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; SET NAMES utf8mb4; DROP TABLE IF EXISTS `user`; CREATE TABLE `user` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(128) NOT NULL, `email` var...
<reponame>dsalunga/mPortal -- Procedure WebPage_Del SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[WebPage_Del] ( @PageId int ) AS SET NOCOUNT ON if(@PageId > 0) BEGIN DELETE FROM WebPage WHERE PageId=@PageId END RETURN GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER OFF ...
<reponame>sebarach/IAUDISIS USE [AppAu] GO /****** Object: StoredProcedure [dbo].[SP_Set_Estado_Formulario_Promotor] Script Date: 17-05-2018 11:03:35 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO -- ============================================= -- Author: <Author,,Name> -- Create date: <Create Date,,...
ALTER TABLE ONLY public.search_servicearea ADD COLUMN catchment_method character varying(250); UPDATE public.search_servicearea SET catchment_method = 'proximity'; UPDATE public.search_servicearea SET catchment_method = 'local-authority' WHERE slug in ('childcare-arrangements', 'civil-partnership', 'divorce'); U...
<filename>CSharp-DB/Databases-Basics/Exams/DemoExam-13-Oct-2019/09MostContributedRepositories.sql SELECT TOP(5) r.Id, r.[Name], COUNT(c.Id) AS [Commits] FROM RepositoriesContributors AS rc JOIN Repositories AS r ON r.Id = rc.RepositoryId JOIN Commits AS c ON c.RepositoryId = r.Id G...
<reponame>bac/flask-microservices-users CREATE DATABASE users_prod; CREATE DATABASE users_dev; CREATE DATABASE users_test;
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET NAMES utf8 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; # Dumping structure for procedure galaxy.sp_RemoveFriend DROP P...
SELECT NULL as row_number, af.parent_award_id, (SELECT COALESCE(SUM(sub_af.transaction_obligated_amou::numeric),0) AS transaction_sum FROM award_financial as sub_af WHERE submission_id = {0} AND sub_af.parent_award_id = af.parent_award_id) AS transaction_obligated_amou_sum, (SELECT COALESCE(SUM(sub_ap.federal_ac...
<gh_stars>0 DROP TABLE IF EXISTS `SGI_AUX_Acabamentos`; CREATE TABLE SGI_AUX_Acabamentos ( `COD_ACABAMENTO` BIGINT AUTO_INCREMENT NOT NULL, `DESCRICAO` VARCHAR(40) NOT NULL DEFAULT '', `ATIVO` TINYINT NOT NULL, PRIMARY KEY (`COD_ACABAMENTO`) ); DROP TABLE IF EXISTS `SGI...
<filename>scripts/v1/auth/database/query/assessment/assessment_delete.sql DELETE FROM `{table.assessment}` WHERE `assessment_id`='{0}' LIMIT 1;
-- +++ -- parent: 1528395915 -- +++ BEGIN; ALTER TABLE external_service_repos ADD COLUMN IF NOT EXISTS org_id INTEGER REFERENCES orgs(id) ON DELETE CASCADE; COMMIT;
UPDATE PEN_RETRIEVAL_REQUEST_GENDER_CODE SET EXPIRY_DATE = SYSDATE WHERE GENDER_CODE in ('X','U');
<filename>sqlscripts/DDL.sql CREATE TABLE `product` ( `id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '主键', `code` VARCHAR(20) NOT NULL COMMENT '影片编码', `title` VARCHAR(200) NULL COMMENT '标题', `series` VARCHAR(150) NULL COMMENT '系列', `actress_name` VARCHAR(60) NU...
<gh_stars>1-10 ALTER TABLE "public"."reviews" ADD COLUMN "typeReview" text NULL;
CREATE OR REPLACE TYPE BODY logger AS MEMBER FUNCTION getName RETURN VARCHAR2 IS BEGIN RETURN m_name; END; map MEMBER FUNCTION Compare RETURN number IS BEGIN RETURN m_lvl; END; MEMBER FUNCTION getLevel RETURN LogLevel IS BEGIN RETURN null; END; MEMBER FUNCTION isEnabled(lvl IN LogLevel, marker ...
<filename>tests/unittests/postgresql/json_type.sql<gh_stars>10-100 -------------------------------------------------------------------------- -- Transaction test -------------------------------------------------------------------------- .run ../common/postgresql_setup.sql CREATE TABLE JsonTable ( a INTEGER PRIMARY KE...
<reponame>agir2000/Cotonti DROP TABLE IF EXISTS `cot_referers`;
--pass different formats of date/timestamp/datetime arguments --1. pass different formats of date arguments select last_day(date'2010-10-08'); --select last_day(date'12-25'); select if(last_day(date(concat(year(sysdate),'-12-25')))=last_day(date'12-25'),'ok','nok'); --select last_day(date'8/30'); select if(last_day...
-- @testpoint: 使用关键字limit为列名的全局临时表创建视图 drop table if exists t_global_temporary_limit_006 cascade; create global temporary table t_global_temporary_limit_006("limit" int) on commit preserve rows; insert into t_global_temporary_limit_006 values(1); commit; select "limit" from t_global_temporary_limit_006 order by "limit"...
<filename>data/1.[T1-Company].sql INSERT INTO [T1-Company]([Registration Number],[Brand Name],[Induction Date]) VALUES (728386,'Zing Zang','2021/06/20'); INSERT INTO [T1-Company]([Registration Number],[Brand Name],[Induction Date]) VALUES (250001,'Icy Cool','2021/03/26'); INSERT INTO [T1-Company]([Registration Number],...
-- phpMyAdmin SQL Dump -- version 4.2.11 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 2017-03-21 18:26:18 -- 服务器版本: 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 */; /*!40101 SET @...
<reponame>edigonzales/nplso-umbau-kantonale-daten<filename>conversion/sql/copyGws.sql /* * init-common-tables.sql has to be executed before! */ -- Delete all areas that belong to a -- Grundwasserschutzzonen und -areale type. DELETE FROM arp_npl_kantdaten_export.nutzungsplanung_ueberlagernd_flaeche WHERE typ_uebe...
INSERT INTO USER (ID, USER_NAME, USER_EMAIL, USER_PAIRING_ENABLED) VALUES (1, '<NAME>', '<EMAIL>', false); INSERT INTO USER (ID, USER_NAME, USER_EMAIL, USER_PAIRING_ENABLED) VALUES (2, '<NAME>', '<EMAIL>', false); INSERT INTO USER (ID, USER_NAME, USER_EMAIL, USER_PAIRING_ENABLED) VALUES (3, '<NAME>', '<EMAIL>', false);...
drop sequence if exists artist_artist_id_seq; drop sequence if exists album_album_id_seq; create sequence artist_artist_id_seq start with 1 increment by 1; create sequence album_album_id_seq start with 1 increment by 1; DROP TABLE IF EXISTS public.album; DROP TABLE IF EXISTS public.artist; CREATE TABLE public.artist(...
<reponame>Honderdors/Analysis-Services-Load-Balancing CREATE PROCEDURE [app].[close_sessions] WITH EXECUTE AS OWNER AS /*=============================================================================================== | [close_sessions] | Created By <NAME> | | close ASLB sessions Proc based on TTL | test http://ilc...
-- -- PostgreSQL database dump -- -- Dumped from database version 9.5.17 -- Dumped by pg_dump version 11.2 (Ubuntu 11.2-1.pgdg16.04+1) -- Started on 2019-06-28 15:54:35 CEST SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_confor...
/* 加 + 減 - 乘 * 除 / 請計算 Products 表格中所有產品價格的平均值 */ select avg(Price) as avg from orders.products;
<filename>project/Products.sql<gh_stars>0 INSERT INTO product (name, price, inventory, description, category, available, image_path) VALUES ('Spik', 4, 2355, 'Spikar', 'none', 1, '/images/spik.jpg'); INSERT INTO product (name, price, inventory, description, category, available, image_path) VALUES ('Hammare', 99, 35, 'S...
<reponame>alphagov/classifyintentsapp<gh_stars>1-10 /* Looks for duplicates in the urls table and deletes if the full_url, page, org0, and section0 columns have not changed. */ delete from urls where url_id in ( select url_id from ( select url_id, row_number() OVER (partition by full_url, page, org0, section0 ...
drop table if exists TweetInfo go create table TweetInfo( TweetId int identity(1,1) primary key, TweetCreatedAt smalldatetime, TweetText nvarchar(1000), TweetAuthor nvarchar(255), TweetAuthorLocation nvarchar(255), TweetAuthorFollowerCount int, TweetAuthorCreatedAt smalldatetime, TweetGeoFullNa...
<gh_stars>1-10 /*------------------------------------------------------------------------------------------------- NAME: DBA_DiskSpaceAllocation.sql CREATED BY: <NAME> EMAIL: <EMAIL> DESCRIPTION: Checks the consistency of disk space allocation structures for a specified database. ---------------------...
<reponame>ezwip/SKlone /****** Object: Stored Procedure dbo.Raze Script Date: 5/1/2004 6:12:38 PM ******/ CREATE PROCEDURE dbo.Raze ( @kdID int, @Buildings int, @BuildingType tinyint ) AS DECLARE @Cost int DECLARE @BuildingsAvailable int SET @BuildingsAvailable = (SELECT Built FROM Buildings W...
drop table if exists companies; create table if not exists companies ( id int(11) not null auto_increment primary key, name varchar(64) not null, created_at timestamp default now() ); drop table if exists employees; create table if not exists employees ( id int(11) not null auto_increment primary key, compan...
<filename>database/src/main/resources/db/migration/V11__sentry_event_jsonb.sql -- I don't know why I declared it json :( alter table private.sentry_event alter column content type jsonb ;
{{ config(materialized='table') }} -- dim_snowdepth_aux with source as ( select * from {{ ref('stg_snowdepth_aux') }} ), dim_snowdepth_coordinates as ( select id, sn_site from {{ ref('dim_snowdepth_coordinates') }} ), dim_snowdepth_aux as ( select row_number() o...
drop table [student_mark] drop table [student] drop table [subject] create table student ( [id] int not null identity(1,1) primary key, [name] nvarchar(50) not null, [age] int not null, [class] int not null ) create table [subject] ( [id] int not null identity(1,1) primary key, [name] nvarchar...
-- file:plpgsql.sql ln:1189 expect:true insert into WSlot values ('WS.101.3a', '101', '', '')
<reponame>OpenPerpetuum/OPDB-docs USE [perpetuumsa] GO --------------EntityDefault------------- DECLARE @definitionID int; DECLARE @aggvalueID int; DECLARE @aggfieldID int; PRINT N'def_npc_waspish_miniboss_rank3'; SET @definitionID = (SELECT TOP 1 definition from entitydefaults WHERE [definitionname] = 'def_npc_was...
-- ---------------------------- DROP TABLE IF EXISTS `TakeTrainRecord`; CREATE TABLE `TakeTrainRecord`( `RID` int PRIMARY KEY AUTO_INCREMENT, `PCardID` char(18) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `TID` int NOT NULL, `SStationID` int NOT NULL, `AStationID` int NOT NULL, `CarrigeID` smallint, ...
INSERT INTO `id_sharding_0`(`id`, `data`) VALUES (2, 'test2');
<filename>coeus-db/coeus-db-sql/src/main/resources/org/kuali/coeus/coeus-sql/log/Release_1_0_logs/s2s/procfunpacks/GetFundingMonths.sql<gh_stars>0 CREATE OR REPLACE FUNCTION GetFundingMonths (AW_PROPOSAL_NUMBER OSP$BUDGET_PERIODS.PROPOSAL_NUMBER%TYPE, AW_VERSION OSP$BUDGET.VERSION_NUMBER%TYPE, AW_PERSONI...
-- Probably not required. CREATE TABLE IF NOT EXISTS `###raf_settings` ( `id` INT(10) NOT NULL AUTO_INCREMENT, `templatePageIDs` LONGTEXT NULL, `products` LONGTEXT NULL, `discounts` LONGTEXT NUll, PRIMARY KEY (`id`) ) ~~~COLLATE; -- Table structure for RAF Members table. CREATE TABLE IF NOT EXISTS `###raf_membe...
<reponame>leefernandes/sqlt {{ define "user/list" -}} -- SELECT {{ with .Select -}} select {{ . }} {{ else -}} select * {{ end }} -- FROM from "iam"."user" -- WHERE {{ with .Where -}} where {{ . }} {{ end }} -- LIMIT {{ with .Limit -}} {{ if and (gt . 0) (lt . 50) -}} limit {{ . }} {{ else -}} limit 50 {{ end }} {{- e...
<filename>lib/sql/oprdb.add.networkacl.sql -- ACL needed for /dashboard -- Requires sysdba, e.g. -- sqlplus sys/xxxx@userdb as sysdba -- Based on -- https://mango.ctegd.uga.edu/svn/ApiCommonSystem/trunk/Oracle/sql/acl_upenn.sql -- and -- https://mango.ctegd.uga.edu/svn/ApiCommonSystem/trunk/Oracle/sql/add_ac...
-- Repairs null story.owner fields by pulling information from the -- related documnt.primaryAuthor field. As of 2013-01-15, this is safe -- as there is no practical way to create BODY and ANSWER_SET -- documents with different authors, but such a state is possible -- according to the design. These limitations should b...
<filename>sql_metadb/migration_tables/po_order_templates.sql DROP TABLE IF EXISTS po_order_templates; CREATE TABLE po_order_templates AS SELECT id::varchar(36), jsonb_extract_path_text(jsonb, 'acquisitionMethod')::varchar(36) AS acquisition_method, jsonb_extract_path_text(jsonb, 'approved')::boolean AS app...
<reponame>daramousk/kratos CREATE INDEX `selfservice_verification_flows_nid_idx` ON `selfservice_verification_flows` (`id`, `nid`);
<gh_stars>0 ALTER DOMAIN zipcode RENAME CONSTRAINT zipchk TO zip_check;
-- @testpoint:opengauss关键字character(非保留),作为数据库名 --关键字不带引号-成功 drop database if exists character; create database character; --清理环境 drop database character; --关键字带双引号-成功 drop database if exists "character"; create database "character"; --清理环境 drop database "character"; --关键字带单引号-合理报错 drop database if exists 'charact...