sql
stringlengths
6
1.05M
<gh_stars>10-100 -- PCT6. ASIAN ALONE WITH ONE OR MORE ASIAN CATEGORIES FOR SELECTED GROUPS -- designed to work with the IRE Census bulk data exports -- see http://census.ire.org/data/bulkdata.html CREATE TABLE ire_pct6 ( geoid VARCHAR(11) NOT NULL, sumlev VARCHAR(3) NOT NULL, state VARCHAR(2) NOT NULL, county V...
<filename>CS307/assignment/3/q3.sql select sub.district, sub.number, rank() over(order by sub.number desc) from ( select s.district, count(distinct ld.line_id) as number from line_detail as ld join stations as s on ld.station_id = s.station_id group by s.district having s.district != '' ) as sub...
<reponame>tbrand/OutOfMemory<gh_stars>1-10 -- Your SQL goes here CREATE VIEW answers AS SELECT posts.id AS id, posts.title AS title, posts.body AS body, posts.is_best_answer AS is_best_answer, posts.user_id AS user_id, posts.question_post_id AS question_post_id, (SELECT COUNT(up_ups.post_i...
-- select3.test -- -- execsql { -- SELECT log AS x FROM t1 -- GROUP BY x -- HAVING count(*)>=4 -- ORDER BY max(n)+0 -- } SELECT log AS x FROM t1 GROUP BY x HAVING count(*)>=4 ORDER BY max(n)+0
-- intpkey.test -- -- execsql { -- DROP TABLE t2; -- CREATE TABLE t2(x INTEGER PRIMARY KEY, y, z); -- INSERT INTO t2 VALUES(NULL, 1, 2); -- SELECT * from t2; -- } DROP TABLE t2; CREATE TABLE t2(x INTEGER PRIMARY KEY, y, z); INSERT INTO t2 VALUES(NULL, 1, 2); SELECT * from t2;
<filename>src/test/resources/sql/select/c170e008.sql<gh_stars>10-100 -- file:inet.sql ln:122 expect:true SELECT i, c, i | c AS "or" FROM inet_tbl
-- /packages/intranet-nagios/sql/postgresql/intranet-nagios-create.sql -- -- Copyright (c) 2003-2008 ]project-open[ -- -- All rights reserved. Please check -- http://www.project-open.com/license/ for details. -- -- @author <EMAIL> ----------------------------------------------------------- -- Nagios Categories -- --...
<gh_stars>0 --- Aggregation -- This allows to check whether aggregating tuples -- is more / less efficient in the JIT. SELECT SUM(I_ID * I_Category + I_Price + (I_ID * I_Price)) FROM Items;
DECLARE @publication AS sysname; DECLARE @article AS sysname; SET @publication = 'AdvWorksSalesOrdersMerge'; SET @article = 'Products'; EXEC sp_addmergearticle @publication = @publication, @article = @article, @source_object = @article, @article_resolver = 'Microsoft SQL Server Averaging Conflict Resolver', ...
<reponame>b-per/dbt-expectations-tsql<gh_stars>0 {% macro sqlserver__test_expect_column_values_to_be_within_n_moving_stdevs(model, column_name, date_column_name, period, lookback_perio...
<reponame>andrewyatz/ensembl<filename>misc-scripts/ontology/sql/tables.sql -- Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute -- Copyright [2016-2018] EMBL-European Bioinformatics Institute -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you ...
<gh_stars>0 {% macro star_with_col_alias_prefix(from, prefix, relation_alias=False, except=[]) -%} {%- do dbt_utils._is_relation(from, 'star_with_col_alias_prefix') -%} {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #} {%- if not execute -%} {{ ret...
-- 1. First make sure that the link type IDs are consistent across all systems. -- We therefore copy the existing link types and only change the ID value to -- the ones pre-defined in code. -- 2. Then we make sure all existing links that pointed to the old ID now point -- to the duplicated row with the new ID....
<gh_stars>1-10 create database airline_booking_db template template0; \c airline_booking_db set statement_mem = '200MB'; drop table if exists airline_booking_test1; drop table if exists airline_booking_test2; create table airline_booking_test1 (i int) partition by range(i) (start(1) end(1000) every(1)); create table a...
SELECT sku FROM customers INNER JOIN orders ON customers.cid = orders.cid INNER JOIN items ON orders.oid = items.oid WHERE name IN ('Smith', 'Jones', 'Adams') ORDER BY name,sku
<filename>src/db/seed.sql CREATE TABLE IF NOT EXISTS users( id INT PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, email VARCHAR(60), first_name VARCHAR(30), last_name VARCHAR(30), avatar VARCHAR(60), UNIQUE (email, first_name, last_name, avatar) ); CREATE INDEX IF NOT EXISTS users_full_name_...
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: mariadb-default -- Generation Time: Jun 10, 2021 at 02:33 PM -- Server version: 10.5.10-MariaDB-1:10.5.10+maria~focal -- PHP Version: 7.4.20 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 08 Jan 2022 pada 03.29 -- Versi server: 10.4.13-MariaDB -- Versi PHP: 7.4.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.9.4 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Feb 11, 2021 at 11:59 AM -- Server version: 10.3.27-MariaDB-log-cll-lve -- PHP Version: 7.3.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = ...
<reponame>ryanrodemoyer/dacpac_merge CREATE TABLE [dbo].[Podcasts] ( [Id] INT NOT NULL PRIMARY KEY IDENTITY(1,1), [PodcastName] NVARCHAR(50) NULL, [ReleaseDate] DATETIME2 NULL ) GO CREATE INDEX [IX_Podcasts_PodcastName] ON [dbo].[Podcasts] ([PodcastName])
<gh_stars>10-100 -- file:portals.sql ln:444 expect:true DELETE FROM uctest WHERE CURRENT OF c
<gh_stars>10-100 -- file:float4.sql ln:32 expect:true SELECT ' NAN '::float4
EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS, FORMAT JSON) SELECT * FROM messages_part WHERE read='t' LIMIT 1000;
<filename>src/SSRD.IdentityUI.EntityFrameworkCore.SqlServer/Scripts/Migrations/20200901071938_UserAttributes.sql CREATE TABLE [UserAttributes] ( [Id] bigint NOT NULL IDENTITY, [Key] nvarchar(450) NOT NULL, [Value] nvarchar(max) NULL, [UserId] nvarchar(450) NULL, [_CreatedDate] datetimeoffset NULL, ...
INSERT INTO core_admin_right (id_right,name,level_right,admin_url,description,is_updatable,plugin_name,id_feature_group,icon_url,documentation_url, id_order ) VALUES ('APPOINTMENT_CATEGORY_MANAGEMENT','appointment.adminFeature.manageCategories.name',1,'jsp/admin/plugins/appointment/ManageAppointmentCategory.jsp','appo...
select string_7, string_8 from nulls3 where string_8 like '0'
/* https://www.hackerrank.com/challenges/african-cities/problem */ SELECT CITY.NAME FROM CITY,COUNTRY WHERE CITY.COUNTRYCODE = COUNTRY.CODE AND CONTINENT = 'Africa';
UPDATE licensepools SET availability_time = last_checked WHERE availability_time IS NULL;
# User schema # --- !Ups ALTER TABLE user ADD money BIGINT NOT NULL DEFAULT 0; # --- !Downs ALTER TABLE user DROP COLUMN money
DROP INDEX IF EXISTS aws_network_summary; DROP MATERIALIZED VIEW IF EXISTS reporting_aws_network_summary; CREATE MATERIALIZED VIEW reporting_aws_network_summary AS( SELECT row_number() OVER(ORDER BY usage_start, usage_account_id, product_code) as id, usage_start, usage_start as usage_end, u...
-- Name: GetApparentlyUnsupportedSopClassesToProcess -- Schema: posda_files -- Columns: ['dicom_file_type', 'sop_class_uid', 'num_files', 'last', 'first'] -- Args: [] -- Tags: ['AllCollections', 'DateRange', 'Kirk', 'Totals', 'count_queries', 'end_of_month'] -- Description: Find files with no file series by dicom_file_...
CREATE TABLE QUERIES ( ID INTEGER GENERATED ALWAYS AS IDENTITY , NAME VARCHAR (255) NOT NULL , QUERY CLOB NOT NULL , CONSTRAINT QUERIES_PK PRIMARY KEY (ID) , CONSTRAINT QUERIES_NAME_UC UNIQUE (NAME) );
<reponame>nmfta-repo/nmfta-opentelematics-prototype CREATE TABLE [dbo].[DriverWaiver] ( [Id] UNIQUEIDENTIFIER CONSTRAINT [DF_DriverWaivers_Id] DEFAULT (newid()) NOT NULL, [driverId] UNIQUEIDENTIFIER NOT NULL, [country] NVARCHAR (50) NOT NULL, [region] NVARCHAR (50) NOT NULL, ...
------------------------------ -- Archivo de base de datos -- ------------------------------ DROP TABLE IF EXISTS usuarios CASCADE; CREATE TABLE usuarios ( id bigserial PRIMARY KEY , nombre varchar(255) NOT NULL UNIQUE , password varchar(60) NOT NULL ); DROP TABLE IF EXISTS zapatos CASCADE; CREATE T...
<filename>screen.sql<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 03-03-2017 a las 14:02:08 -- Versión del servidor: 5.6.17 -- Versión de PHP: 5.5.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @...
<filename>pg_export/templates/pg_12.x/out/table.sql create {%- if unlogged %} unlogged {%- endif %} {%- if kind == 'f' %} foreign {%- endif %} table {{ full_name }} ( {%- include 'out/_attribute.sql' %} ) {%- if options %} with ({{ options|join(', ') }}) {%- endif %} {%- if inherits %} inherits ({{ inherits|jo...
SQL> -- Create table SQL> create table t4a (c1 int) tablespace ts4; Table created. SQL> -- Populate table SQL> begin 2 for i in 1..1000 loop 3 insert into t4a values(i); 4 end loop; 5 commit; 6 end; 7 / PL/SQL procedure successfully completed.
<reponame>aaazt/wc-serve<filename>wc.sql<gh_stars>0 SET NAMES UTF8; DROP DATABASE IF EXISTS wc; CREATE DATABASE wc CHARSET=UTF8; USE wc; /*用户信息数据表*/ CREATE TABLE wc_user( uid INT PRIMARY KEY AUTO_INCREMENT, uname VARCHAR(32), upwd VARCHAR(32), email VARCHAR(32), phone VARCHAR(16), gender INT );...
/* This snapshot table will live in: public.snapshot_member_latest_messaging_status */ {% snapshot snapshot_member_latest_messaging_status %} {{ config( target_database=env_var("DBT_PG_DATABASE"), target_schema='public', unique_key='northstar_id', strategy='ch...
-- ------------------------------------------- -- 分库示例 DDL -- ------------------------------------------- -- 创建数据库 CREATE DATABASE IF NOT EXISTS `sharding_databases_0`; USE `sharding_databases_0`; -- 创建数据表 CREATE TABLE IF NOT EXISTS `user` ( `id` BIGINT(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Id', ...
-- CREATE DATABASE SuperMercado -- CREATE TABLE venda ( -- id_venda INT PRIMARY KEY NOT NULL, -- data date, -- preco_final DECIMAL (10,2), -- quantidade INT, -- id_cliente int -- ); -- CREATE TABLE Fornecedores LIKE clientes
<filename>doc/ttw.sql<gh_stars>0 /* SQLyog Ultimate v11.24 (32 bit) MySQL - 5.6.24 : Database - ttw ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_...
<gh_stars>0 WITH RECURSIVE tmp AS ( SELECT command AS orig_command, 0 as steps, 0 as stop, '' as logger, '' as stack, SUBSTR(command, 0, INSTR(command, ' ')) AS car, SUBSTR(command, INSTR(command, ' ') + 1) || ' ' AS command FROM (SELECT * FROM code LIMIT 1) ...
USE `RMBilling3`; DROP PROCEDURE IF EXISTS `prc_ProcesssCDR`; DELIMITER | CREATE PROCEDURE `prc_ProcesssCDR`( IN `p_CompanyID` INT, IN `p_CompanyGatewayID` INT, IN `p_processId` INT, IN `p_tbltempusagedetail_name` VARCHAR(200), IN `p_RateCDR` INT, IN `p_RateFormat` INT, IN `p_NameFormat` VARCHAR(50), IN `p_Rat...
--================== -- Colombia --================== -- only light cav get promote before attack UPDATE Modifiers SET SubjectRequirementSetId='EJERCITO_PATRIOTA_PROMOTE_SRS_BBG' WHERE ModifierId='TRAIT_PROMOTE_NO_FINISH_MOVES'; INSERT OR IGNORE INTO RequirementSetRequirements VALUES ('EJERCITO_PATRIOTA_PROMOTE_SRS...
SELECT DepartmentID, MIN(Salary) AS MinimumSalary FROM Employees WHERE DepartmentID IN (2, 5, 7) AND HireDate > '2000-01-01' GROUP BY DepartmentID
-- MySQL dump 10.13 Distrib 5.6.24, for Win32 (x86) -- -- Host: 127.0.0.1 Database: bd_almacen -- ------------------------------------------------------ -- Server version 5.5.5-10.1.9-MariaDB /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_R...
CREATE DATABASE IF NOT EXISTS sample DEFAULT CHARACTER SET utf8mb4;
{# UPDATE Description for CAST #} {% if data and 'description' in data and data.description != o_data.description %} COMMENT ON CAST ({{ conn|qtTypeIdent(o_data.srctyp) }} AS {{ conn|qtTypeIdent(o_data.trgtyp) }}) IS {{ data.description|qtLiteral }}; {% endif %}
<reponame>hackforla/tdm-calculator<gh_stars>10-100 update CalculationRule set displayFunctionBody = 'return !!<<LAND_USE_HOTEL>> || !!<<LAND_USE_RETAIL>> || !!<<LAND_USE_COMMERCIAL>> || !!<<LAND_USE_WAREHOUSE>> || !!<<LAND_USE_MEDICAL>> || !!<<LAND_USE_OTHER>> || !!<<LAND_USE_SCHOOL>> || !!<<LAND_USE_MAJOR...
<filename>src/test/resources/randexpr1.test_426.sql -- randexpr1.test -- -- db eval {SELECT (abs(e-((coalesce((select max(t1.c) from t1 where t1.f-a-case coalesce((select max(d) from t1 where (13<>~19)),f) when a- -t1.a | t1.f then t1.a*11-t1.e else coalesce((select max(t1.b) from t1 where not exists(select 1 from t1 ...
<gh_stars>1-10 alter table judicial_service_code_mapping drop CONSTRAINT service_code; INSERT INTO judicial_service_code_mapping (jurisdiction,lower_level,service_code,service_description) VALUES ('Authorisation Tribunals','00 - Interlocutory','BBA3','Social Security and Child Support'), ('Authorisation Tribunals','01...
<reponame>Short-T/CS3103 DELIMITER // DROP PROCEDURE IF EXISTS getPost // CREATE PROCEDURE getPost(IN id INT) BEGIN SELECT * FROM images WHERE IdImage = id; END // DELIMITER ;
<reponame>cfcalabrese/snowplow_test<gh_stars>0 create view customer_fav_actors as with customer_actors_watched as ( select customer_id, unnest(string_to_array(fl.actors, ', ')) as actor from customer_movies_seen cms inner join film_list fl on cms.film_id = fl.fid ), actors_agg as ( select customer_id, ...
CREATE TABLE [dbo].[EAuxiliarySupply] ( --From MergedXSDs XSD --From 'genericRailML' Namespace [EAuxiliarySupplyId] SMALLINT NOT NULL, [DedicatedSupplySystem] BIGINT NOT NULL, CONSTRAINT [PK_EAuxiliarySupplyId] PRIMARY KEY CLUSTERED ([EAuxiliarySupplyId] ASC), CONSTRAINT [FK_EAuxiliarySupply_TAuxiliarySupplySy...
#standardSQL # 08_19: CSP 'strict-dynamic' usage SELECT client, csp_count, strict_dynamic_count, scriptsrc_strict_dynamic_count, defaultsrc_strict_dynamic_count, total, ROUND(csp_count * 100 / total, 2) AS pct_csp, ROUND(strict_dynamic_count * 100 / total, 2) AS pct_strict_dynamic, ROUND(scriptsrc_str...
ALTER TABLE {$NAMESPACE}_almanac.almanac_device DROP isLocked;
<reponame>rai-harshit/agnel-online -- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 15, 2017 at 04:54 PM -- Server version: 10.1.21-MariaDB -- PHP Version: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_...
-- Create a new table called 'tblSessions' in schema 'dbo' --uuid, email, user_id, created_at -- Drop the table if it already exists IF OBJECT_ID('dbo.tblSessions', 'U') IS NOT NULL DROP TABLE dbo.tblSessions GO -- Create the table in the specified schema CREATE TABLE dbo.tblSessions ( id INT IDENTITY(1,1) NOT NULL...
<reponame>luisplata/museoCarmona CREATE TABLE `banner` ( `id` int(11) NOT NULL AUTO_INCREMENT, `img` varchar(100) COLLATE utf8mb4_spanish2_ci DEFAULT NULL, `img_mobile` varchar(100) COLLATE utf8mb4_spanish2_ci DEFAULT NULL, `status` varchar(10) COLLATE utf8mb4_spanish2_ci DEFAULT 'activo', `created_at` timest...
SELECT hour(datetime) as HOUR, count(*) FROM ANIMAL_OUTS WHERE hour(datetime) >= 9 AND hour(datetime) <= 19 GROUP BY HOUR ORDER BY HOUR;
USE `u449153114_pobox`; -- Dumping structure for table db_pobox.customer CREATE TABLE IF NOT EXISTS `customer` ( `customer_id` varchar(50) NOT NULL, `customer_name` varchar(50) NOT NULL, `customer_address` varchar(300) NOT NULL, `customer_pic` varchar(50) NOT NULL, `customer_contact` varchar(50) NOT NULL, ...
<filename>backend/resources/db/00-init.sql<gh_stars>0 CREATE USER svarta WITH LOGIN ENCRYPTED PASSWORD '<PASSWORD>'; CREATE DATABASE svarta WITH OWNER svarta; GRANT ALL PRIVILEGES ON DATABASE svarta TO svarta;
INSERT INTO sistema_web (nome) VALUES ('<NAME>'), ('ultrices primis'), ('senectus pharetra'), ('massa bibendum'), ('velit molestie'), ('vehicula dis'), ('malesuada bibendum'), ('posuere elementum'), ('vehicula ac'), ('iaculis taciti'), ('et sociis'), ('convallis tristique'), ('lacus egestas'), ('netus nascetur'), ('por...
CREATE TABLE [Player].[Player] ( [ID] INT CONSTRAINT [DF_Player_ID] DEFAULT (NEXT VALUE FOR [Player].[SeqPlayer]) NOT NULL, [Name] VARCHAR (25) NOT NULL, [Surname] VARCHAR (25) NOT NULL, [Story] INT NOT NULL, CONSTRAINT [PK_Player] PRIMARY KEY CLUSTERED ([ID] ASC), C...
SELECT m.* FROM Members m JOIN GroupMembers gm ON gm.memberId=m.id WHERE m.idType='GroupMember' AND gm.groupId=:groupId;
-- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Feb 23, 2020 at 12:08 PM -- Server version: 10.1.37-MariaDB -- PHP Version: 7.3.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
<filename>project_admin.sql<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 28, 2019 at 02:34 PM -- Server version: 10.3.15-MariaDB -- PHP Version: 7.3.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET ...
<filename>db/create.sql<gh_stars>0 -- Feel free to modify this file to match your development goal. -- Here we only create 3 tables for demo purpose. CREATE TABLE Users ( id INT NOT NULL PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, email VARCHAR(255) UNIQUE NOT NULL, password VARCHAR(255) NOT NULL, fi...
/* Navicat Premium Data Transfer Source Server : ivo1 Source Server Type : MySQL Source Server Version : 50718 Source Host : sh-cynosdbmysql-grp-e911sges.sql.tencentcdb.com:29062 Source Schema : tduck Target Server Type : MySQL Target Server Version : 50718 File Encoding ...
CREATE SEQUENCE games_id_seq INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1; GRANT ALL ON sequence public.games_id_seq TO ctudosestroe; CREATE TABLE public.games ( id integer NOT NULL DEFAULT nextval('games_id_seq'::regclass) , game_name character varying(50) COLLATE pg_catalog."default", started...
select * from dba_datapump_jobs; select ename from emp order by ename; select empno id, ename employee, sal Salary, comm commission from emp where job = ''MANAGER'' and sal > 2000', dbms_sql.native ); "select * from sample where x > 3" create table x_dump2000(clob_value clob, dump_date date default sysdate, dump_id nu...
<reponame>igoreusttaquio/freeposts<filename>freeposts/Infra/database.sql<gh_stars>1-10 CREATE TABLE postagem ( id INT PRIMARY KEY NOT NULL, titulo VARCHAR(200) NOT NULL, conteudo TEXT NOT NULL ); -- N* comentarios CREATE TABLE comentario ( id INT PRIMARY KEY NOT NULL, nome VARCHAR(150) NOT...
<filename>schema/deploy/roles/presence-absence-processor.sql<gh_stars>10-100 -- Deploy seattleflu/schema:roles/presence-absence-processor to pg begin; create role "presence-absence-processor"; grant connect on database :"DBNAME" to "presence-absence-processor"; grant usage on schema receiving, warehouse to "p...
DROP INDEX IF EXISTS pali_sent_org_uid ; DROP TABLE pali_sent_orgs ;
<reponame>Shuttl-Tech/antlr_psql<gh_stars>10-100 -- file:tstypes.sql ln:34 expect:true SELECT '1&2'::tsquery
use payroll execute p_add_time_entry @employee_id=37, @entry_date='2019-07-08 00:00:00', @hours_worked=5 execute p_add_time_entry @employee_id=49, @entry_date='2019-07-08 00:00:00', @hours_worked=4 execute p_add_time_entry @employee_id=39, @entry_date='2019-07-08 00:00:00', @hours_worked=4 execute p_add_time_entry @e...
USE subd; INSERT INTO users(id, username) VALUES (1,'marti'); INSERT INTO users(username) VALUES ('marti2'); INSERT INTO users(username) VALUES ('marti3'); INSERT INTO posts(id, name, user_id) VALUES (1, 'post11', 1); INSERT INTO posts(name, user_id) VALUES ('post12', 1); INSERT INTO posts(name, user_id) VALUES ('pos...
insert into recipes(title, content, uuid) values ('Recipe 1', 'Recipe content 1', 'cdcfb40f7fba4b708558fb52e2bea8c2'); insert into recipes(title, content, uuid) values ('Recipe 2', 'Recipe content 2', '9cfb3da5417d4b5baa7740748fd66fdf'); insert into recipes(title, content, uuid) values ('Recipe 3', 'Recipe content 3', ...
CREATE DATABASE anxin_test ; //用户表 DROP TABLE IF EXISTS `users`; CREATE TABLE `users` ( `id` int(6) NOT NULL AUTO_INCREMENT COMMENT '用户ID', `user_name` varchar(20) NOT NULL DEFAULT '' COMMENT '用户名', `user_pwd` varchar(20) NOT NULL DEFAULT '' COMMENT '用户密码', `user_email` varchar(20) NOT NULL DEFAULT '' COM...
create or alter view dbo.Summary as select c.CreatedAt, f.Starts, c.Profit, dbo.fnCalcRealProfit(a.BetPrice, b.BetPrice) realProfit, c.EffectiveProfit ep, c.MiddleDiff ...
CREATE TABLE IF NOT EXISTS hideout_types ( id bigserial primary key, name text, note text, created_at TIMESTAMP without time zone, updated_at TIMESTAMP without time zone default now(), UNIQUE(name) );
/******************************************************************************** PRIOR RELEASE FROM CURRENT RELEASE FULL FILE release-type-FULL-validation-AttributeValue-refset Assertion: The current AttributeValue refset full file contains all previously published data unchanged. The current full fil...
DROP TABLE IF EXISTS payment_analysis; DROP TABLE IF EXISTS payments; CREATE TABLE payments( id INT NOT NULL AUTO_INCREMENT, user_id INT NOT NULL, amount DECIMAL NOT NULL, order_id INT NOT NULL, currency VARCHAR(3) NOT NULL, email VARCHAR(1000) NOT NULL, PRIMARY KEY (id) );
<reponame>proton-vayu/android_external_perfetto<filename>src/trace_processor/metrics/android/mem_stats_priority_breakdown.sql<gh_stars>100-1000 -- -- Copyright 2019 The Android Open Source Project -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance wit...
SELECT quantileTiming(-0.)(number / 1.1754943508222875e-38) FROM numbers(257);
UPDATE "selfservice_verification_flows" SET "ui" = "_ui_tmp";
-- Convert schema '/home/melmoth/amw/AmuseWikiFarm/dbicdh/_source/deploy/54/001-auto.yml' to '/home/melmoth/amw/AmuseWikiFarm/dbicdh/_source/deploy/55/001-auto.yml':; ; BEGIN; ; SET foreign_key_checks=0; ; CREATE TABLE `title_attachment` ( `title_id` integer NOT NULL, `attachment_id` integer NOT NULL, INDEX `t...
/* Navicat MySQL Data Transfer Source Server : 172.16.17.32 Source Server Version : 50640 Source Host : 127.0.0.1:3333 Source Database : nutdesign_db Target Server Type : MYSQL Target Server Version : 50640 File Encoding : 65001 Date: 2021-05-09 13:44:45 */ SET FOREIGN_KEY_CHECKS=...
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 12, 2021 at 12:43 PM -- Server version: 10.4.17-MariaDB -- PHP Version: 7.4.13 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
<gh_stars>0 -- @testpoint:opengauss关键字And(保留),作为字段数据类型(合理报错) --前置条件 drop table if exists And_test cascade; --关键字不带引号-合理报错 create table And_test(id int,name And); --关键字带双引号-合理报错 create table And_test(id int,name "And"); --关键字带单引号-合理报错 create table And_test(id int,name 'And'); --关键字带反引号-合理报错 create table And_test(i...
<reponame>sultonyakbar/clipbucket -- phpMyAdmin SQL Dump -- version 4.0.4.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Aug 18, 2017 at 12:18 AM -- Server version: 5.5.32 -- PHP Version: 5.4.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SE...
<filename>BancoDeDados.sql  -- phpMyAdmin SQL Dump -- version 3.5.2.2 -- http://www.phpmyadmin.net -- -- Servidor: localhost -- Tempo de Geração: 11/04/2018 às 02:40:14 -- Versão do Servidor: 10.1.24-MariaDB -- Versão do PHP: 5.2.17 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_C...
<gh_stars>0 CREATE TABLE [dotnetnuke_dukes].[dnn_EngageEmployment_Document] ( [ResumeId] INT IDENTITY (1, 1) NOT NULL, [UserId] INT NULL, [FileName] NVARCHAR (255) NOT NULL, [ContentType] NVARCHAR (255) NOT NULL, [ContentLength] INT NOT ...
--All tested CREATE OR REPLACE FUNCTION muda_pnome(nusp INT, pnome VARCHAR(280)) RETURNS VOID AS $$ BEGIN UPDATE b05_PESSOA SET pnome=$2 WHERE b05_PESSOA.nusp=$1; END; $$ LANGUAGE plpgsql SECURITY DEFINER SET search_path FROM CURRENT; CREATE OR REPLACE FUNCTION muda_snome(nusp INT, snome V...
<reponame>trentford/iem -- We cleaned up the database and can enforce some constraints now, whew alter table warnings alter issue set not null; alter table warnings alter expire set not null; alter table warnings alter updated set not null; alter table warnings alter product_issue set not null; alter table warnings al...
---SchemaManipulation.sql --is SQL case sensitive? no. ------ BUT, anything in quotes IS case sensitive. SELECT * FROM album; --but this is the convention SELECT * FROM album; ----------ON TO SCHEMA MANIPULATION!!!!! /*DATATYPES in oracle sql: NUMBER, VARCHAR, VARCHAR2, DATE, TIMESTAMP, BLOB, CLOB, a...
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 08, 2020 at 03:18 PM -- Server version: 10.4.16-MariaDB -- PHP Version: 7.4.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 14, 2021 at 09:22 AM -- Server version: 10.4.17-MariaDB -- PHP Version: 7.3.27 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
<gh_stars>1-10 CREATE TABLE flowcell_history ( flowcell_history_id int(10) unsigned NOT NULL AUTO_INCREMENT, flowcell_id int(10) unsigned NOT NULL, flowcell_barcode varchar(45) NOT NULL, update_timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fpga_version varchar(100) NOT N...